From: pdmef Date: Tue, 22 Mar 2005 14:53:28 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=34cf6d8df073a949b69970327314e2355dbccabc Rocco Rutte: merge in latest mutt changes git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@225 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/ChangeLog b/ChangeLog index f811a3b..22cd6b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-03-22 03:40:54 Thomas Glanzmann (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 (roessler) * po/pl.po: update @@ -359,7 +367,7 @@ 2005-01-29 19:15:07 Thomas Glanzmann (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 (roessler) diff --git a/hcache.c b/hcache.c index b99a502..2b052f3 100644 --- a/hcache.c +++ b/hcache.c @@ -65,7 +65,7 @@ static struct typedef union { struct timeval timeval; - uint64_t uid_validity; + unsigned long uid_validity; } 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, - uint64_t uid_validity) + unsigned long uid_validity) { 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) { - memcpy (d, &uid_validity, sizeof (uint64_t)); + memcpy (d, &uid_validity, sizeof (unsigned long)); } 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, - 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; @@ -841,7 +841,7 @@ void *mutt_hcache_fetch (void *db, const char *filename, 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; diff --git a/imap/imap.c b/imap/imap.c index 89d75e4..5cce86d 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -600,7 +600,7 @@ int imap_open_mailbox (CONTEXT * ctx) pc += 3; pc = imap_next_word (pc); - sscanf (pc, "%u", &(idata->uid_validity)); + sscanf (pc, "%lu", &(idata->uid_validity)); } #endif else { diff --git a/imap/imap_private.h b/imap/imap_private.h index 91ae379..6ac9d58 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -164,7 +164,7 @@ typedef struct { 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 */ diff --git a/imap/message.c b/imap/message.c index 6217993..e7f8ce5 100644 --- a/imap/message.c +++ b/imap/message.c @@ -71,7 +71,7 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend) #if USE_HCACHE void *hc = NULL; - uint64_t *uid_validity = NULL; + unsigned long *uid_validity = NULL; 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 = - (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] = diff --git a/protos.h b/protos.h index b47f8ea..e3aa631 100644 --- 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, - 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));