home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
MAXMAILP.ZIP
/
MAXMAIL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-24
|
5KB
|
161 lines
/****************************************************************************/
/* */
/* Maxmail.h : Main include file */
/* MaxMail, a message utility for Maximus CBBCS */
/* ARCHIVE current new messages for users download */
/* */
/****************************************************************************/
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <dos.h>
#include <fcntl.h>
#include <errno.h>
#include <malloc.h>
#include <memory.h>
#include <direct.h>
#include <process.h>
#include <time.h>
#include <share.h>
#include <sys\locking.h>
#include "compiler.h"
#include "prog.h"
#include "max.h"
#include "foslib.h"
#include "swap.h"
/* Packer information linked list structure */
struct packer_st {
char *packname; /* Sysop defined description string for packer */
char *packexe; /* Actual 12 character filename for packer */
char *packstring; /* Command line for executing packer */
char *packpname; /* 12 char filename for packed file */
char *viewstring; /* COmmand line for viewing packed file */
struct packer_st *next;
};
struct proto_st {
char *protoname; /* Sysop defined description string for protocol */
char *protoexe; /* Actual 12 character filename for portocol */
char *protostring; /* Command line for executing protocol */
struct proto_st *next;
};
/* Message update linked list structure */
struct msgupd_st { /* Maximus uses this to update lastuser file */
word areano;
byte msgpath[80];
word msgcount;
word startmsg;
word himsg;
int update;
word readmsgs;
long areaindex;
struct msgupd_st *next;
};
/* Message header structure */
struct msghead {
byte from[36];
byte ourname[36];
byte subject[72];
word ourmail;
int *answers;
};
/* User configuration structure */
struct user_cfg {
byte name[36]; /* Same as in User file */
byte isused; /* 1 if used, 0 if not */
word msgarea1[64]; /* Bitmap for active user areas, allows for 1000 areas! */
/* If bit is set, area should be scanned,
1st bit = area 1, etc */
char cfgname1[13]; /* User defined name for configuration */
/* User must have some 12 character name for this
set, he can recall it later, If name is NULL
force a reconfiguration */
word msgarea2[64]; /* Alternate bitmap for active user areas */
char cfgname2[13]; /* User defined name for configuration */
byte lastpack[19]; /* ASCII date of last time we used this */
time_t lasttime; /* Unix compat time of last logon */
word packcount; /* How many times we have used this */
byte protocol; /* Default protocol type, if 0 always ask */
/* This is index into proto types in config file */
byte packer; /* Packer type: If 0, no packing */
/* This is index into packer types in config file */
word flags; /* Various user flags */
word calls; /* # of times we have called */
word msgfrmt; /* Message format, 0: Text, 1: QWK */
word totareas; /* Total possible areas */
word resvd[29]; /* Reserved for future */
};
/* Global definitions */
#define Version 1.00
#define HEAP_SIZE 0x2000
#define TEST 1 /* Disconnect some things for test mode */
#define IDLETIME 3 /* # of minutes to allow for idle input */
/* Log Modes */
#define TERSE 1
#define VERBOSE 2
/* Error codes */
#define BADALLOC 1
#define BADEXEC 2
#define FILEOPEN 3
#define FILECREATE 4
#define FILEWRITE 5
#define DROPCARRIER 6
#define USERIDLE 7
/* Some default MESSAGE definitions */
#define MAXFMSGS 999 /* Maximum # of Fido messages to scan for */
#define MAXFMSGSIZ 1024 * 32 /* Maximum message size, 32K */
#define SOFT '\215'
#define SEEN "SEEN-BY:"
#define ESC '\033'
/* Message flags */
#define PRIVATE 0x0002
#define SCREEN 0x0004
#define KILL 0x0008
#define KLUDGE 0x0010
#define JUNK 0x0020
#define RANGING 0x1000
#define HIGH 0x2000
#define LASTREAD 0x4000
#define LASTREAD_UPD 0x0001
#define USRCFG_UPD 0x0002
#define USRCFG_FUPD 0x0004
/* Error definitions */
#define NOT_INITIALIZED -1
#define MEMORY_ALLOC_ERR -2
#define FILE_READ_ERR -3
#define FILE_SRCH_ERR -4
#define FILE_OPEN_ERR -5
#define FILE_WRITE_ERR -6
#define PVTMSG_ERR -7
#include "globals.h"
#include "protos.h"