home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MNUM416D.SZH / TYPES.H < prev   
Text File  |  1991-03-24  |  25KB  |  629 lines

  1. /*
  2.                           Message Base Renumberer
  3.  
  4.               This module was originally written by Bob Hartman
  5.                        Sysop of FidoNet node 1:132/101
  6.  
  7.    Spark Software, 427-3 Amherst St, CS 2032, Suite 232, Nashua, NH 03061
  8.  
  9.  This program source code is being released with the following provisions:
  10.  
  11.  1.  You are  free to make    changes to this source    code for use on your own
  12.  machine,  however,  altered source files may not be distributed without the
  13.  consent of Spark Software.
  14.  
  15.  2.  You may distribute "patches"  or  "diff" files for any changes that you
  16.  have made, provided that the "patch" or "diff" files are also sent to Spark
  17.  Software for inclusion in future releases of the entire package.    A "diff"
  18.  file for the source archives may also contain a compiled version,    provided
  19.  it is    clearly marked as not  being created  from the original source code.
  20.  No other  executable  versions may be    distributed without  the  consent of
  21.  Spark Software.
  22.  
  23.  3.  You are free to include portions of this source code in any program you
  24.  develop, providing:  a) Credit is given to Spark Software for any code that
  25.  may is used, and  b) The resulting program is free to anyone wanting to use
  26.  it, including commercial and government users.
  27.  
  28.  4.  There is  NO  technical support  available for dealing with this source
  29.  code, or the accompanying executable files.  This source  code  is provided
  30.  as is, with no warranty expressed or implied (I hate legalease).    In other
  31.  words, if you don't know what to do with it,  don't use it,  and if you are
  32.  brave enough to use it, you're on your own.
  33.  
  34.  Spark Software may be contacted by modem at (603) 888-8179 (node 1:132/101)
  35.  on the public FidoNet network, or at the address given above.
  36.  
  37. */
  38.  
  39. /*
  40.    Message header structure.  The message text is
  41.    just a long string after the header.
  42. */
  43.  
  44. struct     _stamp {
  45.       unsigned int date;
  46.       unsigned int time;
  47.     };
  48.  
  49. typedef struct {
  50.     char from[36];    /* who from */
  51.     char to[36];        /* who to */
  52.     char subj[72];    /* message subject */
  53.     char date[20];    /* creation date */
  54.     int times;            /* number of times read */
  55.     int dest;            /* destination node */
  56.     int orig;            /* originating node */
  57.     int cost;            /* actual cost of msg */
  58.     int orig_net;        /* originating net */
  59.     int dest_net;        /* destination net */
  60.      struct _stamp _date_written;  /* When user wrote the msg (GMT)        */
  61.     struct _stamp _date_arrived;  /* When msg arrived on-line (GMT)       */
  62. /*      int caca[4]; obsolete *//* extra space */
  63.     int reply;            /* thread to previous message */
  64.     int attr;            /* message type, below */
  65.     int up;             /* thread to next message */
  66. }
  67. MSG, *MSG_PTR;
  68.  
  69. /*
  70.     CONFIG.DOG structure used by get_sea_config()
  71. */
  72.  
  73. typedef struct {
  74.     int num_addrs;            /* Number of addresses that follow */
  75.     int zone[20];            /* Zone numbers for addresses */
  76.     int net[20];            /* Net numbers */
  77.     int node[20];            /* Node numbers */
  78.     int point[20];            /* Point numbers */
  79.     char mailpath[80];    /* Path to mail directory */
  80.     char filepath[80];    /* Path to attached file directory */
  81.     int baud;                /* Maximum baud rate */
  82.     int comport;            /* Communications port used */
  83. }
  84. SEACONFIG, *SEACONFIG_PTR;
  85.  
  86. /*
  87.     AREAS.BBS in FastEcho format
  88. */
  89. typedef struct {
  90.     char *msg_path;
  91.     char *area_name;
  92.     int num_nodes;
  93.     int *msgs_in_area;
  94.     int *net;
  95.     int *node;
  96.    int *handle;
  97.    char **aname;
  98.    unsigned int flags;
  99. }
  100. AREAS, *AREAS_PTR;
  101.  
  102. /*
  103.    Passworded structure format
  104. */
  105. typedef struct {
  106.    int net;
  107.    int node;
  108.    char *password;
  109. }
  110. PW, *PW_PTR;
  111.  
  112.  
  113. /*
  114.     MAIL.SYS file structure
  115. */
  116.  
  117. typedef struct {
  118.     int node;            /* local node number */
  119.     float fudge;            /* cost fudge factor */
  120.     int rate;            /* baud rate */
  121.     char mailpath[80];        /* path to find mail in */
  122.     char filepath[80];        /* mail file path */
  123.     int net;            /* net number */
  124.     int alt_node;            /* alternate node number */
  125.     int alt_net;            /* alternate net number */
  126. }
  127. MAIL, *MAIL_PTR;
  128.  
  129. /*
  130.     Node descriptor (NODELIST.SYS)
  131. */
  132.  
  133. typedef struct {
  134.     int number;         /* node number */
  135.     int net;            /* net number */
  136.     int cost;            /* cost per minute to call */
  137.     int rate;            /* baud rate */
  138.     char name[20];            /* node name */
  139.     char phone[40];         /* phone number */
  140.     char city[40];            /* city and state */
  141. }
  142. NODE, *NODE_PTR;
  143.  
  144. typedef struct {
  145.     int orig_node;            /* originating node */
  146.     int dest_node;            /* destination node */
  147.     int year,
  148.     month,
  149.     day,
  150.     hour,
  151.     minute,
  152.     second;
  153.     int rate;            /* baud rate */
  154.     int ver;            /* packet version */
  155.     int orig_net;            /* originating net */
  156.     int dest_net;            /* destination net */
  157.      char product;         /* Product code */
  158.     char rev_lev;        /* revision level */
  159.     char password[8];    /* pickup password */
  160.     char extra[20];     /* extra space */
  161.     long pr_data;        /* product dependent data */
  162. }
  163. PKTHDR, *PKTHDR_PTR;
  164.  
  165. typedef struct {
  166.     int ver;
  167.     int orig_node;
  168.     int dest_node;
  169.     int orig_net;
  170.     int dest_net;
  171.     int attr;
  172.     int cost;
  173. }
  174. PACKED, *PACKED_PTR;
  175.  
  176. /*
  177.     User records
  178. */
  179.  
  180. typedef struct {
  181.     char name[36];            /* user name */
  182.     char city[36];            /* city and state */
  183.     struct {            /* This structure holds the last */
  184.     int area;            /* message read counters.  It is */
  185.     int last_read;            /* used in place of the commented */
  186.     }
  187.     msgs_read[10];        /* out 'int date[20];' */
  188.     /*    int date[20];*/         /* initial date */
  189.     char pwd[16];            /* password */
  190.     int times;            /* # times called */
  191.     int help;            /* last help setting */
  192.     int tabs;            /* 1 == expand tabs */
  193.     int nulls;            /* number of nulls */
  194.     int msg;            /* last message area */
  195.     int more;            /* last MORE setting */
  196.     int priv;            /* privilege setting */
  197.     char ldate[20];         /* last time called */
  198.     int time;            /* time on system in 1 day */
  199.     unsigned flag;            /* various bit flags */
  200.     unsigned upld;            /* total K bytes uploaded */
  201.     unsigned dnld;            /* total K bytes downloaded */
  202.     unsigned dnldl;         /* download limiting */
  203.     int files;            /* last file area */
  204.     char width;         /* screen width */
  205.     char len;            /* screen length */
  206.     int credit;         /* credit, in cents */
  207.     int debit;            /* debit, in cents */
  208. }
  209. USR, *USR_PTR;
  210.  
  211. typedef struct {
  212.     int calls;            /* # calls in log */
  213.     char fdate[20];         /* logging started */
  214.     char ldate[20];         /* logging ended */
  215.     int log[7][24];         /* the counters */
  216. }
  217. TLOG, *TLOG_PTR;
  218.  
  219. /*
  220.     Structure for each virtual bulletin board.
  221.     SYSTEM<n>.BBS files
  222. */
  223.  
  224. typedef struct {
  225.     int caller;         /* caller number */
  226.     int priv;            /* min privilege */
  227.     char msgpath[40];        /* path for message base */
  228.     char bbspath[40];        /* path for .BBS files */
  229.     char hlppath[40];        /* path for .HLP files */
  230.     char uppath[40];        /* path for uploads */
  231.     char filepath[40];        /* path for file area */
  232.     int attrib;         /* attributes */
  233. }
  234. SYS, *SYS_PTR;
  235.  
  236. /* Standard time of day structure. */
  237.  
  238. typedef struct {
  239.      int year;
  240.       int month;
  241.       int day;
  242.       int daywk;
  243.      int hour;
  244.       int mins;
  245.       int sec;
  246. /* (daywk == 7 == every day. Month, day, year,
  247. sec not used by sched) */
  248. } TIMESTRCT, *TIMEPTR;
  249.  
  250. /* Scheduler time structure. */
  251.  
  252. typedef struct {
  253.      TIMESTRCT time;
  254.      int len;
  255.      int enable;         /* 1 == enabled -1 ==
  256.                             disabled 0 == deleted */
  257.      int trigger;         /* not used (yet) */
  258.      int result;         /* returned value */
  259.      char tag;             /* schedule tag */
  260.       char extra;             /* spacer */
  261.      int a,b,c,d,e;      /* extra garbage */
  262. } SCHED, *SCHEDPTR;
  263.  
  264. typedef struct {
  265.    char far *wbuff;
  266.    char far *wptr;
  267.    int wsize;
  268. } WBUFFER, *WBUFFPTR;
  269.  
  270. typedef struct {
  271.     long seconds;
  272.     unsigned int from;
  273.     unsigned int to;
  274.     unsigned int subject;
  275. } KILL, *KILLPTR;
  276.  
  277. typedef struct {
  278.    KILLPTR klink;
  279.     int msg_num;
  280.    char deleted;
  281.    char replied;
  282. } KILL2, *KILL2PTR;
  283.  
  284. /* PtMapper structure for holding point names */
  285. typedef struct PTSTRUCT {
  286.    char *pt_name;           /* Who it is */
  287.    int     pt_num;           /* Their point number */
  288.    char  ci;
  289.    char  co;
  290.    char  fi;
  291.    char  fo;
  292.    struct PTSTRUCT *next;  /* The next in this structure */
  293. } PTTYPE;
  294.  
  295. typedef struct {
  296.    char *mtxt;      /* Message text */
  297.    int     txtcnt;  /* Number of characters in text (not null terminated) */
  298. } MDSCR;
  299.  
  300.  
  301. typedef struct _lmr {
  302.    unsigned long user_id;
  303.    unsigned int  high_msg;
  304.    unsigned int  last_msg;
  305. } LMR, *LMRPTR;
  306.  
  307.  
  308. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  309. /*%                                                                       %*/
  310. /*%                     U S E R   D A T A B A S E                          %*/
  311. /*%                                                                       %*/
  312. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  313. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  314. /*                                                                           */
  315. /* The user data base consists of two files: a data file (USER.DAT) and a  */
  316. /* matching index file (USER.IDX).    The data file is a direct access file  */
  317. /* with fixed length, 1 kb records, one for each user.    The index contains */
  318. /* one computed, 4-byte CRC value for each user name.                       */
  319. /*                                                                           */
  320. /* Access to the user database can be done sequentially on the main data   */
  321. /* file or by keyed access by computing the special CRC value of the       */
  322. /* desired user name, looking up that value in the index file, and then    */
  323. /* by seeking the positionally correspondent record in the main file.       */
  324. /*                                                                           */
  325. /* WARNING:                                                                */
  326. /*                                                                           */
  327. /* Any changes made to user names or the number, or order, of user records */
  328. /* will put the index into an unsynchronized state that may result in       */
  329. /* undefined and potentially dangerous problems unless the index is        */
  330. /* updated or rebuilt by the utility.  One way of doing this is to run       */
  331. /* the oIndex program after such changes to properly rebuild the index.    */
  332. /*                                                                           */
  333. /* WARNING:                                                                */
  334. /*                                                                           */
  335. /* Any changes to a user record made by an external utility that is        */
  336. /* operating independently in another partition or work-station while       */
  337. /* that user is online will be overwritten when Opus updates the user       */
  338. /* record with its own working copy of it.                                   */
  339. /*                                                                           */
  340. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  341. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  342.  
  343.  
  344.    #define MAXLREAD 0x100  /* Number of msg area pointers to maintain       */
  345.  
  346. typedef struct {
  347.       char name[36];       /* Caller's first and last names                */
  348.       char city[36];       /* Caller's location                            */
  349.       char pwd[16];        /* Password                                       */
  350.       char usrtel[16];       /* User Tel# for ref or future callback           */
  351.       char alias[32];       /* User alias if ID is not it                   */
  352.       word times;           /* Number of previous calls to this system       */
  353.       byte ClassPriv;       /* User Access Privilege                        */
  354.       byte help;           /* Help level (see below)                       */
  355.       byte tabs;           /* 0=transmit <sp> instead of <tab>               */
  356.       byte language;       /* Lang set no. (1-6) as defined in .PRM file.  */
  357.       word nulls;           /* Number of Nulls (delays) after <cr>           */
  358.       word msg;            /* Last message area accessed                   */
  359.       word Bits;           /* User option flags (See Below)                */
  360.  
  361.       /* Each of the 32 bits within the following 4-byte (long) item       */
  362.       /* represents a single user 'key'.   To have access to any Opus      */
  363.       /* function that has any of 32 'lock' bits set for it, there has to  */
  364.       /* be at least the matching key bits set in this item.  Having other */
  365.       /* key bits sit does not matter.                                       */
  366.       /*                                                                   */
  367.       /* For maintenance and discussion, key and lock bits are referred to */
  368.       /* by the characters A-Z and 0-5 where 'A' is bit 0 (least           */
  369.       /* significant) and '5' refers to bit 31 (most significant).         */
  370.  
  371.       long ClassLock;       /* 32 User 'Keys'                               */
  372.                            /* Each bit of this long object corresponds to  */
  373.                            /* each of 32 possible user 'keys' which are    */
  374.                            /* referred to by the character (A-Z,0-5) where */
  375.                            /* the least significant) bit is called 'A' and */
  376.                            /* the most significant nit is called '5'.      */
  377.  
  378.       long ludate;           /* Date of user's Last Call to system expressed */
  379.                            /* as seconds since 01-Jan-70 in GMT/UTC time.  */
  380.  
  381.       int  time;           /* Time on-line so-far today                    */
  382.  
  383.       word flag;           /* User file management flags (see below)       */
  384.  
  385.       long upld;           /* Total kilobytes uploaded to date.            */
  386.       long dnld;           /* Total kilobytes downloaded to date.           */
  387.       int  dnldl;           /* Total kilobytes downloaded last/current call */
  388.       word files;           /* Last file area accessed                       */
  389.       byte width;           /* Width of the caller's monitor                */
  390.       byte len;            /* Height of the caller's                       */
  391.       word credit;           /* FidoNet usage credit in cents                */
  392.       word debit;           /* FidoNet usage in cents                       */
  393.  
  394.       char spcoec[8];       /* Special OECC to show after logon               */
  395.                            /* Good for clubs, stores, user groups           */
  396.                            /* Eg, "Welcome to the dBase User Group"        */
  397.  
  398.       byte saccnt[5];       /* Array of 5 counters which correspond to the  */
  399.                            /* files SPANN#.BBS which reside on the path    */
  400.                            /* given by 'spcldir' in the .PRM file. If any  */
  401.                            /* is > 0 than the user is shown the matching   */
  402.                            /* announcement and is decremented.    When 0, it */
  403.                            /* is no longer displayed.                       */
  404.  
  405.       byte exflag;           /* Expiration behavior flags (see below)        */
  406.  
  407.       long xdate;           /* Expiry date always rounded to (0000 hrs) and */
  408.                            /* as secs since 01-Jan-70 in *LOCAL* time for  */
  409.                            /* reasons of cross-zone accounting equivelnce. */
  410.  
  411.       long crmin;           /* Total minutes given to user                   */
  412.       long dbmin;           /* Total minutes used  by user                   */
  413.  
  414.       char ulikes[32];       /* Reserved for future feature                   */
  415.       long fudate;           /* First Call Date(secs since 01-Jan-70 UTC/GMT)*/
  416.  
  417.       byte reserved[16];   /* Filler, reserved.                            */
  418.  
  419.       /* The following item contains for each of the 256 possible areas,   */
  420.       /* the last message number that the user read in that area.  A value */
  421.       /* of zero means the area was not accessed by the user yet.           */
  422.  
  423.       word lastmsg[MAXLREAD];
  424.  
  425.  
  426.       long OPUS_id;           /* Opus Record ID ... Must always be 'OPUS'  */
  427.  
  428.  
  429.       /* The next 7 sets of 'id' and 'inf' data are for external utilities */
  430.       /* that have been registered with OpusInfo to use for the storage    */
  431.       /* and independent maintenance of auxiliary information.    The first  */
  432.       /* (long) array of 7 items holds the registered ID's of utilities    */
  433.       /* that make use of the 7 matching 32-byte data blocks that follow.  */
  434.       /*                                                                   */
  435.       /* Any utility may make use of any of the 7 data blocks providing    */
  436.       /* they ensure that the desired blocks are not already used as would */
  437.       /* be indicated by an ID in the matching ID positions.  If free,       */
  438.       /* then the utility claims them by writing its registered ID in the  */
  439.       /* matching ID positions.  It is up to the utility to ensure that    */
  440.       /* enough positions are free in all of the user records that would   */
  441.       /* potentially be accessed by it.                                    */
  442.       /*                                                                   */
  443.       /* Currently registered ID's ........................................*/
  444.       /*                                                                   */
  445.       /* 0x57555646 .. FVIEW ... File viewing utility by Doug Boone        */
  446.       /* 0x4F4D414E .. OMAN  ... Opus system manager by Tom Kashuba        */
  447.  
  448.  
  449.       long extern_id[7];      /* LONG ID number for external programs       */
  450.                               /* Must be registered with OpusInfo           */
  451.  
  452.       byte extern_inf[7][32]; /* 7 32-byte external util data blocks       */
  453.  
  454. } _usr;
  455.  
  456.  
  457. /*-------------------------------------------------------------------------*/
  458. /* 'Bits' -- User Option Flag Meanings                                     */
  459. /*-------------------------------------------------------------------------*/
  460.  
  461.    #define    NO_IBMCHAR    0x0004 /* Cannot receive IBM textmode graphics       */
  462.    #define    USE_LORE    0x0008 /* Wants LORE editor instead of OPed        */
  463.    #define    MORE_PROMPT 0x0010 /* Wants the page break "MORE?" question    */
  464.    #define    ANSI        0x0020 /* Can handle ANSI video                    */
  465.    #define    CONFIG_SET    0x0040 /* OPUS logon questions answered            */
  466.    #define    FORMFEED    0x0080 /* SET=xmit clearscreen, CLEAR=eat formfeed */
  467.    #define    AVATAR        0x0100 /* Can handle AVATAR (aka "oANSI") video    */
  468.  
  469.    #define    USE_PHONE    0x0400 /* User Modem Tel# to Call Back      (future) */
  470.    #define    USE_ALIAS    0x0800 /* Use ALIAS in var user functions (future) */
  471.  
  472.    #define    NO_NAME     0x1000 /* Don't List User's Name in User List      */
  473.    #define    NO_TIME     0x2000 /* Don't List User's Last-On in User List   */
  474.    #define    NO_CITY     0x4000 /* Don't List User's City in User List      */
  475.  
  476.    #define    CURSOR_CONTROL (ANSI|AVATAR)
  477.  
  478.  
  479. /*-------------------------------------------------------------------------*/
  480. /* 'flag' -- User file management flags                                    */
  481. /*                                                                           */
  482. /* These flags are used by the user file manager within oMan to control    */
  483. /* the reuse and deletion of user records.    External utilities may use       */
  484. /* then as long as they folow the conventions established by oMan.           */
  485. /*                                                                           */
  486. /*-------------------------------------------------------------------------*/
  487.  
  488.    #define REUSE       0x0001     /* Re-use rec for next new caller           */
  489.    #define PURGE       0x0002     /* Remove record in next OMAN Pack        */
  490.                                  /* All other bits currently reserved       */
  491.  
  492. /* The following value is used as a mask to cover all of the 8 separate    */
  493. /* bit values in range 0x0100-0x8000.  They each represent a 'group tag'   */
  494. /* as implemented in the Opus user manager, oMan, and are referred to by   */
  495. /* the letters 'A' (0x0100) through 'H' (0x8000).  Group tags are benign   */
  496. /* markers that are for the covenience of user record maintenance and are  */
  497. /* used by the user manager only.                                           */
  498.  
  499.    #define GRPTAGS       0xFF00
  500.  
  501.  
  502. /*-------------------------------------------------------------------------*/
  503. /* 'help' -- User help levels (menu style)                                 */
  504. /*-------------------------------------------------------------------------*/
  505.  
  506.    #define TOTMDL          4      /* Total menu detail levels               */
  507.  
  508. /* #define HITECH       0x00 */     /* 1-line, top-of-screen, bar-style menus */
  509. /* #define EXPERT       0x02 */     /* No text at all, just a prompt           */
  510. /* #define REGULAR       0x04 */     /* Lists menu option letters only.        */
  511. /* #define NOVICE       0x06 */     /* Full menu command titles listed.       */
  512.  
  513. /* #define USING_FTB   0xFF */     /* Old mode.  Not supported in 1.10.       */
  514.  
  515.  
  516. /*-------------------------------------------------------------------------*/
  517. /*    'exflag' -- Flags dealing with user expiration control                 */
  518. /*-------------------------------------------------------------------------*/
  519. /* These definitions are the bit values of the 'exflag' flags item which   */
  520. /* determine the type and handling of user expiration.    The values of       */
  521. /* ExpByDate and ExpByDate set the type of expiration, if any.    The values */
  522. /* of ExpDemote and ExpAxe determine how to handle expired users.           */
  523. /*-------------------------------------------------------------------------*/
  524.  
  525.    #define EXPBYDATE   0x01  /* Expire user by date.  That is, consider    */
  526.                              /* them as expired when they log on AFTER the */
  527.                              /* date stored in 'xdate'.                    */
  528.  
  529.    #define EXPBYMINS   0x02  /* Expire user by minutes of usage.  That is, */
  530.                              /* consider them as expired when the minutes  */
  531.                              /* they have used thus far (crmin) exceeds    */
  532.                              /* the minutes they were alotted (dbmin).       */
  533.  
  534.    #define EXPDEMOTE   0x10  /* If user is expired, reduce their privilege */
  535.                              /* to TWIT or, if set, to the demote value    */
  536.                              /* set in the PRM file.                       */
  537.  
  538.    #define EXPAXE       0x20  /* If user is expired, disconnect them.       */
  539.  
  540. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  541.  
  542. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  543. /*%                                                                       %*/
  544. /*%                                                                       %*/
  545. /*%               S Y S T E M    F I L E   S T R U C T U R E               %*/
  546. /*%                                                                       %*/
  547. /*%                                                                       %*/
  548. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  549. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  550. /*                                                                           */
  551. /* Opus uses a single file called a System File to define each of up to    */
  552. /* 256 separate system areas numbered 0-255 and use the file name format   */
  553. /* of "SYSTEM##.DAT" where the '##' is the hexadecimal value of the system */
  554. /* number.    Please note that although the Opus user and sysop interfaces   */
  555. /* refer to system areas in decimal notation, the file names use hex.       */
  556. /*                                                                           */
  557. /* Although each system area file defines both message and file areas of   */
  558. /* the same number, those two systems are almost fully independent.        */
  559. /*                                                                           */
  560. /* For a related discussion on the meaning and use of 'locks' and 'keys'   */
  561. /* see the comments for ClassLock in the user record.                       */
  562. /*                                                                           */
  563. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  564.  
  565. typedef struct     {
  566.       /*........ (mostly) Common System Data ..............................*/
  567.  
  568.       word version;           /* System Record version = 110 = v1.10       */
  569.       word menu;              /* Alternate Menu file extension, 0=MNU       */
  570.       word attrib;              /* Area attributes (see below)               */
  571.       byte fillc1[10];          /* Reserved filler                           */
  572.       byte barrpath[ 40 ];      /* Barricade File path.                       */
  573.       byte fillc2[24];          /* Reserved filler                           */
  574.  
  575.       /*........ File System Information ..................................*/
  576.  
  577.       byte filtitle[ 50 ];      /* File Area Title                           */
  578.       byte filepath[ 40 ];      /* Path to the file download directory       */
  579.       byte uppath[     40 ];      /* Path to the file upload directory           */
  580.       byte listpath[ 40 ];      /* Path to FILES.BBS equivalent               */
  581.       byte fillf1[22];          /* Reserved filler                           */
  582.  
  583.       byte FilePriv;          /* Min priv for file area                    */
  584.       byte DownPriv;          /* If not 0, min priv to download            */
  585.       byte UpPriv;              /* If not 0, min priv to upload               */
  586.       byte FileExtPriv;       /* If not 0, min priv to go Outside           */
  587.       byte fillf2[12];          /* Reserved filler                           */
  588.  
  589.       long FileLock;          /* Locks for File Area                       */
  590.       long DownLock;          /* If not 0, keys needed to download           */
  591.       long UpLock;              /* If not 0, keys needed to upload           */
  592.       long FileExtLock;       /* If not 0, keys needed to go Outside       */
  593.       byte fillf3[32];          /* Reserved filler                           */
  594.  
  595.       /*........ Message System Information ...............................*/
  596.  
  597.       byte msgtitle[ 50 ];      /* Msg  Area Title                           */
  598.       byte msgpath[  40 ];      /* Path to messages                           */
  599.       byte fillm1[ 22 ];      /* Reserved filler                           */
  600.  
  601.       byte MsgPriv;           /* Min priv for msg area                       */
  602.       byte EditPriv;          /* If not 0, min priv to Enter or Reply       */
  603.       byte MsgExtPriv;          /* If not 0, min priv to go Outside           */
  604.       byte fillm2[13];          /* Reserved filler                           */
  605.  
  606.       long MsgLock;           /* Locks for Msg Area                        */
  607.       long EditLock;          /* If not 0, keys needed to Enter or Reply   */
  608.       long MsgExtLock;          /* If not 0, keys needed to go Outside       */
  609.       byte fillm3[4];          /* Reserved filler                           */
  610.       byte EchoName[32];      /* Echo Area 'Tag' Name                      */
  611.  
  612.       /*=================================== Total Record Size    = 512 =====*/
  613. } _sys;
  614.  
  615.  
  616. /*-------------------------------------------------------------------------*/
  617. /*    'attrib' -- Area attributes (limit or describe area's behavior)        */
  618. /*-------------------------------------------------------------------------*/
  619.  
  620. /* #define    SYSMAIL   0x01 */    /* OPUS: Netmail Area                            */
  621. #define  NOPUBLIC  0x04    /* OPUS: Disallow Public messages               */
  622. #define  NOPRIVATE 0x08    /* OPUS: Disallow Private messages               */
  623. #define  ANON_OK   0x10    /* OPUS: Allow Anonymous messages               */
  624. #define  ECHOMAIL  0x20    /* OPUS: EchoMail Area                           */
  625.  
  626.  
  627.  
  628. /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
  629.