This file is indexed.

/usr/share/maxima/5.32.1/src/maxima-package.lisp is in maxima-src 5.32.1-1.

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
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
(in-package :common-lisp-user)

(defpackage :maxima-nregex
  (:use :common-lisp)
  (:export
   ;; vars
   #:*regex-debug* #:*regex-groups* #:*regex-groupings*
   ;; functions
   #:regex-compile
   ))

(defpackage :cl-info
  (:use :common-lisp))

(defpackage :command-line
  (:use :common-lisp)
  (:nicknames :cmdline)
  (:export #:cl-option #:make-cl-option #:list-cl-options #:process-args
	   #:get-application-args))

;; Kevin Rosenberg's getopt package
(defpackage getopt
  (:use :cl)
  (:export #:match-unique-abbreviation
	   #:getopt))

;; GCL has SLOOP built in but it's slightly different now...
(defpackage :cl-sloop
  (:use :common-lisp)
  (:export #:sloop))

(defpackage :maxima
  (:use :common-lisp :command-line)
  ;; Gcl has DEFINE-COMPILER-MACRO but it's in the SYSTEM package.  So
  ;; we shadowing import it into our package here.  (Can't just import
  ;; because there's already a DEFINE-COMPILER-MACRO symbol.)
  #+gcl
  (:shadowing-import-from #:system #:define-compiler-macro)
  (:nicknames :cl-macsyma :cl-maxima :macsyma)
  (:import-from :cl-sloop #:sloop)
  (:shadow continue		 ;(macsys): part of the top-level loop
	   //                           ;(clmacs): arithmetic operator
	   float		  ;(clmacs): has 1.0 as default format
	   functionp                    ;(commac): accepts symbols
	   array                        ;(commac)
	   exp			   ;various files declare this special
	   signum                       ;(commac): same except
					; (cl:signum 1.3)==1.0 not 1 but I (?)
					; think this is ok for macsyma
	   atan			;(zl:atan y x) == (cl:atan y x) + 2 pi
					; if latter is negative
	   asin acos asinh acosh atanh  ;different for complex numbers
	   tanh cosh sinh tan  ;(trigi): same, could remove from trigi
	   break		     ; special variable in displa.lisp
	   gcd				; special in rat module
	   ;; (getalias '$lambda) => cl:lambda, which implies that
	   ;; Maxima parses lambda as cl:lambda. 
	   #+(and sbcl sb-package-locks) makunbound)
  #+gcl
  (:import-from :system
		;; Faster modular arithmetic.
		;; Unfortunately, as S. Macrakis observed (bug #706562),
		;; SI::CMOD currently behaves in a strange way:
		;; (let ((si::modulus 4)) (si::cmod 2)) => 2
		;; (let ((si::modulus 4)) (si::cmod -2)) => -2
		#:modulus #:cmod #:ctimes #:cdifference #:cplus

		#:getpid #:get-instream
		#:short-name #:cleanup #:instream-stream-name #:instream-line
		#:instream-name #:instream-stream #:stream-name #:complete-prop
		#:*stream-alist* #:break-call))


(defpackage :mt19937
  (:use :common-lisp)
  (:shadow #:random-state
       #:random-state-p
       #:random
       #:*random-state*
       #:make-random-state)
  (:export #:random-state
       #:random-state-p
       #:random
       #:*random-state*
       #:make-random-state
       #:%random-single-float
       #:%random-double-float
       #+(or scl clisp) #:%random-long-float
       #+cmu #:%random-double-double-float
       #:random-chunk
       #:init-random-state))

;; This package is for the implmentation of the BIGFLOAT routines that
;; make working with Maxima's bfloat objects somewhat easier by
;; extending the standard CL numeric functions to work with BIGFLOAT
;; and COMPLEX-BIGFLOAT objects.  See src/numeric.lisp for the
;; implementation.
(defpackage bigfloat-impl
  (:use :cl)
  #+gcl
  (:shadowing-import-from #:system #:define-compiler-macro)
  (:shadow #:+
	   #:-
	   #:*
	   #:/
	   #:1+
	   #:1-
	   #:zerop
	   #:plusp
	   #:minusp
	   #:abs
	   #:sqrt
	   #:log
	   #:exp
	   #:sin
	   #:cos
	   #:tan
	   #:asin
	   #:acos
	   #:atan
	   #:sinh
	   #:cosh
	   #:tanh
	   #:asinh
	   #:acosh
	   #:atanh
	   #:expt
	   #:=
	   #:/=
	   #:<
	   #:>
	   #:<=
	   #:>=
	   #:scale-float
	   #:realpart
	   #:imagpart
	   #:complex
	   #:conjugate
	   #:max
	   #:min
	   #:cis
	   #:phase
	   #:floor
	   #:ffloor
	   #:incf
	   #:decf
	   #:realp
	   #:complexp
	   #:numberp
	   #:integer-decode-float
	   #:decode-float
	   #:float
	   #:ceiling
	   #:fceiling
	   #:truncate
	   #:ftruncate
	   #:round
	   #:fround
	   #:random
	   #:signum
	   #:float-sign
	   #:float-digits
	   #:rational
	   #:rationalize
	   #:coerce
	   )
  ;; If any of these exported symbols are updated, update the
  ;; shadowing-import-from list for BIGFLOAT-USER too!
  
  ;; Export types
  (:export #:bigfloat
	   #:complex-bigfloat)
  ;; Export functions
  (:export #:bigfloat
	   #:to
	   #:maybe-to
	   #:epsilon
	   #:%pi
	   #:%e
	   ;; CL equivalents
	   #:+
	   #:-
	   #:*
	   #:/
	   #:1+
	   #:1-
	   #:zerop
	   #:plusp
	   #:minusp
	   #:abs
	   #:sqrt
	   #:log
	   #:exp
	   #:sin
	   #:cos
	   #:tan
	   #:asin
	   #:acos
	   #:atan
	   #:sinh
	   #:cosh
	   #:tanh
	   #:asinh
	   #:acosh
	   #:atanh
	   #:expt
	   #:=
	   #:/=
	   #:<
	   #:>
	   #:<=
	   #:>=
	   #:scale-float
	   #:realpart
	   #:imagpart
	   #:complex
	   #:conjugate
	   #:max
	   #:min
	   #:cis
	   #:phase
	   #:floor
	   #:ffloor
	   #:incf
	   #:decf
	   #:realp
	   #:complexp
	   #:numberp
	   #:integer-decode-float
	   #:decode-float
	   #:float
	   #:ceiling
	   #:fceiling
	   #:truncate
	   #:ftruncate
	   #:round
	   #:fround
	   #:random
	   #:signum
	   #:float-sign
	   #:float-digits
	   #:rational
	   #:rationalize
	   #:coerce
	   ))

;; BIGFLOAT is the package intended to be used for applications
;; using the routines from the BIGFLOAT-IMPL.
(defpackage bigfloat
  (:use :cl :bigfloat-impl)
  #+gcl
  (:shadowing-import-from #:system #:define-compiler-macro)
  ;; This list should match the SHADOWING-IMPORT-FROM list in
  ;; BIGFLOAT-IMPL.
  (:shadowing-import-from #:bigfloat-impl
			  #:+
			  #:-
			  #:*
			  #:/
			  #:1+
			  #:1-
			  #:zerop
			  #:plusp
			  #:minusp
			  #:abs
			  #:sqrt
			  #:log
			  #:exp
			  #:sin
			  #:cos
			  #:tan
			  #:asin
			  #:acos
			  #:atan
			  #:sinh
			  #:cosh
			  #:tanh
			  #:asinh
			  #:acosh
			  #:atanh
			  #:expt
			  #:=
			  #:/=
			  #:<
			  #:>
			  #:<=
			  #:>=
			  #:scale-float
			  #:realpart
			  #:imagpart
			  #:complex
			  #:conjugate
			  #:max
			  #:min
			  #:cis
			  #:phase
			  #:floor
			  #:ffloor
			  #:incf
			  #:decf
			  #:realp
			  #:complexp
			  #:numberp
			  #:integer-decode-float
			  #:decode-float
			  #:float
			  #:ceiling
			  #:fceiling
			  #:truncate
			  #:ftruncate
			  #:round
			  #:fround
			  #:random
			  #:signum
			  #:float-sign
			  #:float-digits
			  #:rational
			  #:rationalize
			  #:coerce
			  )
  (:export #:lentz
	   #:sum-power-series))

;; Export all the external symbols in BIGFLOAT-IMPL from BIGFLOAT too.
(do-external-symbols (s '#:bigfloat-impl)
  (export s '#:bigfloat))

;; For CMUCL, we lock the bigfloat-impl package so we don't
;; accidentally modify the implementation.
#+cmu
(defun lock-maxima-packages ()
  (let ((package-names '(#:bigfloat-impl)))
    (dolist (p package-names)
      (let ((p (find-package p)))
	(when p
          (setf (package-definition-lock p) t)
          (setf (package-lock p) t)))))
  (values))


#+cmu
(progn
  (lock-maxima-packages)
  (pushnew 'lock-maxima-packages ext:*after-save-initializations*))


(defpackage :intl
  (:use :common-lisp)
  (:export #:setlocale #:textdomain #:gettext #:dgettext
	   #:ngettext #:dngettext
           #:*translatable-dump-stream* #:*locale*
	   #:*locale-directories*
	   #:read-translatable-string)
  #+gcl
  (:shadowing-import-from #:system #:define-compiler-macro))

(provide :maxima)