| 919 | } |
| 920 | |
| 921 | int |
| 922 | case_insensitive_comp(const char *s1, const char *s2) |
| 923 | { |
| 924 | uchar u1, u2; |
| 925 | |
| 926 | for (;; s1++, s2++) { |
| 927 | u1 = (uchar) *s1; |
| 928 | if (isupper(u1)) |
| 929 | u1 = (uchar) tolower(u1); |
| 930 | u2 = (uchar) *s2; |
| 931 | if (isupper(u2)) |
| 932 | u2 = (uchar) tolower(u2); |
| 933 | if (u1 == '\0' || u1 != u2) |
| 934 | break; |
| 935 | } |
| 936 | return u1 - u2; |
| 937 | } |
| 938 | |
| 939 | #if defined(MACOS) |
| 940 | #define RETTYPE ssize_t |
no test coverage detected