Skip to content

Commit

Permalink
Update lib/streams.gi
Browse files Browse the repository at this point in the history
Co-authored-by: Max Horn <[email protected]>
  • Loading branch information
ChrisJefferson and fingolfin authored Oct 27, 2022
1 parent 42289b2 commit 2223592
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions lib/streams.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1677,24 +1677,24 @@ end);


InstallGlobalFunction( "CheckValidPrintFormattingStatus",
function(fs)
local r;
if IsBool(fs) then
if fs = fail then
Error("Formatting status cannot be 'fail'");
fi;
elif IsRecord(fs) then
if Set(RecNames(fs)) <> ["indent", "linewrap"] then
Error("Formatting status records must contain only 'indent' and 'linewrap'");
fi;
for r in ["indent","linewrap"] do
if not fs.(r) in [false, true] then
Error(Concatenation(r, " must be a Boolean in Formatting status"));
fi;
od;
else
Error("Formatting status must be a boolean or a record");
function(fs)
local r;
if IsBool(fs) then
if fs = fail then
Error("Formatting status cannot be 'fail'");
fi;
elif IsRecord(fs) then
if Set(RecNames(fs)) <> ["indent", "linewrap"] then
Error("Formatting status records must contain only 'indent' and 'linewrap'");
fi;
for r in ["indent","linewrap"] do
if not fs.(r) in [false, true] then
Error(Concatenation(r, " must be a Boolean in Formatting status"));
fi;
od;
else
Error("Formatting status must be a boolean or a record");
fi;
end);

#############################################################################
Expand Down

0 comments on commit 2223592

Please sign in to comment.