projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify block_try function.
[apps/madmutt.git]
/
init.c
diff --git
a/init.c
b/init.c
index
c96e350
..
624ef3b
100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-315,7
+315,7
@@
static int path_from_string (struct option_t* dst, const char* val,
path[0] = '\0';
m_strcpy(path, sizeof(path), val);
mutt_expand_path (path, sizeof(path));
path[0] = '\0';
m_strcpy(path, sizeof(path), val);
mutt_expand_path (path, sizeof(path));
-
str_replace
((char **) dst->data, path);
+
m_strreplace
((char **) dst->data, path);
return (1);
}
return (1);
}
@@
-327,7
+327,7
@@
static int str_from_string (struct option_t* dst, const char* val,
if (!check_special (dst->option, (unsigned long) val, errbuf, errlen))
return (0);
if (!check_special (dst->option, (unsigned long) val, errbuf, errlen))
return (0);
-
str_replace
((char**) dst->data, val);
+
m_strreplace
((char**) dst->data, val);
return (1);
}
return (1);
}
@@
-342,7
+342,7
@@
static int user_from_string (struct option_t* dst, const char* val,
dst->data = (unsigned long) m_strdup(val);
else {
char* s = (char*) dst->data;
dst->data = (unsigned long) m_strdup(val);
else {
char* s = (char*) dst->data;
-
str_replace
(&s, val);
+
m_strreplace
(&s, val);
}
if (m_strlen(dst->init) == 0)
dst->init = m_strdup((char*) dst->data);
}
if (m_strlen(dst->init) == 0)
dst->init = m_strdup((char*) dst->data);
@@
-467,7
+467,7
@@
static int rx_from_string (struct option_t* dst, const char* val,
p_delete(&p->rx);
}
p_delete(&p->rx);
}
-
str_replace
(&p->pattern, val);
+
m_strreplace
(&p->pattern, val);
p->rx = rx;
p->not = not;
p->rx = rx;
p->not = not;
@@
-517,7
+517,7
@@
static void addr_to_string (char* dst, size_t dstlen,
struct option_t* option) {
char s[HUGE_STRING];
s[0] = '\0';
struct option_t* option) {
char s[HUGE_STRING];
s[0] = '\0';
- rfc822_write_address (s, sizeof(s), *((
ADDRESS
**) option->data), 0);
+ rfc822_write_address (s, sizeof(s), *((
address_t
**) option->data), 0);
snprintf (dst, dstlen, "%s=\"%s\"", option->option, NONULL (s));
}
snprintf (dst, dstlen, "%s=\"%s\"", option->option, NONULL (s));
}
@@
-525,9
+525,9
@@
static int addr_from_string (struct option_t* dst, const char* val,
char* errbuf, size_t errlen) {
if (!dst)
return (0);
char* errbuf, size_t errlen) {
if (!dst)
return (0);
-
rfc822_free_address ((ADDRESS
**) dst->data);
+
address_delete ((address_t
**) dst->data);
if (val && *val)
if (val && *val)
- *((
ADDRESS
**) dst->data) = rfc822_parse_adrlist (NULL, val);
+ *((
address_t
**) dst->data) = rfc822_parse_adrlist (NULL, val);
return (1);
}
return (1);
}
@@
-1440,7
+1440,7
@@
static int parse_alias (BUFFER * buf, BUFFER * s, unsigned long data,
}
else {
/* override the previous value */
}
else {
/* override the previous value */
-
rfc822_free_address
(&tmp->addr);
+
address_delete
(&tmp->addr);
if (CurrentMenu == MENU_ALIAS)
set_option (OPTFORCEREDRAWINDEX);
}
if (CurrentMenu == MENU_ALIAS)
set_option (OPTFORCEREDRAWINDEX);
}
@@
-1460,7
+1460,7
@@
static int parse_alias (BUFFER * buf, BUFFER * s, unsigned long data,
}
#ifdef DEBUG
if (DebugLevel >= 2) {
}
#ifdef DEBUG
if (DebugLevel >= 2) {
-
ADDRESS
*a;
+
address_t
*a;
/* A group is terminated with an empty address, so check a->mailbox */
for (a = tmp->addr; a && a->mailbox; a = a->next) {
/* A group is terminated with an empty address, so check a->mailbox */
for (a = tmp->addr; a && a->mailbox; a = a->next) {
@@
-1972,7
+1972,7
@@
static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
r = -1;
break;
} else if (DTYPE (option->type) == DT_ADDR)
r = -1;
break;
} else if (DTYPE (option->type) == DT_ADDR)
-
rfc822_free_address ((ADDRESS
**) option->data);
+
address_delete ((address_t
**) option->data);
else if (DTYPE (option->type) == DT_USER)
/* to unset $user_ means remove */
hash_delete (ConfigOptions, option->option,
else if (DTYPE (option->type) == DT_USER)
/* to unset $user_ means remove */
hash_delete (ConfigOptions, option->option,
@@
-2424,7
+2424,7
@@
int mutt_var_value_complete (char *buffer, size_t len, int pos)
}
else if (DTYPE (option->type) == DT_ADDR) {
rfc822_write_address (tmp, sizeof(tmp),
}
else if (DTYPE (option->type) == DT_ADDR) {
rfc822_write_address (tmp, sizeof(tmp),
- *((
ADDRESS
**) option->data), 0);
+ *((
address_t
**) option->data), 0);
}
else if (DTYPE (option->type) == DT_QUAD)
m_strcpy(tmp, sizeof(tmp), vals[quadoption(option->data)]);
}
else if (DTYPE (option->type) == DT_QUAD)
m_strcpy(tmp, sizeof(tmp), vals[quadoption(option->data)]);