single: include tools vis-{clipboard,complete,menu,open}
[vis.git] / text-regex.h
blob1b2c3828f350d0eebd84507b3ebe947d40485a2d
1 #ifndef TEXT_REGEX_H
2 #define TEXT_REGEX_H
4 #include <regex.h>
5 #include "text.h"
7 typedef struct Regex Regex;
8 typedef Filerange RegexMatch;
10 Regex *text_regex_new(void);
11 int text_regex_compile(Regex*, const char *pattern, int cflags);
12 size_t text_regex_nsub(Regex*);
13 void text_regex_free(Regex*);
14 int text_regex_match(Regex*, const char *data, int eflags);
15 int text_search_range_forward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
16 int text_search_range_backward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
18 #endif