public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: Eli Zaretskii <eliz@elta.co.il>,
	ezannoni@redhat.com, gdb@sources.redhat.com
Subject: Re: charset.c problem with non-en_US locales
Date: Thu, 24 Apr 2003 02:35:00 -0000	[thread overview]
Message-ID: <vt2u1cok4aq.fsf@zenia.red-bean.com> (raw)
In-Reply-To: <3EA6ED61.1000900@redhat.com>


Andrew Cagney <ac131313@redhat.com> writes:
> Hmm,
> 
> 	(gdb) set charset <tab>
> 
> doesn't work.  If that was fixed (using GDB's enum cli method), the
> command would become case sensitive.  Since GDB's CLI is case
> sensative in general that would make sense.

Actually, the CLI is inconsistent:

    zenia:jimb$ gdb
    GNU gdb 2003-04-17-cvs
    Copyright 2003 Free Software Foundation, Inc.
    ...
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i686-pc-linux-gnu".
    (gdb) print 0
    $1 = 0
    (gdb) PRINT 0
    $2 = 0
    (gdb) PrInT 0
    $3 = 0
    (gdb)

I would assume that the following code in cli-decode.c:lookup_cmd_1
would have the same problems as the charset stuff in a Turkish locale:

  /* 
     ** We didn't find the command in the entered case, so lower case it
     ** and search again.
   */
  if (!found || nfound == 0)
    {
      for (tmp = 0; tmp < len; tmp++)
	{
	  char x = command[tmp];
	  command[tmp] = isupper (x) ? tolower (x) : x;
	}
      found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
    }

It seems to me that:
- cli-decode.c should use safe-charset.h,
- the enum code in cli-setshow.c should be changed to be
  case-insensitive, using safe-charset.h, and
- charset.c should be changed to use an enum, for completion's sake.

  reply	other threads:[~2003-04-24  2:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22 19:59 Elena Zannoni
2003-04-23  9:45 ` Eli Zaretskii
2003-04-23 17:00   ` H. J. Lu
2003-04-23 19:45   ` Andrew Cagney
2003-04-24  2:35     ` Jim Blandy [this message]
2003-04-24 20:07       ` Elena Zannoni
2003-04-24 20:26       ` Andrew Cagney

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=vt2u1cok4aq.fsf@zenia.red-bean.com \
    --to=jimb@redhat.com \
    --cc=ac131313@redhat.com \
    --cc=eliz@elta.co.il \
    --cc=ezannoni@redhat.com \
    --cc=gdb@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).