home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MLNK10CS.ZIP / DEFINES.H < prev    next >
Text File  |  1990-06-11  |  6KB  |  181 lines

  1. /*
  2.                        Message Base Reply Chain Linker
  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. #ifdef OS_2
  40. #define fast_open(a,b) open(a,b)
  41. #define fast_read(a,b,c) read(a,b,c)
  42. #define fast_lseek(a,b,c) lseek(a,b,c)
  43. #define fast_write(a,b,c) write(a,b,c)
  44. #define fast_close(a) close(a)
  45. #endif
  46.  
  47. #if !defined( word )
  48.    typedef unsigned      bit;
  49.    typedef unsigned char byte;
  50.    typedef unsigned int  word;
  51. #endif
  52.  
  53. /* Message bits that are STRIPPED OFF when passing through a
  54.    FidoNet node. */
  55.  
  56. #define MSGSENT 8        /* sent OK (remote) */
  57. #define MSGFWD 32        /* being forwarded */
  58. #define MSGORPHAN 64    /* unknown dest node */
  59. #define MSGLOCAL 256    /* FidoNet vs. local */
  60.  
  61. #define SAVED (MSGPRIVATE|MSGREAD)
  62.  
  63. /* Original Fido messages bits. PRESERVED when passing
  64.    through a FidoNet node. */
  65.  
  66. #define MSGPRIVATE 1    /* private message, */
  67. #define MSGREAD 4        /* read by addressee */
  68. #define MSGFILE 16    /* file attached to msg */
  69. #define MSGKILL 128 /* kill after mailing */
  70.  
  71. /* Message bits used by SeaDog. (Not used by Fido)
  72.    (PRESERVED.) */
  73.  
  74. #define MSGCRASH 2    /* accept for forwarding */
  75. #define MSGFRQ 2048 /* file request */
  76. #define MSGRRQ 4096 /* receipt requested */
  77. #define MSGCPT 8192 /* is a return receipt */
  78. #define MSGARQ 16384    /* audit trail requested */
  79. #define MSGURQ 32768    /* update request */
  80.  
  81. /* Future expansion bits PRESERVED by FidoNet */
  82.  
  83. #define MSGHOLD 512
  84.  
  85. /* Future expansion bits STRIPPED by FidoNet */
  86.  
  87. #define MSGXX2 1024
  88.  
  89. #define NO_CLEAR (MSGPRIVATE|MSGREAD|MSGFILE|MSGKILL|MSGHOLD|MSGFRQ|MSGRRQ|MSGCPT|MSGURQ|MSGCRASH)
  90. #define PM_SAVED (MSGPRIVATE|MSGFILE|MSGRRQ|MSGCPT|MSGCRASH)
  91.  
  92. #define PKTVER        2        /* Current packet version */
  93. #define MYPRODUCT 1     /* Bob Hartman reserved product code 'Rover' */
  94.  
  95. /*
  96.     User privilege levels
  97. */
  98.  
  99. #define TWIT        -2        /* total XXXXXXX */
  100. #define DISGRACE    0        /* disgraced user */
  101. #define NORMAL        2        /* normal user */
  102. #define PRIVEL        4        /* privileged user */
  103. #define EXTRA        6        /* extra privileges */
  104. #define SYSOP        10        /* SYSOP privileges */
  105.  
  106. /*
  107.     User help levels
  108. */
  109.  
  110. #define EXPERT        2        /* expert */
  111. #define REGULAR     4        /* experienced */
  112. #define NOVICE        6        /* new user */
  113.  
  114. #define SYSMAIL     1        /* is a mail area */
  115.  
  116. /* Scheduled events, tag definitions. */
  117. #define DAYS_WK 7                    /* Number of days in a week */
  118.  
  119. #define MIN_EVENT 'A'         /* minimum FidoNet tag */
  120. #define MAX_EVENT 'W'         /* maximum */
  121. #define EXT_EVENT 'X'         /* return to DOS event */
  122. #define YELL_EVENT 'Y'        /* Yell command enable */
  123.  
  124. #define SCHEDS (5 * DAYS_WK)  /* size of time table */
  125.  
  126. #define MSGNAME     "*.MSG"     /* Template for message files */
  127. #define SYSNAME     "SYSTEM"    /* Start of SYSTEM.BBS */
  128. #define DIRNAME     "DIR"       /* Start of DIR.BBS */
  129. #define USERNAME    "USER"      /* Start of USER.BBS */
  130. #define LOGNAME     "SYSOP"     /* Start of SYSOP.LOG */
  131. #define MAILNAME    "MAILER"    /* Start of MAILER.LOG */
  132. #define SCHEDNAME    "SCHED" /* Start of SCHED.BBS */
  133. #define DEF_EXT     ".BBS"      /* Default ending for Fido files */
  134. #define SYS_EXT     ".SYS"      /* .SYS extension for some files */
  135. #define LOG_EXT     ".LOG"      /* .LOG extension for some files */
  136.  
  137. #define TRUE        1
  138. #define FALSE        0
  139.  
  140. #define NUMBLOCKS 14
  141. #define NUMMSGS 2048
  142. #define MAXNODES 50
  143. #define MAXSEEN 512
  144. #define MAXPATH  50
  145. #define MAXAREAS  500
  146. #define NO_EXT_KEYS
  147. #define P_WAIT 0
  148. #define SEEK_SET 0
  149. #define SEEK_CUR 1
  150. #define SEEK_END 2
  151.  
  152. #define MATCHED_OLD 1
  153. #define ALL_OK        0        /* proper termination of routine */
  154. #define FIDO_NOMSG    -1        /* Message does not exist */
  155. #define NO_SYSTEM    -2        /* Not a valid SYSTEM<N>.BBS file */
  156. #define FIDO_PRIVMSG    -3        /* Private message */
  157. #define FIDO_NOFILE -4        /* File does not exist */
  158. #define NO_GO -5
  159.  
  160.  
  161. /* Flags for areas */
  162. #define PASS_THRU 0x01
  163. #define PARENT      0x02
  164. #define SIBLING   0x04
  165. #define ROUTETHRU 0x08
  166. #define BAD_MSGS  0x10
  167. #define MAIL_DIR  0x20
  168.  
  169. #define BIGSIZE 8192
  170. #define DUPSIZE 1000
  171. #define MAGIC    0xabcd
  172.  
  173. #define ST_RDONLY    0x01    /* read only file */
  174. #define ST_HIDDEN    0x02    /* hidden file */
  175. #define ST_SYSTEM    0x04    /* system file */
  176. #define ST_VLABEL    0x08    /* volume label */
  177. #define ST_DIRECT    0x10    /* file is a sub-directory */
  178. #define ST_ARCHIV    0x20    /* set when file has been written and closed */
  179.  
  180. #define DELETE_POINT -2
  181.