home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MAXMAILP.ZIP / PRM.H < prev    next >
C/C++ Source or Header  |  1990-10-12  |  17KB  |  356 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *  MAXIMUS-CBCS Source Code, Version 1.02                                 *
  4.  *  Copyright 1989, 1990 by Scott J. Dudley.  All rights reserved.         *
  5.  *                                                                         *
  6.  *  .PRM file structure and definitions                                    *
  7.  *                                                                         *
  8.  *  For complete details of the licensing restrictions, please refer to    *
  9.  *  the licence agreement, which is published in its entirety in MAX.C     *
  10.  *  and LICENCE.MAX.                                                       *
  11.  *                                                                         *
  12.  *  USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE       *
  13.  *  MAXIMUS-CBCS LICENSING AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF THIS *
  14.  *  AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES, OR IF YOU DO NOT HAVE   *
  15.  *  THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHOR AT ONE OF THE   *
  16.  *  ADDRESSES LISTED BELOW.  IN NO EVENT SHOULD YOU PROCEED TO USE THIS    *
  17.  *  FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE MAXIMUS-CBCS LICENSING   *
  18.  *  AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE ABLE TO REACH WITH THE   *
  19.  *  AUTHOR.                                                                *
  20.  *                                                                         *
  21.  *  You can contact the author at one of the address listed below:         *
  22.  *                                                                         *
  23.  *  Scott Dudley           FidoNet  1:249/106                              *
  24.  *  777 Downing St.        IMEXnet  89:483/202                             *
  25.  *  Kingston, Ont.         Internet f106.n249.z1.fidonet.org               *
  26.  *  Canada - K7M 5N3       BBS      (613) 389-8315 - HST/14.4K, 24hrs      *
  27.  *                                                                         *
  28.  ***************************************************************************/
  29.  
  30. #ifdef WSETUP
  31.     #define OFS char *
  32. #else
  33.     #define OFS int
  34. #endif
  35.  
  36. #define MAX_DRIVES         26   /* Maximum number of drives on system      */
  37. #define CHAR_BITS           8   /* Number of bits in a 'char'              */
  38. #define CTL_VER             9   /* Version number of BBS.PRM               */
  39.  
  40. /* This macro is ONLY used for accessing *pointers* in the `prm' structure.
  41.    This is required, due to the way Wynn has made OPUS_CTL write the strings
  42.    out (which uses a lot less memory than some other ways).  If you want
  43.    to access an INT, or a non-pointer in the structure, then you can use
  44.    a `prm.var_name'-style reference.                                       */
  45.  
  46. #define PRM(s) (offsets+prm.s)
  47.  
  48. #define MAX_YELL          10       /* Max number of yell slots             */
  49. #define MAX_EXTERNP       16       /* max. number of external programs     */
  50. #define MAXCLASS          12       /* number of possible priv levels       */
  51. #define ALIAS_CNT         15       /* number of matrix addresses           */
  52.  
  53.  
  54.           /** Definitions for the `prm.flags' variable **/
  55.  
  56. #define FLAG_keyboard    0x0001 /* If local mode is on by default          */
  57. #define FLAG_watchdog    0x0002 /* Use watchdog for outside commands       */
  58. #define FLAG_snoop       0x0004 /* If snoop is on by default               */
  59. #define FLAG_norname     0x0008 /* If we should disable ^aREALNAME kludge  */
  60. #define FLAG_close_sf    0x0010 /* Close all standard files for O)utside   */
  61. #define FLAG_break_clr   0x0020 /* Send a break signal to dump modem's     *
  62.                                  * internal buffer                         */
  63. #define FLAG_log_echo    0x0040 /* Log user-written echomail               */
  64. #define FLAG_no_ulist    0x0080 /* User can't press '?' to list users in   *
  65.                                  * msg.                                    */
  66. #define FLAG_no_magnet   0x0100 /* Disable the MagnEt editor               */
  67. #define FLAG_autodate    0x0200 /* Automatically search directory for      */
  68.                                 /* file size & date.                       */
  69. #define FLAG_statusline  0x0400 /* If SysOp wants a status line on screen  */
  70. #define FLAG_ask_phone   0x0800 /* If we should ask user for phone number  */
  71. #define FLAG_noyell      0x1000 /* If yell is toggled on or off by Sysop   */
  72. #define FLAG_lbaud96     0x2000 /* If we should use 9600 baud for local    *
  73.                                  * callers... (For Opus compatibility!)    */
  74. #define FLAG_alias       0x4000 /* If we're running a system which allows  *
  75.                                  * aliases or handles                      */
  76. #define FLAG_ask_name    0x8000 /* If we should ask user for their REAL    *
  77.                                  * name too -- Only needed if using        *
  78.                                  * FLAG_alias.                             */
  79.  
  80. #define FLAG2_gate       0x0001 /* Gate netmail messages, use zonegate!    */
  81. #define FLAG2_has_snow   0x0002 /* Video adapter is slow CGA w/snow        */
  82. #define FLAG2_msgread    0x0004 /* If arrow keys can be used for reading   */
  83. #define FLAG2_ltimeout   0x0008 /* Local keyboard timeout                  */
  84. #define FLAG2_noshare    0x0010 /* SHARE not used -- don't lock files!     */
  85.  
  86. #define LOG_terse       0x02
  87. #define LOG_verbose     0x04
  88. #define LOG_trace       0x06
  89.  
  90. #define MULTITASKER_none        0
  91. #define MULTITASKER_doubledos   1
  92. #define MULTITASKER_desqview    2
  93. #define MULTITASKER_topview     3
  94. #define MULTITASKER_taskview    4
  95. #define MULTITASKER_mswindows   5
  96. #define MULTITASKER_os2         6
  97. #define MULTITASKER_pcmos       7
  98.  
  99.  
  100. #define XTERNEXIT       0x40      /* If external protocl has erlvl exit */
  101. #define XTERNBATCH      0x80      /* If protocol can do batch transfers */
  102.  
  103.  
  104. /* Structure for the YELL pseudo-event */
  105.  
  106. struct _yell
  107. {
  108.   unsigned char weekday,
  109.                 start_hour,
  110.                 end_hour,
  111.                 start_min,
  112.                 end_min,
  113.                 bells;
  114. };
  115.  
  116.  
  117.  
  118. struct   cl_rec
  119. {
  120.   int      priv;
  121.   int      max_time;      /* max cume time per day         */
  122.   int      max_call;      /* max time for one call         */
  123.   int      max_dl;        /* max dl bytes per day          */
  124.   unsigned ratio;         /* ul:dl ratio                   */
  125.   unsigned min_baud;      /* speed needed for logon        */
  126.   unsigned min_file_baud; /* speed needed for file xfer    */
  127. };
  128.  
  129. struct m_pointers
  130. {
  131.  
  132.         /*-----------------------------------------------------------*/
  133.         /* DATA                                                      */
  134.         /*-----------------------------------------------------------*/
  135.  
  136.   byte  id;             /* Always equal to 'M'               STABLE  */
  137.   byte  version;        /* for safety                        STABLE  */
  138.   word  heap_offset;    /* OFFSET OF BEGINNING OF HEAP!      STABLE  */
  139.   byte  task_num;       /* for multi-tasking systems         STABLE  */
  140.   int   com_port;       /* Com1=0, Com2=1, etc               STABLE  */
  141.   byte  noise_ok;       /* If yell noise is currently on     STABLE  */
  142.  
  143.   /* Miscellanious system information */
  144.  
  145.   byte  video;          /* Mode for local video display              */
  146.   byte  log_mode;       /* What style of logging to use              */
  147.   unsigned max_baud;    /* fastest speed we can use                  */
  148.   byte  multitasker;    /* flag for DoubleDos (see below)            */
  149.   byte  nlver;          /* Which nodelist version we use (5 or 6)    */
  150.   word  min_ulist;      /* Min and max privs for the U)serlist cmd   */
  151.   word  max_ulist;      /*    "                                      */
  152.  
  153.   /* Information about errorlevels */
  154.  
  155.   byte  exit_val;       /* Erl to use after caller if none of below  */
  156.   byte  edit_exit;      /* erl to use after matrix mail written      */
  157.   byte  echo_exit;      /* ERRORLEVEL for after inbound echomail     */
  158.   byte  local_exit;     /* Errorlevel after entering local msgs      */
  159.  
  160.   /* Modem information */
  161.  
  162.   int   carrier_mask;
  163.   int   handshake_mask;
  164.  
  165.   /* Log-on information */
  166.  
  167.   int   logon_priv;     /* Access level for new users                */
  168.   word  logon_time;     /* time to give for logons                   */
  169.   unsigned min_baud;    /* minimum baud to get on-line               */
  170.   unsigned speed_graphics; /* min baud for graphics                  */
  171.  
  172.   /* Information about message areas */
  173.  
  174.   byte  auto_kill;      /* RECD PVT msgs. 0=no 1=ask 2=yes           */
  175.  
  176.   int   ctla_priv;      /* Priv to see CONTROL-A lines in messages   */
  177.   int   seenby_priv;    /* Min priv to see SEEN-BY line              */
  178.   int   pvt_priv;       /* Min priv to read pvt msgs                 */
  179.  
  180.   int   msg_ask[16];    /* Array of privs. for message attr ask's    */
  181.   int   msg_assume[16]; /* Array of privs. for message attr assume's */
  182.   int   msg_fromfile;   /* Priv. for doing message from file         */
  183.   int   high_msgarea;   /* Highest msg.area to check with S)can etc  */
  184.   int   begin_msgarea;  /* Msg area to put new users in              */
  185.  
  186.   int   unlisted_priv;   /* Priv needed to send to unlisted node */
  187.   int   unlisted_cost;   /* Charge to send to unlisted node */
  188.  
  189.   int   mc_reply_priv;   /* Priv to reply to msg with mailchecker */
  190.   int   mc_kill_priv;    /* Priv to kill msg with mailchecker */
  191.  
  192.  
  193.   /* Information about file areas */
  194.  
  195.   int   date_style;     /* Used for FILES.BBS display                */
  196.   int   dlall_priv;     /* Priv. needed to DL file not in FILES.BBS  */
  197.   int   ulbbs_priv;     /* Priv. needed to UL *.BBS files            */
  198.   dword k_free;         /* The number of disk space (in K) which     *
  199.                          * must be available before we let a user    *
  200.                          * upload.                                   */
  201.   word  ul_reward;      /* Percentage reward for uploads             */
  202.   word  ratio_threshold;/* K which can DL before harass about ratio  */
  203.   int   high_filearea;  /* Highest area to check with L)ocate        */
  204.   int   begin_filearea; /* File area to put new users in             */
  205.  
  206.   /* Our matrix address(es) */
  207.  
  208.   ADDR address[ALIAS_CNT];
  209.  
  210.   /* Yell pesudo-events... */
  211.  
  212.   struct _yell yell[MAX_YELL];
  213.  
  214.   /* About the users */
  215.  
  216.   struct cl_rec class[MAXCLASS];
  217.  
  218.   /* Flags for external protocols */
  219.  
  220.   int   protoexit;              /* Errorlevel for protocol exit      */
  221.   char  protoflag[MAX_EXTERNP]; 
  222.  
  223.   /* General-purpose bit-flags  (See above FLAGx_xxx definitions above.) */
  224.  
  225.   word  flags;
  226.   word  flags2;
  227.   word  flags3;
  228.   word  flags4;
  229.  
  230.   /* Bit field containing drive letters to save when going outside */
  231.   char  drives_to_save[(MAX_DRIVES/CHAR_BITS)+1];
  232.  
  233.   byte  rsvd1[32];       /* Reserved by Maximus for future use */
  234.  
  235.  
  236.  
  237.   /* --------------------------------------------------------------- */
  238.   /* -------------------------- OFFSETS ---------------------------- */
  239.   /* --------------------------------------------------------------- */
  240.  
  241.   /* About your system */
  242.  
  243.   OFS   sysop;          /* sysop's name. MUST be first offset in prm file */
  244.   OFS   system_name;    /* board's name                              */
  245.  
  246.   /* Modem commands */
  247.  
  248.   OFS   m_busy;         /* mdm cmd to take modem off hook            */
  249.  
  250.   /* Paths to various places */
  251.  
  252.   OFS   sys_path;       /* path to SYSTEM?.BBS files                 */
  253.   OFS   misc_path;      /* path to `F-key files'                     */
  254.   OFS   net_info;       /* path to NODELIST files                    */
  255.   OFS   temppath;       /* place to put temporary files              */
  256.   OFS   ipc_path;       /* path for inter-process communications     */
  257.  
  258.   /* General files needed by the system */
  259.  
  260.   OFS   user_file;      /* path/filename of User.Bbs                 */
  261.   OFS   log_name;       /* name of the log file                      */
  262.   OFS   chat_prog;      /* External chat program, if any             */
  263.   OFS   chat_begin;     /* File to display instead of "CHAT: begin"  */
  264.   OFS   chat_end;       /* File to display instead of "END CHAT"     */
  265.   OFS   local_editor;   /* Command for local editor, if any          */
  266.   OFS   notfound;       /* User name not found in user file          */
  267.   OFS   junk;           /* Don't use this for anything!              */
  268.  
  269.   /* General *.?BS files needed everywhere */
  270.  
  271.   OFS   logo;           /* first file shown to a caller              */
  272.   OFS   bad_logon;      /* if user's last logon attempt was bad      */
  273.   OFS   welcome;        /* shown after logon                         */
  274.   OFS   quote;          /* For displaying "random" quotes from       */
  275.   OFS   newuser1;       /* Asks user to type in password             */
  276.   OFS   newuser2;       /* Replaces `welcome' for a new user         */
  277.   OFS   rookie;         /* Replaces `welcome' for rookies            */
  278.   OFS   application;    /* new user questionnaire                    */
  279.   OFS   byebye;         /* file displayed at logoff                  */
  280.   OFS   out_leaving;    /* Bon Voyage                                */
  281.   OFS   out_return;     /* Welcome back from O)utside                */
  282.   OFS   daylimit;       /* Sorry, you've been on too long...         */
  283.   OFS   timewarn;       /* warning about forced hangup               */
  284.   OFS   tooslow;        /* explains minimum logon baud rate          */
  285.   OFS   barricade;      /* Displayed before prompt for access code   */
  286.   OFS   shelltodos;     /* Displayed when Sysop hits Alt-J           */
  287.   OFS   backfromdos;    /* Displayed when Sysop returns from Alt-J   */
  288.   OFS   areanotexist;   /* File to display instead of "That area     *
  289.                          * doesn't exist!"                           */
  290.  
  291.   /* File-area items */
  292.  
  293.   OFS   rsvd3;          /* Reserved                                  */
  294.   OFS   xferbaud;       /* explains minimum file transfer baud rate  */
  295.   OFS   file_area_list; /* dump file... used instead of Dir.Bbs      */
  296.   OFS   no_space;       /* File to display if trying to UL with      *
  297.                          * less than k_free space left on drive.     */
  298.   OFS   fname_format;   /* Essay on MS-DOS filenames for U)ploads    */
  299.   OFS   ul_log;         /* Log file for uploads                      */
  300.  
  301.   OFS   file_header;    /* Format for file area's A)rea command      */
  302.   OFS   file_format;    /* Format for A)rea command entries          */
  303.   OFS   file_footer;    /* Format for footer for file.area menu      */
  304.  
  305.   OFS   proto_dump;      /* Dump file for protocol screen            */
  306.  
  307.   /* Message-area items */
  308.  
  309.   OFS   msgarea_list;   /* dump file... used instead of Dir.Bbs      */
  310.   OFS   echotoss_name;  /* Name of your echomail tosslog             */
  311.   OFS   nomail;         /* Display by mailchecker if no mail wtng.   */
  312.  
  313.   OFS   msg_header;     /* Format for msg.area's A)rea command       */
  314.   OFS   msg_format;     /* Format for A)reas command entries         */
  315.   OFS   msg_footer;     /* Format for footer for msg.area menu       */
  316.  
  317.   /* Help files:  Used to explain various things */
  318.  
  319.   OFS   hlp_editor;     /* intro to msg editor for novices.          */
  320.   OFS   hlp_replace;    /* Explain the Msg.Editor E)dit command      */
  321.   OFS   msg_inquire;    /* Explain the Msg. I)nquire command         */
  322.   OFS   hlp_locate;     /* Explain the Files L)ocate command         */
  323.   OFS   hlp_contents;   /* Explain the Files C)ontents command       */
  324.   OFS   oped_help;      /* help file for the full-screen editor      */
  325.   OFS   hlp_scan;       /* help file for S)can                       */
  326.   OFS   hlp_list;       /* help file for L)ist                       */
  327.  
  328.   /* External protocols */
  329.  
  330.   OFS   protocols[MAX_EXTERNP]; /* external file protocol programs   */
  331.   OFS   protoname[MAX_EXTERNP]; /* name of protocol, on menu         */
  332.  
  333.   /* Date/Time format strings */
  334.  
  335.   OFS   timeformat;
  336.   OFS   dateformat;
  337.  
  338.   /* Paths/filenames of the AREAS.DAT and AREAS.IDX files */
  339.  
  340.   OFS   adat_name;
  341.   OFS   aidx_name;
  342.  
  343.   /* Menu paths/names */
  344.  
  345.   OFS   menupath;        /* The default place to look for the menus */
  346.   OFS   first_menu;      /* The name of the first menu to display */
  347.   OFS   edit_menu;       /* Name of the EDIT menu */
  348.   
  349.   /* Miscellaneous */
  350.   
  351.   OFS   achg_keys;       /* Characters used to change area -/+ */
  352.  
  353.   OFS   rsvd2[32];       /* Reserved by Maximus for future uses */
  354. };
  355.  
  356.