10 struct re_pattern_buffer regex;
11 struct re_registers regs;
16 memset (®ex, '\0', sizeof (regex));
18 setlocale (LC_ALL, "de_DE.ISO-8859-1");
21 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_DEBUG);
24 setlocale (LC_ALL, "C");
25 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
28 puts ("re_compile_pattern return non-NULL value");
33 match = re_match (®ex, "an", 2, 0, ®s);
36 printf ("re_match returned %d, expected 2\n", match);
43 puts ("in C.UTF-8 locale");
44 setlocale (LC_ALL, "C.UTF-8");
45 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
48 puts ("re_compile_pattern return non-NULL value");
53 match = re_match (®ex, "an", 2, 0, ®s);
56 printf ("re_match returned %d, expected 2\n", match);
63 puts ("in de_DE.ISO-8859-1 locale");
64 setlocale (LC_ALL, "de_DE.ISO-8859-1");
65 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
68 puts ("re_compile_pattern return non-NULL value");
73 match = re_match (®ex, "an", 2, 0, ®s);
76 printf ("re_match returned %d, expected 2\n", match);