Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/finger don't limit username printing to UT_NAMESIZE
details: https://anonhg.NetBSD.org/src/rev/b9707a95c99a
branches: trunk
changeset: 535492:b9707a95c99a
user: christos <christos%NetBSD.org@localhost>
date: Tue Aug 20 14:02:45 2002 +0000
description:
don't limit username printing to UT_NAMESIZE
diffstat:
usr.bin/finger/sprint.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r f726dfd16227 -r b9707a95c99a usr.bin/finger/sprint.c
--- a/usr.bin/finger/sprint.c Tue Aug 20 14:01:49 2002 +0000
+++ b/usr.bin/finger/sprint.c Tue Aug 20 14:02:45 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sprint.c,v 1.12 2002/08/05 08:04:03 tron Exp $ */
+/* $NetBSD: sprint.c,v 1.13 2002/08/20 14:02:45 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)sprint.c 8.3 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: sprint.c,v 1.12 2002/08/05 08:04:03 tron Exp $");
+__RCSID("$NetBSD: sprint.c,v 1.13 2002/08/20 14:02:45 christos Exp $");
#endif
#endif /* not lint */
@@ -54,7 +54,6 @@
#include <err.h>
#include <pwd.h>
#include <errno.h>
-#include <utmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -97,7 +96,7 @@
* office phone
*/
#define MAXREALNAME 20
- (void)printf("%-*s %-*s %s %s\n", UT_NAMESIZE, "Login", MAXREALNAME,
+ (void)printf("%-*s %-*s %s %s\n", maxname, "Login", MAXREALNAME,
"Name", "Tty Idle Login Time ", (gflag) ? "" :
(oflag) ? "Office Office Phone" : "Where");
@@ -111,8 +110,8 @@
pn = tmp;
for (w = pn->whead; w != NULL; w = w->next) {
- (void)printf("%-*.*s %-*.*s ", (int)UT_NAMESIZE,
- (int)UT_NAMESIZE,
+ (void)printf("%-*.*s %-*.*s ", (int)maxname,
+ (int)maxname,
pn->name, MAXREALNAME, MAXREALNAME,
pn->realname ? pn->realname : "");
if (!w->loginat) {
Home |
Main Index |
Thread Index |
Old Index