NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
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
38{
39 struct ParseError *pc = MUTT_MEM_CALLOC(1, struct ParseError);
40
41 pc->message = buf_pool_get();
42
43 return pc;
44}
45
50void parse_error_free(struct ParseError **pptr)
51{
52 if (!pptr || !*pptr)
53 return;
54
55 struct ParseError *pe = *pptr;
56
58
59 FREE(pptr);
60}
61
67{
68 buf_reset(pe->message);
69}
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
Definition buffer.c:76
#define FREE(x)
Free memory and set the pointer to NULL.
Definition memory.h:68
#define MUTT_MEM_CALLOC(n, type)
Definition memory.h:52
Convenience wrapper for the library headers.
void parse_error_reset(struct ParseError *pe)
Clear the contents of a ParseError.
Definition perror.c:66
void parse_error_free(struct ParseError **pptr)
Free a ParseError.
Definition perror.c:50
struct ParseError * parse_error_new(void)
Create a new ParseError.
Definition perror.c:37
Parse Errors.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition pool.c:91
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition pool.c:111
Detailed error information from config parsing.
Definition perror.h:34
struct Buffer * message
Error message.
Definition perror.h:35