summaryrefslogtreecommitdiff
path: root/runoff
diff options
context:
space:
mode:
authorAustin Clements <[email protected]>2010-09-02 04:03:42 -0400
committerAustin Clements <[email protected]>2010-09-02 04:03:42 -0400
commitd2c7f6497810f05b961df11db75def7ea79b8ec2 (patch)
tree21ce14baaa0fcf9d8258a50ad55bb1709b657514 /runoff
parent9d7a63e0734b4c7abe5ae00eda302e7d7a22a482 (diff)
downloadxv6-labs-d2c7f6497810f05b961df11db75def7ea79b8ec2.tar.gz
xv6-labs-d2c7f6497810f05b961df11db75def7ea79b8ec2.tar.bz2
xv6-labs-d2c7f6497810f05b961df11db75def7ea79b8ec2.zip
I totally misunderstood the even/odd spec. Add some docs, remove my 'left+' hack, and orthogonalize left/right versus even/odd so you can specify them independently.
Diffstat (limited to 'runoff')
-rwxr-xr-xrunoff13
1 files changed, 6 insertions, 7 deletions
diff --git a/runoff b/runoff
index 3dee1cc..345fb2e 100755
--- a/runoff
+++ b/runoff
@@ -89,21 +89,20 @@ perl -e '
next;
}
- if(/(left|right)(\+?): (.*)/){
+ if(/(left|right): (.*)/){
$what = $1;
- $tens = ($2 eq "+" ? "5" : "0");
- $file = $3;
+ $file = $2;
if(!defined($toc{$file})){
print STDERR "Have no toc for $file\n";
next;
}
- if($what eq "left" && !($toc{$file} =~ /^\d[$left]$tens/)){
- 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[$right]$tens/);
+ $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;
}