NeoMutt  2024-04-25-115-gb99441
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
render.c
Go to the documentation of this file.
1
31#include "config.h"
32#include "render.h"
33#include "node.h"
34
45int node_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata,
46 struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
47{
48 int total_cols = 0;
49
50 for (; node && (total_cols < max_cols); node = node->next)
51 {
52 if (!node->render)
53 continue;
54
55 total_cols += node->render(node, rdata, buf, max_cols - total_cols, data, flags);
56 }
57
58 return total_cols;
59}
Basic Expando Node.
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.
Definition: render.c:45
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
Basic Expando Node.
Definition: node.h:69
int(* render)(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Definition: node.h:96
struct ExpandoNode * next
Linked list.
Definition: node.h:71