X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=dev%2Fgraphviz%2Fgraphviz-support.lisp;h=eda1187d94071cd8aa7bd2253ddaa6833a2963f0;hb=a419a81fe65c79b62f1b9aef584572f7a21cf294;hp=411b82dd30a59cd5bb03c4714b06ab1cc37d3c56;hpb=9fb2488c515b9a579bf1d9f6769362d5d045d247;p=cl-graph.git diff --git a/dev/graphviz/graphviz-support.lisp b/dev/graphviz/graphviz-support.lisp index 411b82d..eda1187 100644 --- a/dev/graphviz/graphviz-support.lisp +++ b/dev/graphviz/graphviz-support.lisp @@ -2,8 +2,6 @@ #| simple-header -$Id: graphviz-support.lisp,v 1.7 2005/06/21 20:51:51 moody Exp $ - Author: Gary King, Levente Mészáros, Attila Lendvai DISCUSSION @@ -28,7 +26,8 @@ This file contains the stuff that does not depend on cl-graphviz. (edge-labeler 'princ) (edge-formatter 'edge->dot) &allow-other-keys) - (format stream "~A G {~%graph " (if (contains-undirected-edge-p g) "graph" "digraph")) + (format stream "~A G {~%graph " + (if (contains-undirected-edge-p g) "graph" "digraph")) (format stream "[") (funcall graph-formatter g stream) (format stream "];") @@ -355,14 +354,15 @@ B--D [] (defmacro defpixel-inch-accessors (name attr type) (bind ((actual-name (form-symbol name "-IN-PIXELS"))) `(progn - (export ',actual-name) + (eval-always (export ',actual-name)) (defmethod ,actual-name ((thing ,type)) "Return the attribute in pixels assuming 72 dpi" - (awhen (dot-attribute-value ,attr thing) - (* 72 it))) + (when (dot-attribute-value ,attr thing) + (* 72 (dot-attribute-value ,attr thing)))) (defmethod (setf ,actual-name) (value (thing ,type)) "Set the attribute in pixels assuming 72 dpi" - (setf (dot-attribute-value ,attr thing) (coerce (/ value 72) 'double-float)))))) + (setf (dot-attribute-value ,attr thing) + (coerce (/ value 72) 'double-float)))))) (defpixel-inch-accessors width :width dot-vertex-mixin) (defpixel-inch-accessors height :height dot-vertex-mixin) @@ -497,8 +497,10 @@ B--D [] (defmethod graph->dot-external ((g basic-graph) file-name &key (type :ps)) "Generate an external represenation of a graph to a file, by running the program in *dot-path*." + (declare (ignorable file-name)) (let ((dot-string (graph->dot g nil)) (dot-type (concatenate 'string "-T" (string-downcase (symbol-name type))))) + (declare (ignorable dot-string dot-type)) #+lispworks (with-open-stream (s (sys:open-pipe (concatenate 'string *dot-path* " -Tpng -o" file-name) :direction :input))