1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-27 15:50:10 +01:00

Update Nyquist to v3.09.

This commit is contained in:
Leland Lucius
2015-04-07 22:10:17 -05:00
parent f88b27e6d8
commit 9fb0ce5b82
358 changed files with 26327 additions and 7043 deletions

View File

@@ -30,11 +30,46 @@
(defmacro init-global (symb expr)
`(if (boundp ',symb) ,symb (setf ,symb ,expr)))
; enable or disable breaks
(defun bkon () (setq *breakenable* T))
(defun bkoff () (setq *breakenable* NIL))
; controlling breaks and tracebacks:
; XLISP and SAL behave differently, so there are four(!) flags:
; *sal-traceback* -- print SAL traceback on error in SAL mode
; Typically you want this on always.
; *sal-break* -- allow break (to XLISP prompt) on error when in SAL mode
; (overrides *sal-traceback*) Typically, you do not want
; this unless you need to see exactly where an error happened
; or the bug is in XLISP source code called from SAL.
; *xlisp-break* -- allow break on error when in XLISP mode
; Typically, you want this on.
; *xlisp-traceback* -- print XLISP traceback on error in XLISP mode
; Typically, you do not want this because the full
; stack can be long and tedious.
(setf *sal-mode* nil)
(setf *sal-traceback* t
*sal-break* nil
*xlisp-break* t
*xlisp-traceback* nil)
(defun sal-tracenable (flag) (setf *sal-traceback* flag))
(defun sal-breakenable (flag)
(setf *sal-break* flag)
(if *sal-mode* (setf *breakenable* flag)))
(defun xlisp-breakenable (flag)
(setf *xlisp-break* flag)
(if (not *sal-mode*) (setf *breakenable* flag)))
(defun xlisp-tracenable (flag)
(setf *xlisp-traceback* flag)
(if flag (setf *xlisp-break* t))
(cond ((not *sal-mode*)
(if flag (setf *breakenable* t))
(setf *tracenable* flag))))
; enable or disable breaks
(defun bkon () (xlisp-breakenable t))
(defun bkoff () (xlisp-breakenable nil))
(bkon)
;; (grindef 'name) - pretty print a function
;;
@@ -98,8 +133,11 @@
(cond (*loadingfiles*
(setf fullpath (car *loadingfiles*))
(dotimes (i (length fullpath))
(cond ((equal (char fullpath i) *file-separator*)
;; search for "/" (and on windows, also "\") in path:
(cond ((or (equal (char fullpath i) *file-separator*)
(equal (char fullpath i) #\/))
(setf n i))))
;; trim off filename (after last separator char in path
(setf fullpath (subseq fullpath 0 (1+ n)))
;; REMOVED SUPPORT FOR MAC OS-9 AND BELOW -RBD
@@ -148,7 +186,9 @@
(setf file-name `(strcat (current-path) ,file-name)))
(path
(setf file-name `(strcat ,path ,file-name))))
; (display "require-from" file-name)
`(if (fboundp (quote ,fn-symbol))
t
(load ,file-name)))
;; search for either .lsp or .sal file
(sal-load ,file-name)))