4223
|
1 #ifndef RE_H_
|
|
2 #define RE_H_
|
|
3
|
|
4 #include "config.h"
|
|
5 #include "IO.h"
|
|
6 #include "Str.h"
|
|
7
|
|
8 #include <stddef.h>
|
|
9 #include <stdio.h>
|
|
10
|
|
11 typedef struct my_regex t_regex;
|
|
12
|
|
13 void re_init(void);
|
|
14 void re_end(void);
|
|
15
|
|
16 t_regex *re_compile(const String *);
|
|
17 void re_free(t_regex *);
|
|
18 t_regex *re_dup(t_regex *);
|
|
19
|
|
20 ATTR_PURE
|
|
21 int re_match(t_regex *, const String *, size_t *, size_t *);
|
|
22 int re_iomatch(t_regex *, IO *, size_t *, size_t *);
|
|
23
|
|
24 ATTR_PURE
|
|
25 size_t re_cabra(const t_regex *);
|
|
26 int re_backref(const t_regex *, size_t, size_t *, size_t *);
|
|
27
|
|
28 void re_dump(const t_regex *, FILE *);
|
|
29 void re_decompile(const t_regex *, String *);
|
|
30
|
|
31 #endif /* RE_H_ */
|