diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-24 00:07:56 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-24 00:07:56 +0000 |
commit | b0470ef1fe28e236a3c2ceb11dedd80e1753f16e (patch) | |
tree | df105f49b2895d2f74db9545ae4235aba0e95562 /dumpcap.c | |
parent | 5cb0387b39785c47df9d9d9ef44c36b8096da513 (diff) |
Move the Windows argument list conversion code to a common routine.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37372 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -85,7 +85,6 @@ #include "pcapio.h" #ifdef _WIN32 -#include <shellapi.h> #include "capture-wpcap.h" #include <wsutil/unicode-utils.h> #endif @@ -3645,8 +3644,6 @@ main(int argc, char *argv[]) #ifdef _WIN32 WSADATA wsaData; - LPWSTR *wc_argv; - int wc_argc; #else struct sigaction action, oldaction; #endif @@ -3670,13 +3667,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 */ #ifdef _WIN32 |