summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/dvipdfmx.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-08-04 22:22:18 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-08-04 22:22:18 +0000
commit7345e3d96db5fd95e0c8c79b2cee6d2e4d4610db (patch)
tree4e12664358d59579b35cd1418b836aa485ed56a9 /Build/source/texk/dvipdfm-x/dvipdfmx.c
parent8fe8e01cd9dc4177d5f98c145b2a3669f2e0ca73 (diff)
Ignore some of zlib errors. Fix a bug in -m option. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@51819 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dvipdfmx.c')
-rw-r--r--Build/source/texk/dvipdfm-x/dvipdfmx.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c
index e6a0fc89a17..b0a86e3ea5f 100644
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.c
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c
@@ -535,6 +535,18 @@ do_args_first_pass (int argc, char *argv[], const char *source, int unsafe)
dpx_conf.compat_mode = dpx_mode_mpost_mode;
break;
+ /* 'm' option placed here since other options set via special
+ * requires magnification already being determined for interpreting
+ * various length values.
+ */
+ case 'm':
+ {
+ char *nextptr;
+ if ((mag = strtod(optarg, &nextptr)) < 0.0 || nextptr == optarg)
+ ERROR("Invalid magnification specified: %s", optarg);
+ }
+ break;
+
default: /* ignore everything else */
break;
}
@@ -575,6 +587,13 @@ do_args_second_pass (int argc, char *argv[], const char *source, int unsafe)
case 'h': case 130: case 131: case 132: case 133: case 1000: case 'q': case 'v': case 'M': /* already done */
break;
+ /* 'm' option handled in first_pass */
+ case 'm':
+ if (unsafe) { /* FIXME: it's not actually 'unsafe'... just to know it's called from special */
+ WARN("Ignoring \"m\" option for dvipdfmx:config special. (too late)");
+ }
+ break;
+
case 'D':
if (unsafe) {
WARN("Ignoring \"D\" option for dvipdfmx:config special. (unsafe)");
@@ -591,11 +610,6 @@ do_args_second_pass (int argc, char *argv[], const char *source, int unsafe)
ERROR("Invalid bitmap font dpi specified: %s", optarg);
break;
- case 'm':
- if ((mag = strtod(optarg, &nextptr)) < 0.0 || nextptr == optarg)
- ERROR("Invalid magnification specified: %s", optarg);
- break;
-
case 'g':
nnextptr = nextptr = optarg;
read_length(&annot_grow, &nnextptr, nextptr + strlen(nextptr));