[PATCH] briq_panel: read() and write() get __user pointers, damnit
[linux-2.6/verdex.git] / arch / powerpc / lib / strcase.c
blobf8ec1eba3fdde5c081cbfa042a2b2a96cec843aa
1 #include <linux/types.h>
2 #include <linux/ctype.h>
3 #include <linux/string.h>
5 int strcasecmp(const char *s1, const char *s2)
7 int c1, c2;
9 do {
10 c1 = tolower(*s1++);
11 c2 = tolower(*s2++);
12 } while (c1 == c2 && c1 != 0);
13 return c1 - c2;
16 int strncasecmp(const char *s1, const char *s2, size_t n)
18 int c1, c2;
20 do {
21 c1 = tolower(*s1++);
22 c2 = tolower(*s2++);
23 } while ((--n > 0) && c1 == c2 && c1 != 0);
24 return c1 - c2;