summaryrefslogtreecommitdiffstats
path: root/common/w32help.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-03-04 10:16:48 +0100
committerWerner Koch <wk@gnupg.org>2021-03-04 10:22:14 +0100
commitdeb6c94362c0f179de1cac18707aad2f51a21e10 (patch)
treedec21d341c77aaa92fdf0ecf8c36a789aad3746c /common/w32help.h
parentgpg: Keep temp files when opening images via xdg-open (diff)
downloadgnupg2-deb6c94362c0f179de1cac18707aad2f51a21e10.tar.xz
gnupg2-deb6c94362c0f179de1cac18707aad2f51a21e10.zip
common: First take on handling Unicode command line args.
* common/w32-misc.c: New. * common/t-w32-cmdline.c: New. * common/init.c: Include w32help.h. (prepare_w32_commandline): New. (_init_common_subsystems) [W32]: Call prepare_w32_commandline. * common/Makefile.am (common_sources) [W32]: Add w32-misc.c (module_tests): Add t-w32-cmdline (t_w32_cmdline_LDADD): New. -- The rules for the command line parser are not cleary specified - if at all. See the comment in t-w32-cmdline.c. We can't use the mingw version because that would require to change all argv handling to be wchar_t and that only for Windows. That would be too ugly. Parsing the command line into argv by us is much easier and we can do that only if needed - i.e. if globing is required (we are prepared for this) or a non-ASCII character has been encountered. This way we keep things stable and only fix the currently not working Unicode problem. GnuPG-bug-id: 4398
Diffstat (limited to 'common/w32help.h')
-rw-r--r--common/w32help.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/w32help.h b/common/w32help.h
index 177efbc9f..ca5ccf8bd 100644
--- a/common/w32help.h
+++ b/common/w32help.h
@@ -30,6 +30,13 @@
#ifndef GNUPG_COMMON_W32HELP_H
#define GNUPG_COMMON_W32HELP_H
+
+/*-- w32-misc.c --*/
+/* This module is also part of the Unix tests. */
+char **w32_parse_commandline (char *cmdline, int globing, int *r_argc);
+
+
+
#ifdef HAVE_W32_SYSTEM
/*-- w32-reg.c --*/