Windows installer: Update README.txt.
[maxima.git] / archive / src / init_max1.lisp
blobe741a14407171b4a4bc2fe3c5f1a276222b467ba
1 #+gcl
2 (allocate 'cons (round (* 800 (/ 2048.0 si::lisp-pagesize))))
4 ;;there is no way this file will run in non common lisps...!!
5 (pushnew :cl *features*)
6 ;; no cursor positioning.
7 #+gcl (push :nocp *features*)
8 ;; clean up make stuff
9 (if (find-package "MAKE")
10 (sloop::sloop for v in-package 'make do (unintern v)))
11 #+gcl (setq si::*top-level-hook* 'user::run)
12 (in-package "MAXIMA")
14 (proclaim '(optimize (safety 0) (speed 3) (space 0)))
15 (defun maxima-path (dir file)
16 (if (symbolp file) (setq file (stripdollar file)))
17 (format nil "~a~a/~a" maxima::*maxima-directory*
18 dir file))
19 (load "version.lisp")
20 (load "autol.lisp")
21 (load "max_ext.lisp")
25 (in-package "MAXIMA")
27 ;; the following is just a hack to make the c and d intern
28 ;; as small letters in maxima.
29 '(|$c| |$d|)
31 ;; make sure these are defined...
32 (defvar $plot_options '((mlist)
33 ((mlist) |$x| -3 3)
34 ((mlist) |$y| -3 3)
35 ((mlist) $grid 30 30)
36 ((mlist) $view_direction 1 1 1)
37 ((mlist) $colour_z nil)
38 ((mlist) $transform_xy nil)
39 ((mlist) $run_viewer t)
40 ((mlist) $plot_format $openmath)
41 ((mlist) $nticks 100)
44 (defun set-pathnames ()
45 ;; need to get one when were are.
47 (let* ((tem (getenv "MAXIMA_DIRECTORY"))
48 (n (length tem)))
49 (setq *maxima-directory* tem)
50 (cond ((> n 0)
51 (or (eql (aref tem (- n 1)) #\/)
52 (setq tem (format nil "~a/" tem)))
53 (setq *maxima-directory* tem))
54 #+gcl ((si::set-dir '*maxima-directory* "-dir"))
55 #+gcl (t (setq
56 *maxima-directory*
57 (namestring
58 (truename
59 (concatenate 'string
60 (namestring (make-pathname :name nil :defaults
61 (si::argv 0)))
62 "../"))))))
64 (or (boundp '*INFO-PATHS*) (setq *INFO-PATHS* nil) )
65 (push (maxima-path "info" "") *INFO-PATHS*)
66 (let ((ext #+gcl "o"
67 #+cmu (c::backend-fasl-file-type c::*target-backend*)
68 #-(or gcl cmu)
69 ""))
70 (setq $file_search_lisp
71 (list '(mlist)
72 (format nil "./###.{~A,lsp,lisp}" ext)
73 (maxima-path "{src,share1,sym}"
74 (concatenate 'string "###." ext))
75 (maxima-path "{src,share1,sym}"
76 (concatenate 'string "###." ext))
77 (maxima-path "{src,share}" "###.lisp")
78 (maxima-path "{sym}" "###.lsp"))))
79 (setq $file_search_maxima
80 (list '(mlist)
81 "./###.{mc,mac}"
82 (maxima-path "{mac,sym}" "###.mac")
83 (maxima-path "{share,share1,share2,tensor}" "###.mc")))
84 (setq $file_search_demo (list '(mlist)
85 (maxima-path "{demo,share,share1,share2}"
86 "###.{dem,dm1,dm2,dm3,dmt}")))
87 (setq $file_search_usage (list '(mlist)
88 (maxima-path "{demo,share,share1,share2}"
89 "###.{usg,texi}")
90 (maxima-path "doc"
91 "###.{mac}")
93 (setq $chemin
94 (maxima-path "sym" ""))
98 (defun user::run ()
99 (in-package "MAXIMA")
100 (catch 'to-lisp
101 (set-pathnames)
102 #+cmu
103 (progn
104 (init-maxima)
105 (loop
106 (with-simple-restart (macsyma-quit "Macsyma top-level")
107 (macsyma-top-level))))
108 #-cmu
109 (catch 'macsyma-quit
110 (macsyma-top-level))))
112 (import 'user::run)
113 ($setup_autoload "eigen.mc" '$eigenvectors '$eigenvalues)
114 #+gcl
115 (defun $tkconnect() (si::tkconnect))
116 (defun $to_lisp ()
117 (format t "~%Type (run) to restart~%")
118 (throw 'to-lisp t)
120 (defvar $help "type describe(topic) or example(topic);")
121 (defun $help() $help);
122 #+gcl
123 (load "init_max2.lisp")