X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fquery.c;h=99631bff692d4d73392d92ff553b58a23037f1fc;hp=11fa388831a4489ac87619a91e4db7f50899ee27;hb=f2ff91d8b7627e22af9715d384b6f9e9e802a39e;hpb=230399f9632c37b66c1c117a17e8327eae6b3235 diff --git a/lib-ui/query.c b/lib-ui/query.c index 11fa388..99631bf 100644 --- a/lib-ui/query.c +++ b/lib-ui/query.c @@ -7,15 +7,8 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include - #include + #include #include @@ -83,7 +76,7 @@ static QUERY *run_query (char *s, int quiet) 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; @@ -126,7 +119,7 @@ static QUERY *run_query (char *s, int quiet) } } p_delete(&buf); - fclose (fp); + m_fclose(&fp); if (mutt_wait_filter (thepid)) { if (!quiet) mutt_error ("%s", msg); @@ -178,7 +171,7 @@ static void query_entry (char *s, ssize_t slen, MUTTMENU * m, int num) 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, @@ -220,7 +213,7 @@ int mutt_query_complete (char *buf, ssize_t buflen) 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); @@ -433,7 +426,7 @@ static void query_menu (char *buf, ssize_t buflen, QUERY * results, int retbuf) 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); } @@ -441,9 +434,8 @@ static void query_menu (char *buf, ssize_t buflen, QUERY * results, int retbuf) 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); } @@ -454,7 +446,7 @@ static void query_menu (char *buf, ssize_t buflen, QUERY * results, int retbuf) 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); }