[mcclim-cvs] CVS mcclim/Apps/Scigraph/scigraph

cfruhwirth cfruhwirth at common-lisp.net
Fri Mar 17 07:12:53 UTC 2006


Update of /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph
In directory clnet:/tmp/cvs-serv2101

Modified Files:
	axis.lisp basic-graph.lisp draw.lisp graph-data.lisp 
	mouse.lisp package.lisp present.lisp random.lisp 
	scigraph-system.lisp 
Log Message:

Build fixes for scigraph and sbcl/cmucl.

Consisting mostly of:

* Replacing (ignore x) with (declare (ignore x)).
* Hide custom declarations in defmethod from sbcl/cmu that both choke on
these.
* Change defconstant on cons into a defvar, for recompilation sake.
* Unwrap defpackage from eval-when.
* Change the memoize macro to use load-time-value to generate a
hash-table.

--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/axis.lisp	2003/10/31 11:35:37	1.1
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/axis.lisp	2006/03/17 07:12:52	1.2
@@ -158,8 +158,8 @@
   (macrolet
     ((push-digits (number length string)
        `(dotimes (.i. ,length)
-	  (ignore .i.)
-	  (vector-push-extend (digit-char (values (floor ,number))) ,string extension)
+	 (declare (ignore .i.))
+	 (vector-push-extend (digit-char (values (floor ,number))) ,string extension)
 	  (setf ,number (mod (* 10.0 ,number) 10.0)))))
     (push-digits number ilength string)	; Integer part.
     (setq flength (- max-digits ilength))	; Fractional part.
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/basic-graph.lisp	2004/08/06 13:19:40	1.2
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/basic-graph.lisp	2006/03/17 07:12:52	1.3
@@ -557,6 +557,7 @@
 
 (defmethod graph-with-clipping ((self basic-graph) STREAM inside-p continuation)
   ;; Internal to WITH-CLIPPING-TO-GRAPH macro.
+  #-(or sbcl cmu)
   (declare (downward-funarg continuation))
   (multiple-value-bind (le re be te)
       (if inside-p (screen-inside self STREAM) (screen-outside self STREAM))
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/draw.lisp	2004/08/06 13:19:40	1.2
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/draw.lisp	2006/03/17 07:12:52	1.3
@@ -320,7 +320,7 @@
 
 (defconstant *DASH-PATTERN-SIZE* 64 "Length of dashed pattern in pixels.")
 (defconstant *DASH-STEP-SIZE* (/ *dash-pattern-size* 8))
-(defconstant *DASH-PATTERNS*
+(defvar *DASH-PATTERNS*
 	     #2A((8  7  6  5  4  3  2  1)
 		 (7  6  5  4  3  2  1 -1)
 		 (5  4  3  2  1 -1  1 -1)
@@ -331,7 +331,7 @@
 		 (1 -1  1 -1  1 -1  1 -1))
 	     "Dashed line patterns.  -1 -> lift pen.")
 
-(defconstant *dash-pattern-alist*
+(defvar *dash-pattern-alist*
 	     '(("----------------" :value 0)
 	       ("------- ------- " :value 1)
 	       ("----- - ----- - " :value 2)
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/graph-data.lisp	2003/10/31 11:35:38	1.1
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/graph-data.lisp	2006/03/17 07:12:52	1.2
@@ -94,11 +94,13 @@
 
 (defmethod map-data ((dataset t) function (data sequence))
   "Map FUNCTION over each datum."
+  #-(or sbcl cmu)
   (declare (downward-funarg function))
   (map nil function data))
 
 (defmethod map-data-xy ((dataset ESSENTIAL-GRAPH-DATA-MAP-MIXIN) function data)
   "Map function over each x y pair."
+  #-(or sbcl cmu)
   (declare (downward-funarg function))
   (declare (compiled-function function))
   (map-data dataset
@@ -649,7 +651,7 @@
 	 (last-in nil)
 	 (last-u NIL)
 	 (last-v NIL))
-    (declare (fixnum last-u last-v thickness))
+    (declare (fixnum thickness))
     (if (< bottom top) (psetq top bottom bottom top))
     (if (zerop line-style)
 	(let ((displayer (compute-line-displayer self)))
@@ -1115,7 +1117,7 @@
   (unless *repainting-dataset*
     (with-new-output-record (stream 'dataset-record-element record
 					 :dataset dataset :graph graph)
-				 (ignore record)
+				 (declare (ignore record))
 				 :done)))
 
 (defclass presentable-mixin
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/mouse.lisp	2005/01/11 12:45:35	1.6
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/mouse.lisp	2006/03/17 07:12:52	1.7
@@ -90,8 +90,7 @@
       ;; In 0.9, we can take advantage of one of the BBN clim extensions.
       (notify-user frame string)))
    (:clim-1.0
-    (progn
-      (ignore stream)
+    (locally (declare (ignore stream))
       (let ((stream clim::*pointer-documentation-output*)
 	    #+genera (documentation-window (clim::mouse-documentation-window stream)))
 	#+genera
@@ -102,16 +101,14 @@
 	  (window-clear stream)
 	  (format stream string)))))
    ((and :clim-2 (not :mcclim))
-    (progn
-      (ignore stream)
+    (locally (declare (ignore stream))
       (clim:frame-manager-display-pointer-documentation-string
        (frame-manager *application-frame*)
        *application-frame*
        clim:*pointer-documentation-output*
        string)))
    (:mcclim
-    (progn
-      (ignore stream)
+    (locally (declare (ignore stream))
       (clim-extensions:frame-display-pointer-documentation-string
        *application-frame* clim:*pointer-documentation-output* string)))
    ((not :clim) nil)))
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/package.lisp	2004/12/28 11:45:30	1.3
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/package.lisp	2006/03/17 07:12:52	1.4
@@ -27,22 +27,25 @@
 
 (in-package #-ansi-cl :user #+ansi-cl :common-lisp-user)
 
-(eval-when (compile load eval)
-  (defpackage TOOL
-    #+MCL     (:shadow copy)
-    (:use dwim-lisp)))
-
-(eval-when (compile load eval)
-  (defpackage STATISTICS
-    (:nicknames stat st)
-    (:use dwim-lisp)))
-
-(eval-when (compile load eval)
-  (defpackage GRAPH
-    #-allegro (:nicknames gr)           ; "GR" names something already.
-    (:shadow variable)                  ; shouldn't be inherited but is
-    #+MCL     (:shadow copy)
-    (:use dwim-lisp tool statistics)))
+(defpackage TOOL
+  #+MCL     (:shadow copy)
+  (:use dwim-lisp))
+
+(defpackage STATISTICS
+  (:nicknames stat st)
+  (:use dwim-lisp))
+
+(defpackage GRAPH
+  #-allegro (:nicknames gr)           ; "GR" names something already.
+  (:shadow variable)                  ; shouldn't be inherited but is
+  #+MCL     (:shadow copy)
+  (:use dwim-lisp tool statistics))
+
+(in-package :graph)
+
+(declaim (declaration downward-funarg
+		      downward-function
+		      array-register))
 
-(dwim:make-command-table :graph)
 
+(dwim:make-command-table :graph)
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/present.lisp	2003/10/31 11:35:38	1.1
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/present.lisp	2006/03/17 07:12:52	1.2
@@ -178,7 +178,7 @@
 	    (dotimes (column columns)
 	      (let ((g nil))
 		(dotimes (row rows)
-		  (ignore row)
+		  (declare (ignore row))
 		  (let ((temp (pop graphs)))
 		    (and temp (push temp g))))
 		(stream-set-cursor-position*
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/random.lisp	2003/10/31 11:35:38	1.1
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/random.lisp	2006/03/17 07:12:52	1.2
@@ -289,7 +289,7 @@
 				  (setq .entry. (multiple-value-list , at body)))
 			    (values-list .entry.))))))
 
-  `(let ((.table. ,(make-hash-table :test #'equal)))
+  `(let ((.table. (load-time-value (make-hash-table :test #'equal))))
      ,(if (cdr args)
 	  `(with-stack-list (.args. , at args) ,body)
 	  `(let ((.args. ,(first args))) ,body)))))
--- /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/scigraph-system.lisp	2003/10/31 11:35:38	1.1
+++ /project/mcclim/cvsroot/mcclim/Apps/Scigraph/scigraph/scigraph-system.lisp	2006/03/17 07:12:52	1.2
@@ -86,6 +86,3 @@
   ("frame" :load-before-compile ("duplicate-methods")) 
   ("export" :load-before-compile ("frame")) 
   ("demo-frame" :load-before-compile ("export")))
-  
-
-




More information about the Mcclim-cvs mailing list