1 (in-package :common-lisp-user
)
3 (defpackage :maxima-nregex
7 #:*regex-debug
* #:*regex-groups
* #:*regex-groupings
*
15 (defpackage :command-line
18 (:export
#:cl-option
#:make-cl-option
#:list-cl-options
#:process-args
19 #:get-application-args
))
21 ;; Kevin Rosenberg's getopt package
24 (:export
#:match-unique-abbreviation
27 ;; GCL has SLOOP built in but it's slightly different now...
33 (:use
:common-lisp
:command-line
)
34 ;; Gcl has DEFINE-COMPILER-MACRO but it's in the SYSTEM package. So
35 ;; we shadowing import it into our package here. (Can't just import
36 ;; because there's already a DEFINE-COMPILER-MACRO symbol.)
38 (:shadowing-import-from
#:system
#:define-compiler-macro
)
39 (:nicknames
:cl-macsyma
:cl-maxima
:macsyma
)
40 (:import-from
:cl-sloop
#:sloop
)
41 (:shadow continue
;(macsys): part of the top-level loop
42 // ;(clmacs): arithmetic operator
43 float
;(clmacs): has 1.0 as default format
44 functionp
;(commac): accepts symbols
46 exp
;various files declare this special
47 signum
;(commac): same except
48 ; (cl:signum 1.3)==1.0 not 1 but I (?)
49 ; think this is ok for macsyma
50 asin acos asinh acosh atanh
;different for complex numbers
51 tanh cosh sinh tan
;(trigi): same, could remove from trigi
52 break
; special variable in displa.lisp
53 gcd
; special in rat module
54 #+(and sbcl sb-package-locks
) makunbound
)
57 ;; Faster modular arithmetic.
58 ;; Unfortunately, as S. Macrakis observed (bug #706562),
59 ;; SI::CMOD currently behaves in a strange way:
60 ;; (let ((si::modulus 4)) (si::cmod 2)) => 2
61 ;; (let ((si::modulus 4)) (si::cmod -2)) => -2
62 #:modulus
#:cmod
#:ctimes
#:cdifference
#:cplus
64 #:getpid
#:get-instream
65 #:short-name
#:cleanup
#:instream-stream-name
#:instream-line
66 #:instream-name
#:instream-stream
#:stream-name
#:complete-prop
67 #:*stream-alist
* #:break-call
))
72 (:shadow
#:random-state
77 (:export
#:random-state
82 #:%random-single-float
83 #:%random-double-float
84 #+(or scl clisp
) #:%random-long-float
85 #+cmu
#:%random-double-double-float
89 ;; This package is for the implmentation of the BIGFLOAT routines that
90 ;; make working with Maxima's bfloat objects somewhat easier by
91 ;; extending the standard CL numeric functions to work with BIGFLOAT
92 ;; and COMPLEX-BIGFLOAT objects. See src/numeric.lisp for the
94 (defpackage bigfloat-impl
97 (:shadowing-import-from
#:system
#:define-compiler-macro
)
146 #:integer-decode-float
163 ;; If any of these exported symbols are updated, update the
164 ;; shadowing-import-from list for BIGFLOAT-USER too!
225 #:integer-decode-float
243 ;; BIGFLOAT is the package intended to be used for applications
244 ;; using the routines from the BIGFLOAT-IMPL.
246 (:use
:cl
:bigfloat-impl
)
248 (:shadowing-import-from
#:system
#:define-compiler-macro
)
249 ;; This list should match the SHADOWING-IMPORT-FROM list in
251 (:shadowing-import-from
#:bigfloat-impl
300 #:integer-decode-float
323 ;; Export all the external symbols in BIGFLOAT-IMPL from BIGFLOAT too.
324 (do-external-symbols (s '#:bigfloat-impl
)
325 (export s
'#:bigfloat
))
327 ;; For CMUCL, we lock the bigfloat-impl package so we don't
328 ;; accidentally modify the implementation.
330 (defun lock-maxima-packages ()
331 (let ((package-names '(#:bigfloat-impl
)))
332 (dolist (p package-names
)
333 (let ((p (find-package p
)))
335 (setf (package-definition-lock p
) t
)
336 (setf (package-lock p
) t
)))))
342 (lock-maxima-packages)
343 (pushnew 'lock-maxima-packages ext
:*after-save-initializations
*))
346 ;; Some versions of CMUCL already have a compatible version of INTL,
347 ;; so skip it if we have it. CMUCL will already define the INTL
348 ;; package correctly.
350 #+#.
(cl:if
(cl:and
(cl:member
:cmu cl
:*features
*) (cl:find-package
'#:intl
)) '(or) '(and))
353 (:export
#:setlocale
#:textdomain
#:gettext
#:dgettext
354 #:ngettext
#:dngettext
355 #:*translatable-dump-stream
* #:*locale
*
356 #:*locale-directories
*
357 #:read-translatable-string
)
359 (:shadowing-import-from
#:system
#:define-compiler-macro
))
361 ;; (getalias '$lambda) => CL:LAMBDA, which implies that Maxima parses lambda as CL:LAMBDA.
362 ;; Unlocking the :common-lisp package seems to be the simplest way to avoid an error.
363 ;; (Shadowing LAMBDA causes errors and removing the alias causes some other errors. Oh well.)
364 #+(and sbcl sb-package-locks
) (sb-ext:unlock-package
:common-lisp
)