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#8093: etags: Downcase drive letters, for consistency with Emacs proper. Date: Mon, 21 Feb 2011 22:12:04 -0800 Organization: UCLA Computer Science Department Message-ID: <4D6353B4.5010104@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1298356658 21105 80.91.229.12 (22 Feb 2011 06:37:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Feb 2011 06:37:38 +0000 (UTC) To: 8093@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 22 07:37:34 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Prlrs-0007y6-EY for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 07:37:34 +0100 Original-Received: from localhost ([127.0.0.1]:42171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Prlri-0008Kx-HC for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 01:36:54 -0500 Original-Received: from [140.186.70.92] (port=54843 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrlrX-0008Jy-TE for bug-gnu-emacs@gnu.org; Tue, 22 Feb 2011 01:36:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrlrV-0006WZ-Mo for bug-gnu-emacs@gnu.org; Tue, 22 Feb 2011 01:36:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrlrV-0006WT-LN for bug-gnu-emacs@gnu.org; Tue, 22 Feb 2011 01:36:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PrlUc-00014i-2T; Tue, 22 Feb 2011 01:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Feb 2011 06:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8093 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12983551444083 (code B ref -1); Tue, 22 Feb 2011 06:13:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Feb 2011 06:12:24 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PrlTz-00013n-Ud for submit@debbugs.gnu.org; Tue, 22 Feb 2011 01:12:24 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PrlTx-00013a-Gi for submit@debbugs.gnu.org; Tue, 22 Feb 2011 01:12:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrlTr-0002Y0-Cg for submit@debbugs.gnu.org; Tue, 22 Feb 2011 01:12:16 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:53642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrlTr-0002Xw-Ac for submit@debbugs.gnu.org; Tue, 22 Feb 2011 01:12:15 -0500 Original-Received: from [140.186.70.92] (port=58235 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrlTq-00019F-5e for bug-gnu-emacs@gnu.org; Tue, 22 Feb 2011 01:12:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrlTo-0002Xk-VS for bug-gnu-emacs@gnu.org; Tue, 22 Feb 2011 01:12:14 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:33050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrlTo-0002Xg-On for bug-gnu-emacs@gnu.org; Tue, 22 Feb 2011 01:12:12 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D1D4339E80F2 for ; Mon, 21 Feb 2011 22:12:11 -0800 (PST) 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 XiNELsqAktun for ; Mon, 21 Feb 2011 22:12:11 -0800 (PST) Original-Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2762B39E80DB for ; Mon, 21 Feb 2011 22:12:11 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 22 Feb 2011 01:13:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:44293 Archived-At: Emacs downcases drive letters when canonicalizing file names on Microsoft Windows, but etags upcases them. etags should be consistent with Emacs. I found this problem by code inspection, because there's a macro 'upcase' that normally isn't used in etags.c; its only use is in the section of code that upcases drive letters. Here's a proposed patch. 2011-02-21 Paul Eggert etags: Downcase drive letters, for consistency with Emacs proper. * etags.c (upcase): Remove; no longer used. (canonicalize_filename): Downcase drive letters. --- lib-src/etags.c 2011-02-21 16:47:08.883947000 -0800 +++ /u/cs/fac/eggert/junk/etags.c 2011-02-21 21:21:04.074974000 -0800 @@ -239,7 +239,6 @@ If you want regular expression support, #define ISLOWER(c) islower (CHAR(c)) #define lowcase(c) tolower (CHAR(c)) -#define upcase(c) toupper (CHAR(c)) /* @@ -6638,7 +6637,7 @@ filename_is_absolute (char *fn) ); } -/* Upcase DOS drive letter and collapse separators into single slashes. +/* Downcase DOS drive letter and collapse separators into single slashes. Works in place. */ static void canonicalize_filename (register char *fn) @@ -6648,8 +6647,8 @@ canonicalize_filename (register char *fn #ifdef DOS_NT /* Canonicalize drive letter case. */ - if (fn[0] != '\0' && fn[1] == ':' && ISLOWER (fn[0])) - fn[0] = upcase (fn[0]); + if (fn[0] != '\0' && fn[1] == ':' && ISUPPER (fn[0])) + fn[0] = downcase (fn[0]); sep = '\\'; #endif