aboutsummaryrefslogtreecommitdiffstats
path: root/regex.h
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-01-10 04:55:06 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-01-10 04:55:06 +0000
commit31d84e0083f0ee9ef6fea93ac85e537cf1688ca7 (patch)
tree54a0d08accf6728d193902418db7a2bfec23859f /regex.h
parent[w3m-dev 02810] (diff)
downloadw3m-31d84e0083f0ee9ef6fea93ac85e537cf1688ca7.tar.gz
w3m-31d84e0083f0ee9ef6fea93ac85e537cf1688ca7.zip
[w3m-dev 02811] new regexp implementation
From: aito@fw.ipsj.or.jp
Diffstat (limited to '')
-rw-r--r--regex.h35
1 files changed, 8 insertions, 27 deletions
diff --git a/regex.h b/regex.h
index 5a8d986..46442b4 100644
--- a/regex.h
+++ b/regex.h
@@ -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;