NeoMutt
2025-12-11-1031-gfb8e54
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
expando.h
Go to the documentation of this file.
1
23
24
#ifndef MUTT_EXPANDO_EXPANDO_H
25
#define MUTT_EXPANDO_EXPANDO_H
26
27
#include <stdbool.h>
28
#include "
render.h
"
29
30
struct
Buffer
;
31
struct
ExpandoDefinition
;
32
40
struct
Expando
41
{
42
const
char
*
string
;
43
struct
ExpandoNode
*
node
;
44
};
45
46
void
expando_free
(
struct
Expando
**ptr);
47
struct
Expando
*
expando_new
(
const
char
*format);
48
49
bool
expando_equal
(
const
struct
Expando
*a,
const
struct
Expando
*b);
50
51
const
struct
ExpandoNode
*
expando_find_node
(
const
struct
Expando
*exp,
int
did
,
int
uid
);
52
53
struct
Expando
*
expando_parse
(
const
char
*str,
const
struct
ExpandoDefinition
*defs,
struct
Buffer
*err);
54
55
int
expando_render
(
const
struct
Expando
*exp,
const
struct
ExpandoRenderCallback
*erc,
void
*data,
MuttFormatFlags
flags,
int
max_cols,
struct
Buffer
*buf);
56
57
#endif
/* MUTT_EXPANDO_EXPANDO_H */
expando_new
struct Expando * expando_new(const char *format)
Create an Expando from a string.
Definition
expando.c:49
expando_find_node
const struct ExpandoNode * expando_find_node(const struct Expando *exp, int did, int uid)
Find a Node in an Expando tree.
Definition
expando.c:109
expando_parse
struct Expando * expando_parse(const char *str, const struct ExpandoDefinition *defs, struct Buffer *err)
Parse an Expando string.
Definition
expando.c:124
expando_free
void expando_free(struct Expando **ptr)
Free an Expando object.
Definition
expando.c:61
expando_render
int expando_render(const struct Expando *exp, const struct ExpandoRenderCallback *erc, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando + data into a string.
Definition
expando.c:161
expando_equal
bool expando_equal(const struct Expando *a, const struct Expando *b)
Compare two expandos.
Definition
expando.c:180
render.h
Render Expandos using Data.
MuttFormatFlags
uint8_t MuttFormatFlags
Definition
render.h:45
Buffer
String manipulation buffer.
Definition
buffer.h:36
ExpandoDefinition
Definition of a format string.
Definition
definition.h:49
ExpandoNode
Basic Expando Node.
Definition
node.h:67
ExpandoNode::uid
int uid
Unique ID, e.g. ED_EMA_SIZE.
Definition
node.h:70
ExpandoNode::did
int did
Domain ID, e.g. ED_EMAIL.
Definition
node.h:69
ExpandoRenderCallback
Definition
render.h:82
Expando
Parsed Expando trees.
Definition
expando.h:41
Expando::node
struct ExpandoNode * node
Parsed tree.
Definition
expando.h:43
Expando::string
const char * string
Pointer to the parsed string.
Definition
expando.h:42