[PATCH] language support: case sensitivity

David Taylor taylor@cygnus.com
Thu Aug 3 07:45:00 GMT 2000


    Date: Wed, 2 Aug 2000 09:55:23 -0700 (PDT)
    From: Jimmy Guo <guo@cup.hp.com>

    I don't quite understand yet the need for having a new show command
    routine ... command.c (do_setshow_command) seems to be the one that
    handle the normal output of settings.  Also, show_language_command
    has similar setup as show_case_command ().  Do you have an example on
    the kind of behavior you'd like to see but not supported currently by
    this patch?

    - Jimmy Guo, guo@cup.hp.com

You added two commands:

  set case-sensitivity
  show case-sensitivity

And if the user types "show case-sensitivity", nothing will print
unless the sensitivity differs from that of the current language.  I
feel that if the user *ASKED* to be shown the case sensitivity, then
the user should be *SHOWN* the case sensitivity.  If the user
explicitily asks what it is, then it should not be silent.

So, you could have the command "show case-sensitivity" print something like:

  Case sensitivity is on.
  warning: current language, fortran, is case insensitive.

Where the first line is printed by a new function (to be called when
the user types "show case-sensitivity"), and the second line is
printed by the function (renamed) that currently implements "show
case-sensitivity".

[...]
    >Your new function show_case_command plays double duty -- it is both
    >invoked by other functions / commands and it is invoked by the user in
    >response to the 'show case' command.  And while it is quite reasonable
    >for it to be silent when it is *NOT* invoked by the user, it should
    >not be silent when it is invoked by the user.
    >
    >My suggestion is to define two functions:
    >
    >. one, the new show_case_command, which is never silent -- it always
    >tells you the setting.
    >
    >. the other, the current show_case_command, prints a warning if
    >appropriate and is called by the current callers of show_case_command.
    >
    >Otherwise it looks fine to me.  Thanks for submitting this.



More information about the Gdb-patches mailing list