diff options
Diffstat (limited to 'Build/source/texk/dvipdfm-x/src/dvipdfmx.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/src/dvipdfmx.c | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/Build/source/texk/dvipdfm-x/src/dvipdfmx.c b/Build/source/texk/dvipdfm-x/src/dvipdfmx.c index 0b4ea307fe9..147454d933f 100644 --- a/Build/source/texk/dvipdfm-x/src/dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/src/dvipdfmx.c @@ -57,7 +57,6 @@ #include "cid.h" #include "dvipdfmx.h" -#include "xbb.h" #include "error.h" @@ -866,18 +865,41 @@ int CDECL main (int argc, char *argv[]) { double dvi2pts; + char *base; - char *base = kpse_program_basename (argv[0]); +#ifdef MIKTEX + miktex_initialize(); +#else + kpse_set_program_name(argv[0], "dvipdfmx"); /* we pretend to be dvipdfmx for kpse purposes */ +#ifdef WIN32 + texlive_gs_init (); +#endif +#endif + + if (argc > 1 && + (STREQ (argv[1], "--xbb") || +#ifndef XETEX + STREQ (argv[1], "--dvipdfm") || +#endif + STREQ (argv[1], "--ebb"))) { + argc--; + base = argv++[1]+2; + } else + base = kpse_program_basename (argv[0]); if (FILESTRCASEEQ (base, "extractbb") || FILESTRCASEEQ (base, "xbb")) - return extractbb (argc, argv, XBB_OUTPUT); - if (FILESTRCASEEQ (base, "ebb")) - return extractbb (argc, argv, EBB_OUTPUT); + return extractbb (argc, argv); + if (FILESTRCASEEQ (base, "ebb")) { + compat_mode = 1; + return extractbb (argc, argv); + } +#ifndef XETEX if (FILESTRCASEEQ (base, "dvipdfm")) compat_mode = 1; - - free (base); + else +#endif + free (base); if (argc < 2) { if (!really_quiet) @@ -886,12 +908,6 @@ main (int argc, char *argv[]) return 1; } -#ifdef MIKTEX - miktex_initialize(); -#else - kpse_set_program_name(argv[0], "dvipdfmx"); /* we pretend to be dvipdfmx for kpse purposes */ -#endif - paperinit(); system_default(); |