diff options
Diffstat (limited to 'regex.h')
-rw-r--r-- | regex.h | 35 |
1 files changed, 8 insertions, 27 deletions
@@ -1,44 +1,25 @@ -/* $Id: regex.h,v 1.3 2001/11/24 02:01:26 ukai Exp $ */ +/* $Id: regex.h,v 1.4 2002/01/10 04:55:07 ukai Exp $ */ #define REGEX_MAX 64 #define STORAGE_MAX 256 -#ifndef NULL -#define NULL 0 -#endif /* not NULL */ - -#define RE_NORMAL 0 -#define RE_MATCHMODE 0x07 -#define RE_ANY 0x01 -#define RE_WHICH 0x02 -#define RE_EXCEPT 0x04 -#define RE_ANYTIME 0x08 -#define RE_BEGIN 0x10 -#define RE_END 0x20 -#define RE_IGNCASE 0x40 -#define RE_ENDMARK 0x80 typedef unsigned short longchar; - -typedef struct { - - longchar *pattern; - +typedef struct regexchar { + union { + longchar *pattern; + struct regex *sub; + } p; unsigned char mode; - } regexchar; -typedef struct { - +typedef struct regex { regexchar re[REGEX_MAX]; - longchar storage[STORAGE_MAX]; - char *position; - char *lposition; - + struct regex *alt_regex; } Regex; |