chiark / gitweb /
slopecalc shows cp relative heights
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 6 Nov 2010 13:54:30 +0000 (13:54 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 6 Nov 2010 13:54:30 +0000 (13:54 +0000)
layout/slopecalc

index f42cfe27e4c8513b5c3d085c00443c95dc2c3ec6..33ffe2abe1b5164c90da0090136eb2e352e1ac51 100755 (executable)
@@ -179,10 +179,11 @@ sub dump_schedule ($) {
     $absoffset=0 unless defined $absoffset;
     my $i;
     my $last_l= 0;
+    my $last_h;
     my $last;
     for ($i=0; $i<@cp; $i++) {
        my $this= $cp[$i];
-       lprintf("%4s  %7s  %7s   =%5.2f  %s %5.02f%%   %s",
+       lprintf("%4s  %7s  %7s   =%5.2f  %s %5.02f%%   %s   %s",
                "#$i",
                '+'.($this->{L} - $last_l),
                '@'.($this->{L} - $absoffset),
@@ -191,6 +192,9 @@ sub dump_schedule ($) {
                 $this->{S} > 0 ? '\\' :
                 '|'),
                $this->{S} * 100,
+               (defined $last_h ?
+                sprintf "=%+6.2f", $this->{H} - $last_h :
+                '       '),
                "@{ $this->{Args} }");
        my $next= $cp[$i+1];
        if ($interpolate and defined $next) {
@@ -222,6 +226,7 @@ sub dump_schedule ($) {
            }
        }
         $last_l= $this->{L};
+        $last_h= $this->{H};
        $last= $this;
     }
     if ($interpolate) {