Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/showmount Insert a tab if the length of the director...



details:   https://anonhg.NetBSD.org/src/rev/1dc4fb7650c6
branches:  trunk
changeset: 499501:1dc4fb7650c6
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Nov 21 11:09:24 2000 +0000

description:
Insert a tab if the length of the directory > 35 bytes to prevent
concatenation.

diffstat:

 usr.bin/showmount/showmount.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r dd0eded20ba5 -r 1dc4fb7650c6 usr.bin/showmount/showmount.c
--- a/usr.bin/showmount/showmount.c     Tue Nov 21 09:59:02 2000 +0000
+++ b/usr.bin/showmount/showmount.c     Tue Nov 21 11:09:24 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: showmount.c,v 1.9 1998/04/02 11:10:52 kleink Exp $     */
+/*     $NetBSD: showmount.c,v 1.10 2000/11/21 11:09:24 msaitoh Exp $   */
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)showmount.c        8.3 (Berkeley) 3/29/95";
 #endif
-__RCSID("$NetBSD: showmount.c,v 1.9 1998/04/02 11:10:52 kleink Exp $");
+__RCSID("$NetBSD: showmount.c,v 1.10 2000/11/21 11:09:24 msaitoh Exp $");
 #endif not lint
 
 #include <sys/types.h>
@@ -116,6 +116,7 @@
        int estat, rpcs = 0, mntvers = 1;
        char *host;
        int ch;
+       int len;
 
        while ((ch = getopt(argc, argv, "ade3")) != -1)
                switch((char)ch) {
@@ -190,7 +191,9 @@
                printf("Exports list on %s:\n", host);
                exp = exports;
                while (exp) {
-                       printf("%-35s", exp->ex_dirp);
+                       len = printf("%-35s", exp->ex_dirp);
+                       if (len > 35)
+                               printf("\t");
                        grp = exp->ex_groups;
                        if (grp == NULL) {
                                printf("Everyone\n");



Home | Main Index | Thread Index | Old Index