home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc / include / xab.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-26  |  13.9 KB  |  411 lines

  1. /*    XABALL -- Allocation Controll Extended Attribute block Definitions    */
  2.  
  3. #ifndef _XABALL_H
  4. #define _XABALL_H
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. struct    XABALL    {
  11.        unsigned char    xab$b_cod;
  12. #define            XAB$C_ALL    20        /* XABALL type code */
  13.  
  14.        unsigned char    xab$b_bln;
  15. #define            XAB$C_ALLLEN    0x20        /* XABALL block length (32 bytes) */
  16. #define            XAB$K_ALLLEN    0x20
  17.  
  18.         unsigned    : 16;            /* spare */
  19.  
  20.         char    *xab$l_nxt;            /* Next XAB in chain */
  21.  
  22.        unsigned char    xab$b_aop;            /* allocation options */
  23. #define            XAB$V_HRD    0        /* fail if requestd alignmt cannot be performed */
  24. #define            XAB$M_HRD    (1 << XAB$V_HRD)
  25. #define            XAB$V_ONC    1        /* locate space on cylinder boundary */
  26. #define            XAB$M_ONC    (1 << XAB$V_ONC)
  27. #define            XAB$V_CBT    5        /* contiguous allocation, best try */
  28. #define            XAB$M_CBT    (1 << XAB$V_CBT)
  29. #define            XAB$V_CTG    7        /* contiguous allocation */
  30. #define            XAB$M_CTG    (1 << XAB$V_CTG)
  31.  
  32.        unsigned char    xab$b_aln;            /* alignment boundary type */
  33. #define            XAB$C_ANY    0        /* any type of allocation */
  34. #define            XAB$C_CYL    1        /* alignment starts at cylinder boundary */
  35. #define            XAB$C_LBN    2        /* allocate at specified logical block number */
  36. #define            XAB$C_VBN    3        /* allocate near specified virtual block number */
  37. #define            XAB$C_RFI    4        /* allocate near related file */
  38.  
  39.        unsigned short    xab$w_vol;            /* relative volume number */
  40.        unsigned long    xab$l_loc;            /* allocation location */
  41.        unsigned long    xab$l_alq;            /* allocation quantity */
  42.        unsigned short    xab$w_deq;            /* default extension quantity */
  43.        unsigned char    xab$b_bkz;            /* bucket size used with the relative and indexed files */
  44.        unsigned char    xab$b_aid;            /* area identification number */
  45.  
  46.                             /* related file identification */
  47.        unsigned short    xab$w_rfi0;            /* file number */
  48. #define            xab$w_rfi    xab$w_rfi0
  49.  
  50.        unsigned short    xab$w_rfi2;            /* seq number */
  51.        unsigned short    xab$w_rfi4;            /* rev number */
  52.  
  53.         unsigned    : 16;            /* spare */
  54.         };
  55.  
  56.  
  57. extern int cc$rms_xaball();
  58. #define cc$rms_xaball (*(struct XABALL *) cc$rms_xaball)
  59. /* globalref struct XABALL cc$rms_xaball;  /* Declare initialized prototype data structures */
  60.  
  61.  
  62. /*  struct representing a 64-bit binary value expressing the date and time */
  63.  
  64. #define XAB_DATE_TIME    { unsigned    : 32; unsigned    : 32; }
  65.  
  66.  
  67. /*    XABDAT -- Date and Time Extended Attribute Block Definitions    */
  68.  
  69. struct    XABDAT    {
  70.        unsigned char    xab$b_cod;
  71. #define            XAB$C_DAT    18    /* XABDAT type code */
  72.  
  73.        unsigned char    xab$b_bln;
  74. #define            XAB$C_DATLEN    0x2C    /* XABDAT block length constant - V3 (44 bytes) */
  75. #define            XAB$K_DATLEN    0x2C
  76. #define            XAB$C_DATLEN_V2 0x24    /* XABDAT block length constant - V2 */
  77. #define            XAB$K_DATLEN_V2 0x24
  78.  
  79.         unsigned    : 16;        /* spare */
  80.  
  81.         char    *xab$l_nxt;        /* Next XAB in chain */
  82.        unsigned short    xab$w_rvn;        /* revision number */
  83.  
  84.         unsigned    : 16;        /* spare */
  85.  
  86.    struct XAB_DATE_TIME xab$q_rdt;        /* revision date and time */
  87.    struct XAB_DATE_TIME xab$q_cdt;        /* creation date and time */
  88.    struct XAB_DATE_TIME xab$q_edt;        /* expiration date and time */
  89.    struct XAB_DATE_TIME xab$q_bdt;        /* backup date and time */
  90.         };
  91.  
  92.  
  93. extern int cc$rms_xabdat();
  94. #define cc$rms_xabdat (* (struct XABDAT *) cc$rms_xabdat)
  95. /* globalref struct XABDAT cc$rms_xabdat;  /* Declare initialized prototype data structures */
  96.  
  97.  
  98. /*    XABFHC -- File Header Characteristics Extended Attribute Block Definitions    */
  99.  
  100. struct    XABFHC    {
  101.        unsigned char    xab$b_cod;
  102. #define            XAB$C_FHC    29    /* XABFHC type code */
  103.  
  104.        unsigned char    xab$b_bln;
  105. #define            XAB$C_FHCLEN    0x2C    /* XABFHC block length (44 bytes) */
  106. #define            XAB$K_FHCLEN    0x2C
  107.  
  108.         unsigned    : 16;        /* spare */
  109.  
  110.         char    *xab$l_nxt;        /* Next XAB in chain */
  111.        unsigned char    xab$b_rfo;        /* record format and file organization */
  112.        unsigned char    xab$b_atr;        /* record attributes */
  113.        unsigned short    xab$w_lrl;        /* longest record's length */
  114.        unsigned long    xab$l_hbk;        /* high virtual block in the file */
  115.        unsigned long    xab$l_ebk;        /* end-of-file block */
  116.        unsigned short    xab$w_ffb;        /* first free byte in end-of-file block */
  117.        unsigned char    xab$b_bkz;        /* bucket size */
  118.        unsigned char    xab$b_hsz;        /* fixed length control header size */
  119.        unsigned short    xab$w_mrz;        /* maximun record size */
  120.        unsigned short    xab$w_dxq;        /* default file extension quantity */
  121.        unsigned short    xab$w_gbc;        /* default global buffer count */
  122.  
  123.         unsigned    : 32;        /* spare */
  124.         unsigned    : 32;        /* spare */
  125.  
  126.        unsigned short    xab$w_verlimit;        /* version limit for the file */
  127.        unsigned long    xab$l_sbn;        /* starting logical block number if contiguous */
  128.         };
  129.  
  130.  
  131. extern int cc$rms_xabfhc();
  132. #define cc$rms_xabfhc (* (struct XABFHC *) cc$rms_xabfhc)
  133. /* globalref struct XABFHC cc$rms_xabfhc;  /* Declare initialized prototype data structures */
  134.  
  135.  
  136. /*    XABKEY -- Key Definition Extended Attribute Block Definitions    */
  137.  
  138. struct    XABKEY    {
  139.        unsigned char    xab$b_cod;
  140. #define            XAB$C_KEY    21        /* XABKEY type code */
  141.  
  142.        unsigned char    xab$b_bln;
  143. #define            XAB$C_KEYLEN    0x64        /* XABKEY block length (100 bytes) */
  144. #define            XAB$K_KEYLEN    0x64
  145. #define            XAB$C_KEYLEN_V3    0x4C        /* XABKEY block length (76 bytes) */
  146. #define            XAB$K_KEYLEN_V3    0x4C
  147. #define            XAB$C_KEYLEN_V2 0x40
  148. #define            XAB$K_KEYLEN_V2 0x40
  149.  
  150.         unsigned    : 16;            /* spare */
  151.  
  152.         char    *xab$l_nxt;            /* Next XAB address in chain */
  153.        unsigned char    xab$b_ian;            /* index level area number */
  154.        unsigned char    xab$b_lan;            /* lowest level of index area number */
  155.        unsigned char    xab$b_dan;            /* data bucket area number */
  156.        unsigned char    xab$b_lvl;            /* level of root bucket */
  157.        unsigned char    xab$b_ibs;            /* index bucket size in virtual blocks */
  158.        unsigned char    xab$b_dbs;            /* data bucket size in virtual blocks */
  159.        unsigned long    xab$l_rvb;            /* root bucket start virtual block number */
  160.  
  161.       unsigned char xab$b_flg;                /* key option flag byte */
  162. #define            XAB$V_DUP    0            /* duplicate key value allowed */
  163. #define            XAB$M_DUP    (1 << XAB$V_DUP)
  164. #define            XAB$V_CHG    1            /* may change on update (alternate keys only) */
  165. #define            XAB$M_CHG    (1 << XAB$V_CHG)
  166. #define            XAB$V_NUL    2            /* null key value enable (alternate keys only) */
  167. #define            XAB$M_NUL    (1 << XAB$V_NUL)
  168. #define            XAB$V_IDX_NCMPR 3            /* indicates index records are not compressed */
  169. #define            XAB$M_IDX_NCMPR (1 << XAB$V_IDX_NCMPR)
  170. #define            XAB$V_KEY_NCMPR 6            /* indicates primary key is not compressed */
  171. #define            XAB$M_KEY_NCMPR (1 << XAB$V_KEY_NCMPR)
  172. #define            XAB$V_DAT_NCMPR 7            /* indicated data record is not compressed */
  173. #define            XAB$M_DAT_NCMPR (1 << XAB$V_DAT_NCMPR)
  174.  
  175.        unsigned char    xab$b_dtp;            /* key field data type */
  176. #define            XAB$C_STG    0        /* left-justified string of unsigned bytes */
  177. #define            XAB$C_IN2    1        /* signed 15 bit integer (2 bytes) */
  178. #define            XAB$C_BN2    2        /* unsigned 2-byte binary */
  179. #define            XAB$C_IN4    3        /* signed 31 bit integer (4 bytes) */
  180. #define            XAB$C_BN4    4        /* unsigned 4-byte binary */
  181. #define            XAB$C_PAC    5        /* packed decimal string (1-16 bytes) */
  182. #define            XAB$C_IN8    6        /* signed 63 bit integer */
  183. #define            XAB$C_BN8    7        /* 8 byte binary */
  184. #define            XAB$C_MAXDTP    7        /* maximun legal data type */
  185.  
  186.        unsigned char    xab$b_nsg;            /* number of key segments */
  187.        unsigned char    xab$b_nul;            /* null key character value */
  188.        unsigned char    xab$b_tks;            /* total key field size (bytes) */
  189.        unsigned char    xab$b_ref;            /* key of reference (0=primary key, 1-254=alternate keys) */
  190.        unsigned short    xab$w_mrl;            /* minimun record length */
  191.        unsigned short    xab$w_ifl;            /* index bucket fill size (bytes) */
  192.        unsigned short    xab$w_dfl;            /* data bucket fill size (bytes) */
  193.  
  194.        unsigned short    xab$w_pos0;            /* key field record offset positions */
  195. #define            xab$w_pos    xab$w_pos0
  196.  
  197.        unsigned short    xab$w_pos1;
  198.        unsigned short    xab$w_pos2;
  199.        unsigned short    xab$w_pos3;
  200.        unsigned short    xab$w_pos4;
  201.        unsigned short    xab$w_pos5;
  202.        unsigned short    xab$w_pos6;
  203.        unsigned short    xab$w_pos7;
  204.  
  205.        unsigned char    xab$b_siz0;            /* key field segment sizes (bytes) */
  206. #define            xab$b_siz    xab$b_siz0
  207.  
  208.        unsigned char    xab$b_siz1;
  209.        unsigned char    xab$b_siz2;
  210.        unsigned char    xab$b_siz3;
  211.        unsigned char    xab$b_siz4;
  212.        unsigned char    xab$b_siz5;
  213.        unsigned char    xab$b_siz6;
  214.        unsigned char    xab$b_siz7;
  215.  
  216.         unsigned    : 16;            /* spare */
  217.  
  218.         char    *xab$l_knm;            /* key name buffer address */
  219.        unsigned long    xab$l_dvb;            /* first data bucket virtual block number */
  220.  
  221.        unsigned char    xab$b_typ0;            /* key field segment types */
  222. #define            xab$b_typ    xab$b_typ0
  223.  
  224.        unsigned char    xab$b_typ1;
  225.        unsigned char    xab$b_typ2;
  226.        unsigned char    xab$b_typ3;
  227.        unsigned char    xab$b_typ4;
  228.        unsigned char    xab$b_typ5;
  229.        unsigned char    xab$b_typ6;
  230.        unsigned char    xab$b_typ7;
  231.  
  232.        unsigned char    xab$b_prolog;            /* prologue level */
  233. #define            XAB$C_PRG1    1        /* prologue 1 */
  234. #define            XAB$C_PRG2    2        /* prologue 2 */
  235. #define            XAB$C_PRG3    3        /* prologue 3 */
  236.  
  237.         unsigned    : 24;            /* spare */
  238. /* the remaining fields were added at some point before VMS 5.3 */
  239.     unsigned int  XAB$L_COLTBL;        /*  address of collate table*/
  240.     unsigned int  XAB$L_COLSIZ;        /*  size of collate table */
  241.     unsigned int  XAB$L_COLNAM;        /*  name of collate table */
  242.     unsigned :32;
  243.     unsigned :32;
  244.     unsigned :32;
  245.         };
  246.  
  247.  
  248. extern int cc$rms_xabkey();
  249. #define cc$rms_xabkey (* (struct XABKEY *) cc$rms_xabkey)
  250. /* globalref struct XABKEY cc$rms_xabkey;  /* Declare initialized prototype data structures */
  251.  
  252. #define        XAB_PROT_FIELDS        { unsigned : 32; unsigned : 32; }
  253.  
  254. /*    XABPRO -- File Protection Extended Attribute Block Definitions    */
  255.  
  256. struct    XABPRO    {
  257.        unsigned char    xab$b_cod;
  258. #define            XAB$C_PRO    19    /* XABPRO type code */
  259.  
  260.        unsigned char    xab$b_bln;
  261. #define            XAB$C_PROLEN_V3 0x10    /* XABPRO block length (16 bytes) version 3.0 VMS */
  262. #define            XAB$K_PROLEN_V3 0x10
  263. #define            XAB$C_PROLEN    0x58    /* XABPRO block length (88 bytes) */
  264. #define            XAB$K_PROLEN    0x58
  265.  
  266.         unsigned    : 16;        /* spare */
  267.  
  268.         char    *xab$l_nxt;        /* Next XAB in chain */
  269.  
  270.      unsigned short xab$w_pro;                /* protection mask */
  271. #define            XAB$V_SYS    0            /* system */
  272. #define            XAB$S_SYS    4
  273. #define            XAB$V_OWN    4            /* owner */
  274. #define            XAB$S_OWN    4
  275. #define            XAB$V_GRP    8            /* group */
  276. #define            XAB$S_GRP    4
  277. #define            XAB$V_WLD    12            /* world */
  278. #define            XAB$S_WLD    4
  279. #define            XAB$V_NOREAD    0            /* deny read access */
  280. #define            XAB$M_NOREAD    (1 << XAB$V_NOREAD)
  281. #define            XAB$V_NOWRITE    1            /* deny write access */
  282. #define            XAB$M_NOWRITE    (1 << XAB$V_NOWRITE)
  283. #define            XAB$V_NOEXE    2            /* deny execution access */
  284. #define            XAB$M_NOEXE    (1 << XAB$V_NOEXE)
  285. #define            XAB$V_NODEL    3            /* deny delete access */
  286. #define            XAB$M_NODEL    (1 << XAB$V_NODEL)
  287.  
  288.        unsigned char    xab$b_mtacc;        /* magnetic tape accessibility */
  289.  
  290.        unsigned char    xab$b_prot_opt;        /* XABPRO options field */
  291. #define            XAB$V_PROPOGATE 0    /* propogate security attributes on $ENTER and $RENAME */
  292. #define            XAB$M_PROPOGATE (1 << XAB$V_PROPOGATE)
  293.  
  294.     unsigned long    xab$l_uic;        /* uic code */
  295.  
  296.  struct XAB_PROT_FIELDS xab$q_prot_mode;    /* RWED/mode protection for file */
  297.  
  298.         char    *xab$l_aclbuf;        /* address of users ACL buffer */
  299.        unsigned short    xab$w_aclsiz;        /* size of user's ACL buffer */
  300.        unsigned short    xab$w_acllen;        /* return lecngth of entire ACL */
  301.        unsigned long    xab$l_aclctx;        /* ACL context field */
  302.        unsigned long    xab$l_aclsts;        /* ACL return error status */
  303.  
  304.     unsigned    : 32;
  305.     unsigned    : 32;
  306.     unsigned    : 32;
  307.     unsigned    : 32;
  308.     unsigned    : 32;
  309.     unsigned    : 32;
  310.     unsigned    : 32;
  311.     unsigned    : 32;
  312.     unsigned    : 32;
  313.     unsigned    : 32;
  314.     unsigned    : 32;
  315.     unsigned    : 32;
  316.  
  317.         };
  318.  
  319. extern int cc$rms_xabpro();
  320. #define cc$rms_xabpro (* (struct XABPRO *) cc$rms_xabpro)
  321. /* globalref struct XABPRO cc$rms_xabpro;  /* Declare initialized prototype data structures */
  322.  
  323. #undef XAB_PROT_FIELDS
  324.  
  325.  
  326. /*    XABRDT -- Revision Date and Time Extended Attribute Block Definitions    */
  327.  
  328. struct    XABRDT    {
  329.        unsigned char    xab$b_cod;
  330. #define            XAB$C_RDT    30    /* XABRDT type code */
  331.  
  332.        unsigned char    xab$b_bln;
  333. #define            XAB$C_RDTLEN    0x14    /* XABRDT block length (20 bytes) */
  334. #define            XAB$K_RDTLEN    0x14
  335.  
  336.         unsigned    : 16;        /* spare */
  337.  
  338.         char    *xab$l_nxt;        /* Next XAB in chain */
  339.        unsigned short    xab$w_rvn;        /* revision number */
  340.  
  341.         unsigned    : 16;        /* spare */
  342.  
  343.    struct XAB_DATE_TIME xab$q_rdt;        /* revision date and time */
  344.         };
  345.  
  346.  
  347. extern int CC$RMS_XABRDT();
  348. #define cc$rms_xabrdt (* (struct XABRDT *) CC$RMS_XABRDT)
  349. /* globalref struct XABRDT cc$rms_xabrdt;  /* Declare initialized prototype data structures */
  350.  
  351.  
  352. #undef XAB_DATE_TIME
  353.  
  354. /*    XABSUM -- Summary Extended Attribute Block Definitions    */
  355.  
  356. struct    XABSUM    {
  357.        unsigned char    xab$b_cod;
  358. #define            XAB$C_SUM    22    /* XABSUM type code */
  359.  
  360.        unsigned char    xab$b_bln;
  361. #define            XAB$C_SUMLEN    0x0C    /* XABSUM block length (12 bytes) */
  362. #define            XAB$K_SUMLEN    0x0C
  363.  
  364.         unsigned    : 16;        /* spare */
  365.  
  366.         char    *xab$l_nxt;        /* Next XAB in chain */
  367.        unsigned char    xab$b_noa;        /* number of allocation areas defined for the file */
  368.        unsigned char    xab$b_nok;        /* number of keys defined for the file */
  369.        unsigned short    xab$w_pvn;        /* prologue version number */
  370.         };
  371.  
  372.  
  373. extern int CC$RMS_XABSUM();
  374. #define cc$rms_xabsum (* (struct XABSUM *) CC$RMS_XABSUM)
  375. /* globalref struct XABSUM cc$rms_xabsum;  /* Declare initialized prototype data structures */
  376.  
  377.  
  378. /* XABTRM - Terminal Control XAB field definitions */
  379.  
  380. struct XABTRM {
  381.  
  382.        unsigned char    xab$b_cod;
  383. #define            XAB$C_TRM    31    /* XABSUM type code */
  384.  
  385.        unsigned char    xab$b_bln;
  386. #define            XAB$C_TRMLEN    36    /* length of XABTRM block */
  387. #define            XAB$K_TRMLEN    36    /* length of XABTRM block */
  388.  
  389.         unsigned    : 16;        /* spare */
  390.  
  391.         char    *xab$l_nxt;        /* address of next block */
  392.         char    *xab$l_itmlst;        /* item list address */
  393.        unsigned short    xab$w_itmlst_len;    /* length of item list */
  394.  
  395.         unsigned    : 16;
  396.         unsigned    : 32;
  397.         unsigned    : 32;
  398.         unsigned    : 32;
  399.         unsigned    : 32;
  400.         unsigned    : 32;
  401.     };
  402.  
  403. extern int CC$RMS_XABTRM();
  404. #define cc$rms_xabtrm (* (struct XABTRM *) CC$RMS_XABTRM)
  405. /* globalref       struct XABTRM   cc$rms_xabtrm;  /* declare initialized prototype data structure */
  406.  
  407. #ifdef __cplusplus
  408. }
  409. #endif
  410. #endif _XABALL_H
  411.