Skip to content

Commit

Permalink
Tons of changes from trip to Charlotte over Thanksgiving. See CHANGELOG.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Nov 25, 2000
1 parent c628aff commit d325f98
Show file tree
Hide file tree
Showing 95 changed files with 510 additions and 171 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG
@@ -1,3 +1,22 @@
2000-11-24 Ryan C. Gordon <icculus@lokigames.com>
* Aha! I think I stumbled upon the keypressed() problem. Looks like a
piece of the overlay code was still in there and causing problems.
Will investigate more some other time. Ugh.
* Changed timer() in common.pas to not use int21h services.
* Lots more DOSisms removed. Did a grep for the DOS backslash pathchar.
* Added TODO.
* Hack for Y2K bug in ageuser() (common.pas).
* Changed all implementations of exdrv(). So much code duplication...
* Lots of the system seems to be working, now, at first glance.

2000-11-23 Ryan C. Gordon <icculus@lokigames.com>

* Oh my god. Almost every damn source file has {$D-} in it, which
turns off debugging symbols. Removed, and now I can run bbs under
GDB. Thank heavens. I wonder if {$D-} means something different under
Turbo Pascal 6.0...in fact, there's a lot of these sort of things in
the source that should probably be controlled via the Makefile instead.

2000-11-18 Ryan C. Gordon <icculus@lokigames.com>

* Stubbed DOSism in file2.pas.
Expand Down
96 changes: 82 additions & 14 deletions archive1.pas
@@ -1,4 +1,4 @@
{$A+,B+,D-,E+,F+,I+,L-,N-,O+,R-,S+,V-}
{$A+,B+,E+,F+,I+,L-,N-,O+,R-,S+,V-}
unit archive1;

interface
Expand Down Expand Up @@ -40,7 +40,9 @@ procedure purgedir(s:astr); {* erase all non-dir files in dir *}
att:word;
begin
s:=fexpand(s);
while copy(s,length(s),1)='\' do s:=copy(s,1,length(s)-1);
{rcg11242000 DOSism}
{while copy(s,length(s),1)='\' do s:=copy(s,1,length(s)-1);}
while copy(s,length(s),1)='/' do s:=copy(s,1,length(s)-1);
getdir(0,odir); getdir(exdrv(s),odir2);
chdir(s);
findfirst('*.*',AnyFile-Directory,dirinfo);
Expand All @@ -62,12 +64,20 @@ function arcmci(src,fn,ifn:astr):astr;

procedure arcdecomp(var ok:boolean; atype:integer; fn,fspec:astr);
begin
purgedir(systat.temppath+'1\');
{rcg11242000 DOSism.}
{purgedir(systat.temppath+'1\');}
purgedir(systat.temppath+'1/');

shel1;
{rcg11242000 DOSism.}
{
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1\',
arcmci(systat.filearcinfo[atype].unarcline,fn,fspec),
systat.filearcinfo[atype].succlevel);
}
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1/',
arcmci(systat.filearcinfo[atype].unarcline,fn,fspec),
systat.filearcinfo[atype].succlevel);
shel2;

if (not ok) then
Expand All @@ -81,15 +91,23 @@ procedure arccomp(var ok:boolean; atype:integer; fn,fspec:astr);
*}
begin
shel1;
{rcg11242000 DOSism.}
{
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1\',
arcmci(systat.filearcinfo[atype].arcline,fn,fspec),
systat.filearcinfo[atype].succlevel);
}
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1/',
arcmci(systat.filearcinfo[atype].arcline,fn,fspec),
systat.filearcinfo[atype].succlevel);
shel2;

if (not ok) then
sysoplog('Archive "'+fn+'": Errors during compression');

