home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Unix / utmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-06  |  608 b   |  23 lines  |  [TEXT/????]

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