Annotation of sbbs/sbbs2/vars.c, revision 1.1.1.1

1.1       root        1: /* VARS.C */
                      2: 
                      3: /* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
                      4: 
                      5: /*************************************************************/
                      6: /* External (Global/Public) Variables for use only with SBBS */
                      7: /*************************************************************/
                      8: 
                      9: #include <stdio.h>
                     10: #include <dos.h>
                     11: 
                     12: #ifndef GLOBAL
                     13: #define GLOBAL
                     14: unsigned _stklen=22000;                        /* Set stack size in code, not header */
                     15:                                                                        /* 20k, NOT enough */
                     16: #endif
                     17: 
                     18: #include "sbbsdefs.h"
                     19: #include "smbdefs.h"
                     20: #include "text.h"
                     21: 
                     22: GLOBAL char    *envp[128];     /* Original environment */
                     23: 
                     24: GLOBAL char    menu_dir[128];  /* Over-ride default menu dir */
                     25: GLOBAL char    menu_file[128]; /* Over-ride menu file */
                     26: 
                     27: GLOBAL user_t  useron;                 /* User currently online */
                     28: GLOBAL node_t  thisnode;               /* Node information */
                     29: GLOBAL smb_t   smb;                    /* Currently open message base */
                     30: 
                     31:                                                                /* Batch download queue */
                     32: GLOBAL char    **batdn_name;   /* Filenames */
                     33: GLOBAL ushort  *batdn_alt;     /* Alternate path */
                     34: GLOBAL uint    *batdn_dir,     /* Directory for each file */
                     35:                                batdn_total;    /* Total files */
                     36: GLOBAL long    *batdn_offset;  /* Offset for data */
                     37: GLOBAL ulong   *batdn_size;    /* Size of file in bytes */
                     38: GLOBAL ulong   *batdn_cdt;     /* Credit value of file */
                     39: 
                     40:                                                                /* Batch upload queue */
                     41: GLOBAL char    **batup_desc,   /* Description for each file */
                     42:                                **batup_name,   /* Filenames */
                     43:                                *batup_misc;    /* Miscellaneous bits */
                     44: GLOBAL ushort  *batup_alt;     /* Alternate path */
                     45: GLOBAL uint    *batup_dir,     /* Directory for each file */
                     46:                                batup_total;    /* Total files */
                     47: 
                     48: /*********************************/
                     49: /* Color Configuration Variables */
                     50: /*********************************/
                     51: GLOBAL char    *text[TOTAL_TEXT];                      /* Text from CTRL\TEXT.DAT */
                     52: GLOBAL char    *text_sav[TOTAL_TEXT];          /* Text from CTRL\TEXT.DAT */
                     53: GLOBAL int             directvideo;    /* Turbo C's video flag - direct or bios */
                     54: GLOBAL char    qoc;                    /* Quit after one caller */
                     55: GLOBAL long    freedosmem;     /* Amount of free DOS memory */
                     56: GLOBAL char    orgcmd[129];    /* Original command to execute bbs */
                     57: GLOBAL char    dszlog[127];    /* DSZLOG enviornment variable */
                     58: GLOBAL char    debug;                  /* Flag to allow debug writes */
                     59: GLOBAL int             keybuftop,keybufbot;    /* Keyboard input buffer pointers */
                     60: GLOBAL char    keybuf[KEY_BUFSIZE];    /* Keyboard input buffer */
                     61: GLOBAL char    connection[LEN_MODEM+1];/* Connection Description */
                     62: GLOBAL ulong   cur_rate;               /* Current Connection (DCE) Rate */
                     63: GLOBAL ulong   cur_cps;                /* Current Average Transfer CPS */
                     64: GLOBAL ulong   dte_rate;               /* Current COM Port (DTE) Rate */
                     65: GLOBAL time_t  timeout;                /* User inactivity timeout reference */
                     66: GLOBAL char    timeleft_warn;  /* low timeleft warning flag */
                     67: GLOBAL char    curatr;                 /* Current Text Attributes Always */
                     68: GLOBAL long    lncntr;                 /* Line Counter - for PAUSE */
                     69: GLOBAL long    tos;                    /* Top of Screen */
                     70: GLOBAL long    rows;                   /* Current Rows for User */
                     71: GLOBAL long    autoterm;               /* Autodetected terminal type */
                     72: GLOBAL char    slbuf[SAVE_LINES][LINE_BUFSIZE+1]; /* Saved for redisplay */
                     73: GLOBAL char    slatr[SAVE_LINES];      /* Starting attribute of each line */
                     74: GLOBAL char    slcnt;                  /* Number of lines currently saved */
                     75: GLOBAL char    lbuf[LINE_BUFSIZE+1];/* Temp storage for each line output */
                     76: GLOBAL int             lbuflen;                /* Number of characters in line buffer */
                     77: GLOBAL char    latr;                   /* Starting attribute of line buffer */
                     78: GLOBAL ulong   console;                /* Defines current Console settings */
                     79: GLOBAL char    tmp[256];               /* Used all over as temp string */
                     80: GLOBAL char    *nulstr;                /* Null string pointer */
                     81: GLOBAL char    *crlf;                  /* CRLF string pointer */
                     82: GLOBAL char    wordwrap[81];   /* Word wrap buffer */
                     83: GLOBAL time_t  now,                    /* Used to store current time in Unix format */
                     84:                                answertime,     /* Time call was answered */
                     85:                                logontime,              /* Time user logged on */
                     86:                                starttime,              /* Time stamp to use for time left calcs */
                     87:                                ns_time,                /* File new-scan time */
                     88:                                last_ns_time;   /* Most recent new-file-scan this call */
                     89: GLOBAL uchar   action;                 /* Current action of user */
                     90: GLOBAL char    statline;               /* Current Status Line number */
                     91: GLOBAL long    online;                 /* Remote/Local or not online */
                     92: GLOBAL long    sys_status;     /* System Status */
                     93: GLOBAL char    *sub_misc;              /* Save misc and ptrs for subs */
                     94: GLOBAL ulong   *sub_ptr;               /* for fast pointer update */
                     95: GLOBAL ulong   *sub_last;              /* last read message pointer */
                     96: 
                     97: GLOBAL ulong   logon_ulb,              /* Upload Bytes This Call */
                     98:                                logon_dlb,              /* Download Bytes This Call */
                     99:                                logon_uls,              /* Uploads This Call */
                    100:                                logon_dls,              /* Downloads This Call */
                    101:                                logon_posts,    /* Posts This Call */
                    102:                                logon_emails,   /* Emails This Call */
                    103:                                logon_fbacks;   /* Feedbacks This Call */
                    104: GLOBAL uchar   logon_ml;               /* ML of the user apon logon */
                    105: 
                    106: GLOBAL int             node_disk;              /* Number of Node's disk */
                    107: GLOBAL uint    main_cmds;              /* Number of Main Commands this call */
                    108: GLOBAL uint    xfer_cmds;              /* Number of Xfer Commands this call */
                    109: GLOBAL ulong   posts_read;     /* Number of Posts read this call */
                    110: GLOBAL char    temp_uler[31];  /* User who uploaded the files to temp dir */
                    111: GLOBAL char    temp_file[41];  /* Origin of extracted temp files */
                    112: GLOBAL long    temp_cdt;               /* Credit value of file that was extracted */
                    113: GLOBAL char    autohang;               /* Used for auto-hangup after transfer */
                    114: GLOBAL char    cap_fname[41];  /* Capture filename - default is CAPTURE.TXT */
                    115: GLOBAL FILE    *capfile;               /* File string to use for capture file */
                    116: GLOBAL int             inputfile;              /* File handle to use for input */
                    117: GLOBAL int             logfile;                /* File handle for node.log */
                    118: GLOBAL int             nodefile;               /* File handle for node.dab */
                    119: GLOBAL int             node_ext;               /* File handle for node.exb */
                    120: GLOBAL char    logcol;                 /* Current column of log file */
                    121: GLOBAL uint    criterrs;               /* Critical error counter */
                    122: GLOBAL struct date date;               /* Used for DOS compatible date pointer */
                    123: GLOBAL struct time curtime;    /* Used for DOS compatible time pointer */
                    124: 
                    125: GLOBAL uint    curgrp,                 /* Current group */
                    126:                                *cursub,                /* Current sub-board for each group */
                    127:                                curlib,                 /* Current library */
                    128:                                *curdir;                /* Current directory for each library */
                    129: GLOBAL uint    *usrgrp,                /* Real group numbers */
                    130:                                usrgrps;                /* Number groups this user has access to */
                    131: GLOBAL uint    *usrlib,                /* Real library numbers */
                    132:                                usrlibs;                /* Number of libs this user can access */
                    133: GLOBAL uint    **usrsub,               /* Real sub numbers */
                    134:                                *usrsubs;               /* Num of subs with access for each grp */
                    135: GLOBAL uint    **usrdir,               /* Real dir numbers */
                    136:                                *usrdirs;               /* Num of dirs with access for each lib */
                    137: GLOBAL int             cursubnum;              /* For ARS */
                    138: GLOBAL int             curdirnum;              /* For ARS */
                    139: GLOBAL long    timeleft;               /* Number of seconds user has left online */
                    140: GLOBAL uchar   sbbsnode[81];   /* Environment var to contain node dir path */
                    141: GLOBAL uchar   sbbsnnum[81];   /* Environment var to contain node num */
                    142: GLOBAL char    *comspec;               /* Pointer to environment variable COMSPEC */
                    143: GLOBAL ushort  altul;                  /* Upload to alternate path flag */
                    144: GLOBAL uint    inDV;                   /* DESQview version, or 0 if not under DV */
                    145: GLOBAL uchar   lastnodemsg;    /* Number of node last message was sent to */
                    146: GLOBAL char    color[TOTAL_COLORS];    /* Different colors for the BBS */
                    147: GLOBAL time_t  next_event;     /* Next event time - from front-end */
                    148: GLOBAL char    lastuseron[LEN_ALIAS+1];  /* Name of user last online */
                    149: GLOBAL char    cid[LEN_CID+1]; /* Caller ID of current caller */
                    150: GLOBAL uint    emshandle;              /* EMS handle for overlay swap */
                    151: GLOBAL char    emsver;                 /* Version of EMS installed */
                    152: GLOBAL char    *noaccess_str;  /* Why access was denied via ARS */
                    153: GLOBAL long    noaccess_val;   /* Value of parameter not met in ARS */
                    154: GLOBAL int             errorlevel;     /* Error level of external program */

unix.superglobalmegacorp.com

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