File: start.gd

package info (click to toggle)
gap-utils 0.93-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,504 kB
  • sloc: xml: 2,167; javascript: 155; makefile: 105
file content (61 lines) | stat: -rw-r--r-- 2,410 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
##############################################################################
##
#W  start.gd                    GAP4 package `Utils'             Chris Wensley
##
#Y  Copyright (C) 2015-2022, The GAP Group 

DeclareInfoClass( "InfoUtils" );

##  these version numbers refer to the latest package releases 
##  containing the code which is to be transferred 

UtilsPackageVersions := 
  [ "autodoc",     "2016.01.31",    ## latest is 2017.09.08
    "resclasses",  "4.2.5",         ## latest is 4.7.1, 18/12/17 
    "rcwa",        "4.1.5"          ## latest is 4.6.2, 26/06/18 
  ];
##  (04/09/18) removed QPA from this list - no functions transferred 
##  (02/06/18) removed xmod from this list 
##  functions being transferred cannot be used until the Home packages have  
##  been loaded: when this has been done the following variable is set true 

UtilsLoadingComplete := false; 

#############################################################################
##
#F  OKtoReadFromUtils( <name> ) . . . tests whether name still contains the 
##                                    code to be transferred to Utils 
#F  OKtoReadFromUtilsSpec( <name>, <oldver> ) . . . special case of above 
##
BindGlobal( "OKtoReadFromUtils", function( Name ) 
    local  name, ver, ver0, pos, ok; 

    name := LowercaseString( Name ); 
    pos := Position( UtilsPackageVersions, name ); 
    if ( pos = fail ) then 
        Error( "package 'name' not in the list UtilsPackageVersions" ); 
    fi; 
    ver0 := UtilsPackageVersions[ pos+1 ];  
    ver := InstalledPackageVersion( name ); 
    ok := ( ( ver = fail )         ## name is not installed on the system 
            or ( ver > ver0 ) );   ## name still contains the code 
    return ok; 
end );

BindGlobal( "OKtoReadFromUtilsSpec", function( Name, oldver ) 
    local  name, ver, pos, ok; 

    name := LowercaseString( Name ); 
    pos := Position( UtilsPackageVersions, name ); 
    if ( pos = fail ) then 
        Error( "package 'name' not in the list UtilsPackageVersions" ); 
    fi; 
    ver := InstalledPackageVersion( name ); 
    ok := ( ( ver = fail )           ## name is not installed on the system 
            or ( ver > oldver ) );   ## name still contains the code 
    return ok; 
end );

#############################################################################
##
#E  start.gd  . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here