|
From: | Dmitry Antipov |
Subject: | bug#11786: Use c_strcasecmp for portable ASCII case-insensitive comparison |
Date: | Tue, 26 Jun 2012 21:04:24 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |