tmp = rfc822_cpy_adr (r->addr);
if (!tmp->next && !tmp->personal)
- tmp->personal = safe_strdup (r->name);
+ tmp->personal = str_dup (r->name);
mutt_addrlist_to_idna (tmp, NULL);
return tmp;
if (first == NULL) {
FirstColumn = 0;
SecondColumn = 0;
- first = (QUERY *) safe_calloc (1, sizeof (QUERY));
+ first = (QUERY *) mem_calloc (1, sizeof (QUERY));
cur = first;
}
else {
- cur->next = (QUERY *) safe_calloc (1, sizeof (QUERY));
+ cur->next = (QUERY *) mem_calloc (1, sizeof (QUERY));
cur = cur->next;
}
l = mutt_strwidth (p);
if (l > FirstColumn)
FirstColumn = l;
- cur->name = safe_strdup (p);
+ cur->name = str_dup (p);
p = strtok (NULL, "\t\n");
if (p) {
- cur->other = safe_strdup (p);
+ cur->other = str_dup (p);
}
}
}
}
- FREE (&buf);
+ mem_free (&buf);
fclose (fp);
if (mutt_wait_filter (thepid)) {
debug_print (1, ("Error: %s\n", msg));
mutt_format_string (buf2, sizeof (buf2),
FirstColumn + 2, FirstColumn + 2,
0, ' ', table[num].data->name,
- safe_strlen (table[num].data->name), 0);
+ str_len (table[num].data->name), 0);
snprintf (s, slen, " %c %3d %s %-*.*s %s",
table[num].tagged ? '*' : ' ',
menu->max++;
menu->data = QueryTable =
- (ENTRY *) safe_calloc (menu->max, sizeof (ENTRY));
+ (ENTRY *) mem_calloc (menu->max, sizeof (ENTRY));
for (i = 0, queryp = results; queryp; queryp = queryp->next, i++)
QueryTable[i].data = queryp;
queryp = results;
while (queryp) {
rfc822_free_address (&queryp->addr);
- FREE (&queryp->name);
- FREE (&queryp->other);
+ mem_free (&queryp->name);
+ mem_free (&queryp->other);
results = queryp->next;
- FREE (&queryp);
+ mem_free (&queryp);
queryp = results;
}
results = newresults;
- FREE (&QueryTable);
+ mem_free (&QueryTable);
}
else {
/* append */
if (op == OP_QUERY) {
menu->data = QueryTable =
- (ENTRY *) safe_calloc (menu->max, sizeof (ENTRY));
+ (ENTRY *) mem_calloc (menu->max, sizeof (ENTRY));
for (i = 0, queryp = results; queryp;
queryp = queryp->next, i++)
int clear = 0;
/* append */
- safe_realloc (&QueryTable, menu->max * sizeof (ENTRY));
+ mem_realloc (&QueryTable, menu->max * sizeof (ENTRY));
menu->data = QueryTable;
mutt_addrlist_to_local (tmpa);
tagged = 1;
rfc822_write_address (buf, buflen, tmpa, 0);
- curpos = safe_strlen (buf);
+ curpos = str_len (buf);
rfc822_free_address (&tmpa);
}
else if (curpos + 2 < buflen) {
strcat (buf, ", "); /* __STRCAT_CHECKED__ */
rfc822_write_address ((char *) buf + curpos + 1,
buflen - curpos - 1, tmpa, 0);
- curpos = safe_strlen (buf);
+ curpos = str_len (buf);
rfc822_free_address (&tmpa);
}
}
queryp = results;
while (queryp) {
rfc822_free_address (&queryp->addr);
- FREE (&queryp->name);
- FREE (&queryp->other);
+ mem_free (&queryp->name);
+ mem_free (&queryp->other);
results = queryp->next;
- FREE (&queryp);
+ mem_free (&queryp);
queryp = results;
}
- FREE (&QueryTable);
+ mem_free (&QueryTable);
/* tell whoever called me to redraw the screen when I return */
set_option (OPTNEEDREDRAW);