Case insensitive string comparison, doesn't consider two NULL pointers equal though */
| 131 | |
| 132 | /* Case insensitive string comparison, doesn't consider two NULL pointers equal though */ |
| 133 | static int case_insensitive_strcmp(const unsigned char *string1, const unsigned char *string2) |
| 134 | { |
| 135 | if ((string1 == NULL) || (string2 == NULL)) |
| 136 | { |
| 137 | return 1; |
| 138 | } |
| 139 | |
| 140 | if (string1 == string2) |
| 141 | { |
| 142 | return 0; |
| 143 | } |
| 144 | |
| 145 | for(; tolower(*string1) == tolower(*string2); (void)string1++, string2++) |
| 146 | { |
| 147 | if (*string1 == '\0') |
| 148 | { |
| 149 | return 0; |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | return tolower(*string1) - tolower(*string2); |
| 154 | } |
| 155 | |
| 156 | typedef struct internal_hooks |
| 157 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…