[Pkg-gnupg-commit] [gnupg2] 128/159: gpg: Add function print_further_info.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Jan 27 13:24:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit d96e76d15f61812b950b64a60bc47117785a9dac
Author: Werner Koch <wk at gnupg.org>
Date: Tue Jan 19 16:25:31 2016 +0100
gpg: Add function print_further_info.
* g10/misc.c (print_further_info): New.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
g10/main.h | 1 +
g10/misc.c | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/g10/main.h b/g10/main.h
index 503f262..ec24426 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -90,6 +90,7 @@ void print_cipher_algo_note (cipher_algo_t algo);
void print_digest_algo_note (digest_algo_t algo);
void print_digest_rejected_note (enum gcry_md_algos algo);
void print_reported_error (gpg_error_t err, gpg_err_code_t skip_if_ec);
+void print_further_info (const char *format, ...) GPGRT_ATTR_PRINTF(1,2);
void additional_weak_digest (const char* digestname);
/*-- armor.c --*/
diff --git a/g10/misc.c b/g10/misc.c
index 5e764fa..bdc4505 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -383,6 +383,27 @@ print_reported_error (gpg_error_t err, gpg_err_code_t ignore_ec)
}
+/* Print a message
+ * "(further info: %s)\n
+ * in verbose mode to further explain an error. That message is
+ * intended to help debug a problem and should not be translated.
+ */
+void
+print_further_info (const char *format, ...)
+{
+ va_list arg_ptr;
+
+ if (!opt.verbose)
+ return;
+
+ log_info (_("(further info: "));
+ va_start (arg_ptr, format);
+ log_logv (GPGRT_LOG_CONT, format, arg_ptr);
+ va_end (arg_ptr);
+ log_printf (")\n");
+}
+
+
/* Map OpenPGP algo numbers to those used by Libgcrypt. We need to do
this for algorithms we implemented in Libgcrypt after they become
part of OpenPGP. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list