diff options
| author | Russ Cox <rsc@swtch.com> | 2009-08-08 01:07:30 -0700 | 
|---|---|---|
| committer | Russ Cox <rsc@swtch.com> | 2009-08-08 01:07:30 -0700 | 
| commit | 0aef8914959af9e472852611eb6352c211093d35 (patch) | |
| tree | 0658cf47dcb134b79e5311209c2a2840d1a79650 /runoff | |
| parent | b3bebfce8a790975ba941d346e6bcff1b5afecf9 (diff) | |
| download | xv6-labs-0aef8914959af9e472852611eb6352c211093d35.tar.gz xv6-labs-0aef8914959af9e472852611eb6352c211093d35.tar.bz2 xv6-labs-0aef8914959af9e472852611eb6352c211093d35.zip | |
shuffle and tweak for formatting.
pdf has very good page breaks now.
would be a good copy for fall 2009.
Diffstat (limited to 'runoff')
| -rwxr-xr-x | runoff | 26 | 
1 files changed, 25 insertions, 1 deletions
| @@ -45,6 +45,7 @@ cat toc.ftr >>fmt/toc  # check for bad alignments  perl -e ' +	$leftwarn = 0;  	while(<>){  		chomp;  		s!#.*!!; @@ -75,12 +76,35 @@ perl -e '  				print STDERR "Have no toc for $file\n";  				next;  			} -			if($toc{$file} =~ /^\d\d[^5]/){ +			if($toc{$file} !~ /^\d\d5/){  				print STDERR "$file does not start on a second half page.\n";  			}  			next;  		} +		if(/(left|right): (.*)/){ +			$what = $1; +			$file = $2; +			if(!defined($toc{$file})){ +				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"; +			} +			# why does this not work if I inline $x in the if? +			$x = ($toc{$file} =~ /^\d[02468]0/); +			if($what eq "right" && !$x){ +				print STDERR "$file does not start on a fresh right page [$toc{$file}] [$x]\n"; +			} +			next; +		} +		  		print STDERR "Unknown spec: $_\n";  	}  ' fmt/tocdata runoff.spec | 
