A cleaner fix to previous.
Obtained from:bde@freebsd.org
This commit is contained in:
parent
c89d070648
commit
e6d26e0a6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56666
@ -46,14 +46,17 @@
|
|||||||
#define SETLINE {++lineno;lineftell = ftell(inf);}
|
#define SETLINE {++lineno;lineftell = ftell(inf);}
|
||||||
#define GETC(op,exp) ((c = getc(inf)) op (int)exp)
|
#define GETC(op,exp) ((c = getc(inf)) op (int)exp)
|
||||||
|
|
||||||
#define _egrd(idx, array) \
|
/*
|
||||||
(((int)idx < 0)? NO : array [ (int) idx ])
|
* Assumes that the last element is always 'NO',
|
||||||
|
* as the EOF return from stdio get overlaid to
|
||||||
|
* that entry.
|
||||||
|
*/
|
||||||
|
|
||||||
#define iswhite(arg) _egrd(arg, _wht) /* T if char is white */
|
#define iswhite(arg) _wht[arg & 0xff] /* T if char is white */
|
||||||
#define begtoken(arg) _egrd(arg, _btk) /* T if char can start token */
|
#define begtoken(arg) _btk[arg & 0xff] /* T if char can start token */
|
||||||
#define intoken(arg) _egrd(arg, _itk) /* T if char can be in token */
|
#define intoken(arg) _itk[arg & 0xff] /* T if char can be in token */
|
||||||
#define endtoken(arg) _egrd(arg, _etk) /* T if char ends tokens */
|
#define endtoken(arg) _etk[arg & 0xff] /* T if char ends tokens */
|
||||||
#define isgood(arg) _egrd(arg, _gd) /* T if char can be after ')' */
|
#define isgood(arg) _gd[arg & 0xff] /* T if char can be after ')' */
|
||||||
|
|
||||||
typedef struct nd_st { /* sorting structure */
|
typedef struct nd_st { /* sorting structure */
|
||||||
struct nd_st *left,
|
struct nd_st *left,
|
||||||
|
Loading…
Reference in New Issue
Block a user