diff options
Diffstat (limited to 'src/include/regex/regguts.h')
-rw-r--r-- | src/include/regex/regguts.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/include/regex/regguts.h b/src/include/regex/regguts.h index 306525eb5fa..0e76a828f8f 100644 --- a/src/include/regex/regguts.h +++ b/src/include/regex/regguts.h @@ -128,6 +128,18 @@ /* + * known character classes + */ +enum char_classes +{ + CC_ALNUM, CC_ALPHA, CC_ASCII, CC_BLANK, CC_CNTRL, CC_DIGIT, CC_GRAPH, + CC_LOWER, CC_PRINT, CC_PUNCT, CC_SPACE, CC_UPPER, CC_XDIGIT, CC_WORD +}; + +#define NUM_CCLASSES 14 + + +/* * As soon as possible, we map chrs into equivalence classes -- "colors" -- * which are of much more manageable number. * @@ -164,12 +176,14 @@ struct colordesc #define NOSUB COLORLESS /* value of "sub" when no open subcolor */ struct arc *arcs; /* chain of all arcs of this color */ chr firstchr; /* simple char first assigned to this color */ - int flags; /* bit values defined next */ + int flags; /* bitmask of the following flags: */ #define FREECOL 01 /* currently free */ #define PSEUDO 02 /* pseudocolor, no real chars */ -#define UNUSEDCOLOR(cd) ((cd)->flags & FREECOL) +#define COLMARK 04 /* temporary marker used in some functions */ }; +#define UNUSEDCOLOR(cd) ((cd)->flags & FREECOL) + /* * The color map itself * @@ -199,8 +213,6 @@ struct colordesc * appear in increasing chr-value order. */ -#define NUM_CCLASSES 13 /* must match data in regc_locale.c */ - typedef struct colormaprange { chr cmin; /* range represents cmin..cmax inclusive */ |