Submit #3256 ยป 0001-finger-widen-TTY-field-to-avoid-truncation.patch
usr.bin/finger/sprint.c | ||
---|---|---|
#define MAXREALNAME 20
|
||
#define MAXHOSTNAME 17 /* in reality, hosts are never longer than 16 */
|
||
(void)printf("%-*s %-*s%s %s\n", MAXLOGNAME, "Login", MAXREALNAME,
|
||
"Name", " TTY Idle Login Time ", (gflag) ? "" :
|
||
"Name", " TTY Idle Login Time ", (gflag) ? "" :
|
||
oflag ? "Office Phone" : "Where");
|
||
for (sflag = R_FIRST;; sflag = R_NEXT) {
|
||
... | ... | |
(void)putchar(w->info == LOGGEDIN && !w->writable ?
|
||
'*' : ' ');
|
||
if (*w->tty)
|
||
(void)printf("%-3.3s ",
|
||
(void)printf("%-7.7s ",
|
||
(strncmp(w->tty, "tty", 3)
|
||
&& strncmp(w->tty, "cua", 3))
|
||
? w->tty : w->tty + 3);
|