diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2011-07-22 09:22:50 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2011-07-22 09:22:50 +0000 |
commit | 95298e7219e23ca184786a3192df7ab3767ce25a (patch) | |
tree | 9a6cab41de43472730cff069d4ed959c3835b6d5 /gdb/tui/tui-interp.c | |
parent | 14d153035333735c0c62c7ee2e92f2b0e65953f8 (diff) | |
download | binutils-gdb-95298e7219e23ca184786a3192df7ab3767ce25a.tar.gz |
2011-07-22 Phil Muldoon <pmuldoon@redhat.com>
* event-top.c (cli_command_loop): Use get_prompt, get_suffix,
get_prefix.
(display_gdb_prompt): Likewise.
(change_annotation_level): Likewise.
(push_prompt): Likewise.
(pop_prompt): Likewise.
(handle_stop_sig): Use get_prompt with a level.
* top.c (command_loop): Use get_prompt with a level.
(set_async_annotation_level): Use set_prompt with a level.
(get_prefix): New function.
(set_prefix): Ditto.
(set_suffix): Ditto.
(get_suffix): Ditto.
(get_prompt): Accept a level argument.
(set_prompt): Accept a level argument. Free old prompts. Set
new_async_prompt if level is 0.
(init_main): Use set_prompt with a level. Do not set
new_async_prompt.
* event-top.h (PROMPT, SUFFIX, PREFIX): Move to top.c
* top.h: Declare set_suffix, get_suffix, set_prefix, get_prefix.
Modify set_prompt, get_prompt to account for levels.
* tui/tui-interp.c (tui_command_loop): Use get_prompt with a
level
* python/python.c (before_prompt_hook): Use set_prompt.
Diffstat (limited to 'gdb/tui/tui-interp.c')
-rw-r--r-- | gdb/tui/tui-interp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index d79de2bf990..919d1ac4ba3 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -145,17 +145,17 @@ tui_command_loop (void *data) { int length; char *a_prompt; - char *gdb_prompt = get_prompt (); + char *gdb_prompt = get_prompt (0); /* Tell readline what the prompt to display is and what function it will need to call after a whole line is read. This also displays the first prompt. */ - length = strlen (PREFIX (0)) - + strlen (gdb_prompt) + strlen (SUFFIX (0)) + 1; + length = strlen (get_prefix (0)) + + strlen (gdb_prompt) + strlen (get_suffix (0)) + 1; a_prompt = (char *) alloca (length); - strcpy (a_prompt, PREFIX (0)); + strcpy (a_prompt, get_prefix (0)); strcat (a_prompt, gdb_prompt); - strcat (a_prompt, SUFFIX (0)); + strcat (a_prompt, get_suffix (0)); rl_callback_handler_install (a_prompt, input_handler); } else |