1;;; -*-  Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 8 -*- ;;;;;
2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3;;;     The data in this file contains enhancments.                    ;;;;;
4;;;                                                                    ;;;;;
5;;;  Copyright (c) 1984,1987 by William Schelter,University of Texas   ;;;;;
6;;;     All rights reserved                                            ;;;;;
7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8
9(in-package :maxima)
10
11(defvar *macro-file* nil)
12
13#+gcl
14(progn
15  (system::clines "#define MAKE_UNSPECIAL(x) (check_type_symbol(&(x)),(x)->s.s_stype = stp_ordinary, Cnil)")
16  (system::defentry make-unspecial (system::object) (system::object "MAKE_UNSPECIAL")))
17
18#+(or scl cmu)
19(defun make-unspecial (symbol)
20  (ext:clear-info variable c::kind symbol)
21  symbol)
22
23
24(defmacro declare-top (&rest decl-specs)
25  `(eval-when
26    ,(cond (*macro-file*  #+gcl '(compile eval load)
27			  #-gcl '(:compile-toplevel :load-toplevel :execute) )
28	   (t #+gcl '(eval compile) #-gcl '(:compile-toplevel :execute)))
29    ,@(loop for v in decl-specs
30	     unless (member (car v) '(special unspecial)) nconc nil
31	     else
32	     when (eql (car v) 'unspecial)
33	     collect `(progn
34		       ,@(loop for w in (cdr v)
35				collect #-(or gcl scl cmu ecl)
36                                       `(remprop ',w
37						 #-excl 'special
38						 #+excl 'excl::.globally-special.)
39				#+(or gcl scl cmu ecl)
40			        `(make-unspecial ',w)))
41	     else collect `(proclaim ',v))))
42
43;;; This list should contain all specials required by runtime or more than one maxima file,
44;;; except for some specials declared in the macro files, eg displm
45
46(declaim (special
47	  $% $%% $%edispflag $%emode $%enumer $%e_to_numlog $%iargs $%piargs
48	  $%rnum $%rnum_list $absboxchar $activecontexts $algebraic $algexact
49	  $aliases $arrays $askexp $assumescalar $backsubst $berlefact
50	  $beta_args_sum_to_integer $bftorat $bftrunc $boxchar
51	  $breakup $cauchysum $compgrind $context
52	  $contexts $current_let_rule_package $debugmode
53	  $default_let_rule_package $demoivre $dependencies $derivabbrev
54	  $derivsubst $detout $dispflag $display2d
55	  $display_format_internal $doallmxops $domain $domxexpt $domxmxops
56	  $domxnctimes $domxplus $domxtimes $dontfactor $doscmxops
57	  $doscmxplus $dot0nscsimp $dot0simp $dot1simp $dotassoc
58	  $dotconstrules $dotdistrib $dotexptsimp $dotident $dotscrules
59	  $erfflag $errexp $error $error_size $error_syms $expon
60	  $exponentialize $expop $exptdispflag $exptisolate $exptsubst
61	  $facexpand $factorflag $features $file_search
62	  $float $float2bf $floatformat $floatfrac $floatint
63	  $floatoptions $floatprec $floatwidth $fortfloat $fortindent
64	  $fortspaces $fpprec $fpprintprec $functions $gammalim $gcd
65	  $genindex $gensumnum $globalsolve $gradefs $halfangles $homog_hack
66	  $inchar $infeval $inflag $intfaclim
67	  $isolate_wrt_times $keepfloat $labels $leftjust $letrat $letvarsimp
68	  $let_rule_packages $liflag $linechar $linenum $linel
69	  $linsolvewarn $linsolve_params $lispdisp $listarith $listconstvars
70	  $lmxchar $logarc $logconcoeffp $logexpand $lognegint
71	  $logsimp $m1pbranch $macroexpansion $macros $maperror $mapprint
72	  $matrix_element_add $matrix_element_mult $matrix_element_transpose
73	  $maxapplydepth $maxapplyheight $maxnegex $maxposex
74	  $maxtayorder $mode_checkp $mode_check_errorp $mode_check_warnp
75	  $multiplicities $mx0simp $myoptions $nalgfac $negdistrib
76	  $negsumdispflag $nolabels $norepeat $noundisp $numer
77	  $numer_pbranch $opsubst $optimprefix $optionset $outchar
78	  $parsewindow $partswitch $pfeformat $piece $pointbound
79	  $poislim $powerdisp $prederror $programmode $props
80	  $radexpand $ratalgdenom $ratdenomdivide $ratepsilon $ratexpand
81          $ratfac $ratmx $ratprint $ratsimpexpons $ratvars $ratvarswitch
82          $ratweights
83	  $ratwtlvl $realonly $refcheck $resultant $rmxchar $rootsconmode
84	  $rules $savedef $savefactors $scalarmatrixp $setcheck
85	  $setcheckbreak $setval $showtime $signbfloat $simp $simpsum
86	  $solvedecomposes $solveexplicit $solvefactors $solvenullwarn
87	  $solveradcan $solvetrigwarn $sparse
88	  $sqrtdispflag $stardisp $sublis_apply_lambda
89	  $subnumsimp $sumexpand $sumsplitfact
90	  $taylor_logexpand
91	  $taylor_truncate_polynomials $timer $timer_devalue
92	  $trace $trace_break_arg $trace_max_indent
93	  $trace_safety $transcompile $translate $transrun
94	  $trigexpand $trigexpandplus $trigexpandtimes $triginverses
95	  $trigsign $tr_array_as_ref $tr_bound_function_applyp
96	  $tr_file_tty_messagesp $tr_float_can_branch_complex
97	  $tr_function_call_default $tr_numer
98	  $tr_optimize_max_loop
99	  $tr_semicompile $tr_state_vars
100	  $tr_true_name_of_file_being_translated $tr_warn_bad_function_calls
101	  $tr_warn_fexpr $tr_warn_meval $tr_warn_mode $tr_warn_undeclared
102	  $tr_warn_undefined_variable
103	  $use_fast_arrays $values $vect_cross
104	  $zerobern %e-val %p%i %pi-val %pi//2 %pi//4 %pi2 *$any-modes*
105	  *alpha *const* *fnewvarsw *gcdl* *in *in-compile*
106	  *in-translate-file* *inv* *irreds *min* *mx*
107	  *n *opers-list *out *ratweights *tr-warn-break* *transl-backtrace*
108	  *transl-debug* *warned-fexprs*
109	  *warned-mode-vars* *warned-un-declared-vars* *zexptsimp? |-1//2|
110	  -sqrt3//2 |1//2| adn* aexprp algfac* algnotexact
111	  alpha *alphabet* arrays aryp assigns *atp* atvars *baktrcl*
112	  bfhalf bfmhalf bigfloat%e bigfloat%pi bigfloatone bigfloatzero
113	  bindlist *mdebug*
114	  declares defined_variables defintdebug derivflag derivlist
115	  derivsimp displayp dn* dosimp dsksetp dummy-variable-operators
116	  errorsw evarrp evp expandflag expandp
117	  exprs exptrlsw factlist featurel fexprs fmaplvl
118	  fourth%pi fr-factor gauss
119	  generate-atan2 genpairs genvar half%pi half%pi3
120	  implicit-real in-p infinitesimals infinities inratsimp inside-mprog
121	  integerl *islinp* lexprs limit-answers limitp linel
122	  *linelabel* local loclist low* maplp mdop
123	  meta-prop-l meta-prop-p mfexprp minpoly* mlocp mm* modulus *mopl*
124	  mplc* mprogp mproplist mspeclist msump munbindp
125	  need-prog? negprods negsums nn* noevalargs nonintegerl
126	  *nounl* *nounsflag* opers opers-list outargs1 outargs2
127	  preserve-direction prods radcanp
128	  real-infinities realonlyratnum *refchkl* return-mode returns rulefcnl
129	  rulesw scanmapp sign-imag-errp simplimplus-problems
130	  *small-primes* specials sqrt3//2 $stringdisp substp
131	  sums tellratlist timesinp tr-abort tr-progret tr-unique
132	  transl-file translate-time-evalables transp
133	  tstack typel varlist wflag
134	  $cflength *trunclist $taylordepth
135	  $maxtaydiff $verbose $psexpand ps-bmt-disrep
136	  silent-taylor-flag $define_variable $infolists
137	  $factor_max_degree $factor_max_degree_print_warning))
138
139(declaim (declaration unspecial))
140