[cl-typesetting-devel] patches

Gary King gwking at metabang.com
Wed Jan 31 00:08:21 UTC 2007


Here are the patches that remove all compiler warnings (at least  
under Allegro). As in CL-PDF, most of these are (declare  
(ignore ...)) style things.

I will commit these unless I hear otherwise.


Index: tables.lisp
===================================================================
--- tables.lisp	(revision 130)
+++ tables.lisp	(working copy)
@@ -201,6 +201,7 @@
		       +epsilon+))))
(defmethod v-split ((table table) dx dy)
+  (declare (ignore dx))
    "Factor out rows that fit and return a split table + the table."
    ;; Treat unsplittable rows as a single unit - for this purpose,
    ;; group the rows list into the following form:
Index: layout.lisp
===================================================================
--- layout.lisp	(revision 130)
+++ layout.lisp	(working copy)
@@ -15,6 +15,7 @@
    box)
(defmethod cut-point-p (box)
+  (declare (ignore box))
    nil)
(defmethod cut-point-p ((box (eql :eol)))
@@ -170,6 +171,7 @@
        (return-lines))))
(defmethod do-layout (box)
+  (declare (ignore box))
    )
(defmethod do-layout ((hbox hbox))
Index: kw-extensions.lisp
===================================================================
--- kw-extensions.lisp	(revision 130)
+++ kw-extensions.lisp	(working copy)
@@ -235,6 +235,7 @@
    ((type :accessor mark-type :initform nil :initarg :type)))
(defmethod stroke ((mark change-mark) x y)
+  (declare (ignore x))
    ;; "stroking" change marks just records their positions for later
    ;; rendering in the postprocessing hook
    (cond ((eq :start-insert (mark-type mark))
Index: boxes.lisp
===================================================================
--- boxes.lisp	(revision 130)
+++ boxes.lisp	(working copy)
@@ -12,27 +12,35 @@
     ))
(defmethod dx (box)
+  (declare (ignore box))
    0)
(defmethod (setf dx) (value box)
+  (declare (ignore box))
    value)
(defmethod dy (box)
+  (declare (ignore box))
    0)
(defmethod (setf dy) (value box)
+  (declare (ignore box))
    value)
(defmethod baseline (box)
+  (declare (ignore box))
    0)
(defmethod (setf baseline) (value box)
+  (declare (ignore box))
    value)
(defmethod offset (box)
+  (declare (ignore box))
    0)
(defmethod (setf offset) (value box)
+  (declare (ignore box))
    value)
(defclass h-mode-mixin ()
@@ -42,18 +50,23 @@
    ())
(defmethod delta-size (obj)
+  (declare (ignore obj))
    0)
(defmethod max-expansion (obj)
+  (declare (ignore obj))
    0)
(defmethod expansibility (obj)
+  (declare (ignore obj))
    0)
(defmethod max-compression (obj)
+  (declare (ignore obj))
    0)
(defmethod compressibility (obj)
+  (declare (ignore obj))
    0)
(defclass soft-box (box)
@@ -65,9 +78,11 @@
     (locked :accessor locked :initform nil :initarg :locked)))
(defmethod locked (box)
+  (declare (ignore box))
    t)
(defmethod (setf locked) (value box)
+  (declare (ignore box))
    value)
(defclass container-box (soft-box)
@@ -106,30 +121,35 @@
    ((trimmable-p :accessor trimmable-p :initform  
nil :initarg :trimmable-p)))
(defmethod soft-box-p (box)
+  (declare (ignore box))
    nil)
(defmethod soft-box-p ((box soft-box))
    t)
(defmethod char-box-p (box)
+  (declare (ignore box))
    nil)
(defmethod char-box-p ((box char-box))
    t)
(defmethod white-char-box-p (box)
+  (declare (ignore box))
    nil)
(defmethod white-char-box-p ((box white-char-box))
    t)
(defmethod trimmable-p (box)
+  (declare (ignore box))
    nil)
(defmethod trimmable-p ((box glue))
    t)
