home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0400
/
CCE_0423.ZIP
/
CCE_0423.PD
/
INCLUD83.ZOO
/
utmp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-20
|
524b
|
23 lines
/*
* Structure of utmp and wtmp files.
*
*/
struct utmp {
char ut_line[8]; /* tty name */
char ut_name[8]; /* user id */
char ut_host[16]; /* host name, if remote */
long ut_time; /* time on */
};
/*
* This is to determine if a utmp entry does not correspond to a genuine user
* (pseudo tty)
*/
#define nonuser(ut) ((ut).ut_host[0] == 0 && \
strncmp((ut).ut_line, "tty", 3) == 0 \
&& ((ut).ut_line[3] == 'p' \
|| (ut).ut_line[3] == 'q' \
|| (ut).ut_line[3] == 'r' \
|| (ut).ut_line[3] == 's'))