[cl-typesetting-devel] cl-typesetting documents with damaged xreftable

Tayssir John Gabbour tayss_temp2 at yahoo.com
Mon Jan 24 21:11:12 UTC 2005


Hi all,

These Subversion diffs might be useful for anyone wanting to use cl-typesetting
on CLisp-2.33.1/Win32. I hope I didn't boneheadedly break something, though I
did test it out on examples.

Notes:
- pprint.lisp was modified because CLisp doesn't work well with Iterate. I've
sent in a bugreport. I rewrote using loop instead.
- Apparently CLisp-2.33.1 doesn't accept boxes.lisp's use of defgeneric syntax.
I haven't yet sent in a bugreport.

Hope to work more with cl-typesetting,
Tayssir



Index: specials.lisp
===================================================================
--- specials.lisp       (revision 80)
+++ specials.lisp       (working copy)
@@ -4,9 +4,14 @@

 (in-package typeset)

-#+clisp
+#+(and clisp win32)
 (setq custom:*floating-point-contagion-ansi* t
       custom:*warn-on-floating-point-contagion* nil
+      custom:*default-file-encoding* (ext:encoding-charset
charset:iso-8859-1))
+
+#+(and clisp (not win32))
+(setq custom:*floating-point-contagion-ansi* t
+      custom:*warn-on-floating-point-contagion* nil
       custom:*default-file-encoding* (ext:encoding-charset "iso-8859-1"))

 (defconstant +huge-number+ (truncate most-positive-fixnum 10))




Index: pprint.lisp
===================================================================
--- pprint.lisp (revision 80)
+++ pprint.lisp (working copy)
@@ -46,25 +46,28 @@
            (start 0)
            (trimmed 0)
            (length (length cleaned-line)))
-      (iter:iter
-       (setf trimmed (position #\Space cleaned-line :start start :test
#'char/=))
-       (while (and trimmed (< trimmed length)))
-       (for (values obj end) = (ignore-errors
-                                 (read-from-string
-                                  cleaned-line nil nil
-                                  :start trimmed :preserve-whitespace t)))
-       (unless (numberp end)
-         (setf end (position #\Space cleaned-line :start trimmed :test
#'char=)))
-       (while (and (numberp end) (< end length)))
-       (cond ((keywordp obj)
-              (push (list* trimmed end *pp-keyword-decoration*) decorations))
-             ((stringp obj)
-              (push (list* trimmed end *pp-string-decoration*) decorations))
-             ((gethash obj *pp-symbol-decoration-table*)
-              (push (list* trimmed end (gethash obj
*pp-symbol-decoration-table*)) decorations))
-             ((and (symbolp obj)(eq (symbol-package obj) cl-package))
-              (push (list* trimmed end *pp-common-lisp-decoration*)
decorations)))
-       (setf start end))
+
+
+
+      (loop for trimmed = (setf trimmed (position #\Space cleaned-line :start
start :test #'char/=))
+            while (and trimmed (< trimmed length))
+            for (values obj end) = (multiple-value-list (ignore-errors
+                                                          (read-from-string
+                                                           cleaned-line nil
nil
+                                                           :start trimmed
:preserve-whitespace t)))
+            unless (numberp end)
+              do (setf end (position #\Space cleaned-line :start trimmed :test
#'char=))
+            while (and (numberp end) (< end length))
+              do (cond ((keywordp obj)
+                        (push (list* trimmed end *pp-keyword-decoration*)
decorations))
+                       ((stringp obj)
+                        (push (list* trimmed end *pp-string-decoration*)
decorations))
+                       ((gethash obj *pp-symbol-decoration-table*)
+                        (push (list* trimmed end (gethash obj
*pp-symbol-decoration-table*)) decorations))
+                       ((and (symbolp obj)(eq (symbol-package obj)
cl-package))
+                        (push (list* trimmed end *pp-common-lisp-decoration*)
decorations)))
+            (setf start end))
+
       (setf start 0)
       (loop for (start-tok end-tok font-name color) in (nreverse decorations)
do
             (when (/= start start-tok)




Index: boxes.lisp
===================================================================
--- boxes.lisp  (revision 80)
+++ boxes.lisp  (working copy)
@@ -166,15 +166,16 @@
 (defmethod adjust-box-dy (box dy baseline)
   nil)

-(defgeneric v-split ((box v-mode-mixin) dx dy)
+;;(defgeneric v-split (v-mode-mixin dx dy))
+
+(defmethod v-split ((box v-mode-mixin) dx dy)
  ;;; Split a v-mode box vertically into two parts
   ;; Args: dx - area width, dy - area height
   ;; Values: box-fitted, box-left, dy-left
- (:method (box dx dy)
   (declare (ignore dx))
   (if (> (dy box) dy)
       (values nil box dy)
-      (values box nil (- dy (dy box))))))
+      (values box nil (- dy (dy box)))))

 (defgeneric boxes-left (content))





		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 



More information about the cl-typesetting-devel mailing list