projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify alias expansion a lot.
[apps/madmutt.git]
/
init.c
diff --git
a/init.c
b/init.c
index
218e29c
..
f137e35
100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-1384,7
+1384,7
@@
static int parse_unalias (BUFFER * buf, BUFFER * s,
unsigned long data __attribute__ ((unused)),
BUFFER * err __attribute__ ((unused)))
{
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);
do {
mutt_extract_token (buf, s, 0);
@@
-1396,7
+1396,7
@@
static int parse_unalias (BUFFER * buf, BUFFER * s,
set_option (OPTFORCEREDRAWINDEX);
}
else
set_option (OPTFORCEREDRAWINDEX);
}
else
-
mutt_free_alias
(&Aliases);
+
alias_delete
(&Aliases);
break;
}
else
break;
}
else
@@
-1413,7
+1413,7
@@
static int parse_unalias (BUFFER * buf, BUFFER * s,
else
Aliases = tmp->next;
tmp->next = NULL;
else
Aliases = tmp->next;
tmp->next = NULL;
-
mutt_free_alias
(&tmp);
+
alias_delete
(&tmp);
break;
}
last = tmp;
break;
}
last = tmp;
@@
-1427,8
+1427,8
@@
static int parse_alias (BUFFER * buf, BUFFER * s,
unsigned long data __attribute__ ((unused)),
BUFFER * err)
{
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)) {
char *estr = NULL;
if (!MoreArgs (s)) {
@@
-1449,8
+1449,7
@@
static int parse_alias (BUFFER * buf, BUFFER * s,
if (!tmp) {
/* create a new alias */
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)
tmp->name = m_strdup(buf->data);
/* give the main addressbook code a chance */
if (CurrentMenu == MENU_ALIAS)