aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-08-15 18:37:00 -0600
committerTom Tromey <tom@tromey.com>2018-08-17 16:39:06 -0600
commit89fbedf3abc90b62fbb7f08782ed78d87b3fccaa (patch)
tree7cd80645b6c9d85b4d5e6610bcaec5375f5529a6 /gdb/top.c
parent12582533306990c9406aedd960fa411c317a67de (diff)
downloadgdb-89fbedf3abc90b62fbb7f08782ed78d87b3fccaa.zip
gdb-89fbedf3abc90b62fbb7f08782ed78d87b3fccaa.tar.gz
gdb-89fbedf3abc90b62fbb7f08782ed78d87b3fccaa.tar.bz2
Remove "repeat" argument from command_line_input
After the previous patch, all callers pass 0 as the repeat argument to command_line_input. So, this patch removes it. gdb/ChangeLog 2018-08-16 Tom Tromey <tom@tromey.com> * top.c (read_command_file): Update. (command_line_input): Remove "repeat" argument. * ada-lang.c (get_selections): Update. * linespec.c (decode_line_2): Update. * defs.h (command_line_input): Remove argument. * cli/cli-script.c (read_next_line): Update. * python/py-gdb-readline.c: Update.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/top.c b/gdb/top.c
index de1a335..470276e 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -418,7 +418,7 @@ read_command_file (FILE *stream)
char *command;
/* Get a command-line. This calls the readline package. */
- command = command_line_input (NULL, 0, NULL);
+ command = command_line_input (NULL, NULL);
if (command == NULL)
break;
command_handler (command);
@@ -1161,16 +1161,11 @@ gdb_safe_append_history (void)
NULL is returned for end of file.
- *If* input is from an interactive stream (stdin), the line read is
- copied into the global 'saved_command_line' so that it can be
- repeated.
-
This routine either uses fancy command line editing or simple input
as the user has requested. */
char *
-command_line_input (const char *prompt_arg, int repeat,
- const char *annotation_suffix)
+command_line_input (const char *prompt_arg, const char *annotation_suffix)
{
static struct buffer cmd_line_buffer;
static int cmd_line_buffer_initialized;
@@ -1255,7 +1250,7 @@ command_line_input (const char *prompt_arg, int repeat,
}
cmd = handle_line_of_input (&cmd_line_buffer, rl,
- repeat, annotation_suffix);
+ 0, annotation_suffix);
if (cmd == (char *) EOF)
{
cmd = NULL;