* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/file.h>
-#include <lib-lib/mapping.h>
+#include <lib-sys/unix.h>
#include <lib-ui/menu.h>
+#include <lib-ui/curses.h>
#include "mutt.h"
#include "alias.h"
int l;
- mutt_expand_file_fmt (cmd, sizeof (cmd), QueryCmd, s);
+ m_quotefile_fmt(cmd, sizeof (cmd), QueryCmd, s);
if ((thepid = mutt_create_filter (cmd, NULL, &fp, NULL)) < 0) {
return 0;
}
}
p_delete(&buf);
- fclose (fp);
+ m_fclose(&fp);
if (mutt_wait_filter (thepid)) {
if (!quiet)
mutt_error ("%s", msg);
SecondColumn = QUERY_MIN_COLUMN_LENGHT;
}
- rfc822_write_address (buf, sizeof (buf), table[num].data->addr, 1);
+ rfc822_addrcat(buf, sizeof (buf), table[num].data->addr, 1);
mutt_format_string (buf2, sizeof (buf2),
FirstColumn + 2, FirstColumn + 2,
tmpa = result_to_addr (results);
mutt_addrlist_to_local (tmpa);
buf[0] = '\0';
- rfc822_write_address (buf, buflen, tmpa, 0);
+ rfc822_addrcat(buf, buflen, tmpa, 0);
address_list_wipe(&tmpa);
mutt_clear_error ();
return (0);
QueryTable[i].data = queryp;
}
else {
- int clear = 0;
+ int doclear = 0;
/* append */
p_realloc(&QueryTable, menu->max);
queryp = queryp->next, i++) {
/* once we hit new entries, clear/init the tag */
if (queryp == newresults)
- clear = 1;
+ doclear = 1;
QueryTable[i].data = queryp;
- if (clear)
+ if (doclear)
QueryTable[i].tagged = 0;
}
}
mutt_addrlist_to_local (tmpa);
tagged = 1;
- rfc822_write_address (buf, buflen, tmpa, 0);
+ rfc822_addrcat(buf, buflen, tmpa, 0);
curpos = m_strlen(buf);
address_list_wipe(&tmpa);
}
address_t *tmpa = result_to_addr (QueryTable[i].data);
mutt_addrlist_to_local (tmpa);
- strcat (buf, ", "); /* __STRCAT_CHECKED__ */
- rfc822_write_address ((char *) buf + curpos + 1,
- buflen - curpos - 1, tmpa, 0);
+ m_strcat(buf, buflen, ", ");
+ rfc822_addrcat(buf + curpos + 1, buflen - curpos - 1, tmpa, 0);
curpos = m_strlen(buf);
address_list_wipe(&tmpa);
}
address_t *tmpa = result_to_addr (QueryTable[menu->current].data);
mutt_addrlist_to_local (tmpa);
- rfc822_write_address (buf, buflen, tmpa, 0);
+ rfc822_addrcat(buf, buflen, tmpa, 0);
address_list_wipe(&tmpa);
}