summaryrefslogtreecommitdiffstats
path: root/common/init.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-06-12 16:11:19 +0200
committerWerner Koch <wk@gnupg.org>2018-06-12 16:11:19 +0200
commitcb52eb76b3ba0269742c5322e10a2b5151dafaf2 (patch)
tree55b834edff91fbb3e2845385d46855aa799fcd62 /common/init.c
parentRequire libgpg-error 1.29 and remove internal logging functions. (diff)
downloadgnupg2-cb52eb76b3ba0269742c5322e10a2b5151dafaf2.tar.xz
gnupg2-cb52eb76b3ba0269742c5322e10a2b5151dafaf2.zip
Some preparations to eventuallt use gpgrt_argparse.
* configure.ac (GNUPG_DEF_COPYRIGHT_LINE: New. * tools/watchgnupg.c (print_version): USe this macro. * common/init.c (_init_common_subsystems): Register argparse functions. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common/init.c')
-rw-r--r--common/init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/init.c b/common/init.c
index 86b71e5ee..f62c5cd58 100644
--- a/common/init.c
+++ b/common/init.c
@@ -210,7 +210,11 @@ _init_common_subsystems (gpg_err_source_t errsource, int *argcp, char ***argvp)
}
/* --version et al shall use estream as well. */
- argparse_register_outfnc (writestring_via_estream);
+ argparse_register_outfnc (writestring_via_estream); /* legacy. */
+ gpgrt_set_usage_outfnc (writestring_via_estream);
+
+ /* Register our string mapper with gpgrt. */
+ gpgrt_set_fixed_string_mapper (map_static_macro_string);
/* Logging shall use the standard socket directory as fallback. */
log_set_socket_dir_cb (gnupg_socketdir);