all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Francesco Potortì" <pot@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: bug-gnu-emacs@gnu.org, owner@debbugs.gnu.org, 8093@debbugs.gnu.org
Subject: bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
Date: Tue, 22 Feb 2011 11:11:36 +0100	[thread overview]
Message-ID: <E1PrpDU-0002HP-QK@tucano.isti.cnr.it> (raw)
In-Reply-To: <4D6353B4.5010104@cs.ucla.edu>

>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.

Looks reasonable and I see no compatibility issues.  Please install it.

>2011-02-21  Paul Eggert  <eggert@cs.ucla.edu>
>
>	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
>
>
>
>
>
>





  reply	other threads:[~2011-02-22 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  6:12 bug#8093: etags: Downcase drive letters, for consistency with Emacs proper Paul Eggert
2011-02-22 10:11 ` Francesco Potortì [this message]
2011-02-22 17:33   ` Eli Zaretskii
2011-02-22 17:39     ` Paul Eggert
2011-02-22 17:48   ` Glenn Morris
2011-02-22 19:18     ` Francesco Potortì
2011-02-22 22:36       ` Glenn Morris
2011-02-23  8:38         ` Francesco Potortì

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1PrpDU-0002HP-QK@tucano.isti.cnr.it \
    --to=pot@gnu.org \
    --cc=8093@debbugs.gnu.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=owner@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.