X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fterminal-reader.c;h=2f2a533d1577f4d6cf46a95e3f60cd1b26ce7dd8;hb=2bbf5d66eeeffdbcded913145f05b9a6046056fa;hp=ad3ced4960a8903396c0127cfdf9a4af67462157;hpb=6e097c89af440da90b43ce90864394c4d0c843d5;p=pspp diff --git a/src/ui/terminal/terminal-reader.c b/src/ui/terminal/terminal-reader.c index ad3ced4960..2f2a533d15 100644 --- a/src/ui/terminal/terminal-reader.c +++ b/src/ui/terminal/terminal-reader.c @@ -33,12 +33,6 @@ static char *history_file; static char **complete_command_name (const char *, int, int); static char **dont_complete (const char *, int, int); static char *command_generator (const char *text, int state); - -static const bool have_readline = true; - -#else -static const bool have_readline = false; -static int rl_end; #endif @@ -47,7 +41,6 @@ static int rl_end; #include #include -#include #include #include #include @@ -63,7 +56,6 @@ static int rl_end; #include "libpspp/version.h" #include "output/driver.h" #include "output/journal.h" -#include "ui/terminal/terminal.h" #include "gl/minmax.h" #include "gl/xalloc.h" @@ -165,15 +157,6 @@ terminal_reader_read (struct lex_reader *r_, char *buf, size_t n, } r->offset = 0; r->eof = ss_is_empty (r->s); - - /* Check whether the size of the window has changed, so that - the output drivers can adjust their settings as needed. We - only do this for the first line of a command, as it's - possible that the output drivers are actually in use - afterward, and we don't want to confuse them in the middle - of output. */ - if (prompt_style == PROMPT_FIRST) - terminal_check_size (); } chunk = MIN (n, r->s.length - r->offset); @@ -251,11 +234,11 @@ readline_prompt (enum prompt_style style) } +#if HAVE_READLINE static int pfd[2]; static bool sigint_received ; - /* A function similar to getc from stdio. However this one may be interrupted by SIGINT. @@ -306,10 +289,6 @@ interruptible_getc (FILE *fp) return c; } - - -#if HAVE_READLINE - static void handler (int sig) {