(defmethod white-space-p (box)
+  (declare (ignore box))
    nil)
(defmethod white-space-p ((box glue))
@@ -139,18 +159,21 @@
    t)
(defmethod hmode-p (box)
+  (declare (ignore box))
    nil)
(defmethod hmode-p ((box h-mode-mixin))
    t)
(defmethod vmode-p (box)
+  (declare (ignore box))
    nil)
(defmethod vmode-p ((box v-mode-mixin))
    t)
(defmethod adjust-box-dx (box dx baseline)
+  (declare (ignore box dx baseline))
    nil)
(defmethod adjust-box-dx ((box hbox) dx baseline)
@@ -164,6 +187,7 @@
	  (baseline box) baseline)))
(defmethod adjust-box-dy (box dy baseline)
+  (declare (ignore box dy baseline))
    nil)
(defgeneric v-split (box dx dy)
Index: boxes-fn.lisp
===================================================================
--- boxes-fn.lisp	(revision 130)
+++ boxes-fn.lisp	(working copy)
@@ -34,6 +34,7 @@
	finally (return (values (+ max-baseline max-bottom) max-baseline))))
(defmethod compute-natural-box-size (box)
+  (declare (ignore box))
    )
(defmethod compute-natural-box-size ((box hbox))
@@ -44,9 +45,11 @@
        (setf (dy box) size (internal-baseline box) baseline))))
(defmethod (setf boxes) :after (value (box container-box))
+  (declare (ignore value))
    (compute-natural-box-size box))
-(defmethod initialize-instance :after ((box container-box) &key  
fixed-size &allow-other-keys)
+(defmethod initialize-instance :after
+    ((box container-box) &key fixed-size &allow-other-keys)
    (unless fixed-size
      (compute-natural-box-size box)))
@@ -57,6 +60,7 @@
    (setf (dy box) (compute-boxes-natural-size (boxes box) #'dy)))
(defmethod align-baseline (box alignment)
+  (declare (ignore box alignment))
    )
(defmethod align-baseline ((box hbox) alignment)
Index: hyphenation-fp.lisp
===================================================================
--- hyphenation-fp.lisp	(revision 130)
+++ hyphenation-fp.lisp	(working copy)
@@ -53,9 +53,11 @@
    )
(defmethod (setf pattern-trie) (value hyphen-trie)
+  (declare (ignore hyphen-trie))
    value)
(defmethod (setf exception-trie) (value hyphen-trie)
+  (declare (ignore hyphen-trie))
    value)
(defvar *left-hyphen-minimum* 2
Index: typo.lisp
===================================================================
--- typo.lisp	(revision 130)
+++ typo.lisp	(working copy)
@@ -8,12 +8,14 @@
    ((name :accessor name :initform nil)))
(defmethod use-style (style)
+  (declare (ignore style))
    )
(defmethod style-p ((style style))
    t)
(defmethod style-p (obj)
+  (declare (ignore obj))
    nil)
(defclass text-style (style)
@@ -290,6 +292,7 @@
(defmacro with-text-content ((content &key dont-save-style) &body body)
    ;; TODO dont-save-style is not used, fix it or delete
+  (declare (ignore dont-save-style))
    (with-gensyms (the-content)
      `(let* ((,the-content ,content)
	    (*content* ,the-content)
Index: stroke.lisp
===================================================================
--- stroke.lisp	(revision 130)
+++ stroke.lisp	(working copy)
@@ -5,6 +5,7 @@
(in-package #:typeset)
(defmethod stroke (box x y)
+  (declare (ignore box x y))
    )
(defmethod stroke :before ((box char-box) x y)
@@ -99,6 +100,7 @@
        (end-text-chunk))))
(defmethod stroke ((style text-style) x y)
+  (declare (ignore x y))
    (when (font style)
      (setf *font* (font style)))
    (when (font-size style)

--
Gary Warren King, metabang.com
Cell: (413) 885 9127
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM







More information about the cl-typesetting-devel mailing list