projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
alias.c
diff --git
a/alias.c
b/alias.c
index
d28427a
..
5a58449
100644
(file)
--- a/
alias.c
+++ b/
alias.c
@@
-29,7
+29,7
@@
ADDRESS *mutt_lookup_alias (const char *s)
ALIAS *t = Aliases;
for (; t; t = t->next)
ALIAS *t = Aliases;
for (; t; t = t->next)
- if (!s
afe_str
casecmp (s, t->name))
+ if (!s
tr_
casecmp (s, t->name))
return (t->addr);
return (NULL); /* no such alias */
}
return (t->addr);
return (NULL); /* no such alias */
}
@@
-49,7
+49,7
@@
static ADDRESS *mutt_expand_aliases_r (ADDRESS * a, LIST ** expn)
if (t) {
i = 0;
for (u = *expn; u; u = u->next) {
if (t) {
i = 0;
for (u = *expn; u; u = u->next) {
- if (s
afe_str
cmp (a->mailbox, u->data) == 0) { /* alias already found */
+ if (s
tr_
cmp (a->mailbox, u->data) == 0) { /* alias already found */
debug_print(1, ("loop in alias found for '%s'\n", a->mailbox));
i = 1;
break;
debug_print(1, ("loop in alias found for '%s'\n", a->mailbox));
i = 1;
break;
@@
-57,8
+57,8
@@
static ADDRESS *mutt_expand_aliases_r (ADDRESS * a, LIST ** expn)
}
if (!i) {
}
if (!i) {
- u =
safe
_malloc (sizeof (LIST));
- u->data = s
afe_str
dup (a->mailbox);
+ u =
mem
_malloc (sizeof (LIST));
+ u->data = s
tr_
dup (a->mailbox);
u->next = *expn;
*expn = u;
w = rfc822_cpy_adr (t);
u->next = *expn;
*expn = u;
w = rfc822_cpy_adr (t);
@@
-84,10
+84,6
@@
static ADDRESS *mutt_expand_aliases_r (ADDRESS * a, LIST ** expn)
mutt_gecos_name (namebuf, sizeof (namebuf), pw);
str_replace (&a->personal, namebuf);
mutt_gecos_name (namebuf, sizeof (namebuf), pw);
str_replace (&a->personal, namebuf);
-
-#ifdef EXACT_ADDRESS
- FREE (&a->val);
-#endif
}
}
}
}
}
}
@@
-242,9
+238,9
@@
retry_name:
}
}
}
}
- new =
safe
_calloc (1, sizeof (ALIAS));
+ new =
mem
_calloc (1, sizeof (ALIAS));
new->self = new;
new->self = new;
- new->name = s
afe_str
dup (buf);
+ new->name = s
tr_
dup (buf);
mutt_addrlist_to_local (adr);
mutt_addrlist_to_local (adr);
@@
-280,7
+276,7
@@
retry_name:
mutt_free_alias (&new);
return;
}
mutt_free_alias (&new);
return;
}
- new->addr->personal = s
afe_str
dup (buf);
+ new->addr->personal = s
tr_
dup (buf);
buf[0] = 0;
rfc822_write_address (buf, sizeof (buf), new->addr, 1);
buf[0] = 0;
rfc822_write_address (buf, sizeof (buf), new->addr, 1);
@@
-396,7
+392,7
@@
int mutt_alias_complete (char *s, size_t buflen)
if (a->name && strstr (a->name, s) == a->name) {
if (!bestname[0]) /* init */
strfcpy (bestname, a->name,
if (a->name && strstr (a->name, s) == a->name) {
if (!bestname[0]) /* init */
strfcpy (bestname, a->name,
- min (s
afe_str
len (a->name) + 1, sizeof (bestname)));
+ min (s
tr_
len (a->name) + 1, sizeof (bestname)));
else {
for (i = 0; a->name[i] && a->name[i] == bestname[i]; i++);
bestname[i] = 0;
else {
for (i = 0; a->name[i] && a->name[i] == bestname[i]; i++);
bestname[i] = 0;
@@
-406,9
+402,9
@@
int mutt_alias_complete (char *s, size_t buflen)
}
if (bestname[0] != 0) {
}
if (bestname[0] != 0) {
- if (s
afe_str
cmp (bestname, s) != 0) {
+ if (s
tr_
cmp (bestname, s) != 0) {
/* we are adding something to the completion */
/* we are adding something to the completion */
- strfcpy (s, bestname, s
afe_str
len (bestname) + 1);
+ strfcpy (s, bestname, s
tr_
len (bestname) + 1);
return 1;
}
return 1;
}
@@
-418,9
+414,9
@@
int mutt_alias_complete (char *s, size_t buflen)
while (a) {
if (a->name && (strstr (a->name, s) == a->name)) {
if (!a_list) /* init */
while (a) {
if (a->name && (strstr (a->name, s) == a->name)) {
if (!a_list) /* init */
- a_cur = a_list = (ALIAS *)
safe
_malloc (sizeof (ALIAS));
+ a_cur = a_list = (ALIAS *)
mem
_malloc (sizeof (ALIAS));
else {
else {
- a_cur->next = (ALIAS *)
safe
_malloc (sizeof (ALIAS));
+ a_cur->next = (ALIAS *)
mem
_malloc (sizeof (ALIAS));
a_cur = a_cur->next;
}
memcpy (a_cur, a, sizeof (ALIAS));
a_cur = a_cur->next;
}
memcpy (a_cur, a, sizeof (ALIAS));
@@
-440,7
+436,7
@@
int mutt_alias_complete (char *s, size_t buflen)
while (a_list) {
a_cur = a_list;
a_list = a_list->next;
while (a_list) {
a_cur = a_list;
a_list = a_list->next;
-
FREE
(&a_cur);
+
mem_free
(&a_cur);
}
/* remove any aliases marked for deletion */
}
/* remove any aliases marked for deletion */