/* <lbrctltbl.h>
 *
 *	LBRUSR -- librarian control table
 */
#ifndef _LBRCTLTBL_H
#define _LBRCTLTBL_H

#define LBR$C_CTLTBLID	203	/* ident for control table */
#define LBR$V_LOCATE	0
#define LBR$V_OPEN	1
#define LBR$M_LOCATE	(1<<LBR$V_LOCATE)	/* 0x01 */
#define LBR$M_OPEN	(1<<LBR$V_OPEN)		/* 0x02 */
#define LBR$K_LENGTH	30
#define LBR$C_LENGTH	30
struct lbrctltbl {
    unsigned char lbr$b_id;		/* control table ID */
    unsigned char lbr$b_tblsiz;		/* control table size */
    unsigned char lbr$b_type;		/* type of library opened */
    unsigned char lbr$b_func;		/* operation (function) requested */
    unsigned	: 8, : 8;		/* char fill[2]; reserved extra bytes */
    union {
	unsigned long lbr$l_usrflg;	/* flags longword */
	struct {
	    unsigned lbr$v_locate : 1;	/* use "locate" rather than "move" mode */
	    unsigned lbr$v_open   : 1;	/* library open */
	    unsigned		  : 6;
	    unsigned	: 24;		/* padding */
	} lbr$r_usrflg_bits;
    } lbr$r_usrflg_overlay;
    unsigned long lbr$l_hdrptr;		/* pointer to in-core header */
    unsigned long lbr$l_ctxptr;		/* pointer to context control block */
    unsigned long lbr$l_curidx;		/* number of current index */
    unsigned long lbr$l_usrnam;		/* pointer to user NAM block */
    unsigned long lbr$l_oldhdrptr;	/* pointer to unmodified in-core header block */
};

#endif	/*_LBRCTLTBL_H*/
