version 1.14, 2001/02/06 22:10:09 |
version 1.15, 2001/07/12 05:17:13 |
|
|
*/ |
*/ |
if (want(bp, NO)) { |
if (want(bp, NO)) { |
if (seconds) { |
if (seconds) { |
printf("%-*.*s %-*.*s %-*.*s %ld \n", |
printf("%-*.*s %-*.*s %-*.*s %ld \n", |
NAME_WIDTH, UT_NAMESIZE, |
NAME_WIDTH, UT_NAMESIZE, |
bp->ut_name, UT_LINESIZE, |
bp->ut_name, UT_LINESIZE, |
UT_LINESIZE, bp->ut_line, |
UT_LINESIZE, bp->ut_line, |
HOST_WIDTH, UT_HOSTSIZE, |
HOST_WIDTH, UT_HOSTSIZE, |
bp->ut_host, bp->ut_time); |
bp->ut_host, bp->ut_time); |
} else { |
} else { |
ct = ctime(&bp->ut_time); |
ct = ctime(&bp->ut_time); |
printf("%-*.*s %-*.*s %-*.*s %10.10s %*.*s \n", |
printf("%-*.*s %-*.*s %-*.*s %10.10s %*.*s \n", |
NAME_WIDTH, UT_NAMESIZE, |
NAME_WIDTH, UT_NAMESIZE, |
bp->ut_name, UT_LINESIZE, |
bp->ut_name, UT_LINESIZE, |
UT_LINESIZE, bp->ut_line, |
UT_LINESIZE, bp->ut_line, |
HOST_WIDTH, UT_HOSTSIZE, |
HOST_WIDTH, UT_HOSTSIZE, |
bp->ut_host, ct, timesize, |
bp->ut_host, ct, timesize, |
timesize, ct + 11); |
timesize, ct + 11); |
} |
} |
if (maxrec != -1 && !--maxrec) |
if (maxrec != -1 && !--maxrec) |
return; |
return; |
|
|
{ |
{ |
ARG *step; |
ARG *step; |
|
|
if (check) |
if (check) { |
/* |
/* |
* when uucp and ftp log in over a network, the entry in |
* when uucp and ftp log in over a network, the entry in |
* the utmp file is the name plus their process id. See |
* the utmp file is the name plus their process id. See |
|
|
bp->ut_line[3] = '\0'; |
bp->ut_line[3] = '\0'; |
else if (!strncmp(bp->ut_line, "uucp", sizeof("uucp") - 1)) |
else if (!strncmp(bp->ut_line, "uucp", sizeof("uucp") - 1)) |
bp->ut_line[4] = '\0'; |
bp->ut_line[4] = '\0'; |
|
} |
|
|
if (snaptime) /* if snaptime is set, return NO */ |
if (snaptime) /* if snaptime is set, return NO */ |
return (NO); |
return (NO); |