home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / pascal2c / sysgloba.h < prev    next >
C/C++ Source or Header  |  1992-08-03  |  9KB  |  316 lines

  1. /* Header for module sysglobals, generated by p2c */
  2. #ifndef SYSGLOBALS_H
  3. #define SYSGLOBALS_H
  4.  
  5.  
  6.  
  7. #ifdef SYSGLOBALS_G
  8. # define vextern
  9. #else
  10. # define vextern extern
  11. #endif
  12.  
  13.  
  14.  
  15. typedef Char fsidctype[20];
  16.  
  17.  
  18.  
  19. #define fsidc           "Rev.  3.1  18-Jul-85"
  20.  
  21. /*20 CHARS: VERSION,DATE,TIME OF FILE SYS*/
  22. #define mminint         (-32768L)
  23.  
  24. /*MINIMUM SHORT INTEGER VALUE*/
  25. #define mmaxint         32767
  26.  
  27. /*MAXIMUM SHORT INTEGER VALUE*/
  28. #define maxunit         50
  29.  
  30. /*MAXIMUM PHYSICAL UNIT NUMBER*/
  31. #define passleng        16
  32.  
  33. /*NUMBER OF CHARS IN A PASSWORD*/
  34. #define vidleng         16
  35.  
  36. /*NUMBER OF CHARS IN A VOLUME NAME*/
  37. #define tidleng         16
  38.  
  39. /*NUMBER OF CHARS IN A FILE TITLE*/
  40. #define fidleng         120
  41.  
  42. /*NUMBER OF CHARS IN FILE NAME*/
  43. #define fblksize        512
  44.  
  45. /*STANDARD FILE BUFFER LENGTH*/
  46. #define maxsc           63
  47.  
  48. /*LARGEST SELECT CODE */
  49. #define minlevel        1
  50.  
  51. /*LOWEST INTERRUPT LEVEL*/
  52. #define maxlevel        6
  53. /* p2c: Note: Field width for FKIND assumes enum filekind has 16 elements (from sysglobals.imp, line 81) */
  54.  
  55.  
  56.  
  57. /*LARGEST MASKABLE INTERRUPT LEVEL*/
  58. /*directory entry*/
  59. /*bad blocks*/
  60. /*executable or linkable*/
  61. /*UCSD format text with editor environment*/
  62. /*L.I.F. ASCII format text strings*/
  63. /*file of  <data type, e.g. char, integer,etc.>*/
  64. /*system (BOOT) file*/
  65. /*reserved for future expansion*/
  66. /*FILE INFORMATION*/
  67. /*BUFFER VARIABLE...F^ */
  68. /* LIST OF OPEN FILES */
  69. /*declaration and type information*/
  70. /* SIZE OF ONE LOGICAL RECORD */
  71. /* EXTERNAL FILE TYPE */
  72. /* FILE KIND */
  73. /* FILE IS LINE FORMATTED */
  74. /* HAS 512 BYTE BLOCK BUFFER */
  75. /* FILE HAS NO NAME */
  76. /* WAS CREATED THIS ASSOCIATION */
  77. /* FILE ACCESS RIGHTS */
  78. /*state information*/
  79. /*F^ AND LOOKAHEAD STATES */
  80. /* F^ IS AN END OF LINE */
  81. /* TRIED TO READ PAST END OF FILE */
  82. /* FILE HAS CHANGED SIZE */
  83. /* BUFFER NEEDS TO BE WRITTEN */
  84. /*file size and position*/
  85. /* FILE POINTER, CURRENT FILE POSITION */
  86. /*LOGICAL END OF FILE, CURRENT FILE SIZE */
  87. /*PHYSICAL END OF FILE, MAXIMUM FILE SIZE */
  88. /*buffering and low level formatting information*/
  89. /* FILE POSITION OF BUFFER */
  90. /* SPACE COMPRESSION COUNT */
  91. /*BUFFER METHOD MODULE */
  92. /*file association info*/
  93. /*EXECUTION ADDRESS IN BOOT FILE */
  94. /* VOLUME NAME */
  95. /* FILE PASSWORD */
  96. /* FILE NAME */
  97. /* ADDITIONAL SYSTEM DEPENDENT INFORMATION */
  98. /* TEMP FILE IDENTIFIER */
  99. /* OPTIONAL STRING PARAM */
  100. /*byte block transfer information*/
  101. /* START BYTE OF FILE, OR OTHER IDENTIFICATION */
  102. /* FOR FUTURE EXPANSION */
  103. /*TRUE IF NO SRM TEMP FILE CREATED */
  104. /*TRUE IF SRM SHOULD WAIT FOR LOCK */
  105. /*TRUE IF OLD SRM LINK IS TO BE PURGED */
  106. /*TRUE IF OPENED WITH OVERWRITE */
  107. /*TRUE IF PATHID NOT UNIQUE TO FILEID */
  108. /*TRUE IF FILE OPENED AS LOCKABLE */
  109. /*TRUE IF FILE IS LOCKED */
  110. /*TRUE IF DRIVER IS ACTIVE */
  111. /*PHYSICAL UNIT NUMBER */
  112. /*CALLED WHEN TRANSFER COMPLETES */
  113. /* X POSITION FOR  GOTOXY */
  114. /* Y POSITION FOR  GOTOXY */
  115. /* FILEID FOR OLD SRM FILE ON REWRITE */
  116. /*for future expansion*/
  117. /*large miscellaneous fields sometimes present*/
  118. /*minimal FIB ends here*/
  119. /* FILE NAME, EXCEPT VOLUME AND SIZE */
  120. /*FIB*/
  121. /*unitable entry definition*/
  122. /*directory access method*/
  123. /*byte block transfer method*/
  124. /*select code*/
  125. /*bus address*/
  126. /*disc unit*/
  127. /*disc volume*/
  128. /*physical starting byte of volume*/
  129. /*identifier (Amigo identify sequence)*/
  130. /*volume id*/
  131. /*temp for driver use only; init to 0!*/
  132. /*temp for driver use only; init to 0!*/
  133. /*device specifier letter*/
  134. /*unit absent or down flag*/
  135. /*user can edit input*/
  136. /*medium not changed since last access*/
  137. /*volume name must be uppercased*/
  138. /*fixed/removeable media flag*/
  139. /*driver mode: report/ignore media change*/
  140. /*   (bit not used yet)  */
  141. /*blocked volume flag*/
  142. /*volume size in bytes */
  143. /*unitentry*/
  144. /*0 NOT USED*/
  145. /* *note* the ioresult enumerations have been partitioned into two */
  146. /*               mutually-exclusive groups: those beginning with 'z' are reserved */
  147. /*               for the low-level drivers , and those beginning */
  148. /*               with 'i' are reserved for the higher-level routines.*/
  149. /*end marker*/
  150. /*isr information block*/
  151. /*interrupt register address*/
  152. /*interrupt register mask*/
  153. /*interrupt register target value after masking*/
  154. /*chaining flag*/
  155. /*isr*/
  156. /*pointer to next isrib in linked list*/
  157. /*100 IS TEMP DISK FLAG*/
  158. /*DAY OF MONTH*/
  159. /*0 ==> DATE NOT MEANINGFUL*/
  160.  
  161. typedef enum {
  162.     untypedfile, badfile, codefile, textfile, asciifile, datafile, sysfile,
  163.     fkind7, fkind8, fkind9, fkind10, fkind11, fkind12, fkind13, fkind14,
  164.     lastfkind
  165. } filekind;
  166.  
  167. typedef Char window[];
  168.  
  169. typedef enum {
  170.     readbytes, writebytes, flush, writeeol, readtoeol, clearunit, setcursor,
  171.     getcursor, startread, startwrite, unitstatus, seekeof
  172. } amrequesttype;
  173.  
  174. typedef struct fib {
  175.     Char *fwindow;
  176.     struct fib *flistptr;
  177.     long frecsize;
  178.     short feft;
  179.     unsigned fkind : 4, fistextvar : 1, fbuffered : 1, fanonymous : 1,
  180.          fisnew : 1, freadable : 1, fwriteable : 1, freadmode : 1,
  181.          fbufvalid : 1, feoln : 1, feof_ : 1, fmodified : 1,
  182.          fbufchanged : 1;
  183.     long fpos, fleof, fpeof, flastpos;
  184.     short freptcnt;
  185.     _PROCEDURE am;
  186.     long fstartaddress;
  187.     Char fvid[vidleng + 1];
  188.     Char ffpw[passleng + 1];
  189.     Char ftid[tidleng + 1];
  190.     long pathid;
  191.     short fanonctr;
  192.     Char *foptstring;
  193.     long fileid;
  194.     unsigned fb0 : 1, fb1 : 1, fnosrmtemp : 1, fwaitonlock : 1,
  195.          fpurgeoldlink : 1, foverwritten : 1, fsavepathid : 1,
  196.          flockable : 1, flocked : 1, fbusy : 1, funit : 6;
  197.     _PROCEDURE feot;
  198.     long fxpos, fypos, foldfileid;
  199.     long fextra[3];
  200.     short fextra2;
  201.     union {
  202.     Char ftitle[fidleng + 1];
  203.     Char fbuffer[fblksize];
  204.     } UU;
  205. } fib;
  206.  
  207. typedef enum {
  208.     getvolumename, setvolumename, getvolumedate, setvolumedate, changename,
  209.     purgename, openfile, createfile, overwritefile, closefile, purgefile,
  210.     stretchit, makedirectory, crunch, opendirectory, closedirectory, catalog,
  211.     stripname, setunitprefix, openvolume, duplicatelink, openparentdir,
  212.     catpasswords, setpasswords, lockfile, unlockfile, openunit
  213. } damrequesttype;
  214.  
  215. typedef struct unitentry {
  216.     _PROCEDURE dam;
  217.     _PROCEDURE tm;
  218.     uchar sc, ba, du, dv;
  219.     long byteoffset, devid;
  220.     Char uvid[vidleng + 1];
  221.     long dvrtemp;
  222.     short dvrtemp2;
  223.     Char letter;
  224.     unsigned offline : 1, uisinteractive : 1, umediavalid : 1, uuppercase : 1,
  225.          uisfixed : 1, ureportchange : 1, pad : 1, uisblkd : 1;
  226.     union {
  227.     long umaxbytes;
  228.     } UU;
  229. } unitentry;
  230.  
  231. typedef unitentry unitabletype[maxunit + 1];
  232.  
  233. typedef _PROCEDURE amtabletype[16];
  234.  
  235. typedef Char suftabletype[16][6];
  236.  
  237. typedef short efttabletype[16];
  238.  
  239. typedef enum {
  240.     inoerror, zbadblock, ibadunit, zbadmode, ztimeout, ilostunit, ilostfile,
  241.     ibadtitle, inoroom, inounit, inofile, idupfile, inotclosed, inotopen,
  242.     ibadformat, znosuchblk, znodevice, zinitfail, zprotected, zstrangei,
  243.     zbadhardware, zcatchall, zbaddma, inotvalidsize, inotreadable,
  244.     inotwriteable, inotdirect, idirfull, istrovfl, ibadclose, ieof,
  245.     zuninitialized, znoblock, znotready, znomedium, inodirectory,
  246.     ibadfiletype, ibadvalue, icantstretch, ibadrequest, inotlockable,
  247.     ifilelocked, ifileunlocked, idirnotempty, itoomanyopen, inoaccess,
  248.     ibadpass, ifilenotdir, inotondir, ineedtempdir, isrmcatchall,
  249.     zmediumchanged, endioerrs
  250. } iorsltwd;
  251.  
  252. typedef struct isrib {
  253.     Char *intregaddr;
  254.     uchar intregmask, intregvalue;
  255.     unsigned chainflag : 1;
  256.     _PROCEDURE proc;
  257.     struct isrib *link;
  258. } isrib;
  259.  
  260. typedef isrib *inttabletype[7];
  261.  
  262. typedef struct daterec {
  263.     char year;
  264.     unsigned day : 5, month : 4;
  265. } daterec;
  266.  
  267. typedef struct timerec {
  268.     unsigned hour : 5, minute : 6, centisecond : 13;
  269. } timerec;
  270.  
  271. typedef struct datetimerec {
  272.     daterec date;
  273.     timerec time;
  274. } datetimerec;
  275.  
  276.  
  277.  
  278. vextern short sysescapecode;
  279. vextern Anyptr *openfileptr, *recoverblock, *heapmax, *heapbase;
  280. vextern long sysioresult, hardwarestatus, locklevel;
  281. vextern unitentry *unitable;
  282. vextern inttabletype interrupttable;
  283. vextern long endisrhook, actionspending;
  284. vextern FILE **gfiles[6];
  285. vextern _PROCEDURE *amtable;
  286. vextern Char (*suffixtable)[6];
  287. vextern short *efttable;
  288. vextern long sysunit;
  289. vextern Char syvid[vidleng + 1], dkvid[vidleng + 1];
  290. vextern Char syslibrary[fidleng + 1];
  291. vextern _PROCEDURE debugger;
  292. vextern _PROCEDURE cleariohook;
  293. vextern inttabletype perminttable;
  294. vextern _PROCEDURE deferredaction[10];
  295. vextern _PROCEDURE serialtextamhook;
  296. vextern Char sysname[10];
  297. vextern struct {
  298.     unsigned reserved1 : 1, reserved2 : 1, nointhpib : 1, crtconfigreg : 1,
  299.          nokeyboard : 1, highlightsxorbiggraphics : 1, biggraphics : 1,
  300.          alpha50 : 1;
  301. } sysflag;
  302. vextern struct {
  303.     char pad7to1;
  304.     unsigned prompresent : 1;
  305. } sysflag2;
  306. vextern short endsysvars;
  307.  
  308.  
  309.  
  310. #undef vextern
  311.  
  312. #endif /*SYSGLOBALS_H*/
  313.  
  314. /* End. */
  315.  
  316.