This file is indexed.

/usr/share/axiom-20170501/src/algebra/NAGSP.spad is in axiom-source 20170501-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
)abbrev package NAGSP NAGLinkSupportPackage
++ Author: Mike Dewar and Godfrey Nolan
++ Date Created:  March 1993
++ Date Last Updated: October 6 1994
++ Description: 
++ Support functions for the NAG Library Link functions

NAGLinkSupportPackage() : SIG == CODE where

  SIG ==> with

    fortranCompilerName : () -> String
      ++ fortranCompilerName() returns the name of the currently selected
      ++  Fortran compiler

    fortranLinkerArgs : () -> String
      ++ fortranLinkerArgs() returns the current linker arguments

    aspFilename : String -> String
      ++ aspFilename("f") returns a String consisting of "f" suffixed with
      ++  an extension identifying the current AXIOM session.

    dimensionsOf : (Symbol, Matrix DoubleFloat) -> SExpression
      ++ dimensionsOf(s,m) \undocumented{}

    dimensionsOf : (Symbol, Matrix Integer) -> SExpression
      ++ dimensionsOf(s,m) \undocumented{}

    checkPrecision : () -> Boolean
      ++ checkPrecision() \undocumented{}

    restorePrecision : () -> Void
      ++ restorePrecision() \undocumented{}

  CODE ==> add

    makeAs:                   (Symbol,Symbol) -> Symbol
    changeVariables:          (Expression Integer,Symbol) -> Expression Integer
    changeVariablesF:         (Expression Float,Symbol) -> Expression Float

    import String
    import Symbol

    checkPrecision():Boolean ==
      (_$fortranPrecision$Lisp = "single"::Symbol) and _
      (_$nagEnforceDouble$Lisp)  =>
        systemCommand("set fortran precision double")$MoreSystemCommands
        if _$nagMessages$Lisp  then 
          print("*** Warning: Resetting fortran precision to double")_
            $PrintPackage
        true
      false

    restorePrecision():Void ==
      systemCommand("set fortran precision single")$MoreSystemCommands
      if _$nagMessages$Lisp  then 
        print("** Warning: Restoring fortran precision to single")$PrintPackage
      void()$Void

    uniqueId : String := ""

    counter : Integer := 0

    getUniqueId():String ==
      if uniqueId = "" then
        uniqueId := concat(getEnv("HOST")$Lisp,getEnv("SPADNUM")$Lisp)
      concat(uniqueId,string (counter:=counter+1))

    fortranCompilerName() == string _$fortranCompilerName$Lisp

    fortranLinkerArgs() == string _$fortranLibraries$Lisp

    aspFilename(f:String):String == concat ["/tmp/",f,getUniqueId(),".f"]

    dimensionsOf(u:Symbol,m:Matrix DoubleFloat):SExpression ==
      [u,nrows m,ncols m]$Lisp

    dimensionsOf(u:Symbol,m:Matrix Integer):SExpression ==
      [u,nrows m,ncols m]$Lisp