Category : Pascal Source Code
Archive   : TFDD.ZIP
Filename : TFDD.PAS

 
Output of file : TFDD.PAS contained in archive : TFDD.ZIP

(******************************************************************************

UNIT TFDD


-------------------------------------------------------------------------------
Philippe Ranger (514) 274 4653
First version 26-6-90 Present version
-------------------------------------------------------------------------------
ADT general, empty text file device driver.
SPECIFICATION
TfddC class meant only for inheritance, defines common elements of TFDD's,
as empty, and puts pointer to self at start of UserData.
******************************************************************************)

UNIT tfdd;

INTERFACE

TYPE
tfddC = object
t: text;
constructor init
end;

IMPLEMENTATION

USES dos;

{$F+}

FUNCTION nulFunc (var t: textRec): integer; BEGIN nulFunc := 0 END;


CONSTRUCTOR tfddC.init;
VAR selfp: ^tfddC;
BEGIN with textRec(t) do begin
handle := $FFFF;
mode := fmClosed;
bufSize := sizeof(buffer);
bufPtr := @buffer;
openFunc := @nulFunc;
inoutFunc := @nulFunc;
flushFunc := @nulFunc;
closeFunc := @nulFunc;
selfp := @self;
move (selfp, userData, sizeof(selfp));
name[0] := #0
END end;

END.