purgedir(systat.temppath+'1\');
{rcg11242000 DOSism.}
{purgedir(systat.temppath+'1\');}
purgedir(systat.temppath+'1/');
end;

procedure arccomment(var ok:boolean; atype,cnum:integer; fn:astr);
Expand All @@ -104,9 +122,16 @@ procedure arccomment(var ok:boolean; atype,cnum:integer; fn:astr);

shel1;
b:=systat.swapshell; systat.swapshell:=FALSE;

{rcg11242000 DOSism.}
{
execbatch(ok,FALSE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1\',
arcmci(systat.filearcinfo[atype].cmtline,fn,'')+' <'+tfn,
systat.filearcinfo[atype].succlevel);
}
execbatch(ok,FALSE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1/',
arcmci(systat.filearcinfo[atype].cmtline,fn,'')+' <'+tfn,
systat.filearcinfo[atype].succlevel);
systat.swapshell:=b;
shel2;

Expand All @@ -118,9 +143,15 @@ procedure arcintegritytest(var ok:boolean; atype:integer; fn:astr);
begin
if (systat.filearcinfo[atype].testline<>'') then begin
shel1;
{rcg11242000 DOSism.}
{
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1\',
arcmci(systat.filearcinfo[atype].testline,fn,''),
systat.filearcinfo[atype].succlevel);
}
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1/',
arcmci(systat.filearcinfo[atype].testline,fn,''),
systat.filearcinfo[atype].succlevel);
shel2;
end;
end;
Expand Down Expand Up @@ -203,7 +234,9 @@ procedure extracttotemp;
nl;
prompt('Already in TEMP: ');
numfiles:=0; tsiz:=0;
findfirst(systat.temppath+'3\*.*',anyfile-dos.directory,dirinfo);
{rcg11242000 DOSism.}
{findfirst(systat.temppath+'3\*.*',anyfile-dos.directory,dirinfo);}
findfirst(systat.temppath+'3/*.*',anyfile-dos.directory,dirinfo);
found:=(doserror=0);
while (found) do begin
inc(tsiz,dirinfo.size);
Expand Down Expand Up @@ -325,9 +358,15 @@ procedure extracttotemp;
ok:=TRUE;
s:=sqoutsp(s);
shel1;
{rcg11242000 DOSism}
{
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'3\',
arcmci(systat.filearcinfo[atype].unarcline,fn,s),
systat.filearcinfo[atype].succlevel);
}
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'3/',
arcmci(systat.filearcinfo[atype].unarcline,fn,s),
systat.filearcinfo[atype].succlevel);
shel2;

