/* Ported to GNU C openVMS/Alpha by Klaus Kämpf, kkaempf@progis.de  */
/* <xabdef.h>
 *
 *	RMS extended attribute block (XAB) definitions, common to all XABs
 */
#ifndef _XABDEF_H
#define _XABDEF_H

#ifdef __cplusplus
extern "C" {
#endif


/* the first four fields are shared in common between all XABs */

#define __XABSTART_FIELDS						\
    unsigned char  xab$b_cod;		/* xab ID code */		\
    unsigned char  xab$b_bln;		/* block length */		\
	unsigned short : 16;		/* (filler) */			\
    void	  *xab$l_nxt;		/* xab chain link */


struct xabdef {
  __XABSTART_FIELDS
    unsigned short xab$w_rvn;
	unsigned short : 16;		/* short fill; */
    unsigned long long xab$q_rdt;	/* common to DAT and RDT xabs */
} __attribute__ ((packed));

struct xabdef1 {			/*(this is useless)*/
    char  xabdef$$_fill_3[8];

    char  xabdef$$_fill_4;
    char  xabdef$$_fill_5;
    short xabdef$$_fill_6;
    long  xabdef$$_fill_7;
    long  xabdef$$_fill_8;

    short xabdef$$_fill_9;
    unsigned char xab$b_bkz __attribute__ ((packed));		/* common to fhc and alq xabs */
} __attribute__ ((packed));
#define XAB$C_CXT_VER1	1	/* RMS Context Extraction version 1 */

#define XAB xabdef
#define XABDEF1 xabdef1

#ifdef __cplusplus
  }
#endif

#endif	/*_XABDEF_H*/
