NeoMutt  2024-04-16-36-g75b6fb
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
expando.h
Go to the documentation of this file.
1
24#ifndef MUTT_EXPANDO_EXPANDO_H
25#define MUTT_EXPANDO_EXPANDO_H
26
27#include <stdbool.h>
28#include "render.h"
29
30struct Buffer;
32
40struct Expando
41{
42 const char *string;
43 struct ExpandoNode *tree;
44};
45
46void expando_free(struct Expando **ptr);
47struct Expando *expando_new (const char *format);
48
49bool expando_equal(const struct Expando *a, const struct Expando *b);
50
51struct Expando *expando_parse(const char *str, const struct ExpandoDefinition *defs, struct Buffer *err);
52
53int expando_render(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
54
55#endif /* MUTT_EXPANDO_EXPANDO_H */
struct Expando * expando_new(const char *format)
Create an Expando from a string.
Definition: expando.c:43
struct Expando * expando_parse(const char *str, const struct ExpandoDefinition *defs, struct Buffer *err)
Parse an Expando string.
Definition: expando.c:74
int expando_render(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando + data into a string.
Definition: expando.c:109
void expando_free(struct Expando **ptr)
Free an Expando object.
Definition: expando.c:54
bool expando_equal(const struct Expando *a, const struct Expando *b)
Compare two expandos.
Definition: expando.c:129
Render Expandos using Data.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: render.h:32
String manipulation buffer.
Definition: buffer.h:36
Definition of a format string.
Definition: definition.h:52
Basic Expando Node.
Definition: node.h:67
Parsed Expando trees.
Definition: expando.h:41
struct ExpandoNode * tree
Parsed tree.
Definition: expando.h:43
const char * string
Pointer to the parsed string.
Definition: expando.h:42