updated. default tip
authorRyan C. Gordon <icculus@icculus.org>
Fri, 02 Mar 2001 22:07:42 +0000
changeset 10 5ca3db916a21
parent 9 0b73727e49c7
updated.
CHANGELOG
Makefile
TODO
bb.pas
bbs.pas
cbbs.pas
common.pas
common1.pas
conv17a.pas
conv17a9.pas
conv18a.pas
cuser.pas
file9.pas
init.pas
logon2.pas
mail0.pas
myio.pas
rec25.pas
sysop3.pas
t2t.pas
ta2z.pas
tmpcom.pas
wfcmenu.pas
--- a/CHANGELOG	Sat Nov 25 05:35:11 2000 +0000
+++ b/CHANGELOG	Fri Mar 02 22:07:42 2001 +0000
@@ -1,3 +1,57 @@
+2000-12-17  Ryan C. Gordon   <icculus@lokigames.com>
+    * More CPU burnage: put a delay() call in the loop that prompts for
+      local login (yes, no, fast). This is starting to annoy me.
+    * Implemented sysop1() in common.pas ... since we can't check the value
+      of scroll lock, it now checks the existance of a file (GFILES/sysop.in).
+      An external program/script can set this, since we aren't in a single
+      tasked DOS anymore, and it shouldn't be repeated disk accesses, since
+      Linux should just keep the directory entry cached.
+    * Put initial work in place for myio.pas's savescreen() and friends. This
+      is probably FreePascal (and Unix?) specific code, though.
+    * Started fucking with socket interface. Gave up.  :)
+
+2000-12-13  Ryan C. Gordon   <icculus@lokigames.com>
+    * Put delay(10) call in the wait for modem initialization response, to
+      reduce CPU burn.
+    * Put delay() call in getkey() (common.pas) to stop CPU chowing.
+    * Added check to verify that the terminal is exactly 80 chars wide and
+      at least 25 chars high. (mainline of bbs.pas)
+
+2000-11-30  Ryan C. Gordon   <icculus@lokigames.com>
+    * Put delay() call in the telegard logo animation loop on the wfc menu.
+      Now the logo updates a little less than three times a second, and doesn't
+      starve the CPU.
+    * Changed Makefile temporarily to only build bbs and init.
+
+2000-11-27  Ryan C. Gordon   <icculus@lokigames.com>
+    * More Y2K crud. This is a slow, slow process.
+    * mail0.pas's initbrd() was looking for capital filenames. Fixed.
+
+2000-11-26  Ryan C. Gordon   <icculus@lokigames.com>
+    * Changed dosansi() in common.pas to just call write() instead of a
+      DOS int21h service. This allows the menus that are stored in .ANS
+      files to show up on the local side, albeit incorrectly at this point.
+    * Went on a Y2K rampage. Looked for places that used two-digit years, and
+      started making them use 4 digits. This allowed me to remove some prior
+      hacks, and make the system more robust in general. It will probably
+      introduce a few bugs where the system is less obviously expecting a two
+      digit year. We'll see. Some of the more obvious places where a two-digit
+      year might pass through now have checks that halt() if there's a problem.
+    * Changed all the INT21h-based versions of date() and time(). Have I
+      mentioned yet that I'm astounded by the amount of cut-and-pasting in
+      this codebase? I don't understand why they bothered to have a "common"
+      unit if so much common code was just duplicated all over the place.
+    * Added rcgpanic() to common.pas. Made some of the programs reference this
+      unit if they weren't already. The checks for two-digit year strings call
+      rcgpanic in case of trouble...this gives me a unified place to set a
+      break point and backtrace in gdb...
+    * init.pas filled in the init user record's birthday with a hardcoded
+      '00/00/00'. logon2.pas checks for this to see if it's a new record.
+      Fixed in both places. Changed cuser.pas's cstuff::doage() to accept and
+      understand 4-digit years.
+    * sysop3.pas showuserinfo::shi1() had an output that spilled past the 80
+      char line limit once it was printing 4-digit years. Fixed.
+
 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.
--- a/Makefile	Sat Nov 25 05:35:11 2000 +0000
+++ b/Makefile	Fri Mar 02 22:07:42 2001 +0000
@@ -31,11 +31,11 @@
 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.
@@ -70,10 +70,10 @@
 #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
@@ -107,7 +107,8 @@
 $(BUILDDIR)/%.o : %.pas
 	$(PPC386) $(PPC386FLAGS) $<
 
-all: $(BUILDDIR) $(MAINEXE) $(MINITERMEXE) $(INITEXE) $(TPAGEEXE) $(IFLEXE) \
+all: $(BUILDDIR) $(MAINEXE) $(INITEXE)  #\
+     $(MINITERMEXE) $(TPAGEEXE) $(IFLEXE) \
      $(FINDITEXE) $(OBLITEXE) $(MTESTEXE) $(BBEXE) $(CBBSEXE) \
      $(MABSEXE) $(COCONFIGEXE) $(SPDATEEXE) $(T2TEXE)
 
--- a/TODO	Sat Nov 25 05:35:11 2000 +0000
+++ b/TODO	Fri Mar 02 22:07:42 2001 +0000
@@ -1,6 +1,15 @@
 - grep -i "DOS" *
-- rm sources ; cvs remove sources ; cvs commit -m "not needed" sources
-- cvs add TODO ; cvs commit -m "initial add." TODO
 - Look for calls to bslash() and isul().
 - Looks for DOSisms in ifl.pas.
+- Look at rec25.pas, and check for filename storage of only 8 bytes in the
+  various records. Make it a full 255-character string at least.
+- Looks like we've got some record clash. Hunt it out.
+- Mail crashes. Record problems?
+- ANSI code issues with write()
+- Savescreen(), etc.
+- wfc broken in xterm.
+- More y2k shit
+- modem/telnet support.
 
