Mail Archives: cygwin-developers/1998/11/30/19:02:04
Christopher Faylor wrote:
> That is almost what is happening now except for the tolower case. Hmm.
> I just checked this behavior on Linux and it appears that I was just
> misinterpreting what was going on here. Linux apparently does compare
> a non-alpha character to the lowercased character. That's all it
> does. So, my change was actually wrong.
DJGPP compares the tolower()d characters (strcasecmp is a stub that
chains to stricmp). Nobody has complained yet :-)
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/stubs.h>
#include <string.h>
#include <ctype.h>
int
stricmp(const char *s1, const char *s2)
{
while (tolower(*s1) == tolower(*s2))
{
if (*s1 == 0)
return 0;
s1++;
s2++;
}
return (int)tolower(*s1) - (int)tolower(*s2);
}
- Raw text -