aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/finger
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1995-09-04 01:22:54 +0000
committerPeter Wemm <peter@FreeBSD.org>1995-09-04 01:22:54 +0000
commit692679202995666b5efe90866fcca27c21f0aa98 (patch)
tree2d8089156b3f1ca1485ed01ae1e0431a03d397c0 /usr.bin/finger
parent5316959a2ce8f5da0c7a60936e75b936d8700b0e (diff)
downloadsrc-692679202995666b5efe90866fcca27c21f0aa98.tar.gz
src-692679202995666b5efe90866fcca27c21f0aa98.zip
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.
Notes
Notes: svn path=/head/; revision=10553
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 db1974db7f41..7d1b2ea732fa 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);