/* <crfdef.h>
 *
 *	CRF -- cross reference definitions
 */
#ifndef _CRFDEF_H
#define _CRFDEF_H

/* CRF$INSRTREF argument list */
struct crfdef {
    unsigned	: 32;			/* long fill; argument count */
    unsigned long crf$l_ir_ctltbl;	/* CRF control table adr */
    unsigned long crf$l_ir_keyadr;	/* key address */
    unsigned long crf$l_ir_refadr;	/* reference indicator adr */
    unsigned short crf$w_ir_reflag;	/* reference indicator flags */
    unsigned	: 8, : 8;		/* char fill[2]; unused */
    unsigned char crf$b_ir_defind;	/* definition indicator */
    unsigned	: 8, : 8, : 8;		/* char fill[3]; unused */
};

/* CRF$INSRTKEY argument list */
struct crfdef1 {
    unsigned	: 32;			/* long fill; argument count */
    unsigned long crf$l_ik_ctltbl;	/* CRF control table adr */
    unsigned long crf$l_ik_keyadr;	/* address of key */
    unsigned long crf$l_ik_valadr;	/* address of value */
    unsigned short crf$w_ik_valflg;	/* value flags */
    unsigned	: 8, : 8;		/* char fill[2]; unused */
};

/* CRF$OUT argument list */
struct crfdef2 {
    unsigned	: 32;			/* long fill; argument count */
    unsigned long crf$l_ou_ctltbl;	/* CRF control table adr */
    unsigned long crf$l_ou_linwid;	/* output line width */
    unsigned char crf$b_ou_pag1;	/* ! lines/page 1 */
    unsigned	: 8, : 8, : 8;		/* char fill[3]; unused */
    unsigned char crf$b_ou_sucpag;	/* ! lines/successive pages */
    unsigned	: 8, : 8, : 8;		/* char fill[3]; unused */
    unsigned char crf$b_ou_prtind;	/* ref print indicator */
    unsigned	: 8, : 8, : 8;		/* char fill[3]; unused */
    unsigned char crf$b_ou_savind;	/* save indicator */
};

/* CRF control table offsets */
struct crfdef3 {
    unsigned long crf$l_hasht;		/* hash table address */
    unsigned long crf$l_lastkey;	/* last key looked at address */
    union {
	unsigned char crf$b_keytype;	/* type of key in table */
	struct {
	    unsigned crf$v_binary : 1;	/* 1 = key is binary 0 = ASCII */
	    unsigned		  : 7;
	} crf$r_keytype_bits;
    } crf$r_keytype_overlay;
    unsigned char crf$b_flags;		/* misc. flags for future expansion */
    unsigned short crf$w_errsts;	/* secondary error status code */
    unsigned long crf$l_entries;	/* number of entries in cross reference */
    unsigned long crf$l_dynmem[2];	/* listhead of dynamic memory */
    unsigned long crf$l_maxblk;		/* size (in bytes) of block to allocate */
    unsigned long crf$l_memexp;		/* size (in pages) of block to allocate */
    long crfdef3_fill[8];		/* spares */
    unsigned long crf$l_error;		/* error routine address */
    unsigned long crf$l_output;		/* output routine address */
    unsigned long crf$l_k1fmtbl;	/* key1 field format tbl adr */
    unsigned long crf$l_k2fmtbl;	/* key2 field format tbl adr */
    unsigned long crf$l_v1fmtbl;	/* val1 field format tbl adr */
    unsigned long crf$l_v2fmtbl;	/* val2 field format tbl adr */
    unsigned long crf$l_r1fmtbl;	/* ref1 field format tbl adr */
    unsigned long crf$l_r2fmtbl;	/* ref2 field format tbl adr */
};

#endif	/*_CRFDEF_H*/
