projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prepare documentation of the APIs
[apps/madmutt.git]
/
alias.c
diff --git
a/alias.c
b/alias.c
index
907e743
..
c511fd7
100644
(file)
--- a/
alias.c
+++ b/
alias.c
@@
-25,13
+25,6
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <ctype.h>
-
#include <lib-lib/lib-lib.h>
#include <lib-sys/unix.h>
#include <lib-lib/lib-lib.h>
#include <lib-sys/unix.h>
@@
-60,6
+53,8
@@
static struct mapping_t AliasHelp[] = {
{NULL, OP_NULL}
};
{NULL, OP_NULL}
};
+static void mutt_alias_menu(char *, size_t, alias_t *);
+
const address_t *alias_lookup(const char *s)
{
alias_t *list;
const address_t *alias_lookup(const char *s)
{
alias_t *list;
@@
-277,7
+272,7
@@
void mutt_create_alias(ENVELOPE *cur, address_t *iadr)
new->addr->personal = m_strdup(buf);
buf[0] = '\0';
new->addr->personal = m_strdup(buf);
buf[0] = '\0';
- rfc822_
write_address
(buf, sizeof(buf), new->addr, 1);
+ rfc822_
addrcat
(buf, sizeof(buf), new->addr, 1);
snprintf(prompt, sizeof(prompt), _("[%s = %s] Accept?"), new->name, buf);
if (mutt_yesorno(prompt, M_YES) != M_YES) {
alias_list_wipe(&new);
snprintf(prompt, sizeof(prompt), _("[%s = %s] Accept?"), new->name, buf);
if (mutt_yesorno(prompt, M_YES) != M_YES) {
alias_list_wipe(&new);
@@
-303,9
+298,9
@@
void mutt_create_alias(ENVELOPE *cur, address_t *iadr)
}
buf[0] = '\0';
}
buf[0] = '\0';
- rfc822_
write_address
(buf, sizeof(buf), new->addr, 0);
+ rfc822_
addrcat
(buf, sizeof(buf), new->addr, 0);
write_safe_address(rc, buf);
write_safe_address(rc, buf);
-
fclose(
rc);
+
m_fclose(&
rc);
mutt_message _("Alias added.");
} else {
mutt_perror(buf);
mutt_message _("Alias added.");
} else {
mutt_perror(buf);
@@
-360,9
+355,7
@@
static address_t *mutt_expand_aliases_r(address_t *a, string_list_t **expn)
if (option(OPTUSEDOMAIN)) {
/* now qualify all local addresses */
if (option(OPTUSEDOMAIN)) {
/* now qualify all local addresses */
- const char *fqdn = mutt_fqdn(1);
- if (fqdn)
- rfc822_qualify(head, fqdn);
+ rfc822_qualify(head, mutt_fqdn(1));
}
return head;
}
return head;
@@
-504,7
+497,7
@@
static const format_t *alias_format_str (char *dest, size_t destlen, char op,
break;
case 'r':
adr[0] = '\0';
break;
case 'r':
adr[0] = '\0';
- rfc822_
write_address
(adr, sizeof(adr), alias->addr, 1);
+ rfc822_
addrcat
(adr, sizeof(adr), alias->addr, 1);
snprintf(tmp, sizeof(tmp), "%%%ss", fmt);
snprintf(dest, destlen, tmp, adr);
break;
snprintf(tmp, sizeof(tmp), "%%%ss", fmt);
snprintf(dest, destlen, tmp, adr);
break;
@@
-664,14
+657,14
@@
new_aliases:
for (i = 0; i < menu->max; i++) {
if (AliasTable[i]->tagged) {
mutt_addrlist_to_local (AliasTable[i]->addr);
for (i = 0; i < menu->max; i++) {
if (AliasTable[i]->tagged) {
mutt_addrlist_to_local (AliasTable[i]->addr);
- rfc822_
write_address
(buf, buflen, AliasTable[i]->addr, 0);
+ rfc822_
addrcat
(buf, buflen, AliasTable[i]->addr, 0);
t = -1;
}
}
if (t != -1) {
mutt_addrlist_to_local (AliasTable[t]->addr);
t = -1;
}
}
if (t != -1) {
mutt_addrlist_to_local (AliasTable[t]->addr);
- rfc822_
write_address
(buf, buflen, AliasTable[t]->addr, 0);
+ rfc822_
addrcat
(buf, buflen, AliasTable[t]->addr, 0);
}
mutt_menuDestroy (&menu);
}
mutt_menuDestroy (&menu);