Mercurial > hg > th-libs
comparison th_regex.h @ 651:18fe45e61b2b
Moar re-work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 25 Jan 2020 13:13:37 +0200 |
parents | b897995101b7 |
children | 38a9302962f7 |
comparison
equal
deleted
inserted
replaced
650:24cbab6e88c6 | 651:18fe45e61b2b |
---|---|
10 #ifndef TH_REGEX_H | 10 #ifndef TH_REGEX_H |
11 #define TH_REGEX_H | 11 #define TH_REGEX_H |
12 | 12 |
13 #include "th_types.h" | 13 #include "th_types.h" |
14 #include "th_datastruct.h" | 14 #include "th_datastruct.h" |
15 #include "th_ioctx.h" | |
15 | 16 |
16 | 17 |
17 #ifdef __cplusplus | 18 #ifdef __cplusplus |
18 extern "C" { | 19 extern "C" { |
19 #endif | 20 #endif |
48 TH_REF_ANCHORED = 0x0002, | 49 TH_REF_ANCHORED = 0x0002, |
49 }; | 50 }; |
50 | 51 |
51 | 52 |
52 #ifdef TH_EXPERIMENTAL_REGEX_DEBUG | 53 #ifdef TH_EXPERIMENTAL_REGEX_DEBUG |
53 extern BOOL th_dbg_re_flags; | 54 extern th_ioctx *th_dbg_fh; |
54 #endif | 55 #endif |
55 | 56 |
56 | 57 |
57 // | 58 // |
58 // Functions | 59 // Functions |
59 // | 60 // |
60 int th_regex_compile(th_regex_t **pexpr, const th_regex_char_t *pattern); | 61 int th_regex_compile(th_regex_t **pexpr, const th_regex_char_t *pattern); |
61 void th_regex_free(th_regex_t *expr); | 62 void th_regex_free(th_regex_t *expr); |
62 void th_regex_dump(FILE *fh, const int level, const th_regex_t *expr); | 63 void th_regex_dump(th_ioctx *fh, const int level, const th_regex_t *expr); |
63 | 64 |
64 int th_regex_match(const th_regex_t *expr, const th_regex_char_t *haystack, | 65 int th_regex_match(const th_regex_t *expr, const th_regex_char_t *haystack, |
65 size_t *pnmatches, th_regex_match_t **pmatches, const size_t maxmatches, | 66 size_t *pnmatches, th_regex_match_t **pmatches, const size_t maxmatches, |
66 const int flags); | 67 const int flags); |
67 | 68 |