#include <errno.h>
#include <getopt.h>
#include <stdlib.h>
-#include <libpspp/alloc.h>
#include <libpspp/assertion.h>
#include <libpspp/copyleft.h>
#include <libpspp/message.h>
#include <libpspp/verbose-msg.h>
#include "read-line.h"
+#include "xalloc.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
/* Compatibility options */
case 'a':
if ( 0 == strcmp(optarg,"compatible") )
- set_algorithm(COMPATIBLE);
+ settings_set_algorithm(COMPATIBLE);
else if ( 0 == strcmp(optarg,"enhanced"))
- set_algorithm(ENHANCED);
+ settings_set_algorithm(ENHANCED);
else
{
usage ();
case 'x':
if ( 0 == strcmp(optarg,"compatible") )
- set_syntax(COMPATIBLE);
+ settings_set_syntax (COMPATIBLE);
else if ( 0 == strcmp(optarg,"enhanced"))
- set_syntax(ENHANCED);
+ settings_set_syntax (ENHANCED);
else
{
usage ();
process_statrc = false;
break;
case 's':
- set_safer_mode ();
+ settings_set_safer_mode ();
break;
case 'v':
verbose_increment_level ();
puts (legal);
return false;
case 'T':
- force_long_view ();
- set_testing_mode (true);
+ settings_set_testing_mode (true);
break;
case '?':
usage ();
char *pspprc_fn = fn_search_path ("rc", config_path);
if (pspprc_fn != NULL)
{
- getl_append_source (ss, create_syntax_file_source (pspprc_fn));
+ getl_append_source (ss,
+ create_syntax_file_source (pspprc_fn),
+ GETL_BATCH,
+ ERRMODE_CONTINUE
+ );
free (pspprc_fn);
}
outp_configure_macro (argv[i]);
else
{
- getl_append_source (ss, create_syntax_file_source (argv[i]));
+ getl_append_source (ss,
+ create_syntax_file_source (argv[i]),
+ GETL_BATCH,
+ ERRMODE_CONTINUE
+ );
syntax_files++;
}
if (!syntax_files || interactive_mode)
{
- getl_append_source (ss, create_readln_source () );
+ getl_append_source (ss, create_readln_source (),
+ GETL_INTERACTIVE,
+ ERRMODE_CONTINUE
+ );
if (!cleared_device_defaults)
outp_configure_add ("interactive");
}