simplify hashes.
[apps/madmutt.git] / lib-mx / mh.c
index c3b671b..e1cf230 100644 (file)
@@ -86,19 +86,6 @@ static short mhs_set (struct mh_sequences *mhs, int i, short f)
   return mhs->flags[i];
 }
 
   return mhs->flags[i];
 }
 
-#if 0
-
-/* unused */
-
-static short mhs_unset (struct mh_sequences *mhs, int i, short f)
-{
-  mhs_alloc (mhs, i);
-  mhs->flags[i] &= ~f;
-  return mhs->flags[i];
-}
-
-#endif
-
 static void mh_read_token (char *t, int *first, int *last)
 {
   char *p;
 static void mh_read_token (char *t, int *first, int *last)
 {
   char *p;
@@ -1485,12 +1472,12 @@ static int maildir_check_mailbox (CONTEXT * ctx, int *index_hint, int unused __a
    * of each message we scanned.  This is used in the loop over the
    * existing messages below to do some correlation.
    */
    * 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_create (1031, 0);
 
   for (p = md; p; p = p->next) {
     maildir_canon_filename (buf, p->h->path, sizeof (buf));
     p->canon_fname = m_strdup(buf);
 
   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 */
   }
 
   /* check for modifications and adjust flags */
@@ -1623,10 +1610,10 @@ static int mh_check_mailbox (CONTEXT * ctx, int *index_hint, int unused __attrib
   mhs_free_sequences (&mhs);
 
   /* check for modifications and adjust flags */
   mhs_free_sequences (&mhs);
 
   /* check for modifications and adjust flags */
-  fnames = hash_create (1031);
+  fnames = hash_create (1031, 0);
 
   for (p = md; p; p = p->next)
 
   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;
 
   for (i = 0; i < ctx->msgcount; i++) {
     ctx->hdrs[i]->active = 0;
@@ -1693,7 +1680,7 @@ static FILE *_maildir_open_find_message (const char *folder, const char *unique,
     if (!m_strcmp(tunique, unique)) {
       snprintf (fname, sizeof (fname), "%s/%s/%s", folder, subfolder,
                 de->d_name);
     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;
     }
       oe = errno;
       break;
     }