summaryrefslogtreecommitdiff
path: root/src/rexp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rexp.h')
-rw-r--r--src/rexp.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/rexp.h b/src/rexp.h
index 04d1bb6..98d685f 100644
--- a/src/rexp.h
+++ b/src/rexp.h
@@ -33,18 +33,23 @@
/* ---------------------------------------- INTERFACES
*/
+typedef void *RE_Expression;
-typedef enum
- {
- RE_Found,
- RE_NotFound,
- RE_BadExpression,
- } RExpStatus;
+
+/* Compile a regular expression for use. Returns NULL if the expression
+ cannot be compiled.
+*/
+RE_Expression RECompile(const char *regexpr);
+
+
+/* Search string for regexpr. Returns TRUE for match.
+*/
+int RESearch(const RE_Expression re, const char *string);
-/* Search string for regexpr
+/* Free a regular expression
*/
-RExpStatus RExpSearch(const char *regexpr, const char *string);
+void REFree(RE_Expression re);
#endif