X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=alias.cpkg;h=a87f5f07ccf584a6e51a716e3d2bf17aa97f7432;hp=424adda4794bacd8a8a0baec6ea114f90c078792;hb=05e61a9707a6da5c0bca77aa7c3c019a918494de;hpb=6b771604433435b4280a5fbae2612134fe4129dd diff --git a/alias.cpkg b/alias.cpkg index 424adda..a87f5f0 100644 --- a/alias.cpkg +++ b/alias.cpkg @@ -50,11 +50,10 @@ }; @type path_t = { - .push = luaM_path_post($$); .kind = 's'; .ctype = char *; .dtor = p_delete($$); - .ctor = m_strdup($$); + .ctor = luaM_pathnew($$); }; @type quadopt_t = { @@ -64,12 +63,11 @@ }; 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); } }