home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume16 / conf2 / part04 / structs.h < prev   
Encoding:
C/C++ Source or Header  |  1988-09-14  |  1.1 KB  |  101 lines

  1. /*
  2.  * logfile (CONFLOG) struct 
  3.  *
  4.  */
  5.  
  6. struct clogfil
  7. {
  8.     int type;
  9.     int f_line;
  10.     unsigned int f_usrlen;
  11.     unsigned int f_ttylen;
  12.     unsigned int t_utlen;
  13.     unsigned int messlen;
  14. };
  15.  
  16. /*
  17.  * message type
  18.  *
  19.  */
  20.  
  21. #define    NORMAL        0
  22. #define    SEND        1
  23. #define    SHOUT        2
  24. #define    INFORM        3
  25.  
  26. /*
  27.  * userfile (CONFUSERS) struct
  28.  *
  29.  */
  30.  
  31. struct cusrfil
  32. {
  33.     int cu_flags;
  34.     char cu_cname[MAXNAMELEN];
  35.     char cu_tty[MAXTTYLEN];
  36.     int cu_line;
  37.     short cu_procid;
  38. };
  39.  
  40. /*
  41.  * cu_flags
  42.  *
  43.  */
  44.  
  45. #define    USER_OFF    0
  46. #define    USER_ON        1
  47. #define    USER_RECORD    2
  48.  
  49. /*
  50.  * Structure of valid options
  51.  *
  52.  */
  53.  
  54. struct varopts
  55.     {
  56.     char *name;
  57.     int type;
  58.     int *var;
  59.     int extra;
  60.     int (*var_func)();
  61.     };
  62.  
  63. /*
  64.  * Some flags to go with varopt struct
  65.  *
  66.  */
  67.  
  68. #define    BOOLEAN        0
  69. #define    NUMBER        1
  70. #define    STRING        2
  71. #define    VARMASK        3
  72.  
  73. #define    DISPLAY        0
  74. #define    NODISPLAY    4
  75. #define    DISPLAYMASK    4
  76.  
  77. #define    POINTER        1
  78. #define    ROUTINE        2
  79.  
  80. /*
  81.  * Return values from setops
  82.  *
  83.  */
  84.  
  85. #define    NOOPT        0
  86. #define    FOUNDOPT    1
  87. #define    AMBIGUOUS    2
  88.  
  89. /*
  90.  * for the who routine
  91.  *
  92.  */
  93.  
  94. struct whostr
  95.     {
  96.     char name[MAXNAMELEN+1];
  97.     char tty[MAXTTYLEN+1];
  98.     int line;
  99.     int flags;
  100.     };
  101.