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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Antipov <dmantipov <at> yandex.ru>
Cc: 11786 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: bug#11786: Use c_strcasecmp for portable ASCII case-insensitive comparison
Date: Tue, 26 Jun 2012 20:16:25 +0300
> Date: Tue, 26 Jun 2012 21:04:24 +0400
> From: Dmitry Antipov <dmantipov <at> yandex.ru>
> CC: Paul Eggert <eggert <at> cs.ucla.edu>, 11786 <at> debbugs.gnu.org
> 
> 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).

Thanks for the explanation.

I was talking only about xtrcasecmp, defined on xfaces.c.  lwlib.c can
use it, if we want.  As for etags, I don't care much, but pulling in
another bunch of gnulib modules just for its sake sounds gross to me.

> I assumed that these library functions, if available, should work
> correctly regardless from the locale on any non-ancient system.

It's actually the other way around: to DTRT, these library functions
_must_ be locale-dependent, because the collation sequence might be
different in each locale, even for locales that use the same Latin
characters.

> If that is not true, gnulib module may be a workaround.

We already had a workaround for that, so I see no reason to use that
of gnulib.




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.