X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fread-line.c;h=7b23f38d2f359b58ecec1635970904d732edad5c;hb=b5b474193e450bba97610065df0518c08074a7fb;hp=493a3d63cf5bd6399e7ea90de6081ae59d967e5c;hpb=bce579d144b66ca2eee18f6d27d847285a96d7b9;p=pspp-builds.git diff --git a/src/ui/terminal/read-line.c b/src/ui/terminal/read-line.c index 493a3d63..7b23f38d 100644 --- a/src/ui/terminal/read-line.c +++ b/src/ui/terminal/read-line.c @@ -22,6 +22,9 @@ #include #include #include +#if ! HAVE_READLINE +#include +#endif #include "msg-ui.h" @@ -92,7 +95,7 @@ readln_uninitialize (void) initialised = false; #if HAVE_READLINE - if (history_file != NULL && false == get_testing_mode() ) + if (history_file != NULL && false == settings_get_testing_mode () ) write_history (history_file); clear_history (); free (history_file); @@ -173,7 +176,7 @@ readln_read (struct string *line, enum prompt_style style) #else fputs (prompt, stdout); fflush (stdout); - if (ds_read_line (line, stdin)) + if (ds_read_line (line, stdin, SIZE_MAX)) { ds_chomp (line, '\n'); eof = false;