home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume28 / yapp / part02 / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-29  |  10.3 KB  |  279 lines

  1. /* CONFIG.H: @(#)config.h 1.5 93/06/07 Copyright (c)1993 thalerd */
  2. /* The following 3 defines are all that you should need to configure the bbs
  3.  * conferencing system for your machine:
  4.  * BBSDIR is the main subdirectory under which the whole system exists.  On 
  5.  * M-net it is /usr/bbs.  The 'conflist' and main 'rc' files should exist there.
  6.  * HELPDIR is the subdirectory under which all the help files exist.  On M-net
  7.  * it is /usr/bbs/help.
  8.  * MAILDIR should be set to the directory which contains the user mailbox files.
  9.  */
  10. #define BBSDIR  "/usr/bbs"
  11. #define HELPDIR "/usr/bbs/help"
  12. #define MAILDIR "/usr/spool/mail"
  13. #define NEWSDIR "/usr/spool/news"
  14.  
  15. /* Define FREEZE_LINKED if you wish to allow fair-witnesses to freeze,
  16.  * thaw, retire, and unretire items that are linked to another conference.
  17.  */
  18. #undef FREEZE_LINKED
  19.  
  20. /* Define BYTESWAP to be 1 if you want a consistent sum file format.  This
  21.  * is useful on networks of machines of differing architectures.  The only
  22.  * reason to change this is that on some machines, if you using YAPP with 
  23.  * other programs that access the same files, the other programs may not
  24.  * do byteswapping (PicoSpan does).  In this case, define BYTESWAP to be 0.
  25.  */
  26. #define BYTESWAP 1
  27.  
  28. /* Define NEWS if you wish to allow Usenet news conferences 
  29.  */
  30. #define NEWS
  31.  
  32. /* Do NOT return to SCCS without -k, or the %S% in LINMSG etc will go away! */
  33.  
  34. #ifdef __STDC__
  35. #define PROTO(x)  x
  36. #else
  37. #define PROTO(x)  ()
  38. #endif
  39. #define CHAR    char
  40. #define U_CHAR  unsigned char
  41. #define SHORT   short
  42. #define U_SHORT unsigned short
  43.  
  44. /* Defines for various OS's... */
  45. #ifdef ultrix
  46. #define NOSTRDUP
  47. #define NOSTRNICMP
  48. #define NOEDATE
  49. #define timelocal mktime
  50. #endif
  51.  
  52. #ifdef M_SYS3
  53. #define NOFLOCK
  54. #define NOSTRNICMP
  55. #endif
  56.  
  57. #ifdef linux
  58. #define NOFLOCK
  59. #define NOSTRNICMP
  60. #define timelocal mktime
  61. #endif
  62.  
  63. #ifdef hpux
  64. #define NOEDATE
  65. #define FLOCKF /* had lockf but not flock */
  66. #define NOSTRNICMP
  67. #define timelocal mktime
  68. #endif
  69.  
  70. #ifdef NeXT
  71. #define NOSTRNICMP
  72. #define NOPUTENV
  73. #define timelocal mktime
  74. #define L_cuserid 9
  75. #define S_IRUSR 0400
  76. #define S_IWUSR 0200
  77. #define S_IXUSR 0100
  78. #include <sys/file.h>  /* For X_OK */
  79. #undef  CHAR
  80. #define CHAR    int
  81. #undef  U_CHAR
  82. #define U_CHAR  int
  83. #undef  SHORT
  84. #define SHORT   int
  85. #undef  U_SHORT
  86. #define U_SHORT int
  87. #endif
  88.  
  89. #ifdef bsdi
  90. #define NOSTRNICMP
  91. #define timelocal mktime
  92. #undef  CHAR
  93. #define CHAR    int
  94. #undef  U_CHAR
  95. #define U_CHAR  int
  96. #undef  SHORT
  97. #define SHORT   int
  98. #undef  U_SHORT
  99. #define U_SHORT int
  100. #endif
  101.  
  102. #define MAX_LINE_LENGTH      512        /* Buffer size for a line of text */
  103. #define MAX_FILE_NAME_LENGTH  80        /* Length of a file name          */
  104. #define MAX_STRING_LENGTH     64        /* String length of our language  */
  105. #define MAX_IDENT_LENGTH      32        /* Identifier length in our lang  */
  106. #define DEFAULT_ON             1        /* Value of flag when on          */
  107. #define DEFAULT_OFF            0        /* Value of flag when off         */
  108. #define NIL           (char *) 0        /* Empty string                   */
  109. #define CMD_DEPTH             20
  110. #define MAX_ARGS             128
  111.  
  112. #define MAX_LIST_LENGTH      300        /* # of conferences, help files   */
  113. #define MAX_MACROS           200        /* # of aliases                   */
  114. #define MAX_RESPONSES       2000        /* # of responses/item            */
  115. #define MAX_ITEMS           6000        /* # of items/conf                */
  116.  
  117. /* Default variable values */
  118. #define PAGER           "/usr/bin/more"
  119. #define EDITOR          "/bin/ed"
  120. #define SHELL           "/bin/sh"
  121. #define PROMPT          "\nYAPP: "
  122. #define NOCONFP         "\n\
  123. Type HELP CONFERENCES for a list of conferences.\n\
  124. Type JOIN <NAME> to access a conference.\n\
  125. YAPP: "
  126. #define RFPPROMPT       "\n[%{curitem}/%l] Respond, forget, or pass? "
  127. #define OBVPROMPT       "\n[%{curitem}/%l] Can't respond, pass? "
  128. #define JOQPROMPT       "\nJoin, quit, or help? "
  129. #define EDBPROMPT       "Ok to enter this response? "
  130. #define TEXT            ">" /* No separators allowed for this prompt only */
  131. #define ESCAPE          ":"
  132.  
  133. /* : , / -  ( ) +        are used in dates               */
  134. /* ! > | ` ~             are used for unix commands      */
  135. /* < > % { }             are used for separators         */
  136. /* | &                   are reserved for future expansion for separators */
  137. /* .                     is used to specify responses    */
  138. /* #                     is used for comments            */
  139. /* _                     is used for specifying commands */
  140. /* = ^ $                 is used for range specs         */
  141. /* " '                   are used for strings            */
  142. /* @ * ? [ ] ;           are unused                      */
  143. #define CMDDEL          ";"
  144. #define BUFDEL          "@"
  145.  
  146. #define GECOS           "," /* (char *)0 */
  147. #define NSEP            "\n%(N%r new of %)%zn response%S total."
  148. #define ISHORT          "%(BItem Resps Subject\n\n%)%4i %5n %h"
  149. #define ISEP            "\nItem %i entered %d by %a (%l)\n %h"
  150. #define RSEP            "\n#%i.%r %a (%l) "
  151. #define FSEP            "%(R#%i.%r %a (%l)\n%)%7N: %L"
  152. #define TXTSEP          "%(L%(F%7N:%)%X%L%)"
  153. #define ZSEP            "%(T^L%)%c"
  154. #define PRINTMSG        "%QPrinted from conference %d (%s)"
  155. #define MAILMSG         "You have %(2xmore %)mail."
  156. #define LINMSG          "\
  157. %(1x%(2x\n%)%0g%)\
  158. %(2x%(3N%3g%)\
  159. %(1x\n%)%(n%(r%r newresponse item%S%)\
  160. %(b%(r and %)%b brandnew item%S%)\n%)\
  161. %(i%i item%S numbered %f-%l\n%)\
  162. %(sYou are a fairwitness in this conference.\n%)\
  163. %(lYou are an observer of this conference.\n%)\
  164. %(jYour name is \"%u\" in this conference.\n\
  165. %(~O%(4F\n%4g%E\n>>>> New users: type HELP for help.\n%)%)%)%)%c"
  166. #define LOUTMSG         "%(1x%1g%)%c"
  167. #define INDXMSG         "%(1x%2g%)%c"
  168. #define BULLMSG         "%(1x%3g%)%c"
  169. #define WELLMSG         "%(1x%4g%)%c"
  170. #define PARTMSG         "\
  171. %(2x%10v %o %u%)\
  172. %(4x\n%k participant%S total.%)\
  173. %(1x\n     login           last time on      name\n%)"
  174. #define CHECKMSG        "%(1x\nNew resp items  Conference name\n%)%(2x%(k--%E  %)%(B>%E %)%4r %4b    %s%(B  (where you currently are!)%)%)"
  175. #define CONFMSG         "%Q\
  176. Conference name   : %s\n\
  177. Directory         : %d\n\
  178. Participation file: %w/%p\n\
  179. Security type     : %t\n\
  180. %(i%i item%S numbered %f-%l%ENo items yet.%)"
  181. #define JOINMSG         "Join: which conference?\n\
  182. %QYou are currently in the %s conference."
  183. #define LISTMSG        "\
  184. %(1x\nitems sec time                     conference\n%)\
  185. %(2x%(B>%E %)%4i %2t%(sF%E%(lR%E %)%) %m %s%)"
  186. #define REPLYSEP       "\
  187. %(1xIn #%i.%r of the %C conference, you write:%)\
  188. %(2x> %L%)\
  189. %(4x%)"
  190. #ifdef NEWS
  191. #define NEWSSEP        "\
  192. %(1xIn article <%m>, %a writes:%)\
  193. %(2x> %L%)\
  194. %(4x%)"
  195. #endif
  196.  
  197. /* Option flags */
  198. #define NUM_OPTIONS       20
  199. #define O_DEBUG           0x0001        /* Turn all debugging options on  */
  200. #define O_BUFFER          0x0002        /* Don't use a pager              */
  201. #define O_DEFAULT         0x0004        /* Go to noconf mode at start     */
  202. #define O_OBSERVE         0x0008        /* Force observer status          */
  203. #define O_STRIP           0x0010        /* Turn strip flag on             */
  204. #define O_SOURCE          0x0020        /* Don't source .cfrc and CONF/rc */
  205. #define O_FORGET          0x0040        /*            */
  206. #define O_STAY            0x0080        /* Stay on curr item after resp   */
  207. #define O_DOT             0x0100        /* '.' won't end text entry       */
  208. #define O_EDALWAYS        0x0200        /* Go directly to editor for text */
  209. #define O_METOO           0x0400        /* */
  210. #define O_NUMBERED        0x0800        /* Number text in responses       */
  211. #define O_DATE            0x1000        /* Display dates on items         */
  212. #define O_UID             0x2000        /* Display uids on items          */
  213. #define O_MAILTEXT        0x4000        /* Display uids on items          */
  214. #define O_AUTOSAVE        0x8000        /* Display uids on items          */
  215. #define O_VERBOSE     0x00010000        /* Display commands in rc files   */
  216. #define O_SCRIBBLER   0x00020000        /* Display login of scribbler     */
  217. #define O_SIGNITURE   0x00040000        /* Display signiture of authors   */
  218. #define O_READONLY    0x00080000        /* Force noresponse status        */
  219.  
  220. /* Status flags */
  221. #define S_INT             0x0001        /* Interrupt hit? */
  222. #define S_PIPE            0x0008        /* In a pipe? */
  223. #define S_QUIT            0x0010        /* Abort join */
  224. #define S_MAIL            0x0020        /* User has mail? */
  225. #define S_MOTIF           0x0040        /* Is this running under Motif? */
  226. #define S_MOREMAIL        0x0400        /* User has MORE mail? */
  227. #define S_EXECUTE         0x0800        /* Executing a `command` */
  228. #define S_REDIRECT        0x1000        /* Output is being redirected? */
  229. #define S_STOP            0x2000        /* Stop processing more ; cmds */
  230.  
  231. /* Conference status flags */
  232. #define CS_OBSERVER        0x0002        /* you're an observer in this cf */
  233. #define CS_FW              0x0004        /* you're a fairwitness of this cf */
  234. #define CS_NORESPONSE      0x0080        /* Response not possible */
  235. #define CS_OTHERCONF       0x0100        /* you were in another cf */
  236. #define CS_JUSTJOINED      0x0200        /* you just joined this cf */
  237.  
  238. /* Input Modes */
  239. #define M_MASK            63
  240. #define M_OK              0 /* Ok:              */
  241. #define M_RFP             1 /* Respond or pass? */
  242. #define M_TEXT            2 /* >                */
  243. #define M_JOQ             3 /* Join or quit     */
  244. #define M_EDB             4 /* Ok to enter this response? */
  245. #define M_SUPERSANE       64 /* processing /usr/bbs/rc */
  246. #define M_SANE            128 /* processing CONF/rc */
  247.  
  248. /* Conference type flags */
  249. #define CT_OLDPUBLIC   0x00 /*  0000 */
  250. #define CT_PASSWORD    0x05 /*  0101 */
  251. #define CT_PRESELECT   0x04 /*  0100 */
  252. #define CT_PARANOID    0x06 /*  0110 */
  253. #define CT_PUBLIC      0x08 /*  1000 */
  254. #define CT_READONLY    0x10 /* 10000 */
  255. #define CT_BASIC       0x0F /* 01111 */
  256. #ifdef NEWS
  257. #define CT_NEWS        0x20 /*100000 */
  258. #endif
  259.  
  260. /* Config file fields */
  261. #define CF_MAGIC          0
  262. #define CF_PARTFILE       1
  263. #define CF_TIMELIMIT      2
  264. #define CF_FWLIST         3
  265. #define CF_SECURITY       4
  266. #ifdef NEWS
  267. #define CF_NEWSGROUP      5
  268. #endif
  269.  
  270. /* Item flags */
  271. #define IF_FORGOTTEN      0x0001
  272. #define IF_RETIRED        0x0002
  273. #define IF_ACTIVE         0x0030
  274. #define IF_FROZEN         0x0040
  275. #define IF_PARTY          0x0080
  276. #define IF_LINKED         0x0100
  277. #define IF_EXPIRED        0x0200
  278. #define IF_SAVEMASK       0xFFFE /* Save only these flags */
  279.