From: Ben Pfaff Date: Sat, 24 Nov 2012 22:14:16 +0000 (-0800) Subject: INPUT PROGRAM: Don't break out of INPUT PROGRAM on interactive error. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55418b678b801a77c7e43eec3dcf2d6c890c80d1;p=pspp INPUT PROGRAM: Don't break out of INPUT PROGRAM on interactive error. Until now, any erroneous command typed within an input program at an interactive command prompt implicitly "broke out" of the input program, causing confusing behavior. This commit fixes the problem: commands following an erroneous command within INPUT PROGRAM continue to be part of the input program. Bug #33419. Reported by John Darrington. --- diff --git a/src/language/data-io/inpt-pgm.c b/src/language/data-io/inpt-pgm.c index ccd53be04e..afeb832643 100644 --- a/src/language/data-io/inpt-pgm.c +++ b/src/language/data-io/inpt-pgm.c @@ -112,7 +112,9 @@ cmd_input_program (struct lexer *lexer, struct dataset *ds) emit_END_CASE (ds, inp); saw_END_CASE = true; } - else if (cmd_result_is_failure (result) && result != CMD_FAILURE) + else if (cmd_result_is_failure (result) + && result != CMD_FAILURE + && lex_get_error_mode (lexer) != LEX_ERROR_INTERACTIVE) { if (result == CMD_EOF) msg (SE, _("Unexpected end-of-file within INPUT PROGRAM."));