+2019-11-08 Tom Tromey <tromey@adacore.com>
+
+ * top.c (read_command_file): Update.
+ (command_line_input): Make return type const.
+ * python/py-gdb-readline.c: Update.
+ * linespec.c (decode_line_2): Update.
+ * defs.h (command_line_input): Make return type const.
+ * cli/cli-script.c (read_next_line): Make return type const.
+ * ada-lang.c (get_selections): Update.
+
2019-11-06 Christian Biesinger <cbiesinger@google.com>
* linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
get_selections (int *choices, int n_choices, int max_results,
int is_all_choice, const char *annotation_suffix)
{
- char *args;
+ const char *args;
const char *prompt;
int n_chosen;
int first_choice = is_all_choice ? 2 : 1;
static void do_define_command (const char *comname, int from_tty,
const counted_command_line *commands);
-static char *read_next_line (void);
+static const char *read_next_line ();
/* Level of control structure when reading. */
static int control_level;
recurse_read_control_structure whenever we need to read commands
from stdin. */
-static char *
-read_next_line (void)
+static const char *
+read_next_line ()
{
struct ui *ui = current_ui;
char *prompt_ptr, control_prompt[256];
extern char *gdb_readline_wrapper (const char *);
-extern char *command_line_input (const char *, const char *);
+extern const char *command_line_input (const char *, const char *);
extern void print_prompt (void);
std::vector<symtab_and_line> *result,
const char *select_mode)
{
- char *args;
+ const char *args;
const char *prompt;
int i;
std::vector<const char *> filters;
#endif
{
int n;
- char *p = NULL, *q;
+ const char *p = NULL;
+ char *q;
try
{
while (ui->instream != NULL && !feof (ui->instream))
{
- char *command;
+ const char *command;
/* Get a command-line. This calls the readline package. */
command = command_line_input (NULL, NULL);
This routine either uses fancy command line editing or simple input
as the user has requested. */
-char *
+const char *
command_line_input (const char *prompt_arg, const char *annotation_suffix)
{
static struct buffer cmd_line_buffer;