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.
This commit is contained in:
parent
9d7a63e073
commit
d2c7f64978
2 changed files with 16 additions and 8 deletions
13
runoff
13
runoff
|
@ -89,21 +89,20 @@ perl -e '
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(/(left|right)(\+?): (.*)/){
|
if(/(left|right): (.*)/){
|
||||||
$what = $1;
|
$what = $1;
|
||||||
$tens = ($2 eq "+" ? "5" : "0");
|
$file = $2;
|
||||||
$file = $3;
|
|
||||||
if(!defined($toc{$file})){
|
if(!defined($toc{$file})){
|
||||||
print STDERR "Have no toc for $file\n";
|
print STDERR "Have no toc for $file\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if($what eq "left" && !($toc{$file} =~ /^\d[$left]$tens/)){
|
if($what eq "left" && !($toc{$file} =~ /^\d[$left][05]/)){
|
||||||
print STDERR "$file does not start on a fresh left page [$toc{$file}]\n";
|
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?
|
# 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){
|
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;
|
next;
|
||||||
}
|
}
|
||||||
|
|
11
runoff.spec
11
runoff.spec
|
@ -1,5 +1,14 @@
|
||||||
sheet1: left
|
sheet1: left
|
||||||
|
|
||||||
|
# "left" and "right" specify which page of a two-page spread a file
|
||||||
|
# must start on. "left" means that a file must start on the first of
|
||||||
|
# the two page. "right" means it must start on the second of the two
|
||||||
|
# pages. The file may start in either column.
|
||||||
|
#
|
||||||
|
# "even" and "odd" specify which column a file must start on. "even"
|
||||||
|
# means it must start in the left of the two columns. "odd" means it
|
||||||
|
# must start in the right of the two columns.
|
||||||
|
|
||||||
# types.h either
|
# types.h either
|
||||||
# param.h either
|
# param.h either
|
||||||
# defs.h either
|
# defs.h either
|
||||||
|
@ -26,7 +35,7 @@ even: proc.h # mild preference
|
||||||
# allocproc userinit growproc fork
|
# allocproc userinit growproc fork
|
||||||
# and another with
|
# and another with
|
||||||
# scheduler sched yield forkret sleep wakeup1 wakeup
|
# scheduler sched yield forkret sleep wakeup1 wakeup
|
||||||
right+: proc.c # VERY important
|
right: proc.c # VERY important
|
||||||
|
|
||||||
# setjmp.S either
|
# setjmp.S either
|
||||||
# vm.c either
|
# vm.c either
|
||||||
|
|
Loading…
Reference in a new issue