home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume13 / conf / part04 / structs.h < prev   
Encoding:
C/C++ Source or Header  |  1988-03-13  |  1.7 KB  |  121 lines

  1. /*
  2.  *    conf - An interactive multi-user chat program.
  3.  *
  4.  *    conf Copyright (c) 1986, 1987 by Keith Gabryelski
  5.  *
  6.  *    Conf is quasi-public domain software; it may be used and copied
  7.  *    freely and may be modified to suit the indivuals needs as long
  8.  *    as:
  9.  *
  10.  *    [1] It is not sold.
  11.  *    [2] It is not made part of any licensed product.
  12.  *    [3] This header and others like it are not modified or removed.
  13.  *    [4] You allow others to use and copy without charge.
  14.  *    
  15.  *    without expressed written permission from the original
  16.  *    author (Keith Gabryelski).
  17.  *
  18.  */
  19.  
  20. /*
  21.  * logfile (CONFLOG) structer
  22.  *
  23.  */
  24.  
  25. struct clogfil
  26. {
  27.     int type;
  28.     int f_line;
  29.     unsigned int f_usrlen;
  30.     unsigned int f_ttylen;
  31.     unsigned int t_utlen;
  32.     unsigned int messlen;
  33.     char password[8];
  34. };
  35.  
  36. /*
  37.  * message type
  38.  *
  39.  */
  40.  
  41. #define    NORMAL        0
  42. #define    SEND        1
  43. #define    SHOUT        2
  44. #define    INFORM        3
  45.  
  46. /*
  47.  * userfile (CONFUSERS) struct
  48.  *
  49.  */
  50.  
  51. struct cusrfil
  52. {
  53.     int cu_flags;
  54.     char cu_cname[MAXNAMELEN];
  55.     char cu_tty[MAXTTYLEN];
  56.     int cu_line;
  57.     short cu_procid;
  58. };
  59.  
  60. /*
  61.  * cu_flags
  62.  *
  63.  */
  64.  
  65. #define    USER_OFF    0
  66. #define    USER_ON        1
  67. #define    USER_RECORD    2
  68.  
  69. /*
  70.  * Structure of valid options
  71.  *
  72.  */
  73.  
  74. struct varopts
  75.     {
  76.     char *name;
  77.     int type;
  78.     int *var;
  79.     int extra;
  80.     int (*var_func)();
  81.     };
  82.  
  83. /*
  84.  * Some flags to go with varopt struct
  85.  *
  86.  */
  87.  
  88. #define    BOOLEAN        0
  89. #define    NUMBER        1
  90. #define    STRING        2
  91. #define    VARMASK        3
  92.  
  93. #define    DISPLAY        0
  94. #define    NODISPLAY    4
  95. #define    DISPLAYMASK    4
  96.  
  97. #define    POINTER        1
  98. #define    ROUTINE        2
  99.  
  100. /*
  101.  * Return values from setops
  102.  *
  103.  */
  104.  
  105. #define    NOOPT        0
  106. #define    FOUNDOPT    1
  107. #define    AMBIGUOUS    2
  108.  
  109. /*
  110.  * for the who routine
  111.  *
  112.  */
  113.  
  114. struct whostr
  115.     {
  116.     char name[MAXNAMELEN+1];
  117.     char tty[MAXTTYLEN+1];
  118.     int line;
  119.     int flags;
  120.     };
  121.