From b5c3d4e358883b498e5ef33107c117f34652d137 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 6 Dec 2002 00:49:22 +0000 Subject: [PATCH] Don't "cheat" and use Nu_strcasecmp(), since it's not part of the formal export list. --- nufxlib-0/samples/ImgConv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nufxlib-0/samples/ImgConv.c b/nufxlib-0/samples/ImgConv.c index 3520e8f..a97f824 100644 --- a/nufxlib-0/samples/ImgConv.c +++ b/nufxlib-0/samples/ImgConv.c @@ -15,10 +15,14 @@ #include "NufxLib.h" #include "Common.h" -/* we can get this out of NufxLib if the OS doesn't have it */ #ifndef HAVE_STRCASECMP -#define strcasecmp Nu_strcasecmp -int Nu_strcasecmp(const char *s1, const char *s2); +static int +strcasecmp(const char *str1, const char *str2) +{ + while (*str1 && *str2 && toupper(*str1) == toupper(*str2)) + str1++, str2++; + return (toupper(*str1) - toupper(*str2)); +} #endif