diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-20 18:09:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-20 18:09:32 +0000 |
commit | a65dc1bcbc389c1b017601758db3956f3585d5c7 (patch) | |
tree | 1a410cd2896577a2b8b7ee48780a0bdfa6617fa9 /Build/source/texk/dvipdfm-x | |
parent | 210445a41c30b2b0a79219e3b2a59803f67fae1e (diff) |
special-case --help and --version on their own
git-svn-id: svn://tug.org/texlive/trunk@33234 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvipdfmx.c | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 02aa97adee5..8d3a7ccb052 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,9 @@ +2014-03-20 Karl Berry <karl@tug.org> + + * dvipdfmx.c (show_version): eliminate useless leading blank line. + (main): special-case --help and --version on their own to avoid + possible diagnostics. + 2014-03-18 Peter Breitenlohner <peb@mppmu.mpg.de> * xbb.c: Update one more Copyright year. 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")) || |