home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
OTHERUTI
/
WWIV412S.ZIP
/
VARDEC.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-07-15
|
18KB
|
578 lines
#ifndef _VARDEC_H_
#define _VARDEC_H_
/*****************************************************************************
WWIV Version 4
Copyright (C) 1988 by Wayne Bell
Distribution of the source code for WWIV, in any form, modified or unmodified,
without PRIOR, WRITTEN APPROVAL by the author, is expressly prohibited.
Distribution of compiled versions of WWIV is limited to copies compiled BY
THE AUTHOR. Distribution of any copies of WWIV not compiled by the author
is expressly prohibited.
*****************************************************************************/
/* These are the variable type declarations. There are a few things you
* should note while reading these:
*
* unsigned char = 8 bits
* unsigned short= 16 bits
* unsigned long = 32 bits
* float = 32 bits floating point
*
* You will notice that usually there are two "unsigned char" declarations.
* The reason for this is that the first group of unsigned char variables are
* taken to be actual character. The second group are using "unsigned char"
* as a numeric variable of 8 bits long.
*
* All variables are declared to be unsigned (excepting float, of course).
* The reason is that most variables have meaning only for positive numbers,
* so allowing negative values would cut the number of valid values in half,
* wasting one bit (oh no!). Many people will say, "Why bother?", but since
* the negatives aren't used anyway, might as well allow the whole range of
* postive values.
*/
/* DATA FOR EVERY USER */
typedef struct {
char name[31], /* user's name */
realname[21], /* user's real name */
callsign[7], /* user's amateur callsign */
phone[13], /* user's phone number */
pw[9], /* user's password */
laston[9], /* last date on */
firston[9], /* first date on */
note[41], /* sysop's note about user */
macros[3][81], /* macro keys */
sex; /* user's sex */
unsigned char age, /* user's age */
inact, /* if deleted or inactive */
comp_type, /* computer type */
defprot, /* deflt transfer protocol */
defed, /* default editor */
screenchars,screenlines,/* screen size */
sl, /* security level */
dsl, /* transfer security level */
exempt, /* exempt from ratios, etc */
colors[8], /* user's colors */
votes[20], /* user's votes */
illegal, /* illegal logons */
waiting, /* number mail waiting */
sysopsub, /* sysop sub board number */
ontoday; /* num times on today */
unsigned short homeuser,homesys, /* where user can be found */
forwardusr,forwardsys, /* where to forward mail */
msgpost, /* number messages posted */
emailsent, /* number of email sent */
feedbacksent, /* number of f-back sent */
posttoday, /* number posts today */
etoday, /* number emails today */
ar, /* board access */
dar, /* directory access */
restrict, /* restrictions on account */
ass_pts, /* bad things the user did */
uploaded, /* number files uploaded */
downloaded, /* number files downloaded */
lastrate, /* last baud rate on */
logons; /* total number of logons */
unsigned long msgread, /* total num msgs read */
uk, /* number of k uploaded */
dk, /* number of k downloaded */
qscn, /* which subs to n-scan */
qscnptr[33], /* q-scan pointers */
nscn1,nscn2, /* which dirs to n-scan */
daten, /* numerical time last on */
sysstatus; /* status/defaults */
float timeontoday, /* time on today */
extratime, /* time left today */
timeon, /* total time on system */
pos_account, /* $ credit */
neg_account, /* $ debit */
gold; /* game money */
unsigned char bwcolors[8]; /* b&w colors */
unsigned char month,day,year; /* user's birthday */
unsigned int emailnet, /* email sent into net */
postnet; /* posts sent into net */
unsigned short fsenttoday1; /* feedbacks today */
unsigned char num_extended; /* num lines of ext desc */
unsigned char optional_val; /* optional lines in msgs */
char res[33]; /* reserved bytes */
} userrec;
/* SECLEV DATA FOR 1 SL */
typedef struct {
unsigned short time_per_day, /* time allowed on per day */
time_per_logon, /* time allowed on per logon */
messages_read, /* messages allowed to read */
emails, /* number emails allowed */
posts; /* number posts allowed */
unsigned long ability; /* bit mapped abilities */
} slrec;
/* AUTO-VALIDATION DATA */
typedef struct {
unsigned char sl, /* SL */
dsl; /* DSL */
unsigned short ar, /* AR */
dar, /* DAR */
restrict; /* restrictions */
} valrec;
typedef struct {
char extension[4], /* extension for archive */
arca[32],
arce[32],
arcl[32];
} arcrec;
/* STATIC SYSTEM INFORMATION */
typedef struct {
char newuserpw[21], /* new user password */
systempw[21], /* system password */
msgsdir[81], /* path for msgs directory */
gfilesdir[81], /* path for gfiles dir */
datadir[81], /* path for data directory */
dloadsdir[81], /* path for dloads dir */
ramdrive, /* drive for ramdisk */
tempdir[81], /* path for temporary directory */
resx[84], /* reserved for never */
bbs_init_modem[51], /* modem initialization cmd */
answer[21], /* modem answer cmd */
connect_300[21], /* modem responses for */
connect_1200[21], /* connections made at */
connect_2400[21], /* various speeds */
connect_9600[21],
connect_19200[21],
no_carrier[21], /* modem disconnect */
ring[21], /* modem ring */
terminal[21], /* DOS cmd for run term prg */
systemname[51], /* BBS system name */
systemphone[13], /* BBS system phone number */
sysopname[51], /* sysop's name */
executestr[51]; /* mail route path name */
unsigned char newusersl, /* new user SL */
newuserdsl, /* new user DSL */
maxwaiting, /* max mail waiting */
comport[5], /* what connected to comm */
com_ISR[5], /* Com Interrupts */
primaryport, /* primary comm port */
newuploads, /* file dir new uploads go */
closedsystem; /* if system is closed */
unsigned short systemnumber, /* BBS system number */
baudrate[5], /* Baud rate for com ports */
com_base[5], /* Com base addresses */
maxusers, /* max users on system */
newuser_restrict, /* new user restrictions */
sysconfig, /* System configuration */
sysoplowtime, /* Chat time on */
sysophightime, /* Chat time off */
executetime; /* time to run mail router */
float req_ratio, /* required up/down ratio */
newusergold; /* new user gold */
slrec sl[256]; /* security level data */
valrec autoval[10]; /* sysop quik-validation data*/
char hangupphone[21], /* string to hang up phone */
pickupphone[21]; /* string to pick up phone */
unsigned int netlowtime, /* net time on */
nethightime; /* net time off */
char connect_300_a[21], /* alternate connect str's */
connect_1200_a[21],
connect_2400_a[21],
connect_9600_a[21],
connect_19200_a[21];
arcrec arcs[4];
char beginday_c[51],
logon_c[51];
int userreclen,
waitingoffset,
inactoffset;
char newuser_c[51];
unsigned long wwiv_reg_number;
char dial_prefix[21];
float post_call_ratio;
char upload_c[51];
char dszbatchdl[81];
char res[129]; /* RESERVED */
} configrec;
/* DYNAMIC SYSTEM STATUS */
typedef struct {
char date1[9], /* last date active */
date2[9], /* date before now */
date3[9], /* two days ago */
log1[13], /* yesterday's log */
log2[13], /* two days ago log */
gfiledate[9], /* date gfiles last updated */
resx[9]; /* reserved for nothing */
unsigned short users, /* Current number of users */
callernum, /* Current caller number */
callstoday, /* Number of calls today */
msgposttoday, /* Messages posted today*/
emailtoday, /* Email sent today */
fbacktoday, /* Feedback sent today */
uptoday, /* files uploaded today */
activetoday; /* Minutes active today */
unsigned long qscanptr; /* Q-scan pointer value */
char amsganon; /* auto-message anony stat */
unsigned short amsguser; /* user who wrote a-msg */
unsigned long callernum1; /* caller number */
unsigned int net_edit_stuff; /* word for net editor */
unsigned int wwiv_version; /* tell what version it is */
unsigned int net_version; /* tell what version of net */
float net_bias; /* network bias factor */
long last_connect, /* date last connect.net */
last_bbslist; /* date last bbslist.net */
float net_req_free; /* net free factor def 3 */
char res[31]; /* RESERVED */
} statusrec;
/* MESSAGE BASE INFORMATION */
typedef struct {
char name[41], /* board name */
filename[9], /* board database filename */
key; /* board special key */
unsigned char readsl, /* sl required to read */
postsl, /* sl required to post */
anony, /* anonymous board? */
age; /* minimum age for sub */
unsigned short maxmsgs, /* max # of msgs */
ar, /* AR for sub-board */
storage_type, /* how messages are stored */
type; /* 4 digit board type */
} subboardrec;
/* UPLOAD DIRECTORY INFORMATION */
typedef struct {
char name[41], /* directory name */
filename[9], /* direct database filename */
path[81]; /* filename path */
unsigned char dsl, /* DSL for directory */
age; /* minimum age for directory */
unsigned short dar, /* DAR for directory */
maxfiles, /* max files for directory */
mask, /* file type mask */
type; /* 4 digit directory type */
} directoryrec;
/* QUICK REFERNCE TO FIND USER NUMBER FROM NAME */
typedef struct {
char name[31];
unsigned short number;
} smalrec;
/* TYPE TO TELL WHERE A MESSAGE IS STORED */
typedef struct {
unsigned char storage_type; /* how it is stored */
unsigned long stored_as; /* where it is stored */
} messagerec;
/* DATA HELD FOR EVERY POST */
typedef struct {
char title[81]; /* title of post */
unsigned char anony, /* anony-stat of message */
status; /* bit-mapped status */
unsigned short ownersys,owneruser; /* who posted it */
unsigned long qscan, /* qscan pointer */
daten; /* numerical date posted */
messagerec msg; /* where to find it */
} postrec;
/* DATA HELD FOR EVERY E-MAIL OR F-BACK */
typedef struct {
char title[81]; /* E-mail title */
unsigned char anony, /* anonymous mail? */
status; /* status for e-mail */
unsigned short fromsys,fromuser, /* originating system,user */
tosys,touser; /* destination system,user */
unsigned long daten; /* date it was sent */
messagerec msg; /* where to find it */
} mailrec;
/* SHORT RESPONSE FOR USER, TELLING HIS MAIL HAS BEEN READ */
typedef struct {
char message[81]; /* short message to user */
unsigned short tosys,touser; /* who it is to */
} shortmsgrec;
/* VOTING RESPONSE DATA */
typedef struct {
char response[81]; /* Voting question response */
unsigned short numresponses; /* number of responses */
} voting_response;
/* VOTING DATA INFORMATION */
typedef struct {
char question[81]; /* Question */
unsigned char numanswers; /* number of responses */
voting_response responses[20]; /* actual responses */
} votingrec;
/* DATA HELD FOR EVERY UPLOAD */
typedef struct {
char filename[13], /* filename */
description[59], /* file description */
date[9], /* date u/l'ed */
upby[46]; /* name of upload user */
unsigned char filetype; /* file type for apples */
unsigned short numdloads, /* number times d/l'ed */
ownersys,ownerusr, /* who uploaded it */
mask; /* file type mask */
unsigned long daten, /* date uploaded */
numbytes; /* number bytes long file is */
} uploadsrec;
/* ZLOG INFORMATION FOR PAST SYSTEM USAGE */
typedef struct {
char date[9]; /* zlog for what date */
unsigned short active, /* number minutes active */
calls, /* number calls */
posts, /* number posts */
email, /* number e-mail */
fback, /* number f-back */
up; /* number uploads */
} zlogrec;
/* DATA FOR OTHER PROGRAMS AVAILABLE */
typedef struct {
char filename[81], /* filename for .chn file */
description[81]; /* description of it */
unsigned char sl, /* seclev restriction */
ansir; /* if ANSI required */
unsigned short ar; /* AR restriction */
} chainfilerec;
/* DATA FOR EXTERNAL PROTOCOLS */
typedef struct {
char description[81], /* protocol description */
receivefn[81], /* receive filename */
sendfn[81]; /* send filename */
unsigned short ok1,ok2, /* if sent */
nok1,nok2; /* if not sent */
} externalrec;
/* DATA FOR EXTERNAL EDITORS */
typedef struct {
char description[81], /* description of editor */
filename[81]; /* how to run the editor */
unsigned long config; /* configuration for editor */
char filenamecon[81]; /* how to run locally */
char res[119];
} editorrec;
/* DATA FOR CONVERSION OF MAIN MENU KEYS TO SUB-BOARD NUMBERS */
typedef struct {
char keys[3];
int subnum;
} usersubrec;
typedef struct {
char sending;
char filename[13];
short dir;
float time;
long len;
} batchrec;
/* userrec.inact */
#define inact_deleted 0x01
#define inact_inactive 0x02
/* userrec.exempt */
#define exempt_ratio 0x01
#define exempt_time 0x02
#define exempt_all 0x04
#define exempt_post 0x08
/* userrec.restrict */
#define restrict_logon 0x0001
#define restrict_chat 0x0002
#define restrict_validate 0x0004
#define restrict_automessage 0x0008
#define restrict_anony 0x0010
#define restrict_post 0x0020
#define restrict_email 0x0040
#define restrict_vote 0x0080
#define restrict_auto_msg_delete 0x0100
#define restrict_net 0x0200
#define restrict_upload 0x0400
#define restrict_string "LCMA*PEVKNU "
/* userrec.sysstatus */
#define sysstatus_ansi 0x0001
#define sysstatus_color 0x0002
#define sysstatus_music 0x0004
#define sysstatus_pause_on_page 0x0008
#define sysstatus_expert 0x0010
#define sysstatus_smw 0x0020
#define sysstatus_full_screen 0x0040
#define sysstatus_nscan_file_system 0x0080
#define sysstatus_funky_colors 0x0100
#define sysstatus_clr_scrn 0x0200
/* slrec.ability */
#define ability_post_anony 0x0001
#define ability_email_anony 0x0002
#define ability_read_post_anony 0x0004
#define ability_read_email_anony 0x0008
#define ability_limited_cosysop 0x0010
#define ability_cosysop 0x0020
#define ability_val_net 0x0040
/* subboardrec.anony */
#define anony_enable_anony 0x01
#define anony_enable_dear_abby 0x02
#define anony_force_anony 0x04
#define anony_real_name 0x08
#define anony_val_net 0x10
#define anony_ansi_only 0x20
#define anony_no_tag 0x40
/* postrec.anony, mailrec.anony */
#define anony_sender 0x01
#define anony_sender_da 0x02
#define anony_sender_pp 0x03
#define anony_receiver 0x10
#define anony_receiver_da 0x20
#define anony_receiver_pp 0x30
/* directoryrec.mask */
#define mask_PD 0x0001
#define mask_no_uploads 0x0004
#define mask_archive 0x0008
#define mask_extended 0x8000
/* postrec.status */
#define status_unvalidated 0x01
#define status_delete 0x02
#define status_no_delete 0x04
#define status_pending_net 0x08
/* mailrec.status */
#define status_multimail 0x01
/* configrec.sysconfig */
#define sysconfig_no_local 0x0001
#define sysconfig_no_beep 0x0002
#define sysconfig_high_speed 0x0004
#define sysconfig_off_hook 0x0008
#define sysconfig_two_color 0x0010
#define sysconfig_flow_control 0x0020
#define sysconfig_printer 0x0040
#define sysconfig_list 0x0080
#define sysconfig_no_xfer 0x0100
#define sysconfig_2_way 0x0200
#define sysconfig_no_alias 0x0400
#define sysconfig_all_sysop 0x0800
#define sysconfig_shrink_term 0x1000
#define sysconfig_free_phone 0x2000
/* editorrec.config */
#define config_80_25 0x0001
#define ansir_ansi 0x01
#define ansir_no_DOS 0x02
#define ansir_no_300 0x04
#define ansir_shrink 0x08
#define ansir_no_pause 0x10
#define PREV 1
#define NEXT 2
#define DONE 4
#define NUM_ONLY 1
#define UPPER_ONLY 2
#define ALL 4
#define SET 8
struct line {
char text[160];
struct line *prev,*next;
};
typedef struct {
int x1,y1,topline1,curatr1;
char *scrn1;
} screentype;
typedef struct{
char name[13];
int len;
} ext_desc_type;
typedef struct {
char name[41], /* g-file section name */
filename[9]; /* g-file database filename */
unsigned char sl, /* sl required to read */
age; /* minimum age for section */
unsigned short maxfiles, /* max # of files */
ar; /* AR for g-file section */
} gfiledirrec;
typedef struct {
char description[81], /* description of file */
filename[13]; /* filename of file */
long daten; /* date added */
} gfilerec;
typedef struct {
char curspeed[23]; /* description of speed */
char return_code[23]; /* modem result code */
unsigned short modem_speed, /* speed modems talk at */
com_speed; /* speed com port runs at */
} resultrec;
#define NUM_CTYPES 10
#define VERSION_NUMBER "WWIV v4.12"
#define max_buf 1024
#define VER_VECT 0x6a
#define MSG_COLOR 0
#define MAX_BATCH 50
#endif