summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;