home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc / include / fab.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-19  |  8.5 KB  |  200 lines

  1. /*    FAB - File Access Block Definitions    */
  2.  
  3. #ifndef _FAB_H
  4. #define _FAB_H 1
  5.  
  6. struct    FAB    {
  7.        unsigned char    fab$b_bid;            /* block identification */
  8. #define            FAB$C_BID    3        /* block id constant */
  9.  
  10.        unsigned char    fab$b_bln;            /* block length */
  11. #define            FAB$C_BLN    0x050        /* block length constant (80 bytes) */
  12. #define            FAB$K_BLN    0x050
  13.  
  14.        unsigned short    fab$w_ifi;                /* internal file identifier */
  15. #define            FAB$V_PPF_RAT    6            /* rat value for process-permanent files */
  16. #define            FAB$S_PPF_RAT    8
  17. #define            FAB$M_PPF_RAT    (0x0ff << FAB$V_PPF_RAT)
  18. #define            FAB$V_PPF_IND    14            /* indirect access to process-permanent file */
  19. #define            FAB$M_PPF_IND    (1 << FAB$V_PPF_IND)
  20.  
  21.        unsigned int    fab$l_fop;            /* file options */
  22. #define            FAB$V_MXV    1        /* maximize version number */
  23. #define            FAB$M_MXV    (1 << FAB$V_MXV)
  24. #define            FAB$V_SUP    2        /* supersede existing file */
  25. #define            FAB$M_SUP    (1 << FAB$V_SUP)
  26. #define            FAB$V_TMP    3        /* create temporary file */
  27. #define            FAB$M_TMP    (1 << FAB$V_TMP)
  28. #define            FAB$V_TMD    4        /* temporary file marked for delete */
  29. #define            FAB$M_TMD    (1 << FAB$V_TMD)
  30. #define            FAB$V_DFW    5        /* deferred write (rel and idx) */
  31. #define            FAB$M_DFW    (1 << FAB$V_DFW)
  32. #define            FAB$V_SQO    6        /* sequential access only */
  33. #define            FAB$M_SQO    (1 << FAB$V_SQO)
  34. #define            FAB$V_RWO    7        /* rewind magnetic tape on open */
  35. #define            FAB$M_RWO    (1 << FAB$V_RWO)
  36. #define            FAB$V_POS    8        /* use next magnetic tape position */
  37. #define            FAB$M_POS    (1 << FAB$V_POS)
  38. #define            FAB$V_WCK    9        /* write checking */
  39. #define            FAB$M_WCK    (1 << FAB$V_WCK)
  40. #define            FAB$V_NEF    10        /* not end of file, inihibit eof positioning */
  41. #define            FAB$M_NEF    (1 << FAB$V_NEF)
  42. #define            FAB$V_RWC    11        /* rewind magnetic tape on close */
  43. #define            FAB$M_RWC    (1 << FAB$V_RWC)
  44. #define            FAB$V_DMO    12        /* dismount mt on close (not implemented) */
  45. #define            FAB$M_DMO    (1 << FAB$V_DMO)
  46. #define            FAB$V_SPL    13        /* spool file on close */
  47. #define            FAB$M_SPL    (1 << FAB$V_SPL)
  48. #define            FAB$V_SCF    14        /* submit command file on close */
  49. #define            FAB$M_SCF    (1 << FAB$V_SCF)
  50. #define            FAB$V_DLT    15        /* delete file */
  51. #define            FAB$M_DLT    (1 << FAB$V_DLT)
  52. #define            FAB$V_NFS    16        /* non-file-structured operation */
  53. #define            FAB$M_NFS    (1 << FAB$V_NFS)
  54. #define            FAB$V_UFO    17        /* user file open - no rms operation */
  55. #define            FAB$M_UFO    (1 << FAB$V_UFO)
  56. #define            FAB$V_PPF    18        /* process permanent file (pio segment) */
  57. #define            FAB$M_PPF    (1 << FAB$V_PPF)
  58. #define            FAB$V_INP    19        /* process permanent file is 'input' */
  59. #define            FAB$M_INP    (1 << FAB$V_INP)
  60. #define            FAB$V_CTG    20        /* contiguous extension */
  61. #define            FAB$M_CTG    (1 << FAB$V_CTG)
  62. #define            FAB$V_CBT    21        /* contiguous best try */
  63. #define            FAB$M_CBT    (1 << FAB$V_CBT)
  64. #define            FAB$V_JNL    22        /* explicit logging (not implemented) */
  65. #define            FAB$M_JNL    (1 << FAB$V_JNL)
  66. #define            FAB$V_RCK    23        /* read checking */
  67. #define            FAB$M_RCK    (1 << FAB$V_RCK)
  68. #define            FAB$V_NAM    24        /* use NAM block device, file and/or directory id */
  69. #define            FAB$M_NAM    (1 << FAB$V_NAM)
  70. #define            FAB$V_CIF    25        /* create if non-existent */
  71. #define            FAB$M_CIF    (1 << FAB$V_CIF)
  72. #define            FAB$V_UFM    26        /* user file open mode (user if 1, super if 0)
  73.                                enable only if esc and (ufo or nfs) are also on */
  74. #define            FAB$M_UFM    (1 << FAB$V_UFM)
  75. #define            FAB$V_ESC    27        /* 'escape' to non-standard functions ($modify) */
  76. #define            FAB$M_ESC    (1 << FAB$V_ESC)
  77. #define            FAB$V_TEF    28        /* truncate at end-of-file on close (write-accessed seq.
  78.                                disk file only) */
  79. #define            FAB$M_TEF    (1 << FAB$V_TEF)
  80. #define            FAB$V_OFP    29        /* output file parse (only name type sticky) */
  81. #define            FAB$M_OFP    (1 << FAB$V_OFP)
  82. #define            FAB$V_KFO    30        /* known file open (image activator only release 1) */
  83. #define            FAB$M_KFO    (1 << FAB$V_KFO)
  84.  
  85.        unsigned int    fab$l_sts;            /* status */
  86.        unsigned int    fab$l_stv;            /* status value */
  87.        unsigned int    fab$l_alq;            /* allocation quantity */
  88.        unsigned short    fab$w_deq;            /* default allocation quantity */
  89.  
  90.        unsigned char    fab$b_fac;            /* file access */
  91. #define            FAB$V_PUT    0        /* put access */
  92. #define            FAB$M_PUT    (1 << FAB$V_PUT)
  93. #define            FAB$V_GET    1        /* get access */
  94. #define            FAB$M_GET    (1 << FAB$V_GET)
  95. #define            FAB$V_DEL    2        /* delete access */
  96. #define            FAB$M_DEL    (1 << FAB$V_DEL)
  97. #define            FAB$V_UPD    3        /* update access */
  98. #define            FAB$M_UPD    (1 << FAB$V_UPD)
  99. #define            FAB$V_TRN    4        /* truncate access */
  100. #define            FAB$M_TRN    (1 << FAB$V_TRN)
  101. #define            FAB$V_BIO    5        /* block i/o access */
  102. #define            FAB$M_BIO    (1 << FAB$V_BIO)
  103. #define            FAB$V_BRO    6        /* block and record i/o access */
  104. #define            FAB$M_BRO    (1 << FAB$V_BRO)
  105. #define            FAB$V_EXE    7        /* execute access (caller must be exec or kernel mode,
  106.                                ufo must also be set) */
  107. #define            FAB$M_EXE    (1 << FAB$V_EXE)
  108.  
  109.        unsigned char    fab$b_shr;                /* file sharing */
  110. #define            FAB$V_SHRPUT    0            /* put access */
  111. #define            FAB$M_SHRPUT    (1 << FAB$V_SHRPUT)
  112. #define            FAB$V_SHRGET    1            /* get access */
  113. #define            FAB$M_SHRGET    (1 << FAB$V_SHRGET)
  114. #define            FAB$V_SHRDEL    2            /* delete access */
  115. #define            FAB$M_SHRDEL    (1 << FAB$V_SHRDEL)
  116. #define            FAB$V_SHRUPD    3            /* update access */
  117. #define            FAB$M_SHRUPD    (1 << FAB$V_SHRUPD)
  118. #define            FAB$V_MSE    4            /* multi-stream connects enabled */
  119. #define            FAB$M_MSE    (1 << FAB$V_MSE)
  120. #define            FAB$V_NIL    5            /* no sharing */
  121. #define            FAB$M_NIL    (1 << FAB$V_NIL)
  122. #define            FAB$V_UPI    6            /* user provided interlocking (allows multiple */
  123.                                 /* writers to seq. files) */
  124. #define            FAB$M_UPI    (1 << FAB$V_UPI)
  125.  
  126.        unsigned int    fab$l_ctx;            /* user context */
  127.         char    fab$b_rtv;            /* retrieval window size */
  128.  
  129.        unsigned char    fab$b_org;                /* file organization */
  130. #define            FAB$V_ORG    4            /* file organization */
  131. #define            FAB$S_ORG    4
  132. #define            FAB$C_SEQ    0            /* sequential */
  133. #define            FAB$C_REL    (1 << FAB$V_ORG)    /* relative */
  134. #define            FAB$C_IDX    (2 << FAB$V_ORG)    /* indexed */
  135. #define            FAB$C_HSH    (3 << FAB$V_ORG)    /* hashed */
  136.  
  137.        unsigned char    fab$b_rat;            /* record attributes */
  138. #define            FAB$V_FTN    0        /* FORTRAN carriage control character */
  139. #define            FAB$M_FTN    (1 << FAB$V_FTN)
  140. #define            FAB$V_CR    1        /* line feed - record -carriage return */
  141. #define            FAB$M_CR    (1 << FAB$V_CR)
  142. #define            FAB$V_PRN    2        /* print-file carriage control */
  143. #define            FAB$M_PRN    (1 << FAB$V_PRN)
  144. #define            FAB$V_BLK    3        /* records don't cross block boundaries */
  145. #define            FAB$M_BLK    (1 << FAB$V_BLK)
  146.  
  147.        unsigned char    fab$b_rfm;            /* record format */
  148. #define            FAB$C_RFM_DFLT    2        /* variable length is default */
  149. #define            FAB$C_UDF    0        /* undefined */
  150. #define            FAB$C_FIX    1        /* fixed-length record */
  151. #define            FAB$C_VAR    2        /* variable-length record */
  152. #define            FAB$C_VFC    3        /* variable-length with fixed-length control record */
  153. #define            FAB$C_STM    4        /* RMS-11 stream record (valid only for sequential org) */
  154. #define            FAB$C_STMLF    5        /* stream record delimited by LF (sequential org only) */
  155. #define            FAB$C_STMCR    6        /* stream record delimited by CR (sequential org only) */
  156. #define            FAB$C_MAXRFM    6        /* maximum rfm supported */
  157. #define            FAB$M_RU    1
  158. #define            FAB$M_AI    2
  159. #define            FAB$M_BI    4
  160.  
  161.        unsigned int    fab$l_jnl;            /* lcb address */
  162.         char    *fab$l_xab;            /* XAB address */
  163.     struct    NAM    *fab$l_nam;            /* NAM block address */
  164.         char    *fab$l_fna;            /* file name string address */
  165.         char    *fab$l_dna;            /* default name string address */
  166.        unsigned char    fab$b_fns;            /* file name string size */
  167.        unsigned char    fab$b_dns;            /* default name string size */
  168.        unsigned short    fab$w_mrs;            /* maximum record size */
  169.        unsigned int    fab$l_mrn;            /* maximum record number */
  170.        unsigned short    fab$w_bls;            /* block size for tape */
  171.        unsigned char    fab$b_bks;            /* bucket size */
  172.        unsigned char    fab$b_fsz;            /* fixed header size */
  173.        unsigned int    fab$l_dev;            /* device characteristics */
  174.        unsigned int    fab$l_sdc;            /* spooling device characteristics */
  175.        unsigned short    fab$w_gbc;            /* global buffer count */
  176.  
  177.        unsigned char    fab$b_acmodes;            /* agent access modes */
  178. #define            fab$b_dsbmsk    fab$b_acmodes    /* saved for backwards compatibility */
  179. #define            FAB$S_LNM_MODE    2        /* logical names */
  180. #define            FAB$V_LNM_MODE    0
  181. #define            FAB$S_CHAN_MODE 2        /* channel */
  182. #define            FAB$V_CHAN_MODE 2
  183. #define            FAB$S_FILE_MODE 2        /* files accessability */
  184. #define            FAB$V_FILE_MODE 4
  185.  
  186.        unsigned char    fab$b_rcf;            /* recovery control flags */
  187. # define        FAB$V_RU    0        /* recovery unit recovery */
  188. # define        FAB$V_AI    1        /* after image recovery */
  189. # define        FAB$V_BI    2        /* before image recovery */
  190.  
  191.         unsigned : 32;                /* spare */
  192.         };
  193.  
  194. extern int cc$rms_fab();
  195. #define cc$rms_fab (*(struct FAB *) cc$rms_fab)
  196. /* globalref struct FAB cc$rms_fab;       /* Declare initialized prototype data structure */
  197.  
  198.  
  199. #endif
  200.