+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-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)
typedef union {
struct timeval timeval;
- uint64_t uid_validity;
+ unsigned long uid_validity;
} validate;
static void *lazy_malloc (size_t siz)
/* 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;
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;
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;
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;
pc += 3;
pc = imap_next_word (pc);
- sscanf (pc, "%u", &(idata->uid_validity));
+ sscanf (pc, "%lu", &(idata->uid_validity));
}
#endif
else {
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 */
#if USE_HCACHE
void *hc = NULL;
- uint64_t *uid_validity = NULL;
+ unsigned long *uid_validity = NULL;
char uid_buf[64];
#endif /* USE_HCACHE */
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] =
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));