home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
270.img
/
FORUM25C.ZIP
/
GENTYPES.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-02-11
|
13KB
|
522 lines
{$R-,S-,I-,V-,B-,N-,L- }
unit gentypes;
{/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
interface
USES Overlay,
dos;
{/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
CONST Versionnum : string[20] = 'Forum-PC 2.5c';
thisversioncode = 1;
Title_delay = 250; { 250 for normal, 5000 for demo}
maxusers = 30000; { Change to 10 For Demo }
maxmessagesize = 100;
maxlastcallers = 20;
maxtopics = 10;
maxcats = 10;
sectorsize = 512;
numsectors = 10000;
maxcatalogsize = 50;
maxgroupsize = 50;
maxsyslogdat = 125;
maxsyslogsize = 1000;
MaxTopPosters = 10;
e_door = 3;
e_controlbreak = 9;
e_Extended_code = 12;
{ All of these are extEnded keystroke values. }
breakoutchar = 0; {Control-Break}
chatchar = 59; {F1}
sysopcomchar = 60; {F2}
sysnextchar = 65; {F7}
timelockchar = 66; {F8}
inlockchar = 67; {F9}
outlockchar = 68; {F10}
printerechochar = 114; {Ctrl-PrtSc}
availtogglechar = 30; {Alt-A}
bottomchar = 48; {Alt-B}
texttrapchar = 18; {Alt-E}
sysophelpchar = 35; {Alt-H}
notimechar = 37; {Alt-K}
lesstimechar = 38; {Alt-L}
moretimechar = 50; {Alt-M}
tempsysopchar = 20; {Alt-T}
viewstatchar = 47; {Alt-S}
TYPE anystr = string[255];
lstr = string[80];
mstr = string[30];
sstr = string[15];
accesstype = (bylevel,keepout,letin,invalid);
availtype = (available,bytime,notavailable);
configtype = (lowercase,eightycols,linefeeds,postprompts,
moreprompts,asciigraphics,ansigraphics,udsysop,
bulletinsysop,votingsysop,emailsysop,doorssysop,
mainsysop,databasesysop,wanted,showtime,vt52,
fseditor,ExtClrScr);
groupclass = (publicgroup,privategroup,personalgroup);
voteset = array [1..maxtopics] of byte;
boardorder = array [0..255] of byte;
TYPE userrec = RECORD
handle : mstr;
password : sstr;
phonenum : string[10];
laston : longint;
numon,
timetoday,
nup,
ndn,
nbu,
uploads,
downloads : integer;
totaltime : real;
voted : voteset;
udlevel,
udpoints,
level,
emailannounce,
beepedpwd,
infoform : integer;
regularcolor,
promptcolor,
statcolor,
inputcolor,
displaylen : byte;
config : set of configtype;
newscanconfig,
access1,
access2 : set of byte;
lastread : array [0..255] of word
End;
userspecsrec = RECORD
name : mstr;
minlevel,
maxlevel,
minlaston,
maxlaston : integer;
minpcr,
maxpcr : real
End;
boardrec = RECORD
boardname,
sponsor : mstr;
level,
autodel : integer;
shortname : sstr
End;
bulrec = RECORD
title,
leftby : mstr;
when : longint;
anon : boolean;
line,
plevel : integer;
id : word
End;
filerec = RECORD
descrip,
fname : lstr;
sentby : mstr;
when : longint;
downloaded : integer
End;
mailrec = RECORD
title : Mstr;
sentby : INTEGER;
when : longint;
anon,
read : boolean;
sentto,
line,
fileindex : integer;
AnonPost : BOOLEAN;
End;
abrec = RECORD
title,
fname : lstr;
level : integer;
when : longint
End;
catalogrec = RECORD
nummail,
additional : integer;
mail : array [1..maxcatalogsize] of mailrec
End;
grouprec = RECORD
name : mstr;
class : groupclass;
creator,
nummembers : integer;
members : array [1..maxgroupsize] of integer
End;
message = RECORD
text : array [1..maxmessagesize] of lstr;
title : mstr;
anon : boolean;
numlines : integer
End;
topicrec = RECORD
topicname : lstr;
numvoted,
addlevel : integer;
mandatory : boolean
End;
choicerec = RECORD
choice : lstr;
numvoted : integer
End;
lastrec = RECORD
name : mstr;
callnum : longint;
when : longint
End;
buffer = array [1..sectorsize] of char;
baserec = RECORD
numcats,
numents,
level : integer;
basename : mstr;
catnames : anystr
End;
entryrec = RECORD
data : anystr;
when : longint;
addedby : integer
End;
parsedentry = array [1..maxcats] of anystr;
udrec = RECORD
sentby : mstr;
when,
whenrated : longint;
filename : sstr;
path : string[50];
points : integer;
filesize : longint;
descrip : lstr;
downloaded : integer;
newfile,
specialfile : boolean
End;
arearec = RECORD
name,
xmodemdir : lstr;
sponsor : mstr;
level : integer
End;
windowrec = RECORD
x1, y1, x2, y2,
cx, cy, color : byte
End;
fib = textrec;
doorrec = RECORD
name : mstr;
level,
numused,
info : integer;
batchname : lstr;
getparams : boolean;
End;
minuterec = RECORD
started : boolean;
startedat : integer;
total : real
End;
logrec = RECORD
menu,
subcommand : integer;
param : string[41];
when : longint
End;
syslogdatrec = RECORD
menu,
subcommand : integer;
text : mstr
End;
baudratetype = (b110,b300,b450,b600,b1200,b2400,b4800,b9600);
baudset = set of baudratetype;
CONST baudarray : array [b110..b9600] of integer =
(110,300,450,600,1200,2400,4800,9600);
CONST firstbaud = b110;
lastbaud = b9600;
{=== CONFIGRT.PAS Types and vars === }
VAR versioncode : byte;
longname,
shortname,
sysopname,
forumdir,
textdir,
uploaddir,
boarddir,
overlaypath,
asciidownload,
textfiledir,
doordir,
modemsetupstr,
modemhangupstr,
modemdialprefix,
modemdialsuffix : lstr;
defbaudrate,
usecom,
anonymouslevel,
numwelcomes,
mintimeout,
sysoplevel,
defudlevel,
defudpoints,
normbotcolor,
normtopcolor,
outlockcolor,
splitcolor,
statlinecolor,
uploadfactor : integer;
private,
autologin,
useconmode,
escinmsgs,
bkspinmsgs,
requireforms : boolean;
dotchar : char;
supportedrates,
downloadrates : baudset;
availtime,
unavailtime,
xmodemopentime,
xmodemclosetime : sstr;
usertime : array [1..100] of integer;
level2nd,
udlevel2nd,
udpoints2nd,
postlevel : integer;
anonymousstr,
systempassword : mstr;
remotedoors,
allowdoors : boolean;
eventtime,
eventbatch : sstr;
directvideomode,
checksnowmode : boolean;
NewUserLevel : INTEGER;
Overlay_size : INTEGER;
Keep_Top_ten : BOOLEAN;
User_name_prompt : LStr;
MaxLoginTries : INTEGER;
DataBaseLevel : INTEGER;
VotingLevel : INTEGER;
FileLevel : INTEGER;
EmailLevel : INTEGER;
BulletinLevel : INTEGER;
AboutLevel : INTEGER;
filler : ARRAY[1..400] OF BYTE;
TYPE Configsettype = ARRAY[1..2048] OF CHAR;
VAR configset : configsettype Absolute versioncode;
{===== SUBS1.PAS Types and Vars =====}
VAR firstvariable : byte;
local,
online,
chatmode,
disconnected : boolean;
unum,
ulvl,
baudrate : integer;
unam : mstr;
baudstr : sstr;
parity : boolean;
urec : userrec;
logontime,
logofftime,
logonunum : integer;
laston : longint;
dots,
nochain,
break,
xpressed,
requestbreak,
forcehangup,
modeminlock,
modemoutlock,
timelock,
tempsysop,
splitmode,
fromdoor,
texttrap,
printerecho,
uselinefeeds,
usecapsonly,
dontstop,
nobreak,
wordwrap,
beginwithspacesok,
sysnext,
ingetstr : boolean;
regularlevel,
numusers,
curboardnum,
lasty,
linecount,
curattrib,
firstfree,
lockedtime,
iocode,
buflen : integer;
screenseg : word;
cursection : configtype;
curboardname : sstr;
input,
chainstr : anystr;
chatreason,
lastprompt,
errorparam,
errorproc : lstr;
curboard : boardrec;
syslogdat : array [0..maxsyslogdat] of syslogdatrec;
numsyslogdat : integer;
returnto : char;
LastVariable : BYTE;
usr,
direct,
directin : text;
const numsysfiles = 19;
VAR
tfile : file of buffer;
mapfile : file of integer;
ufile : file of userrec;
mfile : file of mailrec;
udfile : file of udrec;
afile : file of arearec;
bfile : file of bulrec;
bdfile : file of boardrec;
bifile : file of sstr;
ffile : file of filerec;
tofile : file of topicrec;
chfile : file of choicerec;
ddfile : file of baserec;
efile : file of entryrec;
dofile : file of doorrec;
gfile : file of grouprec;
logfile : file of logrec;
abfile : file of abrec;
usfile : file of userspecsrec;
sysfiles : array [1..numsysfiles] of file absolute tfile;
ttfile : text;
TYPE Chat_Procedure_type = Procedure;
Command_Procedure_type = Procedure;
Top_poster_Rec = RECORD
User_name : Mstr;
Num_posts : WORD;
End;
Top_poster_type = ARRAY[1..MaxTopPosters] OF Top_poster_rec;
VAR Chat_proc : Chat_Procedure_type;
Command_proc : Command_Procedure_type;
InChat : BOOLEAN;
Ext_code : SHORTINT;
Top_Post_file : FILE OF Top_poster_type;
{/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
implementation
{/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
{/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
{initialization}
{/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
VAR Save_exit : POINTER;
{$F+}
Procedure Error_handler;
VAR Error_str : Lstr;
Begin
ExitProc := Save_exit;
If ExitCode = e_Extended_code THEN
Begin
Case Ext_code OF
-1 : Writeln(USR,'Overlay manager error');
-2 : Begin
Writeln(USR,'Overlay file not found');
End;
1 : Begin
writeln (USR,'The modem driver is not installed! Please run the',
'program'^M^J^M^J' MODEMDRV.COM'^M^J^M^J,
'and run Forum-PC again.');
ExitCode := 2;
End;
2 : Begin
writeln (USR,^M^J'Fatal error: You MUST put the command',
^M^J^J' FILES=30',
^M^J^J'in your CONFIG.SYS file on the disk from which you boot.',
^M^J^J'Note: If you have been modifying Forum-PC, then you may',
^M^J' be leaving a file open.');;
End;
End;
End;
End;
Begin
DataBaseLevel := 0;
VotingLevel := 0;
FileLevel := 0;
EmailLevel := 0;
BulletinLevel := 0;
AboutLevel := 0;
End.