summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDan Harnett <danh@cvs.openbsd.org>2001-02-12 13:51:16 +0000
committerDan Harnett <danh@cvs.openbsd.org>2001-02-12 13:51:16 +0000
commitba6357fee9b662f6632752fe5fe34112fad8dfee (patch)
tree507d02f30310a17f39ac0ee5927f7451b1571764 /bin
parentda04d74c93730accc30cd66cead301cc0d4ae497 (diff)
don't use long usernames by default; ok deraadt@
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/gen_subs.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
index 6ff16f0a6eb..acbcc54fac6 100644
--- a/bin/pax/gen_subs.c
+++ b/bin/pax/gen_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gen_subs.c,v 1.8 1997/09/01 18:29:51 deraadt Exp $ */
+/* $OpenBSD: gen_subs.c,v 1.9 2001/02/12 13:51:15 danh Exp $ */
/* $NetBSD: gen_subs.c,v 1.5 1995/03/21 09:07:26 cgd Exp $ */
/*-
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.8 1997/09/01 18:29:51 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.9 2001/02/12 13:51:15 danh Exp $";
#endif
#endif /* not lint */
@@ -71,10 +71,7 @@ static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.8 1997/09/01 18:29:51 deraadt Ex
#define SIXMONTHS ((DAYSPERNYEAR / 2) * SECSPERDAY)
#define CURFRMT "%b %e %H:%M"
#define OLDFRMT "%b %e %Y"
-#ifndef UT_NAMESIZE
-#define UT_NAMESIZE 8
-#endif
-#define UT_GRPSIZE 6
+#define NAME_WIDTH 8
/*
* ls_list()
@@ -129,9 +126,9 @@ ls_list(arcn, now, fp)
*/
if (strftime(f_date,DATELEN,timefrmt,localtime(&(sbp->st_mtime))) == 0)
f_date[0] = '\0';
- (void)fprintf(fp, "%s%2u %-*s %-*s ", f_mode, sbp->st_nlink,
- UT_NAMESIZE, name_uid(sbp->st_uid, 1), UT_GRPSIZE,
- name_gid(sbp->st_gid, 1));
+ (void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, sbp->st_nlink,
+ NAME_WIDTH, UT_NAMESIZE, name_uid(sbp->st_uid, 1),
+ NAME_WIDTH, UT_NAMESIZE, name_gid(sbp->st_gid, 1));
/*
* print device id's for devices, or sizes for other nodes