X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=query.c;h=5c5d0a3a40d4a34a9cec9d7dd768ce30e8d78580;hp=c3e948d2956a1172666ce4360255325824228750;hb=f997801a16ce4a8530cb30cddebfe6243cb3502d;hpb=74a2265af51ce89bca845adc1d68f273c9933c13 diff --git a/query.c b/query.c index c3e948d..5c5d0a3 100644 --- a/query.c +++ b/query.c @@ -20,6 +20,7 @@ #include "lib/mem.h" #include "lib/intl.h" #include "lib/str.h" +#include "lib/debug.h" #include #include @@ -85,7 +86,7 @@ static QUERY *run_query (char *s, int quiet) mutt_expand_file_fmt (cmd, sizeof (cmd), QueryCmd, s); if ((thepid = mutt_create_filter (cmd, NULL, &fp, NULL)) < 0) { - dprint (1, (debugfile, "unable to fork command: %s", cmd)); + debug_print (1, ("unable to fork command: %s\n", cmd)); return 0; } if (!quiet) @@ -128,7 +129,7 @@ static QUERY *run_query (char *s, int quiet) FREE (&buf); fclose (fp); if (mutt_wait_filter (thepid)) { - dprint (1, (debugfile, "Error: %s\n", msg)); + debug_print (1, ("Error: %s\n", msg)); if (!quiet) mutt_error ("%s", msg); } @@ -155,11 +156,6 @@ static int query_search (MUTTMENU * m, regex_t * re, int n) if (table[n].data->addr->mailbox && !regexec (re, table[n].data->addr->mailbox, 0, NULL, 0)) return 0; -#ifdef EXACT_ADDRESS - if (table[n].data->addr->val && - !regexec (re, table[n].data->addr->val, 0, NULL, 0)) - return 0; -#endif } return REG_NOMATCH; @@ -189,7 +185,7 @@ static void query_entry (char *s, size_t slen, MUTTMENU * m, int num) mutt_format_string (buf2, sizeof (buf2), FirstColumn + 2, FirstColumn + 2, 0, ' ', table[num].data->name, - mutt_strlen (table[num].data->name), 0); + safe_strlen (table[num].data->name), 0); snprintf (s, slen, " %c %3d %s %-*.*s %s", table[num].tagged ? '*' : ' ', @@ -448,7 +444,7 @@ static void query_menu (char *buf, size_t buflen, QUERY * results, int retbuf) mutt_addrlist_to_local (tmpa); tagged = 1; rfc822_write_address (buf, buflen, tmpa, 0); - curpos = mutt_strlen (buf); + curpos = safe_strlen (buf); rfc822_free_address (&tmpa); } else if (curpos + 2 < buflen) { @@ -458,7 +454,7 @@ static void query_menu (char *buf, size_t buflen, QUERY * results, int retbuf) strcat (buf, ", "); /* __STRCAT_CHECKED__ */ rfc822_write_address ((char *) buf + curpos + 1, buflen - curpos - 1, tmpa, 0); - curpos = mutt_strlen (buf); + curpos = safe_strlen (buf); rfc822_free_address (&tmpa); } }