diff --git a/src/streams.c b/src/streams.c index 0f4a8276f78..02b0d1aeaeb 100644 --- a/src/streams.c +++ b/src/streams.c @@ -815,34 +815,6 @@ static Obj FuncREAD(Obj self, Obj inputObj) } -/**************************************************************************** -** -*F FuncREAD_NORECOVERY( , ) . . . . . . read a file or stream -** -** Read the current input and close the input stream. Disable the normal -** mechanism which ensures that quitting from a break loop gets you back to -** a live prompt. This is initially designed for the files read from the -** command line. -*/ -static Obj FuncREAD_NORECOVERY(Obj self, Obj inputObj) -{ - TypInputFile input; - if (!OpenInputFileOrStream(SELF_NAME, &input, inputObj)) - return False; - - // read the file - READ_INNER(&input); - if (!CloseInput(&input)) { - ErrorQuit("Panic: READ_NORECOVERY cannot close input", 0, 0); - } - if (STATE(UserHasQuit)) { - STATE(UserHasQuit) = FALSE; // stop recovery here - return Fail; - } - return True; -} - - /**************************************************************************** ** *F FuncREAD_STREAM_LOOP( , , ) . . read a stream @@ -1738,7 +1710,6 @@ FuncExecuteProcess(Obj self, Obj dir, Obj prg, Obj in, Obj out, Obj args) static StructGVarFunc GVarFuncs[] = { GVAR_FUNC_1ARGS(READ, input), - GVAR_FUNC_1ARGS(READ_NORECOVERY, input), GVAR_FUNC_4ARGS( READ_ALL_COMMANDS, instream, echo, capture, resultCallback), GVAR_FUNC_2ARGS(READ_COMMAND_REAL, stream, echo), diff --git a/tst/testinstall/kernel/streams.tst b/tst/testinstall/kernel/streams.tst index bb33fc9013c..c83b6474d2b 100644 --- a/tst/testinstall/kernel/streams.tst +++ b/tst/testinstall/kernel/streams.tst @@ -139,15 +139,6 @@ gap> func := LastReadValue;; gap> NameFunction(func); "func" -# -gap> READ_NORECOVERY(fail); -Error, READ_NORECOVERY: must be a string or an input stream (not the v\ -alue 'fail') -gap> READ_NORECOVERY("/this/path/does/not/exist!"); -false -gap> READ_NORECOVERY(InputTextString("")); -true - # gap> READ_STREAM_LOOP(fail, fail, fail); Error, READ_STREAM_LOOP: must be an input stream (not the value 'fa\