home *** CD-ROM | disk | FTP | other *** search
- /*
- Message Base Reply Chain Linker
-
- This module was originally written by Bob Hartman
- Sysop of FidoNet node 1:132/101
-
- Spark Software, 427-3 Amherst St, CS 2032, Suite 232, Nashua, NH 03061
-
- This program source code is being released with the following provisions:
-
- 1. You are free to make changes to this source code for use on your own
- machine, however, altered source files may not be distributed without the
- consent of Spark Software.
-
- 2. You may distribute "patches" or "diff" files for any changes that you
- have made, provided that the "patch" or "diff" files are also sent to Spark
- Software for inclusion in future releases of the entire package. A "diff"
- file for the source archives may also contain a compiled version, provided
- it is clearly marked as not being created from the original source code.
- No other executable versions may be distributed without the consent of
- Spark Software.
-
- 3. You are free to include portions of this source code in any program you
- develop, providing: a) Credit is given to Spark Software for any code that
- may is used, and b) The resulting program is free to anyone wanting to use
- it, including commercial and government users.
-
- 4. There is NO technical support available for dealing with this source
- code, or the accompanying executable files. This source code is provided
- as is, with no warranty expressed or implied (I hate legalease). In other
- words, if you don't know what to do with it, don't use it, and if you are
- brave enough to use it, you're on your own.
-
- Spark Software may be contacted by modem at (603) 888-8179 (node 1:132/101)
- on the public FidoNet network, or at the address given above.
-
- */
-
- #ifdef OS_2
- #define fast_open(a,b) open(a,b)
- #define fast_read(a,b,c) read(a,b,c)
- #define fast_lseek(a,b,c) lseek(a,b,c)
- #define fast_write(a,b,c) write(a,b,c)
- #define fast_close(a) close(a)
- #endif
-
- #if !defined( word )
- typedef unsigned bit;
- typedef unsigned char byte;
- typedef unsigned int word;
- #endif
-
- /* Message bits that are STRIPPED OFF when passing through a
- FidoNet node. */
-
- #define MSGSENT 8 /* sent OK (remote) */
- #define MSGFWD 32 /* being forwarded */
- #define MSGORPHAN 64 /* unknown dest node */
- #define MSGLOCAL 256 /* FidoNet vs. local */
-
- #define SAVED (MSGPRIVATE|MSGREAD)
-
- /* Original Fido messages bits. PRESERVED when passing
- through a FidoNet node. */
-
- #define MSGPRIVATE 1 /* private message, */
- #define MSGREAD 4 /* read by addressee */
- #define MSGFILE 16 /* file attached to msg */
- #define MSGKILL 128 /* kill after mailing */
-
- /* Message bits used by SeaDog. (Not used by Fido)
- (PRESERVED.) */
-
- #define MSGCRASH 2 /* accept for forwarding */
- #define MSGFRQ 2048 /* file request */
- #define MSGRRQ 4096 /* receipt requested */
- #define MSGCPT 8192 /* is a return receipt */
- #define MSGARQ 16384 /* audit trail requested */
- #define MSGURQ 32768 /* update request */
-
- /* Future expansion bits PRESERVED by FidoNet */
-
- #define MSGHOLD 512
-
- /* Future expansion bits STRIPPED by FidoNet */
-
- #define MSGXX2 1024
-
- #define NO_CLEAR (MSGPRIVATE|MSGREAD|MSGFILE|MSGKILL|MSGHOLD|MSGFRQ|MSGRRQ|MSGCPT|MSGURQ|MSGCRASH)
- #define PM_SAVED (MSGPRIVATE|MSGFILE|MSGRRQ|MSGCPT|MSGCRASH)
-
- #define PKTVER 2 /* Current packet version */
- #define MYPRODUCT 1 /* Bob Hartman reserved product code 'Rover' */
-
- /*
- User privilege levels
- */
-
- #define TWIT -2 /* total XXXXXXX */
- #define DISGRACE 0 /* disgraced user */
- #define NORMAL 2 /* normal user */
- #define PRIVEL 4 /* privileged user */
- #define EXTRA 6 /* extra privileges */
- #define SYSOP 10 /* SYSOP privileges */
-
- /*
- User help levels
- */
-
- #define EXPERT 2 /* expert */
- #define REGULAR 4 /* experienced */
- #define NOVICE 6 /* new user */
-
- #define SYSMAIL 1 /* is a mail area */
-
- /* Scheduled events, tag definitions. */
- #define DAYS_WK 7 /* Number of days in a week */
-
- #define MIN_EVENT 'A' /* minimum FidoNet tag */
- #define MAX_EVENT 'W' /* maximum */
- #define EXT_EVENT 'X' /* return to DOS event */
- #define YELL_EVENT 'Y' /* Yell command enable */
-
- #define SCHEDS (5 * DAYS_WK) /* size of time table */
-
- #define MSGNAME "*.MSG" /* Template for message files */
- #define SYSNAME "SYSTEM" /* Start of SYSTEM.BBS */
- #define DIRNAME "DIR" /* Start of DIR.BBS */
- #define USERNAME "USER" /* Start of USER.BBS */
- #define LOGNAME "SYSOP" /* Start of SYSOP.LOG */
- #define MAILNAME "MAILER" /* Start of MAILER.LOG */
- #define SCHEDNAME "SCHED" /* Start of SCHED.BBS */
- #define DEF_EXT ".BBS" /* Default ending for Fido files */
- #define SYS_EXT ".SYS" /* .SYS extension for some files */
- #define LOG_EXT ".LOG" /* .LOG extension for some files */
-
- #define TRUE 1
- #define FALSE 0
-
- #define NUMBLOCKS 14
- #define NUMMSGS 2048
- #define MAXNODES 50
- #define MAXSEEN 512
- #define MAXPATH 50
- #define MAXAREAS 500
- #define NO_EXT_KEYS
- #define P_WAIT 0
- #define SEEK_SET 0
- #define SEEK_CUR 1
- #define SEEK_END 2
-
- #define MATCHED_OLD 1
- #define ALL_OK 0 /* proper termination of routine */
- #define FIDO_NOMSG -1 /* Message does not exist */
- #define NO_SYSTEM -2 /* Not a valid SYSTEM<N>.BBS file */
- #define FIDO_PRIVMSG -3 /* Private message */
- #define FIDO_NOFILE -4 /* File does not exist */
- #define NO_GO -5
-
-
- /* Flags for areas */
- #define PASS_THRU 0x01
- #define PARENT 0x02
- #define SIBLING 0x04
- #define ROUTETHRU 0x08
- #define BAD_MSGS 0x10
- #define MAIL_DIR 0x20
-
- #define BIGSIZE 8192
- #define DUPSIZE 1000
- #define MAGIC 0xabcd
-
- #define ST_RDONLY 0x01 /* read only file */
- #define ST_HIDDEN 0x02 /* hidden file */
- #define ST_SYSTEM 0x04 /* system file */
- #define ST_VLABEL 0x08 /* volume label */
- #define ST_DIRECT 0x10 /* file is a sub-directory */
- #define ST_ARCHIV 0x20 /* set when file has been written and closed */
-
- #define DELETE_POINT -2