diff options
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dvipdfmx.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvipdfmx.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c index 644c92cf98c..b089dbc225f 100644 --- a/Build/source/texk/dvipdfm-x/dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c @@ -456,8 +456,11 @@ do_early_args (int argc, char *argv[]) } } +/* Set "unsafe" to non-zero value when parsing config specials to + * disallow overriding "D" option value. + */ static void -do_args (int argc, char *argv[], const char *source) +do_args (int argc, char *argv[], const char *source, int unsafe) { int c; char *nextptr; @@ -479,7 +482,11 @@ do_args (int argc, char *argv[], const char *source) break; case 'D': + if (unsafe) { + WARN("Ignoring \"D\" option for dvipdfmx:config special. (unsafe)"); + } else { set_distiller_template(optarg); + } break; case 'r': @@ -696,7 +703,7 @@ read_config_file (const char *config) argv[2] = parse_ident (&start, end); } } - do_args (argc, argv, config); + do_args (argc, argv, config, 0); while (argc > 1) { RELEASE (argv[--argc]); } @@ -736,7 +743,7 @@ read_config_special (const char **start, const char *end) argv[2] = parse_ident (start, end); } } - do_args (argc, argv, argv0); + do_args (argc, argv, argv0, 1); /* Set to unsafe */ while (argc > 1) { RELEASE (argv[--argc]); } @@ -991,7 +998,7 @@ main (int argc, char *argv[]) read_config_file(DPX_CONFIG_FILE); - do_args (argc, argv, NULL); + do_args (argc, argv, NULL, 0); #ifndef MIKTEX kpse_init_prog("", font_dpi, NULL, NULL); |