Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: drow@false.org, gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
Subject: Re: [RFA/libiberty] Fix documentation issues in filename_cmp.c
Date: Wed, 11 Apr 2007 18:28:00 -0000	[thread overview]
Message-ID: <uabxelq94.fsf@gnu.org> (raw)
In-Reply-To: <20070411072615.GB3648@adacore.com> (message from Joel Brobecker 	on Wed, 11 Apr 2007 09:26:15 +0200)

> Date: Wed, 11 Apr 2007 09:26:15 +0200
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: Daniel Jacobowitz <drow@false.org>, gcc-patches@gcc.gnu.org,
> 	gdb-patches@sourceware.org
> 
> > I think we should fold only ASCII characters, since it's consistent
> > with libiberty's strcasecmp.
> 
> If we follow your recommendation, I think the best approach is to
> use strcasecmp after having changed forward slashes into backward
> slashes like I did in my first implementation. That way, we let
> strcasecmp deal with the folding.

That's one way, but, as you point out, it has drawbacks.  So my advice
would be to compare individual characters so that A-Za-z compare
case-insensitively.  A simple macro or inline function should be able
to do this.  For example, if you mask the 5th bit, upper-case and
lower-case ASCII will be the same.


  reply	other threads:[~2007-04-11 18:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 17:27 Joel Brobecker
2007-04-05 18:36 ` DJ Delorie
2007-04-06  6:02   ` Joel Brobecker
2007-04-05 18:44 ` Eli Zaretskii
2007-04-06  6:10   ` Joel Brobecker
2007-04-06  9:05     ` Eli Zaretskii
2007-04-06 10:00       ` Dave Korn
2007-04-07 17:35       ` Daniel Jacobowitz
2007-04-07 17:52         ` Eli Zaretskii
2007-04-11  7:24           ` Joel Brobecker
2007-04-11 18:28             ` Eli Zaretskii [this message]
2007-04-11 20:33               ` Ian Lance Taylor
2007-05-03 15:36                 ` [RFA/libiberty] use TOLOWER instead of tolower " Joel Brobecker
2007-05-03 16:31                   ` Ian Lance Taylor
2007-05-03 23:40                     ` Joel Brobecker
2007-05-04  7:18                   ` Eli Zaretskii
2007-04-11  7:27       ` [RFA/libiberty] Fix documentation issues " Joel Brobecker

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=uabxelq94.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=drow@false.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox