X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmain.c;h=0441d74a3c0cbc70fff6f8e7aa2fad7d08d9bd3f;hb=5c5204d433be6419112bd77f75b9a9adb642f766;hp=4918eefc2091ed567a897c7ba5bae518b0651b55;hpb=16aa47dbdde420fe82032f7d2e166fdf4e974df5;p=pspp diff --git a/src/main.c b/src/main.c index 4918eefc20..0441d74a3c 100644 --- a/src/main.c +++ b/src/main.c @@ -34,6 +34,7 @@ #include "output.h" #include "progname.h" #include "random.h" +#include "readln.h" #include "settings.h" #include "var.h" #include "version.h" @@ -92,6 +93,7 @@ main (int argc, char **argv) fn_init (); fh_init (); getl_initialize (); + readln_initialize (); settings_init (); random_init (); @@ -155,7 +157,16 @@ execute_command (void) if (token != T_STOP) break; - if (!getl_perform_delayed_reset ()) + /* Sets the options flag of the current script to 0, thus allowing it + to be read in. Returns nonzero if this action was taken, zero + otherwise. */ + if (getl_head && getl_head->separate) + { + getl_head->separate = 0; + discard_variables (); + lex_reset_eof (); + } + else terminate (err_error_count == 0); }