#include "cli/cli-script.h" /* for reset_command_nest_depth */
#include "main.h"
#include "gdbthread.h"
-
+#include "continuations.h"
#include "gdbcmd.h" /* for dont_repeat() */
/* readline include files. */
/* This hook is called by rl_callback_read_char_wrapper after each
character is processed. */
-void (*after_char_processing_hook) ();
+void (*after_char_processing_hook) (void);
\f
/* Wrapper function for calling into the readline library. The event
static unsigned linelength = 0;
char *p;
char *p1;
- extern char *line;
- extern int linesize;
char *nline;
char got_eof = 0;
previous command, return the value in the global buffer. */
if (repeat && p == linebuffer && *p != '\\')
{
- command_handler (line);
+ command_handler (saved_command_line);
display_gdb_prompt (0);
return;
}
for (p1 = linebuffer; *p1 == ' ' || *p1 == '\t'; p1++);
if (repeat && !*p1)
{
- command_handler (line);
+ command_handler (saved_command_line);
display_gdb_prompt (0);
return;
}
/* Save into global buffer if appropriate. */
if (repeat)
{
- if (linelength > linesize)
+ if (linelength > saved_command_line_size)
{
- line = xrealloc (line, linelength);
- linesize = linelength;
+ saved_command_line = xrealloc (saved_command_line, linelength);
+ saved_command_line_size = linelength;
}
- strcpy (line, linebuffer);
+ strcpy (saved_command_line, linebuffer);
if (!more_to_come)
{
- command_handler (line);
+ command_handler (saved_command_line);
display_gdb_prompt (0);
}
return;