Re: g_strncasecmp in glib
- From: Aaron Digulla <digulla wi-pc44 fh-konstanz de>
- To: gtk-devel-list redhat com
- Subject: Re: g_strncasecmp in glib
- Date: Thu, 5 Nov 1998 11:01:28 +0100
Quoting Phil Schwan (pschwan@cmu.edu):
> Does anyone mind if I commit this patch? Is there some reason that
> I'm not aware of that there's not already a g_strncasecmp?
>[...]
> +#ifdef HAVE_STRNCASECMP
> + return strncasecmp (s1, s2, n);
> +#else
Just a sidenote: I have seen strnicmp() instead of strncasecmp().
>[...]
> + /* According to A. Cox, some platforms have islower's that
> + * don't work right on non-uppercase
> + */
> + c1 = isupper ((guchar)*s1) ? tolower ((guchar)*s1) : *s1;
> + c2 = isupper ((guchar)*s2) ? tolower ((guchar)*s2) : *s2;
Huh ? This comment doesn't make much sense. Shouldn't that be
"... have tolower's that" ?
Also, I would put that into #ifdef G_TOLOWER_IS_BROKEN.
--
Aaron "Optimizer" Digulla Team AMIGA AROS Head of Development
Author of XDME, ResTrackLib, CInt. <http://www.aros.org/>
"(to) optimize: Make a program faster by improving the algorithms rather than
by buying a faster machine."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]