diff options
| author | Austin Clements <amdragon@mit.edu> | 2010-08-31 17:46:30 -0400 | 
|---|---|---|
| committer | Austin Clements <amdragon@mit.edu> | 2010-08-31 17:46:30 -0400 | 
| commit | 13b3f4d2e32eee81ba039ad3c6a6c97bfc9d4638 (patch) | |
| tree | 3d17b238107d0b81e171c52407d849d52358962c | |
| parent | fd462b6a01735cc7a14b9cb11c99242c5ed03c03 (diff) | |
| download | xv6-labs-13b3f4d2e32eee81ba039ad3c6a6c97bfc9d4638.tar.gz xv6-labs-13b3f4d2e32eee81ba039ad3c6a6c97bfc9d4638.tar.bz2 xv6-labs-13b3f4d2e32eee81ba039ad3c6a6c97bfc9d4638.zip | |
Make it possible to express half-page preferences
| -rwxr-xr-x | runoff | 9 | 
1 files changed, 5 insertions, 4 deletions
| @@ -82,9 +82,10 @@ perl -e '  			next;  		} -		if(/(left|right): (.*)/){ +		if(/(left|right)(\+?): (.*)/){  			$what = $1; -			$file = $2; +			$tens = ($2 eq "+" ? "5" : "0"); +			$file = $3;  			if(!defined($toc{$file})){  				print STDERR "Have no toc for $file\n";  				next; @@ -95,11 +96,11 @@ perl -e '  			if(!$leftwarn++) {  				print STDERR "assuming that sheet 1 is a right page.  double-check!\n";  			} -			if($what eq "left" && !($toc{$file} =~ /^\d[02468]0/)){ +			if($what eq "left" && !($toc{$file} =~ /^\d[02468]$tens/)){  				print STDERR "$file does not start on a fresh left page [$toc{$file}]\n";  			}  			# why does this not work if I inline $x in the if? -			$x = ($toc{$file} =~ /^\d[13579]0/); +			$x = ($toc{$file} =~ /^\d[13579]$tens/);  			if($what eq "right" && !$x){  				print STDERR "$file does not start on a fresh right page [$toc{$file}] [$x]\n";  			} | 
