Commit | Line | Data |
---|---|---|
dc0d77d7 CE |
1 | #include "case.h" |
2 | ||
3 | int case_diffs(register const char *s,register const char *t) | |
4 | { | |
5 | register unsigned char x; | |
6 | register unsigned char y; | |
7 | ||
8 | for (;;) { | |
9 | x = *s++ - 'A'; | |
10 | if (x <= 'Z' - 'A') x += 'a'; else x += 'A'; | |
11 | y = *t++ - 'A'; | |
12 | if (y <= 'Z' - 'A') y += 'a'; else y += 'A'; | |
13 | if (x != y) break; | |
14 | if (!x) break; | |
15 | } | |
16 | return ((int)(unsigned int) x) - ((int)(unsigned int) y); | |
17 | } |