diff options
author | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-01-27 14:22:17 +0000 |
---|---|---|
committer | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-01-27 14:22:17 +0000 |
commit | e0fa7cac47b40ea2e80ce307644d3f6d0882d500 (patch) | |
tree | 40622ca75447c3dc2896654824c34f30142bacd5 /Build/source/texk/dvipdfm-x/dvipdfmx.c | |
parent | 2e5f42f2a5ab9526bb4deff35d3b18c4f45f9a39 (diff) |
dvipsk, dvipdfm-x [win32]: Revise procedure of reading command line arguments
git-svn-id: svn://tug.org/texlive/trunk@32803 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dvipdfmx.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvipdfmx.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c index b5e0eb7ba89..85c19b4ac9e 100644 --- a/Build/source/texk/dvipdfm-x/dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c @@ -884,29 +884,18 @@ do_mps_pages (void) } } -#ifdef WIN32 -int argc; -char **argv; -#endif - /* TODO: MetaPost mode */ #if defined(MIKTEX) # define main Main #endif int CDECL -#ifdef WIN32 -main (int ac, char *av[]) -#else main (int argc, char *argv[]) -#endif { double dvi2pts; char *base; #ifdef WIN32 - char *enc; - - argc=ac; - argv=av; + int ac; + char **av, *enc; #endif #ifdef MIKTEX @@ -916,7 +905,10 @@ main (int argc, char *argv[]) #ifdef WIN32 texlive_gs_init (); enc = kpse_var_value("command_line_encoding"); - get_command_line_args_utf8(enc, &argc, &argv); + if (get_command_line_args_utf8(enc, &ac, &av)) { + argc = ac; + argv = av; + } #endif #endif |