COREFILE.DEF 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. (* Release 3.10 *)
  2. (*-------------------------------------------------------------------------*
  3. * *
  4. * COREFILE.DEF - Modula-2 core file definitions *
  5. * *
  6. * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
  7. * All Rights Reserved *
  8. * *
  9. *--------------------------------------------------------------------------*)
  10. (*# call(o_a_size => off,o_a_copy=>off,c_conv=>on,result_optional=>on) *)
  11. (*# module(implementation=>off, init_code => off) *)
  12. (*# name(prefix => c) *)
  13. DEFINITION MODULE CoreFile;
  14. TYPE
  15. File = CARDINAL;
  16. StreamPtr = POINTER TO CHAR;
  17. CStream = RECORD
  18. Ptr : StreamPtr; (* current char pointer *)
  19. Cnt : INTEGER; (* buffer free space *)
  20. Size : INTEGER; (* buffer size *)
  21. Base : StreamPtr; (* buffer address *)
  22. Flag : BITSET; (* file attrib flag *)
  23. Handle : INTEGER; (* file handle *)
  24. Pback : INTEGER; (* ungot char if no buf *)
  25. Sem : LONGCARD;
  26. Ctrl : SHORTCARD;
  27. SCnt : SHORTCARD;
  28. END; (*CStream*)
  29. FileInf = POINTER TO CStream;
  30. CONST
  31. MaxHandles = 20; (* must change if you alter CoreFile.a *)
  32. VAR
  33. _openfd : ARRAY [0..MaxHandles-1] OF BITSET;
  34. _iob : ARRAY [0..MaxHandles-1] OF CStream;
  35. _open_max : CARDINAL;
  36. BufInf : ARRAY [0..MaxHandles-1] OF FileInf;
  37. _tmpfiles : ARRAY [0..MaxHandles-1] OF ADDRESS;
  38. _tmpfptrs : ARRAY [0..MaxHandles-1] OF FileInf;
  39. END CoreFile.