Update version info for release v4.6.1 (#2122)
[WRF.git] / var / da / makedepf90-2.8.8 / strcasecmp.c
blob087831d38b9b629ed68af597b63825f053c17840
1 #include <ctype.h>
3 int strcasecmp (const char *s1, const char *s2)
4 /*
5 * Use in case no 'strcasecmp' is found in libc on the system
6 */
8 int diff;
10 while (*s1 && *s2) {
11 if ((diff = (int) tolower(*s1) - (int) tolower(*s2)) != 0)
12 return diff;
13 s1++;
14 s2++;
17 if (*s1 == '\0' && *s2 == '\0')
18 return 0;
19 else if (*s1 == '\0')
20 return -1;
21 else
22 return 1;