make lua packages interfaces be *.li.
[apps/madmutt.git] / alias.cpkg
index 424adda..a87f5f0 100644 (file)
 };
 
 @type path_t = {
-    .push  = luaM_path_post($$);
     .kind  = 's';
     .ctype = char *;
     .dtor  = p_delete($$);
-    .ctor  = m_strdup($$);
+    .ctor  = luaM_pathnew($$);
 };
 
 @type quadopt_t = {
 };
 
 static @package MAlias {
-    path_t alias_format = m_strdup("%4n %2f %t %-10a   %r");
+    string_t alias_format = m_strdup("%4n %2f %t %-10a   %r");
+    path_t   alias_file   = m_strdup("~/.madmutt/aliases");
 } MAlias;
 
-char    *AliasFile;
 alias_t *Aliases;
-rx_t     GecosMask;
 
 #define RSORT(x) (SortAlias & SORT_REVERSE) ? -x : x
 
@@ -311,7 +309,7 @@ void mutt_create_alias(ENVELOPE *cur, address_t *iadr)
 
     alias_list_push(&Aliases, new);
 
-    m_strcpy(buf, sizeof(buf), NONULL(AliasFile));
+    m_strcpy(buf, sizeof(buf), NONULL(MAlias.alias_file));
     if (mutt_get_field(_("Save to file: "), buf, sizeof(buf), M_FILE)) {
         return;
     }
@@ -374,7 +372,7 @@ static address_t *mutt_expand_aliases_r(address_t *a, string_list_t **expn)
 
                 if (pw) {
                     char namebuf[STRING];
-                    mutt_gecos_name(namebuf, sizeof(namebuf), pw, GecosMask.rx);
+                    mutt_gecos_name(namebuf, sizeof(namebuf), pw, MCore.gecos_mask.rx);
                     m_strreplace(&pop->personal, namebuf);
                 }
             }