From 3376ef4ddbbf3eeca01ace7a75a1d6332e89418f Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 25 Mar 1995 18:15:40 +0000 Subject: Make finger(1) accept "cua" to be also a tty, and use the suffix instead of the very meaningful string "cu" to describe the tty. --- usr.bin/finger/sprint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/finger') diff --git a/usr.bin/finger/sprint.c b/usr.bin/finger/sprint.c index a59fdd0..a6481cd 100644 --- a/usr.bin/finger/sprint.c +++ b/usr.bin/finger/sprint.c @@ -106,8 +106,9 @@ sflag_print() '*' : ' '); if (*w->tty) (void)printf("%-2.2s ", - w->tty[0] != 't' || w->tty[1] != 't' || - w->tty[2] != 'y' ? w->tty : w->tty + 3); + (strncmp(w->tty, "tty", 3) + && strncmp(w->tty, "cua", 3)) + ? w->tty : w->tty + 3); else (void)printf(" "); if (w->info == LOGGEDIN) { -- cgit v1.1