version 1.2, 1996/06/26 05:43:00 |
version 1.3, 1997/01/17 07:13:50 |
|
|
/* search through the utmp and find an entry for this tty */ |
/* search through the utmp and find an entry for this tty */ |
if (p = ttyname(0)) { |
if (p = ttyname(0)) { |
/* strip any directory component */ |
/* strip any directory component */ |
if (t = rindex(p, '/')) |
if (t = strrchr(p, '/')) |
p = t + 1; |
p = t + 1; |
while (fread((char *)&usr, sizeof(usr), 1, ufp) == 1) |
while (fread((char *)&usr, sizeof(usr), 1, ufp) == 1) |
if (usr.ut_name && !strcmp(usr.ut_line, p)) { |
if (usr.ut_name && !strcmp(usr.ut_line, p)) { |