Insert a tab if the length of the directory > 35 bytes to prevent

concatenation.
This commit is contained in:
msaitoh 2000-11-21 11:09:24 +00:00
parent f8ea339f55
commit e633320474
1 changed files with 6 additions and 3 deletions

View File

@ -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 * Copyright (c) 1989, 1993, 1995
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1995\n\
#if 0 #if 0
static char sccsid[] = "@(#)showmount.c 8.3 (Berkeley) 3/29/95"; static char sccsid[] = "@(#)showmount.c 8.3 (Berkeley) 3/29/95";
#endif #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 #endif not lint
#include <sys/types.h> #include <sys/types.h>
@ -116,6 +116,7 @@ main(argc, argv)
int estat, rpcs = 0, mntvers = 1; int estat, rpcs = 0, mntvers = 1;
char *host; char *host;
int ch; int ch;
int len;
while ((ch = getopt(argc, argv, "ade3")) != -1) while ((ch = getopt(argc, argv, "ade3")) != -1)
switch((char)ch) { switch((char)ch) {
@ -190,7 +191,9 @@ main(argc, argv)
printf("Exports list on %s:\n", host); printf("Exports list on %s:\n", host);
exp = exports; exp = exports;
while (exp) { while (exp) {
printf("%-35s", exp->ex_dirp); len = printf("%-35s", exp->ex_dirp);
if (len > 35)
printf("\t");
grp = exp->ex_groups; grp = exp->ex_groups;
if (grp == NULL) { if (grp == NULL) {
printf("Everyone\n"); printf("Everyone\n");