From ed08347d63a31a35ad5f35f6fe0568faef8e45e7 Mon Sep 17 00:00:00 2001
From: csr21 <unknown>
Date: Thu, 3 Apr 2003 06:00:37 -0500
Subject: [PATCH] Make the qix demo work by binding FIXNUM-declared variables
 to NIL

Make the qix demo work by binding FIXNUM-declared variables to NIL
Make all the demos work by using OPEN-DEFAULT-DISPLAY under sbcl.

darcs-hash:20030403110037-ed5a3-debd88843cbaa9d4298ee83d0413f32c4468f26e.gz
---
 demo/clx-demos.lisp | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/demo/clx-demos.lisp b/demo/clx-demos.lisp
index a2883a9..8d7cf97 100644
--- a/demo/clx-demos.lisp
+++ b/demo/clx-demos.lisp
@@ -36,7 +36,11 @@
        (unless *display*
 	 #+:cmu
 	 (multiple-value-setq (*display* *screen*) (ext:open-clx-display))
-	 #-:cmu
+	 #+sbcl
+	 (progn
+	   (setf *display* (xlib::open-default-display))
+	   (setf *screen* (xlib:display-default-screen *display*)))
+	 #-(or cmu sbcl)
 	 (progn
 	   ;; Portable method
 	   (setf *display* (xlib:open-display (machine-instance)))
@@ -241,12 +245,14 @@
 	  (rplaca (qix-buffer h)
 		  (make-array 4 :initial-contents (list x y x y)))))
       (rplacd (last histories) histories)
-      (let (x1 y1 x2 y2 dx1 dy1 dx2 dy2 tem line next-line qix
-	       (gc (xlib:create-gcontext :drawable window
-					 :foreground *white-pixel*
-					 :background *black-pixel*
-					 :line-width 0 :line-style :solid
-					 :function boole-c2)))
+      (let ((x1 0) (y1 0) (x2 0) (y2 0)
+	    (dx1 0) (dy1 0) (dx2 0) (dy2 0)
+	    tem line next-line qix
+	    (gc (xlib:create-gcontext :drawable window
+				      :foreground *white-pixel*
+				      :background *black-pixel*
+				      :line-width 0 :line-style :solid
+				      :function boole-c2)))
 	(declare (fixnum x1 y1 x2 y2 dx1 dy1 dx2 dy2))
 	(dotimes (i duration)
 	  ;; Line is the next line in the next qix. Rotate this qix and
-- 
GitLab