Skip to content

Commit

Permalink
compiler.graphviz: use graphviz finder word.
Browse files Browse the repository at this point in the history
  • Loading branch information
erg committed Jun 25, 2015
1 parent 09e4606 commit fdcbe26
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions extra/compiler/graphviz/graphviz.factor
@@ -1,12 +1,11 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license
USING: accessors compiler.tree.builder compiler.cfg compiler.cfg.rpo
compiler.cfg.dominance compiler.cfg.dominance.private
compiler.cfg.predecessors compiler.cfg.debugger compiler.cfg.optimizer
compiler.cfg.utilities compiler.tree.recursive images.viewer
images.png io io.encodings.ascii io.files io.files.unique io.launcher
kernel math.parser sequences assocs arrays make math namespaces
quotations combinators locals words ;
USING: accessors arrays assocs combinators compiler.cfg
compiler.cfg.debugger compiler.cfg.dominance
compiler.cfg.dominance.private compiler.cfg.rpo
compiler.tree.builder compiler.tree.recursive graphviz.render io
io.encodings.ascii io.files io.files.unique io.launcher kernel
make math math.parser namespaces quotations sequences words ;
FROM: assocs => change-at ;
IN: compiler.graphviz

Expand All @@ -24,7 +23,7 @@ IN: compiler.graphviz
"cfg" ".dot" make-unique-file
dup "Wrote " prepend print
[ [ concat ] dip ascii set-file-lines ]
[ { "dot" "-Tpng" "-O" } swap suffix try-process ]
[ [ ?default-graphviz-program "-Tpng" "-O" ] dip 4array try-process ]
[ ".png" append ]
tri ; inline

Expand Down

0 comments on commit fdcbe26

Please sign in to comment.