GNU bug report logs - #11786
Use c_strcasecmp for portable ASCII case-insensitive comparison

Previous Next

Package: emacs;

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


Message #26 received at 11786 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11786 <at> debbugs.gnu.org, dmantipov <at> yandex.ru,
	Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#11786: Use c_strcasecmp for portable ASCII case-insensitive
	comparison
Date: Tue, 26 Jun 2012 10:25:17 -0700
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.




This bug report was last modified 12 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.