home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntinc25.zoo / utmp.h < prev    next >
C/C++ Source or Header  |  1992-09-05  |  546b  |  23 lines

  1. /*
  2.  * Structure of utmp and wtmp files.
  3.  *
  4.  */
  5. struct utmp {
  6.     char    ut_line[8];        /* tty name */
  7.     char    ut_name[8];        /* user id */
  8.     char    ut_host[16];        /* host name, if remote */
  9.     long    ut_time;        /* time on */
  10. };
  11.  
  12. /*
  13.  * This is to determine if a utmp entry does not correspond to a genuine user
  14.  * (pseudo tty)
  15.  */
  16.  
  17. #define nonuser(ut) ((ut).ut_host[0] == 0 && \
  18.         strncmp((ut).ut_line, "tty", 3) == 0 \
  19.             && ((ut).ut_line[3] == 'p' \
  20.             || (ut).ut_line[3] == 'q' \
  21.             || (ut).ut_line[3] == 'r' \
  22.             || (ut).ut_line[3] == 's'))
  23.