RELEASE/1.0RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Line | |
---|
1 | /* portable case insensitive string compare */ |
---|
2 | /* Copyright (C) Olly Betts 1994,1999 */ |
---|
3 | |
---|
4 | #include <ctype.h> |
---|
5 | |
---|
6 | /* What about top bit set chars? */ |
---|
7 | int strcasecmp(const char *s1, const char *s2) { |
---|
8 | register c1, c2; |
---|
9 | do { |
---|
10 | c1 = *s1++; |
---|
11 | c2 = *s2++; |
---|
12 | } while (c1 && toupper(c1) != toupper(c2)); |
---|
13 | /* now calculate real difference */ |
---|
14 | return c1 - c2; |
---|
15 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.