split ml_core into MCore and MTransport modules.
[apps/madmutt.git] / init.c
diff --git a/init.c b/init.c
index 45355c7..03065c2 100644 (file)
--- a/init.c
+++ b/init.c
@@ -42,7 +42,7 @@ static int parse_sort (struct option_t* dst, const char *s,
                        const struct mapping_t *map,
                        char* errbuf, ssize_t errlen);
 
-static HASH *ConfigOptions = NULL;
+static hash_t *ConfigOptions = NULL;
 
 /* for synonym warning reports: synonym found during parsing */
 typedef struct syn_t {
@@ -494,10 +494,8 @@ int quadoption (int opt)
   return (QuadOptions[n] >> b) & 0x3;
 }
 
-int query_quadoption2(int opt, const char *prompt)
+int query_quadoption2(int v, const char *prompt)
 {
-  int v = mlua_reggeti(opt);
-
   switch (v) {
   case M_YES:
   case M_NO:
@@ -2200,7 +2198,7 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
   err.data = error;
   err.dsize = sizeof(error);
 
-  ConfigOptions = hash_create (sizeof(MuttVars) * 2, 0);
+  ConfigOptions = hash_new (sizeof(MuttVars) * 2, 0);
   for (i = 0; MuttVars[i].option; i++) {
     hash_insert (ConfigOptions, MuttVars[i].option, &MuttVars[i]);
   }
@@ -2327,7 +2325,7 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
     From = rfc822_parse_adrlist (NULL, p);
 
   charset_initialize();
-  mlua_initialize();
+  luaM_initialize();
 
   /* Set standard defaults */
   hash_map (ConfigOptions, mutt_set_default, 0);
@@ -2404,7 +2402,7 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
   if (access(buffer, F_OK) < 0)
       snprintf(buffer, sizeof(buffer), "%s/.madmutt/cfg.lua", NONULL(Homedir));
   if (!access(buffer, F_OK)) {
-      need_pause = mlua_wrap(mutt_error, mlua_dofile(buffer));
+      need_pause = luaM_wrap(mutt_error, luaM_dofile(buffer));
   }
   /* }}} */