diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-04-22 22:23:16 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-04-22 22:23:16 +0000 |
commit | 0bcd01498323a6a1e57649094d06a76433bc1160 (patch) | |
tree | 7e67de30c7cbf70c185aadc239756b1a21891729 /gdb | |
parent | 88d8a8e052a22f1187cb503f1e23e58abf9320a7 (diff) | |
download | gdb-0bcd01498323a6a1e57649094d06a76433bc1160.zip gdb-0bcd01498323a6a1e57649094d06a76433bc1160.tar.gz gdb-0bcd01498323a6a1e57649094d06a76433bc1160.tar.bz2 |
* ada-lang.c (get_selections): Variable PROMPT made non-const and
initialized with a trailing space now. Use PROMPT_ARG of
COMMAND_LINE_INPUT instead of printing it ourselves.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/ada-lang.c | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 75d66f4..dd1d158 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2008-04-22 Jan Kratochvil <jan.kratochvil@redhat.com> + + * ada-lang.c (get_selections): Variable PROMPT made non-const and + initialized with a trailing space now. Use PROMPT_ARG of + COMMAND_LINE_INPUT instead of printing it ourselves. + 2008-04-22 Joel Brobecker <brobecker@adacore.com> * NEWS: Document support for 64-bit core file. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 0d38249..01f8bbd 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -3424,18 +3424,15 @@ get_selections (int *choices, int n_choices, int max_results, int is_all_choice, char *annotation_suffix) { char *args; - const char *prompt; + char *prompt; int n_chosen; int first_choice = is_all_choice ? 2 : 1; prompt = getenv ("PS2"); if (prompt == NULL) - prompt = ">"; + prompt = "> "; - printf_unfiltered (("%s "), prompt); - gdb_flush (gdb_stdout); - - args = command_line_input ((char *) NULL, 0, annotation_suffix); + args = command_line_input (prompt, 0, annotation_suffix); if (args == NULL) error_no_arg (_("one or more choice numbers")); |