From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3916 invoked by alias); 6 Apr 2007 06:10:53 -0000 Received: (qmail 3828 invoked by uid 22791); 6 Apr 2007 06:10:52 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Apr 2007 07:10:48 +0100 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 9550048CF7B; Fri, 6 Apr 2007 02:10:46 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06412-01-6; Fri, 6 Apr 2007 02:10:46 -0400 (EDT) Received: from joel.gnat.com (unknown [70.71.0.212]) by nile.gnat.com (Postfix) with ESMTP id 4945D48CF79; Fri, 6 Apr 2007 02:10:46 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5AE20E7B43; Thu, 5 Apr 2007 23:12:18 -0700 (PDT) Date: Fri, 06 Apr 2007 06:10:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org Subject: Re: [RFA/libiberty] Fix documentation issues in filename_cmp.c Message-ID: <20070406061218.GB3471@adacore.com> References: <20070405172720.GB9281@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00025.txt.bz2 Eli, > > 2007-04-05 Joel Brobecker > > > > * filename_cmp.c (filename_cmp): Improve documentation. > > Thanks, I am happy, as far as the documentation goes. Am I to understand that you are not happy with the code? You made two comments about the code: 1. Fold multiple consecutive slash/backslash characters into single slash/backslash; To do that without modifying the source filenames, we need to allocate some memory locally to manipulate a copy of that filename. My take on this is that the file names we have seen, at least in the debugging information, have been consistent; and thus this enhancement would end up having no actual effect. I would wait until we come across a case where this is a problem before going that way. This is my opinion, and you may disagree... Note that this new function does pave the way for this sort of enhancement though, and I promise I will not object to a patch that implements your suggestion ;-). 2. The possible introduction of a bug with certain locales because the function used in place of strcasecmp uses tolower. For this one, as I said, I don't know, and I'm not sure where to start looking for the answer. I'll be happy to modify the function body to do it any other way, if someone tells me how. -- Joel