summaryrefslogtreecommitdiff
path: root/doc/genps.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-18 20:36:25 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-18 20:36:25 +0000
commite0372c8c05e436ea84e7a3aa215afa721a32c305 (patch)
treeed5dcb0b78378efd8eaa2306d148a9cda3cf3f08 /doc/genps.pl
parent42e89b00a21a8038f50801ef27eb7dc6db76ccdf (diff)
downloadnasm-e0372c8c05e436ea84e7a3aa215afa721a32c305.tar.gz
Add version number to the cover page, generated from the version file.
Diffstat (limited to 'doc/genps.pl')
-rwxr-xr-xdoc/genps.pl17
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/genps.pl b/doc/genps.pl
index e2b985ee..6bf0d384 100755
--- a/doc/genps.pl
+++ b/doc/genps.pl
@@ -66,6 +66,8 @@ while ( $arg = shift(@ARGV) ) {
$psbool{$parm} = $true;
} elsif ( $true && defined($psconf{$parm}) ) {
$psconf{$parm} = shift(@ARGV);
+ } elsif ( $parm =~ /^(title|subtitle|year|author|license)$/ ) {
+ $metadata{$parm} = shift(@ARGV);
} else {
die "$0: Unknown option: $arg\n";
}
@@ -1053,17 +1055,24 @@ $ps_page = 0;
# Title page
ps_start_page();
-$title = $metadata{'title'};
+$title = $metadata{'title'} || '';
$title =~ s/ \- / $emdash /;
-$pstitle = ps_string($title);
+
+$subtitle = $metadata{'subtitle'} || '';
+$subtitle =~ s/ \- / $emdash /;
# Print title
+print "/ti ", ps_string($title), " def\n";
+print "/sti ", ps_string($subtitle), " def\n";
print "lmarg pageheight 2 mul 3 div moveto\n";
print "tfont0 setfont\n";
-print "/title linkdest ${pstitle} show\n";
+print "/title linkdest ti show\n";
print "lmarg pageheight 2 mul 3 div 10 sub moveto\n";
print "0 setlinecap 3 setlinewidth\n";
-print "pagewidth lmarg sub rmarg sub 0 rlineto stroke\n";
+print "pagewidth lmarg sub rmarg sub 0 rlineto currentpoint stroke moveto\n";
+print "hfont1 setfont sti stringwidth pop neg ",
+ -$HeadFont{leading}, " rmoveto\n";
+print "sti show\n";
# Print logo, if there is one
# FIX: To be 100% correct, this should look for DocumentNeeded*