From 221b78e4e2c057a3494618e2dfbd2f2b1f1ffe01 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 22 Feb 2012 03:45:44 +0100 Subject: DEVTOOLS: Copy scumm_stricmp implementation to create_kyradat. This should fix bug #3489654 "DEVTOOLS: create_kyradat linkerror". --- devtools/create_kyradat/util.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'devtools/create_kyradat/util.cpp') 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; -- cgit v1.2.3