1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 15:26:23 -05:00
uemacs/evar.h
Thiago Farina 8fc7449839 uemacs: fix sparse warnings, making file-local symbols static.
ansi.c:255:6: warning: symbol 'ansihello' was not declared. Should it be static?
epath.h:11:6: warning: symbol 'pathname' was not declared. Should it be static?
display.c:36:7: warning: symbol 'vscreen' was not declared. Should it be static?
display.c:38:7: warning: symbol 'pscreen' was not declared. Should it be static?
display.c:927:5: warning: symbol 'updateline' was not declared. Should it be static?
evar.h:20:6: warning: symbol 'uv' was not declared. Should it be static?
evar.h:24:6: warning: symbol 'envars' was not declared. Should it be static?
evar.h:128:7: warning: symbol 'funcs' was not declared. Should it be static?
fileio.c:14:6: warning: symbol 'ffp' was not declared. Should it be static?
fileio.c:15:5: warning: symbol 'eofflag' was not declared. Should it be static?
ibmpc.c:505:6: warning: symbol 'ibmhello' was not declared. Should it be static?
isearch.c:36:5: warning: symbol 'saved_get_char' was not declared. Should it be static?
isearch.c:37:5: warning: symbol 'eaten_char' was not declared. Should it be static?
isearch.c:41:5: warning: symbol 'cmd_buff' was not declared. Should it be static?
isearch.c:42:5: warning: symbol 'cmd_offset' was not declared. Should it be static?
isearch.c:43:5: warning: symbol 'cmd_reexecute' was not declared. Should it be static?
line.c:21:6: warning: symbol 'ykbuf' was not declared. Should it be static?
line.c:22:5: warning: symbol 'ykboff' was not declared. Should it be static?
lock.c:17:6: warning: symbol 'lname' was not declared. Should it be static?
lock.c:18:5: warning: symbol 'numlocks' was not declared. Should it be static?
vmsvt.c:521:6: warning: symbol 'hellovms' was not declared. Should it be static?
vt52.c:181:6: warning: symbol 'vt52hello' was not declared. Should it be static?

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-29 16:30:44 -08:00

213 lines
6.1 KiB
C

