Annotation of sbbs/sbbs2/sbbsdefs.h, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.