[cl-pdf-devel] Two very minor cl-pdf patches....
Gary King
gwking at franz.com
Fri Aug 18 16:59:10 UTC 2006
Below are two proposed cl-pdf patches. The first alters the system
def so that it tries harder to find the system defs for iterate and
salza. In particular, it searches using both the *load-pathname* and
the *load-truename*. This helps deal with symbolic links. At least in
my case, CL-PDF would not load for me because I was loading a
symbolic link to cl-pdf.asd rather than the physical file.
The second patch just adds an in-package to the examples file.
Please let me know if you have any questions, etc.
Index: cl-pdf.asd
===================================================================
--- cl-pdf.asd (revision 118)
+++ cl-pdf.asd (working copy)
@@ -22,10 +22,17 @@
(pushnew :uffi cl:*features*)
(print "UFFI loaded."))
-(load (merge-pathnames "iterate/iterate.asd" *load-truename*))
+(flet ((load-if (it)
+ (when (probe-file it)
+ (load it))))
+ (or (load-if (merge-pathnames "iterate/iterate.asd" *load-pathname*))
+ (load-if (merge-pathnames "iterate/iterate.asd" *load-truename*))
+ (find-system 'iterate))
-#+use-salza-zlib
-(load (merge-pathnames "salza/salza.asd" *load-truename*))
+ #+use-salza-zlib
+ (or (load-if (merge-pathnames "salza/salza.asd" *load-pathname*))
+ (load-if (merge-pathnames "salza/salza.asd" *load-truename*))
+ (find-system 'salza)))
#+clisp (setf *warn-on-floating-point-contagion* nil)
Index: examples/examples.lisp
===================================================================
--- examples/examples.lisp (revision 118)
+++ examples/examples.lisp (working copy)
@@ -2,6 +2,8 @@
;;; You can reach me at marc.battyani at fractalconcept.com or
marc at battyani.net
;;; The homepage of cl-pdf is here: http://www.fractalconcept.com/asp/
html/cl-pdf.html
+(in-package #:pdf)
+
(defun example1 (&optional (file #P"/tmp/ex1.pdf"))
(pdf:with-document ()
(pdf:with-page ()
--
Gary Warren King
metabang.com [http://www.metabang.com/]
(413) 885 9127 * (206) 338-4052 [Fax]
gwking on #lisp (occasionally)
More information about the cl-pdf-devel
mailing list