NeoMutt  2025-09-05-55-g97fc89
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
search_state.c
Go to the documentation of this file.
1
23
29
30#include "config.h"
31#include "mutt/lib.h"
32#include "search_state.h"
33#include "lib.h"
34
40{
41 struct SearchState *s = MUTT_MEM_CALLOC(1, struct SearchState);
42 s->string = buf_pool_get();
44 return s;
45}
46
52{
53 if (!ptr || !*ptr)
54 return;
55
56 struct SearchState *s = *ptr;
60
61 FREE(ptr);
62}
void mutt_pattern_free(struct PatternList **pat)
Free a Pattern.
Definition compile.c:774
#define FREE(x)
Definition memory.h:62
#define MUTT_MEM_CALLOC(n, type)
Definition memory.h:47
Convenience wrapper for the library headers.
Match patterns to emails.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition pool.c:82
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition pool.c:96
void search_state_free(struct SearchState **ptr)
Free a SearchState.
struct SearchState * search_state_new(void)
Create a new SearchState.
Holds state of a search.
Holds state of a search.
struct Buffer * string
search string
struct Buffer * string_expn
expanded search string
struct PatternList * pattern
compiled search pattern