filetype: Set "groovy" for Jenkinsfile
[vis.git] / text-regex.h
blobdd87c1cb41093ae25ddb4af336c28cf7eaa49b14
1 #ifndef TEXT_REGEX_H
2 #define TEXT_REGEX_H
4 /* make the REG_* constants available */
5 #if CONFIG_TRE
6 #include <tre/tre.h>
7 #else
8 #include <regex.h>
9 #endif
10 #include "text.h"
12 #define MAX_REGEX_SUB 10
14 typedef struct Regex Regex;
15 typedef Filerange RegexMatch;
17 Regex *text_regex_new(void);
18 int text_regex_compile(Regex*, const char *pattern, int cflags);
19 size_t text_regex_nsub(Regex*);
20 void text_regex_free(Regex*);
21 int text_regex_match(Regex*, const char *data, int eflags);
22 int text_search_range_forward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
23 int text_search_range_backward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
25 #endif