+// end of TODO ...
+
--- a/bb.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/bb.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -5,7 +5,7 @@
 
 uses
   crt,dos,
-  myio;
+  myio, common;
 
 {$I func.pas}
 
@@ -52,6 +52,8 @@
 end;
 
 function sdat(dt:datetime):string;
+{rcg11272000 my add.}
+var yearstr:string;
 
   function tch(i:integer):string;
   var s:string;
@@ -63,15 +65,25 @@
   end;
 
 begin
-  with dt do
-    sdat:=tch(month)+'/'+tch(day)+'/'+tch(year-1900)+' '+tch(hour)+':'+tch(min)+':'+tch(sec);
+  with dt do begin
+    {rcg11272000 y2k stuff.}
+    {sdat:=tch(month)+'/'+tch(day)+'/'+tch(year-1900)+' '+tch(hour)+':'+tch(min)+':'+tch(sec);}
+    str(year,yearstr);
+    sdat:=tch(month)+'/'+tch(day)+'/'+yearstr+' '+tch(hour)+':'+tch(min)+':'+tch(sec);
+  end;
 end;
 
 procedure unsdat(s:string; var dt:datetime);
 var x:integer;
 begin
+
+  {rcg11272000 my add...}
+  if (length(s) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN DATE!');
+
   with dt do begin
-    val(copy(s,7,2),year,x); inc(year,1900);
+    {rcg11272000 Y2K-proofing.}
+    {val(copy(s,7,2),year,x); inc(year,1900);}
+    val(copy(s,7,4),year,x);
     val(copy(s,1,2),month,x);
     val(copy(s,4,2),day,x);
     val(copy(s,10,2),hour,x);
--- a/bbs.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/bbs.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -212,6 +212,25 @@
     close(systatf);
   end;
 
+
+  {rcg12132000 added checks. Friggin' Xterms... :)  }
+  if (ScreenWidth <> 80) then
+  begin
+        writeln;
+        writeln('Your terminal needs to be exactly 80 characters wide to run the BBS.');
+        writeln(' If this is a window, please resize it.');
+        halt(254);
+  end;
+
+  if ((ScreenHeight < 25) or (ScreenHeight > 50)) then
+  begin
+        writeln;
+        writeln('Your terminal must be between 25 and 50 characters high to run the BBS.');
+        writeln(' If this is a window, please resize it.');
+        halt(254);
+  end;
+
+
   {rcg11172000 No overlay on Linux.}
   {
   ovrinit('bbs.OVR');
--- a/cbbs.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/cbbs.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -1,4 +1,4 @@
-uses dos;
+uses dos, common;
 
 var f:text;
 
@@ -28,6 +28,9 @@
   if s='' then value:=0;
 end;
 
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation.}
+{
 function time:string;
 var r:registers;
     h,m,s:string[4];
@@ -36,7 +39,20 @@
   str(r.cx shr 8,h); str(r.cx mod 256,m); str(r.dx shr 8,s);
   time:=tch(h)+':'+tch(m)+':'+tch(s);
 end;
+}
 
+function time:string;
+var h,m,s:string[3];
+    hh,mm,ss,ss100:word;
+begin
+  gettime(hh,mm,ss,ss100);
+  str(hh,h); str(mm,m); str(ss,s);
+  time:=tch(h)+':'+tch(m)+':'+tch(s);
+end;
+
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation, Y2K fixes included.}
+{
 function date:string;
 var r:registers;
     m,d,y:string[4];
@@ -45,6 +61,26 @@
   str(r.dx shr 8,m);
   date:=tch(m)+'/'+tch(d)+'/'+tch(y);
 end;
+}
+
+function date:string;
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
+    yy,mm,dd,dow:word;
+
+begin
+  getdate(yy,mm,dd,dow);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
+end;
 
 function leapyear(yr:integer):boolean;
 begin
@@ -75,11 +111,14 @@
   d:=value(copy(dt,4,2));
 
   {rcg11182000 hahahaha...a Y2K bug.  :) }
