diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/miscellaneous.c | 14 | ||||
-rw-r--r-- | common/util.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/common/miscellaneous.c b/common/miscellaneous.c index a0dae8fb1..8e71071f0 100644 --- a/common/miscellaneous.c +++ b/common/miscellaneous.c @@ -104,6 +104,7 @@ setup_libgcrypt_logging (void) gcry_set_outofcore_handler (my_gcry_outofcore_handler, NULL); } + /* A wrapper around gcry_cipher_algo_name to return the string "AES-128" instead of "AES". Given that we have an alias in libgcrypt for it, it does not harm to too much to return this other @@ -122,6 +123,19 @@ gnupg_cipher_algo_name (int algo) } +void +obsolete_option (const char *configname, unsigned int configlineno, + const char *name) +{ + if (configname) + log_info (_("%s:%u: obsolete option \"%s\" - it has no effect\n"), + configname, configlineno, name); + else + log_info (_("WARNING: \"%s%s\" is an obsolete option - it has no effect\n"), + "--", name); +} + + /* Decide whether the filename is stdout or a real filename and return * an appropriate string. */ const char * diff --git a/common/util.h b/common/util.h index 0e585df54..82e9887d6 100644 --- a/common/util.h +++ b/common/util.h @@ -370,6 +370,9 @@ char *xtryasprintf (const char *fmt, ...) GPGRT_GCC_A_PRINTF(1,2); /* Replacement for gcry_cipher_algo_name. */ const char *gnupg_cipher_algo_name (int algo); +void obsolete_option (const char *configname, unsigned int configlineno, + const char *name); + const char *print_fname_stdout (const char *s); const char *print_fname_stdin (const char *s); void print_utf8_buffer3 (estream_t fp, const void *p, size_t n, |