From 079608ba6c8dff6203d164b58e914ff4e9db1e88 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 20 Mar 2012 23:13:35 -0300 Subject: [PATCH] cameo/zstack.pl: don't output lower layers at higher Z We leave this to the designer :-) --- cameo/zstack.pl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cameo/zstack.pl b/cameo/zstack.pl index 5700a94..f27597e 100755 --- a/cameo/zstack.pl +++ b/cameo/zstack.pl @@ -22,17 +22,16 @@ sub usage sub issue { - local ($z) = @_; + local ($c, $z) = @_; my $t; # # The order here is a bit arbitrary. We sort to make the outcome # more predictable but it shouldn't really matter. # - for my $c (sort { $b <=> $a } grep { $_ <= $z } keys %z) { - ($t = $z{$c}) =~ s/\s+-?\d+(\.\d*)?$/ $z/mg; - print $t; - } + + ($t = $z{$c}) =~ s/\s+-?\d+(\.\d*)?$/ $z/mg; + print $t; } @@ -73,8 +72,8 @@ $z = $z0; for $c (sort { $b <=> $a } keys %z) { while ($z > $c+$zs) { $z -= $zs; - &issue($z); + &issue($c, $z); } $z = $c; - &issue($z); + &issue($c, $z); }