diff options
Diffstat (limited to 'src/rexp.h')
-rw-r--r-- | src/rexp.h | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -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 |