+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.
+
2018-08-17 Tom Tromey <tom@tromey.com>
* cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
if (prompt == NULL)
prompt = "> ";
- args = command_line_input (prompt, 0, annotation_suffix);
+ args = command_line_input (prompt, annotation_suffix);
if (args == NULL)
error_no_arg (_("one or more choice numbers"));
else
prompt_ptr = NULL;
- return command_line_input (prompt_ptr, 0, "commands");
+ return command_line_input (prompt_ptr, "commands");
}
/* Return true if CMD's name is NAME. */
extern char *gdb_readline_wrapper (const char *);
-extern char *command_line_input (const char *, int, const char *);
+extern char *command_line_input (const char *, const char *);
extern void print_prompt (void);
{
prompt = "> ";
}
- args = command_line_input (prompt, 0, "overload-choice");
+ args = command_line_input (prompt, "overload-choice");
if (args == 0 || *args == 0)
error_no_arg (_("one or more choice numbers"));
TRY
{
- p = command_line_input (prompt, 0, "python");
+ p = command_line_input (prompt, "python");
}
/* Handle errors by raising Python exceptions. */
CATCH (except, RETURN_MASK_ALL)
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);
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;
}
cmd = handle_line_of_input (&cmd_line_buffer, rl,
- repeat, annotation_suffix);
+ 0, annotation_suffix);
if (cmd == (char *) EOF)
{
cmd = NULL;