]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - gnu/lib/libregex/regex.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / gnu / lib / libregex / regex.h
1 /* $FreeBSD$ */
2 #ifndef _REGEX_H
3
4 #ifndef __USE_GNU
5 #define __USE_GNU
6 #endif
7
8 #include <posix/regex.h>
9
10 /* Document internal interfaces.  */
11 extern reg_syntax_t __re_set_syntax (reg_syntax_t __syntax);
12
13 extern const char *__re_compile_pattern (const char *__pattern, size_t __length,
14                                         struct re_pattern_buffer *__buffer);
15
16 extern int __re_compile_fastmap (struct re_pattern_buffer *__buffer);
17
18 extern int __re_search (struct re_pattern_buffer *__buffer, const char *__string,
19                        int __length, int __start, int __range,
20                        struct re_registers *__regs);
21
22 extern int __re_search_2 (struct re_pattern_buffer *__buffer,
23                          const char *__string1, int __length1,
24                          const char *__string2, int __length2, int __start,
25                          int __range, struct re_registers *__regs, int __stop);
26
27 extern int __re_match (struct re_pattern_buffer *__buffer, const char *__string,
28                       int __length, int __start, struct re_registers *__regs);
29
30 extern int __re_match_2 (struct re_pattern_buffer *__buffer,
31                         const char *__string1, int __length1,
32                         const char *__string2, int __length2, int __start,
33                         struct re_registers *__regs, int __stop);
34
35 extern void __re_set_registers (struct re_pattern_buffer *__buffer,
36                                struct re_registers *__regs,
37                                unsigned int __num_regs,
38                                regoff_t *__starts, regoff_t *__ends);
39
40 extern int __regcomp (regex_t *__restrict __preg,
41                      const char *__restrict __pattern,
42                      int __cflags);
43
44 extern int __regexec (const regex_t *__restrict __preg,
45                      const char *__restrict __string, size_t __nmatch,
46                      regmatch_t __pmatch[__restrict_arr],
47                      int __eflags);
48
49 extern size_t __regerror (int __errcode, const regex_t *__restrict __preg,
50                          char *__restrict __errbuf, size_t __errbuf_size);
51
52 extern void __regfree (regex_t *__preg);
53
54 #endif  /* _REGEX_H */