84 if (!str || (*str ==
'\0') || !defs)
91 const char *parsed_until = NULL;
121 if (!exp || !exp->
node || !erc)
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
struct Expando * expando_new(const char *format)
Create an Expando from a string.
struct Expando * expando_parse(const char *str, const struct ExpandoDefinition *defs, struct Buffer *err)
Parse an Expando string.
void expando_free(struct Expando **ptr)
Free an Expando object.
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.
bool expando_equal(const struct Expando *a, const struct Expando *b)
Compare two expandos.
bool node_parse_many(struct ExpandoNode *node_cont, const char *str, NodeTextTermFlags term_chars, const struct ExpandoDefinition *defs, const char **parsed_until, struct ExpandoParseError *err)
Parse a format string.
#define MUTT_MEM_CALLOC(n, type)
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void node_free(struct ExpandoNode **ptr)
Free an ExpandoNode and its private data.
struct ExpandoNode * node_container_new(void)
Create a new Container ExpandoNode.
void node_container_collapse_all(struct ExpandoNode **ptr)
Remove unnecessary Containers.
Expando Node for a Container.
void node_padding_repad(struct ExpandoNode **ptr)
Rearrange Padding in a tree of ExpandoNodes.
Expando Node for Padding.
#define NTE_NO_FLAGS
No flags are set.
int node_render(const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Render a tree of ExpandoNodes into a string.
Render Expandos using Data.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
String manipulation buffer.
Definition of a format string.
Buffer for parsing errors.
char message[1024]
Error message.
const char * position
Position of error in original string.
struct ExpandoNode * node
Parsed tree.
const char * string
Pointer to the parsed string.