69#define GV_HIDE_MVIEW_CONTENTS
80void dot_patternlist(FILE *fp,
struct PatternList *pl,
struct ListHead *links);
85 static const char *values[] = {
"false",
"true" };
86 fprintf(fp,
"\t\t<tr>\n");
87 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
88 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
89 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", values[val]);
90 fprintf(fp,
"\t\t</tr>\n");
96 fprintf(fp,
"\t\t<tr>\n");
97 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
98 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
100 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">NUL</td>\n");
102 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">'%c'</td>\n", ch);
103 fprintf(fp,
"\t\t</tr>\n");
114 fprintf(fp,
"\t\t<tr>\n");
115 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
116 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
119 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%p (%d)</td>\n",
120 (
void *) struct_fp, fileno(struct_fp));
124 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">NULL</td>\n");
126 fprintf(fp,
"\t\t</tr>\n");
131 fprintf(fp,
"\t\t<tr>\n");
132 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
133 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
134 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%d</td>\n", num);
135 fprintf(fp,
"\t\t</tr>\n");
140 for (
int i =
buf_len(buf) - 1; i >= 0; i--)
142 if (
buf_at(buf, i) ==
'<')
144 else if (
buf_at(buf, i) ==
'>')
146 else if (
buf_at(buf, 1) ==
'&')
153 if ((!str || (str[0] ==
'\0')) && !force)
161 bool quoted = ((
buf_at(buf, 0) !=
'[') && (
buf_at(buf, 0) !=
'*'));
163 fprintf(fp,
"\t\t<tr>\n");
164 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
165 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
167 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">\"%s\"</td>\n",
buf_string(buf));
169 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n",
buf_string(buf));
170 fprintf(fp,
"\t\t</tr>\n");
178 snprintf(buf, buflen,
"0%03o", umask);
184 snprintf(buf, buflen,
"obj_%p", ptr);
187void dot_ptr(FILE *fp,
const char *name,
void *ptr,
const char *colour)
189 fprintf(fp,
"\t\t<tr>\n");
190 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
191 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
194 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\">%p</td>\n",
199 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%p</td>\n", ptr);
201 fprintf(fp,
"\t\t</tr>\n");
204void dot_add_link(
struct ListHead *links,
void *src,
void *dst,
const char *label,
205 const char *short_label,
bool back,
const char *colour)
212 char obj1[64] = { 0 };
213 char obj2[64] = { 0 };
214 char text[512] = { 0 };
215 char lstr[128] = { 0 };
216 char sstr[128] = { 0 };
222 snprintf(lstr,
sizeof(lstr),
"edgetooltip=\"%s\"", label);
225 snprintf(sstr,
sizeof(sstr),
"label=\"%s\"", short_label);
227 snprintf(text,
sizeof(text),
"%s -> %s [ %s %s %s color=\"%s\" ]", obj1, obj2,
228 back ?
"dir=back" :
"", lstr, sstr, colour);
234 fprintf(fp,
"digraph neomutt\n");
235 fprintf(fp,
"{\n\n");
237 fprintf(fp,
"\tgraph [\n");
238 fprintf(fp,
"\t\trankdir=\"TB\"\n");
239 fprintf(fp,
"\t\tnodesep=\"0.5\"\n");
240 fprintf(fp,
"\t\tranksep=\"0.5\"\n");
241 fprintf(fp,
"\t];\n");
243 fprintf(fp,
"\tnode [\n");
244 fprintf(fp,
"\t\tshape=\"plain\"\n");
245 fprintf(fp,
"\t];\n");
247 fprintf(fp,
"\tedge [\n");
248 fprintf(fp,
"\t\tpenwidth=\"4.5\"\n");
249 fprintf(fp,
"\t\tarrowsize=\"1.0\"\n");
250 fprintf(fp,
"\t\tcolor=\"#c0c0c0\"\n");
251 fprintf(fp,
"\t];\n");
261 fprintf(fp,
"\t%s;\n", np->
data);
263 fprintf(fp,
"\n}\n");
268 char obj[64] = { 0 };
274 fprintf(fp,
"\t%s [\n", obj);
275 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
276 "color=\"#d0d0d0\">\n");
277 fprintf(fp,
"\t\t<tr>\n");
278 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\" port=\"top\" colspan=\"3\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font> <font point-size=\"12\">(%p)</font></td>\n",
280 fprintf(fp,
"\t\t</tr>\n");
285 fprintf(fp,
"\t\t</table>>\n");
286 fprintf(fp,
"\t];\n");
290void dot_node(FILE *fp,
void *ptr,
const char *name,
const char *colour)
292 char obj[64] = { 0 };
295 fprintf(fp,
"\t%s [\n", obj);
296 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
297 "color=\"#d0d0d0\">\n");
298 fprintf(fp,
"\t\t<tr>\n");
299 fprintf(fp,
"\t\t\t<td border=\"0\" bgcolor=\"%s\" port=\"top\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font></td>\n",
301 fprintf(fp,
"\t\t</tr>\n");
305void dot_node_link(FILE *fp,
void *ptr,
const char *name,
void *link,
const char *colour)
307 char obj[64] = { 0 };
310 fprintf(fp,
"\t%s [\n", obj);
311 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
312 "color=\"#d0d0d0\">\n");
313 fprintf(fp,
"\t\t<tr>\n");
314 fprintf(fp,
"\t\t\t<td border=\"0\" bgcolor=\"%s\" port=\"top\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font></td>\n",
316 fprintf(fp,
"\t\t</tr>\n");
318 fprintf(fp,
"\t\t<tr>\n");
319 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\">%p</td>\n", colour, link);
320 fprintf(fp,
"\t\t</tr>\n");
333 const char *slash = strrchr(path,
'/');
344 char tmp[1024] = { 0 };
349 if (u->
path && (u->
path[0] !=
'\0'))
352 snprintf(buf, buflen,
"%s:%s", u->
host, u->
user);
357#ifndef GV_HIDE_CONFIG
359 struct ListHead *links)
371 snprintf(scope,
sizeof(scope),
"%s:", sub->
name);
374 for (
size_t i = 0; list[i]; i++)
381 size_t slen = strlen(scope);
384 if (strchr(iname + slen,
':'))
427 const char *typestr = NULL;
456 typestr =
"COMPRESSED";
462 fprintf(fp,
"\t\t<tr>\n");
463 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
464 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
465 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", typestr);
466 fprintf(fp,
"\t\t</tr>\n");
481 char buf[64] = { 0 };
495 char buf[64] = { 0 };
545 char buf[64] = { 0 };
616#ifndef GV_HIDE_CONFIG
635 char name[256] = { 0 };
652#ifndef GV_HIDE_CONFIG
677 dot_add_link(links, prev, np,
"MailboxNode->next", NULL,
false, NULL);
717 dot_add_link(links, adata, adata->
conn,
"ImapAccountData->conn", NULL,
false, NULL);
723 char buf[64] = { 0 };
774 dot_add_link(links, adata, adata->
conn,
"NntpAccountData->conn", NULL,
false, NULL);
789 char buf[64] = { 0 };
804 dot_add_link(links, adata, adata->
conn,
"PopAccountData->conn", NULL,
false, NULL);
836#ifndef GV_HIDE_CONFIG
842 char name[256] = { 0 };
860 dot_add_link(links, a, first,
"Account->mailboxes", NULL,
false, NULL);
876 dot_add_link(links, prev, np,
"Account->next", NULL,
false, NULL);
887#ifdef GV_HIDE_MVIEW_CONTENTS
898 char name[256] = { 0 };
901 time_t now = time(NULL);
906 snprintf(name,
sizeof(name),
"%s-%s.gv", date, title);
914 FILE *fp = fopen(name,
"w");
920#ifndef GV_HIDE_NEOMUTT
923 "NeoMutt->accounts", NULL,
false, NULL);
924#ifndef GV_HIDE_CONFIG
928 char obj1[64] = { 0 };
929 char obj2[64] = { 0 };
932 buf_printf(buf,
"{ rank=same %s %s }", obj1, obj2);
944#ifndef GV_HIDE_NEOMUTT
946 fprintf(fp,
"\t{ rank=same ");
950 fprintf(fp,
"%s ", name);
953 fprintf(fp,
"%s ", name);
958 fprintf(fp,
"\t{ rank=same ");
967 fprintf(fp,
"%s ",
name);
976#ifndef GV_HIDE_BODY_CONTENT
1008#define ADD_BOOL(F) add_flag(buf, cont->F, #F)
1042 dot_add_link(links, aptr->
body, aptr,
"AttachPtr->body", NULL,
true, NULL);
1045void dot_body(FILE *fp,
struct Body *b,
struct ListHead *links,
bool link_next)
1074#define ADD_BOOL(F) add_flag(buf, b->F, #F)
1098#ifdef GV_HIDE_BODY_CONTENT
1111#ifndef GV_HIDE_BODY_CONTENT
1119#ifndef GV_HIDE_ENVELOPE
1140 if (b->
next && link_next)
1142 char name[256] = { 0 };
1164#ifndef GV_HIDE_BODY_CONTENT
1182#ifndef GV_HIDE_ENVELOPE
1205 struct ListHead *links)
1224#define ADD_FLAG(F) add_flag(buf, (env->changed & F), #F)
1232#define ADDR_LIST(AL) dot_addr_list(fp, #AL, &env->AL, links)
1288#define ADD_BOOL(F) add_flag(buf, e->F, #F)
1317#define ADD_BOOL(F) add_flag(buf, (e->security & F), #F)
1352 snprintf(zone,
sizeof(zone),
" (%c%02u%02u)", e->
zoccident ?
'-' :
'+',
1374#ifndef GV_HIDE_ENVELOPE
1402 char name[256] = { 0 };
1405 time_t now = time(NULL);
1409 FILE *fp = fopen(name,
"w");
1424 char name[256] = { 0 };
1431 snprintf(format,
sizeof(format),
"%%T-%s.gv", title);
1433 time_t now = time(NULL);
1437 FILE *fp = fopen(name,
"w");
1473 short idxmax,
struct ListHead *links)
1481 for (
size_t i = 0; i < idxmax; i++)
1483 snprintf(arr,
sizeof(arr),
"idx[%zu]", i);
1484 dot_ptr(fp, arr, idx[i],
"#3bcbc4");
1489 for (
size_t i = 0; i < idxlen; i++)
1492 dot_add_link(links, idx, idx[i],
"AttachCtx->idx", NULL,
false, NULL);
1503 for (
size_t i = 0; i < vcount; i++)
1505 snprintf(arr,
sizeof(arr),
"v2r[%zu]", i);
1513 struct ListHead *links)
1521 for (
size_t i = 0; i < fp_max; i++)
1523 snprintf(arr,
sizeof(arr),
"fp_idx[%zu]", i);
1531 short body_max,
struct ListHead *links)
1539 for (
size_t i = 0; i < body_max; i++)
1541 snprintf(arr,
sizeof(arr),
"body_idx[%zu]", i);
1542 dot_ptr(fp, arr, body_idx[i],
"#2020ff");
1547 for (
size_t i = 0; i < body_max; i++)
1551 dot_body(fp, body_idx[i], links,
true);
1552 dot_add_link(links, body_idx, body_idx[i],
"AttachCtx->Body", NULL,
false,
"#008000");
1568 dot_add_link(links, actx, actx->
idx,
"AttachCtx->idx", NULL,
false, NULL);
1574 dot_add_link(links, actx, actx->
v2r,
"AttachCtx->v2r", NULL,
false, NULL);
1592 char name[256] = { 0 };
1595 time_t now = time(NULL);
1599 FILE *fp = fopen(name,
"w");
1614 static struct Mapping PatternNames[] = {
1672 if ((pat->
min != 0) || (pat->
max != 0))
1678#define ADD_BOOL(F) add_flag(buf, pat->F, #F)
1718 dot_add_link(links, pat, first,
"Pattern->child", NULL,
false,
"#00ff00");
1727 char name[256] = { 0 };
1736 dot_add_link(links, prev, np,
"PatternList->next", NULL,
false,
"#ff0000");
1751 char name[256] = { 0 };
1754 time_t now = time(NULL);
1758 FILE *fp = fopen(name,
"w");
1786 size_t len = node->
end - node->
start;
1787 char text[64] = { 0 };
1804 char *
pad =
"UNKNOWN";
1808 pad =
"EPT_FILL_EOL";
1811 pad =
"EPT_HARD_FILL";
1814 pad =
"EPT_SOFT_FILL";
1821 size_t len = node->
end - node->
start;
1822 char text[64] = { 0 };
1833 dot_add_link(links, node, left,
"Pad->left",
"left",
false,
"#80ff80");
1840 dot_add_link(links, node, right,
"Pad->right",
"right",
false,
"#ff8080");
1854 size_t len = node->
end - node->
start;
1856 char str[64] = { 0 };
1868 dot_add_link(links, node, condition,
"Condition->condition",
"condition",
false,
"#ff80ff");
1872 dot_add_link(links, node, if_true_tree,
"Condition->true",
"true",
false,
"#80ff80");
1877 dot_add_link(links, node, if_false_tree,
"Condition->false",
"false",
false,
"#ff8080");
1884 struct ListHead *links)
1894 size_t len = node->
end - node->
start;
1896 char str[64] = { 0 };
1907 struct ListHead *links)
1917 size_t len = node->
end - node->
start;
1919 char str[64] = { 0 };
1944 char *just =
"UNKNOWN";
1948 just =
"JUSTIFY_LEFT";
1951 just =
"JUSTIFY_CENTER";
1954 just =
"JUSTIFY_RIGHT";
1977 dot_add_link(links, node, child,
"Node->child",
"child",
false,
"#80ff80");
1994 size_t len = node->
end - node->
start;
1996 char str[64] = { 0 };
2019 size_t len = node->
end - node->
start;
2021 char str[64] = { 0 };
2035 char name[256] = { 0 };
2039 for (; node; node = node->
next)
2073 dot_add_link(links, prev, node,
"ExpandoNode->next", NULL,
false,
"#808080");
2088 char name[256] = { 0 };
2091 time_t now = time(NULL);
2095 FILE *fp = fopen(name,
"w");
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
GUI display the mailboxes in a side panel.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
size_t buf_len(const struct Buffer *buf)
Calculate the length of a Buffer.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
char buf_at(const struct Buffer *buf, size_t offset)
Return the character at the given offset.
void buf_free(struct Buffer **ptr)
Deallocates a buffer.
void buf_inline_replace(struct Buffer *buf, size_t pos, size_t len, const char *str)
struct Buffer * buf_new(const char *str)
Allocate a new Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Compressed mbox local mailbox type.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_MMDF
'mmdf' Mailbox type
@ MUTT_POP
'POP3' Mailbox type
@ MUTT_MH
'MH' Mailbox type
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
@ MUTT_MBOX
'mbox' Mailbox type
@ MUTT_COMPRESSED
Compressed file Mailbox type.
@ MUTT_MAILDIR
'Maildir' Mailbox type
const char * name_content_encoding(enum ContentEncoding enc)
const char * name_content_type(enum ContentType type)
const char * name_content_disposition(enum ContentDisposition disp)
const char * name_expando_uid(enum ExpandoDomain did, int uid)
const char * name_expando_domain(enum ExpandoDomain did)
Structs that make up an email.
#define MUTT_ENV_CHANGED_SUBJECT
Protected header update.
#define MUTT_ENV_CHANGED_XLABEL
X-Label edited.
#define MUTT_ENV_CHANGED_IRT
In-Reply-To changed to link/break threads.
#define MUTT_ENV_CHANGED_REFS
References changed to break thread.
void dot_array_actx_idx(FILE *fp, struct AttachPtr **idx, short idxlen, short idxmax, struct ListHead *links)
void dot_mailbox_pop(FILE *fp, struct PopAccountData *adata, struct ListHead *links)
void dot_ptr_name(char *buf, size_t buflen, const void *ptr)
void dot_parameter_list(FILE *fp, const char *name, const struct ParameterList *pl)
void dot_expando_node_unknown(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_graph_header(FILE *fp)
void dot_account_pop(FILE *fp, struct PopAccountData *adata, struct ListHead *links)
void dot_object_footer(FILE *fp)
void dot_path_fs(char *buf, size_t buflen, const char *path)
void dump_graphviz_body(struct Body *b)
void dot_addr_list(FILE *fp, const char *name, const struct AddressList *al, struct ListHead *links)
void dot_mailbox_imap(FILE *fp, struct ImapMboxData *mdata, struct ListHead *links)
void dot_comp(FILE *fp, struct CompressInfo *ci, struct ListHead *links)
void dot_expando_node_empty(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_mailbox_type(FILE *fp, const char *name, enum MailboxType type)
void dot_attach_ptr2(FILE *fp, struct AttachPtr *aptr, struct ListHead *links)
void dot_type_date(char *buf, size_t buflen, time_t timestamp)
void dot_array_actx_v2r(FILE *fp, short *v2r, short vcount, struct ListHead *links)
void dot_type_number(FILE *fp, const char *name, int num)
void dot_expando_node_pad(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_email(FILE *fp, struct Email *e, struct ListHead *links)
void dot_type_char(FILE *fp, const char *name, char ch)
void dot_account_list(FILE *fp, struct AccountList *al, struct ListHead *links)
void dot_account_mbox(FILE *fp, struct MboxAccountData *adata, struct ListHead *links)
void dot_type_file(FILE *fp, const char *name, FILE *struct_fp)
void dump_graphviz(const char *title, struct MailboxView *mv)
void dot_format(FILE *fp, struct ExpandoFormat *fmt)
void dot_type_bool(FILE *fp, const char *name, bool val)
void dot_list_head(FILE *fp, const char *name, const struct ListHead *list)
void dot_config(FILE *fp, const char *name, int type, struct ConfigSubset *sub, struct ListHead *links)
void dot_array_actx_body_idx(FILE *fp, struct Body **body_idx, short body_len, short body_max, struct ListHead *links)
void dot_account_imap(FILE *fp, struct ImapAccountData *adata, struct ListHead *links)
void dot_patternlist(FILE *fp, struct PatternList *pl, struct ListHead *links)
void dot_type_umask(char *buf, size_t buflen, int umask)
void dot_graph_footer(FILE *fp, struct ListHead *links)
void dot_mailbox_node(FILE *fp, struct MailboxNode *mn, struct ListHead *links)
void dot_mview(FILE *fp, struct MailboxView *mv, struct ListHead *links)
void dot_account(FILE *fp, struct Account *a, struct ListHead *links)
void dot_connection(FILE *fp, struct Connection *c, struct ListHead *links)
void dot_mailbox_mbox(FILE *fp, struct MboxAccountData *mdata, struct ListHead *links)
void dot_node_link(FILE *fp, void *ptr, const char *name, void *link, const char *colour)
void dot_type_string(FILE *fp, const char *name, const char *str, bool force)
void dot_expando_node(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_account_notmuch(FILE *fp, struct NmAccountData *adata, struct ListHead *links)
void dump_graphviz_expando_node(struct ExpandoNode *node)
void dot_array_actx_fp_idx(FILE *fp, FILE **fp_idx, short fp_len, short fp_max, struct ListHead *links)
void dot_attach_ctx(FILE *fp, struct AttachCtx *actx, struct ListHead *links)
void dot_path_imap(char *buf, size_t buflen, const char *path)
void dot_node(FILE *fp, void *ptr, const char *name, const char *colour)
void dot_expando_node_container(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_mailbox_notmuch(FILE *fp, struct NmMboxData *mdata, struct ListHead *links)
void dot_pattern(FILE *fp, struct Pattern *pat, struct ListHead *links)
void dot_content(FILE *fp, struct Content *cont, struct ListHead *links)
void dot_account_nntp(FILE *fp, struct NntpAccountData *adata, struct ListHead *links)
void dot_attach_ptr(FILE *fp, struct AttachPtr *aptr, struct ListHead *links)
void dot_mailbox_list(FILE *fp, struct MailboxList *ml, struct ListHead *links, bool abbr)
void dot_ptr(FILE *fp, const char *name, void *ptr, const char *colour)
void dot_add_link(struct ListHead *links, void *src, void *dst, const char *label, const char *short_label, bool back, const char *colour)
const char * pattern_type_name(int type)
void dot_object_header(FILE *fp, const void *ptr, const char *name, const char *colour)
void dump_graphviz_patternlist(struct PatternList *pl)
void dot_envelope(FILE *fp, struct Envelope *env, struct ListHead *links)
void dot_expando_node_conditional_date(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dump_graphviz_attach_ctx(struct AttachCtx *actx)
void dot_expando_node_conditional_bool(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_mailbox(FILE *fp, struct Mailbox *m, struct ListHead *links)
void dot_expando_node_text(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_type_string_escape(struct Buffer *buf)
void dot_expando_node_condition(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_expando_node_expando(FILE *fp, struct ExpandoNode *node, struct ListHead *links)
void dot_mailbox_maildir(FILE *fp, struct MaildirMboxData *mdata, struct ListHead *links)
void dot_mailbox_nntp(FILE *fp, struct NntpMboxData *mdata, struct ListHead *links)
void dump_graphviz_email(struct Email *e, const char *title)
void dot_body(FILE *fp, struct Body *b, struct ListHead *links, bool link_next)
static int pad(FILE *fp, int col, int i)
Write some padding to a file.
Imap-specific Account data.
Imap-specific Mailbox data.
Shared constants/structs that are private to IMAP.
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Maildir-specific Email data.
Maildir local mailbox type.
Maildir-specific Mailbox data.
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
size_t mutt_date_localtime_format(char *buf, size_t buflen, const char *format, time_t t)
Format localtime.
Convenience wrapper for the library headers.
static const char * timestamp(time_t stamp)
Create a YYYY-MM-DD HH:MM:SS timestamp.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
char * mutt_strn_copy(char *dest, const char *src, size_t len, size_t dsize)
Copy a sub-string into a buffer.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
API for encryption/signing of emails.
#define SEC_INLINE
Email has an inline signature.
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
#define SEC_OPPENCRYPT
Opportunistic encrypt mode.
#define PGP_TRADITIONAL_CHECKED
Email has a traditional (inline) signature.
#define SEC_GOODSIGN
Email has a valid signature.
#define APPLICATION_PGP
Use PGP to encrypt/sign.
#define SEC_SIGNOPAQUE
Email has an opaque signature (encrypted)
#define SEC_BADSIGN
Email has a bad signature.
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
#define SEC_PARTSIGN
Not all parts of the email is signed.
#define SEC_ENCRYPT
Email is encrypted.
#define SEC_AUTOCRYPT_OVERRIDE
(Autocrypt) Indicates manual set/unset of encryption
#define SEC_SIGN
Email is signed.
#define SEC_KEYBLOCK
Email has a key attached.
Nntp-specific Account data.
Usenet network mailbox type; talk to an NNTP server.
Nntp-specific Mailbox data.
struct ExpandoNode * node_get_child(const struct ExpandoNode *node, int index)
Get a child of an ExpandoNode.
@ ENT_EXPANDO
Expando, e.g. 'n'.
@ ENT_CONTAINER
Container for other nodes.
@ ENT_CONDITION
True/False condition.
@ ENT_CONDDATE
True/False date condition.
@ ENT_CONDBOOL
True/False boolean condition.
@ ENT_PADDING
Padding: soft, hard, EOL.
@ ENC_CONDITION
Index of Condition Node.
@ ENC_FALSE
Index of False Node.
@ ENC_TRUE
Index of True Node.
@ ENP_LEFT
Index of Left-Hand Nodes.
@ ENP_RIGHT
Index of Right-Hand Nodes.
@ EPT_FILL_EOL
Fill to the end-of-line.
@ EPT_SOFT_FILL
Soft-fill: right-hand-side will be truncated.
@ EPT_HARD_FILL
Hard-fill: left-hand-side will be truncated.
Notmuch-specific Account data.
Notmuch virtual mailbox type.
Notmuch-specific Mailbox data.
Match patterns to emails.
@ MUTT_PAT_HEADER
Pattern matches email's header.
@ MUTT_PAT_WHOLE_MSG
Pattern matches raw email text.
@ MUTT_PAT_BROKEN
Message is part of a broken thread.
@ MUTT_PAT_ID_EXTERNAL
Message-Id is among results from an external query.
@ MUTT_PAT_OR
Either pattern can match.
@ MUTT_PAT_CHILDREN
Pattern matches a child email.
@ MUTT_PAT_PARENT
Pattern matches parent.
@ MUTT_PAT_REFERENCE
Pattern matches 'References:' or 'In-Reply-To:' field.
@ MUTT_PAT_FROM
Pattern matches 'From:' field.
@ MUTT_PAT_DRIVER_TAGS
Pattern matches message tags.
@ MUTT_PAT_COLLAPSED
Thread is collapsed.
@ MUTT_PAT_CRYPT_VERIFIED
Message is crypographically verified.
@ MUTT_PAT_HORMEL
Pattern matches email's spam score.
@ MUTT_PAT_SUBJECT
Pattern matches 'Subject:' field.
@ MUTT_PAT_LIST
Email is on mailing list.
@ MUTT_PAT_NEWSGROUPS
Pattern matches newsgroup.
@ MUTT_PAT_PERSONAL_RECIP
Email is addressed to the user.
@ MUTT_PAT_CC
Pattern matches 'Cc:' field.
@ MUTT_PAT_SUBSCRIBED_LIST
Email is on subscribed mailing list.
@ MUTT_PAT_SERVERSEARCH
Server-side pattern matches.
@ MUTT_PAT_RECIPIENT
User is a recipient of the email.
@ MUTT_PAT_CRYPT_ENCRYPT
Message is encrypted.
@ MUTT_PAT_UNREFERENCED
Message is unreferenced in the thread.
@ MUTT_PAT_CRYPT_SIGN
Message is signed.
@ MUTT_PAT_MESSAGE
Pattern matches message number.
@ MUTT_PAT_AND
Both patterns must match.
@ MUTT_PAT_DATE
Pattern matches 'Date:' field.
@ MUTT_PAT_XLABEL
Pattern matches keyword/label.
@ MUTT_PAT_SCORE
Pattern matches email's score.
@ MUTT_PAT_MIMEATTACH
Pattern matches number of attachments.
@ MUTT_PAT_DUPLICATED
Duplicate message.
@ MUTT_PAT_PERSONAL_FROM
Email is from the user.
@ MUTT_PAT_TO
Pattern matches 'To:' field.
@ MUTT_PAT_BCC
Pattern matches 'Bcc:' field.
@ MUTT_PAT_SENDER
Pattern matches sender.
@ MUTT_PAT_DATE_RECEIVED
Pattern matches date received.
@ MUTT_PAT_ADDRESS
Pattern matches any address field.
@ MUTT_PAT_MIMETYPE
Pattern matches MIME type.
@ MUTT_PAT_PGP_KEY
Message has PGP key.
@ MUTT_PAT_ID
Pattern matches email's Message-Id.
@ MUTT_PAT_THREAD
Pattern matches email thread.
@ MUTT_PAT_SIZE
Pattern matches email's size.
@ MUTT_PAT_BODY
Pattern matches email's body.
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.
Pop-specific Account data.
#define SLIST_FOREACH(var, head, field)
#define TAILQ_FOREACH(var, head, field)
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FIRST(head)
#define STAILQ_FOREACH(var, head, field)
#define TAILQ_FIRST(head)
#define STAILQ_EMPTY(head)
#define SLIST_FIRST(head)
#define TAILQ_EMPTY(head)
A group of associated Mailboxes.
enum MailboxType type
Type of Mailboxes this Account contains.
char * name
Name of Account.
struct ConfigSubset * sub
Inherited config items.
void * adata
Private data (for Mailbox backends)
struct MailboxList mailboxes
List of Mailboxes.
short vcount
The number of virtual attachments.
short body_len
Number of Body parts.
FILE * fp_root
Used by recvattach for updating.
short fp_max
Size of FILE array.
struct Email * email
Used by recvattach for updating.
struct AttachPtr ** idx
Array of attachments.
struct Body ** body_idx
Extra struct Body* used for decryption.
short fp_len
Number of FILE handles.
short body_max
Size of Body array.
FILE ** fp_idx
Extra FILE* used for decryption.
short idxmax
Size of attachment array.
short idxlen
Number of attachmentes.
short * v2r
Mapping from virtual to real attachment.
An email to which things will be attached.
struct Body * body
Attachment.
bool collapsed
Group is collapsed.
int num
Attachment index number.
int level
Nesting depth of attachment.
FILE * fp
Used in the recvattach menu.
bool unowned
Don't unlink on detach.
bool decrypted
Not part of message as stored in the email->body.
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
char * language
content-language (RFC8255)
char * d_filename
filename to be used for the content-disposition header If NULL, filename is used instead.
struct Body * parts
parts of a multipart or message/rfc822
LOFF_T offset
offset where the actual data begins
signed short attach_count
Number of attachments.
char * xtype
content-type if x-unknown
time_t stamp
Time stamp of last encoding update.
struct Envelope * mime_headers
Memory hole protected headers.
LOFF_T length
length (in bytes) of attachment
char * charset
Send mode: charset of attached file as stored on disk.
struct ParameterList parameter
Parameters of the content-type.
struct AttachPtr * aptr
Menu information, used in recvattach.c.
struct Email * email
header information for message/rfc822
char * description
content-description
unsigned int disposition
content-disposition, ContentDisposition
struct Content * content
Detailed info about the content of the attachment.
struct Body * next
next attachment in the list
char * subtype
content-type subtype
unsigned int encoding
content-transfer-encoding, ContentEncoding
long hdr_offset
Offset in stream where the headers begin.
char * form_name
Content-Disposition form-data name param.
unsigned int type
content-type primary type, ContentType
char * filename
When sending a message, this is the file to which this structure refers.
String manipulation buffer.
Private data for compress.
struct Expando * cmd_open
open-hook command
struct Expando * cmd_append
append-hook command
struct Expando * cmd_close
close-hook command
A set of inherited config items.
const char * name
Scope name of Subset.
struct ConfigSet * cs
Parent ConfigSet.
char login[128]
Login name.
char host[128]
Server to login to.
unsigned short port
Port to connect to.
char inbuf[1024]
Buffer for incoming traffic.
struct ConnAccount account
Account details: username, password, etc.
int fd
Socket file descriptor.
Info about an attachment.
long crlf
\r and \n characters
long hibin
8-bit characters
long ascii
Number of ascii chars.
long nulbin
Null characters (0x0)
long linemax
Length of the longest line in the file.
long lobin
Unprintable 7-bit chars (eg., control chars)
The envelope/body of an email.
unsigned int zminutes
Minutes away from UTC.
struct Envelope * env
Envelope information.
int lines
How many lines in the body of this message?
struct Body * body
List of MIME parts.
size_t num_hidden
Number of hidden messages in this view (only valid when collapsed is set)
bool zoccident
True, if west of UTC, False if east.
LOFF_T offset
Where in the stream does this message begin?
short attach_total
Number of qualifying attachments in message, if attach_valid.
unsigned int zhours
Hours away from UTC.
time_t date_sent
Time when the message was sent (UTC)
int vnum
Virtual message number.
int msgno
Number displayed to the user.
char * path
Path of Email (for local Mailboxes)
int index
The absolute (unsorted) message number.
time_t received
Time when the message was placed in the mailbox.
struct ListHead userhdrs
user defined headers
char * supersedes
Supersedes header.
char * list_subscribe
This stores a mailto URL, or nothing.
char *const subject
Email's subject.
char * followup_to
List of 'followup-to' fields.
char * message_id
Message ID.
char * x_comment_to
List of 'X-comment-to' fields.
struct AutocryptHeader * autocrypt_gossip
Autocrypt Gossip header.
char * newsgroups
List of newsgroups.
struct ListHead references
message references (in reverse order)
struct AutocryptHeader * autocrypt
Autocrypt header.
struct Buffer spam
Spam header.
struct ListHead in_reply_to
in-reply-to header content
char * xref
List of cross-references.
char * organization
Organisation header.
char * list_post
This stores a mailto URL, or nothing.
char *const real_subj
Offset of the real subject.
char * disp_subj
Display subject (modified copy of subject)
char * list_unsubscribe
This stores a mailto URL, or nothing.
int uid
Unique ID, e.g. ED_EMA_SIZE.
void * ndata
Private node data.
struct ExpandoFormat * format
Formatting info.
const char * end
End of string data.
struct ExpandoNode * next
Linked list.
int did
Domain ID, e.g. ED_EMAIL.
enum ExpandoNodeType type
Type of Node, e.g. ENT_EXPANDO.
const char * start
Start of string data.
struct ExpandoNodeArray children
Children nodes.
const char * string
Pointer to the parsed string.
The item stored in a Hash Table.
union HashKey key
Key representing the data.
int type
Type of data stored in Hash Table, e.g. DT_STRING.
IMAP-specific Account data -.
bool qresync
true, if QRESYNC is successfully ENABLE'd
unsigned char seqid
tag sequence prefix
bool unicode
If true, we can send UTF-8, and the server will use UTF8 rather than mUTF7.
struct Mailbox * mailbox
Current selected mailbox.
struct Connection * conn
Connection to IMAP server.
IMAP-specific Mailbox data -.
char * real_name
Original Mailbox name, e.g.: INBOX can be just \0.
char * munge_name
Munged version of the mailbox name.
struct Mailbox * mailbox
Mailbox in the list.
bool collapsed
Are all threads collapsed?
off_t vsize
Size (in bytes) of the messages shown.
struct Mailbox * mailbox
Current Mailbox.
char * pattern
Limit pattern string.
int vcount
The number of virtual messages.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
int * v2r
Mapping from virtual to real msgno.
int msg_count
Total number of messages.
int email_max
Size of emails array.
enum MailboxType type
Mailbox type.
void * mdata
Driver specific data.
struct Email ** emails
Array of Emails.
char * name
A short name for the Mailbox.
struct Buffer pathbuf
Path of the Mailbox.
struct Account * account
Account that owns this Mailbox.
int opened
Number of times mailbox is opened.
void * compress_info
Compressed mbox module private data.
struct ConfigSubset * sub
Inherited config items.
Maildir-specific Mailbox data -.
struct timespec mtime_cur
Timestamp of the 'cur' dir.
mode_t umask
umask to use when creating files
Mapping between user-readable string and a constant.
Mbox-specific Account data -.
bool append
mailbox is opened in append mode
bool locked
is the mailbox locked?
struct timespec atime
File's last-access time.
Container for Accounts, Notifications.
struct AccountList accounts
List of all Accounts.
struct ConfigSubset * sub
Inherited config items.
Notmuch-specific Account data -.
notmuch_database_t * db
Connection to Notmuch database.
Notmuch-specific Mailbox data -.
int db_limit
Maximum number of results to return.
NNTP-specific Account data -.
bool hasXOVER
Server supports XOVER command.
struct Connection * conn
Connection to NNTP Server.
bool hasXGTITLE
Server supports XGTITLE command.
bool hasCAPABILITIES
Server supports CAPABILITIES command.
bool hasSTARTTLS
Server supports STARTTLS command.
bool hasLISTGROUPrange
Server supports LISTGROUPrange command.
bool hasLISTGROUP
Server supports LISTGROUP command.
bool hasOVER
Server supports OVER command.
bool hasDATE
Server supports DATE command.
bool hasLIST_NEWSGROUPS
Server supports LIST_NEWSGROUPS command.
NNTP-specific Mailbox data -.
char * group
Name of newsgroup.
char * desc
Description of newsgroup.
Private data for a Conditional Date.
int count
Number of 'units' to count.
char period
Units, e.g. 'd' Day or 'm' Month.
Private data for a Padding Node.
enum ExpandoPadType pad_type
Padding type.
Attribute associated with a MIME part.
char * attribute
Parameter name.
char * value
Parameter value.
A simple (non-regex) pattern.
bool group_match
Check a group of Addresses.
struct PatternList * child
Arguments to logical operation.
long min
Minimum for range checks.
bool string_match
Check a string for a match.
regex_t * regex
Compiled regex, for non-pattern matching.
char * str
String, if string_match is set.
long max
Maximum for range checks.
short op
Operation, e.g. MUTT_PAT_SCORE.
bool is_multi
Multiple case (only for ~I pattern now)
POP-specific Account data -.
struct Connection * conn
Connection to POP server.
A parsed URL proto://user:password@host:port/path?a=1&b=2
int cs_subset_he_string_get(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
struct HashElem ** get_elem_list(struct ConfigSet *cs)
Create a sorted list of all config items.
#define D_SENSITIVE
Contains sensitive value, e.g. password.
const char * strkey
String key.
struct Url * url_parse(const char *src)
Fill in Url.
void url_free(struct Url **ptr)
Free the contents of a URL.