NeoMutt
2025-12-11-1009-ga75d9e
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
private_data.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include "
mutt/lib.h
"
31
#include "
private_data.h
"
32
#include "
lib.h
"
33
37
void
browser_private_data_free
(
struct
BrowserPrivateData
**ptr)
38
{
39
if
(!ptr || !*ptr)
40
return
;
41
42
struct
BrowserPrivateData
*priv = *ptr;
43
44
buf_pool_release
(&priv->
old_last_dir
);
45
buf_pool_release
(&priv->
prefix
);
46
destroy_state
(&priv->
state
);
47
48
FREE
(ptr);
49
}
50
55
struct
BrowserPrivateData
*
browser_private_data_new
(
void
)
56
{
57
struct
BrowserPrivateData
*priv =
MUTT_MEM_CALLOC
(1,
struct
BrowserPrivateData
);
58
59
priv->
old_last_dir
=
buf_pool_get
();
60
priv->
prefix
=
buf_pool_get
();
61
62
return
priv;
63
}
destroy_state
void destroy_state(struct BrowserState *state)
Free the BrowserState.
Definition
functions.c:154
lib.h
Select a Mailbox from a list.
browser_private_data_new
struct BrowserPrivateData * browser_private_data_new(void)
Create new Browser Data.
Definition
private_data.c:55
private_data.h
Private state data for the Browser.
browser_private_data_free
void browser_private_data_free(struct BrowserPrivateData **ptr)
Free Private Browser Data - Implements MuttWindow::wdata_free() -.
Definition
private_data.c:37
FREE
#define FREE(x)
Free memory and set the pointer to NULL.
Definition
memory.h:68
MUTT_MEM_CALLOC
#define MUTT_MEM_CALLOC(n, type)
Definition
memory.h:52
lib.h
Convenience wrapper for the library headers.
buf_pool_get
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition
pool.c:91
buf_pool_release
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition
pool.c:111
BrowserPrivateData
Private state data for the Browser.
Definition
private_data.h:34
BrowserPrivateData::prefix
struct Buffer * prefix
Folder prefix string.
Definition
private_data.h:49
BrowserPrivateData::old_last_dir
struct Buffer * old_last_dir
Previous to last dir.
Definition
private_data.h:48
BrowserPrivateData::state
struct BrowserState state
State containing list of files/dir/mailboxes.
Definition
private_data.h:42