summaryrefslogtreecommitdiff
path: root/src/gpg-error.vers
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-03-21 16:23:29 +0100
committerWerner Koch <wk@gnupg.org>2018-03-21 16:23:29 +0100
commit13d6fbfd4360cb74588556a3a0058c4057d0bcf0 (patch)
treef8cecb6515b9056826f95a272560af1fcf68bb9b /src/gpg-error.vers
parent1beb22fc25f6622002ff592ac4d67400b1a3d3cb (diff)
downloadlibgpg-error-13d6fbfd4360cb74588556a3a0058c4057d0bcf0.tar.gz
core: Add the group of argparse functions.
* src/visibility.c (gpgrt_argparse): New. (gpgrt_strusage): New. (gpgrt_set_strusage): New. (gpgrt_set_usage_outfnc): New. (gpgrt_set_fixed_string_mapper): New. * src/gpg-error.def.in, src/gpg-error.vers: Add new functions. * src/gpg-error.h.in: Add ARGPARSE macros from the former argparse.h. (gpgrt_argparse_t): New. (gpgrt_opt_t): New. * configure.ac (AH_BOTTOM): Request argparse macros. * src/Makefile.am (libgpg_error_la_SOURCES): Add argparse.c. * src/argparse.h: Remove. * src/argparse.c: Revamp to fit into libgpg-error. (_gpgrt_argparse): New. (_gpgrt_usage): Rename from usage. (_gpgrt_strusage): Rename from strusage. Define two new levels and templates for three common licenses. (_gpgrt_set_strusage): Rename from set_strusage. (_gpgrt_set_usage_outfnc): New. (_gpgrt_set_fixed_string_mapper): New. * tests/t-argparse.c: New. -- These functions are in use by GnuPG and other software for 20 years and it makes sense to have them always available instead of copying and maintaing the source in several projects. Note that there are minor changes in the API compared to GnuPG. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/gpg-error.vers')
-rw-r--r--src/gpg-error.vers5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpg-error.vers b/src/gpg-error.vers
index 1105e80..cdef0cd 100644
--- a/src/gpg-error.vers
+++ b/src/gpg-error.vers
@@ -179,6 +179,11 @@ GPG_ERROR_1.0 {
# gpgrt_kill_process;
# gpgrt_release_process;
+ gpgrt_argparse;
+ gpgrt_strusage;
+ gpgrt_set_strusage;
+ gpgrt_set_usage_outfnc;
+ gpgrt_set_fixed_string_mapper;
local:
*;