#define ALLOC(x) (struct x *) ckalloc(sizeof(struct x))
#define ALLOCN(n,x) (struct x *) ckalloc(n*sizeof(struct x))
#define ALLEXPR (expptr) ckalloc( sizeof(union Expression) )
typedef char field; /* actually need only 4 bits */
#define CHNULL (chainp) 0
/* storage classes -- vstg values */
/* name classes -- vclass values */
/* control stack codes */
/* INTRINSIC function codes*/
/* I/O statement codes */
#define MSKLOGICAL M(TYLOGICAL)
#define MSKADDR M(TYADDR)
#define MSKCHAR M(TYCHAR)
#define MSKINT M(TYSHORT)|M(TYLONG)
#define MSKREAL M(TYREAL)|M(TYDREAL)
#define MSKCOMPLEX M(TYCOMPLEX)|M(TYDCOMPLEX)
#define MSKSTATIC (M(STGINIT)|M(STGBSS)|M(STGCOMMON)|M(STGEQUIV)|M(STGCONST))
/* miscellaneous macros */
#define ONEOF(x,y) (M(x) & (y))
#define ISCOMPLEX(z) ONEOF(z, MSKCOMPLEX)
#define ISREAL(z) ONEOF(z, MSKREAL)
#define ISNUMERIC(z) ONEOF(z, MSKINT|MSKREAL|MSKCOMPLEX)
#define ISICON(z) (z->tag==TCONST && ISINT(z->constblock.vtype))
#define ISCHAR(z) (z->headblock.vtype==TYCHAR)
#define ISINT(z) ONEOF(z, MSKINT)
#define ISCONST(z) (z->tag==TCONST)
#define ISERROR(z) (z->tag==TERROR)
#define ISPLUSOP(z) (z->tag==TEXPR && z->exprblock.opcode==OPPLUS)
#define ISSTAROP(z) (z->tag==TEXPR && z->exprblock.opcode==OPSTAR)
#define ISONE(z) (ISICON(z) && z->constblock.const.ci==1)
#define INT(z) ONEOF(z, MSKINT|MSKCHAR)
#define ICON(z) mkintcon( (ftnint)(z) )
#define NO66(s) if(no66flag) err66(s)
#define NOEXT(s) if(noextflag) errext(s)
/* round a up to a multiple of b */
#define roundup(a,b) ( b * ( (a+b-1)/b) )