simplify hashes.
[apps/madmutt.git] / lib-mx / mx.c
index 96dab2c..d13a00f 100644 (file)
 
 #include <utime.h>
 
+#include <lib-lua/lib-lua.h>
 #include <lib-sys/unix.h>
 #include <lib-mime/mime.h>
 #include <lib-ui/sidebar.h>
+#include <lib-crypt/crypt.h>
 
 #include "mutt.h"
 #include "pattern.h"
@@ -36,8 +38,6 @@
 #include <nntp/nntp.h>
 #endif
 
-#include <lib-crypt/crypt.h>
-
 static mx_t const *mxfmts[] = {
     &mbox_mx,
     &mmdf_mx,
@@ -69,9 +69,8 @@ static int invoke_dotlock (const char *path, int flags, int retry)
 
   mutt_quote_filename (f, sizeof (f), path);
 
-  snprintf (cmd, sizeof (cmd),
-            "%s %s%s%s%s%s%s%s",
-            NONULL (MuttDotlock),
+  snprintf(cmd, sizeof(cmd), "%s %s%s%s%s%s%s%s",
+            mlua_reggets(LTK_DOTLOCK),
             flags & DL_FL_TRY ? "-t " : "",
             flags & DL_FL_UNLOCK ? "-u " : "",
             flags & DL_FL_USEPRIV ? "-p " : "",
@@ -1270,10 +1269,10 @@ void mx_update_context (CONTEXT * ctx, int new_messages)
 
     /* add this message to the hash tables */
     if (ctx->id_hash && h->env->message_id)
-      hash_insert (ctx->id_hash, h->env->message_id, h, 0);
+      hash_insert (ctx->id_hash, h->env->message_id, h);
     if (!ctx->counting) {
       if (ctx->subj_hash && h->env->real_subj)
-        hash_insert (ctx->subj_hash, h->env->real_subj, h, 1);
+        hash_insert (ctx->subj_hash, h->env->real_subj, h);
 
       if (option (OPTSCORE))
         mutt_score_message (ctx, h, 0);