home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------*/
- /* */
- /* XBBS SOURCE CODE copyright (c) 1990 by M. Kimes */
- /* All Rights Reserved */
- /* */
- /* For complete details of the licensing restrictions, please refer */
- /* to the License agreement, which is published in its entirety in */
- /* the in the file LICENSE.XBS. */
- /* */
- /* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE */
- /* XBBS LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF */
- /* THIS AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO */
- /* NOT HAVE THESE FILES, YOU SHOULD IMMEDIATELY CONTACT M. KIMES */
- /* AT THE ADDRESS LISTED BELOW. IN NO EVENT SHOULD YOU PROCEED TO USE */
- /* THIS FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE XBBS LICENSING */
- /* AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE ABLE TO REACH WITH */
- /* M. KIMES */
- /* */
- /* */
- /* You can contact M. Kimes at the following address: */
- /* */
- /* M. Kimes 1:380/16.0@FidoNet */
- /* 542 Merrick (318)222-3455 data */
- /* Shreveport, LA 71104 */
- /* */
- /* */
- /* Please feel free to contact me at any time to share your comments about */
- /* my software and/or licensing policies. */
- /* */
- /*--------------------------------------------------------------------------*/
- /* MSG.H file -- Header info, structures, etc. Big mess. */
-
- #include "mem.h"
- #include "setjmp.h"
- #include "errno.h"
- #include "io.h"
- #include "fcntl.h"
- #include "dos.h"
- #include "dir.h"
- #include "stdio.h"
- #include "string.h"
- #include "stdlib.h"
- #include "ctype.h"
- #include "time.h"
- #include "stddef.h"
- #include "process.h"
- #include "share.h"
- #include "alloc.h"
- #include "stdarg.h"
- #include "conio.h"
- #include "limits.h"
-
- #if __STDC__
- #define _Cdecl
- #else
- #define _Cdecl cdecl
- #endif
-
- unsigned int cdecl BitOff(char *a,unsigned int x);
- unsigned int cdecl BitOn(char *a,unsigned int x);
- unsigned int cdecl IsBit(char *a,unsigned int x);
-
- #define BitOff(a,x) ((void)((a)[(x)/CHAR_BIT] &= ~(1 << ((x) % \
- CHAR_BIT))))
- #define BitOn(a,x) ((void)((a)[(x)/CHAR_BIT] |= (1 << ((x) % \
- CHAR_BIT))))
- #define IsBit(a,x) ((a)[(x)/CHAR_BIT] & (1 << ((x) % CHAR_BIT)))
-
- #define begin {
- #define end }
-
- #define true 0
- #define false -1
-
- #define shl <<
- #define shr >>
- #define xor ^
- #define and &&
- #define or ||
- #define not !
- #define mod %
- #define BACKSPACE "\b \b"
-
- typedef unsigned bit;
- typedef unsigned int word;
- typedef unsigned char byte;
- typedef unsigned long ulong;
-
- #include "dos.h"
- #include "errno.h"
-
- #define MY_CREATE 1024
- #define MY_TRUNC 512
- #define MY_READ 0
- #define MY_WRITE 1
- #define MY_RDWR 2
- #define MY_DENYALL 64
- #define MY_NOINHERIT 128
- #define MY_DENYWRITE 32
- #define MY_DENYREAD (32+64)
- #define MY_DENYNONE 16
-
- #define S_IFMT 0170000 /* file type mask */
- #define S_IFDIR 0040000 /* directory */
- #define S_IFCHR 0020000 /* character special */
- #define S_IFREG 0100000 /* regular */
- #define S_IREAD 0000400 /* read permission, owner */
- #define S_IWRITE 0000200 /* write permission, owner */
- #define S_IEXEC 0000100 /* execute/search permission, owner */
-
- struct bitword {
- bit bit1: 1;
- bit bit2: 1;
- bit bit3: 1;
- bit bit4: 1;
- bit bit5: 1;
- bit bit6: 1;
- bit bit7: 1;
- bit bit8: 1;
- bit bit9: 1;
- bit bit10: 1;
- bit bit11: 1;
- bit bit12: 1;
- bit bit13: 1;
- bit bit14: 1;
- bit bit15: 1;
- bit bit16: 1;
- };
-
- union flag_word {
- word x;
- struct bitword b;
- };
-
-
- /*-------------------------------------------------------------------------*/
- /* */
- /* MESSAGES............. */
- /* */
- /*-------------------------------------------------------------------------*/
-
-
- /*-------------------------------------------------------------------------*/
- /* FIDO Message header */
- /*-------------------------------------------------------------------------*/
- struct _msg {
- char from[36];
- char to[36];
- char subj[72];
- char date[20];
- word times; /* FIDO<tm>: Number of times read */
- word dest; /* Destination node */
- word orig; /* Origination node number */
- word cost; /* Unit cost charged to send the message */
- word orig_net; /* Origination network number */
- word dest_net; /* Destination network number */
- int msg_filler[4];
- word reply; /* Current msg is a reply to this msg number */
- word attr; /* Attribute (behavior) of the message */
- word up; /* Next message in the thread */
- };
-
-
-
- /*-------------------------------------------------------------------------*/
- /* FIDO Message attributes (attr) */
- /*-------------------------------------------------------------------------*/
- #define MSGPRIVATE 0x0001 /* private message, 0000 0000 0000 0001*/
- #define MSGCRASH 0x0002 /* accept for forwarding 0000 0000 0000 0010*/
- #define MSGREAD 0x0004 /* read by addressee 0000 0000 0000 0100*/
- #define MSGSENT 0x0008 /* sent OK (remote) 0000 0000 0000 1000*/
- #define MSGFILE 0x0010 /* file attached to msg 0000 0000 0001 0000*/
- #define MSGFWD 0x0020 /* being forwarded 0000 0000 0010 0000*/
- #define MSGORPHAN 0x0040 /* unknown dest node 0000 0000 0100 0000*/
- #define MSGKILL 0x0080 /* kill after mailing 0000 0000 1000 0000*/
- #define MSGLOCAL 0x0100 /* FidoNet vs. local 0000 0001 0000 0000*/
- #define MSGXX1 0x0200 /* 0000 0010 0000 0000*/
- #define MSGXX2 0x0400 /* STRIPPED by FidoNet<tm> 0000 0100 0000 0000*/
- #define MSGFRQ 0x0800 /* file request 0000 1000 0000 0000*/
- #define MSGRRQ 0x1000 /* receipt requested 0001 0000 0000 0000*/
- #define MSGCPT 0x2000 /* is a return receipt 0010 0000 0000 0000*/
- #define MSGARQ 0x4000 /* audit trail requested 0100 0000 0000 0000*/
- #define MSGURQ 0x8000 /* update request 1000 0000 0000 0000*/
-
-
-
- /*-------------------------------------------------------------------------*/
- /* XBBS Message header */
- /*-------------------------------------------------------------------------*/
- struct _xmsg {
- char from[36];
- char to[36];
- char subj[64];
- word o_point;
- word length; /* Length of message */
- ulong start; /* Starting postition in text file */
- char date[20];
- word times; /* Number of times read */
- word dest; /* Destination node */
- word orig; /* Origination node number */
- word cost; /* Unit cost charged to send the message */
- word orig_net; /* Origination network number */
- word dest_net; /* Destination network number */
- char indate[4]; /* import date (YMD(null)) */
- word m_attr; /* Extra attributes */
- word d_zone; /* Destination zone */
- word o_zone; /* Origination zone */
- word attr; /* Attribute (behavior) of the message */
- word d_point;
- };
-
-
- /* These apply to m_attr */
-
- #define MSGDELETED 0x0001 /* deleted message, 0000 0000 0000 0001*/
- #define MSGANON 0x0002 /* anonymous message 0000 0000 0000 0010*/
- #define MSGECHO 0x0004 /* unmoved echo message 0000 0000 0000 0100*/
- #define MSGNET 0x0008 /* unmoved net message 0000 0000 0000 1000*/
- #define MSGHOLD 0x0010 /* file attached to msg 0000 0000 0001 0000*/
- #define MSGHOST 0x0020 /* being forwarded 0000 0000 0010 0000*/
- #define MSGSCANNED 0x0040 /* already scanned 0000 0000 0100 0000*/
- #define MSGKEEP 0x0080 /* don't delete 0000 0000 1000 0000*/
- #define MSGTREATED 0x0100 /* soft cr's & lf's removed 0000 0001 0000 0000*/
- #define MSGPACKED 0x0200 /* message LZSS compressed 0000 0010 0000 0000*/
- /*#define 0x0400 /* 0000 0100 0000 0000*/
- /*#define 0x0800 /* 0000 1000 0000 0000*/
- /*#define 0x1000 /* 0001 0000 0000 0000*/
- /*#define 0x2000 /* 0010 0000 0000 0000*/
- /*#define 0x4000 /* 0100 0000 0000 0000*/
- #define MSGTAGGED 0x8000 /* used by offline readers 1000 0000 0000 0000*/
-
-
- /*-------------------------------------------------------------------------*/
- /* User record structure */
- /*-------------------------------------------------------------------------*/
-
- struct _user {
- char name[36];
- char handle[36];
- struct date birthdate;
- char password[12];
- char city[24];
- char state[3];
- char zip[6];
- char phone1[11];
- char phone2[11];
- bit length: 7;
- bit cold: 1;
- char width;
- bit graphics: 1;
- bit fullscreen: 1;
- bit scrnclr: 1;
- bit commodore: 1;
- bit expert: 1;
- bit more: 1;
- bit ignorehrs: 1;
- bit ignorerat: 1;
- bit nokill: 1;
- bit deleted: 1;
- bit arq: 1;
- bit twit: 1;
- bit ansimenus: 1;
- bit gen1: 1;
- bit gen2: 1;
- bit gen3: 1;
- word attr2;
- word stat[10];
- unsigned long upk;
- unsigned long downk;
- word upno;
- word downno;
- word posts;
- int credit;
- char violations;
- struct date lastdate;
- struct time lasttime;
- struct date logondate;
- struct time logontime;
- unsigned long times;
- word callsperday;
- word timepercall;
- word totaltime;
- word callstoday;
- word timetoday;
- char variable[5][76]; /* Strings vars saved w/ user record */
- word numvars[10]; /* Numeric vars saved w/ user record */
- char comptype; /* # designating user's computer type */
- word uktoday;
- word dktoday;
- bit hiok: 1; /* Hi ASCII (>127) OK */
- bit lastmsgarea: 10;
- bit reserved: 5;
- word pointid; /* If he's a mailerless point */
- unsigned long id;
- char node;
- };
-
-
-
- /*-------------------------------------------------------------------------*/
- /* User attributes */
- /*-------------------------------------------------------------------------*/
- #define GRAPHICS 0x0001 /* ANSI 0000 0000 0000 0001*/
- #define FULLSCREEN 0x0002 /* full screen editor 0000 0000 0000 0010*/
- #define SCRNCLR 0x0004 /* screen clearing? 0000 0000 0000 0100*/
- #define COMMODORE 0x0008 /* GP Special flag 0000 0000 0000 1000*/
- #define EXPERT 0x0010 /* help level 0000 0000 0001 0000*/
- #define MORE 0x0020 /* More? pause 0000 0000 0010 0000*/
- #define IGNOREHRS 0x0040 /* Ignore u/d hours 0000 0000 0100 0000*/
- #define IGNORERAT 0x0080 /* Ignore ratio enforcement 0000 0000 1000 0000*/
- #define NOKILL 0x0100 /* Don't kill user 0000 0001 0000 0000*/
- #define DELETED 0x0200 /* User is deleted 0000 0010 0000 0000*/
- #define ARQ 0x0400 /* Reliable connect 0000 0100 0000 0000*/
- #define TWIT 0x0800 /* Twit or whatever 0000 1000 0000 0000*/
- #define ANSIMENUS 0x1000 /* Use ANSI Menus? 0001 0000 0000 0000*/
- #define GEN1 0x2000 /* No use by system 0010 0000 0000 0000*/
- #define GEN2 0x4000 /* No use by system 0100 0000 0000 0000*/
- #define GEN3 0x8000 /* No use by system 1000 0000 0000 0000*/
-
-
- /* struct _mboard mboard; Default message board setup
- struct _fboard fboard; Default file board setup */
-
- /*-------------------------------------------------------------------------*/
- /* Message area record */
- /*-------------------------------------------------------------------------*/
-
- struct _mboard {
- char name[48];
- char forceto[36];
- word attr;
- word max;
- word number;
- word substat1;
- word substat2;
- signed char age;
- word flags;
- word minwrite;
- };
-
- /*-------------------------------------------------------------------------*/
- /* MBoard attributes */
- /*-------------------------------------------------------------------------*/
- #define NOORIG 0x0001 /* No * Origin or Tear 0000 0000 0000 0001 */
- #define ANSI 0x0002 /* ANSI 0000 0000 0000 0010 */
- #define PRIVATE 0x0004 /* Obvious 0000 0000 0000 0100 */
- #define PUBLIC 0x0008 /* " 0000 0000 0000 1000 */
- #define ECHO 0x0010 /* " 0000 0000 0001 0000 */
- #define NET 0x0020 /* " 0000 0000 0010 0000 */
- #define MCI 0x0040 /* " 0000 0000 0100 0000 */
- #define READONLY 0x0080 /* " 0000 0000 1000 0000 */
- #define ALTERNATE 0x0100 /* " 0000 0001 0000 0000 */
- #define ALTECHO 0x0200 /* " 0000 0010 0000 0000 */
- #define ANON 0x0400 /* " 0000 0100 0000 0000 */
- #define REAL 0x0800 /* " 0000 1000 0000 0000 */
- #define ASSOC 0x1000 /* Msg area allows assoc 0001 0000 0000 0000 */
- #define EXTERN 0x2000 /* Activates [E] prompt 0010 0000 0000 0000 */
- #define FORCE 0x4000 /* Always force 0100 0000 0000 0000 */
- #define COMPRESS 0x8000 /* Allow LZSS comp here 1000 0000 0000 0000 */
-
-
- /*-------------------------------------------------------------------------*/
- /* File area record */
- /*-------------------------------------------------------------------------*/
-
- struct _fboard {
- char name[47];
- char flags;
- char dpath[79];
- char upath[79];
- signed char age;
- word userflags;
- char leechpercent;
- };
-
-
- /*-------------------------------------------------------------------------*/
- /* FBoard flags */
- /*-------------------------------------------------------------------------*/
- #define COUNTDLS 0x0001 /* Use timestamp as #dls 0000 0000 0000 0001 */
- #define FREEFILES 0x0002 /* Don't inc downloads 0000 0000 0000 0010 */
- #define FILEASSOC 0x0004 /* File area allows assoc 0000 0000 0000 0100 */
- #define FREEUP 0x0008 /* Don't inc uploads 0000 0000 0000 1000 */
- /*#define 0x0010 /* 0000 0000 0001 0000 */
- /*#define 0x0020 /* 0000 0000 0010 0000 */
- /*#define 0x0040 /* 0000 0000 0100 0000 */
- /*#define 0x0080 /* 0000 0000 1000 0000 */
- /*#define 0x0100 /* 0000 0001 0000 0000 */
- /*#define 0x0200 /* 0000 0010 0000 0000 */
- /*#define 0x0400 /* 0000 0100 0000 0000 */
- /*#define 0x0800 /* 0000 1000 0000 0000 */
- /*#define 0x1000 /* 0001 0000 0000 0000 */
- /*#define 0x2000 /* 0010 0000 0000 0000 */
- /*#define 0x4000 /* 0100 0000 0000 0000 */
- /*#define 0x8000 /* 1000 0000 0000 0000 */
-
- #define STOPDL "\x0b\x03\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18"
-
- /*-------------------------------------------------------------------------*/
- /* Protocol record */
- /*-------------------------------------------------------------------------*/
-
- struct protocol {
- char name[25];
- char key;
- int adj;
- char spawndn[119];
- char spawnup[119];
- char abort[48];
- unsigned wild: 1;
- unsigned multi: 1;
- unsigned simul: 1;
- unsigned list: 1;
- unsigned opus: 1;
- unsigned noname: 1;
- unsigned dszlog: 1;
- unsigned reserved: 1;
- char pad1;
- char pad2;
- };
-
- /*-------------------------------------------------------------------------*/
- /* */
- /* CONFIGURATION............. */
- /* */
- /*-------------------------------------------------------------------------*/
-
- struct _config {
- char commport; /* Commport to use...0=COM1,1=COM2,etc. */
- word node; /* Our node number */
- char mailpath[79]; /* Path for incoming messages */
- char filepath[79]; /* Path for incoming files */
- word net; /* Our network number */
- word alt_node; /* Alternate node number (mainly for HOSTS) */
- word alt_net; /* Alternate net number (mainly for HOSTS) */
- byte zone; /* Our zone number */
- byte alt_zone; /* Alternate zone number */
- char homepath[79]; /* Path to BBS Files */
- char outpath[79]; /* Path for outbound messages */
- char menupath[79]; /* Path to system menu files */
- char messpath[79]; /* Path to system message files */
- char sysop[36]; /* SysOp's name */
- char system[64]; /* BBS's name */
- char logfile[79]; /* System logfile */
- word idleseconds; /* Seconds user can be idle before disconnect */
- char pages; /* Number of times user can page sysop */
- bit sysopin: 1; /* Is he? 0 or 1 */
- bit touchup: 1; /* Touchup uploaded file dates? 0 or 1 */
- bit uptime: 1; /* 1=Return upload time */
- bit downtime: 1; /* 1=Return download time */
- bit dvideo: 1; /* Use direct video for some output? */
- bit bvideo: 1; /* If not, use BIOS? */
- bit bioswrites: 1; /* Write through BIOS for ANSI? */
- bit debug: 1; /* Debug on or off (0 or 1) */
- bit ansiavail: 1; /* Is ANSI available? 0 or 1 */
- bit whichstat: 2; /* Default status line (0-3) */
- bit promptsay: 1;
- char edansi[79]; /* External ANSI editor DOS string */
- char edline[79]; /* External line editor DOS string */
- char edlocal[79]; /* Local message editor DOS string */
- word ansibaud; /* Minimum baud for ANSI */
- char quotestring[4]; /* String to put before quotes in reply */
- ulong callcount; /* Number of System calls */
- char lastcaller[36]; /* Last caller to system */
- word netmailboard; /* Net Mail Board # */
- word altnetboard; /* Net Mail Board # for alternate zone:net/node */
- struct _mboard mboard; /* Default message board setup */
- struct _fboard fboard; /* Default file board setup */
- char origin[59]; /* Default origin line */
- char carbons; /* Number of carbons to allow (0-9) */
- char jumpfile[10][13]; /* Jump filenames */
- char jumpkey[10][2]; /* Jump keys */
- char subfile[10][13];/* Sub filenames */
- char subkey[10][2]; /* Sub keys */
- word nolmrs; /* Number of areas to keep LMRs for */
- long quote_pos; /* Start of next sequential quote in quotefile */
- char quote_file[13]; /* Name of quotefile */
- char domain[37];
- char alt_domain[37];
- bit forcefilemsg: 1;
- bit trace: 1;
- bit RBBSorQBBS: 1; /* Type of DORINFO?.DEF to make */
- bit reservedbits: 5;
- ulong nextid;
- word packsize; /* Size at which to compress msgs */
- char helpkey;
- int version;
- long lastcall;
- char reserved1[94]; /* */
- char startat; /* Start u/d enforcement after # d/l's */
- char numcomps; /* How many computer types you are tracking */
- char edgraph[79]; /* "Real" ANSI editor */
- char comments; /* Number of comment lines for upload */
- word purgebaud; /* Maximum baud rate to purge outbound with */
- bit genphone: 1; /* Use generic phone input? */
- bit genstatezip: 1; /* Use state & zip as generic field? */
- bit share: 1; /* Are we running SHARE.EXE? */
- bit fastANSI: 1; /* Use INT 29h for ANSI output? */
- bit logmenu: 1;
- bit logfiles: 1;
- bit logmsg: 1;
- bit logtext: 1;
- char nodelist[79]; /* Path to nodelist files */
- word lastusernum; /* Last user's record # */
- char useswapdisk; /* Disk drive to use for swapping */
- char LIMEMS; /* Use LIMEMS for swapping? */
- char swap; /* Swap or not? */
- int available[41]; /* For third party apps...see notes */
- char reserved2; /* Extra byte */
- };
-
- /*
- Notes on available[] area in _config structure. These ints may be
- allocated by a third-party program so long as the app first makes
- sure the int is not 0! Apps should always use the highest
- available slot. Do not use a slot unless it (the two-byte int) is
- 0! Even XBBS might use a slot someday following this convention,
- so you'll avoid system crashes someday if you play by the rules
- today.
- */
-
- /*-------------------------------------------------------------------------*/
- /* Logon Configuration */
- /*-------------------------------------------------------------------------*/
-
- struct _logconfig {
- bit name;
- bit handle;
- bit phone1;
- bit phone2;
- bit graphics;
- bit ansiedit;
- bit scrnclr;
- bit pagepause;
- bit commflag;
- bit zipcode;
- bit city;
- bit state;
- bit pass;
- bit birth;
- bit length;
- bit width;
- bit locallog; /* Automatic logon in local mode? */
- char loglimit; /* How long to give user for login (mins) */
- char nameattempts; /* How many times user can try to enter name */
- char passattempts; /* How many times user can try to enter pword */
- word minbaud; /* Minimum baud rate */
- char reserved[24];
- end;
-
-
- struct _events { /* Structure for XBBS online events */
- char filename[13];
- ulong secsleft;
- };
-
- /*-------------------------------------------------------------------------*/
- /* Message packet header */
- /*-------------------------------------------------------------------------*/
- #define PKTVER 2 /* Current packet version */
-
- #define isFIDO 0x00 /* Fido<tm>'s product code */
- #define isCONF 0x01 /* Confmail's product code */
- #define isSEADOG 0x02 /* Seadog<tm>'s product code */
- #define isSLICK 0x04 /* Slick/150's product code */
- #define isOPUS 0x05 /* Opus<no_tm>'s product code */
- #define isDUTCH 0x06 /* Dutchie's product code */
- #define isTABBY 0x08 /* Tabby's product code */
- #define isHOLSTER 0x09 /* Holster's product code */
- #define isWOLF 0x0a /* Wolf/68k's product code */
- #define isQMM 0x0b /* QNX product code */
- #define isFD 0x0c /* Frontdoor */
- #define isMAILMAN 0x11 /* MailMan */
- #define isOOPS 0x12 /* OOPS */
- #define isGS 0x13 /* GS-Point */
- #define isBG 0x14 /* Ray Gwinn */
- #define isCB 0x15 /* Crossbow */
- #define isSTOD 0x19 /* Shawn Stoddard */
- #define isBRIDGE 0x1a /* D'Bridge */
- #define isBINK 0x1b /* BinkleyTerm */
- #define isYANK 0x1c /* Yankee */
- #define isFGET 0x1d /* FGet/FSend */
-
- /*
-
-
- 1Eh Daisy MAILER (Apple ][ packer/mailer), Raymond & Ken Lo, 3:700/1
- 1Fh Polar Bear (bbs/packer/mailer), Kenneth McLeod, 1:101/190
- 20h The-Box (Atari ST packer/mailer), Jac Kersing, 2:508/17
- 21h Warlock (OS/2 packer/mailer), Leonard Thornton, 1:362/101
- 22h TMail (packer/echomail processor), Larry Lewis, 3:713/606
- 23h TCOMMail (packer/mailer for TComm BBS), Mike Ratledge, 1:372/888
- 24h Bananna (Binkley on a Mac, packer/mailer), Joe Keenan, 1:109/401
- 25h RBBSMail (RBBS echomail processor), Jan Terpstra, 2:512/101
- 26h Apple-netmail (Apple?? packer/mailer), Bill Fenner, 1:129/87
- 27h Chameleon Point Mailer (Amiga), Juergen Hermann, 2:241/2.12
- 28h Majik Board (MS-DOS bbs/packer/mailer), Dale Barnes, 1:375/11
- 29h QMail (MS-DOS packer), Greg Dawson, 1:106/111
- 2Ah Point And Click (Amiga packer), Rob Tillotson, 1:201/40.302
- 2Bh Aurora Three Bundler (MS-DOS packer), Oliver McDonald, 1:342/1
- 2Ch FourDog version (MS-DOS packer for WWIV), Shay Walters, 1:376/12
- 2Dh MSG-PACK (MS-DOS packer), Tom Hendricks, 1:261/662
- 2Eh AMAX (MS-DOS outbound manager), Alan Applegate, 1:104/36
- 2Fh Domain Communication System, Hal Duprie, 1:101/106
- 30h LesRobot (FidoNet ARPANET Gateway), Lennart Svensonn, 2:501/2
- 31h Rose (MS-DOS packer/mailer), Glen Jackson, 1:100/617
- 32h Paragon (Amiga bbs/packer/mailer), Jon Radoff, 1:322/545
- 33h BinkleyTerm/oMMM/ST/ (Atari-ST mailer/packer), Peter Glasmacher, 1:143/9
- 34h StarNet (Atari-ST mailer/bbs), Eric Drewry, 1:322/566
- 35h ZzyZx (MS-DOS packer), Claude Warren, 1:104/62
- 36h QuickBBS (MS-DOS bbs), Adam Hudson, 1:104/24
- 37h BOOM (MS-DOS outbound manager), Andrew Farmer, 1:163/115
- 38h PBBS (Amiga packer/mailer), Todd Kover, 1:261/1028
- 39h TrapDoor (Amiga mailer), Maximilian Hantsch, 2:310/3.24
- 3Ah Welmat (Amiga mailer), Michael Richardson, 1:163/109.10
-
- */
-
- struct _pkthdr {
- word
- orig_node, /* originating node */
- dest_node, /* destination node */
- year, /* 1989 - nnnnn */
- month,
- day,
- hour,
- minute,
- second,
- rate, /* unused */
- ver, /* 2 */
- orig_net, /* originating net */
- dest_net; /* destination net */
- byte
- product,
- rev_lev, /* revision level */
- password[8];
- word
- qm_orig_zone,
- qm_dest_zone;
- byte
- domain[8];
- word
- orig_zone, /* originating zone */
- dest_zone, /* destination zone */
- orig_point, /* originating point */
- dest_point; /* destination point */
- long
- pr_data;
- };
-
- /* PakdMessage = 02H 00H message type, old type-1 is
- obsolete
- origNode of message
- destNode of message
- origNet of message
- destNet of message
- AttributeWord
- cost in lowest unit of originator's
- currency
- DateTime message body was last edited
- toUserName{36} Null terminated
- fromUserName{36} Null terminated
- subject{72} Null terminated
- text{unbounded} Null terminated /*
-
- /*=====================================================================*/
- /* FOSSIL definitions */
- /*=====================================================================*/
-
- #define FOSSILINT 0x14
- #define SETBAUD 0
- #define TRANSWAIT 1
- #define RECVWAIT 2
- #define GETSTAT 3
- #define INIT 4
- #define DEINIT 5
- #define DTR 6
- #define UP 1
- #define DOWN 0
- #define FLUSHOUT 8
- #define PURGEOUT 9
- #define PURGEIN 10
- #define TRANSMIT 11
- #define PEEK 12
- #define KEYNOWAIT 13
- #define KEYWAIT 14
- #define FLOW 15
- #define ONOFF 16
- #define ON 0
- #define OFF 2
- #define SETCRSR 17
- #define READCRSR 18
- #define ONEANSI 19
- #define CARRIER 128
- #define INITOK 0x1954
- #define WATCHDOG 20
- #define REBOOT 23
- #define COLD 0
- #define WARM 1
- #define BLOCKREAD 24
- #define BLOCKWRITE 25
-
- /*-------------------------------------------------------------------------*/
- /* Nodelist structures for QuickNodeList */
- /*-------------------------------------------------------------------------*/
-
- /*------------------------------------------------------------------------*/
- /* Values for the `flags1' field */
- /*------------------------------------------------------------------------*/
- #define B_hub 0x0001 /* node is a net hub 0000 0000 0000 0001 */
- #define B_host 0x0002 /* node is a net host 0000 0000 0000 0010 */
- #define B_region 0x0004 /* node is region coord 0000 0000 0000 0100 */
- #define B_zone 0x0008 /* node is a zone coord 0000 0000 0000 1000 */
- #define B_CM 0x0010 /* runs continuous mail 0000 0000 0001 0000 */
- #define B_ores1 0x0020 /* reserved for Opus 0000 0000 0010 0000 */
- #define B_ores2 0x0040 /* reserved for Opus 0000 0000 0100 0000 */
- #define B_ores3 0x0080 /* reserved for Opus 0000 0000 1000 0000 */
- #define B_ores4 0x0100 /* reserved for Opus 0000 0001 0000 0000 */
- #define B_ores5 0x0200 /* reserved for Opus 0000 0010 0000 0000 */
- #define B_res1 0x0400 /* reserved for non-Opus 0000 0100 0000 0000 */
- #define B_res2 0x0800 /* reserved for non-Opus 0000 1000 0000 0000 */
- #define B_res3 0x1000 /* reserved for non-Opus 0001 0000 0000 0000 */
- #define B_res4 0x2000 /* reserved for non-Opus 0010 0000 0000 0000 */
- #define B_res5 0x4000 /* reserved for non-Opus 0100 0000 0000 0000 */
- #define B_res6 0x8000 /* reserved for non-Opus 1000 0000 0000 0000 */
-
- struct nodeidx {
- word zone;
- word net;
- word node;
- char type;
- };
-
- struct nodeinfo {
- char type;
- word zone;
- word net;
- word node;
- char name[21];
- char city[41];
- char phone[41];
- char password[9];
- word flags;
- word baud;
- int cost;
- };
-
- /* Symbols for SPAWNIT */
-
- #define SPAWN 0
- #define EXEC 1
- #define BATCH 2
- #define DOS 3
- #define EXIT 4
- #define PRINT 5
- #define HOT 6
- #define SWAP 7
- #define SPAWNR 8
- #define DOSR 9
- #define WRITE 10
-
- /* Symbols for GPRINTF */
-
- #define MODEMONLY 1
- #define LOCALONLY 2
- #define ANSIONLY 4
- #define ASCIIONLY 8
- #define LOGONLY 16
- #define BOFEM 128
-
- /* Symbols for GENIN */
-
- #define ALLL 1
- #define ALPHA 2
- #define NUM 3
- #define ALPHANUM 4
- #define YESNO 5
- #define FLE 6
- #define FLEP 7
- #define FLEW 8
- #define FLEPW 9
- #define NAME 10
- #define NEAT 11
- #define PHONE 12
- #define DATE 13
- #define SUBJECT 14
- #define YESNOM 15
- #define FLEX 16
- #define ARROWS 17
- #define ANSIIN 18
- #define ANSISET 19
- #define FBATCH 20
- #define FBATCHW 21
- #define FBATCHWP 22
- #define FBATCHP 23
- #define TRUEANSI 24
- #define WORD 25
- #define WORDNUM 26
- #define BITS 27
- #define ANY 28
- #define ANYNOECHO 29
- #define HYPER 30
- #define THRU 31
- #define FORWINDOW 32
- #define YESNOQ 65
-
- /* EQUATES for ANSI directions */
-
- #define UPP 0
- #define DOWNN 1
- #define FORWARD 2
- #define BACK 3
-
- /* These should match...VERSION is version # * 10
- XBBS makes a check on the config file version and complains if
- it doesn't match this when loading config file. */
-
- #define XVERSION "1.17"
- #define VERSION 117
-
-
- /* Function prototypes */
-
- void pascal cls (void);
- char pascal inkey (void);
- char pascal carrchk (void);
- char pascal readfile (char *filename, char abort, char pause,char imbed);
- char pascal fossil (char function, char arg);
- char pascal printm (char *text);
- char pascal lprint (char *text);
- void pascal mprint (char *text);
- void cdecl deinitialize (void);
- char * pascal genin (char length,char password,char caps,char hot,char type);
- char * pascal addtolog (char *text);
- char * pascal getdttm (void);
- void pascal left(char *a,char *b,int x);
- void pascal right(char *a,char *b,int x);
- void pascal mid(char *a,char *b,int x,int y);
- void pascal mids(char *a,int x,int y,char *b);
- char * pascal rstrip (char *a);
- char * pascal lstrip (char *a);
- void pascal userlist (word);
- void pascal readconfig (void);
- void pascal saveconfig (void);
- void pascal logoff(void);
- void pascal prepare (void);
- char pascal specialkey(char);
- char pascal specialmod(void);
- char * pascal ansimenu(char,char,char *);
- char pascal spawnit (char *,char,char);
- void pascal assignvar (char *,char);
- void pascal chat(void);
- void pascal update(void);
- ulong pascal getxbbstime(void);
- void pascal userinfo(word,char);
- void pascal usertoggle(word);
- void pascal usertoggle2(word,char);
- void pascal city(void);
- void pascal state(void);
- void pascal phone1(void);
- void pascal phone2(void);
- void pascal length(void);
- void pascal width(void);
- void pascal password (void);
- void pascal handler(void);
- void pascal zip(void);
- char pascal filesbbs (char *,char,char *,char *);
- void pascal getonline(void);
- char * pascal saydate(struct date *);
- char * pascal saytime(struct time *);
- char * pascal convertstring (char *);
- void pascal trashcan(char *);
- void pascal hitreturn(void);
- char * pascal fidodate(void);
- word pascal readamessage(char,word);
- word pascal writemessage(char);
- int pascal askwrite(char);
- void pascal readany(char *,char *,char);
- void pascal readnew(char *,char);
- void pascal readtext(char *);
- void pascal rawdir(char *,char);
- int pascal nodelist (struct nodeidx *,char);
- char * pascal split (char *,char *);
- void pascal spit(char,char *);
- void pascal pauseit(void);
- word pascal scanmessage(char,word);
- word pascal download(char *,struct protocol *,char);
- void pascal add_one(char *);
- word pascal askdl(char *,char,char *,char);
- word pascal upload(char *,char);
- char * pascal replace(char *,char *);
- void pascal adjust_time(char);
- word pascal getentry (char *,struct protocol *);
- void pascal backup(char *);
- void pascal backupnum(int);
- word pascal tellabout(char);
- void pascal redraw_stat(char *);
- void pascal blank_stat(void);
- void pascal comptype(void);
- int cdecl break_handler(void);
- char pascal printg(char *);
- word pascal thread (word,word,char,char,char *);
- void pascal printheader(char,word,char,word);
- void pascal checkpos(void);
- char * pascal stripcr(char *);
- char * pascal getstuff (struct protocol *, char);
- void pascal gothere (char adjust,char *s,char which,struct protocol *);
- void pascal autolog(void);
- word pascal makemessage(char);
- char * pascal mci (char *);
- void pascal load_areas(char *);
- char pascal find_area (word,char);
- void pascal dobulls(char *,char);
- void pascal getline (char *);
- char * pascal say_prompt (word);
- ulong pascal check_dls (char *, word *, char);
- void pascal user_func(char *);
- word pascal find_msgarea(char *,char *,int);
- word pascal find_filearea(char *,char *,word);
- ulong pascal transfer_time(ulong,int);
- int pascal doswap (char far *, char far *);
- char * pascal readfromlist(char *,char);
- long pascal findlabel(char *,int);
- char cdecl gprintf(char,char *,...);
- int pascal get_mess(word);
- int pascal put_mess(word messno);
- char * pascal get_text(word messno);
- void pascal ffree(void *);
- void * pascal mmalloc(unsigned int);
- int pascal oopen(char *,int);
- int pascal ccreat(char *,int);
- void pascal cclose(int);
- void pascal ccloseall(void);
- void pascal ffreeall(void);
- void pascal save_lastread(void);
- void pascal load_lastread(void);
- char pascal verify_user(char *);
- void pascal do_dls(char *,long);
- void pascal do_dszlog(struct protocol *,char);
- void pascal strip_seenbys(char *);
- char * pascal write_line (char **text,word linelen,char ctla);
- void pascal strip_blanklines (char *hold);
- void pascal xijit (void);
- char pascal check4more (void);
- word pascal next_filearea (char *filename,word seclvl);
- char pascal find_protocol (struct protocol *proto,char key);
- int cdecl ffprintf(int,char *,...);
- word pascal get_abunch (word messno,char type,int direction,char *str);
- char * pascal fgetsx(char *,int,int);
- int pascal load_topics(char *tn);
- int pascal display_topic(word secl,char **b);
- void pascal getlinet(char *lineh,int fp);
- int pascal set_topic(char *s);
- char * pascal stristr(char *target,char *findme);
- char pascal ansimenu2 (char tcolor, char color, char *title, char *line, char top, char down, char *hyperhelp);
- void cdecl xdoor (char *fname,char statnum);
- void cdecl xfile (char *fname,char statnum);
- char pascal skip_blanks (int fp);
- char * pascal unpack_msg (char **hold);
- char * pascal pack_msg (char *hold);
- char pascal first_non_white (char *a);
- void pascal user_param (char a);
- char pascal change_parm (char a, word secl, long fsize, long totalbytes, word nofiles, char *b);
- char pascal system_parms (char a, char b);
- void pascal make_list (char *file,char *mask,char *includepath,char overwrite);
- char * pascal ansimenu3 (char *title, char *file, char *color);
- void pascal ansimenu4 (char *title, char *file, char *color, char *fileout, char *prepend, char overwrite);
- int pascal find_help (char *hn,char *topic,char usewindow);
- char * pascal lookup_var (char *name);
- void pascal delete_var (char *name);
- void pascal assign_var (char *name,char *str);
- void pascal free_vars (void);
- char * pascal mystrdup (char *str);
- word pascal next_msgarea (char *filename);
- /* char * pascal avatar2ansi (int av); */
- void pascal export_mail(word areano,word messno);
- int pascal do_all_msg_areas (char *msgareas,char type,char newonly,char abortok,word startat);
- char * pascal sysval (char *rest);
- void pascal setsystem (char *rest);
- char * pascal var_trans (char *str);
- word pascal finduser (char type, char *users_name);
- word pascal load_user (word num);
- word pascal save_user (word num);
- void pascal do_picks (char arg,char *b,word *lastlevel);
- int pascal isleech (char percent);
- void pascal xmenu (char *menuname);
- word pascal chk_scroll_lock (void);
- char * pascal r_just (char *str, int size);
- char * pascal center (char *line, int linlen);
- char * pascal ansi_interface (char *b);
- char pascal magazine_input (char *text);
- void pascal edit_user(char);
- void pascal sysop_shell(void);
- void pascal other_options(char);
- char * pascal do_input (char *title, char *prompt, char *mask, char *deflt, int fore, int back, int x, int y, char type);
- void pascal do_hangup(int handle);
- void pascal setup_file(char *);
- void pascal setup_msg(char *);
- char * pascal write_exit(char *);
- void pascal do_request(char *);
- void pascal do_list(char *);
- void pascal do_quote(char *);
- void pascal do_special_ANSI_input(char *);
- void pascal do_pulldowns(char *,word *);
- void pascal do_alt_addr(char *);
- void pascal change_msgpath(char *);
- char * pascal do_hyper(char *);
- void pascal do_readloop(char *);
- char * pascal do_macro_buffer(char *);
-
- /* END OF FILE: msg.h */
-