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/dvipsk/dvips.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/dvipsk/dvips.c')
-rw-r--r-- | Build/source/texk/dvipsk/dvips.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/Build/source/texk/dvipsk/dvips.c b/Build/source/texk/dvipsk/dvips.c index a6dd4bb8add..a3d242abbea 100644 --- a/Build/source/texk/dvipsk/dvips.c +++ b/Build/source/texk/dvipsk/dvips.c @@ -576,11 +576,6 @@ queryargs(void) qargv[qargc] = (char *)NULL; } -#if defined(KPATHSEA) && defined(WIN32) -int argc; -char **argv; -#endif - /* * Finally, our main routine. */ @@ -588,12 +583,8 @@ char **argv; main(void) #else int -#if defined(KPATHSEA) && defined(WIN32) -main(int ac, char **av) -#else main(int argc, char **argv) #endif -#endif { int i, lastext = -1; #ifdef MVSXA @@ -603,9 +594,8 @@ main(int argc, char **argv) #ifdef WIN32 #if defined(KPATHSEA) - char *enc; - argc=ac; - argv=av; + int ac; + char **av, *enc; #endif SET_BINARY(fileno(stdin)); SET_BINARY(fileno(stdout)); @@ -622,7 +612,10 @@ main(int argc, char **argv) kpse_set_program_enabled (kpse_pk_format, MAKE_TEX_PK_BY_DEFAULT, kpse_src_compile); #ifdef WIN32 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 |