summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-11-01 23:23:20 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-11-01 23:23:20 +0000
commitcd10673915bd0effcb0170c048764a7fc4c2dcc3 (patch)
tree4604106adea1a22af05fe51300d46629e23a2acc /Build
parent7f9d5282652829ff5c3080f0e4e87fadb9fbf32c (diff)
dvipsk: add a new option to tweak special papersize
git-svn-id: svn://tug.org/texlive/trunk@42420 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipsk/ChangeLog6
-rw-r--r--Build/source/texk/dvipsk/dospecial.c2
-rw-r--r--Build/source/texk/dvipsk/dvips.c6
-rw-r--r--Build/source/texk/dvipsk/dvips.help2
-rw-r--r--Build/source/texk/dvipsk/protos.h1
-rw-r--r--Build/source/texk/dvipsk/resident.c3
6 files changed, 17 insertions, 3 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index c70441cc79a..df3eb9a158a 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-01 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * dospecial.c, dvips.c, dvips.help, protos.h, resident.c:
+ Add a new option -L* Last special papersize wins.
+ dvips -L0 ... gives the old behavior.
+
2016-10-30 Karl Berry <karl@tug.org>
* output.c (INVALID_EPOCH_VALUE): define as (time_t) -1,
diff --git a/Build/source/texk/dvipsk/dospecial.c b/Build/source/texk/dvipsk/dospecial.c
index b295c643e5d..225dc4e9b23 100644
--- a/Build/source/texk/dvipsk/dospecial.c
+++ b/Build/source/texk/dvipsk/dospecial.c
@@ -434,7 +434,7 @@ case 'p':
p += 9;
while (*p == '=' || *p == ' ')
p++;
- if (hpapersize == 0 || vpapersize == 0) {
+ if (lastpsizwins || hpapersize == 0 || vpapersize == 0) {
if (landscape) {
error(
"both landscape and papersize specified: ignoring landscape");
diff --git a/Build/source/texk/dvipsk/dvips.c b/Build/source/texk/dvipsk/dvips.c
index ae22ff794d7..b98d5e69017 100644
--- a/Build/source/texk/dvipsk/dvips.c
+++ b/Build/source/texk/dvipsk/dvips.c
@@ -137,6 +137,7 @@ quarterword *raster; /* area for raster manipulations */
integer hh, vv; /* horizontal and vertical pixel positions */
Boolean noomega = 0; /* Omega extensions are enabled */
Boolean noptex = 0; /* pTeX extensions are enabled */
+Boolean lastpsizwins = 1; /* if 1, last \special{papersize=w,h} wins */
/*-----------------------------------------------------------------------*
* The PATH definitions cannot be defined on the command line because so many
@@ -281,7 +282,7 @@ static const char *helparr[] = {
"-i* Separate file per section",
"-j* Download fonts partially",
"-k* Print crop marks -K* Pull comments from inclusions",
-"-l # Last page",
+"-l # Last page -L* Last special papersize wins",
"-m* Manual feed -M* Don't make fonts",
"-mode s Metafont device name",
"-n # Maximum number of pages -N* No structured comments",
@@ -1011,6 +1012,9 @@ case 'E' :
case 'K' :
removecomments = (*p != '0');
break;
+case 'L' :
+ lastpsizwins = (*p != '0');
+ break;
case 'U' :
nosmallchars = (*p != '0');
break;
diff --git a/Build/source/texk/dvipsk/dvips.help b/Build/source/texk/dvipsk/dvips.help
index d7d687bfaf2..cd37705dec7 100644
--- a/Build/source/texk/dvipsk/dvips.help
+++ b/Build/source/texk/dvipsk/dvips.help
@@ -14,7 +14,7 @@ Options:
-i* Separate file per section
-j* Download fonts partially
-k* Print crop marks -K* Pull comments from inclusions
--l # Last page
+-l # Last page -L* Last special papersize wins
-m* Manual feed -M* Don't make fonts
-mode s Metafont device name
-n # Maximum number of pages -N* No structured comments
diff --git a/Build/source/texk/dvipsk/protos.h b/Build/source/texk/dvipsk/protos.h
index a027b207b4a..95af3dd59b2 100644
--- a/Build/source/texk/dvipsk/protos.h
+++ b/Build/source/texk/dvipsk/protos.h
@@ -303,6 +303,7 @@ extern quarterword *raster;
extern integer hh, vv;
extern Boolean noomega;
extern Boolean noptex;
+extern Boolean lastpsizwins;
extern const char *infont;
#ifndef KPATHSEA
extern char *tfmpath;
diff --git a/Build/source/texk/dvipsk/resident.c b/Build/source/texk/dvipsk/resident.c
index a7b496d8cda..e4cae5a1d8b 100644
--- a/Build/source/texk/dvipsk/resident.c
+++ b/Build/source/texk/dvipsk/resident.c
@@ -673,6 +673,9 @@ case 'E' :
case 'K':
removecomments = (was_inline[1] != '0');
break;
+case 'L':
+ lastpsizwins = (was_inline[1] != '0');
+ break;
case 'U':
nosmallchars = (was_inline[1] != '0');
break;