From d96e76d15f61812b950b64a60bc47117785a9dac Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 19 Jan 2016 16:25:31 +0100 Subject: gpg: Add function print_further_info. * g10/misc.c (print_further_info): New. Signed-off-by: Werner Koch --- g10/misc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'g10/misc.c') diff --git a/g10/misc.c b/g10/misc.c index 5e764fa2e..bdc450575 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. */ -- cgit v1.2.3