From 6e4ba2b14c96a6f5a8833dc78f1d758cbfbf26f8 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Wed, 8 Jul 1992 17:19:39 +0000
Subject: [PATCH] Merged Olssons fix to WITH-ENABLED-INTERRUPTS now that it
 doesn't change interrupt characters anymore.

---
 code/signal.lisp | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/code/signal.lisp b/code/signal.lisp
index c52b71815..aaa08dc11 100644
--- a/code/signal.lisp
+++ b/code/signal.lisp
@@ -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)))))))
 
-- 
GitLab