rationalize settings into a central registry.
[apps/madmutt.git] / lib-mx / mx.c
index 9c0221a..1d6ebf1 100644 (file)
@@ -63,17 +63,14 @@ static int invoke_dotlock (const char *path, int flags, int retry)
   char cmd[LONG_STRING + _POSIX_PATH_MAX];
   char f[STRING + _POSIX_PATH_MAX];
   char r[STRING];
-  int pos;
 
   if (flags & DL_FL_RETRY)
     snprintf (r, sizeof (r), "-r %d ", retry ? MAXLOCKATTEMPT : 0);
 
   mutt_quote_filename (f, sizeof (f), path);
 
-  pos  = mlua_value(cmd, sizeof(cmd), "madmutt", "dotlock");
-
-  snprintf(cmd + pos, sizeof(cmd) - pos,
-            " %s%s%s%s%s%s%s",
+  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 " : "",