/* nemode.h: this header file was produced automatically by
 * the ./mktbls program, based on input from the file modetbl
 */

#ifdef realdef
/*
 * List of strings shared between all_modes, b_valnames and w_valnames
 */
static char
	s_all[]			= "all",			/* ? */
	s_ascnt[]		= "ascnt",			/* int */
	s_autosavecnt[]		= "autosavecnt",		/* int */
	s_bcolor[]		= "bcolor",			/* color */
	s_c_shiftwidth[]	= "c-shiftwidth",		/* int */
	s_c_suffixes[]		= "c-suffixes",			/* regex */
	s_c_tabstop[]		= "c-tabstop",			/* int */
	s_comments[]		= "comments",			/* regex */
	s_csuf[]		= "csuf",			/* regex */
	s_csw[]			= "csw",			/* int */
	s_cts[]			= "cts",			/* int */
	s_fc[]			= "fc",				/* int */
	s_fcolor[]		= "fcolor",			/* color */
	s_fillcol[]		= "fillcol",			/* int */
	s_glob[]		= "glob",			/* string */
	s_noab[]		= "noab",			/* Bool */
	s_noai[]		= "noai",			/* Bool */
	s_noalt_tabpos[]	= "noalt-tabpos",		/* Bool */
	s_noas[]		= "noas",			/* Bool */
	s_noatp[]		= "noatp",			/* Bool */
	s_noautobuffer[]	= "noautobuffer",		/* Bool */
	s_noautoindent[]	= "noautoindent",		/* Bool */
	s_noautosave[]		= "noautosave",			/* Bool */
	s_nobackspacelimit[]	= "nobackspacelimit",		/* Bool */
	s_nobl[]		= "nobl",			/* Bool */
	s_nocmode[]		= "nocmode",			/* Bool */
	s_nocrypt[]		= "nocrypt",			/* Bool */
	s_nodirc[]		= "nodirc",			/* Bool */
	s_nodos[]		= "nodos",			/* Bool */
	s_nohi[]		= "nohi",			/* Bool */
	s_nohistory[]		= "nohistory",			/* Bool */
	s_nohorizscroll[]	= "nohorizscroll",		/* Bool */
	s_nohs[]		= "nohs",			/* Bool */
	s_noib[]		= "noib",			/* Bool */
	s_noic[]		= "noic",			/* Bool */
	s_noignorecase[]	= "noignorecase",		/* Bool */
	s_noimplybuffer[]	= "noimplybuffer",		/* Bool */
	s_noli[]		= "noli",			/* Bool */
	s_nolist[]		= "nolist",			/* Bool */
	s_nomagic[]		= "nomagic",			/* Bool */
	s_nonu[]		= "nonu",			/* Bool */
	s_nonumber[]		= "nonumber",			/* Bool */
	s_nosamebangs[]		= "nosamebangs",		/* Bool */
	s_nosb[]		= "nosb",			/* Bool */
	s_noshowmatch[]		= "noshowmatch",		/* Bool */
	s_noshowmode[]		= "noshowmode",			/* Bool */
	s_nosm[]		= "nosm",			/* Bool */
	s_nosmd[]		= "nosmd",			/* Bool */
	s_notabinsert[]		= "notabinsert",		/* Bool */
	s_notagrelative[]	= "notagrelative",		/* Bool */
	s_noterse[]		= "noterse",			/* Bool */
	s_noti[]		= "noti",			/* Bool */
	s_notr[]		= "notr",			/* Bool */
	s_noview[]		= "noview",			/* Bool */
	s_nowrapscan[]		= "nowrapscan",			/* Bool */
	s_nowrapwords[]		= "nowrapwords",		/* Bool */
	s_nows[]		= "nows",			/* Bool */
	s_noww[]		= "noww",			/* Bool */
	s_paragraphs[]		= "paragraphs",			/* regex */
	s_sections[]		= "sections",			/* regex */
	s_sentences[]		= "sentences",			/* regex */
	s_shiftwidth[]		= "shiftwidth",			/* int */
	s_side[]		= "side",			/* int */
	s_sideways[]		= "sideways",			/* int */
	s_sw[]			= "sw",				/* int */
	s_tabstop[]		= "tabstop",			/* int */
	s_taglength[]		= "taglength",			/* int */
	s_tags[]		= "tags",			/* string */
	s_tl[]			= "tl",				/* int */
	s_ts[]			= "ts",				/* int */
	s_wm[]			= "wm",				/* int */
	s_wrapmargin[]		= "wrapmargin";			/* int */
