Updated.
This commit is contained in:
parent
8aa894321a
commit
b9ddaf6f0e
18
CHANGELOG
18
CHANGELOG
|
@ -8,6 +8,24 @@
|
|||
the RTL changes to 1.0.2 ...
|
||||
* Updated Makefile to be more sane. Compiles just programs (not units),
|
||||
doesn't smartlink on debug builds, etc...
|
||||
* Success in getting DOS->Unix path conversion in the RTL. Submitting
|
||||
patch to FreePascal maintainers...
|
||||
* Patches to init.pas to remove DOSification.
|
||||
* Fixed (hah) Y2K bugs in multiple copies of daynum().
|
||||
* Initial reaction from FreePascal maintainers is not good; started
|
||||
converting DOSisms manually in the Telegard codebase...
|
||||
* Why can't I get GDB to recognize debug symbols in most of my code? Grr.
|
||||
* Removed remaining stubs from init.pas...this required hacking some
|
||||
data structures...I'm not sure how this worked in the DOS version in this
|
||||
state, but I'm pretty certain I've just destroyed compatibility. Oh well.
|
||||
If the Y2K bug I found is any indication, no one's using the DOS version
|
||||
anymore to be upset about this.
|
||||
* Fixed init.pas bug in make_paths()...last dir (SWAP) was not created.
|
||||
* No longer prints a caps() version of path in initp.pas's show_initfile().
|
||||
* Added NormVideo() call to end of init.pas and bbs.pas...
|
||||
* What the hell is "Project Coyote?" This is so clearly an ancient revision
|
||||
of the source, that was probably half-hacked when I got it.
|
||||
* More stubs, more filename lowercasing.
|
||||
|
||||
2000-11-17 Ryan C. Gordon <icculus@lokigames.com>
|
||||
|
||||
|
|
84
Makefile
84
Makefile
|
@ -14,7 +14,7 @@ cpu=686
|
|||
debug=true
|
||||
|
||||
# want to see more verbose compiles? Set this to "true".
|
||||
verbose=true
|
||||
verbose=false
|
||||
|
||||
# You probably don't need to touch this one. This is the location of
|
||||
# your copy of PPC386, if it's not in the path.
|
||||
|
@ -24,22 +24,6 @@ PPC386=ppc386
|
|||
#---------------------------------------------------------------------------
|
||||
# don't touch anything below this line.
|
||||
|
||||
# This are the names of the produced binaries.
|
||||
MAINEXE=bbs
|
||||
MINITERMEXE=miniterm
|
||||
INITEXE=init
|
||||
TPAGEEXE=tpage
|
||||
IFLEXE=ifl
|
||||
FINDITEXE=findit
|
||||
T2TEXE=t2t
|
||||
OBLITEXE=oblit
|
||||
MTESTEXE=mtest
|
||||
BBEXE=bb
|
||||
CBBSEXE=cbbs
|
||||
MABSEXE=mabs
|
||||
COCONFIGEXE=coconfig
|
||||
SPDATEEXE=spdate
|
||||
|
||||
ifeq ($(strip $(verbose)),true)
|
||||
PPC386FLAGS += -vwnh
|
||||
endif
|
||||
|
@ -47,11 +31,11 @@ endif
|
|||
ifeq ($(strip $(debug)),true)
|
||||
BUILDDIR := $(cpu)/Debug
|
||||
PPC386FLAGS += -g # include debug symbols.
|
||||
PPC386FLAGS += -gc # generate checks for pointers.
|
||||
PPC386FLAGS += -Ct # generate stack-checking code.
|
||||
PPC386FLAGS += -Cr # generate range-checking code.
|
||||
PPC386FLAGS += -Co # generate overflow-checking code.
|
||||
PPC386FLAGS += -Ci # generate I/O-checking code.
|
||||
#PPC386FLAGS += -gc # generate checks for pointers.
|
||||
#PPC386FLAGS += -Ct # generate stack-checking code.
|
||||
#PPC386FLAGS += -Cr # generate range-checking code.
|
||||
#PPC386FLAGS += -Co # generate overflow-checking code.
|
||||
#PPC386FLAGS += -Ci # generate I/O-checking code.
|
||||
else
|
||||
BUILDDIR := $(cpu)/Release
|
||||
PPC386FLAGS += -Xs # strip the binary.
|
||||
|
@ -73,7 +57,7 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
# Borland TP7.0 compatibility flag.
|
||||
# Rebuild all units needed.
|
||||
PPC386FLAGS += -B
|
||||
|
||||
# Borland TP7.0 compatibility flag.
|
||||
|
@ -86,10 +70,10 @@ PPC386FLAGS += -Sg
|
|||
#PPC386FLAGS += -Sm
|
||||
|
||||
# Assembly statements are Intel-like (instead of AT&T-like).
|
||||
PPC386FLAGS += -Rintel
|
||||
#PPC386FLAGS += -Rintel
|
||||
|
||||
# Output target Linux. !!! FIXME: Want win32 compiles?
|
||||
PPC386FLAGS += -TLINUX
|
||||
#PPC386FLAGS += -TLINUX
|
||||
|
||||
# Pipe output to assembler, rather than to temp file. This is a little faster.
|
||||
#PPC386FLAGS += -P
|
||||
|
@ -97,6 +81,22 @@ PPC386FLAGS += -TLINUX
|
|||
# Write bins to this directory...
|
||||
PPC386FLAGS += -FE$(BUILDDIR)
|
||||
|
||||
# This are the names of the produced binaries.
|
||||
MAINEXE=$(BUILDDIR)/bbs
|
||||
MINITERMEXE=$(BUILDDIR)/miniterm
|
||||
INITEXE=$(BUILDDIR)/init
|
||||
TPAGEEXE=$(BUILDDIR)/tpage
|
||||
IFLEXE=$(BUILDDIR)/ifl
|
||||
FINDITEXE=$(BUILDDIR)/findit
|
||||
T2TEXE=$(BUILDDIR)/t2t
|
||||
OBLITEXE=$(BUILDDIR)/oblit
|
||||
MTESTEXE=$(BUILDDIR)/mtest
|
||||
BBEXE=$(BUILDDIR)/bb
|
||||
CBBSEXE=$(BUILDDIR)/cbbs
|
||||
MABSEXE=$(BUILDDIR)/mabs
|
||||
COCONFIGEXE=$(BUILDDIR)/coconfig
|
||||
SPDATEEXE=$(BUILDDIR)/spdate
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build rules...don't touch this, either.
|
||||
|
||||
|
@ -108,49 +108,49 @@ $(BUILDDIR)/%.o : %.pas
|
|||
$(PPC386) $(PPC386FLAGS) $<
|
||||
|
||||
all: $(BUILDDIR) $(MAINEXE) $(MINITERMEXE) $(INITEXE) $(TPAGEEXE) $(IFLEXE) \
|
||||
$(FINDITEXE) $(T2TEXE) $(OBLITEXE) $(MTESTEXE) $(BBEXE) $(CBBSEXE) \
|
||||
$(MABSEXE) $(COCONFIGEXE) $(SPDATEEXE)
|
||||
$(FINDITEXE) $(OBLITEXE) $(MTESTEXE) $(BBEXE) $(CBBSEXE) \
|
||||
$(MABSEXE) $(COCONFIGEXE) $(SPDATEEXE) $(T2TEXE)
|
||||
|
||||
$(MAINEXE) : $(BUILDDIR) $(OBJS) bbs.pas
|
||||
$(MAINEXE) : $(BUILDDIR) bbs.pas
|
||||
$(PPC386) $(PPC386FLAGS) bbs.pas
|
||||
|
||||
$(MINITERMEXE) : $(BUILDDIR) $(OBJS) miniterm.pas
|
||||
$(MINITERMEXE) : $(BUILDDIR) miniterm.pas
|
||||
$(PPC386) $(PPC386FLAGS) miniterm.pas
|
||||
|
||||
$(INITEXE) : $(BUILDDIR) $(OBJS) init.pas
|
||||
$(INITEXE) : $(BUILDDIR) init.pas
|
||||
$(PPC386) $(PPC386FLAGS) init.pas
|
||||
|
||||
$(TPAGEEXE) : $(BUILDDIR) $(OBJS) tpage.pas
|
||||
$(TPAGEEXE) : $(BUILDDIR) tpage.pas
|
||||
$(PPC386) $(PPC386FLAGS) tpage.pas
|
||||
|
||||
$(IFLEXE) : $(BUILDDIR) $(OBJS) ifl.pas
|
||||
$(IFLEXE) : $(BUILDDIR) ifl.pas
|
||||
$(PPC386) $(PPC386FLAGS) ifl.pas
|
||||
|
||||
$(FINDITEXE) : $(BUILDDIR) $(OBJS) findit.pas
|
||||
$(FINDITEXE) : $(BUILDDIR) findit.pas
|
||||
$(PPC386) $(PPC386FLAGS) findit.pas
|
||||
|
||||
$(T2TEXE) : $(BUILDDIR) $(OBJS) t2t.pas
|
||||
$(T2TEXE) : $(BUILDDIR) t2t.pas
|
||||
$(PPC386) $(PPC386FLAGS) t2t.pas
|
||||
|
||||
$(OBLITEXE) : $(BUILDDIR) $(OBJS) t2t.pas
|
||||
$(PPC386) $(PPC386FLAGS) t2t.pas
|
||||
$(OBLITEXE) : $(BUILDDIR) oblit.pas
|
||||
$(PPC386) $(PPC386FLAGS) oblit.pas
|
||||
|
||||
$(MTESTEXE) : $(BUILDDIR) $(OBJS) mtest.pas
|
||||
$(MTESTEXE) : $(BUILDDIR) mtest.pas
|
||||
$(PPC386) $(PPC386FLAGS) mtest.pas
|
||||
|
||||
$(BBEXE) : $(BUILDDIR) $(OBJS) bb.pas
|
||||
$(BBEXE) : $(BUILDDIR) bb.pas
|
||||
$(PPC386) $(PPC386FLAGS) bb.pas
|
||||
|
||||
$(CBBSEXE) : $(BUILDDIR) $(OBJS) cbbs.pas
|
||||
$(CBBSEXE) : $(BUILDDIR) cbbs.pas
|
||||
$(PPC386) $(PPC386FLAGS) cbbs.pas
|
||||
|
||||
$(MABSEXE) : $(BUILDDIR) $(OBJS) mabs.pas
|
||||
$(MABSEXE) : $(BUILDDIR) mabs.pas
|
||||
$(PPC386) $(PPC386FLAGS) mabs.pas
|
||||
|
||||
$(COCONFIGEXE) : $(BUILDDIR) $(OBJS) coconfig.pas
|
||||
$(COCONFIGEXE) : $(BUILDDIR) coconfig.pas
|
||||
$(PPC386) $(PPC386FLAGS) coconfig.pas
|
||||
|
||||
$(SPDATEEXE) : $(BUILDDIR) $(OBJS) spdate.pas
|
||||
$(SPDATEEXE) : $(BUILDDIR) spdate.pas
|
||||
$(PPC386) $(PPC386FLAGS) spdate.pas
|
||||
|
||||
$(BUILDDIR): $(cpu)
|
||||
|
|
7
cbbs.pas
7
cbbs.pas
|
@ -73,7 +73,14 @@ begin
|
|||
t:=0;
|
||||
m:=value(copy(dt,1,2));
|
||||
d:=value(copy(dt,4,2));
|
||||
|
||||
{rcg11182000 hahahaha...a Y2K bug. :) }
|
||||
y:=value(copy(dt,7,2))+1900;
|
||||
|
||||
{rcg11182000 added this conditional. }
|
||||
if (y < 1977) then { Ugh...this is so bad. }
|
||||
y := y + 100;
|
||||
|
||||
for c:=1985 to y-1 do
|
||||
if leapyear(c) then t:=t+366 else t:=t+365;
|
||||
t:=t+daycount(m,y)+(d-1);
|
||||
|
|
30
common.pas
30
common.pas
|
@ -1205,7 +1205,14 @@ begin
|
|||
t:=0;
|
||||
m:=value(copy(dt,1,2));
|
||||
d:=value(copy(dt,4,2));
|
||||
|
||||
{rcg11182000 hahahaha...a Y2K bug. :) }
|
||||
y:=value(copy(dt,7,2))+1900;
|
||||
|
||||
{rcg11182000 added this conditional. }
|
||||
if (y < 1977) then { Ugh...this is so bad. }
|
||||
y := y + 100;
|
||||
|
||||
for c:=1985 to y-1 do
|
||||
if (leapyear(c)) then inc(t,366) else inc(t,365);
|
||||
t:=t+daycount(m,y)+(d-1);
|
||||
|
@ -2725,15 +2732,20 @@ var s:string;
|
|||
i,j:integer;
|
||||
abort,next:boolean;
|
||||
begin
|
||||
fn:=allcaps(fn); s:=fn;
|
||||
if (copy(fn,length(fn)-3,4)='.ANS') then begin
|
||||
if (exist(copy(fn,1,length(fn)-4)+'.AN1')) then
|
||||
{rcg11182000 moved this allcaps into the first IF, for case-sensitive fs.}
|
||||
{fn:=allcaps(fn); s:=fn;}
|
||||
{if (copy(fn,length(fn)-3,4)='.ANS') then begin}
|
||||
|
||||
{rcg11182000 lowercased rest of extentions.}
|
||||
s:=fn;
|
||||
if (allcaps(copy(fn,length(fn)-3,4))='.ANS') then begin
|
||||
if (exist(copy(fn,1,length(fn)-4)+'.an1')) then
|
||||
repeat
|
||||
i:=random(10);
|
||||
if (i=0) then
|
||||
fn:=copy(fn,1,length(fn)-4)+'.ANS'
|
||||
fn:=copy(fn,1,length(fn)-4)+'.ans'
|
||||
else
|
||||
fn:=copy(fn,1,length(fn)-4)+'.AN'+cstr(i);
|
||||
fn:=copy(fn,1,length(fn)-4)+'.an'+cstr(i);
|
||||
until (exist(fn));
|
||||
|
||||
getdate(year,month,day,dayofweek);
|
||||
|
@ -2750,7 +2762,9 @@ begin
|
|||
nofile:=TRUE;
|
||||
fn:=sqoutsp(fn);
|
||||
if (fn='') then exit;
|
||||
if (pos('\',fn)<>0) then j:=1
|
||||
{rcg11182000 dosism.}
|
||||
{if (pos('\',fn)<>0) then j:=1}
|
||||
if (pos('/',fn)<>0) then j:=1
|
||||
else begin
|
||||
j:=2;
|
||||
fsplit(fexpand(fn),ps,ns,es);
|
||||
|
@ -2759,7 +2773,9 @@ begin
|
|||
end;
|
||||
for i:=1 to j do begin
|
||||
ffn:=fn;
|
||||
if ((pos('\',fn)=0) and (pos(':',fn)=0)) then
|
||||
{rcg11182000 dosism.}
|
||||
{if ((pos('\',fn)=0) and (pos(':',fn)=0)) then}
|
||||
if ((pos('/',fn)=0) and (pos(':',fn)=0)) then
|
||||
case i of
|
||||
1:ffn:=systat.afilepath+ffn;
|
||||
2:ffn:=systat.gfilepath+ffn;
|
||||
|
|
|
@ -192,7 +192,14 @@ begin
|
|||
t:=0;
|
||||
m:=value(copy(dt,1,2));
|
||||
d:=value(copy(dt,4,2));
|
||||
|
||||
{rcg11182000 hahahaha...a Y2K bug. :) }
|
||||
y:=value(copy(dt,7,2))+1900;
|
||||
|
||||
{rcg11182000 added this conditional. }
|
||||
if (y < 1977) then { Ugh...this is so bad. }
|
||||
y := y + 100;
|
||||
|
||||
for c:=1985 to y-1 do
|
||||
if leapyear(c) then t:=t+366 else t:=t+365;
|
||||
t:=t+daycount(m,y)+(d-1);
|
||||
|
|
|
@ -217,7 +217,14 @@ begin
|
|||
t:=0;
|
||||
m:=value(copy(dt,1,2));
|
||||
d:=value(copy(dt,4,2));
|
||||
|
||||
{rcg11182000 hahahaha...a Y2K bug. :) }
|
||||
y:=value(copy(dt,7,2))+1900;
|
||||
|
||||
{rcg11182000 added this conditional. }
|
||||
if (y < 1977) then { Ugh...this is so bad. }
|
||||
y := y + 100;
|
||||
|
||||
for c:=1985 to y-1 do
|
||||
if leapyear(c) then t:=t+366 else t:=t+365;
|
||||
t:=t+daycount(m,y)+(d-1);
|
||||
|
|
|
@ -202,7 +202,14 @@ begin
|
|||
t:=0;
|
||||
m:=value(copy(dt,1,2));
|
||||
d:=value(copy(dt,4,2));
|
||||
|
||||
{rcg11182000 hahahaha...a Y2K bug. :) }
|
||||
y:=value(copy(dt,7,2))+1900;
|
||||
|
||||
{rcg11182000 added this conditional. }
|
||||
if (y < 1977) then { Ugh...this is so bad. }
|
||||
y := y + 100;
|
||||
|
||||
for c:=1985 to y-1 do
|
||||
if leapyear(c) then t:=t+366 else t:=t+365;
|
||||
t:=t+daycount(m,y)+(d-1);
|
||||
|
|
|
@ -155,10 +155,11 @@ begin
|
|||
else
|
||||
ulffopen1:=FALSE;
|
||||
loaduboard(fileboard);
|
||||
{rcg11182000 lowercased these ".DIR" strings...}
|
||||
if (fbdirdlpath in memuboard.fbstat) then
|
||||
assign(ulff,memuboard.dlpath+memuboard.filename+'.DIR')
|
||||
assign(ulff,memuboard.dlpath+memuboard.filename+'.dir')
|
||||
else
|
||||
assign(ulff,systat.gfilepath+memuboard.filename+'.DIR');
|
||||
assign(ulff,systat.gfilepath+memuboard.filename+'.dir');
|
||||
{$I-} reset(ulff); {$I+}
|
||||
if (ioresult<>0) then begin
|
||||
rewrite(ulff);
|
||||
|
|
|
@ -535,7 +535,8 @@ begin
|
|||
dd(abort,next,'Archive format ....... :','"'+s+'"',(arctype<>0));
|
||||
if (fso) then begin
|
||||
nl;
|
||||
dd(abort,next,'Filename ...... :','"'+filename+'.DIR"',TRUE);
|
||||
{rcg11182000 lowercased this ".DIR" strings...}
|
||||
dd(abort,next,'Filename ...... :','"'+filename+'.dir"',TRUE);
|
||||
dd(abort,next,'DL file path .. :','"'+dlpath+'"',TRUE);
|
||||
end;
|
||||
end;
|
||||
|
|
114
init.pas
114
init.pas
|
@ -109,8 +109,12 @@ end;
|
|||
|
||||
function exdrv(s:astr):byte;
|
||||
begin
|
||||
{rcg11172000 always 'C' under Linux...}
|
||||
{
|
||||
s:=fexpand(s);
|
||||
exdrv:=ord(s[1])-64;
|
||||
}
|
||||
exdrv := 3;
|
||||
end;
|
||||
|
||||
function leapyear(yr:integer):boolean;
|
||||
|
@ -152,7 +156,14 @@ begin
|
|||
t:=0;
|
||||
m:=value(copy(dt,1,2));
|
||||
d:=value(copy(dt,4,2));
|
||||
|
||||
{rcg11182000 hahahaha...a Y2K bug. :) }
|
||||
y:=value(copy(dt,7,2))+1900;
|
||||
|
||||
{rcg11182000 added this conditional. }
|
||||
if (y < 1977) then { Ugh...this is so bad. }
|
||||
y := y + 100;
|
||||
|
||||
for c:=1985 to y-1 do
|
||||
if (leapyear(c)) then inc(t,366) else inc(t,365);
|
||||
t:=t+daycount(m,y)+(d-1);
|
||||
|
@ -227,6 +238,9 @@ begin
|
|||
assign(src,srcname);
|
||||
{$I-} reset(src,1); {$I+}
|
||||
if (ioresult<>0) then begin ok:=FALSE; exit; end;
|
||||
|
||||
{rcg11172000 why bother checking total disk space in a modern OS?}
|
||||
{
|
||||
dfs:=freek(exdrv(destname));
|
||||
fs:=trunc(filesize(src)/1024.0)+1;
|
||||
if (fs>=dfs) then begin
|
||||
|
@ -234,6 +248,8 @@ begin
|
|||
nospace:=TRUE; ok:=FALSE;
|
||||
exit;
|
||||
end else begin
|
||||
}
|
||||
|
||||
assign(dest,destname);
|
||||
{$I-} rewrite(dest,1); {$I+}
|
||||
if (ioresult<>0) then begin ok:=FALSE; exit; end;
|
||||
|
@ -244,7 +260,9 @@ begin
|
|||
close(dest); close(src);
|
||||
dodate;
|
||||
erase(src);
|
||||
end;
|
||||
|
||||
{rcg11172000 why bother checking total disk space in a modern OS?}
|
||||
{end;}
|
||||
end;
|
||||
|
||||
procedure ffile(fn:string);
|
||||
|
@ -287,7 +305,9 @@ end;
|
|||
|
||||
function make_path(s:string):boolean;
|
||||
begin
|
||||
while (copy(s,length(s),1)='\') do s:=copy(s,1,length(s)-1);
|
||||
{rcg11182000 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);
|
||||
make_path:=TRUE;
|
||||
{$I-} mkdir(fexpand(s)); {$I+}
|
||||
if (ioresult<>0) then begin
|
||||
|
@ -300,19 +320,30 @@ end;
|
|||
procedure make_paths;
|
||||
var s:string;
|
||||
begin
|
||||
for i:=1 to 7 do begin
|
||||
while copy(path[i],length(path[i]),1)='\' do
|
||||
|
||||
{rcg11182000 1 to 7? Swap path is excluded...}
|
||||
{for i:=1 to 7 do begin}
|
||||
|
||||
for i:=1 to 8 do begin
|
||||
{rcg11182000 dosism.}
|
||||
{while copy(path[i],length(path[i]),1)='\' do}
|
||||
while copy(path[i],length(path[i]),1)='/' do
|
||||
path[i]:=copy(path[i],1,length(path[i])-1);
|
||||
case i of 1:s:='GFILES'; 2:s:='MSGS'; 3:s:='MENUS'; 4:s:='TFILES';
|
||||
5:s:='AFILES'; 6:s:='TRAP'; 7:s:='TEMP'; 8:s:='SWAP'; end;
|
||||
star(s+' path ("'+fexpand(path[i])+'")');
|
||||
if (not make_path(path[i])) then halt(1);
|
||||
path[i]:=path[i]+'\';
|
||||
{rcg11182000 dosism.}
|
||||
{path[i]:=path[i]+'\';}
|
||||
path[i]:=path[i]+'/';
|
||||
end;
|
||||
(* star('Creating EMAIL and GENERAL message paths');
|
||||
if (not make_path(path[2]+'EMAIL\')) then halt(1);
|
||||
if (not make_path(path[2]+'GENERAL\')) then halt(1);*)
|
||||
star('Creating SYSOP and MISC file paths');
|
||||
|
||||
{rcg11182000 dosisms.}
|
||||
{
|
||||
if (not make_path('DLS\')) then halt(1);
|
||||
if (not make_path('DLS\SYSOP')) then halt(1);
|
||||
if (not make_path('DLS\MISC')) then halt(1);
|
||||
|
@ -320,6 +351,14 @@ begin
|
|||
if (not make_path(path[7]+'1\')) then halt(1);
|
||||
if (not make_path(path[7]+'2\')) then halt(1);
|
||||
if (not make_path(path[7]+'3\')) then halt(1);
|
||||
}
|
||||
if (not make_path('DLS/')) then halt(1);
|
||||
if (not make_path('DLS/SYSOP')) then halt(1);
|
||||
if (not make_path('DLS/MISC')) then halt(1);
|
||||
star('Creating TEMP 1, 2, and 3 file paths');
|
||||
if (not make_path(path[7]+'1/')) then halt(1);
|
||||
if (not make_path(path[7]+'2/')) then halt(1);
|
||||
if (not make_path(path[7]+'3/')) then halt(1);
|
||||
end;
|
||||
|
||||
procedure make_status_dat;
|
||||
|
@ -557,6 +596,7 @@ begin
|
|||
swappath:=path[8];
|
||||
for i:=1 to 119 do res[i]:=0;
|
||||
end;
|
||||
|
||||
assign(systatf,'status.dat');
|
||||
rewrite(systatf); write(systatf,systat); close(systatf);
|
||||
end;
|
||||
|
@ -810,7 +850,9 @@ begin
|
|||
with ufr do begin
|
||||
name:='SysOp directory';
|
||||
filename:='SYSOP';
|
||||
dlpath:=curdir+'\DLS\SYSOP\';
|
||||
{rcg11182000 dosisms}
|
||||
{dlpath:=curdir+'\DLS\SYSOP\';}
|
||||
dlpath:=curdir+'/DLS/SYSOP/';
|
||||
ulpath:=dlpath;
|
||||
maxfiles:=2000;
|
||||
password:='';
|
||||
|
@ -828,7 +870,9 @@ begin
|
|||
with ufr do begin
|
||||
name:='Miscellaneous';
|
||||
filename:='MISC';
|
||||
dlpath:=curdir+'\DLS\MISC\';
|
||||
{rcg11182000 dosisms}
|
||||
{dlpath:=curdir+'\DLS\MISC\';}
|
||||
dlpath:=curdir+'/DLS/MISC/';
|
||||
ulpath:=dlpath;
|
||||
maxfiles:=2000;
|
||||
password:='';
|
||||
|
@ -883,8 +927,6 @@ procedure savemhead1(var brdf:file; mhead:mheaderrec);
|
|||
end;
|
||||
|
||||
begin
|
||||
{rcg11172000 this is fooked.}
|
||||
{
|
||||
with mhead do begin
|
||||
blockwrite(brdf,signature,4);
|
||||
blockwrite(brdf,msgptr,4);
|
||||
|
@ -895,9 +937,6 @@ begin
|
|||
outftinfo(toi);
|
||||
blockwritestr(brdf,originsite);
|
||||
end;
|
||||
}
|
||||
|
||||
writeln('STUB: init.pas; savemhead1()...');
|
||||
end;
|
||||
|
||||
procedure make_email_brd;
|
||||
|
@ -945,12 +984,8 @@ begin
|
|||
for i:=1 to 6 do msgdate[i]:=pdt[i];
|
||||
msgdowk:=0;
|
||||
|
||||
{rcg11172000 fooked.}
|
||||
{
|
||||
for i:=1 to 6 do lastdate[i]:=pdt[i];
|
||||
lastdowk:=0;
|
||||
}
|
||||
writeln('STUB: init.pas; make_email_brd()...');
|
||||
|
||||
isreplyto:=65535;
|
||||
numreplys:=0;
|
||||
|
@ -961,12 +996,8 @@ begin
|
|||
with mheader do begin
|
||||
signature:=$ABCD0123;
|
||||
msgptr:=4;
|
||||
{rcg11172000 fooked.}
|
||||
{
|
||||
for i:=1 to 6 do isreplyto_iddate[i]:=0;
|
||||
isreplyto_idrand:=0;
|
||||
}
|
||||
writeln('STUB: init.pas; make_email_brd()...');
|
||||
title:='Greetings, new Telegard SysOp!!';
|
||||
with fromi do begin
|
||||
anon:=0;
|
||||
|
@ -983,10 +1014,7 @@ begin
|
|||
alias:='SysOp';
|
||||
end;
|
||||
|
||||
{rcg11172000 fooked.}
|
||||
{originsite:='';}
|
||||
writeln('STUB: init.pas; make_email_brd()...');
|
||||
|
||||
originsite:='';
|
||||
end;
|
||||
savemhead1(brdf,mheader);
|
||||
close(brdf);
|
||||
|
@ -1124,17 +1152,14 @@ begin
|
|||
mixr.hdrptr:=0; for i:=0 to 99 do blockwrite(mixf,mixr,1);
|
||||
close(mixf);
|
||||
|
||||
{rcg11172000 fooked.}
|
||||
{
|
||||
assign(tref,s+'.tre'); rewrite(tref,sizeof(mtreerec)); close(tref);
|
||||
}
|
||||
writeln('STUB: init.pas; make_mboard()...');
|
||||
end;
|
||||
|
||||
procedure make_fboard(s:string);
|
||||
begin
|
||||
ulffr.blocks:=0;
|
||||
assign(ulff,s+'.DIR');
|
||||
{rcg11182000 lowercased this ".DIR" strings...}
|
||||
assign(ulff,s+'.dir');
|
||||
rewrite(ulff); write(ulff,ulffr); close(ulff);
|
||||
end;
|
||||
|
||||
|
@ -1182,7 +1207,8 @@ begin
|
|||
movefile1('verbose.dat',path[1]);
|
||||
movefile1('voting.dat',path[1]);
|
||||
movefile1('zlog.dat',path[1]);
|
||||
movefiles('*.DIR',path[1]);
|
||||
{rcg11182000 lowercased this ".DIR" string...}
|
||||
movefiles('*.dir',path[1]);
|
||||
|
||||
ttl('Moving message files into MSGS directory');
|
||||
movefile1('email.brd',path[2]);
|
||||
|
@ -1191,21 +1217,23 @@ begin
|
|||
movefile1('general.mix',path[2]);
|
||||
movefile1('general.tre',path[2]);
|
||||
|
||||
{rcg11182000 Made ANS MSG CFG and MNU lowercase...}
|
||||
|
||||
ttl('Moving ANSI text files into AFILES directory');
|
||||
movefiles('*.ANS',path[5]);
|
||||
movefiles('*.ans',path[5]);
|
||||
|
||||
ttl('Moving normal text files into AFILES directory');
|
||||
movefiles('*.MSG',path[5]);
|
||||
movefiles('*.msg',path[5]);
|
||||
movefile1('computer.txt',path[5]);
|
||||
|
||||
ttl('Moving color configuration files into AFILES directory');
|
||||
movefiles('*.CFG',path[5]);
|
||||
movefiles('*.cfg',path[5]);
|
||||
|
||||
(* ttl('Moving message file into MSGS\EMAIL directory');
|
||||
movefile1('a-32767.1',path[2]+'EMAIL\');*)
|
||||
|
||||
ttl('Moving menu files into MENUS directory');
|
||||
movefiles('*.MNU',path[3]);
|
||||
movefiles('*.mnu',path[3]);
|
||||
end;
|
||||
|
||||
begin
|
||||
|
@ -1234,6 +1262,8 @@ begin
|
|||
end;
|
||||
|
||||
getdir(0,curdir);
|
||||
{rcg11182000 dosisms.}
|
||||
{
|
||||
path[1]:=curdir+'\GFILES\';
|
||||
path[2]:=curdir+'\MSGS\';
|
||||
path[3]:=curdir+'\MENUS\';
|
||||
|
@ -1242,6 +1272,15 @@ begin
|
|||
path[6]:=curdir+'\TRAP\';
|
||||
path[7]:=curdir+'\TEMP\';
|
||||
path[8]:=curdir+'\SWAP\';
|
||||
}
|
||||
path[1]:=curdir+'/GFILES/';
|
||||
path[2]:=curdir+'/MSGS/';
|
||||
path[3]:=curdir+'/MENUS/';
|
||||
path[4]:=curdir+'/TFILES/';
|
||||
path[5]:=curdir+'/AFILES/';
|
||||
path[6]:=curdir+'/TRAP/';
|
||||
path[7]:=curdir+'/TEMP/';
|
||||
path[8]:=curdir+'/SWAP/';
|
||||
|
||||
textcolor(14);
|
||||
writeln;
|
||||
|
@ -1306,6 +1345,11 @@ begin
|
|||
|
||||
writeln;
|
||||
star('Telegard BBS installed and initialized successfully!');
|
||||
star('This program, "INIT.EXE", can now be deleted.');
|
||||
{rcg11172000 DOSism.}
|
||||
{star('This program, "INIT.EXE", can now be deleted.');}
|
||||
star('This program, "init", can now be deleted.');
|
||||
star('Thanks for trying Telegard!');
|
||||
|
||||
{rcg11182000 added NormVideo.}
|
||||
NormVideo;
|
||||
end.
|
||||
|
|
26
initp.pas
26
initp.pas
|
@ -193,7 +193,10 @@ var filv:text;
|
|||
gotoxy(6,11);
|
||||
if (copy(s,length(s),1)<>'!') then s:=systat.gfilepath+s
|
||||
else s:=copy(s,1,length(s)-1);
|
||||
write(caps(s));
|
||||
|
||||
{rcg11182000 this caps call is confusing with a case-sensitive filesystem.}
|
||||
{write(caps(s));}
|
||||
write(s);
|
||||
textbackground(1);
|
||||
showmem;
|
||||
errs:=FALSE; npatch:=FALSE;
|
||||
|
@ -209,12 +212,17 @@ var filv:text;
|
|||
procedure wmsgs(s:astr);
|
||||
var x,y:integer;
|
||||
begin
|
||||
{rcg1118 this doesn't work without savescreen() and such in common.pas...}
|
||||
{
|
||||
x:=wherex; y:=wherey;
|
||||
if (not openedyet) then openwmsgs;
|
||||
textbackground(1); textcolor(15);
|
||||
window(8,16,73,22);
|
||||
gotoxy(sx,sy); writeln(s); sx:=wherex; sy:=wherey;
|
||||
window(1,1,80,25); gotoxy(x,y);
|
||||
}
|
||||
|
||||
writeln('STUB: initp.pas; wmsgs(''' + s + ''')...');
|
||||
end;
|
||||
|
||||
procedure inmsgs(sh:astr; var s:astr; len:integer);
|
||||
|
@ -232,7 +240,9 @@ var filv:text;
|
|||
function existdir(fn:astr):boolean;
|
||||
var srec:searchrec;
|
||||
begin
|
||||
while (fn[length(fn)]='\') do fn:=copy(fn,1,length(fn)-1);
|
||||
{rcg11182000 dosism.}
|
||||
{while (fn[length(fn)]='\') do fn:=copy(fn,1,length(fn)-1);}
|
||||
while (fn[length(fn)]='/') do fn:=copy(fn,1,length(fn)-1);
|
||||
findfirst(fexpand(sqoutsp(fn)),anyfile,srec);
|
||||
existdir:=(doserror=0) and (srec.attr and directory=directory);
|
||||
end;
|
||||
|
@ -276,7 +286,9 @@ var filv:text;
|
|||
if (s=s2) or (s2='') then abend('Illegal pathname error')
|
||||
else begin
|
||||
if (s2<>'') then
|
||||
if (copy(s2,length(s2),1)<>'\') then s2:=s2+'\';
|
||||
{rcg11182000 dosism}
|
||||
{if (copy(s2,length(s2),1)<>'\') then s2:=s2+'\';}
|
||||
if (copy(s2,length(s2),1)<>'/') then s2:=s2+'/';
|
||||
if (existdir(s2)) then
|
||||
case i of
|
||||
1:gfilepath:=s2; 2:msgpath:=s2;
|
||||
|
@ -327,8 +339,12 @@ begin
|
|||
end;
|
||||
*)
|
||||
|
||||
if (exist(start_dir+'\critical.err')) then begin
|
||||
assign(filv,start_dir+'\critical.err'); erase(filv);
|
||||
{rcg11182000 DOSism.}
|
||||
{if (exist(start_dir+'\critical.err')) then begin }
|
||||
{ assign(filv,start_dir+'\critical.err'); erase(filv);}
|
||||
|
||||
if (exist(start_dir+'/critical.err')) then begin
|
||||
assign(filv,start_dir+'/critical.err'); erase(filv);
|
||||
wmsgs('*** Critical error during last BBS execution! ***');
|
||||
wmsgs('[>>> Updating STATUS.DAT <<<]');
|
||||
inc(systat.todayzlog.criterr);
|
||||
|
|
22
rec25.pas
22
rec25.pas
|
@ -182,6 +182,7 @@ TYPE
|
|||
mimassmail, { is it private, mass mail? }
|
||||
miscanned); { is message scanned for FidoNet? }
|
||||
|
||||
{rcg11182000 spliced from V20 headers...}
|
||||
msgindexrec= { *.MIX : Message index records }
|
||||
record
|
||||
messagenum:word; { message number, tonum in EMAIL.MIX }
|
||||
|
@ -191,6 +192,8 @@ TYPE
|
|||
msgdate:cpackdatetime; { message date/time (packed) }
|
||||
msgdowk:byte; { message day-of-week (0=Sun ...) }
|
||||
msgindexstat:set of msgindexstatr; { status flags }
|
||||
lastdate:array[1..6] of byte; { update: date/time }
|
||||
lastdowk:byte; { update: day-of-week }
|
||||
isreplyto:word; { reply this message is to (-1=None) }
|
||||
numreplys:word; { number of replies to THIS message }
|
||||
end;
|
||||
|
@ -204,15 +207,19 @@ TYPE
|
|||
alias:string[36]; { user alias }
|
||||
end;
|
||||
|
||||
{rcg11182000 cannibalized from the v20 type...}
|
||||
mheaderrec= { *.BRD : Message header records }
|
||||
record
|
||||
signature:longint; { header signature - $FFFFFFFF }
|
||||
msgptr:longint; { pointer to message text }
|
||||
isreplyto_iddate:array[1..6] of byte; { isreplyto id date - for NetMail }
|
||||
isreplyto_idrand:word; { isreplyto id randomid }
|
||||
msglength:longint; { length of message text }
|
||||
fromi:fromtoinfo; { from information }
|
||||
toi:fromtoinfo; { to information }
|
||||
title:string[60]; { title of message }
|
||||
origindate:string[19]; { Echo/Group original msg date }
|
||||
originsite:string[60]; { site of *original* origin }
|
||||
end;
|
||||
|
||||
zlogrec= { ZLOG.DAT : System log }
|
||||
|
@ -712,3 +719,18 @@ TYPE
|
|||
res:array[1..1978] of byte; { RESERVED }
|
||||
end;
|
||||
|
||||
{rcg11182000 added by me.}
|
||||
V20_mtreerec= { *.TRE : Message reply-tree records }
|
||||
record
|
||||
messagerunning, { message number, running }
|
||||
messagenum:word; { actual message number in *.MIX }
|
||||
ilevel:byte; { indent level - for replys }
|
||||
isreplyto, { reply this message is to (-1=None) }
|
||||
numreplys:word; { number of replys to THIS message }
|
||||
msgdate:array[1..6] of byte; { message id date }
|
||||
msgdowk:byte; { message day-of-week }
|
||||
end;
|
||||
|
||||
mtreerec = V20_mtreerec; { *.TRE }
|
||||
{rcg11182000 end adds.}
|
||||
|
||||
|
|
|
@ -191,11 +191,12 @@ var i1,ii,culb,i2:integer;
|
|||
|
||||
procedure getdirspec(var s:string);
|
||||
begin
|
||||
{rcg11182000 lowercased these ".DIR" strings...}
|
||||
with memuboard do
|
||||
if (fbdirdlpath in fbstat) then
|
||||
s:=fexpand(dlpath+filename+'.DIR')
|
||||
s:=fexpand(dlpath+filename+'.dir')
|
||||
else
|
||||
s:=fexpand(systat.gfilepath+filename+'.DIR');
|
||||
s:=fexpand(systat.gfilepath+filename+'.dir');
|
||||
end;
|
||||
|
||||
procedure dlbem;
|
||||
|
@ -537,7 +538,8 @@ NNN:File base name :Arc/Cmt-type:P-Index:Password
|
|||
readuboard:=-1; loaduboard(ii);
|
||||
if (fbdirdlpath in memuboard.fbstat) then s0:=memuboard.dlpath
|
||||
else s0:=systat.gfilepath;
|
||||
s0:=s0+memuboard.filename+'.DIR';
|
||||
{rcg11182000 lowercased this ".DIR" string...}
|
||||
s0:=s0+memuboard.filename+'.dir';
|
||||
nl; sprint('File base: '+#3#5+memuboard.name);
|
||||
if pynq('Delete this? ') then begin
|
||||
sysoplog('* Deleted file base: '+memuboard.name);
|
||||
|
|
19
t2t.pas
19
t2t.pas
|
@ -143,7 +143,14 @@ begin
|
|||
t:=0;
|
||||
m:=value(copy(dt,1,2));
|
||||
d:=value(copy(dt,4,2));
|
||||
|
||||
{rcg11182000 hahahaha...a Y2K bug. :) }
|
||||
y:=value(copy(dt,7,2))+1900;
|
||||
|
||||
{rcg11182000 added this conditional. }
|
||||
if (y < 1977) then { Ugh...this is so bad. }
|
||||
y := y + 100;
|
||||
|
||||
for c:=1985 to y-1 do
|
||||
if leapyear(c) then t:=t+366 else t:=t+365;
|
||||
t:=t+daycount(m,y)+(d-1);
|
||||
|
@ -664,15 +671,17 @@ begin
|
|||
end;
|
||||
seek(tag_ulf,i); write(tag_ulf,tag_ub);
|
||||
|
||||
{rcg11182000 lowercased this ".DIR" string...}
|
||||
with ub do
|
||||
assign(ulff,tgpath+filename+'.DIR');
|
||||
assign(ulff,tgpath+filename+'.dir');
|
||||
|
||||
{$I-} reset(ulff); {$I+}
|
||||
if (ioresult=0) then begin
|
||||
seek(ulff,0); read(ulff,ulffr);
|
||||
siz:=ulffr.blocks;
|
||||
if (siz>filesize(ulff)-1) then siz:=filesize(ulff)-1;
|
||||
assign(tag_ulff,tag_ub.dlpath+tag_ub.filename+'.DIR');
|
||||
{rcg11182000 lowercased this ".DIR" string...}
|
||||
assign(tag_ulff,tag_ub.dlpath+tag_ub.filename+'.dir');
|
||||
clreol;
|
||||
star(' (record #'+cstr(i)+' of '+cstr(filesize(ulf)-1)+
|
||||
') -- "'+ub.filename+'.dir"');
|
||||
|
@ -980,13 +989,15 @@ begin
|
|||
for j:=1 to 6 do ub.res[j]:=0;
|
||||
end;
|
||||
seek(ulf,i); write(ulf,ub);
|
||||
{rcg11182000 lowercased this ".DIR" string...}
|
||||
with tag_ub do
|
||||
assign(tag_ulff,dlpath+filename+'.DIR');
|
||||
assign(tag_ulff,dlpath+filename+'.dir');
|
||||
|
||||
{$I-} reset(tag_ulff); {$I+}
|
||||
if (ioresult=0) then begin
|
||||
siz:=filesize(tag_ulff)-1;
|
||||
assign(ulff,tgpath+tag_ub.filename+'.DIR');
|
||||
{rcg11182000 lowercased this ".DIR" string...}
|
||||
assign(ulff,tgpath+tag_ub.filename+'.dir');
|
||||
star(' (record #'+cstr(i)+' of '+cstr(filesize(tag_ulf)-1)+
|
||||
') -- "'+tag_ub.filename+'.dir"'); gotoxy(1,wherey-1);
|
||||
writeln;
|
||||
|
|
|
@ -360,7 +360,9 @@ begin
|
|||
exit;
|
||||
end;
|
||||
disable_interrupts;
|
||||
}
|
||||
rx_chars:=0; rx_in:=1; rx_out:=1;
|
||||
{
|
||||
enable_interrupts;
|
||||
}
|
||||
end;
|
||||
|
@ -377,7 +379,11 @@ begin
|
|||
exit;
|
||||
end;
|
||||
disable_interrupts;
|
||||
}
|
||||
|
||||
tx_chars:=0; tx_in:=1; tx_out:=1;
|
||||
|
||||
{
|
||||
enable_interrupts;
|
||||
}
|
||||
end;
|
||||
|
|
|
@ -401,6 +401,7 @@ var u:userrec;
|
|||
begin
|
||||
if ((modemr.init<>'') and (answerbaud=0) and (not localioonly)) then begin
|
||||
gotoxy(1,24); tc(12); clreol; write('Initializing modem...');
|
||||
|
||||
if (not keypressed) then begin
|
||||
c:=#0; s:=''; done:=FALSE; try:=0;
|
||||
rl:=timer;
|
||||
|
@ -426,7 +427,7 @@ var u:userrec;
|
|||
if (try>10) then done:=TRUE;
|
||||
until ((done) or (keypressed));
|
||||
end;
|
||||
while (keypressed) do isc:=readkey;
|
||||
while (keypressed) do begin isc:=readkey; writeln(ord(isc)); end;
|
||||
delay(100); com_flush_rx;
|
||||
rl1:=timer; repeat c:=ccinkey1 until (abs(timer-rl1)>0.1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue