X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=init.c;h=f137e359965bb6849855390de2d6965f50b3f8d7;hp=bb8bedbb9708c46ad2e43e6a04243aa9e212a6bc;hb=723f7ae3f24f7881c9ce87abf933cd5bec4ac0bc;hpb=ccf2b75a9ed50a79c4d8e5d6235c7313fcd3719a diff --git a/init.c b/init.c index bb8bedb..f137e35 100644 --- a/init.c +++ b/init.c @@ -24,10 +24,12 @@ #include #include +#include + #include +#include #include "mutt.h" -#include "history.h" #include "keymap.h" #include "mbyte.h" #include "charset.h" @@ -1382,7 +1384,7 @@ static int parse_unalias (BUFFER * buf, BUFFER * s, unsigned long data __attribute__ ((unused)), BUFFER * err __attribute__ ((unused))) { - ALIAS *tmp, *last = NULL; + alias_t *tmp, *last = NULL; do { mutt_extract_token (buf, s, 0); @@ -1394,7 +1396,7 @@ static int parse_unalias (BUFFER * buf, BUFFER * s, set_option (OPTFORCEREDRAWINDEX); } else - mutt_free_alias (&Aliases); + alias_delete(&Aliases); break; } else @@ -1411,7 +1413,7 @@ static int parse_unalias (BUFFER * buf, BUFFER * s, else Aliases = tmp->next; tmp->next = NULL; - mutt_free_alias (&tmp); + alias_delete(&tmp); break; } last = tmp; @@ -1425,8 +1427,8 @@ static int parse_alias (BUFFER * buf, BUFFER * s, unsigned long data __attribute__ ((unused)), BUFFER * err) { - ALIAS *tmp = Aliases; - ALIAS *last = NULL; + alias_t *tmp = Aliases; + alias_t *last = NULL; char *estr = NULL; if (!MoreArgs (s)) { @@ -1447,8 +1449,7 @@ static int parse_alias (BUFFER * buf, BUFFER * s, if (!tmp) { /* create a new alias */ - tmp = p_new(ALIAS, 1); - tmp->self = tmp; + tmp = alias_new(); tmp->name = m_strdup(buf->data); /* give the main addressbook code a chance */ if (CurrentMenu == MENU_ALIAS) @@ -2608,7 +2609,8 @@ void mutt_init (int skip_sys_rc, LIST * commands) if (!Homedir) Homedir = m_strdup(pw->pw_dir); - Realname = m_strdup(mutt_gecos_name (rnbuf, sizeof(rnbuf), pw)); + mutt_gecos_name(rnbuf, sizeof(rnbuf), pw, GecosMask.rx); + Realname = m_strdup(rnbuf); Shell = m_strdup(pw->pw_shell); endpwent (); } @@ -2641,7 +2643,7 @@ void mutt_init (int skip_sys_rc, LIST * commands) else Hostname = m_strdup(utsname.nodename); - if (!p && getdnsdomainname (buffer, sizeof(buffer)) == -1) + if (!p && getdnsdomainname(buffer, sizeof(buffer)) == -1) Fqdn = m_strdup("@"); else if (*buffer != '@') {