return (src);
}
-int alias_search (MUTTMENU *m, regex_t *re, int n)
-{
- char s[LONG_STRING];
- int slen = sizeof(s);
-
- mutt_FormatString (s, slen, NONULL (AliasFmt), alias_format_str,
- (unsigned long) ((ALIAS **) m->data)[n], 0);
- return regexec (re, s, 0, NULL, 0);
-}
-
-
void alias_entry (char *s, size_t slen, MUTTMENU *m, int num)
{
mutt_FormatString (s, slen, NONULL (AliasFmt), alias_format_str, (unsigned long) ((ALIAS **) m->data)[num], M_FORMAT_ARROWCURSOR);
menu = mutt_new_menu ();
menu->make_entry = alias_entry;
- menu->search = alias_search;
menu->tag = alias_tag;
menu->menu = MENU_ALIAS;
menu->title = _("Aliases");
return ColorDefs[MT_COLOR_NORMAL];
}
+static int menu_search_generic (MUTTMENU *m, regex_t *re, int n)
+{
+ char buf[LONG_STRING];
+
+ m->make_entry (buf, sizeof (buf), m, n);
+ return (regexec (re, buf, 0, NULL, 0));
+}
+
MUTTMENU *mutt_new_menu (void)
{
MUTTMENU *p = (MUTTMENU *) safe_calloc (1, sizeof (MUTTMENU));
p->redraw = REDRAW_FULL;
p->pagelen = PAGELEN;
p->color = default_color;
+ p->search = menu_search_generic;
return (p);
}
(unsigned long) &entry, M_FORMAT_ARROWCURSOR);
}
-static int pgp_search (MUTTMENU * m, regex_t * re, int n)
-{
- char buf[LONG_STRING];
-
- pgp_entry (buf, sizeof (buf), m, n);
- return (regexec (re, buf, 0, NULL, 0));
-}
-
static int pgp_compare (const void *a, const void *b)
{
int r;
menu = mutt_new_menu ();
menu->max = keymax;
menu->make_entry = pgp_entry;
- menu->search = pgp_search;
menu->menu = MENU_PGP;
menu->help = helpstr;
menu->data = KeyTable;
static const char *mix_format_caps (REMAILER *r);
static int mix_chain_add (MIXCHAIN *chain, const char *s, REMAILER **type2_list);
static int mix_get_caps (const char *capstr);
-static int mix_search (MUTTMENU *, regex_t *, int);
static void mix_add_entry (REMAILER ***, REMAILER *, size_t *, size_t *);
static void mix_entry (char *b, size_t blen, MUTTMENU *menu, int num);
static void mix_free_remailer (REMAILER **r);
(unsigned long) type2_list[num], M_FORMAT_ARROWCURSOR);
}
-static int mix_search (MUTTMENU *m, regex_t *re, int n)
-{
- char buf[LONG_STRING];
-
- mix_entry (buf, sizeof (buf), m, n);
- return (regexec (re, buf, 0, NULL, 0));
-}
-
static int mix_chain_add (MIXCHAIN *chain, const char *s,
REMAILER **type2_list)
{
menu->menu = MENU_MIX;
menu->max = ttll;
menu->make_entry = mix_entry;
- menu->search = mix_search;
menu->tag = NULL;
menu->title = _("Select a remailer chain.");
menu->data = type2_list;