Skip to content
Snippets Groups Projects
Commit 6e4ba2b1 authored by ram's avatar ram
Browse files

Merged Olssons fix to WITH-ENABLED-INTERRUPTS now that it doesn't change

interrupt characters anymore.
parent 548472ce
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,11 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.15 1992/03/26 03:16:30 wlott Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.16 1992/07/08 17:19:39 ram Exp $")
;;;
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.15 1992/03/26 03:16:30 wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.16 1992/07/08 17:19:39 ram Exp $
;;;
;;; Code for handling UNIX signals.
;;;
......@@ -336,14 +336,10 @@
;;;; WITH-ENABLED-INTERRUPTS
(defmacro with-enabled-interrupts (interrupt-list &body body)
"With-enabled-interrupts ({(interrupt function [character])}*) {form}*
Establish function as a handler for the Unix signal interrupt which
should be a number between 1 and 31 inclusive. For the signals that
can be generated from the keyboard, the optional character specifies
the character to use to generate the signal."
"With-enabled-interrupts ({(interrupt function)}*) {form}*
Establish function as a handler for the Unix signal interrupt which
should be a number between 1 and 31 inclusive."
(let ((il (gensym))
(fn (gensym))
(ch (gensym))
(it (gensym)))
`(let ((,il NIL))
(unwind-protect
......@@ -351,17 +347,13 @@
,@(do* ((item interrupt-list (cdr item))
(intr (caar item) (caar item))
(ifcn (cadar item) (cadar item))
(ichr (caddar item) (caddar item))
(forms NIL))
((null item) (nreverse forms))
(if (symbolp intr)
(setq intr (symbol-value intr)))
(push `(multiple-value-bind (,fn ,ch)
(enable-interrupt ,intr ,ifcn
,ichr)
(push `(,,intr ,,fn ,,ch) ,il)) forms))
(when (symbolp intr)
(setq intr (symbol-value intr)))
(push `(push `(,,intr ,(enable-interrupt ,intr ,ifcn)) ,il)
forms))
,@body)
(dolist (,it (nreverse ,il))
(funcall #'enable-interrupt (car ,it) (cadr ,it) (caddr ,it)))))))
(enable-interrupt (car ,it) (cadr ,it)))))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment