home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / bbs / fil_lis / turbo.h < prev   
Text File  |  1992-02-19  |  14KB  |  364 lines

  1. /* ///Turbo Board ST Version 2.1.X - Main Structures - By Bill Miller  */
  2.  
  3. /*    Copyright 1990-1991 by Bitblit Systems  */
  4.  
  5. /* This information may only be used by people who wish to create an online
  6.    program for Turbo Board Version 2.  It may NOT be used for any other
  7.    purpose, OR by anyone programming a competitive BBS program, without the 
  8.    express written consent of Bitblit Systems.    */
  9.  
  10. /*  Any inquiries may be sent to:
  11.  
  12.     Bitblit Systems
  13.     1580 Liveoak Dr
  14.     Mississauga ON
  15.     Canada L5E 2X6
  16. */
  17.  
  18. #define MAXPW  2000  /* size of pw file */
  19. #define MAXMESS 500  /* size of message bases */
  20. #define MAXLINES 20  /* max lines in message */
  21. #define MAXSIG 16    /* max SIG's */
  22. #define MAXBASE 16   /* max bases under 1 SIG */
  23.  
  24.  
  25. /* MENU.DAT file structure */
  26. typedef struct {
  27.   char ID;        /* menu ID number, 0=main menu */
  28.   char smid;      /* if type # then smid = next sub menu ID 
  29.                   if type % then smid = previous menu ID*/
  30.   int access;     /* access for any entry */
  31.   int attrib;     /* flags: check contime, write user dat files */
  32.   char type;      /* entry type "!@#$%^" or main menu function letter */
  33.   char key;       /* actual ascii code used to execute, case ignored*/
  34.   char pars[41];  /* any parameters used for some types */
  35. } MENTRY;
  36. /* 
  37. valid type's:
  38.   ! = executable
  39.   @ = type text file
  40.   # = sub-menu
  41.   $ = macro  
  42.   % = previous menu
  43.   ^ = main menu
  44.  
  45. attrib:
  46.   bit0 = write TURBO/FOREM.DAT & DORINFO1.DEF files if executable type (!)
  47.   bit1 = use contime.dat doors access level for any entry (column 3)
  48. */
  49.  
  50. /*  CONFIG.DAT system configuration file */
  51. typedef struct {
  52.    long callno;         /* caller number */
  53.    char nbbs;           /* number of message bases */
  54.    long nmess;          /* total messages in system */
  55.    char ndrives;        /* number of drives online */
  56.    char ndirect;        /* number of download directories */
  57.    char subdir [20][9]; /* names of download directories */
  58.    int pwnum;           /* size of password file */
  59.    int mconf[65];       /* current number of messages allowed in each base */
  60.    int cmess[65];       /* next message number  in each base */
  61.    int nconf[65];       /* max number of messages in each base */
  62.    int hmess[65];       /* high message on message base */
  63.    char conf[65][41];   /* names of message bases */
  64.    char textcolor;
  65.    char backcolor;
  66.    char drvlist[9];     /* drive search order (not used, see TURBO.OPT)*/
  67.    char defdir[37];     /* default directory (not used, see TURBO.OPT)*/
  68.    long flags;          /* various system flags (saved command options) */
  69.                         /* Bit:
  70.                                   0 = monthly.bat flag
  71.                                   1 = chat mode on/off
  72.                                   2 = log to disk on/off
  73.                                   3 = guest allowed
  74.                                   4 = accounting on/off
  75.                                   5 = new user account number
  76.                                   6 = Executive V3.0 memory save flag
  77.                                   7 = color monitor
  78.                                   8 = survey at new user logon
  79.                                   9 = email deleted after each user
  80.                                  10 = message to sysop as Email
  81.                                  11 = Uploads to sysop only
  82.                                  12 = Logon bulletins on/off
  83.                                  13 = Credit for upload time
  84.                                  14-31 spare
  85.       */     
  86.  
  87.   int counters[10];     /* various system counters */
  88.                         /*  0 = UL/DL ratio
  89.                             1 = user timeout in 1/60 seconds 
  90.                             2 = Fmail auto delete in days
  91.                             3 = FNET default message base 
  92.                             4 = Safs in from mailer  */
  93.   long fnum;            /* number of next download file */
  94.   char expandc[6];
  95. }CONFIG;
  96.  
  97.  
  98. /* SIGS.DAT header structure */
  99. typedef struct{
  100.   int maxsig;                   /* curently 16 SIG's max */
  101.   int maxbase;                  /* curently 16 bases/SIG */
  102.   int signum;                   /* number of SIG's  16 max */
  103.   int siglevel[MAXSIG];         /* SIG access level */
  104.   char Bmap[MAXSIG][MAXBASE];   /* Bmap[SIG][MAXBASE] = Real Base number */
  105.   char bflg[65];                /* Base flags indexed from 1*/
  106.   char order[64];               /* order of bases if NO sigs (signum = 0) */
  107.   char *signame[MAXSIG];        /* Name of SIG */
  108.   char *sigdesc[MAXSIG];        /* Description of SIG */
  109.   char *basedesc[64];           /* Message base description */
  110. }SIGHDR; 
  111.  
  112. /* bflg:  bit0 = handles only
  113.           bit1 = default to handle, user can toggle with /mf
  114.           bit2 = default to real, user can toggle
  115.           bit3 = don't delete conf mail
  116.           if bit0,1 & 2 are OFF then real name only
  117. */
  118.    
  119.  
  120. /* Validation mask  MASK.DAT */
  121. typedef struct {
  122.   int  vaccess;
  123.   long vpriv;
  124.   long vrbase1,vrbase2;
  125.   long vebase1,vebase2;
  126.   long vfunct;
  127.   long vusr;
  128.   int vdtime,vclimit,vdcalls,vtilim,vctlim,vulim,vdlim;
  129.   int vdbulim,vdbdlim,vmailim,vmeslim;
  130.   int vdbaccess;
  131.   long vfbase;
  132.   int varclim;
  133.   int vfnetlim;
  134.   int vfnet_level;
  135.   int vuldl, vkuldl;        /* upload/download ratios */
  136.   long vxpriv;              /* extended privileges */
  137.   long vconful1,vconful2;   /* bit map of allowed confmail uploads */
  138.   long vconfdl1, vconfdl2;  /* bit map of allowed confmail downloads */
  139.   long vsysfnk;             /* bit map of allowed Sysop functions */
  140.   int vfedit;               /* bit map of allowed File edit functions */
  141.  
  142. /* only thing for 2.1 */  
  143.   int vthreshold;           /* Kbytes user can go over the kuldl ratio*/
  144.   char extend[104];
  145. }VMASK;
  146.  
  147.  
  148. /* User password file entry   TPAS.DAT  */
  149. typedef struct {
  150.   int  rec;                 /* record number in pas.dat */
  151.   char id[13];              /* password */
  152.   char name[31];            /* real name */
  153.   char phone[13];           /* phone number */
  154.   int  age;                 /* age, auto updated */
  155.   char lfeed;               /* line feeds on/off */
  156.   int  cls;                 /* computer type */
  157.   int  calls;               /* number of calls */
  158.   char last[3];             /* last call date */
  159.   char first[3];            /* first call date */
  160.   int  dl;                  /* number of downloads */
  161.   int  up;                  /* uploads */
  162.   int  mess;                /* messages sent */
  163.   int  dbase;               /* data base files read */
  164.   int  ubase;               /* data base files uploaded */
  165.   int  mail;                /* Email messages sent */
  166.   int  access;              /* access level for download and doors */
  167.   int  dbaccess;            /* data base access level */
  168.   long priv;                /* privilege bitmap */
  169.   long rbase1,rbase2;       /* read message bases bitmap*/
  170.   long ebase1,ebase2;       /* enter message bases bitmap */
  171.   long funct;               /* commands bitmap */
  172.   long usr;                 /* usr functions bitmap */
  173.   int  dtime;               /* daily time limit */
  174.   int  climit;              /* daily call limit */
  175.   int  dcalls;              /* daily calls remaining */
  176.   int  tilim;               /* daily time limit */
  177.   int  ctlim;               /* call time limit */
  178.   int  ulim;                /* upload limit */
  179.   int  dlim;                /* download limit */
  180.   int  dbulim;              /* database upload limit */
  181.   int  dbdlim;              /* database read limit */
  182.   int  mailim;              /* Email limit */
  183.   int  meslim;              /* enter message limit */
  184.   char accnum[10];          /* account number */
  185.   int  himess[65];          /* high message read counters */
  186.   int  moncon;              /* month connect time */
  187.   int  dai_up;              /* daily counters */
  188.   int  dai_dn;
  189.   int  dai_mes;
  190.   int  dai_mai;
  191.   int  dai_dbu;
  192.   int  dai_dbd;
  193.   int msg_delay;            /* continuous scroll delay time */
  194.   long fbase;               /* bitmap of allowed dl directories */
  195.   long ufbase;              /* user set bitmap of Scan ALL directories */
  196.   long urbase1,urbase2;     /* user set bitmap of READ ALL NEW messages bases */
  197.   unsigned char arclim;     /* arcdl lim */
  198.   char street[41];          /* rest of the address */
  199.   char city[21];
  200.   char state[3];
  201.   char zip[11];
  202.   unsigned char fnetlim;    
  203.   unsigned char dai_fnet;   
  204.   unsigned char fnet_level;
  205.   char last_file[3];
  206.   unsigned char lines;
  207.   unsigned char uldl;
  208.  
  209. /****** Extended user record (not in version 1.0) ******/
  210.   char alias[31];           /* user alias */
  211.   char birth[3];            /* birth date MDY */
  212.   char kuldl;               /* Kilobyte upload/download ratio */
  213.   char mask;                /* mask number 0 -> 99 (255 = not set)*/
  214.   int batpend;              /* number of pending batch uploaded files */
  215.   unsigned long bytesup;    /* bytes uploaded */
  216.   unsigned long bytesdl;    /* bytes downloaded */
  217.   long xpriv;               /* extended privileges */
  218.   long conful1,conful2;     /* bit map of allowed confmail uploads */
  219.   long confdl1, confdl2;    /* bit map of allowed confmail downloads */
  220.   long sysfnk;              /* bit map of allowed Sysop functions */
  221.   int fedit;                /* bit map of allowed File edit functions */
  222. /* 2.1.x addons */  
  223.   int threshold;          /* Kbytes user can go over the kuldl ratio*/
  224.   char emulation;         /* term emulation (0=VT52, 1=VT100) screen ed*/
  225.   char Qctype;            /* Qmail packet compression type A,L or Z*/
  226.   int  Qnmes;             /* Max Qmail messages/base */
  227.   int  Qtmes;             /* Max messages/Qmail packet */
  228.   int  Qflg;              /* assorted user Qmail flags, bit16 = REP process*/
  229.   char extend[32];
  230. }PWORD;
  231.  
  232. /*Qflg bits:
  233.    bit 0 = include confmail
  234.    bit 1 = prompt on confmail
  235.    bit 2 = include newest to oldest
  236.    bit 3 = use read all flags
  237.    bit 4 = include new files list
  238.    bit 5 = long files list
  239.    bit 6 = include messages from user
  240.    bit 15= internal REP process flag
  241. */
  242.  
  243.  
  244. /* TPAS.IDX  Structure */
  245. typedef struct {
  246.    int ptail;
  247.    int pentry[MAXPW+1];
  248. }PSTACK;
  249.  
  250.  
  251. /* MESAGEnn.IDX Structure */
  252. typedef struct {
  253.    int mtail;
  254.    int mentry[MAXMESS+1];
  255. }MSTACK;
  256.  
  257.  
  258. /* MESAGEnn.ISM Structure */
  259. typedef struct {
  260.    int  irec;                 /*record number in data file*/
  261.    int  inum;                 /*message number*/
  262.    int  ilevel;               /*user level if sysusr message*/
  263.    char ifrom[31];            /*from users name*/
  264.    char itcl[31];             /*to users name*/
  265.    char istat;                /*message status*/
  266.    int irepnum;               /*message that this message is a reply to*/
  267.    int inode;                 /* destination node */
  268.    unsigned int ird_cnt;      /*times this message has been read*/
  269. }MINDEX;
  270.  
  271.  
  272. /* MESAGEnn.DAT Structure */
  273. typedef struct {
  274.    int num;
  275.    int node;                  /* destination node */
  276.    int level;
  277.    char tcl[31];
  278.    char from[31];
  279.    char date[3];
  280.    char time[10];
  281.    char recv[3];
  282.    char status;
  283.    char subject[81];
  284.    unsigned  char count;
  285.    char lines[MAXLINES] [76];
  286.    int repnum;
  287.    int onode;                 /* originating node */
  288.    char tnode[31];            /* name of originating node */
  289. }MDAT;   
  290.  
  291. /*message status codes:
  292.    bit 0 = 1-locked 0-unlocked
  293.    bit 1 = 1-from anonymous
  294.    bit 2 = 1-to anonymous
  295.    bit 3 = 1-sysusr message
  296.    bit 4 = 1-system message
  297.    bit 5 = 1-received
  298.    bit 6 = 1-Fmail/Conf Mail
  299.    bit 7 = 1-extended message
  300. */
  301.  
  302.  
  303. /*  *.TDB file structure */
  304. typedef struct{
  305.   char  fname[13];    /* filename */
  306.   char  uploader[31]; /* uploader name */
  307.   char  desc[61];     /* description */
  308.   char  date[3];      /* upload date */
  309.   int access;         /* access level */
  310.   int ID;             /* menu identification number*/
  311.   int attrib;         /* record attribute bits */
  312.   long  length;       /* file length */
  313. }TDB;
  314.  
  315. /* attrib bits:  
  316.   bit 1 = off-line
  317.   bit 2 = free DL
  318.   bit 3 = deleted
  319.   bit 4 = sub-menu
  320.   bit 5 = (sub-menu) list fname instead of menu
  321.   bit 6 = (sub-menu) show fname before listing menu entries
  322.   bit 7 = (sub-menu) show fname only on entry to sub-menu
  323. */
  324.  
  325.  
  326. /* *.FIL file directory structure */
  327. typedef struct {
  328.   char fname[13];     /* filename */
  329.   char fdate[3];      /* date mm/dd/yy */
  330.   long flength;       /* length */
  331.   char flang[8];      /* whatever... */
  332.   int flags;          /* 16 assorted bit flags:
  333.                           bit 1 = archived (off-line file)
  334.                           bit 2 = free download 
  335.                           bit 3 = deleted flag */
  336.   char  rating;       /* uploader file rating 1 - 100 */
  337.   char fdesc[5][80];  /* description */
  338.   char fapp;          /* application */
  339.   char fascii;        /* ascii/binary flag */
  340.   int  flevel;        /* access lavel */
  341.   long frd_cnt;       /* download count */
  342.   long fnum;          /* file number */
  343.   char fuser[31];     /* uploader */
  344.   char lread[3];      /* last download date*/
  345. }TFILE;
  346.  
  347.  
  348. /* HELP.IDX  file structure */
  349. typedef struct {
  350.    char topic[61];
  351.    long loc;
  352. }HIDX;
  353.  
  354.  
  355. /* FNETMAIL.DAT file structure */
  356. typedef struct {
  357.   int  base;    /* message base the message is in */
  358.   int  pos;     /* record number in message base */
  359.   int  dest;    /* destination node number */
  360.   int  save;    /* 1 if message is not to be deleted */
  361. }FNETMAIL;
  362.  
  363.  
  364.