87 const char **parsed_until)
89 if (!str || (str[0] ==
'\0') || !parsed_until)
94 while (str[0] !=
'\0')
110 if ((str[0] ==
'%') && (str[1] ==
'%'))
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
static int node_text_render(const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Render a Text Node - Implements ExpandoNode::render() -.
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
struct ExpandoNode * node_new(void)
Create a new empty ExpandoNode.
struct ExpandoNode * node_text_new(const char *text)
Create a new Text ExpandoNode.
struct ExpandoNode * node_text_parse(const char *str, NodeTextTermFlags term_chars, const char **parsed_until)
Extract a block of text.
#define NTE_QUESTION
'?' Question mark
#define NTE_GREATER
'>' Greater than
uint8_t NodeTextTermFlags
Special characters that end a text string.
#define NTE_AMPERSAND
'&' Ampersand
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Render Expandos using Data.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
String manipulation buffer.
int(* render)(const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
const char * text
Node-specific text.
enum ExpandoNodeType type
Type of Node, e.g. ENT_EXPANDO.