Skip to content

Commit

Permalink
regcomp.h: Clean up some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Williamson authored and Father Chrysostomos committed Oct 31, 2010
1 parent eb91e30 commit bf3f2d8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions regcomp.h
Expand Up @@ -204,15 +204,16 @@ struct regnode_charclass {
U8 flags;
U8 type;
U16 next_off;
U32 arg1;
U32 arg1; /* used as ptr in S_regclass */
char bitmap[ANYOF_BITMAP_SIZE]; /* only compile-time */
};

struct regnode_charclass_class { /* has [[:blah:]] classes */
U8 flags; /* should have ANYOF_CLASS here */
/* has runtime (locale) \d, \w, ..., [:posix:] classes */
struct regnode_charclass_class {
U8 flags; /* ANYOF_CLASS bit must go here */
U8 type;
U16 next_off;
U32 arg1;
U32 arg1; /* used as ptr in S_regclass */
char bitmap[ANYOF_BITMAP_SIZE]; /* both compile-time */
char classflags[ANYOF_CLASSBITMAP_SIZE]; /* and run-time */
};
Expand Down Expand Up @@ -271,7 +272,7 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */
#undef STRING

#define OP(p) ((p)->type)
#define FLAGS(p) ((p)->flags) /* Caution: Doesn't apply to all
#define FLAGS(p) ((p)->flags) /* Caution: Doesn't apply to all \
regnode types */
#define OPERAND(p) (((struct regnode_string *)p)->string)
#define MASK(p) ((char*)OPERAND(p))
Expand Down Expand Up @@ -319,12 +320,11 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */
#define ANYOF_FOLD 0x02
#define ANYOF_LOCALE 0x01

/* Used for regstclass only */
#define ANYOF_EOS 0x10 /* Can match an empty string too */
/* EOS used for regstclass only */
#define ANYOF_EOS 0x10 /* Can match an empty string too */

/* There is a character or a range past 0xff */
#define ANYOF_UNICODE 0x20
#define ANYOF_UNICODE_ALL 0x40 /* Can match any char past 0xff */
#define ANYOF_UNICODE 0x20 /* Matches >= one thing past 0xff */
#define ANYOF_UNICODE_ALL 0x40 /* Matches 0x100 - infinity */

/* Are there any runtime flags on in this node? */
#define ANYOF_RUNTIME(s) (ANYOF_FLAGS(s) & 0x0f)
Expand Down

0 comments on commit bf3f2d8

Please sign in to comment.