Skip to content

Commit

Permalink
Kernel: rename SFail to SuPeRfail
Browse files Browse the repository at this point in the history
This way, it matches the name on the GAP level, and it's
a bit easier to grep for both simultaneously
  • Loading branch information
fingolfin committed Jan 18, 2016
1 parent be1f85c commit 74f43eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions src/bool.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ Obj Fail;

/****************************************************************************
**
*V SFail . . . . . . . . . . . . . . . . . . . . . . . . . . superfail value
*V SuPeRfail . . . . . . . . . . . . . . . . . . . . . . . superfail value
**
** 'SFail' is an ``superfail'' object which is used to indicate failure if
** '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 SFail;
Obj SuPeRfail;


/****************************************************************************
Expand Down Expand Up @@ -115,7 +115,7 @@ void PrintBool (
else if ( bool == Fail ) {
Pr( "fail", 0L, 0L );
}
else if ( bool == SFail ) {
else if ( bool == SuPeRfail ) {
Pr( "SuPeRfail", 0L, 0L );
}
else {
Expand Down Expand Up @@ -402,7 +402,7 @@ static Int InitKernel (
InitGlobalBag( &True, "src/bool.c:TRUE" );
InitGlobalBag( &False, "src/bool.c:FALSE" );
InitGlobalBag( &Fail, "src/bool.c:FAIL" );
InitGlobalBag( &SFail, "src/bool.c:SFAIL" );
InitGlobalBag( &SuPeRfail, "src/bool.c:SUPERFAIL" );

/* install the saving functions */
SaveObjFuncs[ T_BOOL ] = SaveBool;
Expand Down Expand Up @@ -446,9 +446,9 @@ static Int InitLibrary (
MakeReadOnlyGVar(gvar);

/* `SuPeRfail' ditto */
SFail = NewBag( T_BOOL, 0L );
SuPeRfail = NewBag( T_BOOL, 0L );
gvar = GVarName( "SuPeRfail" );
AssGVar( gvar, SFail );
AssGVar( gvar, SuPeRfail );
MakeReadOnlyGVar(gvar);

/* make and install the 'RETURN_TRUE' function */
Expand Down
6 changes: 3 additions & 3 deletions src/bool.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ extern Obj Fail;

/****************************************************************************
**
*V SFail . . . . . . . . . . . . . . . . . . . . . . . . . . superfail value
*V SuPeRfail . . . . . . . . . . . . . . . . . . . . . . . superfail value
**
** 'SFail' is an ``superfail'' object which is used to indicate failure if
** '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 SFail;
extern Obj SuPeRfail;


/****************************************************************************
Expand Down
8 changes: 4 additions & 4 deletions src/streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Obj FuncREAD_COMMAND ( Obj self, Obj stream, Obj echo )

/* try to open the file */
if ( ! OpenInputStream(stream) ) {
return SFail;
return SuPeRfail;
}

if (echo == True)
Expand All @@ -116,18 +116,18 @@ Obj FuncREAD_COMMAND ( Obj self, Obj stream, Obj echo )

CloseInput();

if( status == 0 ) return SFail;
if( status == 0 ) return SuPeRfail;

if (TLS(UserHasQUIT)) {
TLS(UserHasQUIT) = 0;
return SFail;
return SuPeRfail;
}

if (TLS(UserHasQuit)) {
TLS(UserHasQuit) = 0;
}

return TLS(ReadEvalResult) ? TLS(ReadEvalResult) : SFail;
return TLS(ReadEvalResult) ? TLS(ReadEvalResult) : SuPeRfail;

}

Expand Down

0 comments on commit 74f43eb

Please sign in to comment.