137{
138 const char *bt_pattern, *bt_string;
140 char *newp;
142 wchar_t pc, sc;
143 size_t pclen, sclen;
144
145 bt_pattern = bt_string =
NULL;
146 for (;;) {
148 if (pclen == (size_t)-1 || pclen == (size_t)-2)
152 if (sclen == (size_t)-1 || sclen == (size_t)-2) {
153 sc = (
unsigned char)*
string;
154 sclen = 1;
155 memset(&strmbs, 0,
sizeof (strmbs));
156 }
157 switch (pc) {
160 return (0);
162 return (0);
163 goto backtrack;
164 case '?':
168 goto backtrack;
170 (string == stringstart ||
172 goto backtrack;
173 string += sclen;
174 break;
175 case '*':
177
180
182 (string == stringstart ||
184 goto backtrack;
185
186
192 else
193 return (0);
197 break;
198 }
199
200
201
202
203
204
205
206 bt_pattern =
pattern, bt_patmbs = patmbs;
207 bt_string =
string, bt_strmbs = strmbs;
208 break;
209 case '[':
213 goto backtrack;
215 (string == stringstart ||
217 goto backtrack;
218
220 &patmbs)) {
225 break;
227 goto backtrack;
228 }
229 string += sclen;
230 break;
231 case '\\':
234 &patmbs);
235 if (pclen == (size_t)-1 || pclen == (size_t)-2)
237 if (pclen == 0)
240 }
241
242 default:
244 string += sclen;
245 if (pc == sc) {
246 ;
249 ;
250 } else {
251 backtrack:
252
253
254
255
256
257
258 if (bt_pattern ==
NULL)
261 &bt_strmbs);
262 if (sclen == (size_t)-1 ||
263 sclen == (size_t)-2) {
264 sc = (
unsigned char)*bt_string;
265 sclen = 1;
267 sizeof (bt_strmbs));
268 }
273 bt_string += sclen;
274 pattern = bt_pattern, patmbs = bt_patmbs;
275 string = bt_string, strmbs = bt_strmbs;
276 }
277 break;
278 }
279 }
280
281}
_Tp _STLP_CALL norm(const complex< _Tp > &__z)
char * strchr(const char *String, int ch)
static int rangematch(char *pattern, wchar_t test, int flags, char **newp, mbstate_t *patmbs) const