1 #include <regex.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
f()5 static void f()
6 {
7 T(size_t)
8 T(regoff_t)
9 {
10 regex_t x;
11 F(size_t,re_nsub)
12 }
13 {
14 regmatch_t x;
15 F(regoff_t,rm_so)
16 F(regoff_t,rm_eo)
17 }
18 C(REG_EXTENDED)
19 C(REG_ICASE)
20 C(REG_NOSUB)
21 C(REG_NEWLINE)
22 C(REG_NOTBOL)
23 C(REG_NOTEOL)
24 C(REG_NOMATCH)
25 C(REG_BADPAT)
26 C(REG_ECOLLATE)
27 C(REG_ECTYPE)
28 C(REG_EESCAPE)
29 C(REG_ESUBREG)
30 C(REG_EBRACK)
31 C(REG_EPAREN)
32 C(REG_EBRACE)
33 C(REG_BADBR)
34 C(REG_ERANGE)
35 C(REG_ESPACE)
36 C(REG_BADRPT)
37 {int(*p)(regex_t*restrict,const char*restrict,int) = regcomp;}
38 {size_t(*p)(int,const regex_t*restrict,char*restrict,size_t) = regerror;}
39 {int(*p)(const regex_t*restrict,const char*restrict,size_t,regmatch_t[restrict],int) = regexec;}
40 {void(*p)(regex_t*) = regfree;}
41 }
42