NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
perror.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include "
mutt/lib.h
"
31
#include "
perror.h
"
32
37
struct
ParseError
*
parse_error_new
(
void
)
38
{
39
struct
ParseError
*pc =
MUTT_MEM_CALLOC
(1,
struct
ParseError
);
40
41
pc->
message
=
buf_pool_get
();
42
43
return
pc;
44
}
45
50
void
parse_error_free
(
struct
ParseError
**pptr)
51
{
52
if
(!pptr || !*pptr)
53
return
;
54
55
struct
ParseError
*pe = *pptr;
56
57
buf_pool_release
(&pe->
message
);
58
59
FREE
(pptr);
60
}
61
66
void
parse_error_reset
(
struct
ParseError
*pe)
67
{
68
buf_reset
(pe->
message
);
69
}
buf_reset
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
Definition
buffer.c:89
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.
parse_error_reset
void parse_error_reset(struct ParseError *pe)
Clear the contents of a ParseError.
Definition
perror.c:66
parse_error_free
void parse_error_free(struct ParseError **pptr)
Free a ParseError.
Definition
perror.c:50
parse_error_new
struct ParseError * parse_error_new(void)
Create a new ParseError.
Definition
perror.c:37
perror.h
Parse Errors.
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
ParseError
Detailed error information from config parsing.
Definition
perror.h:34
ParseError::message
struct Buffer * message
Error message.
Definition
perror.h:35