NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
search_state.c
Go to the documentation of this file.
1
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:778
#define FREE(x)
Definition: memory.h:55
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
Convenience wrapper for the library headers.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:81
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition: pool.c:94
void search_state_free(struct SearchState **ptr)
Free a SearchState.
Definition: search_state.c:51
struct SearchState * search_state_new(void)
Create a new SearchState.
Definition: search_state.c:39
Holds state of a search.
Key value store.
Holds state of a search.
Definition: search_state.h:36
struct Buffer * string
search string
Definition: search_state.h:38
struct Buffer * string_expn
expanded search string
Definition: search_state.h:39
struct PatternList * pattern
compiled search pattern
Definition: search_state.h:37