]> granicus.if.org Git - neomutt/commitdiff
Include hcache backend version info in mutt -v output
authorRocco Rutte <pdmef@gmx.net>
Mon, 17 Sep 2007 09:35:05 +0000 (11:35 +0200)
committerRocco Rutte <pdmef@gmx.net>
Mon, 17 Sep 2007 09:35:05 +0000 (11:35 +0200)
ChangeLog
hcache.c
hcache.h
main.c

index 50b422808528b3d335cf3508169b375ecc617f95..020b12b7d502e5a172e1949c21b3aedfafc51058 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-09-17 09:47 +0200  Rocco Rutte  <pdmef@gmx.net>  (e146db07dd54)
+
+       * init.c: Use NONULL to ensure we can pretty-print empty paths for
+       option queries
+
+2007-09-14 11:35 -0700  Emanuele  <Emanuele Giaquinta>  (c699e5847630)
+
+       * ChangeLog, configure.ac: The new MD5 code needs AC_C_BIGENDIAN on
+       big-endian systems
+
 2007-09-13 09:39 -0700  Brendan Cully  <brendan@kublai.com>  (154417d57b9d)
 
        * configure.ac: Do not clobber --with-bdb argument (closes #2955)
index 775a93043d2525810eb3a5387b92644a07b84044..c45dff94f9211c72c96aad7e4ddfc432aca457e5 100644 (file)
--- 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
index 0fbd284710dc4655b7a27484822cf743f3f1dd7e..14a6a9a255ec22374936109f4653c8af35ba4140 100644 (file)
--- 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 be3961c8bad0a95fdd2143e056792c91c940f08d..03543e1a92c165a0fa2dc5785a4b0584aa08ff96 100644 (file)
--- a/main.c
+++ b/main.c
 #include "imap/imap.h"
 #endif
 
+#ifdef USE_HCACHE
+#include "hcache.h"
+#endif
+
 #include <string.h>
 #include <stdlib.h>
 #include <locale.h>
@@ -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