#include <config.h>
+#include <signal.h>
+#include <stdio.h>
+
#include "command-line.h"
#include "msg-ui.h"
#include "progname.h"
#include <libpspp/version.h>
#include <math/random.h>
#include <output/output.h>
-#include <signal.h>
-#include <stdio.h>
-
+#include <procedure.h>
#if HAVE_FPU_CONTROL_H
#include <fpu_control.h>
readln_initialize ();
settings_init ();
random_init ();
-
- default_dict = dict_create ();
+ proc_init ();
if (parse_command_line (argc, argv))
{
for (;;)
{
int result = execute_command ();
- if (result == CMD_EOF || result == CMD_QUIT)
+ if (result == CMD_EOF || result == CMD_FINISH)
break;
if (result == CMD_CASCADING_FAILURE && !getl_is_interactive ())
{
Any lines read after the first token must be continuation
lines. */
getl_set_prompt_style (GETL_PROMPT_LATER);
- return cmd_parse (vfm_source != NULL ? CMD_STATE_DATA : CMD_STATE_INITIAL);
+ return cmd_parse (proc_has_source ()
+ ? CMD_STATE_DATA : CMD_STATE_INITIAL);
}
\f
static void
{
terminating = true;
- cancel_transformations ();
- dict_destroy (default_dict);
+ proc_done ();
random_done ();
settings_done ();