-  y:=value(copy(dt,7,2))+1900;
+  {rcg11272000 Let's make sure the values coming in here are four }
+  {digits in the first place, which should save us some hacks elsewhere...}
+  {y:=value(copy(dt,7,2))+1900;}
 
-  {rcg11182000 added this conditional. }
-  if (y < 1977) then  { Ugh...this is so bad. }
-    y := y + 100;
+  {rcg11272000 my adds...}
+  if (length(dt) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN DATE!');
+  y:=value(copy(dt,7,4));
+  {rcg11272000 end my adds...}
 
   for c:=1985 to y-1 do
     if leapyear(c) then t:=t+366 else t:=t+365;
@@ -102,7 +141,9 @@
     2:x:='Thu';
   end;
   y:=mon[value(copy(date,1,2))];
-  x:=x+' '+y+' '+copy(date,4,2)+', '+cstr(1900+value(copy(date,7,2)));
+  {rcg11272000 Y2K-proofing.}
+  {x:=x+' '+y+' '+copy(date,4,2)+', '+cstr(1900+value(copy(date,7,2)));}
+  x:=x+' '+y+' '+copy(date,4,2)+', '+cstr(value(copy(date,7,4)));
   y:=time; i:=value(copy(y,1,2));
   if i>11 then ap:='pm' else ap:='am';
   if i>12 then i:=i-12;
--- a/common.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/common.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -19,6 +19,13 @@
      f_execwithswap = function(p,c:string):word;
      p_shutdownexecswap = procedure;
 
+
+{rcg12012000 my adds.}
+var ansibuf:string;
+const ansiset:set of char=['0'..'9','A'..'D','[',';','?','H', 'J','K','m','h'];
+{rcg12012000 my adds end.}
+
+
 var initexecswap2:f_initexecswap;
     execwithswap2:f_execwithswap;
     shutdownexecswap2:p_shutdownexecswap;
@@ -253,6 +260,10 @@
     hiubatchv:integer;
 
 
+{rcg11272000 added by me.}
+procedure rcgpanic(s:string);
+
+
 function lenn(s:string):integer;
 function lennmci(s:string):integer;
 procedure loaduboard(i:integer);
@@ -515,6 +526,18 @@
 var cfilter:cfilterrec;
     cfiltertype,cfilternum,cfiltercount:integer;
 
+
+{rcg11272000 added by me.}
+procedure rcgpanic(s:string);
+begin
+    NormVideo;
+    clrscr;
+    writeln('PANIC: ' + s + ' ...');
+    writeln(' ... halting ...');
+    halt(69);
+end;
+
+
 procedure shelldos(bat:boolean; cl:string; var rcode:integer);
 var t:text;
     s:string;
@@ -1053,8 +1076,7 @@
 end;
 }
 begin
-   writeln('STUB: common.pas; sysop1()...');
-   sysop1 := FALSE;
+    sysop1 := exist(systat.gfilepath+'sysop.in');
 end;
 
 
@@ -1130,13 +1152,22 @@
 end;
 
 function date:string;
-var r:registers;
-    y,m,d:string[3];
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
     yy,mm,dd,dow:word;
+
 begin
   getdate(yy,mm,dd,dow);
-  str(yy-1900,y); str(mm,m); str(dd,d);
-  date:=tch(m)+'/'+tch(d)+'/'+tch(y);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
 end;
 
 function value(s:string):longint;
@@ -1167,12 +1198,16 @@
 function ageuser(bday:string):integer;
 var i:integer;
 begin
-  i:=value(copy(date,7,2))-value(copy(bday,7,2));
 
-  {rcg11242000 Y2K hack.}
-  i := i + 100;
+  {rcg11272000 my add...}
+  if (length(bday) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN BIRTHDAY DATE!');
 
-  if (daynum(copy(bday,1,6)+copy(date,7,2))>daynum(date)) then dec(i);
+  {rcg11272000 y2k issues...}
+  {i:=value(copy(date,7,2))-value(copy(bday,7,2));}
+  {if (daynum(copy(bday,1,6)+copy(date,7,2))>daynum(date)) then dec(i);}
+
+  i:=value(copy(date,7,4))-value(copy(bday,7,4));
+  if (daynum(copy(bday,1,6)+copy(date,7,4))>daynum(date)) then dec(i);
   ageuser:=i;
 end;
 
@@ -1222,13 +1257,15 @@
   t:=0;
   m:=value(copy(dt,1,2));
   d:=value(copy(dt,4,2));
+  {rcg11182000 hahahaha...a Y2K bug.  :) }
+  {rcg11272000 Let's make sure the values coming in here are four }
+  {digits in the first place, which should save us some hacks elsewhere...}
+  {y:=value(copy(dt,7,2))+1900;}
 
-  {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;
+  {rcg11272000 my adds...}
+  if (length(dt) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN DATE!');
+  y:=value(copy(dt,7,4));
+  {rcg11272000 end my adds...}
 
   for c:=1985 to y-1 do
     if (leapyear(c)) then inc(t,366) else inc(t,365);
@@ -1483,6 +1520,8 @@
 *)
 
 procedure dosansi(c:char);
+{rcg11262000 DOSism.}
+{
 var r:registers;
 begin
   with r do begin
@@ -1490,6 +1529,31 @@
     msdos(r);
   end;
 end;
+}
+
+{rcg12012000 must buffer ANSI sequences for bug in FreePascal.}
+
+begin
+
+    { there's something in the buffer and it can be safely dumped? }
+    if ((ansibuf[0] <> #0) and (not (c in ansiset))) then
+    begin
+        write(ansibuf);        { dump to crt driver. }
+        ansibuf[0] := #0;      { reset buffer. }
+    end;
+
+    if ((ansibuf[0] <> #0) or (c = #27)) then  { add to or start the buffer? }
+    begin
+        inc(ansibuf[0]);
+        ansibuf[ord(ansibuf[0])] := c;
+    end
+
+    else
+    begin
+        write(c);  { no need to buffer at this time; just write to crt... }
+    end;
+end;
+
 
 procedure lpromptc(c:char);
 var ss:string;
@@ -1944,6 +2008,9 @@
             5:begin sound(3400); delay(55); end;
           end;
           aphase:=aphase mod 5+1;
+        {rcg12132000 else added by me to stop CPU chowing.}
+        end else begin
+            delay(10);
         end;
 
         if (ch) then c:=chinkey else c:=inkey;
@@ -2850,10 +2917,15 @@
 var s:string;
 begin
   case i of
+    {rcg11252000 changed.}
+    {
     1:begin
         s:='Project Coyote 0.14 Alpha ';
       end;
     2:s:='Complied By Robert Merritt on 11-19-92';
+    }
+    1:s:='Penguin Telegard 0.0.1';
+    2:s:='Send complaints to Ryan C. Gordon <icculus@lokigames.com>';
   end;
   verline:=s;
 end;
--- a/common1.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/common1.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -292,7 +292,9 @@
 procedure chatfile(b:boolean);
 var bf:file of byte;
     s:string[91];
+    trimmedfile:string;
     cr:boolean;
+    i, j: integer;
 begin
   s:='chat';
   if (thisuser.chatseperate) then s:=s+cstr(usernum);
--- a/conv17a.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/conv17a.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -147,6 +147,9 @@
   tch:=i;
 end;
 
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation.}
+{
 function time:astr;
 var reg:registers;
     h,m,s:string[4];
@@ -155,7 +158,20 @@
   str(reg.cx shr 8,h); str(reg.cx mod 256,m); str(reg.dx shr 8,s);
   time:=tch(h)+':'+tch(m)+':'+tch(s);
 end;
+}
 
+function time:string;
+var h,m,s:string[3];
+    hh,mm,ss,ss100:word;
+begin
+  gettime(hh,mm,ss,ss100);
+  str(hh,h); str(mm,m); str(ss,s);
+  time:=tch(h)+':'+tch(m)+':'+tch(s);
+end;
+
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation, Y2K fixes included.}
+{
 function date:astr;
 var reg:registers;
     m,d,y:string[4];
@@ -164,6 +180,27 @@
   str(reg.dx shr 8,m);
   date:=tch(m)+'/'+tch(d)+'/'+tch(y);
 end;
+}
+
+function date:string;
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
+    yy,mm,dd,dow:word;
+
+begin
+  getdate(yy,mm,dd,dow);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
+end;
+
 
 function leapyear(yr:integer):boolean;
 begin
@@ -194,11 +231,14 @@
   d:=value(copy(dt,4,2));
 
   {rcg11182000 hahahaha...a Y2K bug.  :) }
-  y:=value(copy(dt,7,2))+1900;
+  {rcg11272000 Let's make sure the values coming in here are four }
+  {digits in the first place, which should save us some hacks elsewhere...}
+  {y:=value(copy(dt,7,2))+1900;}
 
-  {rcg11182000 added this conditional. }
-  if (y < 1977) then  { Ugh...this is so bad. }
-    y := y + 100;
+  {rcg11272000 my adds...}
+  if (length(dt) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN DATE!');
+  y:=value(copy(dt,7,4));
+  {rcg11272000 end my adds...}
 
   for c:=1985 to y-1 do
     if leapyear(c) then t:=t+366 else t:=t+365;
--- a/conv17a9.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/conv17a9.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -172,6 +172,9 @@
   tch:=i;
 end;
 
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation.}
+{
 function time:astr;
 var reg:registers;
     h,m,s:string[4];
@@ -180,7 +183,20 @@
   str(reg.cx shr 8,h); str(reg.cx mod 256,m); str(reg.dx shr 8,s);
   time:=tch(h)+':'+tch(m)+':'+tch(s);
 end;
+}
 
+function time:string;
+var h,m,s:string[3];
+    hh,mm,ss,ss100:word;
+begin
+  gettime(hh,mm,ss,ss100);
+  str(hh,h); str(mm,m); str(ss,s);
+  time:=tch(h)+':'+tch(m)+':'+tch(s);
+end;
+
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation, Y2K fixes included.}
+{
 function date:astr;
 var reg:registers;
     m,d,y:string[4];
@@ -189,6 +205,26 @@
   str(reg.dx shr 8,m);
   date:=tch(m)+'/'+tch(d)+'/'+tch(y);
 end;
+}
+
+function date:string;
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
+    yy,mm,dd,dow:word;
+
+begin
+  getdate(yy,mm,dd,dow);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
+end;
 
 function leapyear(yr:integer):boolean;
 begin
@@ -219,11 +255,14 @@
   d:=value(copy(dt,4,2));
 
   {rcg11182000 hahahaha...a Y2K bug.  :) }
-  y:=value(copy(dt,7,2))+1900;
+  {rcg11272000 Let's make sure the values coming in here are four }
+  {digits in the first place, which should save us some hacks elsewhere...}
+  {y:=value(copy(dt,7,2))+1900;}
 
-  {rcg11182000 added this conditional. }
-  if (y < 1977) then  { Ugh...this is so bad. }
-    y := y + 100;
+  {rcg11272000 my adds...}
+  if (length(dt) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN DATE!');
+  y:=value(copy(dt,7,4));
+  {rcg11272000 end my adds...}
 
   for c:=1985 to y-1 do
     if leapyear(c) then t:=t+366 else t:=t+365;
--- a/conv18a.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/conv18a.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -157,6 +157,9 @@
   tch:=i;
 end;
 
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation.}
+{
 function time:astr;
 var reg:registers;
     h,m,s:string[4];
@@ -165,7 +168,20 @@
   str(reg.cx shr 8,h); str(reg.cx mod 256,m); str(reg.dx shr 8,s);
   time:=tch(h)+':'+tch(m)+':'+tch(s);
 end;
+}
 
+function time:string;
+var h,m,s:string[3];
+    hh,mm,ss,ss100:word;
+begin
+  gettime(hh,mm,ss,ss100);
+  str(hh,h); str(mm,m); str(ss,s);
+  time:=tch(h)+':'+tch(m)+':'+tch(s);
+end;
+
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation, Y2K fixes included.}
+{
 function date:astr;
 var reg:registers;
     m,d,y:string[4];
@@ -174,6 +190,27 @@
   str(reg.dx shr 8,m);
   date:=tch(m)+'/'+tch(d)+'/'+tch(y);
 end;
+}
+
+function date:string;
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
+    yy,mm,dd,dow:word;
+
+begin
+  getdate(yy,mm,dd,dow);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
+end;
+
 
 function leapyear(yr:integer):boolean;
 begin
@@ -204,11 +241,14 @@
   d:=value(copy(dt,4,2));
 
   {rcg11182000 hahahaha...a Y2K bug.  :) }
-  y:=value(copy(dt,7,2))+1900;
+  {rcg11272000 Let's make sure the values coming in here are four }
+  {digits in the first place, which should save us some hacks elsewhere...}
+  {y:=value(copy(dt,7,2))+1900;}
 
-  {rcg11182000 added this conditional. }
-  if (y < 1977) then  { Ugh...this is so bad. }
-    y := y + 100;
+  {rcg11272000 my adds...}
+  if (length(dt) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN DATE!');
+  y:=value(copy(dt,7,4));
+  {rcg11272000 end my adds...}
 
   for c:=1985 to y-1 do
     if leapyear(c) then t:=t+366 else t:=t+365;
--- a/cuser.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/cuser.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -84,16 +84,28 @@
     end;
 
   begin
-    if (how=3) then prompt('Enter date of birth (mm/dd/yy) : ')
+    {rcg11272000 y2k stuff.}
+    {if (how=3) then prompt('Enter date of birth (mm/dd/yy) : ')}
+
+    if (how=3) then prompt('Enter date of birth (mm/dd/yyyy) : ')
     else begin
       sprint('^301^5=January   ^304^5=April  ^307^5=July       ^310^5=October');
       sprint('^302^5=February  ^305^5=May    ^308^5=August     ^311^5=November');
       sprint('^303^5=March     ^306^5=June   ^309^5=September  ^312^5=December');
       nl;
-      prt('Enter your date of birth (mm/dd/yy) : ');
+      {rcg11272000 y2k stuff.}
+      {prt('Enter your date of birth (mm/dd/yy) : ');}
+      prt('Enter your date of birth (mm/dd/yyyy) : ');
     end;
+
+    {rcg11272000 y2k stuff.}
+    {
     cl(3); input(s,8);
     if ((length(s)=8) and (s[3]='/') and (s[6]='/')) then
+    }
+
+    cl(3); input(s,10);
+    if ((length(s)=10) and (s[3]='/') and (s[6]='/')) then
       if (numsok(s)) then
         if (ageuser(s)<3) then
           sprint(#3#7+'Isn''t '+cstr(ageuser(s))+' years old a little YOUNG???')
--- a/file9.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/file9.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -51,8 +51,13 @@
   unpacktime(dirinfo.time,dt);
   with dt do begin
     if hour<13 then pm:='a' else begin pm:='p'; hour:=hour-12; end;
+    {rcg11272000 Y2K-proofing.}
+    {
     s:=s+'  '+mrn(cstr(month),2)+'-'+ti(day)+'-'+ti(year-1900)+
              '  '+mrn(cstr(hour),2)+':'+ti(min)+pm;
+    }
+    s:=s+'  '+mrn(cstr(month),2)+'-'+ti(day)+'-'+cstr(year)+
+             '  '+mrn(cstr(hour),2)+':'+ti(min)+pm;
   end;
   info:=s;
 end;
--- a/init.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/init.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -158,11 +158,13 @@
   d:=value(copy(dt,4,2));
 
   {rcg11182000 hahahaha...a Y2K bug.  :) }
-  y:=value(copy(dt,7,2))+1900;
+  {rcg11272000 Let's make sure the values coming in here are four }
+  {digits in the first place, which should save us some hacks elsewhere...}
+  {y:=value(copy(dt,7,2))+1900;}
 
-  {rcg11182000 added this conditional. }
-  if (y < 1977) then  { Ugh...this is so bad. }
-    y := y + 100;
+  {rcg11272000 my adds...}
+  y:=value(copy(dt,7,4));
+  {rcg11272000 end my adds...}
 
   for c:=1985 to y-1 do
     if (leapyear(c)) then inc(t,366) else inc(t,365);
@@ -187,14 +189,23 @@
   time:=tch(h)+':'+tch(m)+':'+tch(s);
 end;
 
-function date:astr;
-var r:registers;
-    y,m,d:string[3];
+function date:string;
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
     yy,mm,dd,dow:word;
+
 begin
   getdate(yy,mm,dd,dow);
-  str(yy-1900,y); str(mm,m); str(dd,d);
-  date:=tch(m)+'/'+tch(d)+'/'+tch(y);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
 end;
 
 procedure ttl(s:string);
@@ -717,7 +728,11 @@
     realname:='System Operator';
     pw:='SYSOP';
     ph:='000-000-0000';
-    bday:='00/00/00';
+
+    {rcg11272000 y2k stuff.}
+    {bday:='00/00/00';}
+    bday:='00/00/0000';
+
     firston:=date;
     laston:=date;
     street:='';
@@ -957,6 +972,9 @@
 
   assign(brdf,'email.brd');
   rewrite(brdf,1);
+
+  {rcg12152000 changed for sanity...}
+  {
   lng:=$FC020010; blockwrite(brdf,lng,4);
   lng:=$DCBA0123; blockwrite(brdf,lng,4);
   blockwrite(brdf,lsize,4);
@@ -967,6 +985,20 @@
     blockwrite(brdf,s[0],1);
     blockwrite(brdf,s[1],ord(s[0]));
   end;
+  }
+
+{
+  lng:=$FC020010; blockwrite(brdf,lng,sizeof (lng));
+  lng:=$DCBA0123; blockwrite(brdf,lng,sizeof (lng));
+  blockwrite(brdf,lsize,sizeof (lsize));
+
+  while (not eof(t)) do begin
+    readln(t,s);
+    bb:=$FF; blockwrite(brdf,bb,sizeof (bb));
+    blockwrite(brdf,s[0],1);
+    blockwrite(brdf,s[1],ord(s[0]));
+  end;
+}
   close(t);
   erase(t);
 
--- a/logon2.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/logon2.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -77,15 +77,20 @@
   function checkbday:boolean;
   var i,j:integer;
   begin
-    i:=85;
+    {rcg11282000 Y2K stuff.}
+    {i:=85;}
+    i := 1985;
     repeat
-      j:=daynum(copy(thisuser.bday,1,6)+tch(cstr(i)));
+      {rcg11282000 y2k stuff.}
+      {j:=daynum(copy(thisuser.bday,1,6)+tch(cstr(i)));}
+      j:=daynum(copy(thisuser.bday,1,6)+cstr(i));
       if (daynum(date)>=j) and (daynum(thisuser.laston)<j) then begin
         checkbday:=TRUE;
         exit;
       end;
       inc(i);
-    until (i>value(copy(date,7,2)));
+    {until (i>value(copy(date,7,2)));}
+    until (i>value(copy(date,7,4)));
     checkbday:=FALSE;
   end;
 
@@ -247,7 +252,9 @@
   if (not wasguestuser) then
   begin
     if (thisuser.flistopt=0) then thisuser.flistopt:=1;
-    if (thisuser.bday='00/00/00') then begin
+    {rcg11272000 y2k stuff.}
+    {if (thisuser.bday='00/00/00') then begin}
+    if (thisuser.bday='00/00/0000') then begin
       print('Updating system records ...');
       cstuff(2,1,thisuser);
       nl;
--- a/mail0.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/mail0.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -219,13 +219,20 @@
   closebrd;
 
   bread:=x;
-  if (x=-1) then fn:='EMAIL' else begin
+  {rcg11272000 filename case.}
+  {if (x=-1) then fn:='EMAIL' else begin}
+  if (x=-1) then fn:='email' else begin
     loadboard(x);
     fn:=memboard.filename;
   end;
-  fn:=allcaps(fn);
+
+  {rcg11272000 filename case.}
+  {fn:=allcaps(fn);}
   brdfnopen:=fn;
-  assign(mixf,systat.msgpath+fn+'.MIX');
+
+  {rcg11272000 filename case.}
+  {assign(mixf,systat.msgpath+fn+'.MIX');}
+  assign(mixf,systat.msgpath+fn+'.mix');
   {$I-} reset(mixf,sizeof(mixr)); {$I+}
   if (ioresult<>0) then begin
     rewrite(mixf,sizeof(mixr));
@@ -243,7 +250,9 @@
     blockwrite(mixf,mintab[0],100);
   end;
 
-  assign(brdf,systat.msgpath+fn+'.BRD');
+  {rcg11272000 filename case.}
+  {assign(brdf,systat.msgpath+fn+'.BRD');}
+  assign(brdf,systat.msgpath+fn+'.brd');
   {$I-} reset(brdf,1); {$I+}
   if (ioresult<>0) then rewrite(brdf,1);
 
--- a/myio.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/myio.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -406,29 +406,35 @@
 end;
 
 procedure savescreen(var wind:windowrec; TLX,TLY,BRX,BRY:integer);
-{rcg11172000 this only flies under DOS.}
-{
 var x,y,i:integer;
+{rcg12152000 my add.}
+arraypos : integer;
 begin
   checkvidseg;
 
+    { !!! uhoh...problems in xterms? }
+
   wind[4000]:=TLX; wind[4001]:=TLY;
   wind[4002]:=BRX; wind[4003]:=BRY;
 
+
   i:=0;
   for y:=TLY to BRY do
     for x:=TLX to BRX do begin
+      {rcg11172000 this only flies under DOS.}
+      {
       inline($FA);
       wind[i]:=mem[vidseg:(160*(y-1)+2*(x-1))];
       wind[i+1]:=mem[vidseg:(160*(y-1)+2*(x-1))+1];
       inline($FB);
+      }
+      { !!! this might be FreePascal/Linux-specific...}
+      arraypos := ((y * ScreenWidth) + x);
+      wind[i] := byte(ConsoleBuf^[arraypos].ch);
+      wind[i+1] := ConsoleBuf^[arraypos].attr;
       inc(i,2);
     end;
 end;
-}
-begin
-  writeln('STUB: myio.pas; savescreen()...');
-end;
 
 procedure setwindow(var wind:windowrec; TLX,TLY,BRX,BRY,tcolr,bcolr,boxtype:integer);
 {rcg11172000 unused variable.}
@@ -442,9 +448,9 @@
 end;
 
 procedure removewindow(wind:windowrec);
-{rcg11172000 this only flies under DOS.}
-{
 var TLX,TLY,BRX,BRY,x,y,i:integer;
+{rcg12152000 my add.}
+arraypos : integer;
 begin
   checkvidseg;
 
@@ -457,17 +463,20 @@
   i:=0;
   for y:=TLY to BRY do
     for x:=TLX to BRX do begin
+      {rcg11172000 this only flies under DOS.}
+      {
       inline($FA);
       mem[vidseg:(160*(y-1)+2*(x-1))]:=wind[i];
       mem[vidseg:(160*(y-1)+2*(x-1))+1]:=wind[i+1];
       inline($FB);
+      }
+      { !!! this might be FreePascal/Linux-specific...}
+      arraypos := ((y * ScreenWidth) + x);
+      ConsoleBuf^[arraypos].ch := char(wind[i]);
+      ConsoleBuf^[arraypos].attr := wind[i+1];
       inc(i,2);
     end;
 end;
-}
-begin
-  writeln('STUB: myio.pas; removewindow()...');
-end;
 
 procedure removewindow1(wind:windowrec);
 var oldx1,oldy1,oldx2,oldy2,sx,sy,sz:byte;
@@ -483,9 +492,9 @@
 end;
 
 procedure movewindow(wind:windowrec; TLX,TLY:integer);
-{rcg11172000 this only flies under DOS.}
-{
 var BRX,BRY,x,y,i:integer;
+{rcg12152000 my add.}
+arraypos : integer;
 begin
   checkvidseg;
 
@@ -498,16 +507,19 @@
   i:=0;
   for y:=TLY to BRY do
     for x:=TLX to BRX do begin
+      {rcg11172000 this only flies under DOS.}
+      {
       inline($FA);
       mem[vidseg:(160*(y-1)+2*(x-1))]:=wind[i];
       mem[vidseg:(160*(y-1)+2*(x-1))+1]:=wind[i+1];
       inline($FB);
+      }
+      { !!! this might be FreePascal/Linux-specific...}
+      arraypos := ((y * ScreenWidth) + x);
+      wind[i] := byte(ConsoleBuf^[arraypos].ch);
+      wind[i+1] := ConsoleBuf^[arraypos].attr;
       inc(i,2);
     end;
 end;
-}
-begin
-  writeln('STUB: myio.pas; movewindow()...');
-end;
 
 end.
--- a/rec25.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/rec25.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -83,10 +83,14 @@
     realname:string[36];              { real name        }
     pw:string[20];                    { user password    }
     ph:string[12];                    { user phone #     }
-    bday:string[8];                   { user birthdate   }
-    firston:string[8];                { firston date     }
+    {rcg11272000 Y2K limitations.}
+    (*bday:string[8];                   { user birthdate   }*)
+    (*firston:string[8];                { firston date     }*)
+    (*laston:string[8];                 { laston date      }*)
+    bday:string[10];                   { user birthdate   }
+    firston:string[10];                { firston date     }
     x1xs  :array[1..2] of byte;
-    laston:string[8];                 { laston date      }
+    laston:string[10];                 { laston date      }
     x2xs  :array[1..2] of byte;
     street:string[30];                { mailing address  }
     citystate:string[30];             { city, state      }
@@ -224,7 +228,9 @@
 
   zlogrec=                        { ZLOG.DAT : System log }
   record
-    date:string[8];
+    {rcg11272000 Y2K bullshite.}
+    {date:string[8];}
+    date:string[10];
     userbaud:array[0..4] of integer;
     active,calls,newusers,pubpost,privpost,fback,criterr:integer;
     uploads,downloads:integer;
@@ -341,7 +347,9 @@
     closedsystem:boolean;             { DON'T allow new users? }
     swapshell:boolean;                { is swap shell function enabled? }
     eventwarningtime:integer;         { time before event warning }
-    tfiledate:string[8];              { last date text-files were inserted }
+    {rcg11272000 y2k stuff.}
+    (*tfiledate:string[8];              { last date text-files were inserted }*)
+    tfiledate:string[10];             { last date text-files were inserted }
     lastmsgid:longint;                { last-used message ID (sequential) }
     res1:array[1..20] of byte;        { RESERVED SPACE #1 }
 
@@ -452,7 +460,9 @@
     dlkratio,                         { DLk/ULk ratios }
     postratio:secrange;               { post/call ratios }
 
-    lastdate:string[8];               { last system date }
+    {rcg11272000 y2k stuff.}
+    (*lastdate:string[8];               { last system date }*)
+    lastdate:string[10];              { last system date }
     curwindow:byte;                   { type of SysOp window currently in use }
     istopwindow:boolean;              { is SysOp window on top of screen? }
     callernum:longint;                { total number of callers }
@@ -479,7 +489,9 @@
   record
     title:string[40];             { title }
     filen:string[12];             { filename }
-    gdate:string[8];              { date of Tfile / Tfile base }
+    {rcg11272000 Y2K shit.}
+    (*gdate:string[8];              { date of Tfile / Tfile base }*)
+    gdate:string[10];             { date of Tfile / Tfile base }
     gdaten:integer;               { numeric date for fast calculation }
     acs,                          { access requirement }
     ulacs:acstring;               { upload to base access requirement }
@@ -590,6 +602,8 @@
     blocks:integer;               { # 128 byte blks }
     owner:integer;                { ULer of file }
     stowner:string[36];           { ULer's name }
+    {rcg11272000 y2k stuff.}
+    (*date:string[8];               { Date ULed }*)
     date:string[8];               { Date ULed }
     daten:integer;                { Numeric date ULed }
     vpointer:longint;             { Pointer to verbose descr, -1 if none }
--- a/sysop3.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/sysop3.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -113,7 +113,9 @@
                  #3#3+sex+cstr(ageuser(bday))+' ('+bday+')';
         5:ii[5]:='City / State :'+#3#3+mln(citystate,30)+#3#1+'     Zip-code:'+#3#3+zipcode;
         6:ii[6]:='Computer type:'+#3#3+mln(computer,30)+#3#1+'     Phone # :'+#3#3+ph;
-        7:ii[7]:='SysOp note   :'+#3#3+mln(note,35)+#3#1+'Last/1st:'+#3#3+laston+' ('+firston+')';
+        {rcg11272000 didn't fit on an 8-char line once the years were 4-digit.}
+        {7:ii[7]:='SysOp note   :'+#3#3+mln(note,35)+#3#1+'Last/1st:'+#3#3+laston+' ('+firston+')';}
+        7:ii[7]:='SysOp note   :'+#3#3+mln(note,35)+#3#1+'Last/1st:'+#3#3+laston+' '+firston;
         8:begin
             ii[8]:='Occupation   :'+#3#3+mln(occupation,35)+#3#1+'Lockfile:';
             if lockedout then ii[8]:=ii[8]+#3#7+lockedfile+'.MSG' else
--- a/t2t.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/t2t.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -3,7 +3,7 @@
 
 uses
   crt,dos,
-  myio;
+  myio, common;
 
 {$I tagr24d.pas}
 {$I rec18a.pas}
@@ -103,6 +103,9 @@
   tch:=i;
 end;
 
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation.}
+{
 function time:astr;
 var reg:registers;
     h,m,s:string[4];
@@ -111,7 +114,20 @@
   str(reg.cx shr 8,h); str(reg.cx mod 256,m); str(reg.dx shr 8,s);
   time:=tch(h)+':'+tch(m)+':'+tch(s);
 end;
+}
 
+function time:string;
+var h,m,s:string[3];
+    hh,mm,ss,ss100:word;
+begin
+  gettime(hh,mm,ss,ss100);
+  str(hh,h); str(mm,m); str(ss,s);
+  time:=tch(h)+':'+tch(m)+':'+tch(s);
+end;
+
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation, Y2K fixes included.}
+{
 function date:astr;
 var reg:registers;
     m,d,y:string[4];
@@ -120,6 +136,26 @@
   str(reg.dx shr 8,m);
   date:=tch(m)+'/'+tch(d)+'/'+tch(y);
 end;
+}
+
+function date:string;
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
+    yy,mm,dd,dow:word;
+
+begin
+  getdate(yy,mm,dd,dow);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
+end;
 
 function leapyear(yr:integer):boolean;
 begin
@@ -150,11 +186,14 @@
   d:=value(copy(dt,4,2));
 
   {rcg11182000 hahahaha...a Y2K bug.  :) }
-  y:=value(copy(dt,7,2))+1900;
+  {rcg11272000 Let's make sure the values coming in here are four }
+  {digits in the first place, which should save us some hacks elsewhere...}
+  {y:=value(copy(dt,7,2))+1900;}
 
-  {rcg11182000 added this conditional. }
-  if (y < 1977) then  { Ugh...this is so bad. }
-    y := y + 100;
+  {rcg11272000 my adds...}
+  if (length(dt) < 10) then rcgpanic('WHOA! TWO DIGIT YEAR IN DATE!');
+  y:=value(copy(dt,7,4));
+  {rcg11272000 end my adds...}
 
   for c:=1985 to y-1 do
     if leapyear(c) then t:=t+366 else t:=t+365;
--- a/ta2z.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/ta2z.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -52,6 +52,9 @@
   tch:=i;
 end;
 
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation, Y2K fixes included.}
+{
 function date:astr;
 var reg:registers;
     m,d,y:string[4];
@@ -60,7 +63,30 @@
   str(reg.dx shr 8,m);
   date:=tch(m)+'/'+tch(d)+'/'+tch(y);
 end;
+}
 
+function date:string;
+var
+    {rcg11272000 unused variable.}
+    {r:registers;}
+
+    {rcg11272000 Y2K-proofing.}
+    {y,m,d:string[3];}
+    m,d:string[3];
+    y:string[5];
+    yy,mm,dd,dow:word;
+
+begin
+  getdate(yy,mm,dd,dow);
+  {rcg11272000 Y2K-proofing.}
+  {str(yy-1900,y); str(mm,m); str(dd,d);}
+  str(yy,y); str(mm,m); str(dd,d);
+  date:=tch(m)+'/'+tch(d)+'/'+y;
+end;
+
+{rcg11272000 dunno if this is even used, but it won't fly under Linux.}
+{ below is a working implementation.}
+{
 function time:astr;
 var reg:registers;
     h,m,s:string[4];
@@ -69,6 +95,16 @@
   str(reg.cx shr 8,h); str(reg.cx mod 256,m); str(reg.dx shr 8,s);
   time:=tch(h)+':'+tch(m)+':'+tch(s);
 end;
+}
+
+function time:string;
+var h,m,s:string[3];
+    hh,mm,ss,ss100:word;
+begin
+  gettime(hh,mm,ss,ss100);
+  str(hh,h); str(mm,m); str(ss,s);
+  time:=tch(h)+':'+tch(m)+':'+tch(s);
+end;
 
 function value(I:astr):integer;
 var n,n1:integer;
--- a/tmpcom.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/tmpcom.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -741,6 +741,29 @@
       end;
     end;
 *)
+
+{
+    primary_sockh = Socket(AF_INET, SOCK_STREAM, PF_INET);
+    if (primary_sockh = -1) then
+    begin
+        writeln;
+        writeln('WHOA!  Socket() returned -1!');
+        writeln(' Aborting...');
+        halt(2);
+    end;
+
+    if (Bind(primary_sockh,
+
+    if (Listen(primary_sockh, 0) = FALSE) then
+    begin
+        writeln;
+        writeln('WHOA!  Socket() returned -1!');
+        writeln(' Aborting...');
+        halt(2);
+    end;
+}
+    
+
 end;
 
 
@@ -781,25 +804,22 @@
     setintvec(intnum,old_vector);
   end;
 *)
+
+    {if (sockh <> -1) then Shutdown(sockh, 2);}
+
 end;
 
   { This procedure is called when the program exits for any reason.  It
     deinstalls the interrupt driver.}
 {$F+} procedure exit_procedure; {$F-}
 begin
-{rcg11172000 not needed under Linux.}
-{
   com_deinstall;
   exitproc:=exit_save;
-}
 end;
 
   { This installs the exit procedure. }
 begin
-{rcg11172000 not needed under Linux.}
-{
   exit_save:=exitproc;
   exitproc:=@exit_procedure;
-}
 end.
 
--- a/wfcmenu.pas	Sat Nov 25 05:35:11 2000 +0000
+++ b/wfcmenu.pas	Fri Mar 02 22:07:42 2001 +0000
@@ -417,6 +417,8 @@
 
           rl1:=timer;
           repeat
+            {rcg12012000 delay added to stop CPU chowing...}
+            delay(10);
             if (recom1(c)) then begin
               if (c in ['0',^M]) then done:=TRUE;
               if (c in [#32..#255]) then wr(2,c);
@@ -427,7 +429,7 @@
           if (try>10) then done:=TRUE;
         until ((done) or (keypressed));
       end;
-      while (keypressed) do begin isc:=readkey; writeln(ord(isc)); end;
+      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);
 
@@ -717,6 +719,11 @@
 
     if ((systat.specialfx) and (not blankmenunow) and
         (sysopon) and (systat.usewfclogo)) then begin
+
+      {rcg11302000 added delay() so the stupid Telegard animation}
+      {doesn't eat all the processor time...}
+      delay(10);
+
       inc(duh);
       if (duh=30) then begin
         duh:=0; inc(txt); if (txt>5) then txt:=0;
@@ -945,7 +952,7 @@
                 cwrite(#3#3+'Log on? ('+#3#11+'Y'+#3#3+'/'+#3#11+'N'+
                        #3#3+'-'+#3#11+'F'+#3#3+'ast) : ');
                 rl2:=timer;
-                while (not keypressed) and (abs(timer-rl2)<30.0) do;
+                while (not keypressed) and (abs(timer-rl2)<30.0) do delay(10);
                 if (keypressed) then c:=readkey else c:='N';
                 c:=upcase(c); writeln(c);
                 case c of