Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updated.
  • Loading branch information
icculus committed Nov 19, 2000
1 parent 8aa8943 commit b9ddaf6
Show file tree
Hide file tree
Showing 16 changed files with 268 additions and 102 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG
Expand Up @@ -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>

Expand Down
84 changes: 42 additions & 42 deletions Makefile
Expand Up @@ -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.
Expand All @@ -24,34 +24,18 @@ 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

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.
Expand All @@ -73,7 +57,7 @@ else
endif
endif

# Borland TP7.0 compatibility flag.
# Rebuild all units needed.
PPC386FLAGS += -B

# Borland TP7.0 compatibility flag.
Expand All @@ -86,17 +70,33 @@ 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

# 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.

Expand All @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions cbbs.pas
Expand Up @@ -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);
Expand Down
30 changes: 23 additions & 7 deletions common.pas
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions conv17a.pas
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions conv17a9.pas
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions conv18a.pas
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions file0.pas
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion file11.pas
Expand Up @@ -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;
Expand Down

0 comments on commit b9ddaf6

Please sign in to comment.