summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-10-26 11:10:29 +0200
committerWerner Koch <wk@gnupg.org>2010-10-26 11:10:29 +0200
commit02e4c3cb7efacee1b6f716e5b9e923e7e2ded2bf (patch)
tree7b6fa659e8f77cb41b2c8ce3cf31634376c276e2 /common
parentRemove cruft. (diff)
downloadgnupg2-02e4c3cb7efacee1b6f716e5b9e923e7e2ded2bf.tar.xz
gnupg2-02e4c3cb7efacee1b6f716e5b9e923e7e2ded2bf.zip
Re-implemented GPG's --passwd command and improved it.
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog4
-rw-r--r--common/logging.c8
-rw-r--r--common/logging.h1
3 files changed, 9 insertions, 4 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index 7116b0225..38856f6f2 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-25 Werner Koch <wk@g10code.com>
+
+ * logging.c (do_log): Rename to log_log and make global.
+
2010-10-20 Werner Koch <wk@g10code.com>
* i18n.c (i18n_init) [USE_SIMPLE_GETTEXT]: Call textdomain.
diff --git a/common/logging.c b/common/logging.c
index 5a61c609c..6b9fa5e23 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -670,8 +670,8 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
}
-static void
-do_log (int level, const char *fmt, ...)
+void
+log_log (int level, const char *fmt, ...)
{
va_list arg_ptr ;
@@ -812,14 +812,14 @@ log_printhex (const char *text, const void *buffer, size_t length)
void
bug_at( const char *file, int line, const char *func )
{
- do_log (JNLIB_LOG_BUG, ("... this is a bug (%s:%d:%s)\n"), file, line, func);
+ log_log (JNLIB_LOG_BUG, ("... this is a bug (%s:%d:%s)\n"), file, line, func);
abort (); /* Never called; just to make the compiler happy. */
}
#else
void
bug_at( const char *file, int line )
{
- do_log (JNLIB_LOG_BUG, _("you found a bug ... (%s:%d)\n"), file, line);
+ log_log (JNLIB_LOG_BUG, _("you found a bug ... (%s:%d)\n"), file, line);
abort (); /* Never called; just to make the compiler happy. */
}
#endif
diff --git a/common/logging.h b/common/logging.h
index 3ee4db6ef..9493841ae 100644
--- a/common/logging.h
+++ b/common/logging.h
@@ -65,6 +65,7 @@ enum jnlib_log_levels {
JNLIB_LOG_BUG,
JNLIB_LOG_DEBUG
};
+void log_log (int level, const char *fmt, ...) JNLIB_GCC_A_PRINTF(2,3);
void log_logv (int level, const char *fmt, va_list arg_ptr);
void log_string (int level, const char *string);
#endif /*JNLIB_NEED_LOG_LOGV*/