mirror of
https://github.com/fadden/nulib2.git
synced 2024-12-27 17:29:57 +00:00
Don't "cheat" and use Nu_strcasecmp(), since it's not part of the formal
export list.
This commit is contained in:
parent
321392dbba
commit
b5c3d4e358
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user