aboutsummaryrefslogtreecommitdiffstats
path: root/doc/genps.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2017-04-17 16:01:31 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2017-04-17 16:01:31 -0700
commit7e9d4fdf8db15791b6408b717723cd565ecf5d1c (patch)
treea5cd3447293360561677e1ec6797c3360a28f981 /doc/genps.pl
parent84deac219db1b0b8c9df53d9b81ac0b5ca7578e6 (diff)
downloadnasm-daily-7e9d4fdf8db15791b6408b717723cd565ecf5d1c.tar.gz
nasm-daily-7e9d4fdf8db15791b6408b717723cd565ecf5d1c.tar.xz
nasm-daily-7e9d4fdf8db15791b6408b717723cd565ecf5d1c.zip
nasmdoc.pdf: always begin a chapter on an odd pagenasm-2.13rc20-20170418
If we want to print the document, we really want each chapter to start on an odd (right-facing) page; otherwise it gets rather strange. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'doc/genps.pl')
-rwxr-xr-xdoc/genps.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/genps.pl b/doc/genps.pl
index 88e57388..4758bb9d 100755
--- a/doc/genps.pl
+++ b/doc/genps.pl
@@ -829,6 +829,8 @@ sub ps_break_pages($$) {
# First line of a new chapter heading. Start a new page.
undef $columnstart;
$curpage++ if ( $curypos > 0 || defined($columnstart) );
+ # Always start on an odd page
+ $curpage |= 1;
$curypos = $chapstart;
} elsif ( defined($columnstart) && $$linfo[0] !~ /$columnregexp/o ) {
undef $columnstart;
@@ -1232,10 +1234,10 @@ ps_start_page();
foreach $line ( @pslines ) {
my $linfo = $line->[0];
- if ( $$linfo[4] != $curpage ) {
+ while ( $$linfo[4] > $curpage ) {
ps_end_page($curpage > 2);
ps_start_page();
- $curpage = $$linfo[4];
+ $curpage++;
}
print '[';