TYPE
  CharBuf = array[0..127] of char;
  TextRec = RECORD
    Handle     : Word;
    Mode       : Word;
    BufSize    : Word;
    Private    : Word;
    BufPos     : Word;
    BufEnd     : Word;
    BufPtr     : ^CharBuf;
    OpenFunc   : pointer;
    InOutFunc  : pointer;
    FlushFunc  : pointer;
    CloseFunc  : pointer;
    UserData   : Array[1..16] of byte;
    Name       : Array[0..79] of char;
    Buffer     : CharBuf;
  END;

{ File mode magic numbers }
CONST
  fmClosed = $D7B0;
  fmInput  = $D7B1;
  fmOutput = $D7B2;
  fmInOut  = $D7B3;

