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

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