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 atan
;(zl:atan y x) == (cl:atan y x) + 2 pi
51 ; if latter is negative
52 asin acos asinh acosh atanh
;different for complex numbers
53 tanh cosh sinh tan
;(trigi): same, could remove from trigi
54 break
; special variable in displa.lisp
55 gcd
; special in rat module
56 #+(and sbcl sb-package-locks
) makunbound
)
59 ;; Faster modular arithmetic.
60 ;; Unfortunately, as S. Macrakis observed (bug #706562),
61 ;; SI::CMOD currently behaves in a strange way:
62 ;; (let ((si::modulus 4)) (si::cmod 2)) => 2
63 ;; (let ((si::modulus 4)) (si::cmod -2)) => -2
64 #:modulus
#:cmod
#:ctimes
#:cdifference
#:cplus
66 #:getpid
#:get-instream
67 #:short-name
#:cleanup
#:instream-stream-name
#:instream-line
68 #:instream-name
#:instream-stream
#:stream-name
#:complete-prop
69 #:*stream-alist
* #:break-call
))
74 (:shadow
#:random-state
79 (:export
#:random-state
84 #:%random-single-float
85 #:%random-double-float
86 #+(or scl clisp
) #:%random-long-float
87 #+cmu
#:%random-double-double-float
91 ;; This package is for the implmentation of the BIGFLOAT routines that
92 ;; make working with Maxima's bfloat objects somewhat easier by
93 ;; extending the standard CL numeric functions to work with BIGFLOAT
94 ;; and COMPLEX-BIGFLOAT objects. See src/numeric.lisp for the
96 (defpackage bigfloat-impl
99 (:shadowing-import-from
#:system
#:define-compiler-macro
)
148 #:integer-decode-float
165 ;; If any of these exported symbols are updated, update the
166 ;; shadowing-import-from list for BIGFLOAT-USER too!
227 #:integer-decode-float
245 ;; BIGFLOAT is the package intended to be used for applications
246 ;; using the routines from the BIGFLOAT-IMPL.
248 (:use
:cl
:bigfloat-impl
)
250 (:shadowing-import-from
#:system
#:define-compiler-macro
)
251 ;; This list should match the SHADOWING-IMPORT-FROM list in
253 (:shadowing-import-from
#:bigfloat-impl
302 #:integer-decode-float
325 ;; Export all the external symbols in BIGFLOAT-IMPL from BIGFLOAT too.
326 (do-external-symbols (s '#:bigfloat-impl
)
327 (export s
'#:bigfloat
))
329 ;; For CMUCL, we lock the bigfloat-impl package so we don't
330 ;; accidentally modify the implementation.
332 (defun lock-maxima-packages ()
333 (let ((package-names '(#:bigfloat-impl
)))
334 (dolist (p package-names
)
335 (let ((p (find-package p
)))
337 (setf (package-definition-lock p
) t
)
338 (setf (package-lock p
) t
)))))
344 (lock-maxima-packages)
345 (pushnew 'lock-maxima-packages ext
:*after-save-initializations
*))
348 ;; Some versions of CMUCL already have a compatible version of INTL,
349 ;; so skip it if we have it. CMUCL will already define the INTL
350 ;; package correctly.
352 #+#.
(cl:if
(cl:and
(cl:member
:cmu cl
:*features
*) (cl:find-package
'#:intl
)) '(or) '(and))
355 (:export
#:setlocale
#:textdomain
#:gettext
#:dgettext
356 #:ngettext
#:dngettext
357 #:*translatable-dump-stream
* #:*locale
*
358 #:*locale-directories
*
359 #:read-translatable-string
)
361 (:shadowing-import-from
#:system
#:define-compiler-macro
))
363 ;; (getalias '$lambda) => CL:LAMBDA, which implies that Maxima parses lambda as CL:LAMBDA.
364 ;; Unlocking the :common-lisp package seems to be the simplest way to avoid an error.
365 ;; (Shadowing LAMBDA causes errors and removing the alias causes some other errors. Oh well.)
366 #+(and sbcl sb-package-locks
) (sb-ext:unlock-package
:common-lisp
)