1 ;;;; XLISP-STAT 2.1 Copyright (c) 1990, by Luke Tierney
2 ;;;; Additions to Xlisp 2.1, Copyright (c) 1989 by David Michael Betz
3 ;;;; You may give out copies of this software; for conditions see the file
4 ;;;; COPYING included with this distribution.
9 #+macintosh
(dialog (step-dialog))
10 (help-string "~%:b - break~%:h - help (this message)~%:n - next~%:s - skip~%:e - evaluate~%"))
11 (labels ((indent () (terpri) (dotimes (i (* 2 hooklevel
)) (princ " ")))
16 ((member c
'(:s
:n
:b
)) (return c
))
17 ((equal c
:h
) (format t help-string
))
19 (print (evalhook (read)
23 (trace-hook-function (expr &optional env
)
24 (setq hooklevel
(1+ hooklevel
))
26 (format t
"Form: ~s" expr
)
28 (let ((value (evalhook expr
33 (format t
"Value: ~s" value
)
35 (setq hooklevel
(1- hooklevel
))
37 (step-hook-function (expr &optional env
)
38 (setq hooklevel
(1+ hooklevel
))
40 (format t
"Form: ~s" expr
)
42 (setq option
(if (atom expr
) nil
(read-option env
)))
43 (if (equal option
:b
) (break))
44 (let ((value (evalhook expr
46 nil
;#'trace-hook-function
51 (format t
"Value: ~s" value
)
53 (setq hooklevel
(1- hooklevel
))
55 (unwind-protect (step-hook-function expr
)
57 #+macintosh
(send dialog
:remove
)))))
60 (let* ((text-item (send text-item-proto
:new
" "
62 (send dialog-proto
:new
64 (send button-item-proto
:new
"Eval"
67 (send *listener
* :paste-string
69 (send text-item
:text
)))))
70 (send button-item-proto
:new
"Next"
73 (send *listener
* :paste-string
74 (format nil
":n~%"))))
75 (send button-item-proto
:new
"Skip"
78 (send *listener
* :paste-string
79 (format nil
":s~%")))))