This helps with build on mingw32 (and probably other platforms).
Patch #5731.
+Thu Feb 8 14:56:18 2007 Ben Pfaff <blp@gnu.org>
+
+ Reduce platform dependence.
+
+ * Makefile.am: Don't add -Dunix or -D__MSDOS__ to compiler command
+ line. Add $(top_builddir)/intl to include path to fix building
+ with the included libintl.
+
+ * Smake (GNULIB_MODULES): Add `canonicalize', `sys_stat',
+ `mkstemp' modules. Remove `stat-macros' module, which is no
+ longer what we want, because what we want is provided by sys_stat
+ now, and remove its inclusions. Remove `strstr' module, which is
+ no longer in gnulib. Remove `readlink', `xreadlink', because we
+ no longer use either function.
+
+ * configure.ac: Move gl_EARLY before AC_PROG_CC, where the gnulib
+ manual says it should be. Check for presence of execl, fork,
+ and popen. Drop check for unix versus msdos as host OS.
+
Sat Nov 4 15:59:31 2006 Ben Pfaff <blp@gnu.org>
* configure.ac: Check for the "round" function added in C99.
DISTCLEANFILES = ./intl/plural.c ./po/stamp-po
BUILT_SOURCES =
-AM_CPPFLAGS=-I$(top_srcdir)/intl -I$(top_srcdir)/gl -I$(top_builddir)/gl
+AM_CPPFLAGS=-I$(top_srcdir)/intl -I$(top_builddir)/intl \
+ -I$(top_srcdir)/gl -I$(top_builddir)/gl
AM_CFLAGS=
-Wpointer-arith -Wno-sign-compare -Wmissing-prototypes
endif
-if unix
-AM_CFLAGS+=-Dunix
-endif
-
-if msdos
-AM_CFLAGS+=-D__MSDOS__
-endif
-
.q.c:
@$(top_srcdir)/mkinstalldirs `dirname $@`
./src/language/lexer/q2c $< $@
alloca-opt \
assert \
byteswap \
+ canonicalize \
c-ctype \
c-strtod \
exit \
memmove \
mempcpy \
memset \
+ mkstemp \
progname \
- readlink \
snprintf \
- stat-macros \
stdarg \
stdbool \
stdint \
strerror \
strftime \
strsep \
- strstr \
strtod \
strtok_r \
strtol \
strtoul \
+ sys_stat \
unistd \
unlocked-io \
vsnprintf \
xalloc \
xalloc-die \
- xreadlink \
xsize \
xstrndup \
xvasprintf
AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no")
AC_ARG_WITH(gui_tools, [ --with-gui-tools build the gui developer tools])
-if test x"$with_gui_tools" == x"yes" ; then
+if test x"$with_gui_tools" = x"yes" ; then
PKG_CHECK_MODULES(GLADE_UI, libgladeui-1.0)
fi
-AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" == x"yes")
+AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes")
PSPP_OFF_T
AC_C_BIGENDIAN
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([__setfpucw isinf isnan finite getpid feholdexcept round trunc])
+AC_CHECK_FUNCS([__setfpucw execl fork isinf isnan finite getpid feholdexcept popen round trunc])
AC_PROG_LN_S
-
-AM_CONDITIONAL(unix, test x"$host_os" != x"msdos" )
-AM_CONDITIONAL(msdos, test x"$host_os" = x"msdos" )
-
dnl This is needed otherwise --with-included-gettext fails
AH_BOTTOM([#include <locale.h>])
PSPP searches each directory in the configuration file path for most
configuration files. The default configuration file path searches first
-@file{~/.pspp}, then the package system configuration directory (usually
+@file{$HOME/.pspp}, then the package system configuration directory (usually
@file{/usr/local/etc/pspp} or @file{/etc/pspp}). The value of
environment variable @env{PSPP_CONFIG_PATH}, if defined, overrides this
default path. Finally, @samp{-B @var{path}} or
@file{.}
@item
-@file{~/.pspp/include}
+@file{$HOME/.pspp/include}
@item
@file{/usr/local/lib/pspp/include}
+Thu Feb 8 14:59:05 2007 Ben Pfaff <blp@gnu.org>
+
+ Reduce platform dependence.
+
+ * file-name.c (fn_tilde_expand): Removed, and removed calls to it.
+ Everywhere we using this, we really should have just depended on
+ the shell to expand tildes.
+ (fn_search_path): Simplify, given that we don't do tilde expansion
+ any longer.
+ (fn_normalize): Removed. Caller changed to use the canonicalize
+ module from gnulib.
+ (fn_get_cwd): Removed. Only user was fn_normalize.
+ (fn_is_absolute): Really only test for absolute names.
+ (fn_is_special): Use pipe files if HAVE_POPEN, not if we're in
+ unix.
+ (fn_readlink): Removed, as it was only used fn_normalize.
+ (fn_exists): Assume the stat function is available; gnulib does.
+ (fn_open): Use pipe files if HAVE_POPEN, not if we're in unix.
+
Sat Feb 3 21:52:17 2007 Ben Pfaff <blp@gnu.org>
* dictionary.c (dict_create_vector_assert): New function.
#define DATA_OUT_H 1
#include <stdbool.h>
+#include <libpspp/float-format.h>
#include <libpspp/integer-format.h>
struct fmt_spec;
#include <stdio.h>
#include <stdlib.h>
+#include "canonicalize.h"
#include "intprops.h"
#include "minmax.h"
#include "settings.h"
-#include "xreadlink.h"
#include <libpspp/alloc.h>
#include <libpspp/message.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
-/* PORTME: Everything in this file is system dependent. */
-
-#ifdef unix
-#include <pwd.h>
#include <unistd.h>
#include <sys/stat.h>
-#include "stat-macros.h"
-#endif
-
-#ifdef __WIN32__
-#define NOGDI
-#define NOUSER
-#define NONLS
-#include <win32/windows.h>
-#endif
-
-#if __DJGPP__
-#include <sys/stat.h>
-#endif
\f
/* Initialization. */
ds_destroy (&dst);
}
-#ifdef unix
-/* Expands csh tilde notation from the path INPUT into a malloc()'d
- returned string. */
-char *
-fn_tilde_expand (const char *input)
-{
- struct string output = DS_EMPTY_INITIALIZER;
- if (input[0] == '~')
- {
- const char *home = NULL;
- const char *remainder = NULL;
- if (input[1] == '/' || input[1] == '\0')
- {
- home = fn_getenv ("HOME");
- remainder = input + 1;
- }
- else
- {
- struct string user_name = DS_EMPTY_INITIALIZER;
- struct passwd *pwd;
-
- ds_assign_substring (&user_name,
- ss_buffer (input + 1,
- strcspn (input + 1, "/")));
- pwd = getpwnam (ds_cstr (&user_name));
- if (pwd != NULL && pwd->pw_dir[0] != '\0')
- {
- home = xstrdup (pwd->pw_dir);
- remainder = input + 1 + ds_length (&user_name);
- }
- ds_destroy (&user_name);
- }
-
- if (home != NULL)
- {
- ds_put_cstr (&output, home);
- if (*remainder != '\0')
- ds_put_cstr (&output, remainder);
- }
- }
- if (ds_is_empty (&output))
- ds_put_cstr (&output, input);
- return ds_cstr (&output);
-}
-#else /* !unix */
-char *
-fn_tilde_expand (const char *input)
-{
- return xstrdup (input);
-}
-#endif /* !unix */
-
/* Searches for a configuration file with name NAME in the path
- given by PATH, which is tilde- and environment-interpolated.
+ given by PATH, which is environment-interpolated.
Directories in PATH are delimited by ':'. Returns the
malloc'd full name of the first file found, or NULL if none is
found. */
fn_search_path (const char *base_name, const char *path_)
{
struct string path;
- struct substring dir_;
+ struct substring dir;
struct string file = DS_EMPTY_INITIALIZER;
size_t save_idx = 0;
if (fn_is_absolute (base_name))
- return fn_tilde_expand (base_name);
+ return xstrdup (base_name);
/* Interpolate environment variables. */
ds_init_cstr (&path, path_);
verbose_msg (2, _("searching for \"%s\" in path \"%s\""),
base_name, ds_cstr (&path));
- while (ds_separate (&path, ss_cstr (":"), &save_idx, &dir_))
+ while (ds_separate (&path, ss_cstr (":"), &save_idx, &dir))
{
- struct string dir;
-
- /* Do tilde expansion. */
- ds_init_substring (&dir, dir_);
- if (ds_first (&dir) == '~')
- {
- char *tmp_str = fn_tilde_expand (ds_cstr (&dir));
- ds_assign_cstr (&dir, tmp_str);
- free (tmp_str);
- }
-
/* Construct file name. */
ds_clear (&file);
- ds_put_cstr (&file, ds_cstr (&dir));
+ ds_put_substring (&file, dir);
if (!ds_is_empty (&file) && ds_last (&file) != '/')
ds_put_char (&file, '/');
ds_put_cstr (&file, base_name);
- ds_destroy (&dir);
/* Check whether file exists. */
if (fn_exists (ds_cstr (&file)))
return NULL;
}
-/* fn_normalize(): This very OS-dependent routine canonicalizes
- file name FN1. The file name should not need to be the name of an
- existing file. Returns a malloc()'d copy of the canonical name.
- This function must always succeed; if it needs to bail out then it
- should return xstrdup(FN1). */
-#ifdef unix
-char *
-fn_normalize (const char *file_name)
-{
- const char *src;
- char *fn1, *fn2, *dest;
- int maxlen;
-
- if (fn_is_special (file_name))
- return xstrdup (file_name);
-
- fn1 = fn_tilde_expand (file_name);
-
- /* Follow symbolic links. */
- for (;;)
- {
- fn2 = fn1;
- fn1 = fn_readlink (fn1);
- if (!fn1)
- {
- fn1 = fn2;
- break;
- }
- free (fn2);
- }
-
- maxlen = strlen (fn1) * 2;
- if (maxlen < 31)
- maxlen = 31;
- dest = fn2 = xmalloc (maxlen + 1);
- src = fn1;
-
- if (*src == '/')
- *dest++ = *src++;
- else
- {
- errno = 0;
- while (getcwd (dest, maxlen - (dest - fn2)) == NULL && errno == ERANGE)
- {
- maxlen *= 2;
- dest = fn2 = xrealloc (fn2, maxlen + 1);
- errno = 0;
- }
- if (errno)
- {
- free (fn1);
- free (fn2);
- return NULL;
- }
- dest = strchr (fn2, '\0');
- if (dest - fn2 >= maxlen)
- {
- int ofs = dest - fn2;
- maxlen *= 2;
- fn2 = xrealloc (fn2, maxlen + 1);
- dest = fn2 + ofs;
- }
- if (dest[-1] != '/')
- *dest++ = '/';
- }
-
- for (;;)
- {
- int c, f;
-
- c = *src++;
-
- f = 0;
- if (c == '/' || c == 0)
- {
- /* remove `./', `../' from directory */
- if (dest[-1] == '.' && dest[-2] == '/')
- dest--;
- else if (dest[-1] == '.' && dest[-2] == '.' && dest[-3] == '/')
- {
- dest -= 3;
- if (dest == fn2)
- dest++;
- while (dest[-1] != '/')
- dest--;
- }
- else if (dest[-1] != '/') /* remove extra slashes */
- f = 1;
-
- if (c == 0)
- {
- if (dest[-1] == '/' && dest > fn2 + 1)
- dest--;
- *dest = 0;
- free (fn1);
-
- return xrealloc (fn2, strlen (fn2) + 1);
- }
- }
- else
- f = 1;
-
- if (f)
- {
- if (dest - fn2 >= maxlen)
- {
- int ofs = dest - fn2;
- maxlen *= 2;
- fn2 = xrealloc (fn2, maxlen + 1);
- dest = fn2 + ofs;
- }
- *dest++ = c;
- }
- }
-}
-#elif defined (__WIN32__)
-char *
-fn_normalize (const char *fn1)
-{
- DWORD len;
- DWORD success;
- char *fn2;
-
- /* Don't change special file names. */
- if (fn_is_special (file_name))
- return xstrdup (file_name);
-
- /* First find the required buffer length. */
- len = GetFullPathName (fn1, 0, NULL, NULL);
- if (!len)
- {
- fn2 = xstrdup (fn1);
- return fn2;
- }
-
- /* Then make a buffer that big. */
- fn2 = xmalloc (len);
- success = GetFullPathName (fn1, len, fn2, NULL);
- if (success >= len || success == 0)
- {
- free (fn2);
- fn2 = xstrdup (fn1);
- return fn2;
- }
- return fn2;
-}
-#elif __BORLANDC__
-char *
-fn_normalize (const char *fn1)
-{
- char *fn2 = _fullpath (NULL, fn1, 0);
- if (fn2)
- {
- char *cp;
- for (cp = fn2; *cp; cp++)
- *cp = toupper ((unsigned char) (*cp));
- return fn2;
- }
- return xstrdup (fn1);
-}
-#elif __DJGPP__
-char *
-fn_normalize (const char *fn1)
-{
- char *fn2 = xmalloc (1024);
- _fixpath (fn1, fn2);
- fn2 = xrealloc (fn2, strlen (fn2) + 1);
- return fn2;
-}
-#else /* not Lose32, Unix, or DJGPP */
-char *
-fn_normalize (const char *fn)
-{
- return xstrdup (fn);
-}
-#endif /* not Lose32, Unix, or DJGPP */
-
/* Returns the directory part of FILE_NAME, as a malloc()'d
string. */
char *
return xstrdup (extension);
}
\f
-#if unix
-/* Returns the current working directory, as a malloc()'d string.
- From libc.info. */
-char *
-fn_get_cwd (void)
-{
- int size = 100;
- char *buffer = xmalloc (size);
-
- for (;;)
- {
- char *value = getcwd (buffer, size);
- if (value != 0)
- return buffer;
-
- size *= 2;
- free (buffer);
- buffer = xmalloc (size);
- }
-}
-#else
-char *
-fn_get_cwd (void)
-{
- int size = 2;
- char *buffer = xmalloc (size);
- if ( buffer)
- {
- buffer[0]='.';
- buffer[1]='\0';
- }
-
- return buffer;
-
-}
-#endif
-\f
/* Find out information about files. */
/* Returns true iff NAME specifies an absolute file name. */
bool
fn_is_absolute (const char *name)
{
-#ifdef unix
- if (name[0] == '/'
- || !strncmp (name, "./", 2)
- || !strncmp (name, "../", 3)
- || name[0] == '~')
- return true;
-#elif defined (__MSDOS__)
- if (name[0] == '\\'
- || !strncmp (name, ".\\", 2)
- || !strncmp (name, "..\\", 3)
- || (name[0] && name[1] == ':'))
- return true;
-#endif
-
- return false;
+ return name[0] == '/';
}
-
+
/* Returns true if FILE_NAME is a virtual file that doesn't
really exist on disk, false if it's a real file name. */
bool
{
if (!strcmp (file_name, "-") || !strcmp (file_name, "stdin")
|| !strcmp (file_name, "stdout") || !strcmp (file_name, "stderr")
-#ifdef unix
+#ifdef HAVE_POPEN
|| file_name[0] == '|'
|| (*file_name && file_name[strlen (file_name) - 1] == '|')
#endif
bool
fn_exists (const char *name)
{
-#ifdef unix
struct stat temp;
-
return stat (name, &temp) == 0;
-#else
- FILE *f = fopen (name, "r");
- if (!f)
- return false;
- fclose (f);
- return true;
-#endif
-}
-
-/* Returns the symbolic link value for FILE_NAME as a dynamically
- allocated buffer, or a null pointer on failure. */
-char *
-fn_readlink (const char *file_name)
-{
- return xreadlink (file_name, 32);
}
\f
/* Environment variables. */
\f
/* Basic file handling. */
+#if HAVE_POPEN
/* Used for giving an error message on a set_safer security
violation. */
static FILE *
errno = EPERM;
return NULL;
}
+#endif
/* As a general comment on the following routines, a `sensible value'
for errno includes 0 if there is no associated system error. The
else if (mode[0] == 'w' && !strcmp (fn, "stderr"))
return stderr;
-#ifdef unix
+#if HAVE_POPEN
if (fn[0] == '|')
{
if (get_safer_mode ())
{
if (!strcmp (fn, "-"))
return 0;
-#ifdef unix
+#if HAVE_POPEN
else if (fn[0] == '|' || (*fn && fn[strlen (fn) - 1] == '|'))
{
pclose (f);
fn_get_identity (const char *file_name)
{
struct file_identity *identity = xmalloc (sizeof *identity);
- identity->normalized_file_name = fn_normalize (file_name);
+ char *cname = canonicalize_filename_mode (file_name, CAN_MISSING);
+ if (cname == NULL)
+ cname = xstrdup (file_name);
+ identity->normalized_file_name = cname;
return identity;
}
#include <stdio.h>
#include <stdbool.h>
+#include <libpspp/str.h>
/* Search path for configuration files. */
extern const char *config_path;
void fn_init (void);
-struct string;
-struct substring;
void fn_interp_vars (struct substring src,
const char *(*getenv) (const char *),
struct string *dst);
-char *fn_tilde_expand (const char *fn);
char *fn_search_path (const char *base_name, const char *path);
-char *fn_normalize (const char *fn);
char *fn_dir_name (const char *fn);
char *fn_extension (const char *fn);
-char *fn_get_cwd (void);
-
bool fn_is_absolute (const char *fn);
bool fn_is_special (const char *fn);
bool fn_exists (const char *fn);
-char *fn_readlink (const char *fn);
const char *fn_getenv (const char *variable);
const char *fn_getenv_default (const char *variable, const char *def);
#include "file-handle-def.h"
#include "format.h"
#include "missing-values.h"
-#include "stat-macros.h"
#include "value-labels.h"
#include "variable.h"
#include "value-labels.h"
#include "variable.h"
-#include "stat-macros.h"
#include "minmax.h"
#include "gettext.h"
+Thu Feb 8 15:04:42 2007 Ben Pfaff <blp@gnu.org>
+
+ Reduce platform dependence.
+
+ * command.c (shell): Always define this function, instead of only
+ in unix, but make it a stub when fork or execl is not available.
+ (run_command): Move parsing code into cmd_host.
+ (cmd_host): Drop unix dependence now that the shell function is
+ always defined.
+
Sun Jan 21 15:31:52 WST 2007 John Darrington <john@darrington.wattle.id.au>
* command.c command.h: Renamed cmd_parse to cmd_parse_in_state.
return CMD_SUCCESS;
}
-#ifdef unix
-/* Spawn a shell process. */
-static int
+#if HAVE_FORK && HAVE_EXECL
+/* Spawn an interactive shell process. */
+static bool
shell (void)
{
int pid;
case -1:
msg (SE, _("Couldn't fork: %s."), strerror (errno));
- return 0;
+ return false;
default:
assert (pid > 0);
while (wait (NULL) != pid)
;
- return 1;
+ return true;
}
}
-#endif /* unix */
-
-/* Parses the HOST command argument and executes the specified
- command. Returns a suitable command return code. */
-static int
-run_command (struct lexer *lexer)
+#else /* !(HAVE_FORK && HAVE_EXECL) */
+/* Don't know how to spawn an interactive shell. */
+static bool
+shell (void)
{
- const char *cmd;
- int string;
-
- /* Handle either a string argument or a full-line argument. */
- {
- int c = lex_look_ahead (lexer);
+ msg (SE, _("Interactive shell not supported on this platform."));
+ return false;
+}
+#endif
- if (c == '\'' || c == '"')
- {
- lex_get (lexer);
- if (!lex_force_string (lexer))
- return CMD_FAILURE;
- cmd = ds_cstr (lex_tokstr (lexer));
- string = 1;
- }
- else
- {
- cmd = lex_rest_of_line (lexer, NULL);
- lex_discard_line (lexer);
- string = 0;
- }
- }
+/* Executes the specified COMMAND in a subshell. Returns true if
+ successful, false otherwise. */
+static bool
+run_command (const char *command)
+{
+ if (system (NULL) == 0)
+ {
+ msg (SE, _("Command shell not supported on this platform."));
+ return false;
+ }
/* Execute the command. */
- if (system (cmd) == -1)
+ if (system (command) == -1)
msg (SE, _("Error executing command: %s."), strerror (errno));
- /* Finish parsing. */
- if (string)
- {
- lex_get (lexer);
-
- if (lex_token (lexer) != '.')
- {
- lex_error (lexer, _("expecting end of command"));
- return CMD_FAILURE;
- }
- }
-
- return CMD_SUCCESS;
+ return true;
}
/* Parses, performs the HOST command. */
int
cmd_host (struct lexer *lexer, struct dataset *ds UNUSED)
{
- int code;
+ int look_ahead;
if (get_safer_mode ())
{
return CMD_FAILURE;
}
-#ifdef unix
- /* Figure out whether to invoke an interactive shell or to execute a
- single shell command. */
- if (lex_look_ahead (lexer) == '.')
+ look_ahead = lex_look_ahead (lexer);
+ if (look_ahead == '.')
{
lex_get (lexer);
- code = shell () ? CMD_FAILURE : CMD_SUCCESS;
+ return shell () ? CMD_SUCCESS : CMD_FAILURE;
}
- else
- code = run_command (lexer);
-#else /* !unix */
- /* Make sure that the system has a command interpreter, then run a
- command. */
- if (system (NULL) != 0)
- code = run_command (lexer);
- else
+ else if (look_ahead == '\'' || look_ahead == '"')
{
- msg (SE, _("No operating system support for this command."));
- code = CMD_FAILURE;
- }
-#endif /* !unix */
+ bool ok;
+
+ lex_get (lexer);
+ if (!lex_force_string (lexer))
+ NOT_REACHED ();
+ ok = run_command (ds_cstr (lex_tokstr (lexer)));
- return code;
+ lex_get (lexer);
+ return ok ? lex_end_of_command (lexer) : CMD_FAILURE;
+ }
+ else
+ {
+ bool ok = run_command (lex_rest_of_line (lexer, NULL));
+ lex_discard_line (lexer);
+ return ok ? CMD_SUCCESS : CMD_FAILURE;
+ }
}
/* Parses, performs the NEW FILE command. */
#include <libpspp/message.h>
#include <language/lexer/lexer.h>
#include <libpspp/misc.h>
-#include "stat-macros.h"
#include <libpspp/str.h>
#include "gettext.h"
+Sun Feb 11 17:59:30 2007 Ben Pfaff <blp@gnu.org>
+
+ * html.c (html_initialise_chart): Mark `this' parameter UNUSED to
+ account for NO_CHARTS case.
+
Sat Feb 3 21:56:46 2007 Ben Pfaff <blp@gnu.org>
* table.c (tab_hline): Allow t->nr as y argument, so that we can
}
static void
-html_initialise_chart (struct outp_driver *this, struct chart *ch)
+html_initialise_chart (struct outp_driver *this UNUSED, struct chart *ch)
{
#ifdef NO_CHARTS
ch->lp = NULL;
#include <config.h>
+#include <string.h>
+
#include <glade/glade-build.h>
#include "psppire-dialog.h"
#include "psppire-buttonbox.h"
+Thu Feb 8 15:07:04 2007 Ben Pfaff <blp@gnu.org>
+
+ * read-line.c (readln_initialize): Instead of only supporting
+ history in unix, always support history, and only support a
+ history file when $HOME is defined.
+ (readln_uninitialize): Ditto.
+ (welcome) Call readln_initialize instead of duplicating code.
+
Sun Dec 10 11:13:53 2006 Ben Pfaff <blp@gnu.org>
* command-line.c (pre_syntax_message): Use term "syntax" instead
#if HAVE_READLINE
rl_basic_word_break_characters = "\n";
-#ifdef unix
+ using_history ();
+ stifle_history (500);
if (history_file == NULL)
{
- history_file = tilde_expand ("~/.pspp_history");
- using_history ();
- read_history (history_file);
- stifle_history (500);
+ const char *home_dir = getenv ("HOME");
+ if (home_dir != NULL)
+ {
+ history_file = xasprintf ("%s/.pspp_history", home_dir);
+ read_history (history_file);
+ }
}
#endif
-#endif
}
/* Close getl. */
{
initialised = false;
-#if HAVE_READLINE && unix
+#if HAVE_READLINE
if (history_file != NULL && false == get_testing_mode() )
write_history (history_file);
clear_history ();
"conditions.\nThere is ABSOLUTELY NO WARRANTY for PSPP; type \"show "
"warranty.\" for details.\n", stdout);
puts (stat_version);
-
-#if HAVE_READLINE && unix
- if (history_file == NULL)
- {
- history_file = tilde_expand ("~/.pspp_history");
- using_history ();
- read_history (history_file);
- stifle_history (500);
- }
-#endif
+ readln_initialize ();
}
-
-
-
-
-
/* Gets a line from the user and stores it into LINE.
Prompts the user with PROMPT.
Returns true if successful, false at end of file.