News for hackers. Stuff that matters.
Re:Land Of Lisp chapter 7 - Using SBCL by gibsonf1 on Sunday October 31, 2010 @01:57AM (#1852592)
Here's a function to create svg (default) or jpg for both sbcl and lispworks from graphviz:

(defun make-svg (file-name &key jpg)

    #+lispworks (sys:call-system-showing-output
                 (string+ cl-user::*organontech-graphviz* (if jpg " -Tjpg " " -Tsvg ")
                          cl-user::*fcgaa-lean-mapping-path*
                          "/" file-name ".dot"
                          " -o "
                          cl-user::*fcgaa-lean-mapping-path*
                          "/" file-name (if jpg ".jpg" ".svg")))
    #+sbcl (sb-ext:run-program cl-user::*organontech-graphviz*
                                 (list (if jpg "-Tjpg" "-Tsvg")
                                       (string+ cl-user::*fcgaa-lean-mapping-path* "/" file-name ".dot")
                                       "-o"
                                       (string+ cl-user::*fcgaa-lean-mapping-path* "/" file-name (if jpg ".jpg" ".svg")))
                                 :output (weblog-stream)
                                 )
    )
(defun weblog-stream ()

  (or (net.aserve:vhost-log-stream (net.aserve:wserver-default-vhost net.aserve:*wserver*))
      t)) ;;sends output directly to html stream on portable allegroserve
(defmacro string+ (string &rest strings) `(concatenate 'string ,string ,@strings))

There are no comments on this comment yet.