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

#if !SMALLER

/*	structure to hold user variables and their definitions	*/

typedef struct UVAR {
	char u_name[NVSIZE + 1];		/* name of user variable */
	char *u_value;				/* value (string) */
} UVAR;

/*	current user variables (This structure will probably change)	*/

#define	MAXVARS		10 	/* was 255 */

UVAR uv[MAXVARS];	/* user variables */

/*	list of recognized environment variables	*/

char *envars[] = {
	"cbufname",	/* current buffer name */
	"cfilname",	/* current file name */
	"char",		/* current character under the cursor */
	"cmode",	/* mode of current buffer */
	"curcol",	/* current column pos of cursor */
	"curline",	/* current line in file */
	"cwline",	/* current screen line in window */
	"debug",	/* macro debugging */
	"directory",	/* current directory */
	"discmd",	/* display commands on command line */
	"disinp",	/* display command line input characters */
	"flicker",	/* flicker suppression */
	"font",		/* current font patch: "#if X11" */
	"identifier",	/* current identifier */
	"kill",		/* kill buffer (read only) */
	"lastkey",	/* last keyboard char struck */
	"line",		/* text of current line */
	"llength",	/* length of current line */
	"match",	/* last matched magic pattern */
	"pagelen",	/* number of lines used by editor */
	"pagewid",	/* current screen width */
	"palette",	/* current palette string */
	"pathname",	/* current path-like word */
	"pending",	/* type ahead pending flag */
	"progname",	/* returns current prog name - "vile" */
	"qidentifier",	/* current qualified identifier */
	"ram",		/* ram in use by malloc */
	"replace",	/* replacement pattern */
	"search",	/* search pattern */
	"seed",		/* current random number seed */
	"shell",	/* shell-environment variable */
	"sres",		/* current screen resolution */
	"status",	/* returns the status of the last command */
	"target",	/* target for line moves */
	"tpause",	/* length to pause for paren matching */
	"version",	/* current version number */
	"wline",	/* # of lines in current window */
	"word",		/* current word */
	NULL	/* ends table for name-completion */
};

#define	NEVARS	(SIZEOF(envars)-1)

/* 	and its preprocesor definitions		*/

#define	EVCBUFNAME	0
#define	EVCFNAME	1
#define	EVCURCHAR	2
#define	EVCMODE		3
#define	EVCURCOL	4
#define	EVCURLINE	5
#define	EVCWLINE	6
#define	EVDEBUG		7
#define	EVDIR		8
#define	EVDISCMD	9
#define	EVDISINP	10
#define	EVFLICKER	11
#define	EVFONT		12
#define	EVIDENTIF	13
#define	EVKILL		14
#define	EVLASTKEY	15
#define	EVLINE		16
#define	EVLLENGTH	17
#define	EVMATCH		18
#define	EVPAGELEN	19
#define	EVCURWIDTH	20
#define	EVPALETTE	21
#define	EVPATHNAME	22
#define	EVPENDING	23
#define	EVPROGNAME	24
#define	EVQIDENTIF	25
#define	EVRAM		26
#define	EVREPLACE	27
#define	EVSEARCH	28
#define	EVSEED		29
#define	EVSHELL		30
#define	EVSRES		31
#define	EVSTATUS	32
#define	EVTARGET	33
#define	EVTPAUSE	34
#define	EVVERSION	35
#define	EVWLINE		36
#define	EVWORD		37

/*	list of recognized user functions	*/

typedef struct UFUNC {
	char *f_name;	/* name of function */
	int f_type;	/* 1 = monamic, 2 = dynamic */
} UFUNC;

#define	NILNAMIC	0
#define	MONAMIC		1
#define	DYNAMIC		2
#define	TRINAMIC	3

UFUNC funcs[] = {
	{"abs", MONAMIC},	/* absolute value of a number */
	{"add", DYNAMIC},	/* add two numbers together */
	{"and", DYNAMIC},	/* logical and */
	{"asc", MONAMIC},	/* char to integer conversion */
	{"bin", MONAMIC},	/* loopup what function name is bound to a key */
	{"cat", DYNAMIC},	/* concatenate string */
	{"chr", MONAMIC},	/* integer to char conversion */
	{"div", DYNAMIC},	/* division */
	{"env", MONAMIC},	/* retrieve a system environment var */
	{"equ", DYNAMIC},	/* logical equality check */
	{"gre", DYNAMIC},	/* logical greater than */
	{"gtk", NILNAMIC},	/* get 1 character */
	{"ind", MONAMIC},	/* evaluate indirect value */
	{"lef", DYNAMIC},	/* left string(string, len) */
	{"len", MONAMIC},	/* string length */
	{"les", DYNAMIC},	/* logical less than */
	{"low", MONAMIC},	/* lower case string */
	{"mid", TRINAMIC},	/* mid string(string, pos, len) */
	{"mod", DYNAMIC},	/* mod */
	{"neg", MONAMIC},	/* negate */
	{"not", MONAMIC},	/* logical not */
	{"or", DYNAMIC},	/* logical or */
	{"rd", MONAMIC},	/* is a file readable? */
	{"rig", DYNAMIC},	/* right string(string, pos) */
	{"rnd", MONAMIC},	/* get a random number */
	{"seq", DYNAMIC},	/* string logical equality check */
	{"sgr", DYNAMIC},	/* string logical greater than */
	{"sin", DYNAMIC},	/* find the index of one string in another */
	{"sle", DYNAMIC},	/* string logical less than */
	{"sub", DYNAMIC},	/* subtraction */
	{"tim", DYNAMIC},	/* multiplication */
	{"tru", MONAMIC},	/* Truth of the universe logical test */
	{"upp", MONAMIC},	/* uppercase string */
	{"wr", MONAMIC},	/* is a file writeable? */
};

#define	NFUNCS	SIZEOF(funcs)

/* 	and its preprocesor definitions		*/

#define	UFABS		0
#define	UFADD		1
#define	UFAND		2
#define	UFASCII		3
#define	UFBIND		4
#define	UFCAT		5
#define	UFCHR		6
#define	UFDIV		7
#define	UFENV		8
#define	UFEQUAL		9
#define	UFGREATER	10
#define	UFGTKEY		11
#define	UFIND		12
#define	UFLEFT		13
#define	UFLENGTH	14
#define	UFLESS		15
#define	UFLOWER		16
#define	UFMID		17
#define	UFMOD		18
#define	UFNEG		19
#define	UFNOT		20
#define	UFOR		21
#define	UFREADABLE	22
#define	UFRIGHT		23
#define	UFRND		24
#define	UFSEQUAL	25
#define	UFSGREAT	26
#define	UFSINDEX	27
#define	UFSLESS		28
#define	UFSUB		29
#define	UFTIMES		30
#define	UFTRUTH		31
#define	UFUPPER		32
#define	UFWRITABLE	33

#endif
