From 1de3e139bbf8187546c690742645a6063e9f5412 Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Mon, 23 Sep 2013 21:30:31 +0800 Subject: [PATCH] Move APROP and Token type out of estruct. --- bind.h | 9 +++++++-- estruct.h | 16 +--------------- eval.h | 17 ++++++++++++++++- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/bind.h b/bind.h index a5efd9f..0314903 100644 --- a/bind.h +++ b/bind.h @@ -3,15 +3,20 @@ #include "edef.h" +#define APROP 1 /* Add code for Apropos command */ + +#if APROP +int apro( int f, int n) ; +int strinc( char *source, char *sub) ; +#endif + int help( int f, int n) ; int deskey( int f, int n) ; int bindtokey( int f, int n) ; int unbindkey( int f, int n) ; int unbindchar( int c) ; int desbind( int f, int n) ; -int apro( int f, int n) ; int buildlist( int type, char *mstring) ; -int strinc( char *source, char *sub) ; unsigned int getckey( int mflag) ; int startup( char *sfname) ; void cmdstr( int c, char *seq) ; diff --git a/estruct.h b/estruct.h index f2e656b..a725ff5 100644 --- a/estruct.h +++ b/estruct.h @@ -156,8 +156,8 @@ #define ISRCH 1 /* Incremental searches like ITS EMACS */ #endif #define WORDPRO 1 /* Advanced word processing features */ -#define APROP 1 /* Add code for Apropos command */ #if 0 +#define APROP 1 /* Add code for Apropos command */ #define CRYPT 1 /* file encryption enabled? */ #define MAGIC 1 /* include regular expression matching? */ #endif @@ -271,20 +271,6 @@ #define INTWIDTH sizeof(int) * 3 -/* 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 */ - /* Internal defined functions */ #define nextab(a) (a & ~tabmask) + (tabmask+1) diff --git a/eval.h b/eval.h index 655123a..29cec28 100644 --- a/eval.h +++ b/eval.h @@ -1,6 +1,22 @@ #ifndef _EVAL_H_ #define _EVAL_H_ +/* 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) ; + void varinit( void) ; char *gtfun( char *fname) ; char *gtusr( char *vname) ; @@ -8,7 +24,6 @@ char *gtenv( char *vname) ; char *getkill( void) ; int setvar( int f, int n) ; char *itoa( int i) ; -int gettyp( char *token) ; char *getval( char *token) ; int stol( char *val) ; char *ltos( int val) ;