Skip to content

Commit

Permalink
Remove SuPeRfail
Browse files Browse the repository at this point in the history
  • Loading branch information
markuspf authored and fingolfin committed Nov 12, 2017
1 parent 334037e commit f141921
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 45 deletions.
18 changes: 0 additions & 18 deletions src/bool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 );

Expand Down
10 changes: 0 additions & 10 deletions src/bool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/hpc/serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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 */
Expand Down
12 changes: 0 additions & 12 deletions src/streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit f141921

Please sign in to comment.