sysglobals.h
上传用户:upcnvip
上传日期:2007-01-06
资源大小:474k
文件大小:9k
源码类别:

编译器/解释器

开发平台:

C/C++

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