mirror of
https://github.com/rfivet/uemacs.git
synced 2025-02-20 23:17:13 -05:00
Limit visibility of token types to eval.
This commit is contained in:
parent
63776bb3f8
commit
f8c405f501
23
eval.c
23
eval.c
@ -34,6 +34,22 @@
|
|||||||
|
|
||||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
|
|
||||||
|
static int gettyp( char *token) ;
|
||||||
|
|
||||||
#if DEBUGM
|
#if DEBUGM
|
||||||
/* vars needed for macro debugging output */
|
/* vars needed for macro debugging output */
|
||||||
char outline[ NSTRING] ; /* global string to hold debug line text */
|
char outline[ NSTRING] ; /* global string to hold debug line text */
|
||||||
@ -1093,8 +1109,7 @@ char *i_to_a(int i)
|
|||||||
*
|
*
|
||||||
* char *token; token to analyze
|
* char *token; token to analyze
|
||||||
*/
|
*/
|
||||||
int gettyp(char *token)
|
static int gettyp( char *token) {
|
||||||
{
|
|
||||||
char c; /* first char in token */
|
char c; /* first char in token */
|
||||||
|
|
||||||
/* grab the first char (this is all we need) */
|
/* grab the first char (this is all we need) */
|
||||||
@ -1132,6 +1147,10 @@ int gettyp(char *token)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int is_it_cmd( char *token) {
|
||||||
|
return TKCMD == gettyp( token) ;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* find the value of a token
|
* find the value of a token
|
||||||
*
|
*
|
||||||
|
16
eval.h
16
eval.h
@ -22,21 +22,7 @@ extern int flickcode ; /* do flicker supression? */
|
|||||||
extern int rval ; /* return value of a subprocess */
|
extern int rval ; /* return value of a subprocess */
|
||||||
extern long envram ; /* # of bytes current in use by malloc */
|
extern long envram ; /* # of bytes current in use by malloc */
|
||||||
|
|
||||||
/* Macro argument token types */
|
int is_it_cmd( char *token) ;
|
||||||
|
|
||||||
#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) ;
|
|
||||||
|
|
||||||
void varinit( void) ;
|
void varinit( void) ;
|
||||||
int setvar( int f, int n) ;
|
int setvar( int f, int n) ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user