#endif /* realdef */

#ifdef realdef
char *all_modes[] = {
	s_noab+2,
	s_noai+2,
	s_all,
	s_noalt_tabpos+2,
	s_noas+2,
	s_ascnt,
	s_noatp+2,
	s_noautobuffer+2,
	s_noautoindent+2,
	s_noautosave+2,
	s_autosavecnt,
	s_nobackspacelimit+2,
	s_bcolor,
	s_nobl+2,
	s_c_shiftwidth,
	s_c_suffixes,
	s_c_tabstop,
	s_nocmode+2,
	s_comments,
	s_nocrypt+2,
	s_csuf,
	s_csw,
	s_cts,
	s_nodirc+2,
	s_nodos+2,
	s_fc,
	s_fcolor,
	s_fillcol,
	s_glob,
	s_nohi+2,
	s_nohistory+2,
	s_nohorizscroll+2,
	s_nohs+2,
	s_noib+2,
	s_noic+2,
	s_noignorecase+2,
	s_noimplybuffer+2,
	s_noli+2,
	s_nolist+2,
	s_nomagic+2,
	s_noab,
	s_noai,
	s_noalt_tabpos,
	s_noas,
	s_noatp,
	s_noautobuffer,
	s_noautoindent,
	s_noautosave,
	s_nobackspacelimit,
	s_nobl,
	s_nocmode,
	s_nocrypt,
	s_nodirc,
	s_nodos,
	s_nohi,
	s_nohistory,
	s_nohorizscroll,
	s_nohs,
	s_noib,
	s_noic,
	s_noignorecase,
	s_noimplybuffer,
	s_noli,
	s_nolist,
	s_nomagic,
	s_nonu,
	s_nonumber,
	s_nosamebangs,
	s_nosb,
	s_noshowmatch,
	s_noshowmode,
	s_nosm,
	s_nosmd,
	s_notabinsert,
	s_notagrelative,
	s_noterse,
	s_noti,
	s_notr,
	s_noview,
	s_nowrapscan,
	s_nowrapwords,
	s_nows,
	s_noww,
	s_nonu+2,
	s_nonumber+2,
	s_paragraphs,
	s_nosamebangs+2,
	s_nosb+2,
	s_sections,
	s_sentences,
	s_shiftwidth,
	s_noshowmatch+2,
	s_noshowmode+2,
	s_side,
	s_sideways,
	s_nosm+2,
	s_nosmd+2,
	s_sw,
	s_notabinsert+2,
	s_tabstop,
	s_taglength,
	s_notagrelative+2,
	s_tags,
	s_noterse+2,
	s_noti+2,
	s_tl,
	s_notr+2,
	s_ts,
	s_noview+2,
	s_wm,
	s_wrapmargin,
	s_nowrapscan+2,
	s_nowrapwords+2,
	s_nows+2,
	s_noww+2,
	NULL	/* ends table */
};
#else
extern char *all_modes[];
#endif /* realdef */

/* global mode flags	*/
/* the indices of G_VALUES.v[] */
#define GMDALTTABPOS 	0	/* emacs-style cursor positioning */
#define GMDABUFF 	1	/* auto-buffer (lru) */
#define GVAL_CSUFFIXES  2
#define GMDDIRC 	3	/* directory-completion (slow!) */
#define GVAL_GLOB 	4
#define GMDHISTORY 	5	/* command-history */
#define GMDIMPLYBUFF 	6	/* imply-buffer (vi-like) */
#define GMDSAMEBANGS 	7	/* use same "!!" data for ^X-! */

