From b9ddaf6f0e7cf68e36129411a44c943e70bbad06 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 19 Nov 2000 10:49:44 +0000 Subject: [PATCH] Updated. --- CHANGELOG | 18 ++++++++ Makefile | 84 ++++++++++++++++++------------------- cbbs.pas | 7 ++++ common.pas | 30 ++++++++++---- conv17a.pas | 7 ++++ conv17a9.pas | 7 ++++ conv18a.pas | 7 ++++ file0.pas | 5 ++- file11.pas | 3 +- init.pas | 114 +++++++++++++++++++++++++++++++++++---------------- initp.pas | 26 +++++++++--- rec25.pas | 22 ++++++++++ sysop9.pas | 8 ++-- t2t.pas | 19 +++++++-- tmpcom.pas | 10 ++++- wfcmenu.pas | 3 +- 16 files changed, 268 insertions(+), 102 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 61e3268..7dfbd6c 100644 --- a/CHANGELOG +++ b/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 diff --git a/Makefile b/Makefile index ca36c36..5d6da05 100644 --- a/Makefile +++ b/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) diff --git a/cbbs.pas b/cbbs.pas index f48c009..940f187 100644 --- a/cbbs.pas +++ b/cbbs.pas @@ -73,7 +73,14 @@ function daynum(dt:string):integer; 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); diff --git a/common.pas b/common.pas index 0a5ccf4..cec41ee 100644 --- a/common.pas +++ b/common.pas @@ -1205,7 +1205,14 @@ function daynum(dt:string):integer; 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 @@ procedure printfile(fn: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 @@ procedure printf(fn:string); { see if an *.ANS file is available } 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 @@ procedure printf(fn:string); { see if an *.ANS file is available } 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; diff --git a/conv17a.pas b/conv17a.pas index 83c34c5..850648a 100644 --- a/conv17a.pas +++ b/conv17a.pas @@ -192,7 +192,14 @@ function daynum(dt:astr):integer; 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); diff --git a/conv17a9.pas b/conv17a9.pas index b59a52e..34053f8 100644 --- a/conv17a9.pas +++ b/conv17a9.pas @@ -217,7 +217,14 @@ function daynum(dt:astr):integer; 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); diff --git a/conv18a.pas b/conv18a.pas index c44c503..7b69e38 100644 --- a/conv18a.pas +++ b/conv18a.pas @@ -202,7 +202,14 @@ function daynum(dt:astr):integer; 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); diff --git a/file0.pas b/file0.pas index dc5113a..9af48be 100644 --- a/file0.pas +++ b/file0.pas @@ -155,10 +155,11 @@ procedure fiscan(var pl:integer); { loads in memuboard ... } 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); diff --git a/file11.pas b/file11.pas index 2003c3a..a6f85ff 100644 --- a/file11.pas +++ b/file11.pas @@ -535,7 +535,8 @@ procedure fbasestats; 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; diff --git a/init.pas b/init.pas index 087b098..e6f5c0c 100644 --- a/init.pas +++ b/init.pas @@ -109,8 +109,12 @@ function freek(d:integer):longint; 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 @@ function daynum(dt:astr):integer; 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 @@ procedure movefile(var ok,nospace:boolean; showprog:boolean; 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 @@ procedure movefile(var ok,nospace:boolean; showprog:boolean; 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 @@ procedure movefile(var ok,nospace:boolean; showprog:boolean; 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 @@ procedure movefiles(srcname,destpath:string); 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 @@ function make_path(s:string):boolean; 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 @@ procedure make_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); + } + 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 @@ procedure make_status_dat; 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 @@ procedure make_uploads_dat; 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 @@ procedure make_uploads_dat; 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 @@ procedure savemhead1(var brdf:file; mhead:mheaderrec); outftinfo(toi); blockwritestr(brdf,originsite); end; -} - - writeln('STUB: init.pas; savemhead1()...'); end; procedure make_email_brd; @@ -945,12 +984,8 @@ procedure make_email_brd; 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 @@ procedure make_email_brd; 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 @@ procedure make_email_brd; alias:='SysOp'; end; - {rcg11172000 fooked.} - {originsite:='';} - writeln('STUB: init.pas; make_email_brd()...'); - + originsite:=''; end; savemhead1(brdf,mheader); close(brdf); @@ -1124,17 +1152,14 @@ procedure make_mboard(s:string); 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 @@ procedure dostuff; 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 @@ procedure dostuff; 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 @@ procedure dostuff; end; getdir(0,curdir); + {rcg11182000 dosisms.} + { path[1]:=curdir+'\GFILES\'; path[2]:=curdir+'\MSGS\'; path[3]:=curdir+'\MENUS\'; @@ -1242,6 +1272,15 @@ procedure dostuff; 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 @@ procedure dostuff; 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. diff --git a/initp.pas b/initp.pas index b503f15..736144b 100644 --- a/initp.pas +++ b/initp.pas @@ -193,7 +193,10 @@ procedure initp1; 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 @@ procedure initp1; 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 @@ procedure initp1; 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 @@ procedure initp1; 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 @@ procedure initp1; 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); diff --git a/rec25.pas b/rec25.pas index 05ff34e..02a01b6 100644 --- a/rec25.pas +++ b/rec25.pas @@ -182,6 +182,7 @@ 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 @@ 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 @@ 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 @@ 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.} + diff --git a/sysop9.pas b/sysop9.pas index a913f8c..de22207 100644 --- a/sysop9.pas +++ b/sysop9.pas @@ -191,11 +191,12 @@ procedure dlboardedit; 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 @@ procedure dlboardedit; 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); diff --git a/t2t.pas b/t2t.pas index c897472..05c11e3 100644 --- a/t2t.pas +++ b/t2t.pas @@ -143,7 +143,14 @@ function daynum(dt:astr):integer; 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 @@ procedure bconvert(xx:integer); 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 @@ procedure fconvert(xx:integer); 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; diff --git a/tmpcom.pas b/tmpcom.pas index 80d02aa..58495b3 100644 --- a/tmpcom.pas +++ b/tmpcom.pas @@ -360,8 +360,10 @@ procedure com_flush_rx; exit; end; disable_interrupts; +} rx_chars:=0; rx_in:=1; rx_out:=1; - enable_interrupts; +{ +enable_interrupts; } end; @@ -377,8 +379,12 @@ procedure com_flush_tx; exit; end; disable_interrupts; +} + tx_chars:=0; tx_in:=1; tx_out:=1; - enable_interrupts; + +{ +enable_interrupts; } end; diff --git a/wfcmenu.pas b/wfcmenu.pas index 5a28aec..e620387 100644 --- a/wfcmenu.pas +++ b/wfcmenu.pas @@ -401,6 +401,7 @@ procedure wfcmenus(wanthangup:boolean); 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 @@ procedure wfcmenus(wanthangup:boolean); 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);