2 * scratch implementation of strcasecmp(),
3 * in case your C library doesn't have it
5 * For license terms, see the file COPYING in this directory.
9 strcasecmp(char *s1, char *s2)
11 while (toupper(*s1) == toupper(*s2++))
14 return(toupper(*s1) - toupper(*--s2));
17 strncasecmp(char *s1, char *s2, register int n)
19 while (--n >= 0 && toupper(*s1) == toupper(*s2++))
20 if (toupper(*s1++) == '\0')
22 return(n < 0 ? 0 : toupper(*s1) - toupper(*--s2));