#include <config.h>
+#include "read-line.h"
+
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include <errno.h>
-#include "read-line.h"
-#include <language/command.h>
+#include "msg-ui.h"
+
#include <data/file-name.h>
-#include <libpspp/version.h>
-#include <libpspp/str.h>
-#include <output/table.h>
-#include <libpspp/message.h>
#include <data/file-name.h>
#include <data/settings.h>
+#include <language/command.h>
+#include <libpspp/message.h>
+#include <libpspp/str.h>
+#include <libpspp/version.h>
+#include <output/table.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
{
initialised = true;
-#if HAVE_READLINE
- rl_completion_entry_function = pspp_completion_function;
+#if HAVE_READLINE
+ rl_basic_word_break_characters = "\n";
+ rl_attempted_completion_function = pspp_attempted_completion_function;
#ifdef unix
if (history_file == NULL)
{
assert(initialised);
- err_error_count = err_warning_count = 0;
- err_already_flagged = 0;
+ reset_msg_count ();
welcome ();
{
if (string[0])
add_history (string);
- ds_assign_c_str (line, string);
+ ds_assign_cstr (line, string);
free (string);
return true;
}
#else
fputs (prompt, stdout);
fflush (stdout);
- if (ds_gets (line, stdin))
+ if (ds_read_line (line, stdin))
{
ds_chomp (line, '\n');
return true;