GNU bug report logs -
#11786
Use c_strcasecmp for portable ASCII case-insensitive comparison
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Tue, 26 Jun 2012 01:47:08 UTC
Severity: normal
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 06/26/2012 08:02 PM, Eli Zaretskii wrote:
> First, until revision 108735, committed yesterday by Dmitry, we didn't
> use strcasecmp or strncasecmp (except in the NS port, which looks like
> an oversight). We used xtrcasecmp, whose only dependence on the
> locale is the tolower function/macro. Then Dmitry replaced
> xstrcasecmp with strcasecmp for those platforms that have it (which I
> think means all the supported platforms), for reasons that AFAIK were
> never discussed. Why was that done?
It was an attempt to get rid from the zoo of strcase(n)cmp implementations
(one in etags.c, one in lwlib.c and next one in xfaces.c). I assumed that
these library functions, if available, should work correctly regardless
from the locale on any non-ancient system. If that is not true, gnulib
module may be a workaround.
Dmitry
This bug report was last modified 13 years and 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.