summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/dvipdfmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dvipdfmx.c')
-rw-r--r--Build/source/texk/dvipdfm-x/dvipdfmx.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c
index 83bc0ed21cf..a196894c5cc 100644
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.c
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c
@@ -150,7 +150,7 @@ set_default_pdf_filename(void)
static void
show_version (void)
{
- fprintf (stdout, "\nThis is %s Version " VERSION " by %s,\n",
+ fprintf (stdout, "This is %s Version " VERSION " by %s,\n",
my_name,
is_xetex ? "Jonathan Kew and Jin-Hwan Cho"
: "the DVIPDFMx project team");
@@ -910,6 +910,16 @@ main (int argc, char *argv[])
#endif
#endif
+ /* Special-case single option --help or --version, to avoid possible
+ diagnostics about config files, etc. */
+ if (argc == 2 && STREQ (argv[1], "--help")) {
+ show_usage();
+ exit(0);
+ } else if (argc == 2 && STREQ (argv[1], "--version")) {
+ show_version();
+ exit(0);
+ }
+
if (argc > 1 &&
(STREQ (argv[1], "--xbb") ||
(!is_xetex && STREQ (argv[1], "--dvipdfm")) ||