diff options
author | Frans Kaashoek <[email protected]> | 2011-07-27 20:49:45 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-07-27 20:49:45 -0400 |
commit | dccb915282854476ce47752df6631dcce3b8f661 (patch) | |
tree | a84aa8ed35618f99c3d7e8cdd466d22ae7bad597 /runoff | |
parent | 9acdfe0d04f3fcf95c6e392e08afb45bdfe16c20 (diff) | |
parent | 13a96baefc0ff5d8262c4bc8c797bee4b157443c (diff) | |
download | xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.gz xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.bz2 xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.zip |
Merge commit 'origin/master' into page
Diffstat (limited to 'runoff')
-rwxr-xr-x | runoff | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -58,6 +58,13 @@ perl -e ' next; } + if(/sheet1: (left|right)$/){ + print STDERR "assuming that sheet 1 is a $1 page. double-check!\n"; + $left = $1 eq "left" ? "13579" : "02468"; + $right = $1 eq "left" ? "02468" : "13579"; + next; + } + if(/even: (.*)/){ $file = $1; if(!defined($toc{$file})){ @@ -89,18 +96,13 @@ perl -e ' print STDERR "Have no toc for $file\n"; next; } - # this assumes that sheet 1 of code is a left page - # double-check the PDF - if(!$leftwarn++) { - print STDERR "assuming that sheet 1 is a left page. double-check!\n"; - } - if($what eq "left" && !($toc{$file} =~ /^\d[13579]0/)){ - print STDERR "$file does not start on a fresh left page [$toc{$file}]\n"; + if($what eq "left" && !($toc{$file} =~ /^\d[$left][05]/)){ + print STDERR "$file does not start on a left page [$toc{$file}]\n"; } # why does this not work if I inline $x in the if? - $x = ($toc{$file} =~ /^\d[02468]0/); + $x = ($toc{$file} =~ /^\d[$right][05]/); if($what eq "right" && !$x){ - print STDERR "$file does not start on a fresh right page [$toc{$file}] [$x]\n"; + print STDERR "$file does not start on a right page [$toc{$file}] [$x]\n"; } next; } @@ -189,7 +191,9 @@ do uses=`egrep -h '([^a-zA-Z_0-9])'$i'($|[^a-zA-Z_0-9])' alltext | awk '{print $1}'` if [ "x$defs" != "x$uses" ]; then echo $i $defs - echo $uses |fmt -24 | sed 's/^/ /' + echo $uses |fmt -29 | sed 's/^/ /' +# else +# echo $i defined but not used >&2 fi done ) >refs |