Project

General

Profile

Submit #3259 ยป 0001-finger-Reduce-default-width-of-login-name-field.patch

dancrossnyc, 01/11/2021 06:17 AM

View differences:

usr.bin/finger/sprint.c
75 75
	 *	else
76 76
	 *		remote host
77 77
	 */
78
#define MINLOGNAME	12
78 79
#define	MAXREALNAME	20
79 80
#define MAXHOSTNAME     17      /* in reality, hosts are never longer than 16 */
80
	(void)printf("%-*s %-*s%s  %s\n", MAXLOGNAME, "Login", MAXREALNAME,
81
	(void)printf("%-*s %-*s%s  %s\n", MINLOGNAME, "Login", MAXREALNAME,
81 82
	    "Name", " TTY      Idle  Login  Time ", (gflag) ? "" :
82 83
	    oflag ? "Office  Phone" : "Where");
83 84

  
......
94 95
			namelen = MAXREALNAME;
95 96
			if (w->info == LOGGEDIN && !w->writable)
96 97
				--namelen;	/* leave space before `*' */
97
			(void)printf("%-*.*s %-*.*s", MAXLOGNAME, MAXLOGNAME,
98
			(void)printf("%-*.*s %-*.*s", MINLOGNAME, MAXLOGNAME,
98 99
				pn->name, MAXREALNAME, namelen,
99 100
				pn->realname ? pn->realname : "");
100 101
			if (!w->loginat) {
    (1-1/1)