Skip to content

Commit

Permalink
Handle READ_GAP_ROOT as an "outer loop"
Browse files Browse the repository at this point in the history
in the sense of the message "you can 'quit;' to quit to outer loop" in
break loops. I.e. continue in READ_GAP_ROOT even if `UserHasQuit`.
  • Loading branch information
zickgraf committed Nov 24, 2022
1 parent 696a0a9 commit 3619192
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,13 @@ Int READ_GAP_ROOT ( const Char * filename )
if (OpenInput(&input, path)) {
while (1) {
ExecStatus status = ReadEvalCommand(0, &input, 0, 0);
if (STATE(UserHasQuit) || STATE(UserHasQUIT))
if (STATE(UserHasQuit)) {
FlushRestOfInputLine(&input);
STATE(UserHasQuit) = FALSE;
}
else if (STATE(UserHasQUIT)) {
break;
}
if (status == STATUS_RETURN) {
Pr("'return' must not be used in file", 0, 0);
}
Expand Down

0 comments on commit 3619192

Please sign in to comment.