| 264 | |
| 265 | |
| 266 | static int match_class (int c, int cl) { |
| 267 | int res; |
| 268 | switch (tolower(cl)) { |
| 269 | case 'a' : res = isalpha(c); break; |
| 270 | case 'c' : res = iscntrl(c); break; |
| 271 | case 'd' : res = isdigit(c); break; |
| 272 | case 'g' : res = isgraph(c); break; |
| 273 | case 'l' : res = islower(c); break; |
| 274 | case 'p' : res = ispunct(c); break; |
| 275 | case 's' : res = isspace(c); break; |
| 276 | case 'u' : res = isupper(c); break; |
| 277 | case 'w' : res = isalnum(c); break; |
| 278 | case 'x' : res = isxdigit(c); break; |
| 279 | case 'z' : res = (c == 0); break; /* deprecated option */ |
| 280 | default: return (cl == c); |
| 281 | } |
| 282 | return (islower(cl) ? res : !res); |
| 283 | } |
| 284 | |
| 285 | |
| 286 | static int matchbracketclass (int c, const char *p, const char *ec) { |
no outgoing calls
no test coverage detected