summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-03-21 18:34:15 +0100
committerWerner Koch <wk@gnupg.org>2018-03-21 18:34:15 +0100
commited78ef7f06649f85f1c94c4fb2bd3f6b16fd9a63 (patch)
tree68ad5c4a98a60bf5a228830fcfe5f2b52aa9e72c
parent13d6fbfd4360cb74588556a3a0058c4057d0bcf0 (diff)
downloadlibgpg-error-ed78ef7f06649f85f1c94c4fb2bd3f6b16fd9a63.tar.gz
core: Add public function gpgrt_usage.
* src/visibility.c (gpgrt_usage): New. Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--NEWS1
-rw-r--r--src/gpg-error.def.in9
-rw-r--r--src/gpg-error.h.in1
-rw-r--r--src/gpg-error.vers1
-rw-r--r--src/gpgrt-int.h1
-rw-r--r--src/visibility.c6
-rw-r--r--src/visibility.h4
7 files changed, 18 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 0f83cdf..e21f534 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Noteworthy changes in version 1.29 (unreleased) [C23/A23/R_]
* Interface changes relative to the 1.28 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgrt_argparse New API.
+ gpgrt_usage New API.
gpgrt_strusage New API.
gpgrt_set_strusage New API.
gpgrt_set_usage_outfnc New API.
diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in
index 7a6a2ef..33ef794 100644
--- a/src/gpg-error.def.in
+++ b/src/gpg-error.def.in
@@ -208,10 +208,11 @@ EXPORTS
;; gpgrt_release_process @159
gpgrt_argparse @160
- gpgrt_strusage @161
- gpgrt_set_strusage @162
- gpgrt_set_usage_outfnc @163
- gpgrt_set_fixed_string_mapper @164
+ gpgrt_usage @161
+ gpgrt_strusage @162
+ gpgrt_set_strusage @163
+ gpgrt_set_usage_outfnc @164
+ gpgrt_set_fixed_string_mapper @165
;; end of file with public symbols for Windows.
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index 86bb5b2..c0656e2 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -1253,6 +1253,7 @@ typedef struct
int gpgrt_argparse (gpgrt_stream_t fp,
gpgrt_argparse_t *arg, gpgrt_opt_t *opts);
+void gpgrt_usage (int level);
const char *gpgrt_strusage (int level);
void gpgrt_set_strusage (const char *(*f)(int));
void gpgrt_set_usage_outfnc (int (*f)(int, const char *));
diff --git a/src/gpg-error.vers b/src/gpg-error.vers
index cdef0cd..c7de3c4 100644
--- a/src/gpg-error.vers
+++ b/src/gpg-error.vers
@@ -180,6 +180,7 @@ GPG_ERROR_1.0 {
# gpgrt_release_process;
gpgrt_argparse;
+ gpgrt_usage;
gpgrt_strusage;
gpgrt_set_strusage;
gpgrt_set_usage_outfnc;
diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h
index 794874e..5d54a51 100644
--- a/src/gpgrt-int.h
+++ b/src/gpgrt-int.h
@@ -715,6 +715,7 @@ void _gpgrt_release_process (pid_t pid);
* Local prototypes for argparse.
*/
int _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts);
+void _gpgrt_usage (int level);
const char *_gpgrt_strusage (int level);
void _gpgrt_set_strusage (const char *(*f)(int));
void _gpgrt_set_usage_outfnc (int (*fnc)(int, const char *));
diff --git a/src/visibility.c b/src/visibility.c
index 7058c91..315bf32 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -1073,6 +1073,12 @@ gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts)
return _gpgrt_argparse (fp, arg, opts);
}
+void
+gpgrt_usage (int level)
+{
+ _gpgrt_usage (level);
+}
+
const char *
gpgrt_strusage (int level)
{
diff --git a/src/visibility.h b/src/visibility.h
index 51d9e38..eae0f81 100644
--- a/src/visibility.h
+++ b/src/visibility.h
@@ -200,8 +200,9 @@ MARK_VISIBLE (gpgrt_release_process)
#endif
MARK_VISIBLE (gpgrt_argparse)
-MARK_VISIBLE (gpgrt_set_strusage)
+MARK_VISIBLE (gpgrt_usage)
MARK_VISIBLE (gpgrt_strusage)
+MARK_VISIBLE (gpgrt_set_strusage)
MARK_VISIBLE (gpgrt_set_fixed_string_mapper);
MARK_VISIBLE (gpgrt_set_usage_outfnc);
@@ -366,6 +367,7 @@ MARK_VISIBLE (gpgrt_set_usage_outfnc);
#define gpgrt_release_process _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_argparse _gpgrt_USE_UNDERSCORED_FUNCTION
+#define gpgrt_usage _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_set_strusage _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_strusage _gpgrt_USE_UNDERSCORED_FUNCTION
#define gpgrt_set_usage_outfnc _gpgrt_USE_UNDERSCORED_FUNCTION