From a24687ce8eba24d3065bd38c139abfd7720fbb7b Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 24 May 2011 00:07:56 +0000 Subject: Move the Windows argument list conversion code to a common routine. svn path=/trunk/; revision=37372 --- capinfos.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'capinfos.c') diff --git a/capinfos.c b/capinfos.c index a5c6bd40e0..88af0b5237 100644 --- a/capinfos.c +++ b/capinfos.c @@ -95,7 +95,7 @@ #endif #ifdef _WIN32 -#include +#include #endif /* _WIN32 */ #include "svnversion.h" @@ -847,11 +847,6 @@ main(int argc, char *argv[]) int opt; int overall_error_status; -#ifdef _WIN32 - LPWSTR *wc_argv; - int wc_argc, i; -#endif /* _WIN32 */ - int status = 0; #ifdef HAVE_PLUGINS char *init_progfile_dir_error; @@ -864,13 +859,7 @@ main(int argc, char *argv[]) #endif #ifdef _WIN32 - /* Convert our arg list to UTF-8. */ - wc_argv = CommandLineToArgvW(GetCommandLineW(), &wc_argc); - if (wc_argv && wc_argc == argc) { - for (i = 0; i < argc; i++) { - argv[i] = g_utf16_to_utf8(wc_argv[i], -1, NULL, NULL, NULL); - } - } /* XXX else bail because something is horribly, horribly wrong? */ + arg_list_utf_16to8(argc, argv); #endif /* _WIN32 */ /* @@ -1114,4 +1103,3 @@ main(int argc, char *argv[]) } return overall_error_status; } - -- cgit v1.2.3