Skip to content

Commit

Permalink
Added IsLIBGAP constant
Browse files Browse the repository at this point in the history
This constant can be set to true in the initialize_libgap function (future work)
to stop GAP from starting an interactive session
  • Loading branch information
sebasguts committed Jun 7, 2018
1 parent 8f47553 commit 68add25
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/init.g
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,11 @@ end );
if IsHPCGAP and THREAD_UI() then
ReadLib("hpc/consoleui.g");
MULTI_SESSION();
else
elif not IsBound( IsLIBGAP ) or IsLIBGAP = false then
BIND_GLOBAL( "IsLIBGAP", false );
SESSION();
else
BIND_GLOBAL( "IsLIBGAP", true );
fi;

PROGRAM_CLEAN_UP();
Expand Down
12 changes: 12 additions & 0 deletions tst/testinstall/IsLIBGAP.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#############################################################################
##
#W IsLIBGAP.tst GAP library Sebastian Gutsche
##
##
#Y Copyright (C) 2018, GAP Group
##
gap> START_TEST("IsLIBGAP.tst");
gap> IsBound( IsLIBGAP );
true
gap> STOP_TEST( "IsLIBGAP.tst", 1);

0 comments on commit 68add25

Please sign in to comment.