struct maildir *md; /* list of messages in the mailbox */
struct maildir **last, *p;
int i;
- HASH *fnames; /* hash table for quickly looking up the base filename
+ hash_t *fnames; /* hash table for quickly looking up the base filename
for a maildir message */
if (!option (OPTCHECKNEW))
* of each message we scanned. This is used in the loop over the
* existing messages below to do some correlation.
*/
- fnames = hash_create (1031);
+ fnames = hash_new (1031, 0);
for (p = md; p; p = p->next) {
maildir_canon_filename (buf, p->h->path, sizeof (buf));
p->canon_fname = m_strdup(buf);
- hash_insert (fnames, p->canon_fname, p, 0);
+ hash_insert (fnames, p->canon_fname, p);
}
/* check for modifications and adjust flags */
}
/* destroy the file name hash */
- hash_destroy (&fnames, NULL);
+ hash_delete (&fnames, NULL);
/* If we didn't just get new mail, update the tables. */
if (occult)
struct maildir *md, *p;
struct maildir **last = NULL;
struct mh_sequences mhs;
- HASH *fnames;
+ hash_t *fnames;
int i;
if (!option (OPTCHECKNEW))
mhs_free_sequences (&mhs);
/* check for modifications and adjust flags */
- fnames = hash_create (1031);
+ fnames = hash_new (1031, 0);
for (p = md; p; p = p->next)
- hash_insert (fnames, p->h->path, p, 0);
+ hash_insert (fnames, p->h->path, p);
for (i = 0; i < ctx->msgcount; i++) {
ctx->hdrs[i]->active = 0;
/* destroy the file name hash */
- hash_destroy (&fnames, NULL);
+ hash_delete (&fnames, NULL);
/* If we didn't just get new mail, update the tables. */
if (occult)
if (!m_strcmp(tunique, unique)) {
snprintf (fname, sizeof (fname), "%s/%s/%s", folder, subfolder,
de->d_name);
- fp = fopen (fname, "r"); /* __FOPEN_CHECKED__ */
+ fp = fopen(fname, "r");
oe = errno;
break;
}