47#define MUTT_SEARCH_UP 1
48#define MUTT_SEARCH_DOWN 2
67 if (!(search_buf && *search_buf) || ((op != OP_SEARCH_NEXT) && (op != OP_SEARCH_OPPOSITE)))
72 _(
"Reverse search for: "),
83 menu->
search_dir = ((op == OP_SEARCH) || (op == OP_SEARCH_NEXT)) ?
89 if (op == OP_SEARCH_OPPOSITE)
90 search_dir = -search_dir;
95 rc =
REG_COMP(&re, search_buf, REG_NOSUB | flags);
100 regerror(rc, &re, buf->
data, buf->
dsize);
106 rc = menu->
current + search_dir;
110 while ((rc >= 0) && (rc < menu->max))
112 if (menu->
search(menu, &re, rc) == 0)
122 if (c_wrap_search && (wrap++ == 0))
124 rc = (search_dir == 1) ? 0 : menu->
max - 1;
149 case OP_CURRENT_BOTTOM:
153 case OP_CURRENT_MIDDLE:
221 int index =
search(menu, op);
249 const int digit = op - OP_JUMP;
257 NULL, NULL, NULL) == 0) &&
322 if (!win || !win->
wdata)
bool mutt_buffer_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
const char * dispacher_get_retval_name(int rv)
Get the name of a return value.
@ FR_SUCCESS
Valid function - successfully performed.
@ FR_UNKNOWN
Unknown function.
int mutt_buffer_get_field(const char *field, struct Buffer *buf, CompletionFlags complete, bool multiple, struct Mailbox *m, char ***files, int *numfiles)
Ask the user for a string.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
void mutt_help(enum MenuType menu)
Display the help menu.
@ LL_DEBUG1
Log at debug level 1.
bool mutt_mb_is_lower(const char *s)
Does a multi-byte string contain only lowercase characters?
Convenience wrapper for the library headers.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Many unsorted constants and some structs.
#define MUTT_COMP_NO_FLAGS
No flags are set.
#define MUTT_COMP_CLEAR
Clear input if printable character is pressed.
const char * opcodes_get_name(int op)
Get the name of an opcode.
All user-callable functions.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
Prototypes for many functions.
#define REG_COMP(preg, regex, cflags)
Compile a regular expression.
String manipulation buffer.
size_t dsize
Length of data.
char * data
Pointer to data.
void * wdata
Private data.