|
| #define | DISCARD void /* for throwing values away */ |
| |
| #define | VS(x) ((void *)(x)) /* cast something to generic ptr */ |
| |
| #define | _POSIX2_RE_DUP_MAX 255 /* normally from <limits.h> */ |
| |
| #define | NOTREACHED 0 |
| |
| #define | DUPMAX _POSIX2_RE_DUP_MAX |
| |
| #define | DUPINF (DUPMAX+1) |
| |
| #define | REMAGIC 0xfed7 /* magic number for main struct */ |
| |
| #define | LATYPE_AHEAD_POS 03 /* positive lookahead */ |
| |
| #define | LATYPE_AHEAD_NEG 02 /* negative lookahead */ |
| |
| #define | LATYPE_BEHIND_POS 01 /* positive lookbehind */ |
| |
| #define | LATYPE_BEHIND_NEG 00 /* negative lookbehind */ |
| |
| #define | LATYPE_IS_POS(la) ((la) & 01) |
| |
| #define | LATYPE_IS_AHEAD(la) ((la) & 02) |
| |
| #define | FDEBUG(arglist) {} |
| |
| #define | MDEBUG(arglist) {} |
| |
| #define | UBITS (CHAR_BIT * sizeof(unsigned)) |
| |
| #define | BSET(uv, sn) ((uv)[(sn)/UBITS] |= (unsigned)1 << ((sn)%UBITS)) |
| |
| #define | ISBSET(uv, sn) ((uv)[(sn)/UBITS] & ((unsigned)1 << ((sn)%UBITS))) |
| |
| #define | NUM_CCLASSES 14 |
| |
| #define | MAX_COLOR 32767 /* max color (must fit in 'color' datatype) */ |
| |
| #define | COLORLESS (-1) /* impossible color */ |
| |
| #define | RAINBOW (-2) /* represents all colors except pseudocolors */ |
| |
| #define | WHITE 0 /* default color, parent of all others */ |
| |
| #define | NOSUB COLORLESS /* value of "sub" when no open subcolor */ |
| |
| #define | FREECOL 01 /* currently free */ |
| |
| #define | PSEUDO 02 /* pseudocolor, no real chars */ |
| |
| #define | COLMARK 04 /* temporary marker used in some functions */ |
| |
| #define | UNUSEDCOLOR(cd) ((cd)->flags & FREECOL) |
| |
| #define | CMMAGIC 0x876 |
| |
| #define | CDEND(cm) (&(cm)->cd[(cm)->max + 1]) |
| |
| #define | NINLINECDS ((size_t) 10) |
| |
| #define | GETCOLOR(cm, c) ((c) <= MAX_SIMPLE_CHR ? (cm)->locolormap[(c) - CHR_MIN] : pg_reg_getcolor(cm, c)) |
| |
| #define | freechain outchain /* we do not maintain "freechainRev" */ |
| |
| #define | ARCBATCHSIZE(n) ((n) * sizeof(struct arc) + offsetof(struct arcbatch, a)) |
| |
| #define | FIRSTABSIZE 64 |
| |
| #define | MAXABSIZE 1024 |
| |
| #define | FREESTATE (-1) |
| |
| #define | STATEBATCHSIZE(n) ((n) * sizeof(struct state) + offsetof(struct statebatch, s)) |
| |
| #define | FIRSTSBSIZE 32 |
| |
| #define | MAXSBSIZE 1024 |
| |
| #define | HASLACONS 01 /* uses lookaround constraints */ |
| |
| #define | MATCHALL 02 /* matches all strings of a range of lengths */ |
| |
| #define | HASCANTMATCH 04 /* contains CANTMATCH arcs */ |
| |
| #define | CNFA_NOPROGRESS 01 /* flag bit for a no-progress state */ |
| |
| #define | ZAPCNFA(cnfa) ((cnfa).nstates = 0) |
| |
| #define | NULLCNFA(cnfa) ((cnfa).nstates == 0) |
| |
| #define | REG_MAX_COMPILE_SPACE (500000 * (sizeof(struct state) + 4 * sizeof(struct arc))) |
| |
| #define | LONGER 01 /* prefers longer match */ |
| |
| #define | SHORTER 02 /* prefers shorter match */ |
| |
| #define | MIXED 04 /* mixed preference below */ |
| |
| #define | CAP 010 /* capturing parens here or below */ |
| |
| #define | BACKR 020 /* back reference here or below */ |
| |
| #define | BRUSE 040 /* is referenced by a back reference */ |
| |
| #define | INUSE 0100 /* in use in final tree */ |
| |
| #define | UPPROP (MIXED|CAP|BACKR) /* flags which should propagate up */ |
| |
| #define | LMIX(f) ((f)<<2) /* LONGER -> MIXED */ |
| |
| #define | SMIX(f) ((f)<<1) /* SHORTER -> MIXED */ |
| |
| #define | UP(f) (((f)&UPPROP) | (LMIX(f) & SMIX(f) & MIXED)) |
| |
| #define | MESSY(f) ((f)&(MIXED|CAP|BACKR)) |
| |
| #define | PREF(f) ((f)&(LONGER|SHORTER)) |
| |
| #define | PREF2(f1, f2) ((PREF(f1) != 0) ? PREF(f1) : PREF(f2)) |
| |
| #define | COMBINE(f1, f2) (UP((f1)|(f2)) | PREF2(f1, f2)) |
| |
| #define | STACK_TOO_DEEP(re) ((*((struct fns *) (re)->re_fns)->stack_too_deep) ()) |
| |
| #define | GUTSMAGIC 0xfed9 |
| |