/* <mhddef.h>
 *
 *	LBRUSR -- module header
 */
#ifndef _MHDDEF_H
#define _MHDDEF_H

#define MHD$C_MHDID	173	/* value that must be in the ident */
#define MHD$K_REFLNG	8	/* length of record to end of ref count */
#define MHD$C_REFLNG	8	/* length of record to end of ref count */
#define MHD$K_INSTIME	8	/* label for start of insert time */
#define MHD$C_INSTIME	8	/* label for start of insert time */
#define MHD$K_USRDAT	16	/* start of user additional header data */
#define MHD$C_USRDAT	16	/* start of user additional header data */
#define MHD$K_MHDLEN	16	/* length of fixed part of MHD */
#define MHD$C_MHDLEN	16	/* length of fixed part of MHD */
#define MHD$V_SELSRC	0
#define MHD$V_OBJTIR	1
#define MHD$M_SELSRC	(1<<MHD$V_SELSRC)	/* 0x01 */
#define MHD$M_OBJTIR	(1<<MHD$V_OBJTIR)	/* 0x02 */
#define MHD$K_OBJIDENT	18
#define MHD$C_OBJIDENT	18
struct mhddef {
    unsigned char mhd$b_lbrflag;	/* librarian-controlled flag byte */
    unsigned char mhd$b_id;		/* ident */
    unsigned	: 16;			/* short fill; reserved word */
    unsigned long mhd$l_refcnt;		/* reference count */
    unsigned long mhd$l_datim;		/* date/time inserted */
    union {
	long mhd$l_usrdat;
	struct {
	    unsigned	: 8, : 8, : 8, : 8;	/* char fill[4]; */
	    char mhd$b_usrdat[1];	/* start of user additional header data */
	} mhd$r_usrdat_fields;
    } mhd$r_usrdat_overlay;
    union {
	unsigned char mhd$b_objstat;	/* status of object module */
	struct {
	    unsigned mhd$v_selsrc : 1;	/* selective search */
	    unsigned mhd$v_objtir : 1;	/* module contains TIR records */
	    unsigned		  : 6;
	} mhd$r_objstat_bits;
    } mhd$r_objstat_overlay;
    union {
	unsigned char mhd$b_objidlng;	/* length of ident */
	struct {
	    unsigned	: 8, : 8, : 8, : 8;	/* char fill[4]; */
	    char mhd$t_objident[1];	/* object module ident */
	} mhd$r_objidlng_fields;
    } mhd$r_objidlng_overlay;
};

#endif	/*_MHDDEF_H*/