#define MAX_G_VALUES	8	/* SIZEOF(g_valuenames) -- Globals */


typedef struct G_VALUES {
	/* each entry is a val, and a ptr to a val */
	struct VAL gv[MAX_G_VALUES+1];
} G_VALUES;

#ifdef realdef
struct VALNAMES g_valuenames[] = {
	{ s_noalt_tabpos+2,	s_noatp+2,	VALTYPE_BOOL,	0 },
	{ s_noautobuffer+2,	s_noab+2,	VALTYPE_BOOL,	0 },
	{ s_c_suffixes,		s_csuf,		VALTYPE_REGEX,	0 },
	{ s_nodirc+2,		"X",		VALTYPE_BOOL,	0 },
	{ s_glob,		"X",		VALTYPE_STRING, 0 },
	{ s_nohistory+2,	s_nohi+2,	VALTYPE_BOOL,	0 },
	{ s_noimplybuffer+2,	s_noib+2,	VALTYPE_BOOL,	0 },
	{ s_nosamebangs+2,	s_nosb+2,	VALTYPE_BOOL,	0 },

	{ NULL,	NULL,	VALTYPE_INT, 0 }
};
#else
extern struct VALNAMES g_valuenames[];
#endif

/* these are the boolean, integer, and pointer value'd settings that are
	associated with a window, and usually settable by a user.  There
	is a global set that is inherited into a buffer, and its windows
	in turn are inherit the buffer's set. */
#define WVAL_BCOLOR 	0
#define WVAL_FCOLOR 	1
#define WMDHORSCROLL 	2	/* scroll whole screen */
#define WMDLIST 	3	/* "list" mode -- show tabs and EOL */
#define WMDNUMBER 	4	/* line-numbers shown */
#define WVAL_SIDEWAYS 	5

#define MAX_W_VALUES	6	/* SIZEOF(w_valuenames) -- Windows */


typedef struct W_VALUES {
	/* each entry is a val, and a ptr to a val */
	struct VAL wv[MAX_W_VALUES+1];
} W_VALUES;

#ifdef realdef
struct VALNAMES w_valuenames[] = {
	{ s_bcolor,		"X",		VALTYPE_COLOR,	WFHARD|WFCOLR },
	{ s_fcolor,		"X",		VALTYPE_COLOR,	WFHARD|WFCOLR },
	{ s_nohorizscroll+2,	s_nohs+2,	VALTYPE_BOOL,	0 },
	{ s_nolist+2,		s_noli+2,	VALTYPE_BOOL,	WFHARD },
	{ s_nonumber+2,		s_nonu+2,	VALTYPE_BOOL,	WFMODE|WFHARD },
	{ s_sideways,		s_side,		VALTYPE_INT,	WFMODE|WFHARD },

	{ NULL,	NULL,	VALTYPE_INT, 0 }
};
#else
extern struct VALNAMES w_valuenames[];
#endif

