aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2011-05-24 00:07:56 +0000
committerGerald Combs <gerald@wireshark.org>2011-05-24 00:07:56 +0000
commita24687ce8eba24d3065bd38c139abfd7720fbb7b (patch)
treedf105f49b2895d2f74db9545ae4235aba0e95562 /tshark.c
parent058fc19f453cc7445a62036a29bc69938ceb1a2a (diff)
Move the Windows argument list conversion code to a common routine.
svn path=/trunk/; revision=37372
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/tshark.c b/tshark.c
index 5db00c8da9..022384f128 100644
--- a/tshark.c
+++ b/tshark.c
@@ -96,7 +96,7 @@
#ifdef _WIN32
#include "capture-wpcap.h"
#include "capture_errs.h"
-#include <shellapi.h>
+#include <wsutil/unicode-utils.h>
#endif /* _WIN32 */
#include "capture_sync.h"
#endif /* HAVE_LIBPCAP */
@@ -798,8 +798,6 @@ main(int argc, char *argv[])
#ifdef _WIN32
WSADATA wsaData;
- LPWSTR *wc_argv;
- int wc_argc, i;
#endif /* _WIN32 */
char *gpf_path, *pf_path;
@@ -854,13 +852,7 @@ main(int argc, char *argv[])
static const char optstring[] = OPTSTRING;
#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 */
/*