*/
void mutt_check_simple(char *s, size_t len, const char *simple)
{
- char tmp[LONG_STRING];
bool do_simple = true;
for (char *p = s; p && *p; p++)
mutt_str_strfcpy(s, "~U", len);
else
{
+ char tmp[LONG_STRING];
quote_simple(tmp, sizeof(tmp), s);
mutt_expand_fmt(s, len, simple, tmp);
}
int mutt_search_command(int cur, int op)
{
- char buf[STRING];
- char temp[LONG_STRING];
- int incr;
- struct Header *h = NULL;
struct Progress progress;
- const char *msg = NULL;
if (!*LastSearch || (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE))
{
+ char buf[STRING];
mutt_str_strfcpy(buf, *LastSearch ? LastSearch : "", sizeof(buf));
if (mutt_get_field((op == OP_SEARCH || op == OP_SEARCH_NEXT) ?
_("Search for: ") :
/* compare the *expanded* version of the search pattern in case
$simple_search has changed while we were searching */
+ char temp[LONG_STRING];
mutt_str_strfcpy(temp, buf, sizeof(temp));
mutt_check_simple(temp, sizeof(temp), NONULL(SimpleSearch));
OPT_SEARCH_INVALID = false;
}
- incr = (OPT_SEARCH_REVERSE) ? -1 : 1;
+ int incr = (OPT_SEARCH_REVERSE) ? -1 : 1;
if (op == OP_SEARCH_OPPOSITE)
incr = -incr;
for (int i = cur + incr, j = 0; j != Context->vcount; j++)
{
+ const char *msg = NULL;
mutt_progress_update(&progress, j, -1);
if (i > Context->vcount - 1)
{
}
}
- h = Context->hdrs[Context->v2r[i]];
+ struct Header *h = Context->hdrs[Context->v2r[i]];
if (h->searched)
{
/* if we've already evaluated this message, use the cached value */