| 48 | */ |
| 49 | |
| 50 | static int cJSON_strcasecmp(const char *s1, const char *s2) |
| 51 | { |
| 52 | if (!s1) |
| 53 | return (s1 == s2) ? 0 : 1; |
| 54 | if (!s2) |
| 55 | return 1; |
| 56 | for (; tolower(*s1) == tolower(*s2); ++s1, ++s2) |
| 57 | if (*s1 == 0) |
| 58 | return 0; |
| 59 | return tolower(*(const unsigned char *)s1) |
| 60 | - tolower(*(const unsigned char *)s2); |
| 61 | } |
| 62 | |
| 63 | static void *(*cJSON_malloc)(size_t sz) = malloc; |
| 64 | static void (*cJSON_free)(void *ptr) = free; |
no outgoing calls
no test coverage detected