diff options
Diffstat (limited to 'ovsdb/dot2pic')
-rwxr-xr-x | ovsdb/dot2pic | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ovsdb/dot2pic b/ovsdb/dot2pic index 3e2f3089..caca9f8d 100755 --- a/ovsdb/dot2pic +++ b/ovsdb/dot2pic @@ -21,9 +21,10 @@ my ($scale) = 1; print ".PS\n"; print "linethick = 1;\n"; while (<>) { - if (/graph (\S+) (\S+) (\S+)/) { - $scale = $1; - } elsif (my ($name, $x, $y, $width, $height, $label, $style, $shape, $color, $fillcolor) = /node (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)/) { + if (/^graph/) { + (undef, $scale) = split; + } elsif (/^node/) { + my (undef, $name, $x, $y, $width, $height, $label, $style, $shape, $color, $fillcolor) = split; $x *= $scale; $y *= $scale; $width *= $scale; |