Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Tue, 22 Mar 2005 14:53:28 +0000 (14:53 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Tue, 22 Mar 2005 14:53:28 +0000 (14:53 +0000)
merge in latest mutt changes

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@225 e385b8ad-14ed-0310-8656-cc95a2468c6d

ChangeLog
hcache.c
imap/imap.c
imap/imap_private.h
imap/message.c
protos.h

index f811a3b..22cd6b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-03-22 03:40:54  Thomas Glanzmann  <sithglan@stud.uni-erlangen.de>  (brendan)
+
+       * hcache.c, imap/imap.c, imap/imap_private.h, imap/message.c,
+        protos.h: Thomas graces us with this patch that resolves a
+       type-size inconsistency in the UIDVALIDITY parser.
+
+        Edited for correctness.
+
 2005-03-17 09:30:06  Pawel Dziekonski  <pawel.dziekonski@pwr.wroc.pl>  (roessler)
 
        * po/pl.po: update
 2005-03-17 09:30:06  Pawel Dziekonski  <pawel.dziekonski@pwr.wroc.pl>  (roessler)
 
        * po/pl.po: update
 2005-01-29 19:15:07  Thomas Glanzmann  <sithglan@stud.uni-erlangen.de>  (roessler)
                                  
      * hcache.c: - make hcache.c conform to mutt codingstyle
 2005-01-29 19:15:07  Thomas Glanzmann  <sithglan@stud.uni-erlangen.de>  (roessler)
                                  
      * hcache.c: - make hcache.c conform to mutt codingstyle
-     - use $Id: ChangeLog,v 3.410 2005/03/17 09:30:29 roessler Exp $ CVS keyword instead of %K% BitKeeper keyword
+     - use $Id: ChangeLog,v 3.411 2005/03/22 03:42:22 brendan Exp $ CVS keyword instead of %K% BitKeeper keyword
                                  
 2005-01-29 19:15:07  Thomas Glanzmann  <sithglan@stud.uni-erlangen.de>  (roessler)
 
                                  
 2005-01-29 19:15:07  Thomas Glanzmann  <sithglan@stud.uni-erlangen.de>  (roessler)
 
index b99a502..2b052f3 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -65,7 +65,7 @@ static struct
 
 typedef union {
   struct timeval timeval;
 
 typedef union {
   struct timeval timeval;
-  uint64_t uid_validity;
+  unsigned long uid_validity;
 } validate;
 
 static void *lazy_malloc (size_t siz)
 } validate;
 
 static void *lazy_malloc (size_t siz)
@@ -516,7 +516,7 @@ static const char *mutt_hcache_per_folder (const char *path,
 /* This function transforms a header into a char so that it is useable by
  * db_store */
 static void *mutt_hcache_dump (void *_db, HEADER * h, int *off,
 /* This function transforms a header into a char so that it is useable by
  * db_store */
 static void *mutt_hcache_dump (void *_db, HEADER * h, int *off,
-                               uint64_t uid_validity)
+                               unsigned long uid_validity)
 {
   struct header_cache *db = _db;
   unsigned char *d = NULL;
 {
   struct header_cache *db = _db;
   unsigned char *d = NULL;
@@ -526,7 +526,7 @@ static void *mutt_hcache_dump (void *_db, HEADER * h, int *off,
   d = lazy_malloc (sizeof (validate));
 
   if (uid_validity) {
   d = lazy_malloc (sizeof (validate));
 
   if (uid_validity) {
-    memcpy (d, &uid_validity, sizeof (uint64_t));
+    memcpy (d, &uid_validity, sizeof (unsigned long));
   }
   else {
     struct timeval now;
   }
   else {
     struct timeval now;
@@ -661,7 +661,7 @@ void *mutt_hcache_fetch (void *db, const char *filename,
 
 int
 mutt_hcache_store (void *db, const char *filename, HEADER * header,
 
 int
 mutt_hcache_store (void *db, const char *filename, HEADER * header,
-                   uint64_t uid_validity, size_t (*keylen) (const char *fn))
+                   unsigned long uid_validity, size_t (*keylen) (const char *fn))
 {
   struct header_cache *h = db;
   datum key;
 {
   struct header_cache *h = db;
   datum key;
@@ -841,7 +841,7 @@ void *mutt_hcache_fetch (void *db, const char *filename,
 
 int
 mutt_hcache_store (void *db, const char *filename, HEADER * header,
 
 int
 mutt_hcache_store (void *db, const char *filename, HEADER * header,
-                   uint64_t uid_validity, size_t (*keylen) (const char *fn))
+                   unsigned long uid_validity, size_t (*keylen) (const char *fn))
 {
   DBT key;
   DBT data;
 {
   DBT key;
   DBT data;
index 89d75e4..5cce86d 100644 (file)
@@ -600,7 +600,7 @@ int imap_open_mailbox (CONTEXT * ctx)
       pc += 3;
       pc = imap_next_word (pc);
 
       pc += 3;
       pc = imap_next_word (pc);
 
-      sscanf (pc, "%u", &(idata->uid_validity));
+      sscanf (pc, "%lu", &(idata->uid_validity));
     }
 #endif
     else {
     }
 #endif
     else {
index 91ae379..6ac9d58 100644 (file)
@@ -164,7 +164,7 @@ typedef struct {
   IMAP_CACHE cache[IMAP_CACHE_LEN];
   int noclose:1;
 #ifdef USE_HCACHE
   IMAP_CACHE cache[IMAP_CACHE_LEN];
   int noclose:1;
 #ifdef USE_HCACHE
-  uint64_t uid_validity;
+  unsigned long uid_validity;
 #endif
 
   /* all folder flags - system flags AND keywords */
 #endif
 
   /* all folder flags - system flags AND keywords */
index 6217993..e7f8ce5 100644 (file)
@@ -71,7 +71,7 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend)
 
 #if USE_HCACHE
   void *hc = NULL;
 
 #if USE_HCACHE
   void *hc = NULL;
-  uint64_t *uid_validity = NULL;
+  unsigned long *uid_validity = NULL;
   char uid_buf[64];
 #endif /* USE_HCACHE */
 
   char uid_buf[64];
 #endif /* USE_HCACHE */
 
@@ -154,7 +154,7 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend)
 
       sprintf (uid_buf, "/%u", h.data->uid);    /* XXX --tg 21:41 04-07-11 */
       uid_validity =
 
       sprintf (uid_buf, "/%u", h.data->uid);    /* XXX --tg 21:41 04-07-11 */
       uid_validity =
-        (uint64_t *) mutt_hcache_fetch (hc, uid_buf, &imap_hcache_keylen);
+        (unsigned long *) mutt_hcache_fetch (hc, uid_buf, &imap_hcache_keylen);
 
       if (uid_validity != NULL && *uid_validity == idata->uid_validity) {
         ctx->hdrs[msgno] =
 
       if (uid_validity != NULL && *uid_validity == idata->uid_validity) {
         ctx->hdrs[msgno] =
index b47f8ea..e3aa631 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -112,7 +112,7 @@ HEADER *mutt_hcache_restore (const unsigned char *d, HEADER ** oh);
 void *mutt_hcache_fetch (void *db, const char *filename,
                          size_t (*keylen) (const char *fn));
 int mutt_hcache_store (void *db, const char *filename, HEADER * h,
 void *mutt_hcache_fetch (void *db, const char *filename,
                          size_t (*keylen) (const char *fn));
 int mutt_hcache_store (void *db, const char *filename, HEADER * h,
-                       uint64_t uid_validity,
+                       unsigned long uid_validity,
                        size_t (*keylen) (const char *fn));
 int mutt_hcache_delete (void *db, const char *filename,
                         size_t (*keylen) (const char *fn));
                        size_t (*keylen) (const char *fn));
 int mutt_hcache_delete (void *db, const char *filename,
                         size_t (*keylen) (const char *fn));