projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
begin to work on alias.[hc]
[apps/madmutt.git]
/
init.c
diff --git
a/init.c
b/init.c
index
bb8bedb
..
f137e35
100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-24,10
+24,12
@@
#include <lib-lib/debug.h>
#include <lib-lib/rx.h>
#include <lib-lib/debug.h>
#include <lib-lib/rx.h>
+#include <lib-sys/unix.h>
+
#include <lib-ui/curses.h>
#include <lib-ui/curses.h>
+#include <lib-ui/history.h>
#include "mutt.h"
#include "mutt.h"
-#include "history.h"
#include "keymap.h"
#include "mbyte.h"
#include "charset.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)))
{
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);
@@
-1394,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
@@
-1411,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;
@@
-1425,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)) {
@@
-1447,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)
@@
-2608,7
+2609,8
@@
void mutt_init (int skip_sys_rc, LIST * commands)
if (!Homedir)
Homedir = m_strdup(pw->pw_dir);
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 ();
}
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);
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 != '@') {
Fqdn = m_strdup("@");
else
if (*buffer != '@') {