81 if (!str || (*str ==
'\0') || !defs)
87 const char *end = NULL;
88 const char *start = exp->
string;
127 if (!exp || !exp->
node || !rdata)
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
struct ExpandoNode * node_parse(const char *str, const char *end, enum ExpandoConditionStart condition_start, const char **parsed_until, const struct ExpandoDefinition *defs, struct ExpandoParseError *err)
Parse a format string into ExpandoNodes.
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.
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.
void expando_free(struct Expando **ptr)
Free an Expando object.
bool expando_equal(const struct Expando *a, const struct Expando *b)
Compare two expandos.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
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_add_child(struct ExpandoNode *node, struct ExpandoNode *child)
Add a child to an ExpandoNode.
void node_free(struct ExpandoNode **ptr)
Free an ExpandoNode and its private data.
Expando Node for a Condition.
@ CON_NO_CONDITION
Parser is not currently in a condition.
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.
int node_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, 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.
const char * position
Position of error in original string.
char message[256]
Error message.
struct ExpandoNode * node
Parsed tree.
const char * string
Pointer to the parsed string.