NeoMutt  2024-10-02-37-gfa9146
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, sizeof(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
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:51
#define FREE(x)
Definition: memory.h:45
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