#define DEFQTYPE 37 /* defquote */
#define QUTRTYPE 38 /* quoter thus defined */
/* m4 special characters */
#define VQUOTE ('V'&(' '- 1))
* other important constants
#define MAXINP 10 /* maximum include files */
#define MAXOUT 10 /* maximum # of diversions */
#define MAXSTR 512 /* maximum size of string */
#define BUFSIZE 4096 /* size of pushback buffer */
#define STACKMAX 1024 /* size of call stack */
#define STRSPMAX 4096 /* size of string space */
#define HASHSIZE 199 /* maximum size of hashtab */
#define MAXSTR 1024 /* maximum size of string */
#define BUFSIZE 8192 /* size of pushback buffer */
#define STACKMAX 2048 /* size of call stack */
#define STRSPMAX 8192 /* size of string space */
#define HASHSIZE 509 /* maximum size of hashtab */
#define MAXTOK MAXSTR /* maximum chars in a tokn */
typedef struct ndblock
*ndptr
;
struct ndblock
/* hashtable structure */
char *name
; /* entry name.. */
char *defn
; /* definition.. */
int type
; /* type of the entry.. */
ndptr nxtptr
; /* link to next entry.. */
typedef union /* stack structure */
{ int sfra
; /* frame entry */
char *sstr
; /* string entry */
* macros for readibility and/or speed
* gpbc() - get a possibly pushed-back character
* min() - select the minimum of two elements
* pushf() - push a call frame entry onto stack
* pushs() - push a string pointer onto stack
#define gpbc() bp == bb ? getc(infile[ilevel]) : *--bp
#define min(x,y) ((x > y) ? y : x)
#define pushf(x) if (sp < STACKMAX) mstack[++sp].sfra = (x)
#define pushs(x) if (sp < STACKMAX) mstack[++sp].sstr = (x)
* | arg 3 ----------------------->| str |
* | arg 2 ---PREVEP-----+ .
* | plev | PARLEV +-------->| str |
#define PARLEV (mstack[fp].sfra)
#define CALTYP (mstack[fp-1].sfra)
#define PREVEP (mstack[fp+3].sstr)
#define PREVFP (mstack[fp-2].sfra)