Skip to content

Commit

Permalink
Merge 14aaa3c into 467c769
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Oct 17, 2021
2 parents 467c769 + 14aaa3c commit 4b22497
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
34 changes: 33 additions & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,39 @@ AvailabilityTest := function()
return f<>fail;
end,

BannerString := Concatenation(~.PackageName, " ", String(~.Version), " ...\n"),
BannerFunction := function(info)
local str, modules;

str:= DefaultPackageBannerString(info);
modules := [];

if IsBound(MPFR_INT) then
Add(modules,"mpfr");
fi;
if IsBound(MPFI_INT) then
Add(modules,"mpfi");
fi;
if IsBound(MPC_INT) then
Add(modules,"mpc");
fi;
if IsBound(@FPLLL) then
Add(modules,"fplll");
fi;
if IsBound(CXSC_INT) then
Add(modules,"cxsc");
fi;
if Length(modules) = 0 then
modules := "none";
else
modules := JoinStringsWithSeparator(modules, ", ");
fi;

return ReplacedString(str, "Homepage",
Concatenation( "Loaded modules: ", modules, "\n",
"Homepage") );
end,


TestFile := "tst/testall.g",
Keywords := ["floating-point"]
));
9 changes: 0 additions & 9 deletions read.g
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,22 @@
ReadPackage("float", "lib/polynomial.gi");
ReadPackage("float", "lib/pslq.gi");

modules@ := [];
if IsBound(MPFR_INT) then
Add(modules@,"mpfr");
ReadPackage("float", "lib/mpfr.gi");
fi;
if IsBound(MPFI_INT) then
Add(modules@,"mpfi");
ReadPackage("float", "lib/mpfi.gi");
fi;
if IsBound(MPC_INT) then
Add(modules@,"mpc");
ReadPackage("float", "lib/mpc.gi");
fi;
if IsBound(@FPLLL) then
Add(modules@,"fplll");
ReadPackage("float", "lib/fplll.gi");
fi;
if IsBound(CXSC_INT) then
Add(modules@,"cxsc");
ReadPackage("float", "lib/cxsc.gi");
fi;

PackageInfo("float")[1].BannerString := Concatenation("Loading modules [",JoinStringsWithSeparator(modules@,", "),"] for ",PackageInfo("float")[1].BannerString);
Unbind(modules@);

if IsBound(IO_Pickle) then
ReadPackage("float","lib/pickle.g");
else
Expand Down

0 comments on commit 4b22497

Please sign in to comment.