| 280 | |
| 281 | |
| 282 | static int match_class (int c, int cl) { |
| 283 | int res; |
| 284 | switch (tolower(cl)) { |
| 285 | case 'a' : res = isalpha(c); break; |
| 286 | case 'c' : res = iscntrl(c); break; |
| 287 | case 'd' : res = isdigit(c); break; |
| 288 | case 'g' : res = isgraph(c); break; |
| 289 | case 'l' : res = islower(c); break; |
| 290 | case 'p' : res = ispunct(c); break; |
| 291 | case 's' : res = isspace(c); break; |
| 292 | case 'u' : res = isupper(c); break; |
| 293 | case 'w' : res = isalnum(c); break; |
| 294 | case 'x' : res = isxdigit(c); break; |
| 295 | case 'z' : res = (c == 0); break; /* deprecated option */ |
| 296 | default: return (cl == c); |
| 297 | } |
| 298 | return (islower(cl) ? res : !res); |
| 299 | } |
| 300 | |
| 301 | |
| 302 | static int matchbracketclass (int c, const char *p, const char *ec) { |
no outgoing calls
no test coverage detected