static int strnicmp(const char *s1, const char *s2, int len)
{
/* Yes, Virginia, it had better be unsigned */
unsigned char c1, c2;
while (len) {
c1 = *s1;
s1++;
c2 = *s2;
s2++;
if (c1 != c2) {
c1 = tolower(c1);
c2 = tolower(c2);
if (c1 != c2)
return c1 < c2 ? -1 : 1;
}
if (!c1) return 0;
len--;
}
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html