/* buffer mode flags	*/
/* the indices of B_VALUES.v[] */
#define MDAIND 		0	/* auto-indent */
#define MDASAVE 	1	/* auto-save mode */
#define VAL_ASAVECNT 	2
#define MDBACKLIMIT 	3	/* backspace limited in insert mode */
#define VAL_C_SWIDTH 	4
#define VAL_C_TAB 	5
#define MDCMOD 		6	/* C indentation and fence match */
#define VAL_COMMENTS 	7
#define MDCRYPT 	8	/* encrytion mode active */
#define MDDOS 		9	/* "dos" mode -- lines end in crlf */
#define VAL_FILL 	10
#define MDIGNCASE 	11	/* Exact matching for searches */
#define MDMAGIC 	12	/* regular expressions in search */
#define VAL_PARAGRAPHS  13
#define VAL_SECTIONS 	14
#define VAL_SENTENCES 	15
#define VAL_SWIDTH 	16
#define MDSHOWMAT 	17	/* auto-indent */
#define MDSHOWMODE 	18	/* show insert/replace/command mode */
#define MDTABINSERT 	19	/* okay to insert tab chars */
#define VAL_TAB 	20
#define VAL_TAGLEN 	21
#define MDTAGSRELTIV 	22	/* tags are relative to tagsfile path */
#define VAL_TAGS 	23
#define MDTERSE 	24	/* be terse -- suppress messages */
#define MDVIEW 		25	/* read-only buffer */
#define VAL_WRAPMARGIN  26
#define MDSWRAP 	27	/* wrap-around search mode */
#define MDWRAP 		28	/* word wrap */

#define MAX_B_VALUES	29	/* SIZEOF(b_valuenames) -- Buffers */


typedef struct B_VALUES {
	/* each entry is a val, and a ptr to a val */
	struct VAL bv[MAX_B_VALUES+1];
} B_VALUES;

#ifdef realdef
struct VALNAMES b_valuenames[] = {
	{ s_noautoindent+2,	s_noai+2,	VALTYPE_BOOL,	0 },
	{ s_noautosave+2,	s_noas+2,	VALTYPE_BOOL,	0 },
	{ s_autosavecnt,	s_ascnt,	VALTYPE_INT,	0 },
	{ s_nobackspacelimit+2, s_nobl+2,	VALTYPE_BOOL,	0 },
	{ s_c_shiftwidth,	s_csw,		VALTYPE_INT,	0 },
	{ s_c_tabstop,		s_cts,		VALTYPE_INT,	WFHARD },
	{ s_nocmode+2,		"X",		VALTYPE_BOOL,	WFHARD },
	{ s_comments,		"X",		VALTYPE_REGEX,	0 },
	{ s_nocrypt+2,		"X",		VALTYPE_BOOL,	0 },
	{ s_nodos+2,		"X",		VALTYPE_BOOL,	WFHARD|WFMODE },
	{ s_fillcol,		s_fc,		VALTYPE_INT,	0 },
	{ s_noignorecase+2,	s_noic+2,	VALTYPE_BOOL,	0 },
	{ s_nomagic+2,		"X",		VALTYPE_BOOL,	0 },
	{ s_paragraphs,		"X",		VALTYPE_REGEX,	0 },
	{ s_sections,		"X",		VALTYPE_REGEX,	0 },
	{ s_sentences,		"X",		VALTYPE_REGEX,	0 },
	{ s_shiftwidth,		s_sw,		VALTYPE_INT,	0 },
	{ s_noshowmatch+2,	s_nosm+2,	VALTYPE_BOOL,	0 },
	{ s_noshowmode+2,	s_nosmd+2,	VALTYPE_BOOL,	WFMODE },
	{ s_notabinsert+2,	s_noti+2,	VALTYPE_BOOL,	0 },
	{ s_tabstop,		s_ts,		VALTYPE_INT,	WFHARD },
	{ s_taglength,		s_tl,		VALTYPE_INT,	0 },
	{ s_notagrelative+2,	s_notr+2,	VALTYPE_BOOL,	0 },
	{ s_tags,		"X",		VALTYPE_STRING, 0 },
	{ s_noterse+2,		"X",		VALTYPE_BOOL,	0 },
	{ s_noview+2,		"X",		VALTYPE_BOOL,	WFMODE },
	{ s_wrapmargin,		s_wm,		VALTYPE_INT,	0 },
	{ s_nowrapscan+2,	s_nows+2,	VALTYPE_BOOL,	0 },
	{ s_nowrapwords+2,	s_noww+2,	VALTYPE_BOOL,	0 },

	{ NULL,	NULL,	VALTYPE_INT, 0 }
};
#else
extern struct VALNAMES b_valuenames[];
#endif
