1 ;;; -*- Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 10 -*- ;;;;
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; The data in this file contains enhancments. ;;;;;
5 ;;; Copyright (c) 1984,1987 by William Schelter,University of Texas ;;;;;
6 ;;; All rights reserved ;;;;;
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; (c) Copyright 1982 Massachusetts Institute of Technology ;;;
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13 (macsyma-module displm macro
)
16 ;; evaluate for declarations
18 linel
;Width of screen.
19 ttyheight
;Height of screen.
21 width height depth maxht maxdp level size lop rop break right
22 bkpt bkptwd bkptht bkptdp bkptlevel bkptout lines
26 ;;; macros for the DISPLA package.
28 ;; (PUSH-STRING "foo" RESULT) --> (SETQ RESULT (APPEND '(#/o #/o #/f) RESULT))
30 (defmacro push-string
(string symbol
)
31 (check-arg symbol symbolp
"a symbol")
33 `(setq ,symbol
(list* ,@(nreverse (exploden string
)) ,symbol
))
34 `(setq ,symbol
(append (nreverse (exploden ,string
)) ,symbol
))))
36 ;; Macros for setting up dispatch table.
37 ;; Don't call this DEF-DISPLA, since it shouldn't be annotated by
38 ;; TAGS and @. Syntax is:
39 ;; (DISPLA-DEF [<operator>] [<dissym> | <l-dissym> <r-dissym>] [<lbp>] [<rbp>])
40 ;; If only one integer appears in the form, then it is taken to be an RBP.
42 ;; This should be modified to use GJC's dispatch scheme where the subr
43 ;; object is placed directly on the symbol's property list and subrcall
44 ;; is used when dispatching.
46 (defmacro displa-def
(operator dim-function
&rest rest
&aux l-dissym r-dissym lbp rbp
)
49 (if l-dissym
(setq r-dissym x
) (setq l-dissym x
)))
51 (if rbp
(setq lbp rbp
))
53 (t (merror "DISPLA-DEF: unrecognized object: ~a" x
))))
55 (setq l-dissym
(if r-dissym
56 (cons (exploden l-dissym
) (exploden r-dissym
))
57 (exploden l-dissym
))))
59 (defprop ,operator
,dim-function dimension
)
60 ,(when l-dissym
`(defprop ,operator
,l-dissym dissym
))
61 ,(when lbp
`(defprop ,operator
,lbp lbp
))
62 ,(when rbp
`(defprop ,operator
,rbp rbp
))))