/* EVAR.H
*
* Environment and user variable definitions
*
* written 1986 by Daniel Lawrence
* modified by Petri Kutvonen
*/
/* 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 255
static UVAR uv[MAXVARS + 1]; /* user variables */
/* list of recognized environment variables */
static char *envars[] = {
"fillcol", /* current fill column */
"pagelen", /* number of lines used by editor */
"curcol", /* current column pos of cursor */
"curline", /* current line in file */
"ram", /* ram in use by malloc */
"flicker", /* flicker supression */
"curwidth", /* current screen width */
"cbufname", /* current buffer name */
"cfname", /* current file name */
"sres", /* current screen resolution */
"debug", /* macro debugging */
"status", /* returns the status of the last command */
"palette", /* current palette string */
"asave", /* # of chars between auto-saves */
"acount", /* # of chars until next auto-save */
"lastkey", /* last keyboard char struck */
"curchar", /* current character under the cursor */
"discmd", /* display commands on command line */
"version", /* current version number */
"progname", /* returns current prog name - "MicroEMACS" */
"seed", /* current random number seed */
"disinp", /* display command line input characters */
"wline", /* # of lines in current window */
"cwline", /* current screen line in window */
"target", /* target for line moves */
"search", /* search pattern */
"replace", /* replacement pattern */
"match", /* last matched magic pattern */
"kill", /* kill buffer (read only) */
"cmode", /* mode of current buffer */
"gmode", /* global modes */
"tpause", /* length to pause for paren matching */
"pending", /* type ahead pending flag */
"lwidth", /* width of current line */
"line", /* text of current line */
"gflags", /* global internal emacs flags */
"rval", /* child process return value */
"tab", /* tab 4 or 8 */
"overlap",
"jump",
#if SCROLLCODE
"scroll", /* scroll enabled */
#endif
};
#define NEVARS sizeof(envars) / sizeof(char *)
/* and its preprocesor definitions */
#define EVFILLCOL 0
#define EVPAGELEN 1
#define EVCURCOL 2
#define EVCURLINE 3
#define EVRAM 4
#define EVFLICKER 5
#define EVCURWIDTH 6
#define EVCBUFNAME 7
#define EVCFNAME 8
#define EVSRES 9
#define EVDEBUG 10
#define EVSTATUS 11
#define EVPALETTE 12
#define EVASAVE 13
#define EVACOUNT 14
#define EVLASTKEY 15
#define EVCURCHAR 16
#define EVDISCMD 17
#define EVVERSION 18
#define EVPROGNAME 19
#define EVSEED 20
#define EVDISINP 21
#define EVWLINE 22
#define EVCWLINE 23
#define EVTARGET 24
#define EVSEARCH 25
#define EVREPLACE 26
#define EVMATCH 27
#define EVKILL 28
#define EVCMODE 29
#define EVGMODE 30
#define EVTPAUSE 31
#define EVPENDING 32
#define EVLWIDTH 33
#define EVLINE 34
#define EVGFLAGS 35
#define EVRVAL 36
#define EVTAB 37
#define EVOVERLAP 38
#define EVSCROLLCOUNT 39
#define EVSCROLL 40
/* 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
static UFUNC funcs[] = {
{ "add", DYNAMIC }, /* add two numbers together */
{ "sub", DYNAMIC }, /* subtraction */
{ "tim", DYNAMIC }, /* multiplication */
{ "div", DYNAMIC }, /* division */
{ "mod", DYNAMIC }, /* mod */
{ "neg", MONAMIC }, /* negate */
{ "cat", DYNAMIC }, /* concatinate string */
{ "lef", DYNAMIC }, /* left string(string, len) */
{ "rig", DYNAMIC }, /* right string(string, pos) */
{ "mid", TRINAMIC }, /* mid string(string, pos, len) */
{ "not", MONAMIC }, /* logical not */
{ "equ", DYNAMIC }, /* logical equality check */
{ "les", DYNAMIC }, /* logical less than */
{ "gre", DYNAMIC }, /* logical greater than */
{ "seq", DYNAMIC }, /* string logical equality check */
{ "sle", DYNAMIC }, /* string logical less than */
{ "sgr", DYNAMIC }, /* string logical greater than */
{ "ind", MONAMIC }, /* evaluate indirect value */
{ "and", DYNAMIC }, /* logical and */
{ "or", DYNAMIC }, /* logical or */
{ "len", MONAMIC }, /* string length */
{ "upp", MONAMIC }, /* uppercase string */
{ "low", MONAMIC }, /* lower case string */
{ "tru", MONAMIC }, /* Truth of the universe logical test */
{ "asc", MONAMIC }, /* char to integer conversion */
{ "chr", MONAMIC }, /* integer to char conversion */
{ "gtk", NILNAMIC }, /* get 1 charater */
{ "rnd", MONAMIC }, /* get a random number */
{ "abs", MONAMIC }, /* absolute value of a number */
{ "sin", DYNAMIC }, /* find the index of one string in another */
{ "env", MONAMIC }, /* retrieve a system environment var */
{ "bin", MONAMIC }, /* loopup what function name is bound to a key */
{ "exi", MONAMIC }, /* check if a file exists */
{ "fin", MONAMIC }, /* look for a file on the path... */
{ "ban", DYNAMIC }, /* bitwise and 9-10-87 jwm */
{ "bor", DYNAMIC }, /* bitwise or 9-10-87 jwm */
{ "bxo", DYNAMIC }, /* bitwise xor 9-10-87 jwm */
{ "bno", MONAMIC }, /* bitwise not */
{ "xla", TRINAMIC }, /* XLATE character string translation */
};
#define NFUNCS sizeof(funcs) / sizeof(UFUNC)
/* and its preprocesor definitions */
#define UFADD 0
#define UFSUB 1
#define UFTIMES 2
#define UFDIV 3
#define UFMOD 4
#define UFNEG 5
#define UFCAT 6
#define UFLEFT 7
#define UFRIGHT 8
#define UFMID 9
#define UFNOT 10
#define UFEQUAL 11
#define UFLESS 12
#define UFGREATER 13
#define UFSEQUAL 14
#define UFSLESS 15
#define UFSGREAT 16
#define UFIND 17
#define UFAND 18
#define UFOR 19
#define UFLENGTH 20
#define UFUPPER 21
#define UFLOWER 22
#define UFTRUTH 23
#define UFASCII 24
#define UFCHR 25
#define UFGTKEY 26
#define UFRND 27
#define UFABS 28
#define UFSINDEX 29
#define UFENV 30
#define UFBIND 31
#define UFEXIST 32
#define UFFIND 33
#define UFBAND 34
#define UFBOR 35
#define UFBXOR 36
#define UFBNOT 37
#define UFXLATE 38