From f14192134422cb6fa12de66d1f8d75a421f8c8bb Mon Sep 17 00:00:00 2001 From: Markus Pfeiffer Date: Wed, 31 May 2017 15:25:14 +0100 Subject: [PATCH] Remove SuPeRfail --- src/bool.c | 18 ------------------ src/bool.h | 10 ---------- src/hpc/serialize.c | 5 ----- src/streams.c | 12 ------------ 4 files changed, 45 deletions(-) diff --git a/src/bool.c b/src/bool.c index d23ca20866..86284d08a0 100644 --- a/src/bool.c +++ b/src/bool.c @@ -64,16 +64,6 @@ Obj False; */ Obj Fail; -/**************************************************************************** -** -*V SuPeRfail . . . . . . . . . . . . . . . . . . . . . . . superfail value -** -** 'SuPeRfail' is an ``superfail'' object which is used to indicate failure if -** `fail' itself is a sensible response. This is used when having GAP read -** a file line-by-line via a library function (demo.g) -*/ -Obj SuPeRfail; - /**************************************************************************** ** *V Undefined . . . . . . . . . . . . . . . . . . . . . . . undefined value @@ -122,9 +112,6 @@ void PrintBool ( else if ( bool == Fail ) { Pr( "fail", 0L, 0L ); } - else if ( bool == SuPeRfail ) { - Pr( "SuPeRfail", 0L, 0L ); - } else if ( bool == Undefined ) { Pr( "Undefined", 0L, 0L ); } @@ -405,7 +392,6 @@ static Int InitKernel ( InitGlobalBag( &True, "src/bool.c:TRUE" ); InitGlobalBag( &False, "src/bool.c:FALSE" ); InitGlobalBag( &Fail, "src/bool.c:FAIL" ); - InitGlobalBag( &SuPeRfail, "src/bool.c:SUPERFAIL" ); InitGlobalBag( &Undefined, "src/bool.c:UNDEFINED" ); /* install the saving functions */ @@ -447,10 +433,6 @@ static Int InitLibrary ( /* `fail' is a variable not a language construct */ AssReadOnlyGVar( GVarName( "fail" ), Fail ); - /* `SuPeRfail' ditto */ - SuPeRfail = NewBag( T_BOOL, 0L ); - AssReadOnlyGVar( GVarName( "SuPeRfail" ), SuPeRfail ); - /* Undefined is an internal value */ Undefined = NewBag( T_BOOL, 0 ); diff --git a/src/bool.h b/src/bool.h index 8c53d27de8..9f1d2f7ec9 100644 --- a/src/bool.h +++ b/src/bool.h @@ -40,16 +40,6 @@ extern Obj False; */ extern Obj Fail; -/**************************************************************************** -** -*V SuPeRfail . . . . . . . . . . . . . . . . . . . . . . . superfail value -** -** 'SuPeRfail' is an ``superfail'' object which is used to indicate failure if -** `fail' itself is a sensible response. This is used when having GAP read -** a file line-by-line via a library function (demo.g) -*/ -extern Obj SuPeRfail; - /**************************************************************************** ** *V Undefined . . . . . . . . . . . . . . . . . . . . . . . undefined value diff --git a/src/hpc/serialize.c b/src/hpc/serialize.c index 089c768486..3e5b3bbb8f 100644 --- a/src/hpc/serialize.c +++ b/src/hpc/serialize.c @@ -434,9 +434,6 @@ void SerializeBool(Obj obj) else if (obj == Fail) { WriteByte(2); } - else if (obj == SuPeRfail) { - WriteByte(3); - } else ErrorQuit("Internal serialization error: Bad boolean value", 0L, 0L); } @@ -451,8 +448,6 @@ Obj DeserializeBool(UInt tnum) return True; case 2: return Fail; - case 3: - return SuPeRfail; default: DeserializationError(); return (Obj)0; /* flow control hint */ diff --git a/src/streams.c b/src/streams.c index 79b9198ce5..c7f77678a1 100644 --- a/src/streams.c +++ b/src/streams.c @@ -208,17 +208,6 @@ Obj FuncREAD_COMMAND_REAL ( Obj self, Obj stream, Obj echo ) return result; } -/* - Deprecated alternative to READ_COMMAND_REAL, kept for now to maintain - compatibility with the few packages that use it. - */ -Obj FuncREAD_COMMAND ( Obj self, Obj stream, Obj echo ) -{ - Obj result; - result = FuncREAD_COMMAND_REAL(self, stream, echo); - return (LEN_PLIST(result) == 2) ? ELM_PLIST(result, 2) : SuPeRfail; -} - /**************************************************************************** ** *F READ() . . . . . . . . . . . . . . . . . . . . . . . read current input @@ -2214,7 +2203,6 @@ static StructGVarFunc GVarFuncs [] = { GVAR_FUNC(READ_NORECOVERY, 1, "filename"), GVAR_FUNC(READ_ALL_COMMANDS, 2, "stream, echo"), GVAR_FUNC(READ_COMMAND_REAL, 2, "stream, echo"), - GVAR_FUNC(READ_COMMAND, 2, "stream, echo"), GVAR_FUNC(READ_STREAM, 1, "stream"), GVAR_FUNC(READ_STREAM_LOOP, 2, "stream, catchstderrout"), GVAR_FUNC(READ_AS_FUNC, 1, "filename"),