| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- (* Release 3.10 *)
- (*-------------------------------------------------------------------------*
- * *
- * FILESYST.DEF *
- * *
- * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
- * All Rights Reserved *
- * *
- *--------------------------------------------------------------------------*)
- (*# call(o_a_copy => off,
- o_a_size => on) *)
- (*# module(init_code => on) *)
- (*%F _fdata *)
- (*# call(seg_name => null) *)
- (*%E *)
- (*# data(seg_name => null) *)
- DEFINITION MODULE FileSystem;
- IMPORT FIO;
- CONST
- BufferSize = 512;
- EOL = CHAR(0AH);
- TYPE
- FileNameType = ARRAY [0..80] OF CHAR;
- BufferPtr = POINTER TO ARRAY [0..BufferSize-1] OF BYTE;
- TYPE
- Response = (done, notdone, notsupported, callerror, unknownmedium,
- unknownfile, paramerror, toomanyfiles, eom, deviceoff,
- softparityerror, softprotected, softerror, hardparityerror,
- hardprotected, timeout, harderror, unknownpath);
- Command = (create, open, close, lookup, rename, setread, setwrite,
- setmodify, setopen, doio, setpos, getpos, length, reset, again,
- readword, writeword, readchar, writechar);
- Flag = (ag, rd, wr, mo, tf, er, pi);
- FlagSet = SET OF Flag;
- File = RECORD
- res: Response;
- flags: FlagSet;
- eof: BOOLEAN;
- fileno: FIO.File;
- again: WORD;
- name: FileNameType;
- buffer: BufferPtr;
- END;
- PROCEDURE Create(VAR f: File; Device: ARRAY OF CHAR);
- PROCEDURE Close(VAR f: File);
- PROCEDURE Lookup(VAR f: File; Filename: ARRAY OF CHAR; New: BOOLEAN);
- PROCEDURE Rename(VAR f: File; Filename: ARRAY OF CHAR);
- PROCEDURE SetRead(VAR f: File);
- PROCEDURE SetWrite(VAR f: File);
- PROCEDURE SetModify(VAR f: File);
- PROCEDURE SetOpen(VAR f: File);
- PROCEDURE Doio(VAR f: File);
- PROCEDURE SetPos(VAR f: File; HighPos, LowPos: CARDINAL);
- PROCEDURE GetPos(VAR f: File; VAR HighPos, LowPos: CARDINAL);
- PROCEDURE Length(VAR f: File; VAR HighPos, LowPos: CARDINAL);
- PROCEDURE Reset(VAR f: File);
- PROCEDURE Again(VAR f: File);
- PROCEDURE ReadWord(VAR f: File; VAR w: WORD);
- PROCEDURE WriteWord(VAR f: File; w: WORD);
- PROCEDURE ReadChar(VAR f: File; VAR ch: CHAR);
- PROCEDURE WriteChar(VAR f: File; ch: CHAR);
- END FileSystem.
|