Re: g_strncasecmp in glib



Quoting Phil Schwan (pschwan@cmu.edu):

> > > 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().
> Hrm, ok.  Same argument patterns, I presume?

Yes.

> > >[...]
> > > +  /* 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.
>[...]
> As for doing the G_TOLOWER_IS_BROKEN stuff, I suppose that will
> involve me writing an autoconf macro too, huh? :)

Yep.

--
Dipl. Inf. (FH) Aaron "Optimizer" Digulla     Assistent im BIKS Labor, FB WI
"(to) optimize: Make a program faster by      FH Konstanz, Brauneggerstr. 55
improving the algorithms rather than by       Tel:+49-7531-206-514
buying a faster machine."                     EMail: digulla@fh-konstanz.de



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]