/* <hlpdef.h>
 *
 *	LBRUSR -- data structures for help processing
 */
#ifndef _HLPDEF_H
#define _HLPDEF_H

#define HLP$V_PROMPT	0
#define HLP$V_PROCESS	1
#define HLP$V_GROUP	2
#define HLP$V_SYSTEM	3
#define HLP$V_LIBLIST	4
#define HLP$V_HELP	5
#define HLP$V_SPARE1	6
#define HLP$V_PAGE_SAVE 7
#define HLP$V_PAGE	8
#define HLP$V_OUTPUT	9
#define HLP$V_LIBRARY	10
#define HLP$V_ALL	11
#define HLP$V_PAGEDEF	12
#define HLP$V_PMPTDEF	13
#define HLP$V_NOTTERM	14
#define HLP$M_PROMPT	(1<<HLP$V_PROMPT)	/* x01 */
#define HLP$M_PROCESS	(1<<HLP$V_PROCESS)	/* x02 */
#define HLP$M_GROUP	(1<<HLP$V_GROUP)	/* x04 */
#define HLP$M_SYSTEM	(1<<HLP$V_SYSTEM)	/* x08 */
#define HLP$M_LIBLIST	(1<<HLP$V_LIBLIST)	/* x10 */
#define HLP$M_HELP	(1<<HLP$V_HELP)		/* x20 */
#define HLP$M_SPARE1	(1<<HLP$V_SPARE1)	/* x40 */
#define HLP$M_PAGE_SAVE (1<<HLP$V_PAGE_SAVE)	/* x80 */
#define HLP$M_PAGE	(1<<HLP$V_PAGE)		/* x0100 */
#define HLP$M_OUTPUT	(1<<HLP$V_OUTPUT)	/* x0200 */
#define HLP$M_LIBRARY	(1<<HLP$V_LIBRARY)	/* x0400 */
#define HLP$M_ALL	(1<<HLP$V_ALL)		/* x0800 */
#define HLP$M_PAGEDEF	(1<<HLP$V_PAGEDEF)	/* x1000 */
#define HLP$M_PMPTDEF	(1<<HLP$V_PMPTDEF)	/* x2000 */
#define HLP$M_NOTTERM	(1<<HLP$V_NOTTERM)	/* x4000 */
union hlpdef {
    struct {
	unsigned hlp$v_prompt  : 1;	/* prompting enabled */
	unsigned hlp$v_process : 1;	/* process logical name table searches enabled */
	unsigned hlp$v_group   : 1;	/* group logical name table searches enabled */
	unsigned hlp$v_system  : 1;	/* system logical name table searched enabled */
	unsigned hlp$v_liblist : 1;	/* output list of default libraries */
	unsigned hlp$v_help    : 1;	/* display help on help before list of topics */
	unsigned hlp$v_spare1  : 1;
	unsigned hlp$v_page_save : 1;
	unsigned hlp$v_page    : 1;	/* page breaks enabled */
	unsigned hlp$v_output  : 1;	/* output listing file enabled */
	unsigned hlp$v_library : 1;	/* main library specified by user */
	unsigned hlp$v_all     : 1;	/* some logical name table searches enabled */
	unsigned hlp$v_pagedef : 1;	/* page flag defaulting disabled */
	unsigned hlp$v_pmptdef : 1;	/* prompt flag defaulting disabled */
	unsigned hlp$v_notterm : 1;	/* input device is not a terminal */
	unsigned	       : 1;
    } hlp$r_hlpdef_bits;
};
#define HLP$V_NOHLPTXT	0
#define HLP$V_KEYNAMLIN 1
#define HLP$V_OTHERINFO 2
#define HLP$M_NOHLPTXT	(1<<HLP$V_NOHLPTXT)	/* 0x01 */
#define HLP$M_KEYNAMLIN (1<<HLP$V_KEYNAMLIN)	/* 0x02 */
#define HLP$M_OTHERINFO (1<<HLP$V_OTHERINFO)	/* 0x04 */
struct hlpdef1 {
    unsigned long hlp$l_desc;		/* address of string descriptor for line */
    union {
	unsigned long hlp$l_flags;	/* flags */
	struct {
	    unsigned hlp$v_nohlptxt  : 1; /* line is part of text due to no help found */
	    unsigned hlp$v_keynamlin : 1; /* line contains keynames to be printed */
	    unsigned hlp$v_otherinfo : 1; /* line is part of "other info available" */
	    unsigned		     : 5;
	    unsigned		    : 24; /* padding */
	} hlp$r_flags_bits;
    } hlp$r_flags_overlay;
    unsigned long hlp$l_data;		/* address of user data passed to GET_HELP */
    unsigned long hlp$l_level;		/* level of this help */
};

#endif	/*_HLPDEF_H*/
