bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#11786: Use c_strcasecmp for portable ASCII case-insensitive comparis


From: Paul Eggert
Subject: bug#11786: Use c_strcasecmp for portable ASCII case-insensitive comparison
Date: Tue, 26 Jun 2012 10:25:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/26/2012 09:31 AM, Eli Zaretskii wrote:
> I think having a custom replacement for tolower, perhaps using
> the code of c_tolower from gnulib or its equivalent, will resolve
> this.

Yes, that's right, and that's why Emacs should use
gnulib c_strcasecmp.  c_strcasecmp does what
you're saying (it uses c_tolower), and it's
off-the-shelf code, so it means Emacs can get rid of
etags_strcasecmp, lwlib_strcasecmp, and xstrcasecmp
(all of which do essentially the same thing).  This
shrinks and simplifies the source code of Emacs proper.

This change was prompted by Dmitry's recent change to use
strcasecmp.  That change simplified Emacs
but introduced portability problems.  This new change
further simplifies Emacs proper and also fixes
portability problems.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]