X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=libs%2Fmikmod%2Fposix%2Fstrcasecmp.c;fp=libs%2Fmikmod%2Fposix%2Fstrcasecmp.c;h=5b9935f3b41a6bfa8239a9440071c2fe9cd9a64b;hp=0000000000000000000000000000000000000000;hb=cf94899f4f4d8535074db6421245b973d2fcde8c;hpb=8024ae981f39d370af5cceb3cb97f62820b0a120 diff --git a/libs/mikmod/posix/strcasecmp.c b/libs/mikmod/posix/strcasecmp.c new file mode 100644 index 0000000..5b9935f --- /dev/null +++ b/libs/mikmod/posix/strcasecmp.c @@ -0,0 +1,23 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mikmod_internals.h" +#include "mikmod_ctype.h" + +int _mm_strcasecmp(const char *__s1, const char *__s2) +{ + const char *p1 = __s1; + const char *p2 = __s2; + char c1, c2; + + if (p1 == p2) return 0; + + do { + c1 = mik_tolower(*p1++); + c2 = mik_tolower(*p2++); + if (c1 == '\0') break; + } while (c1 == c2); + + return (int)(c1 - c2); +}