| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- (* Release 3.10 *)
- (*-------------------------------------------------------------------------*
- * *
- * COREFILE.DEF - Modula-2 core file definitions *
- * *
- * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
- * All Rights Reserved *
- * *
- *--------------------------------------------------------------------------*)
- (*# call(o_a_size => off,o_a_copy=>off,c_conv=>on,result_optional=>on) *)
- (*# module(implementation=>off, init_code => off) *)
- (*# name(prefix => c) *)
- DEFINITION MODULE CoreFile;
- TYPE
- File = CARDINAL;
- StreamPtr = POINTER TO CHAR;
- CStream = RECORD
- Ptr : StreamPtr; (* current char pointer *)
- Cnt : INTEGER; (* buffer free space *)
- Size : INTEGER; (* buffer size *)
- Base : StreamPtr; (* buffer address *)
- Flag : BITSET; (* file attrib flag *)
- Handle : INTEGER; (* file handle *)
- Pback : INTEGER; (* ungot char if no buf *)
- Sem : LONGCARD;
- Ctrl : SHORTCARD;
- SCnt : SHORTCARD;
- END; (*CStream*)
- FileInf = POINTER TO CStream;
- CONST
- MaxHandles = 20; (* must change if you alter CoreFile.a *)
- VAR
- _openfd : ARRAY [0..MaxHandles-1] OF BITSET;
- _iob : ARRAY [0..MaxHandles-1] OF CStream;
- _open_max : CARDINAL;
- BufInf : ARRAY [0..MaxHandles-1] OF FileInf;
- _tmpfiles : ARRAY [0..MaxHandles-1] OF ADDRESS;
- _tmpfptrs : ARRAY [0..MaxHandles-1] OF FileInf;
- END CoreFile.
|