]> granicus.if.org Git - graphviz/commitdiff
fix php demo
authorellson <devnull@localhost>
Wed, 9 Jan 2008 21:20:16 +0000 (21:20 +0000)
committerellson <devnull@localhost>
Wed, 9 Jan 2008 21:20:16 +0000 (21:20 +0000)
tclpkg/gv/demo/modgraph.php

index 2b6640e222895b9854265206ca804efcd8d2a845..a15a88e8eb277749f52b5a2113f02a6dd8f0ad9e 100755 (executable)
@@ -25,8 +25,8 @@ while ( ! feof($f)) {
        $rec = fgets($f);
 
        $matches = preg_split("/[\s]+/", $rec, -1, PREG_SPLIT_NO_EMPTY);
-       $n = gv::node($G,$matches[0]);
-       $usedbylist = preg_split("/[,]/", $matches[3], -1, PREG_SPLIT_NO_EMPTY);
+       $n = gv::node($G,$matches[0:0]);
+       $usedbylist = preg_split("/[,]/", $matches[3:0], -1, PREG_SPLIT_NO_EMPTY);
        foreach ($usedbylist as $i => $usedby) {
                if ($usedby != "-") {
                        gv::edge($n, gv::node($G, $usedby));
@@ -36,6 +36,6 @@ while ( ! feof($f)) {
 fclose($f);
 
 gv::layout($G, "dot");
-gv::render($G, "png");
+gv::render($G, "xlib");
 
 ?>