diff options
author | Matthew Hoops | 2012-03-20 14:18:57 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-03-20 14:49:16 -0400 |
commit | 71756bdf4eae5ba9cc3f329b85e894f04640aaef (patch) | |
tree | 40d464262da107ab5eed82f198685209161ebac1 /devtools/create_kyradat/util.cpp | |
parent | 03eba05b09e5c9e5a351f8111185934b92a3fed3 (diff) | |
parent | 3c3576a224b92c703b4e8ea20008ac8a069980dd (diff) | |
download | scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.gz scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.bz2 scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'devtools/create_kyradat/util.cpp')
-rw-r--r-- | devtools/create_kyradat/util.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/devtools/create_kyradat/util.cpp b/devtools/create_kyradat/util.cpp index 2420f44168..5ce8237b85 100644 --- a/devtools/create_kyradat/util.cpp +++ b/devtools/create_kyradat/util.cpp @@ -54,6 +54,19 @@ void warning(const char *s, ...) { fprintf(stderr, "WARNING: %s!\n", buf); } +int scumm_stricmp(const char *s1, const char *s2) { + byte l1, l2; + do { + // Don't use ++ inside tolower, in case the macro uses its + // arguments more than once. + l1 = (byte)*s1++; + l1 = tolower(l1); + l2 = (byte)*s2++; + l2 = tolower(l2); + } while (l1 == l2 && l1 != 0); + return l1 - l2; +} + void debug(int level, const char *s, ...) { char buf[1024]; va_list va; |