+2007-12-11 14:50 +0100 Rocco Rutte <pdmef@gmx.net> (f19984dcfacb)
+
+ * pop.c: POP: Respect $message_cache_clean
+
+2007-12-11 14:49 +0100 Rocco Rutte <pdmef@gmx.net> (2707a97e0deb)
+
+ * doc/manual.xml.head: Manual: mention $time_inc in tuning chapter
+
+2007-12-11 13:12 +0100 Rocco Rutte <pdmef@gmx.net> (9709d244c64b)
+
+ * ChangeLog, enter.c, history.h: Maintain different history lists for
+ files and mailboxes. Closes #2999.
+
2007-12-11 13:08 +0100 Rocco Rutte <pdmef@gmx.net> (35d778452444)
* history.c: Do not trust history file and mutt code about history
#include <string.h>
#include <unistd.h>
+#ifdef USE_HCACHE
+#define HC_FNAME "mutt" /* filename for hcache as POP lacks paths */
+#define HC_FEXT "hcache" /* extension for hcache as POP lacks paths */
+#endif
+
/* write line to file */
static int fetch_message (char *line, void *file)
{
if (!(pop_data = (POP_DATA *)ctx->data))
return -1;
+#ifdef USE_HCACHE
+ /* keep hcache file if hcache == bcache */
+ if (strcmp (HC_FNAME "." HC_FEXT, id) == 0)
+ return 0;
+#endif
+
for (i = 0; i < ctx->msgcount; i++)
/* if the id we get is known for a header: done (i.e. keep in cache) */
if (ctx->hdrs[i]->data && mutt_strcmp (ctx->hdrs[i]->data, id) == 0)
return mutt_bcache_del (bcache, id);
}
+#ifdef USE_HCACHE
+static int pop_hcache_namer (const char *path, char *dest, size_t destlen)
+{
+ return snprintf (dest, destlen, "%s." HC_FEXT, path);
+}
+
+static header_cache_t *pop_hcache_open (POP_DATA *pop_data, const char *path)
+{
+ ciss_url_t url;
+ char p[LONG_STRING];
+
+ if (!pop_data || !pop_data->conn)
+ return mutt_hcache_open (HeaderCache, path, NULL);
+
+ mutt_account_tourl (&pop_data->conn->account, &url);
+ url.path = HC_FNAME;
+ url_ciss_tostring (&url, p, sizeof (p), U_PATH);
+ return mutt_hcache_open (HeaderCache, p, pop_hcache_namer);
+}
+#endif
+
/*
* Read headers
* returns:
header_cache_t *hc = NULL;
void *data;
- hc = mutt_hcache_open (HeaderCache, ctx->path, NULL);
+ hc = pop_hcache_open (pop_data, ctx->path);
#endif
time (&pop_data->check_time);
M_PROGRESS_MSG, WriteInc, ctx->deleted);
#if USE_HCACHE
- hc = mutt_hcache_open (HeaderCache, ctx->path, NULL);
+ hc = pop_hcache_open (pop_data, ctx->path);
#endif
for (i = 0, j = 0, ret = 0; ret == 0 && i < ctx->msgcount; i++)