| 3557 | } |
| 3558 | |
| 3559 | AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n) |
| 3560 | { |
| 3561 | const unsigned char *str1 = (const unsigned char *)s1; |
| 3562 | const unsigned char *str2 = (const unsigned char *)s2; |
| 3563 | while (n--) |
| 3564 | { |
| 3565 | const int c1 = (int)(*str1); |
| 3566 | const int c2 = (int)(*str2); |
| 3567 | const int cmp = ucharmap[c1] - ucharmap[c2]; |
| 3568 | /* Not necessary to test for !c2, this is caught by cmp */ |
| 3569 | if (cmp || !c1) |
| 3570 | return cmp; |
| 3571 | str1++; |
| 3572 | str2++; |
| 3573 | } |
| 3574 | return 0; |
| 3575 | } |
| 3576 | |
| 3577 | typedef struct { |
| 3578 | const char *fname; |
no outgoing calls
no test coverage detected