summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-09-04 01:22:54 +0000
committerpeter <peter@FreeBSD.org>1995-09-04 01:22:54 +0000
commit136c23f685c96f47a2db6da80d7a1488c1c14582 (patch)
tree2d8089156b3f1ca1485ed01ae1e0431a03d397c0 /usr.bin/finger
parent791992935e57c6317ac27431773cdbf226a378de (diff)
downloadFreeBSD-src-136c23f685c96f47a2db6da80d7a1488c1c14582.zip
FreeBSD-src-136c23f685c96f47a2db6da80d7a1488c1c14582.tar.gz
Increase the tty column width from 2 to 3 characters.
This gives us more room to breath with tty names, especially with drivers that support large numbers of ports.. eg: specialix and digiboard. This does not actually change the current tty names, it just allows room for reporting more characters if the drivers use them.
Diffstat (limited to 'usr.bin/finger')
-rw-r--r--usr.bin/finger/sprint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/finger/sprint.c b/usr.bin/finger/sprint.c
index db1974d..7d1b2ea 100644
--- a/usr.bin/finger/sprint.c
+++ b/usr.bin/finger/sprint.c
@@ -80,9 +80,9 @@ sflag_print()
* remote host
*/
#define MAXREALNAME 20
-#define MAXHOSTNAME 20
+#define MAXHOSTNAME 18 /* in reality, hosts are not longer than 16 */
(void)printf("%-*s %-*s %s %s\n", UT_NAMESIZE, "Login", MAXREALNAME,
- "Name", "TTY Idle Login Time",
+ "Name", "TTY Idle Login Time",
oflag ? " Office Office Phone" : " Where");
for (sflag = R_FIRST;; sflag = R_NEXT) {
@@ -104,12 +104,12 @@ sflag_print()
(void)putchar(w->info == LOGGEDIN && !w->writable ?
'*' : ' ');
if (*w->tty)
- (void)printf("%-2.2s ",
+ (void)printf("%-3.3s ",
(strncmp(w->tty, "tty", 3)
&& strncmp(w->tty, "cua", 3))
? w->tty : w->tty + 3);
else
- (void)printf(" ");
+ (void)printf(" ");
if (w->info == LOGGEDIN) {
stimeprint(w);
(void)printf(" ");
@@ -133,7 +133,7 @@ office: if (oflag) {
else if (pn->officephone)
(void)printf(" %-10.10s", " ");
if (pn->officephone)
- (void)printf(" %-.15s",
+ (void)printf(" %-.13s",
prphone(pn->officephone));
} else
(void)printf(" %.*s", MAXHOSTNAME, w->host);
OpenPOWER on IntegriCloud