2013-05-20 01:16:08 -04:00
|
|
|
#ifndef _EVAL_H_
|
|
|
|
#define _EVAL_H_
|
|
|
|
|
2013-10-07 22:20:01 -04:00
|
|
|
|
|
|
|
#define DEBUGM 1 /* $debug triggers macro debugging */
|
|
|
|
|
|
|
|
|
|
|
|
#if DEBUGM
|
|
|
|
/* Vars needed for macro debugging output. */
|
|
|
|
extern char outline[] ; /* Global string to hold debug line text. */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2013-10-08 03:53:27 -04:00
|
|
|
/* Emacs global flag bit definitions (for gflags). */
|
|
|
|
|
|
|
|
#define GFREAD 1
|
|
|
|
|
|
|
|
extern int gflags ; /* global control flag */
|
2013-10-08 04:24:11 -04:00
|
|
|
extern int macbug ; /* macro debuging flag */
|
|
|
|
extern int cmdstatus ; /* last command status */
|
2013-10-09 04:58:33 -04:00
|
|
|
extern int flickcode ; /* do flicker supression? */
|
2013-10-09 23:42:33 -04:00
|
|
|
extern int rval ; /* return value of a subprocess */
|
2013-10-09 02:38:55 -04:00
|
|
|
extern long envram ; /* # of bytes current in use by malloc */
|
|
|
|
|
2013-09-23 09:30:31 -04:00
|
|
|
/* Macro argument token types */
|
|
|
|
|
|
|
|
#define TKNUL 0 /* end-of-string */
|
|
|
|
#define TKARG 1 /* interactive argument */
|
|
|
|
#define TKBUF 2 /* buffer argument */
|
|
|
|
#define TKVAR 3 /* user variables */
|
|
|
|
#define TKENV 4 /* environment variables */
|
|
|
|
#define TKFUN 5 /* function.... */
|
|
|
|
#define TKDIR 6 /* directive */
|
|
|
|
#define TKLBL 7 /* line label */
|
|
|
|
#define TKLIT 8 /* numeric literal */
|
|
|
|
#define TKSTR 9 /* quoted string literal */
|
|
|
|
#define TKCMD 10 /* command name */
|
|
|
|
|
|
|
|
int gettyp( char *token) ;
|
|
|
|
|
2013-05-20 01:16:08 -04:00
|
|
|
void varinit( void) ;
|
|
|
|
char *gtfun( char *fname) ;
|
|
|
|
char *gtusr( char *vname) ;
|
|
|
|
char *gtenv( char *vname) ;
|
|
|
|
int setvar( int f, int n) ;
|
2014-06-18 02:59:40 -04:00
|
|
|
char *i_to_a( int i) ;
|
2013-05-20 01:16:08 -04:00
|
|
|
char *getval( char *token) ;
|
|
|
|
int stol( char *val) ;
|
|
|
|
char *mkupper( char *str) ;
|
|
|
|
char *mklower( char *str) ;
|
|
|
|
int abs( int x) ;
|
|
|
|
int ernd( void) ;
|
|
|
|
int sindex( char *source, char *pattern) ;
|
|
|
|
char *xlat( char *source, char *lookup, char *trans) ;
|
|
|
|
|
|
|
|
#endif
|