summaryrefslogtreecommitdiff
path: root/re.h
diff options
context:
space:
mode:
Diffstat (limited to 're.h')
-rw-r--r--re.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/re.h b/re.h
index e26d325..aa38fbf 100644
--- a/re.h
+++ b/re.h
@@ -18,10 +18,19 @@
#include <stdio.h>
#include "regex.h"
-typedef struct Regexp {
- struct re_pattern_buffer pat;
- struct re_registers regs;
-} Regexp;
+
+typedef struct re_pattern_buffer Regexp;
+
+struct match {
+ UINT len;
+ char *ptr;
+ struct re_registers regs;
+};
+
+extern struct match last_match;
+
+#define BEG(no) last_match.regs.beg[no]
+#define END(no) last_match.regs.end[no]
VALUE re_regcomp();
VALUE re_regsub();