home *** CD-ROM | disk | FTP | other *** search
- {╔═════════════════════════════════════════════════════════════════════════╗
- ║ ║
- ║ (c) CopyRight LiveSystems 1990, 1994 ║
- ║ ║
- ║ Author : Gerhard Hoogterp ║
- ║ FidoNet : 2:282/100.5 2:283/7.33 ║
- ║ BitNet : GERHARD@LOIPON.WLINK.NL ║
- ║ ║
- ║ SnailMail : Kremersmaten 108 ║
- ║ 7511 LC Enschede ║
- ║ The Netherlands ║
- ║ ║
- ║ This module is part of the RADoor BBS doorwriters toolbox. ║
- ║ ║
- ╚═════════════════════════════════════════════════════════════════════════╝}
-
- Program DriverDemo; { A ANSI/AVATAR and FileObject demo program }
- Uses CRT,
- FileObj,
- Driver;
-
- Const MaxBuf = 1024;
-
- Var Inp : FileObject; { An untyped input fileobject }
- Buf : Array[1..MaxBuf] Of Char; { a buffer to speed things up }
- Max : Word; { The maximal buffer size }
- Count : Word; { A general counter }
-
-
- Begin
- WriteLn('DriverDemo (c) LiveSystems 1990,1991 ALL RIGHTS RESERVED, NO GUARANTEES');
- WriteLn('Written by G.Hoogterp. E-mail address 2:286/201.6 Last Revision 3 Aug 91');
- WriteLn;
- ClrScr;
- If ParamCount=0
- Then Begin
- WriteLn('Usage : DRVDEMO <Filename>');
- WriteLn;
- WriteLn(' Where Filename is an ANS/AVT file or has mixed');
- WriteLn(' contents.');
- Halt;
- End;
-
- Max:=MaxBuf; { Set max to the maximal BufferSize }
-
- Inp.Open(ParamStr(1),1,ReadOnly+ShareDenyNone);
- If Inp.Error<>0
- Then Begin
- WriteLn('Error opening file '+ParamStr(1));
- Halt;
- End;
-
- While not Inp.Eof Do { While the end of file isn't there, }
- Begin
- Inp.ReadBuffer(Buf,Max); { Fill the buffer with input. Max returnes the }
- For Count:=1 To Max Do { number of bytes read. }
- ScreenDriver(Buf[Count]);
- End;
- Inp.Close; { Close the fileobject }
- End.
-
-