From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#11786: Use c_strcasecmp for portable ASCII case-insensitive comparison Date: Tue, 26 Jun 2012 10:25:17 -0700 Organization: UCLA Computer Science Department Message-ID: <4FE9F07D.7060506@cs.ucla.edu> References: <4FE91370.2090706@cs.ucla.edu> <834npy9i43.fsf@gnu.org> <83y5na827k.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340731572 29488 80.91.229.3 (26 Jun 2012 17:26:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 26 Jun 2012 17:26:12 +0000 (UTC) Cc: 11786@debbugs.gnu.org, dmantipov@yandex.ru, Andreas Schwab To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 26 19:26:11 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SjZWj-00012z-Hw for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jun 2012 19:26:09 +0200 Original-Received: from localhost ([::1]:56236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjZWj-0007uE-Bw for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jun 2012 13:26:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjZWd-0007tw-84 for bug-gnu-emacs@gnu.org; Tue, 26 Jun 2012 13:26:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjZWb-00047Q-Fv for bug-gnu-emacs@gnu.org; Tue, 26 Jun 2012 13:26:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjZWb-000477-Bg for bug-gnu-emacs@gnu.org; Tue, 26 Jun 2012 13:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SjZaU-0001hE-Lq for bug-gnu-emacs@gnu.org; Tue, 26 Jun 2012 13:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jun 2012 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 11786-submit@debbugs.gnu.org id=B11786.13407317656452 (code B ref 11786); Tue, 26 Jun 2012 17:30:02 +0000 Original-Received: (at 11786) by debbugs.gnu.org; 26 Jun 2012 17:29:25 +0000 Original-Received: from localhost ([127.0.0.1]:58848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SjZZs-0001g0-Le for submit@debbugs.gnu.org; Tue, 26 Jun 2012 13:29:24 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:50194) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SjZZp-0001fr-Sr for 11786@debbugs.gnu.org; Tue, 26 Jun 2012 13:29:23 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 1E6B939E80E0; Tue, 26 Jun 2012 10:25:19 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XdR0rzjrui8A; Tue, 26 Jun 2012 10:25:18 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 644A139E800B; Tue, 26 Jun 2012 10:25:18 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: <83y5na827k.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61309 Archived-At: 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.