| 3540 | #endif |
| 3541 | |
| 3542 | AP_DECLARE(int) ap_cstr_casecmp(const char *s1, const char *s2) |
| 3543 | { |
| 3544 | const unsigned char *str1 = (const unsigned char *)s1; |
| 3545 | const unsigned char *str2 = (const unsigned char *)s2; |
| 3546 | for (;;) |
| 3547 | { |
| 3548 | const int c1 = (int)(*str1); |
| 3549 | const int c2 = (int)(*str2); |
| 3550 | const int cmp = ucharmap[c1] - ucharmap[c2]; |
| 3551 | /* Not necessary to test for !c2, this is caught by cmp */ |
| 3552 | if (cmp || !c1) |
| 3553 | return cmp; |
| 3554 | str1++; |
| 3555 | str2++; |
| 3556 | } |
| 3557 | } |
| 3558 | |
| 3559 | AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n) |
| 3560 | { |
no outgoing calls
no test coverage detected