home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / sbbsdefs.zip / SBBSDEFS.H < prev   
C/C++ Source or Header  |  1994-06-02  |  54KB  |  1,382 lines

  1. /* SBBSDEFS.H */
  2.  
  3. /* Copyright 1994 Digital Dynamics, All rights reserved. */
  4.  
  5. /************************************************************/
  6. /* Constants, macros, and typedefs for use ONLY with SBBS    */
  7. /************************************************************/
  8.  
  9. #ifndef _SBBSDEFS_H
  10. #define _SBBSDEFS_H
  11.  
  12. #include "gen_defs.h"
  13. #include "nodedefs.h"
  14. #include <time.h>
  15.  
  16. /*************/
  17. /* Constants */
  18. /*************/
  19.  
  20. #define DEBUG        0        /* Set to zero to stop DEBUG LOG writes     */
  21. #define INHOUSE     0        /* Set to non-zero for In-house devlopement */
  22.  
  23. #define VERSION     "2.00"  /* Version: Major.minor  */
  24. #define REVISION    'A'
  25. #define BETA        " "     /* Space if non-beta */
  26.  
  27. /*********************/
  28. /* OS specific stuff */
  29. /*********************/
  30.  
  31. #if __OS2__
  32.  
  33. /* key words */
  34.  
  35. #define far
  36. #define huge
  37.  
  38. /* my functions */
  39.  
  40. #ifdef SBBS
  41.  
  42. #define mswait(x) useint(x)
  43. #define ivhctl(x) useint(x)
  44. #define rioini(x,y) useints(x,y)
  45. #define incom() retint()
  46. #define outcom(x) useint(x)
  47. #define dtr(x) useint(x)
  48. #define setbaud(x) useint(x)
  49. #define rioctl(x) useint(x)
  50. #define lclwx() wherex()
  51. #define lclwy() wherey()
  52. #define lclxy(x,y) gotoxy(x,y)
  53. #define lputc(x) putch(x)
  54. #define lputs(x) cputs(x)
  55. #define lclini(x) useint(x)
  56. #define lclaes() retint()
  57.  
  58. #endif
  59.  
  60. #define lread(f,b,l) read(f,b,l)
  61. #define lwrite(f,b,l) write(f,b,l)
  62.  
  63.  
  64. /* library functions */
  65.  
  66. #define setcbrk(x) useint(x)
  67. #define sound(x) useint(x)
  68. #define delay(x) useint(x)
  69. #define nosound()
  70.  
  71. #endif
  72.  
  73. /************/
  74. /* Maximums */
  75. /************/
  76.  
  77. #define MAX_NODES        250
  78. #define MAX_GRPS        500 /* Maximum total number of message groups    */
  79. #define MAX_SUBS      20000 /* Maximum total number of message subs     */
  80. #define MAX_LIBS        500 /* Maximum total number of file libraries    */
  81. #define MAX_DIRS      20000 /* Maximum total number of file directories */
  82. #define MAX_POSTS       2000 /* Maximum number of posts per sub            */
  83. #define MAX_FILES       2000 /* Maximum number of files per dir            */
  84. #define MAX_MAILW       2000 /* Maximum number of emails to scan         */
  85. #define MAX_MAILS       2000 /* Maximum number of email sent to scan     */
  86. #define MAX_SYSMAIL    5000 /* Maximum number of total emails in system */
  87. #define MAX_TXTSECS     500 /* Maximum number of text file sections     */
  88. #define MAX_TXTFILES    500 /* Maximum number of text files per section */
  89. #define MAX_BATUP        500 /* Maximum number of batch uploads            */
  90. #define MAX_BATDN        500 /* Maximum number of batch dnloads            */
  91. #define MAX_XTRNSECS    500 /* Maximum number of external program secs    */
  92. #define MAX_XTRNS        500 /* Maximum number of external programs        */
  93. #define MAX_RESULTS     500 /* Maximum number of modem result codes     */
  94. #define MAX_LINES        500 /* Maximum number of lines in a message     */
  95. #define MAX_PROTS        250 /* Maximum number of transfer protocols     */
  96. #define MAX_FEXTRS        500 /* Maximum number of extractable file types */
  97. #define MAX_FVIEWS        500 /* Maximum number of viewable file types    */
  98. #define MAX_FTESTS        500 /* Maximum number of testable file types    */
  99. #define MAX_USERXFER    500 /* Maximum number of dest. users of usrxfer */
  100. #define MAX_XEDITS        500 /* Maximum number of external editors        */
  101. #define MAX_ALTPATHS    500 /* Maximum number of alternate file paths    */
  102. #define MAX_QHUBS        500 /* Maximum number of QWK Network hubs        */
  103. #define MAX_QSUBS        500 /* Maximum number of Sub-boards per hub     */
  104. #define MAX_ALTCMDS     100 /* Maximum number of Alternate command sets */
  105. #define MAX_PHUBS        500 /* Maximum number of PostLink/PCRelay hubs    */
  106. #define MAX_GURUS        500
  107. #define MAX_CHANS        500 /* Maximum number of MultiChat channels     */
  108. #define MAX_PAGES        500 /* Maximum number of External chat pagers    */
  109. #define MAX_ACTSETS     500 /* Maximum nubmer of Chat action sets        */
  110. #define MAX_CHATACTS    500 /* Maximum number of Chat action commands    */
  111. #define MAX_FADDRS        500 /* Maximum number of FidoNet addresses        */
  112. #define MAX_SWAPS        500 /* Maximum number of swappable exes         */
  113. #define MAX_EVENTS        500 /* Maximum number of time events            */
  114. #define MAX_DLEVENTS    500 /* Maximum number of download events        */
  115. #define MAX_SHELLS        500 /* Maximum number of command shells         */
  116.  
  117.  
  118. #define LEN_DIR 63            /* Maximum length of directory paths        */
  119. #define LEN_CMD 63            /* Maximum length of command lines            */
  120.  
  121.                             /* Lengths of various strings                */
  122. #define LEN_GSNAME    15        /* Group/Lib short name                        */
  123. #define LEN_GLNAME    40        /* Group/Lib long name                        */
  124. #define LEN_SSNAME    25        /* Sub/Dir short name                        */
  125. #define LEN_SLNAME    40        /* Sub/Dir long name                        */
  126.  
  127.                                 /* User Questions                        */
  128. #define UQ_ALIASES    (1L<<0)     /* Ask for alias                        */
  129. #define UQ_LOCATION (1L<<1)     /* Ask for location                     */
  130. #define UQ_ADDRESS    (1L<<2)     /* Ask for address                        */
  131. #define UQ_PHONE    (1L<<3)     /* Ask for phone number                 */
  132. #define UQ_HANDLE    (1L<<4)     /* Ask for chat handle                    */
  133. #define UQ_DUPHAND    (1L<<5)     /* Search for duplicate handles         */
  134. #define UQ_SEX        (1L<<6)     /* Ask for sex :)                        */
  135. #define UQ_BIRTH    (1L<<7)     /* Ask for birth date                    */
  136. #define UQ_COMP     (1L<<8)     /* Ask for computer type                */
  137. #define UQ_MC_COMP    (1L<<9)     /* Multiple choice computer type        */
  138. #define UQ_REALNAME (1L<<10)    /* Ask for real name                    */
  139. #define UQ_DUPREAL    (1L<<11)    /* Search for duplicate real names        */
  140. #define UQ_COMPANY    (1L<<12)    /* Ask for company name                 */
  141. #define UQ_NOEXASC    (1L<<13)    /* Don't allow ex-ASCII in user text    */
  142. #define UQ_CMDSHELL (1L<<14)    /* Ask for command shell                */
  143. #define UQ_XEDIT    (1L<<15)    /* Ask for external editor                */
  144. #define UQ_NODEF    (1L<<16)    /* Don't ask for default settings       */
  145.  
  146.  
  147.                                 /* Different bits in sys_misc                */
  148. #define SM_CLOSED    (1L<<0)     /* System is clsoed to New Users            */
  149. #define SM_SYSSTAT    (1L<<1)     /* Sysops activity included in statistics    */
  150. #define SM_NOBEEP    (1L<<2)     /* No beep sound locally                    */
  151. #define SM_PWEDIT    (1L<<3)     /* Allow users to change their passwords    */
  152. #define SM_TIMED_EX (1L<<4)     /* Timed event must run exclusively         */
  153. #define SM_ANON_EM    (1L<<5)     /* Allow anonymous e-mail                    */
  154. #define SM_LISTLOC    (1L<<6)     /* Use location of caller in user lists     */
  155. #define SM_WILDCAT    (1L<<7)     /* Expand Wildcat color codes in messages    */
  156. #define SM_PCBOARD    (1L<<8)     /* Expand PCBoard color codes in messages    */
  157. #define SM_WWIV     (1L<<9)     /* Expand WWIV color codes in messages        */
  158. #define SM_CELERITY (1L<<10)    /* Expand Celerity color codes in messages    */
  159. #define SM_RENEGADE (1L<<11)    /* Expand Renegade color codes in messages */
  160. #define SM_ECHO_PW    (1L<<12)    /* Echo passwords locally                    */
  161. #define SM_REQ_PW    (1L<<13)    /* Require passwords locally                */
  162. #define SM_L_SYSOP    (1L<<14)    /* Allow local sysop logon/commands         */
  163. #define SM_R_SYSOP    (1L<<15)    /* Allow remote sysop logon/commands        */
  164. #define SM_QUOTE_EM (1L<<16)    /* Allow quoting of e-mail                    */
  165. #define SM_EURODATE (1L<<17)    /* Europian date format (DD/MM/YY)            */
  166. #define SM_MILITARY (1L<<18)    /* Military time format                     */
  167. #define SM_TIMEBANK (1L<<19)    /* Allow time bank functions                */
  168. #define SM_FILE_EM    (1L<<20)    /* Allow file attachments in E-mail         */
  169. #define SM_SHRTPAGE (1L<<21)    /* Short sysop page                         */
  170. #define SM_TIME_EXP (1L<<22)    /* Set to expired values if out-of-time     */
  171. #define SM_FASTMAIL (1L<<23)    /* Fast e-mail storage mode                 */
  172. #define SM_QVALKEYS (1L<<24)    /* Quick validation keys enabled            */
  173. #define SM_ERRALARM (1L<<25)    /* Error beeps on                            */
  174. #define SM_INTERNET (1L<<26)    /* Allow outbound internet mail             */
  175.  
  176.                             /* Different bits in node_misc                */
  177. #define NM_ANSALARM (1<<0)    /* Alarm locally on answer                    */
  178. #define NM_WFCSCRN  (1<<1)    /* Wait for call screen                     */
  179. #define NM_MERGETXT (1<<2)    /* Merge duplicate strings from TEXT.DAT    */
  180. #define NM_LCL_EDIT (1<<3)    /* Use local editor to create messages        */
  181. #define NM_EMSOVL    (1<<4)    /* Use expanded memory of overlays            */
  182. #define NM_WINOS2    (1<<5)    /* Use Windows/OS2 time slice API call        */
  183. #define NM_INT28    (1<<6)    /* Make int 28 DOS idle calls                */
  184. #define NM_NODV     (1<<7)    /* Don't detect and use DESQview API        */
  185.  
  186.                             /* Miscellaneous Modem Settings (mdm_misc)  */
  187. #define MDM_CTS      (1<<0) /* Use hardware send flow control            */
  188. #define MDM_RTS      (1<<1) /* Use hardware recv flow control            */
  189. #define MDM_STAYHIGH (1<<2) /* Stay at highest DTE rate                 */
  190. #define MDM_CALLERID (1<<3) /* Supports Caller ID                        */
  191. #define MDM_DUMB     (1<<4) /* Just watch DCD for answer - dumb modem    */
  192. #define MDM_NODTR     (1<<5) /* Don't drop DTR for hang-up               */
  193.  
  194.                                     /* Bit values for prot[x].misc */
  195. #define PROT_DSZLOG (1<<0)          /* Supports DSZ Log */
  196.  
  197.                                     /* Bit values in netmail_misc */
  198.  
  199. #define NMAIL_ALLOW (1<<0)            /* Allow NetMail */
  200. #define NMAIL_CRASH (1<<1)            /* Default netmail to crash */
  201. #define NMAIL_HOLD    (1<<2)            /* Default netmail to hold */
  202. #define NMAIL_KILL    (1<<3)            /* Default netmail to kill after sent */
  203. #define NMAIL_ALIAS (1<<4)            /* Use Aliases in NetMail */
  204. #define NMAIL_FILE    (1<<5)            /* Allow file attachments */
  205.  
  206.                                     /* Attribute bits for fido msg header */
  207. #define FIDO_PRIVATE    (1<<0)        /* Private message */
  208. #define FIDO_CRASH        (1<<1)        /* Crash-mail (send immediately) */
  209. #define FIDO_RECV        (1<<2)        /* Received successfully */
  210. #define FIDO_SENT        (1<<3)        /* Sent successfully */
  211. #define FIDO_FILE        (1<<4)        /* File attached */
  212. #define FIDO_INTRANS    (1<<5)        /* In transit */
  213. #define FIDO_ORPHAN     (1<<6)        /* Orphan */
  214. #define FIDO_KILLSENT    (1<<7)        /* Kill it after sending it */
  215. #define FIDO_LOCAL        (1<<8)        /* Created locally - on this system */
  216. #define FIDO_HOLD        (1<<9)        /* Hold - don't send it yet */
  217. #define FIDO_FREQ        (1<<11)     /* File request */
  218. #define FIDO_RRREQ        (1<<12)     /* Return receipt request */
  219. #define FIDO_RR         (1<<13)     /* This is a return receipt */
  220. #define FIDO_AUDIT        (1<<14)     /* Audit request */
  221. #define FIDO_FUPREQ     (1<<15)     /* File update request */
  222.  
  223.  
  224.                                     /* Bit values for sub[x].misc */
  225. #define SUB_NSCAN    (1L<<0)         /* Scan this sub-board for new msgs */
  226. #define SUB_YSCAN    (1L<<1)         /* Scan for new messages to you only */
  227. #define SUB_SSCAN    (1L<<2)         /* Scan this sub-board for msgs to you */
  228. #define SUB_QNET    (1L<<3)         /* Sub-board is netted via QWK network */
  229. #define SUB_PNET    (1L<<4)         /* Sub-board is netted via PostLink */
  230. #define SUB_FIDO    (1L<<5)         /* Sub-board is netted via FidoNet */
  231. #define SUB_PRIV    (1L<<6)         /* Allow private posts on sub */
  232. #define SUB_PONLY    (1L<<7)         /* Private posts only */
  233. #define SUB_ANON    (1L<<8)         /* Allow anonymous posts on sub */
  234. #define SUB_AONLY    (1L<<9)         /* Anonymous only */
  235. #define SUB_NAME    (1L<<10)        /* Must use real names */
  236. #define SUB_DEL     (1L<<11)        /* Allow users to delete messages */
  237. #define SUB_DELLAST (1L<<12)        /* Allow users to delete last msg only */
  238. #define SUB_FORCED    (1L<<13)        /* Sub-board is forced scanning */
  239. #define SUB_NOTAG    (1L<<14)        /* Don't add tag or origin lines */
  240. #define SUB_TOUSER    (1L<<15)        /* Prompt for to user on posts */
  241. #define SUB_ASCII    (1L<<16)        /* ASCII characters only */
  242. #define SUB_QUOTE    (1L<<17)        /* Allow online quoting */
  243. #define SUB_NSDEF    (1L<<18)        /* New-Scan on by default */
  244. #define SUB_UNUSED    (1L<<19)        /* Currently unused */
  245. #define SUB_FAST    (1L<<20)        /* Fast storage mode */
  246. #define SUB_KILL    (1L<<21)        /* Kill read messages automatically */
  247. #define SUB_KILLP    (1L<<22)        /* Kill read pvt messages automatically */
  248. #define SUB_SYSPERM (1L<<23)        /* Sysop messages are permament */
  249. #define SUB_GATE    (1L<<24)        /* Gateway between Network types */
  250.  
  251.                                     /* Bit values for dir[x].misc */
  252. #define DIR_FCHK    (1L<<0)         /* Check for file existance */
  253. #define DIR_RATE    (1L<<1)         /* Force uploads to be rated G,R, or X */
  254. #define DIR_MULT    (1L<<2)         /* Ask for multi-disk numbering */
  255. #define DIR_DUPES    (1L<<3)         /* Search this dir for upload dupes */
  256. #define DIR_FREE    (1L<<4)         /* Free downloads */
  257. #define DIR_TFREE    (1L<<5)         /* Time to download is free */
  258. #define DIR_CDTUL    (1L<<6)         /* Credit Uploads */
  259. #define DIR_CDTDL    (1L<<7)         /* Credit Downloads */
  260. #define DIR_ANON    (1L<<8)         /* Anonymous uploads */
  261. #define DIR_AONLY    (1L<<9)         /* Anonymous only */
  262. #define DIR_ULDATE    (1L<<10)        /* Include upload date in listing */
  263. #define DIR_DIZ     (1L<<11)        /* FILE_ID.DIZ and DESC.SDI support */
  264.  
  265.                                     /* Bit values for file_t.misc */
  266. #define FM_EXTDESC  (1<<0)          /* Extended description exists */
  267. #define FM_ANON     (1<<1)            /* Anonymous upload */
  268.  
  269. enum {                                /* errormsg() codes */
  270.      ERR_OPEN                        /* opening a file */
  271.     ,ERR_CLOSE                        /* close a file */
  272.     ,ERR_FDOPEN                     /* associating a stream with fd */
  273.     ,ERR_READ                        /* reading from file */
  274.     ,ERR_WRITE                        /* writing to file */
  275.     ,ERR_REMOVE                     /* removing a file */
  276.     ,ERR_ALLOC                        /* allocating memory */
  277.     ,ERR_CHK                        /* checking */
  278.     ,ERR_LEN                        /* file length */
  279.     ,ERR_EXEC                        /* executing */
  280.     ,ERR_CHDIR                        /* changing directory */
  281.     ,ERR_CREATE                     /* creating */
  282.     ,ERR_LOCK                        /* locking */
  283.     ,ERR_UNLOCK                     /* unlocking */
  284.     };
  285.  
  286. enum {                              /* Values for dir[x].sort */
  287.      SORT_NAME_A                    /* Sort by filename, ascending */
  288.     ,SORT_NAME_D                    /* Sort by filename, descending */
  289.     ,SORT_DATE_A                    /* Sort by upload date, ascending */
  290.     ,SORT_DATE_D                    /* Sort by upload date, descending */
  291.     };
  292.  
  293. enum {
  294.      clr_mnehigh
  295.     ,clr_mnelow
  296.     ,clr_mnecmd
  297.     ,clr_inputline
  298.     ,clr_err
  299.     ,clr_nodenum
  300.     ,clr_nodeuser
  301.     ,clr_nodestatus
  302.     ,clr_filename
  303.     ,clr_filecdt
  304.     ,clr_filedesc
  305.     ,clr_filelsthdrbox
  306.     ,clr_filelstline
  307.     ,clr_chatlocal
  308.     ,clr_chatremote
  309.     ,clr_multichat
  310.     ,TOTAL_COLORS };
  311.  
  312. enum {                                /* Values for xtrn_t.type            */
  313.      XTRN_NONE                        /* No data file needed                */
  314.     ,XTRN_SBBS                        /* Synchronet external                */
  315.     ,XTRN_WWIV                        /* WWIV external                    */
  316.     ,XTRN_GAP                        /* Gap door                         */
  317.     ,XTRN_RBBS                        /* RBBS, QBBS, or Remote Access     */
  318.     ,XTRN_WILDCAT                    /* Wildcat                            */
  319.     ,XTRN_PCBOARD                    /* PCBoard                            */
  320.     ,XTRN_SPITFIRE                    /* SpitFire                         */
  321.     ,XTRN_UTI                        /* UTI Doors - MegaMail             */
  322.     ,XTRN_SR                        /* Solar Realms                     */
  323.     };
  324.  
  325. enum {                                /* Values for xtrn_t.event            */
  326.      EVENT_NONE                     /* Only accessible by menu            */
  327.     ,EVENT_LOGON                    /* Execute during logon sequence    */
  328.     ,EVENT_LOGOFF                    /* Execute during logoff sequence    */
  329.     ,EVENT_NEWUSER                    /* Execute during newuser app.        */
  330.     ,EVENT_BIRTHDAY                 /* Execute on birthday                */
  331.     };
  332.  
  333.                                     /* Misc bits for event_t.misc        */
  334. #define EVENT_EXCL    (1L<<0)         /* Exclusive                        */
  335. #define EVENT_FORCE (1L<<1)         /* Force users off-line for event    */
  336.  
  337.                                     /* Mode bits for QWK stuff */
  338. #define A_EXPAND    (1<<0)            /* Expand to ANSI sequences */
  339. #define A_LEAVE     (1<<1)            /* Leave in */
  340. #define A_STRIP     (1<<2)            /* Strip out */
  341.  
  342.                                     /* Bits in xtrn_t.misc                */
  343. #define MULTIUSER    (1L<<0)         /* allow multi simultaneous users    */
  344. #define ANSI        (1L<<1)         /* user must have ANSI, same as ^^^ */
  345. #define IO_INTS     (1L<<2)         /* Intercept I/O interrupts         */
  346. #define MODUSERDAT    (1L<<3)         /* Program can modify user data     */
  347. #define WWIVCOLOR    (1L<<4)         /* Program uses WWIV color codes    */
  348. #define EVENTONLY    (1L<<5)         /* Program executes as event only    */
  349. #define STARTUPDIR    (1L<<6)         /* Create drop file in start-up dir */
  350. #define REALNAME    (1L<<7)         /* Use real name in drop file        */
  351. #define SWAP        (1L<<8)         /* Swap for this door                */
  352.  
  353.                                     /* Bits in user.qwk                 */
  354. #define QWK_FILES    (1L<<0)         /* Include new files list            */
  355. #define QWK_EMAIL    (1L<<1)         /* Include unread e-mail            */
  356. #define QWK_ALLMAIL (1L<<2)         /* Include ALL e-mail                */
  357. #define QWK_DELMAIL (1L<<3)         /* Delete e-mail after download     */
  358. #define QWK_BYSELF    (1L<<4)         /* Include messages from self        */
  359. #define QWK_UNUSED    (1L<<5)         /* Currently unused                 */
  360. #define QWK_EXPCTLA (1L<<6)         /* Expand ctrl-a codes to ascii     */
  361. #define QWK_RETCTLA (1L<<7)         /* Retain ctrl-a codes                */
  362. #define QWK_ATTACH    (1L<<8)         /* Include file attachments         */
  363.  
  364. #define INVALID_DIR 0xffff          /* Invalid directory value          */
  365. #define INVALID_SUB 0xffff            /* Invalid sub-board value            */
  366.  
  367. #define KEY_BUFSIZE 1024    /* Size of keyboard input buffer            */
  368. #define SAVE_LINES     4        /* Maximum number of lines to save            */
  369. #define LINE_BUFSIZE 512    /* Size of line output buffer               */
  370.  
  371.  
  372. #define TABSIZE        4        /* Tab Size                                    */
  373.  
  374. #define SWAP_NONE    0x80    /* Allow no swapping for executables        */
  375.  
  376. #define DSTSDABLEN    50        /* Length of DSTS.DAB file                    */
  377.  
  378.                             /* Console I/O Bits    (console)                */
  379. #define CON_R_ECHO     (1<<0)    /* Echo remotely                            */
  380. #define CON_R_ECHOX     (1<<1)    /* Echo X's to remote user                    */
  381. #define CON_R_INPUT  (1<<2)    /* Accept input remotely                    */
  382. #define CON_L_ECHO     (1<<3)    /* Echo locally                              */
  383. #define CON_L_ECHOX     (1<<4) /* Echo X's locally                            */
  384. #define CON_L_INPUT  (1<<5)    /* Accept input locally                        */
  385. #define CON_RAW_IN   (1<<8) /* Raw input mode - no editing capabilities */
  386. #define CON_ECHO_OFF (1<<10)/* Remote & Local echo disabled for ML/MF    */
  387. #define CON_UPARROW  (1<<11)/* Up arrow hit - move up one line            */
  388.  
  389.                             /* Number of milliseconds                   */
  390. #define DELAY_HANGUP 250    /* Delay before modem drops carrier         */
  391. #define DELAY_MDMTLD 500    /* Delay to give each ~ in modem strings    */
  392. #define DELAY_SPIN   10     /* Delay for the spinning cursor            */
  393. #define DELAY_AUTOHG 1500    /* Delay for auto-hangup (xfer)             */
  394.  
  395. #define SEC_LOGON    1800    /* 30 minutes allowed to logon                */
  396. #define SEC_WARN     180    /* Warn inactive user after 3 minutes       */
  397. #define SEC_HANGUP   300    /* Hangup on an inactive user after 5 mins  */
  398. #define SEC_BILLING   90    /* under 2 minutes per billing call         */
  399. #define SEC_OK           5    /* Attempt to get an OK response from modem */
  400. #define SEC_ANSI       5    /* Attempt to get a valid ANSI response     */
  401. #define SEC_ANSWER      30    /* Retries to get an answer code from modem */
  402. #define SEC_CID       10    /* Ten second pause for caller ID            */
  403. #define SEC_RING       6    /* Maximum seconds between rings            */
  404.  
  405. #define LOOP_NOPEN     500    /* Retries before file access denied        */
  406. #define LOOP_NODEDAB 500    /* Retries on NODE.DAB locking/unlocking    */
  407.  
  408.                             /* String lengths                            */
  409. #define LEN_ALIAS        25    /* User alias                                */
  410. #define LEN_NAME        25    /* User name                                */
  411. #define LEN_HANDLE        8    /* User chat handle                         */
  412. #define LEN_NOTE        30    /* User note                                */
  413. #define LEN_COMP        30    /* User computer description                */
  414. #define LEN_COMMENT     60    /* User comment                             */
  415. #define LEN_NETMAIL     60    /* NetMail forwarding address                */
  416. #define LEN_PASS         8    /* User password                            */
  417. #define LEN_PHONE        12    /* User phone number                        */
  418. #define LEN_BIRTH         8    /* Birthday in MM/DD/YY format                */
  419. #define LEN_ADDRESS     30    /* User address                             */
  420. #define LEN_LOCATION    30    /* Location (City, State)                    */
  421. #define LEN_ZIPCODE     10    /* Zip/Postal code                            */
  422. #define LEN_MODEM         8    /* User modem type description                */
  423. #define LEN_FDESC        58    /* File description                         */
  424. #define LEN_TITLE        70    /* Message title                            */
  425. #define LEN_MAIN_CMD    40    /* Storage in user.dat for custom commands    */
  426. #define LEN_XFER_CMD    40
  427. #define LEN_SCAN_CMD    40
  428. #define LEN_MAIL_CMD    40
  429. #define LEN_CID         25    /* Caller ID (phone number)                 */
  430. #define LEN_ARSTR        40    /* Max length of Access Requirement string    */
  431. #define LEN_CHATACTCMD     9    /* Chat action command                        */
  432. #define LEN_CHATACTOUT    65    /* Chat action output string                */
  433.  
  434. /****************************************************************************/
  435. /* This is a list of offsets into the USER.DAT file for different variables */
  436. /* that are stored (for each user)                                            */
  437. /****************************************************************************/
  438. #define U_ALIAS     0                    /* Offset to alias */
  439. #define U_NAME        (U_ALIAS+LEN_ALIAS) /* Offset to name */
  440. #define U_HANDLE    (U_NAME+LEN_NAME)
  441. #define U_NOTE        (U_HANDLE+LEN_HANDLE+2)
  442. #define U_COMP        (U_NOTE+LEN_NOTE)
  443. #define U_COMMENT    (U_COMP+LEN_COMP+2)
  444.  
  445. #define U_NETMAIL    (U_COMMENT+LEN_COMMENT+2)
  446.  
  447. #define U_ADDRESS    (U_NETMAIL+LEN_NETMAIL+2)
  448. #define U_LOCATION    (U_ADDRESS+LEN_ADDRESS)
  449. #define U_ZIPCODE    (U_LOCATION+LEN_LOCATION)
  450.  
  451. #define U_PASS        (U_ZIPCODE+LEN_ZIPCODE+2)
  452. #define U_PHONE      (U_PASS+8)             /* Offset to phone-number */
  453. #define U_BIRTH      (U_PHONE+12)        /* Offset to users birthday    */
  454. #define U_MODEM     (U_BIRTH+8)
  455. #define U_LASTON    (U_MODEM+8)
  456. #define U_FIRSTON    (U_LASTON+8)
  457. #define U_EXPIRE    (U_FIRSTON+8)
  458. #define U_PWMOD     (U_EXPIRE+8)
  459.  
  460. #define U_LOGONS    (U_PWMOD+8+2)
  461. #define U_LTODAY    (U_LOGONS+5)
  462. #define U_TIMEON    (U_LTODAY+5)
  463. #define U_TEXTRA      (U_TIMEON+5)
  464. #define U_TTODAY    (U_TEXTRA+5)
  465. #define U_TLAST     (U_TTODAY+5)
  466. #define U_POSTS     (U_TLAST+5)
  467. #define U_EMAILS    (U_POSTS+5)
  468. #define U_FBACKS    (U_EMAILS+5)
  469. #define U_ETODAY    (U_FBACKS+5)
  470. #define U_PTODAY    (U_ETODAY+5)
  471.  
  472. #define U_ULB       (U_PTODAY+5+2)
  473. #define U_ULS       (U_ULB+10)
  474. #define U_DLB       (U_ULS+5)
  475. #define U_DLS       (U_DLB+10)
  476. #define U_CDT        (U_DLS+5)
  477. #define U_MIN        (U_CDT+10)
  478.  
  479. #define U_LEVEL     (U_MIN+10+2)    /* Offset to Security Level    */
  480. #define U_FLAGS1    (U_LEVEL+2)     /* Offset to Flags */
  481. #define U_TL        (U_FLAGS1+8)    /* Offset to unused field */
  482. #define U_FLAGS2    (U_TL+2)
  483. #define U_EXEMPT    (U_FLAGS2+8)
  484. #define U_REST        (U_EXEMPT+8)
  485. #define U_ROWS        (U_REST+8+2)    /* Number of Rows on user's monitor */
  486. #define U_SEX        (U_ROWS+2)        /* Sex, Del, ANSI, color etc.        */
  487. #define U_MISC        (U_SEX+1)        /* Miscellaneous flags in 8byte hex */
  488. #define U_OLDXEDIT    (U_MISC+8)        /* External editor (Version 1 method) */
  489. #define U_LEECH     (U_OLDXEDIT+2)    /* two hex digits - leech attempt count */
  490. #define U_CURGRP    (U_LEECH+2)     /* Current group */
  491. #define U_CURSUB    (U_CURGRP+4)    /* Current sub-board */
  492. #define U_CURLIB    (U_CURSUB+4)    /* Current library */
  493. #define U_CURDIR    (U_CURLIB+4)    /* Current directory */
  494. #define U_CMDSET    (U_CURDIR+4)    /* unused */
  495. #define U_MAIN_CMD    (U_CMDSET+2+2)    /* unused */
  496. #define U_XFER_CMD    (U_MAIN_CMD+LEN_MAIN_CMD)        /* unused */
  497. #define U_SCAN_CMD    (U_XFER_CMD+LEN_XFER_CMD+2)     /* unused */
  498. #define U_MAIL_CMD    (U_SCAN_CMD+LEN_SCAN_CMD)        /* unused */
  499. #define U_FREECDT    (U_MAIL_CMD+LEN_MAIL_CMD+2)
  500. #define U_FLAGS3    (U_FREECDT+10)    /* Flag set #3 */
  501. #define U_FLAGS4    (U_FLAGS3+8)    /* Flag set #4 */
  502. #define U_XEDIT     (U_FLAGS4+8)    /* External editor (code) */
  503. #define U_SHELL     (U_XEDIT+8)     /* Command shell (code) */
  504. #define U_QWK        (U_SHELL+8)     /* QWK settings */
  505. #define U_TMPEXT    (U_QWK+8)        /* QWK extension */
  506. #define U_CHAT        (U_TMPEXT+3)    /* Chat settings */
  507. #define U_UNUSED    (U_CHAT+8)        /* Unused */
  508. #define U_LEN        (U_UNUSED+37+2)
  509.  
  510. /****************************************************************************/
  511. /* Offsets into DIR .DAT file for different fields for each file             */
  512. /****************************************************************************/
  513. #define F_CDT        0                /* Offset in DIR#.DAT file for cdts */
  514. #define F_DESC        (F_CDT+7+2)     /* Description                        */
  515. #define F_ULER        (F_DESC+58+2)    /* Uploader                            */
  516. #define F_TIMESDLED (F_ULER+30+2)     /* Number of times downloaded         */
  517. #define F_OPENCOUNT    (F_TIMESDLED+5+2)
  518. #define F_MISC        (F_OPENCOUNT+3+2)
  519. #define F_ALTPATH    (F_MISC+1)        /* Two hex digit alternate path */
  520. #define F_LEN        (F_ALTPATH+2+2) /* Total length of all fdat in file */
  521.  
  522. #define F_IXBSIZE    22                /* Length of each index entry        */
  523.  
  524.  
  525. #define SIF_MAXBUF  0x7000            /* Maximum buffer size of SIF data */
  526.  
  527. /* NOTE: Do not change the values of the following block of defines!    */
  528.  
  529. #define DELETED     (1L<<0)         /* Bit values for user.misc         */
  530. #define ANSI        (1L<<1)         /* Supports ANSI terminal emulation */
  531. #define COLOR        (1L<<2)         /* Send color codes                 */
  532. #define RIP         (1L<<3)         /* Supports RIP terminal emulation    */
  533. #define UPAUSE        (1L<<4)         /* Pause on every screen full        */
  534. #define SPIN        (1L<<5)         /* Spinning cursor - Same as K_SPIN */
  535. #define INACTIVE    (1L<<6)         /* Inactive user slot                */
  536. #define EXPERT        (1L<<7)         /* Expert menu mode                 */
  537. #define ANFSCAN     (1L<<8)         /* Auto New file scan                */
  538. #define CLRSCRN     (1L<<9)         /* Clear screen before each message */
  539. #define QUIET        (1L<<10)        /* Quiet mode upon logon            */
  540. #define BATCHFLAG    (1L<<11)        /* File list allow batch dl flags    */
  541. #define NETMAIL     (1L<<12)        /* Forward e-mail to fidonet addr    */
  542. #define CURSUB        (1L<<13)        /* Remember current sub-board/dir    */
  543. #define ASK_NSCAN    (1L<<14)        /* Ask for newscanning upon logon    */
  544. #define NO_EXASCII    (1L<<15)        /* Don't send extended ASCII        */
  545. #define ASK_SSCAN    (1L<<16)        /* Ask for messages to you at logon */
  546. #define AUTOTERM    (1L<<17)        /* Autodetect terminal type         */
  547. #define COLDKEYS    (1L<<18)        /* No hot-keys                        */
  548.  
  549. #define CLREOL      256     /* Character to erase to end of line         */
  550. #define HIGH        8       /* High intensity for curatr             */
  551.  
  552.                             /* Online status (online)                    */
  553. #define ON_LOCAL    1         /* Online locally                            */
  554. #define ON_REMOTE   2          /* Online remotely                            */
  555. #define ON_XFER        3        /* Online remotely - transferring file        */
  556. #define ON_WFC        4        /* Online waiting for a call                */
  557.  
  558.                             /* Varios SYSTEM parameters for sys_status    */
  559. #define SS_LOGOPEN    (1L<<0)    /* Node's Log file is open                  */
  560. #define SS_INITIAL  (1L<<1)    /* The bbs data has been initialized.       */
  561. #define SS_TMPSYSOP (1L<<2)    /* Temporary Sysop Status                    */
  562. #define SS_USERON   (1L<<3)    /* A User is logged on to the BBS            */
  563. #define SS_LCHAT    (1L<<4) /* Local chat in progress                    */
  564. #define SS_CAP        (1L<<5)    /* Capture is on                            */
  565. #define SS_ANSCAP    (1L<<6) /* Capture ANSI codes too                    */
  566. #define SS_FINPUT    (1L<<7) /* Using file for input                     */
  567. #define SS_COMISR    (1L<<8) /* Com port ISR is installed                */
  568. #define SS_DAILY    (1L<<9) /* Execute System Daily Event on logoff     */
  569. #define SS_INUEDIT    (1L<<10) /* Inside Alt-Useredit section             */
  570. #define SS_ABORT    (1L<<11) /* Global abort input or output flag        */
  571. #define SS_SYSPAGE    (1L<<12) /* Paging sysop                            */
  572. #define SS_SYSALERT (1L<<13) /* Notify sysop when users hangs up        */
  573. #define SS_GURUCHAT (1L<<14) /* Guru chat in progress                    */
  574. #define SS_NODEDAB    (1L<<15) /* NODE.DAB operations are okay            */
  575. #define SS_EVENT    (1L<<16) /* Time shortened due to upcoming event    */
  576. #define SS_PAUSEON    (1L<<17) /* Pause on, overriding user default        */
  577. #define SS_PAUSEOFF (1L<<18) /* Pause off, overriding user default        */
  578. #define SS_IN_CTRLP (1L<<19) /* Inside ctrl-p send node message func    */
  579. #define SS_NEWUSER    (1L<<20) /* New User online                         */
  580. #define SS_MDMDEBUG (1L<<21) /* Modem debug output                        */
  581. #define SS_NEST_PF    (1L<<22) /* Nested in printfile function            */
  582. #define SS_DCDHIGH    (1L<<23) /* Assume DCD is high always                */
  583.  
  584. enum {                        /* Different values for the current section */
  585.      SEC_MAIN                /* Main section                                */
  586.     ,SEC_XFER                /* Xfer section                                */
  587.     };
  588.  
  589.                                 /* Bits in 'mode' for getkey and getstr     */
  590. #define K_UPPER     (1L<<0)     /* Converts all letters to upper case        */
  591. #define K_UPRLWR    (1L<<1)     /* Upper/Lower case automatically            */
  592. #define K_NUMBER    (1L<<2)     /* Allow numbers only                        */
  593. #define K_WRAP        (1L<<3)     /* Allows word wrap                         */
  594. #define K_MSG        (1L<<4)     /* Allows ANSI, ^N ^A ^G                    */
  595. #define K_SPIN        (1L<<5)     /* Spinning cursor (same as SPIN)            */
  596. #define K_LINE        (1L<<6)     /* Input line (inverse color)                */
  597. #define K_EDIT        (1L<<7)     /* Edit string passed                        */
  598. #define K_CHAT        (1L<<8)     /* In chat multi-chat                        */
  599. #define K_NOCRLF    (1L<<9)     /* Don't print CRLF after string input      */
  600. #define K_ALPHA     (1L<<10)    /* Only allow alphabetic characters         */
  601. #define K_GETSTR    (1L<<11)    /* getkey called from getstr()                */
  602. #define K_LOWPRIO    (1L<<12)    /* low priority input                        */
  603. #define K_NOEXASC    (1L<<13)    /* No extended ASCII allowed                */
  604. #define K_E71DETECT (1L<<14)    /* Detect E-7-1 terminal type                */
  605. #define K_AUTODEL    (1L<<15)    /* Auto-delete text (used with K_EDIT)        */
  606. #define K_COLD        (1L<<16)    /* Possible cold key mode                    */
  607.  
  608.                             /* Bits in 'mode' for putmsg and printfile  */
  609. #define P_NOABORT      (1<<0)  /* Disallows abortion of a message          */
  610. #define P_SAVEATR   (1<<1)  /* Save the new current attributres after    */
  611.                             /* msg has printed. */
  612. #define P_NOATCODES (1<<2)    /* Don't allow @ codes                      */
  613.  
  614.                             /* Bits in 'mode' for listfiles             */
  615. #define FL_ULTIME   (1<<0)  /* List files by upload time                */
  616. #define FL_DLTIME   (1<<1)  /* List files by download time              */
  617. #define FL_NO_HDR   (1<<2)  /* Don't list directory header              */
  618. #define FL_FINDDESC (1<<3)  /* Find text in description                 */
  619. #define FL_EXFIND   (1<<4)    /* Find text in description - extended info */
  620. #define FL_VIEW     (1<<5)    /* View ZIP/ARC/GIF etc. info               */
  621.  
  622.                             /* Bits in the mode of writemsg and email() */
  623. #define WM_EXTDESC    (1<<0)    /* Writing extended file description        */
  624. #define WM_EMAIL    (1<<1)    /* Writing e-mail                            */
  625. #define WM_NETMAIL    (1<<2)    /* Writing NetMail                            */
  626. #define WM_ANON     (1<<3)    /* Writing anonymous message                */
  627. #define WM_FILE     (1<<4)    /* Attaching a file to the message            */
  628. #define WM_NOTOP    (1<<5)    /* Don't add top because we need top line   */
  629. #define WM_QUOTE    (1<<6)    /* Quote file available                     */
  630.  
  631.                             /* Bits in the mode of loadposts()            */
  632. #define LP_BYSELF    (1<<0)    /* Include messages sent by self            */
  633. #define LP_OTHERS    (1<<1)    /* Include messages sent to others            */
  634. #define LP_UNREAD    (1<<2)    /* Un-read messages only                    */
  635.  
  636.                             /* Bits in the mode of loadmail()            */
  637. #define LM_UNREAD    (1<<0)    /* Include un-read mail only                */
  638.  
  639. enum {                        /* readmail and delmailidx which types        */
  640.      MAIL_YOUR                /* mail sent to you */
  641.     ,MAIL_SENT                /* mail you have sent */
  642.     ,MAIL_ALL                /* all mail */
  643.     };
  644.  
  645. #if 0
  646.                             /* Message mode bits                        */
  647. #define MSG_PERM    1        /* Permanent - non-purgable message (post)  */
  648. #define MSG_FORWARD 1       /* Forwarded message (mail)                 */
  649. #define MSG_ANON    2        /* Anonymous message                        */
  650. #define MSG_PRIVATE 4        /* Private posted message                    */
  651. #define MSG_READ    8        /* Private post has been read                */
  652. #define MSG_FILE    16        /* File attached                            */
  653.  
  654. #endif
  655.  
  656.                             /* Bits in the mode of external()           */
  657. #define EX_CC       (1<<0)    /* Use command.com to load other process    */
  658. #define EX_OUTR     (1<<1)  /* Copy DOS output to remote                */
  659. #define EX_OUTL     (1<<2)    /* Use _lputc() for local DOS output        */
  660. #define EX_INR        (1<<3)    /* Trap int 16h keyboard input requests     */
  661. #define EX_WWIV     (1<<4)    /* Expand WWIV color codes to ANSI sequence */
  662. #define EX_SWAP     (1<<5)    /* Swap out for this external                */
  663.  
  664. enum {                        /* Values for 'mode' in listfileinfo        */
  665.      FI_INFO                /* Just list file information               */
  666.     ,FI_REMOVE               /* Remove/Move/Edit file information        */
  667.     ,FI_DOWNLOAD             /* Download files                           */
  668.     ,FI_OLD                  /* Search/Remove files not downloaded since */
  669.     ,FI_OLDUL                 /* Search/Remove files uploaded before      */
  670.     ,FI_OFFLINE               /* Search/Remove files not online            */
  671.     ,FI_USERXFER              /* User Xfer Download                       */
  672.     ,FI_CLOSE                   /* Close any open records                    */
  673.     };
  674.  
  675. #define L_LOGON     1       /* Logon List maintenance                   */
  676. #define LOL_SIZE    81      /* Length of each logon list entry          */
  677.  
  678. #define CHAT_ECHO    (1<<0)    /* Multinode chat echo                        */
  679. #define CHAT_ACTION (1<<1)    /* Chat actions                             */
  680. #define CHAT_NOPAGE (1<<2)    /* Can't be paged                           */
  681. #define CHAT_NOACT    (1<<3)    /* No activity alerts                        */
  682.  
  683.                             /* Bits in mode of scanposts() function     */
  684. #define SCAN_CONST    (1<<0)    /* Continuous message scanning                */
  685. #define SCAN_NEW    (1<<1)    /* New scanning                                */
  686. #define SCAN_BACK    (1<<2)    /* Scan the last message if no new            */
  687. #define SCAN_TOYOU    (1<<3)    /* Scan for messages to you                 */
  688. #define SCAN_FIND    (1<<4)    /* Scan for text in messages                */
  689. #define SCAN_UNREAD (1<<5)    /* Find un-read messages to you             */
  690.  
  691.                             /* Bits in misc of chan_t                    */
  692. #define CHAN_PW     (1<<0)    /* Can be password protected                */
  693. #define CHAN_GURU    (1<<1)    /* Guru joins empty channel                 */
  694.  
  695. enum {                        /* Values of mode for userlist function     */
  696.      UL_ALL                    /* List all users in userlist                */
  697.     ,UL_SUB                  /* List all users with access to cursub     */
  698.     ,UL_DIR                    /* List all users with access to curdir     */
  699.     };
  700.  
  701.  
  702. #define BO_LEN        16        /* BACKOUT.DAB record length                */
  703.  
  704. #define BO_OPENFILE 0        /* Backout types */
  705.  
  706. /************************/
  707. /* Remote I/O Constants */
  708. /************************/
  709.  
  710.                             /* i/o mode and state flags */
  711. #define CTSCK 0x1000         /* check cts (mode only) */
  712. #define RTSCK 0x2000        /* check rts (mode only) */
  713. #define TXBOF 0x0800        /* transmit buffer overflow (outcom only) */
  714. #define ABORT 0x0400         /* check for ^C (mode), aborting (state) */
  715. #define PAUSE 0x0200         /* check for ^S (mode), pausing (state) */
  716. #define NOINP 0x0100         /* input buffer empty (incom only) */
  717.  
  718.                             /* status flags */
  719. #define DCD     0x80           /* DCD on */
  720. #define RI        0x40        /* Ring indicate */
  721. #define DSR     0x20        /* Dataset ready */
  722. #define CTS     0x10           /* CTS on */
  723. #define FERR     0x08        /* Frameing error */
  724. #define PERR     0x04        /* Parity error */
  725. #define OVRR     0x02        /* Overrun */
  726. #define RXLOST     0x01           /* Receive buffer overflow */
  727.  
  728. /* rioctl() arguments */
  729. /* returns mode or state flags in high 8 bits, status flags in low 8 bits */
  730.  
  731.                             /* the following return mode in high 8 bits */
  732. #define IOMODE 0            /* no operation */
  733. #define IOSM 1              /* i/o set mode flags */
  734. #define IOCM 2              /* i/o clear mode flags */
  735.  
  736. #define GVERS 0x007         /* get version */
  737. #define GUART 0x107         /* get uart */
  738. #define GIRQN 0x207         /* get IRQ number */
  739. #define GBAUD 0x307         /* get baud */
  740.  
  741.                             /* the following return state in high 8 bits */
  742. #define IOSTATE 4           /* no operation */
  743. #define IOSS 5              /* i/o set state flags */
  744. #define IOCS 6              /* i/o clear state flags */
  745. #define IOFB 0x308          /* i/o buffer flush */
  746. #define IOFI 0x208          /* input buffer flush */
  747. #define IOFO 0x108          /* output buffer flush */
  748. #define IOCE 9              /* i/o clear error flags */
  749.  
  750. #define TS_INT28     1
  751. #define TS_WINOS2     2
  752. #define TS_NODV      4
  753.  
  754.                             /* return count (16bit)    */
  755. #define RXBC    0x000a        /* get receive buffer count */
  756. #define RXBS    0x010a        /* get receive buffer size */
  757. #define TXBC    0x000b        /* get transmit buffer count */
  758. #define TXBS    0x010b        /* get transmit buffer size */
  759. #define TXBF    0x020b        /* get transmit buffer free space */
  760. #define TXSYNC    0x000c        /* sync transmition (seconds<<8|0x0c) */
  761. #define IDLE    0x000d        /* suspend communication routines */
  762. #define RESUME    0x010d        /* return from suspended state */
  763. #define RLERC    0x000e        /* read line error count and clear */
  764. #define CPTON    0x0110        /* set input translation flag for ctrl-p on */
  765. #define CPTOFF    0x0010        /* set input translation flag for ctrl-p off */
  766. #define GETCPT    0x8010        /* return the status of ctrl-p translation */
  767. #define MSR     0x0011        /* read modem status register */
  768. #define FIFOCTL 0x0012        /* FIFO UART control */
  769. #define TSTYPE    0x0013        /* Time-slice API type */
  770. #define GETTST    0x8013        /* Get Time-slice API type */
  771.  
  772. #define I14DB    0x001d        /* DigiBoard int 14h driver */
  773. #define I14PC    0x011d        /* PC int 14h driver */
  774. #define I14PS    0x021d        /* PS/2 int 14h driver */
  775. #define I14FO    0x031d        /* FOSSIL int 14h driver */
  776.  
  777. #define SMSMK    0x0014        /* set modem status mask */
  778. #define SMLCR    0x0015        /* set modem line control register */
  779. #define LFN81    0x0315        /* set line format N81 */
  780. #define LFE71    0x1A15        /* set line format E71 */
  781. #define SRXHL    0x001E        /* set receive flow control high limit */
  782. #define SRXLL    0x001F        /* set receive flow control low limit */
  783. #define IGCLS    0x0020        /* input gate close */
  784. #define IGOPN    0xFF20        /* input gate open */
  785.  
  786.  
  787.                             /* ivhctl() arguments */
  788. #define INT29R 1             /* copy int 29h output to remote */
  789. #define INT29L 2            /* Use _putlc for int 29h */
  790. #define INT16  0x10          /* return remote chars to int 16h calls */
  791. #define INTCLR 0            /* release int 16h, int 29h */
  792.  
  793. /**********/
  794. /* Macros */
  795. /**********/
  796.  
  797. #define CRLF            { outchar(CR); outchar(LF); }
  798. #define SYSOP            (useron.level>=90 || sys_status & SS_TMPSYSOP)
  799. #define REALSYSOP        (useron.level>=90)
  800. #define FLAG(x)         (long)(1L<<(x-'A'))
  801. #define CLS             outchar(FF)
  802. #define WHERE           __LINE__,__FILE__
  803. #define SAVELINE        { slatr[slcnt]=latr; \
  804.                             sprintf(slbuf[slcnt<SAVE_LINES ? slcnt++ : slcnt] \
  805.                             ,"%.*s",lbuflen,lbuf); \
  806.                             lbuflen=0; }
  807. #define RESTORELINE     { lbuflen=0; attr(slatr[--slcnt]); \
  808.                             bputs(slbuf[slcnt]); \
  809.                             curatr=lclatr(-1); }
  810. #define SYNC            { riosync(0); nodesync(); }
  811. #define ASYNC            { riosync(1); nodesync(); }
  812. #define DCDHIGH         (sys_status&SS_DCDHIGH || rioctl(IOSTATE)&DCD)
  813.  
  814. #define ucrc32(ch,crc)    (crc32tbl[(crc^ch)&0xff]^(crc>>8))
  815.  
  816. #if DEBUG    /* if DEBUG, call function */
  817. #define DLOG(where,txt) dlog(where,txt)
  818. #else        /* else, do nothing - function isn't even valid */
  819. #define DLOG(where,txt)
  820. #endif
  821.  
  822. /********************/
  823. /* Type Definitions */
  824. /********************/
  825.  
  826. typedef struct {                        /* Users information */
  827.     ushort    number,                     /* Number */
  828.             uls,                        /* Number of uploads */
  829.             dls,                        /* Number of downloads */
  830.             posts,                        /* Number of posts */
  831.             emails,                        /* Number of emails */
  832.             fbacks,                        /* Number of emails sent to sysop */
  833.             etoday,                        /* Emails today */
  834.             ptoday,                        /* Posts today */
  835.             timeon,                        /* Total time on */
  836.             textra,                        /* Extra time for today */
  837.             logons,                        /* Total logons */
  838.             ttoday,                        /* Time on today */
  839.             tlast,                        /* Time on last call */
  840.             ltoday,                     /* Logons today */
  841.             xedit,                        /* External editor (1 based) */
  842.             shell,                        /* Command shell */
  843.             curgrp,                     /* Current group, last on */
  844.             cursub,                     /* Current sub-board */
  845.             curlib,                     /* Current library */
  846.             curdir;                     /* Current directory */
  847.     uchar    level,                        /* Security level */
  848.             sex,                        /* Sex - M or F */
  849.             rows,                       /* Rows of text */
  850.             alias[LEN_ALIAS+1],         /* Alias */
  851.             name[LEN_NAME+1],            /* Name - Real */
  852.             handle[LEN_HANDLE+1],        /* Chat handle */
  853.             comp[LEN_COMP+1],            /* Computer type */
  854.             note[LEN_NOTE+1],            /* Public notice about this user */
  855.             address[LEN_ADDRESS+1],     /* Street Address */
  856.             location[LEN_LOCATION+1],    /* Location of user */
  857.             zipcode[LEN_ZIPCODE+1],     /* Zip/Postal code */
  858.             pass[LEN_PASS+1],            /* Password - not case sensitive */
  859.             birth[LEN_BIRTH+1],         /* Birthday in MM/DD/YY format */
  860.             phone[LEN_PHONE+1],            /* Phone number xxx-xxx-xxxx format */
  861.             modem[LEN_MODEM+1],            /* Modem type - 8 chars max */
  862.             netmail[LEN_NETMAIL+1],     /* NetMail forwarding address */
  863.             leech,                        /* Leech attempt counter */
  864.             tmpext[4],                    /* QWK Packet extension */
  865.             comment[LEN_COMMENT+1];        /* Private comment about user */
  866.     ulong    misc,                        /* Misc. bits - ANSI, Deleted etc. */
  867.             qwk,                        /* QWK settings */
  868.             chat,                        /* Chat defaults */
  869.             flags1,                     /* Flag set #1 */
  870.             flags2,                     /* Flag set #2 */
  871.             flags3,                     /* Flag set #3 */
  872.             flags4,                     /* Flag set #4 */
  873.             exempt,                        /* Exemption Flags */
  874.             rest,                        /* Restriction Flags */
  875.             ulb,                        /* Total bytes uploaded */
  876.             dlb,                        /* Total bytes downloaded */
  877.             cdt,                        /* Credits */
  878.             min,                        /* Minutes */
  879.             freecdt;                    /* Free credits (renewed daily) */
  880.     time_t    firston,                    /* Date/Time first called */
  881.             laston,                     /* Last called */
  882.             expire,                     /* Expiration date */
  883.             pwmod;                        /* Password last modified */
  884.             } user_t;
  885.  
  886. typedef struct {                        /* File (transfers) Data */
  887.     uchar   name[13],                    /* Name of file FILENAME.EXT */
  888.             desc[LEN_FDESC+1],            /* Uploader's Description */
  889.             uler[LEN_ALIAS+1],            /* User who uploaded */
  890.             opencount,                    /* Times record is currently open */
  891.             path[LEN_DIR+1];            /* Alternate DOS path */
  892.     time_t  date,                        /* File date/time */
  893.             dateuled,                    /* Date/Time (Unix) Uploaded */
  894.             datedled;                    /* Date/Time (Unix) Last downloaded */
  895.     ushort    dir,                        /* Directory file is in */
  896.             altpath,
  897.             timesdled,                    /* Total times downloaded */
  898.             timetodl;                    /* How long transfer time */
  899.     long    datoffset,                    /* Offset into .DAT file */
  900.             size,                        /* Size of file */
  901.             misc;                        /* Miscellaneous bits */
  902.     ulong    cdt;                        /* Credit value for this file */
  903.             } file_t;
  904.  
  905. typedef struct {                        /* Mail data (taken from index) */
  906.     ulong    offset,                     /* Offset to header (in bytes) */
  907.             number;                     /* Number of message */
  908.     ushort    attr;                        /* Attributes */
  909.             } mail_t;
  910.  
  911. typedef struct {                        /* Message data */
  912.     ulong    offset,                     /* Offset to header (in bytes) */
  913.             number;                     /* Number of message */
  914.             } post_t;
  915.  
  916. typedef struct {                        /* System/Node Statistics */
  917.     ulong     logons,                        /* Total Logons on System */
  918.             ltoday,                        /* Total Logons Today */
  919.             timeon,                        /* Total Time on System */
  920.             ttoday,                        /* Total Time Today */
  921.             uls,                        /* Total Uploads Today */
  922.             ulb,                        /* Total Upload Bytes Today */
  923.             dls,                        /* Total Downloads Today */
  924.             dlb,                        /* Total Download Bytes Today */
  925.             ptoday,                        /* Total Posts Today */
  926.             etoday,                        /* Total Emails Today */
  927.             ftoday;                     /* Total Feedbacks Today */
  928.     ushort    nusers;                     /* Total New Users Today */
  929.             } stats_t;
  930.  
  931. typedef struct {                        /* FidoNet address */
  932.     ushort    zone,                        /* Zone */
  933.             net,                        /* Network */
  934.             node,                        /* Node */
  935.             point;                        /* Point */
  936.             } faddr_t;
  937.  
  938. typedef struct {                        /* Message sub board info */
  939.     uchar    
  940. #ifdef SCFG
  941.             lname[LEN_SLNAME+1],        /* Short name - used for prompts */
  942.             sname[LEN_SSNAME+1],        /* Long name - used for listing */
  943.             ar[LEN_ARSTR+1],            /* Access requirements */
  944.             read_ar[LEN_ARSTR+1],        /* Read requirements */
  945.             post_ar[LEN_ARSTR+1],        /* Post requirements */
  946.             op_ar[LEN_ARSTR+1],         /* Operator requirements */
  947.             mod_ar[LEN_ARSTR+1],        /* Moderated user requirements */
  948.             qwkname[11],                /* QWK name - only 10 chars */
  949.             data_dir[LEN_DIR+1],        /* Data file directory */
  950.             origline[51],                /* Optional EchoMail origin line */
  951.             echomail_sem[LEN_DIR+1],    /* EchoMail semaphore for this sub */
  952.             tagline[81],                /* Optional QWK net tag line */
  953. #else
  954.             *lname,
  955.             *sname,
  956.             *ar,
  957.             *read_ar,
  958.             *post_ar,
  959.             *op_ar,
  960.             *mod_ar,
  961.             *qwkname,
  962.             *data_dir,
  963.             *origline,
  964.             *echomail_sem,
  965.             *tagline,
  966. #endif
  967.             code[9];                    /* Eight character code */
  968. #ifndef SBBS
  969.     uchar    echopath[LEN_DIR+1];        /* EchoMail path */
  970. #endif
  971.     ushort    grp,                        /* Which group this sub belongs to */
  972.             ptridx,                     /* Index into pointer file */
  973.             maxage;                     /* Max age of messages (in days) */
  974.     ulong    misc,                        /* Miscellaneous flags */
  975.             maxmsgs,                    /* Max number of messages allowed */
  976.             maxcrcs;                    /* Max number of CRCs to keep */
  977. #ifdef SBBS
  978.     ulong    ptr,                        /* Highest read message */
  979.             last;                        /* Last read message */
  980. #endif
  981.     faddr_t faddr;                        /* FidoNet address */
  982.             } sub_t;
  983.  
  984. typedef struct {                        /* Message group info */
  985.     uchar
  986. #ifdef SCFG
  987.             lname[LEN_GLNAME+1],        /* Short name */
  988.             sname[LEN_GSNAME+1],        /* Long name */
  989.             ar[LEN_ARSTR+1];            /* Access requirements */
  990.             
  991. #else
  992.             *lname,
  993.             *sname,
  994.             *ar;
  995. #endif
  996.             } grp_t;
  997.  
  998. typedef struct {                        /* Transfer Directory Info */
  999.     uchar                                /* Eight character code */
  1000. #ifdef SCFG
  1001.             lname[LEN_SLNAME+1],        /* Short name - used for prompts */
  1002.             sname[LEN_SSNAME+1],        /* Long name - used for listing */
  1003.             ar[LEN_ARSTR+1],            /* Access Requirements */
  1004.             ul_ar[LEN_ARSTR+1],         /* Upload Requirements */
  1005.             dl_ar[LEN_ARSTR+1],         /* Download Requirements */
  1006.             ex_ar[LEN_ARSTR+1],         /* Exemption Requirements (credits) */
  1007.             op_ar[LEN_ARSTR+1],         /* Operator Requirements */
  1008.             path[LEN_DIR+1],            /* Path to directory for files */
  1009.             exts[41],                   /* Extensions allowed */
  1010.             upload_sem[LEN_DIR+1],        /* Upload semaphore file */
  1011.             data_dir[LEN_DIR+1],        /* Directory where data is stored */
  1012. #else
  1013.             *lname,
  1014.             *sname,
  1015.             *ar,
  1016.             *ul_ar,
  1017.             *dl_ar,
  1018.             *ex_ar,
  1019.             *op_ar,
  1020.             *path,
  1021.             *exts,
  1022.             *upload_sem,
  1023.             *data_dir,
  1024. #endif
  1025.             code[9],
  1026.             seqdev,                     /* Sequential access device number */
  1027.             sort;                        /* Sort type */
  1028.     ushort    maxfiles,                    /* Max number of files allowed */
  1029.             maxage,                     /* Max age of files (in days) */
  1030.             up_pct,                     /* Percentage of credits on uloads */
  1031.             dn_pct,                     /* Percentage of credits on dloads */
  1032.             lib;                        /* Which library this dir is in */
  1033.     ulong    misc;                        /* Miscellaneous bits */
  1034.             } dir_t;
  1035.  
  1036. typedef struct {                        /* Transfer Library Information */
  1037.     uchar
  1038. #ifdef SCFG
  1039.             lname[LEN_GLNAME+1],        /* Short Name - used for prompts */
  1040.             sname[LEN_GSNAME+1],        /* Long Name - used for listings */
  1041.             ar[LEN_ARSTR+1];            /* Access Requirements */
  1042. #else
  1043.             *lname,
  1044.             *sname,
  1045.             *ar;
  1046. #endif
  1047.     ushort    offline_dir;                /* Offline file directory */
  1048.             } lib_t;
  1049.  
  1050. typedef struct {                        /* Gfile Section Information */
  1051.     uchar                                /* Eight character code */
  1052. #ifdef SCFG
  1053.             name[41],                    /* Name of section */
  1054.             ar[LEN_ARSTR+1],            /* Access requirements */
  1055. #else
  1056.             *name,
  1057.             *ar,
  1058. #endif
  1059.             code[9];
  1060.             } txtsec_t;
  1061.  
  1062. typedef struct {                        /* External Section Information */
  1063.     uchar
  1064. #ifdef SCFG
  1065.             name[41],                    /* Name of section */
  1066.             ar[LEN_ARSTR+1],            /* Access requirements */
  1067. #else
  1068.             *name,
  1069.             *ar,
  1070. #endif
  1071.             code[9];                    /* Eight character code */
  1072.             } xtrnsec_t;
  1073.  
  1074. typedef struct {                       /* Swappable executable */
  1075. #ifdef SCFG
  1076.     uchar    cmd[LEN_CMD+1];            /* Program path/name */
  1077. #else
  1078.     uchar    *cmd;
  1079. #endif
  1080.             } swap_t;
  1081.  
  1082. typedef struct {                        /* External Program Information */
  1083.     uchar
  1084. #ifdef SCFG
  1085.             name[41],                    /* Name of External */
  1086.             ar[LEN_ARSTR+1],            /* Access Requirements */
  1087.             run_ar[LEN_ARSTR+1],        /* Run Requirements */
  1088.             cmd[LEN_CMD+1],             /* Command line */
  1089.             clean[LEN_CMD+1],            /* Clean-up command line */
  1090.             path[LEN_DIR+1],            /* Start-up path */
  1091. #else
  1092.             *name,
  1093.             *ar,
  1094.             *run_ar,
  1095.             *cmd,
  1096.             *clean,
  1097.             *path,
  1098. #endif
  1099.             type,                        /* What type of external program */
  1100.             event,                      /* Execute upon what event */
  1101.             code[9];                    /* Internal code for program */
  1102.     ushort    sec;                        /* Section this program belongs to */
  1103.     ulong    cost,                        /* Cost to run in credits */
  1104.             misc;                        /* Misc. bits - ANSI, DOS I/O etc. */
  1105.             } xtrn_t;
  1106.  
  1107. typedef struct {                        /* External Page program info */
  1108. #ifdef SCFG
  1109.     uchar    cmd[LEN_CMD+1],             /* Command line */
  1110.             ar[LEN_ARSTR+1];            /* ARS for this chat page */
  1111. #else
  1112.     uchar    *cmd,
  1113.             *ar;
  1114. #endif
  1115.     ulong    misc;                        /* Intercept I/O */
  1116.             } page_t;
  1117.  
  1118.  
  1119. typedef struct {                        /* Chat action set */
  1120. #ifdef SCFG
  1121.     uchar    name[26];                    /* Name of set */
  1122. #else
  1123.     uchar    *name;
  1124. #endif
  1125.             } actset_t;
  1126.  
  1127. typedef struct {                        /* Chat action info */
  1128. #ifdef SCFG
  1129.     uchar    cmd[LEN_CHATACTCMD+1],        /* Command word */
  1130.             out[LEN_CHATACTOUT+1];        /* Output */
  1131. #else
  1132.     uchar    *cmd,
  1133.             *out;
  1134. #endif
  1135.     ushort    actset;                     /* Set this action belongs to */
  1136.             } chatact_t;
  1137.  
  1138. typedef struct {                        /* Gurus */
  1139.     uchar
  1140. #ifdef SCFG
  1141.             name[26],
  1142.             ar[LEN_ARSTR+1],
  1143. #else
  1144.             *name,
  1145.             *ar,
  1146. #endif
  1147.             code[9];
  1148.  
  1149.             } guru_t;
  1150.  
  1151. typedef struct {                        /* Chat Channel Information */
  1152.     uchar
  1153. #ifdef SCFG
  1154.             ar[LEN_ARSTR+1],            /* Access requirements */
  1155.             name[26],                    /* Channel description */
  1156. #else
  1157.             *ar,
  1158.             *name,
  1159. #endif
  1160.             code[9];
  1161.     ushort    actset,                     /* Set of actions used in this chan */
  1162.             guru;                        /* Guru file number */
  1163.     ulong    cost,                        /* Cost to join */
  1164.             misc;                        /* Misc. bits CHAN_* macros */
  1165.             } chan_t;
  1166.  
  1167. typedef struct {                        /* Modem Result codes info */
  1168.     ushort    code,                        /* Numeric Result Code */
  1169.             cps,                        /* Average Transfer CPS */
  1170.             rate;                       /* DCE Rate (Modem to Modem) */
  1171. #ifdef SCFG
  1172.     uchar   str[LEN_MODEM+1];           /* String to use for description */
  1173. #else
  1174.     uchar    *str;
  1175. #endif
  1176.             } mdm_result_t;
  1177.  
  1178. typedef struct {                        /* Transfer Protocol information */
  1179.     uchar    mnemonic,                    /* Letter to select this protocol */
  1180. #ifdef SCFG
  1181.             name[26],                    /* Name of protocol */
  1182.             ar[LEN_ARSTR+1],            /* ARS */
  1183.             ulcmd[LEN_CMD+1],            /* Upload command line */
  1184.             dlcmd[LEN_CMD+1],            /* Download command line */
  1185.             batulcmd[LEN_CMD+1],        /* Batch upload command line */
  1186.             batdlcmd[LEN_CMD+1],        /* Batch download command line */
  1187.             blindcmd[LEN_CMD+1],        /* Blind upload command line */
  1188.             bicmd[LEN_CMD+1];            /* Bidirectional command line */
  1189. #else
  1190.             *ar,
  1191.             *name,
  1192.             *ulcmd,
  1193.             *dlcmd,
  1194.             *batulcmd,
  1195.             *batdlcmd,
  1196.             *blindcmd,
  1197.             *bicmd;
  1198. #endif
  1199.     ulong    misc;                        /* Miscellaneous bits */
  1200.             } prot_t;
  1201.  
  1202. typedef struct {                        /* Extractable file types */
  1203.     uchar    ext[4],                     /* Extension */
  1204. #ifdef SCFG
  1205.             ar[LEN_ARSTR+1],            /* Access Requirements */
  1206.             cmd[LEN_CMD+1];             /* Command line */
  1207. #else
  1208.             *ar,
  1209.             *cmd;
  1210. #endif
  1211.             } fextr_t;
  1212.  
  1213. typedef struct {                        /* Compressable file types */
  1214.     uchar    ext[4],                     /* Extension */
  1215. #ifdef SCFG
  1216.             ar[LEN_ARSTR+1],            /* Access Requirements */
  1217.             cmd[LEN_CMD+1];             /* Command line */
  1218. #else
  1219.             *ar,
  1220.             *cmd;
  1221. #endif
  1222.             } fcomp_t;
  1223.  
  1224. typedef struct {                        /* Viewable file types */
  1225.     uchar    ext[4],                     /* Extension */
  1226. #ifdef SCFG
  1227.             ar[LEN_ARSTR+1],            /* Access Requirements */
  1228.             cmd[LEN_CMD+1];             /* Command line */
  1229. #else
  1230.             *ar,
  1231.             *cmd;
  1232. #endif
  1233.             } fview_t;
  1234.  
  1235. typedef struct {                        /* Testable file types */
  1236.     uchar    ext[4],                     /* Extension */
  1237. #ifdef SCFG
  1238.             ar[LEN_ARSTR+1],            /* Access requirement */
  1239.             cmd[LEN_CMD+1],             /* Command line */
  1240.             workstr[41];                /* String to display while working */
  1241. #else
  1242.             *ar,
  1243.             *cmd,
  1244.             *workstr;
  1245. #endif
  1246.             } ftest_t;
  1247.  
  1248. typedef struct {                        /* Download events */
  1249.     uchar    ext[4],
  1250. #ifdef SCFG
  1251.             ar[LEN_ARSTR+1],            /* Access requirement */
  1252.             cmd[LEN_CMD+1],             /* Command line */
  1253.             workstr[41];                /* String to display while working */
  1254. #else
  1255.             *ar,
  1256.             *cmd,
  1257.             *workstr;
  1258. #endif
  1259.             } dlevent_t;
  1260.  
  1261. typedef struct {                        /* External Editors */
  1262.     uchar
  1263. #ifdef SCFG
  1264.             name[41],                    /* Name (description) */
  1265.             ar[LEN_ARSTR+1],            /* Access Requirement */
  1266.             lcmd[LEN_CMD+1],            /* Local command line */
  1267.             rcmd[LEN_CMD+1],            /* Remote command line */
  1268. #else
  1269.             *name,
  1270.             *ar,
  1271.             *lcmd,
  1272.             *rcmd,
  1273. #endif
  1274.             code[9];
  1275.     ulong    misc;                        /* Misc. bits */
  1276.             } xedit_t;
  1277.  
  1278.  
  1279. typedef struct {                        /* Generic Timed Event */
  1280.     uchar    code[9],                    /* Internal code */
  1281.             days,                        /* Days to run event */
  1282. #ifdef SCFG
  1283.             dir[LEN_DIR+1],             /* Start-up directory */
  1284.             cmd[LEN_CMD+1];             /* Command line */
  1285. #else
  1286.             *dir,
  1287.             *cmd;
  1288. #endif
  1289.     ushort    node,                        /* Node to execute event */
  1290.             time;                        /* Time to run event */
  1291.     ulong    misc;                        /* Misc bits */
  1292. #ifndef SCFG
  1293.     time_t    last;                        /* Last time event ran */
  1294. #endif
  1295.             } event_t;
  1296.  
  1297. typedef struct {                        /* QWK Network Hub */
  1298.     uchar    id[9],                        /* System ID of Hub */
  1299.             *mode,                        /* Mode for Ctrl-A codes for ea. sub */
  1300.             days,                        /* Days to call-out on */
  1301. #ifdef SCFG
  1302.             call[LEN_CMD+1],            /* Call-out command line to execute */
  1303.             pack[LEN_CMD+1],            /* Packing command line */
  1304.             unpack[LEN_CMD+1];            /* Unpacking command line */
  1305. #else
  1306.             *call,
  1307.             *pack,
  1308.             *unpack;
  1309. #endif
  1310.     ushort    time,                        /* Time to call-out */
  1311.             node,                        /* Node to do the call-out */
  1312.             freq,                        /* Frequency of call-outs */
  1313.             subs,                        /* Number Sub-boards carried */
  1314.             *sub,                        /* Number of local sub-board for ea. */
  1315.             *conf;                        /* Conference number of ea. */
  1316. #ifndef SCFG
  1317.     time_t    last;                        /* Last network attempt */
  1318. #endif
  1319.             } qhub_t;
  1320.  
  1321. typedef struct {                        /* PCRelay/PostLink Hub */
  1322.     uchar    days,                        /* Days to call-out on */
  1323. #ifdef SCFG
  1324.             name[11],                    /* Site Name of Hub */
  1325.             call[LEN_CMD+1];            /* Call-out command line to execute */
  1326. #else
  1327.             *call;
  1328. #endif
  1329.     ushort    time,                        /* Time to call-out */
  1330.             node,                        /* Node to do the call-out */
  1331.             freq;                        /* Frequency of call-outs */
  1332. #ifndef SCFG
  1333.     time_t    last;                        /* Last network attempt */
  1334. #endif
  1335.             } phub_t;
  1336.  
  1337.  
  1338. typedef struct {                        /* FidoNet msg header */
  1339.     uchar    from[36],                    /* From user */
  1340.             to[36],                     /* To user */
  1341.             subj[72],                    /* Message title */
  1342.             time[20];                    /* Time in goof-ball ASCII format */
  1343.     short    read,                        /* Times read */
  1344.             destnode,                    /* Destination node */
  1345.             orignode,                    /* Origin node */
  1346.             cost,                        /* Cost in pennies */
  1347.             orignet,                    /* Origin net */
  1348.             destnet,                    /* Destination net */
  1349.             destzone,                    /* Destination zone */
  1350.             origzone,                    /* Origin zone */
  1351.             destpoint,                    /* Destination point */
  1352.             origpoint,                    /* Origin point */
  1353.             re,                         /* Message number regarding */
  1354.             attr,                        /* Attributes - see FIDO_* */
  1355.             next;                        /* Next message number in stream */
  1356.             } fmsghdr_t;
  1357.  
  1358.  
  1359. typedef struct {                        /* Command Shells */
  1360.     uchar
  1361. #ifdef SCFG
  1362.             name[41],                    /* Name (description) */
  1363.             ar[LEN_ARSTR+1],            /* Access Requirement */
  1364. #else
  1365.             *name,
  1366.             *ar,
  1367. #endif
  1368.             code[9];
  1369.     ulong    misc;
  1370.             } shell_t;
  1371.  
  1372.  
  1373. typedef struct {
  1374.     char     *openerr,
  1375.             *reading,
  1376.             *readit,
  1377.             *allocerr,
  1378.             *error;
  1379.             } read_cfg_text_t;
  1380.  
  1381. #endif /* Don't add anything after this #endif statement */
  1382.