if (not ok) then begin
Expand All @@ -342,7 +381,9 @@ procedure extracttotemp;
until (done) or (hangup);
end;
if (tocopy) then begin
s:=systat.temppath+'3\'+ns+es; (*sqoutsp(f.filename);*)
{rcg11242000 DOSism.}
{s:=systat.temppath+'3\'+ns+es; (*sqoutsp(f.filename);*)}
s:=systat.temppath+'3/'+ns+es; (*sqoutsp(f.filename);*)
sprompt(#3#5+'Progress: ');
copyfile(ok,nospace,TRUE,fn,s);
if (ok) then
Expand Down Expand Up @@ -405,7 +446,9 @@ procedure userarchive;
'A':begin
nl; prt('Archive name: '); input(fn,12);
if (hangup) then exit;
fn:=systat.temppath+'3\'+fn;
{rcg11242000 DOSism.}
{fn:=systat.temppath+'3\'+fn;}
fn:=systat.temppath+'3/'+fn;
loaduboard(fileboard);
if (pos('.',fn)=0) and (memuboard.arctype<>0) then
fn:=fn+'.'+systat.filearcinfo[memuboard.arctype].ext;
Expand All @@ -424,9 +467,15 @@ procedure userarchive;
nl;
ok:=TRUE;
shel1;
{rcg11242000 DOSism.}
{
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'3\',
arcmci(systat.filearcinfo[atype].arcline,fn,s),
systat.filearcinfo[atype].succlevel);
}
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'3/',
arcmci(systat.filearcinfo[atype].arcline,fn,s),
systat.filearcinfo[atype].succlevel);
shel2;
if (not ok) then begin
sysoplog('Archive "'+fn+'": Errors during user compression');
Expand All @@ -442,7 +491,9 @@ procedure userarchive;
if (hangup) then exit;
if (not okname(s)) then print('Illegal filename.')
else begin
s:=systat.temppath+'3\'+s;
{rcg11242000 DOSism.}
{s:=systat.temppath+'3\'+s;}
s:=systat.temppath+'3/'+s;
assign(fi,s);
{$I-} reset(fi); {$I+}
if (ioresult=0) then begin
Expand All @@ -468,8 +519,13 @@ procedure userarchive;
fiscan(pl); { loads in memuboard }
su:=memuboard;
with memuboard do begin
{rcg11242000 DOSisms.}
{
dlpath:=systat.temppath+'3\';
ulpath:=systat.temppath+'3\';
}
dlpath:=systat.temppath+'3/';
ulpath:=systat.temppath+'3/';
name:='Temporary directory';
fbstat:=[];
end;
Expand All @@ -492,15 +548,19 @@ procedure userarchive;
end;
'L':begin
nl;
dir(systat.temppath+'3\','*.*',TRUE);
{rcg11242000 DOSism.}
{dir(systat.temppath+'3\','*.*',TRUE);}
dir(systat.temppath+'3/','*.*',TRUE);
nl;
end;
'R':begin
nl; prt('File mask: '); input(s,12);
if (hangup) then exit;
if (isul(s)) then print('Illegal filename.')
else begin
s:=systat.temppath+'3\'+s;
{rcg11242000 DOSism.}
{s:=systat.temppath+'3\'+s;}
s:=systat.temppath+'3/'+s;
ffile(s);
if (not found) then
print('File not found.')
Expand All @@ -509,7 +569,9 @@ procedure userarchive;
if not ((dirinfo.attr and VolumeID=VolumeID) or
(dirinfo.attr and Directory=Directory)) then begin
s:=dirinfo.name;
assign(fi,systat.temppath+'3\'+s);
{rcg11242000 DOSism.}
{assign(fi,systat.temppath+'3\'+s);}
assign(fi,systat.temppath+'3/'+s);
{$I-} erase(fi); {$I+}
if (ioresult<>0) then begin
sysoplog('Error removing from temp. dir: "'+s+'"');
Expand All @@ -527,7 +589,9 @@ procedure userarchive;
if (hangup) then exit;
if (not okname(s)) then print('Illegal filename.')
else begin
s1:=systat.temppath+'3\'+s;
{rcg11242000 DOSism.}
{s1:=systat.temppath+'3\'+s;}
s1:=systat.temppath+'3/'+s;
if (not exist(s1)) then
print('File not found.')
else begin
Expand All @@ -541,9 +605,13 @@ procedure userarchive;
nl; prt('File mask: '); input(fn,12);
if (hangup) then exit;
abort:=FALSE; next:=FALSE;
ffile(systat.temppath+'3\'+fn);
{rcg11242000 DOSism.}
{ffile(systat.temppath+'3\'+fn);}
ffile(systat.temppath+'3/'+fn);
repeat
lfi(systat.temppath+'3\'+dirinfo.name,abort,next);
{rcg11242000 DOSism.}
{lfi(systat.temppath+'3\'+dirinfo.name,abort,next);}
lfi(systat.temppath+'3/'+dirinfo.name,abort,next);
nfile;
until (not found) or (abort) or (hangup);
end;
Expand Down
20 changes: 16 additions & 4 deletions archive2.pas
@@ -1,4 +1,4 @@
{$A+,B+,D-,E+,F+,I+,L-,N-,O+,R-,S+,V-}
{$A+,B+,E+,F+,I+,L-,N-,O+,R-,S+,V-}
unit archive2;

interface
Expand Down Expand Up @@ -79,7 +79,9 @@ procedure doarccommand(cc:char);
end else begin
oldnumfl:=numfl;
fsplit(fn,dstr,nstr,estr); s:=dstr;
while (copy(s,length(s),1)='\') do s:=copy(s,1,length(s)-1);
{rcg11242000 DOSism.}
{while (copy(s,length(s),1)='\') do s:=copy(s,1,length(s)-1);}
while (copy(s,length(s),1)='/') do s:=copy(s,1,length(s)-1);
{$I-} chdir(s); {$I+}
if ioresult<>0 then print('Path not found.')
else begin
Expand Down Expand Up @@ -199,7 +201,9 @@ procedure doarccommand(cc:char);
else begin
ok:=TRUE;
s:=copy(fn,1,pos('.',fn))+systat.filearcinfo[toa].ext;
conva(ok,atype,bb,systat.temppath+'1\',sqoutsp(fn),sqoutsp(s));
{rcg11242000 DOSism}
{conva(ok,atype,bb,systat.temppath+'1\',sqoutsp(fn),sqoutsp(s));}
conva(ok,atype,bb,systat.temppath+'1/',sqoutsp(fn),sqoutsp(s));
if (ok) then begin
assign(fi,sqoutsp(fn));
{$I-} reset(fi); {$I+}
Expand Down Expand Up @@ -331,9 +335,15 @@ procedure doarccommand(cc:char);
ok:=TRUE;
star('Adding '+cstr(j)+' files to archive...');
shel1;
{rcg11242000 DOSism}
{
execbatch(ok,TRUE,'tgtemp1.bat','tgtemp1.$$$',
systat.temppath+'1\',s1,
systat.filearcinfo[atype].succlevel);
}
execbatch(ok,TRUE,'tgtemp1.bat','tgtemp1.$$$',
systat.temppath+'1/',s1,
systat.filearcinfo[atype].succlevel);
shel2;
if (not ok) then begin
star('Errors in adding files');
Expand Down Expand Up @@ -492,7 +502,9 @@ procedure doarccommand(cc:char);
star('Converting "'+fn+'"');
ok:=TRUE;
s:=copy(fn,1,pos('.',s))+systat.filearcinfo[bb].ext;
conva(ok,atype,bb,systat.temppath+'1\',fn,s);
{rcg11242000 DOSism.}
{conva(ok,atype,bb,systat.temppath+'1\',fn,s);}
conva(ok,atype,bb,systat.temppath+'1/',fn,s);
if (ok) then begin
assign(fi,sqoutsp(fn));
{$I-} reset(fi); {$I+}
Expand Down
13 changes: 10 additions & 3 deletions archive3.pas
@@ -1,4 +1,4 @@
{$A+,B+,D-,E+,F+,I+,L-,N-,O+,R-,S+,V-}
{$A+,B+,E+,F+,I+,L-,N-,O+,R-,S+,V-}
unit archive3;

interface
Expand Down Expand Up @@ -53,7 +53,12 @@ procedure cvtfiles(b:integer; fn:astr; var c_files,c_oldsiz,c_newsiz:longint;
close(fi);
end;
shel1;
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1\',
{rcg11242000 DOSism}
{
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1\',
rezipcmd+' '+sqoutsp(fn),-1);
}
execbatch(ok,TRUE,'tgtemp1.bat','tgtest1.$$$',systat.temppath+'1/',
rezipcmd+' '+sqoutsp(fn),-1);
shel2;
assign(fi,sqoutsp(fn));
Expand All @@ -67,7 +72,9 @@ procedure cvtfiles(b:integer; fn:astr; var c_files,c_oldsiz,c_newsiz:longint;
end else begin
ok:=TRUE;
s:=fn;
conva(ok,atype,atype,systat.temppath+'1\',sqoutsp(fn),sqoutsp(s));
{rcg11242000 DOSism}
{conva(ok,atype,atype,systat.temppath+'1\',sqoutsp(fn),sqoutsp(s));}
conva(ok,atype,atype,systat.temppath+'1/',sqoutsp(fn),sqoutsp(s));
if (ok) then begin
fsplit(fn,ps,ns,es); fn:=ps+ns+'.#$%';
assign(fi,sqoutsp(fn));
Expand Down
6 changes: 4 additions & 2 deletions bb.pas
@@ -1,4 +1,4 @@
{$A+,B+,D-,E+,F+,I+,L+,N-,O+,R-,S+,V-}
{$A+,B+,E+,F+,I+,L+,N-,O+,R-,S+,V-}
{$M 32150,0,0} { Declared here suffices for all Units as well! }

program BatchBackup;
Expand All @@ -17,7 +17,9 @@ lbrec=record
end;

const
lastspec='c:\lastbak.txt';
{rcg11242000 uh...DOSism. uh...}
{lastspec='c:\lastbak.txt';}
lastspec='./lastbak.txt';
cline='tape SBK @D:\/S-\TRAP*.MSG/S-\BBS.OVR/S-\BBS.EXE/S/A/C/C+/-O/R@T/LBAK@D@N';
lodrv:char='C';
hidrv:char='E';
Expand Down
4 changes: 2 additions & 2 deletions bbs.pas
Expand Up @@ -11,7 +11,7 @@
* written by Eric Oman, and Martin Pollard. *
* *
*****************************************************************************}
{$A+,B+,D-,E+,F+,I+,L-,N-,O+,R-,S+,V-}
{$A+,B+,E+,F+,I+,L-,N-,O+,R-,S+,V-}
{$M 60000,0,45000} { Memory Allocation Sizes }

Program BBS;
Expand Down Expand Up @@ -225,14 +225,14 @@
ovrinitems; if (ovrresult=ovrok) then overlayinems:=TRUE;
end;
ovrsetbuf(ovrmaxsize); ovrsetretry(ovrmaxsize div 2);
}
initexecswap2:=initexecswap;
execwithswap2:=execwithswap;
shutdownexecswap2:=shutdownexecswap;
findvertypeout(ovrpath,vercs,vertype,vertypes,serialnumber,licenseinfo,sitedatetime);
ver:=ver+' '+vertype;
}

init;

Expand Down

0 comments on commit d325f98

Please sign in to comment.