X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fquery.c;h=2ce89614922d934fe565771ae30814c25edbf4a2;hb=3c94b38b2555a98b4a7f3d9d9e1ac4aadc830edf;hp=2a60afa1760c9247fbcf2a63953be27c2edb4843;hpb=96e4b6de291b2195b26289fb03536acd101c6650;p=apps%2Fmadmutt.git diff --git a/lib-ui/query.c b/lib-ui/query.c index 2a60afa..2ce8961 100644 --- a/lib-ui/query.c +++ b/lib-ui/query.c @@ -7,21 +7,12 @@ * 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 -#include -#include -#include +#include #include +#include #include "mutt.h" #include "alias.h" @@ -85,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; @@ -128,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); @@ -350,7 +341,7 @@ static void query_menu (char *buf, ssize_t buflen, QUERY * results, int retbuf) QueryTable[i].data = queryp; } else { - int clear = 0; + int doclear = 0; /* append */ p_realloc(&QueryTable, menu->max); @@ -361,10 +352,10 @@ static void query_menu (char *buf, ssize_t buflen, QUERY * results, int retbuf) 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; } } @@ -443,7 +434,7 @@ 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__ */ + m_strcat(buf, buflen, ", "); rfc822_write_address ((char *) buf + curpos + 1, buflen - curpos - 1, tmpa, 0); curpos = m_strlen(buf);