From: Rocco Rutte Date: Mon, 17 Sep 2007 09:35:05 +0000 (+0200) Subject: Include hcache backend version info in mutt -v output X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a89a3c0fc398d152408ce4780ce287ce00dcdafb;p=neomutt Include hcache backend version info in mutt -v output --- diff --git a/ChangeLog b/ChangeLog index 50b422808..020b12b7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-09-17 09:47 +0200 Rocco Rutte (e146db07dd54) + + * init.c: Use NONULL to ensure we can pretty-print empty paths for + option queries + +2007-09-14 11:35 -0700 Emanuele (c699e5847630) + + * ChangeLog, configure.ac: The new MD5 code needs AC_C_BIGENDIAN on + big-endian systems + 2007-09-13 09:39 -0700 Brendan Cully (154417d57b9d) * configure.ac: Do not clobber --with-bdb argument (closes #2955) diff --git a/hcache.c b/hcache.c index 775a93043..c45dff94f 100644 --- a/hcache.c +++ b/hcache.c @@ -1018,3 +1018,20 @@ mutt_hcache_open(const char *path, const char *folder, hcache_namer_t namer) return NULL; } } + +#if HAVE_DB4 +const char *mutt_hcache_backend (void) +{ + return DB_VERSION_STRING; +} +#elif HAVE_GDBM +const char *mutt_hcache_backend (void) +{ + return gdbm_version; +} +#elif HAVE_QDBM +const char *mutt_hcache_backend (void) +{ + return "qdbm " _QDBM_VERSION; +} +#endif diff --git a/hcache.h b/hcache.h index 0fbd28471..14a6a9a25 100644 --- a/hcache.h +++ b/hcache.h @@ -39,4 +39,6 @@ int mutt_hcache_store_raw (header_cache_t *h, const char* filename, void* data, size_t dlen, size_t(*keylen) (const char* fn)); int mutt_hcache_delete(header_cache_t *h, const char *filename, size_t (*keylen)(const char *fn)); +const char *mutt_hcache_backend (void); + #endif /* _HCACHE_H_ */ diff --git a/main.c b/main.c index be3961c8b..03543e1a9 100644 --- a/main.c +++ b/main.c @@ -40,6 +40,10 @@ #include "imap/imap.h" #endif +#ifdef USE_HCACHE +#include "hcache.h" +#endif + #include #include #include @@ -183,7 +187,11 @@ static void show_version (void) printf ("\nlibidn: %s (compiled with %s)", stringprep_check_version (NULL), STRINGPREP_VERSION); #endif - + +#ifdef USE_HCACHE + printf ("\nhcache backend: %s", mutt_hcache_backend ()); +#endif + puts (_("\nCompile options:")); #ifdef DOMAIN