70#define GV_HIDE_MVIEW_CONTENTS
79void dot_email(FILE *fp,
const struct Email *e,
struct ListHead *links);
81void dot_patternlist(FILE *fp,
const struct PatternList *pl,
struct ListHead *links);
92 static const char *values[] = {
"false",
"true" };
93 fprintf(fp,
"\t\t<tr>\n");
94 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
95 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
96 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", values[val]);
97 fprintf(fp,
"\t\t</tr>\n");
109 fprintf(fp,
"\t\t<tr>\n");
110 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
111 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
113 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">NUL</td>\n");
115 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">'%c'</td>\n", ch);
116 fprintf(fp,
"\t\t</tr>\n");
139 fprintf(fp,
"\t\t<tr>\n");
140 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
141 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
144 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%p (%d)</td>\n",
145 struct_fp, fileno(struct_fp));
149 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">NULL</td>\n");
151 fprintf(fp,
"\t\t</tr>\n");
162 fprintf(fp,
"\t\t<tr>\n");
163 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
164 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
165 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%d</td>\n", num);
166 fprintf(fp,
"\t\t</tr>\n");
175 for (
int i =
buf_len(buf) - 1; i >= 0; i--)
177 if (
buf_at(buf, i) ==
'<')
179 else if (
buf_at(buf, i) ==
'>')
181 else if (
buf_at(buf, 1) ==
'&')
195 if ((!str || (str[0] ==
'\0')) && !force)
203 bool quoted = ((
buf_at(buf, 0) !=
'[') && (
buf_at(buf, 0) !=
'*'));
205 fprintf(fp,
"\t\t<tr>\n");
206 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
207 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
209 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">\"%s\"</td>\n",
buf_string(buf));
211 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n",
buf_string(buf));
212 fprintf(fp,
"\t\t</tr>\n");
226 snprintf(buf, buflen,
"0%03o", umask);
238 snprintf(buf, buflen,
"obj_%p", ptr);
248void dot_ptr(FILE *fp,
const char *name,
void *ptr,
const char *colour)
250 fprintf(fp,
"\t\t<tr>\n");
251 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
252 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
255 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\">%p</td>\n",
260 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%p</td>\n", ptr);
262 fprintf(fp,
"\t\t</tr>\n");
275void dot_add_link(
struct ListHead *links,
const void *src,
const void *dst,
276 const char *label,
const char *short_label,
bool back,
const char *colour)
283 char obj1[64] = { 0 };
284 char obj2[64] = { 0 };
285 char text[512] = { 0 };
286 char lstr[128] = { 0 };
287 char sstr[128] = { 0 };
293 snprintf(lstr,
sizeof(lstr),
"edgetooltip=\"%s\"", label);
296 snprintf(sstr,
sizeof(sstr),
"label=\"%s\"", short_label);
298 snprintf(text,
sizeof(text),
"%s -> %s [ %s %s %s color=\"%s\" ]", obj1, obj2,
299 back ?
"dir=back" :
"", lstr, sstr, colour);
309 fprintf(fp,
"digraph neomutt\n");
310 fprintf(fp,
"{\n\n");
312 fprintf(fp,
"\tgraph [\n");
313 fprintf(fp,
"\t\trankdir=\"TB\"\n");
314 fprintf(fp,
"\t\tnodesep=\"0.5\"\n");
315 fprintf(fp,
"\t\tranksep=\"0.5\"\n");
316 fprintf(fp,
"\t];\n");
318 fprintf(fp,
"\tnode [\n");
319 fprintf(fp,
"\t\tshape=\"plain\"\n");
320 fprintf(fp,
"\t];\n");
322 fprintf(fp,
"\tedge [\n");
323 fprintf(fp,
"\t\tpenwidth=\"4.5\"\n");
324 fprintf(fp,
"\t\tarrowsize=\"1.0\"\n");
325 fprintf(fp,
"\t\tcolor=\"#c0c0c0\"\n");
326 fprintf(fp,
"\t];\n");
341 fprintf(fp,
"\t%s;\n", np->
data);
343 fprintf(fp,
"\n}\n");
355 char obj[64] = { 0 };
361 fprintf(fp,
"\t%s [\n", obj);
362 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
363 "color=\"#d0d0d0\">\n");
364 fprintf(fp,
"\t\t<tr>\n");
365 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",
367 fprintf(fp,
"\t\t</tr>\n");
376 fprintf(fp,
"\t\t</table>>\n");
377 fprintf(fp,
"\t];\n");
388void dot_node(FILE *fp,
void *ptr,
const char *name,
const char *colour)
390 char obj[64] = { 0 };
393 fprintf(fp,
"\t%s [\n", obj);
394 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
395 "color=\"#d0d0d0\">\n");
396 fprintf(fp,
"\t\t<tr>\n");
397 fprintf(fp,
"\t\t\t<td border=\"0\" bgcolor=\"%s\" port=\"top\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font></td>\n",
399 fprintf(fp,
"\t\t</tr>\n");
417 const char *slash = strrchr(path,
'/');
434 char tmp[1024] = { 0 };
439 if (u->
path && (u->
path[0] !=
'\0'))
442 snprintf(buf, buflen,
"%s:%s", u->
host, u->
user);
447#ifndef GV_HIDE_CONFIG
449 struct ListHead *links)
461 snprintf(scope,
sizeof(scope),
"%s:", sub->
name);
472 size_t slen = strlen(scope);
475 if (strchr(iname + slen,
':'))
520 const char *typestr = NULL;
549 typestr =
"COMPRESSED";
555 fprintf(fp,
"\t\t<tr>\n");
556 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
557 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
558 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", typestr);
559 fprintf(fp,
"\t\t</tr>\n");
586 char buf[64] = { 0 };
606 char buf[64] = { 0 };
680 char buf[64] = { 0 };
751#ifndef GV_HIDE_CONFIG
770 char name[256] = { 0 };
781 dot_add_link(links, prev, m,
"MailboxNode->next", NULL,
false, NULL);
841 dot_add_link(links, adata, adata->
conn,
"ImapAccountData->conn", NULL,
false, NULL);
853 char buf[64] = { 0 };
910 dot_add_link(links, adata, adata->
conn,
"NntpAccountData->conn", NULL,
false, NULL);
937 char buf[64] = { 0 };
952 dot_add_link(links, adata, adata->
conn,
"PopAccountData->conn", NULL,
false, NULL);
990#ifndef GV_HIDE_CONFIG
996 char name[256] = { 0 };
1016 dot_add_link(links, a, *mp,
"Account->mailboxes", NULL,
false, NULL);
1041 dot_add_link(links, prev, a,
"Account->next", NULL,
false, NULL);
1047#ifndef GV_HIDE_MVIEW
1058#ifdef GV_HIDE_MVIEW_CONTENTS
1074 char name[256] = { 0 };
1077 time_t now = time(NULL);
1082 snprintf(name,
sizeof(name),
"%s-%s.gv", date, title);
1090 FILE *fp = fopen(name,
"w");
1096#ifndef GV_HIDE_NEOMUTT
1103#ifndef GV_HIDE_CONFIG
1107 char obj1[64] = { 0 };
1108 char obj2[64] = { 0 };
1111 buf_printf(buf,
"{ rank=same %s %s }", obj1, obj2);
1119#ifndef GV_HIDE_MVIEW
1123#ifndef GV_HIDE_NEOMUTT
1125 fprintf(fp,
"\t{ rank=same ");
1129 fprintf(fp,
"%s ", name);
1132 fprintf(fp,
"%s ", name);
1137 fprintf(fp,
"\t{ rank=same ");
1147 fprintf(fp,
"%s ",
name);
1156#ifndef GV_HIDE_BODY_CONTENT
1189#define ADD_BOOL(F) add_flag(buf, cont->F, #F)
1223 dot_add_link(links, aptr->
body, aptr,
"AttachPtr->body", NULL,
true, NULL);
1226void dot_body(FILE *fp,
const struct Body *b,
struct ListHead *links,
bool link_next)
1256#define ADD_BOOL(F) add_flag(buf, b->F, #F)
1280#ifdef GV_HIDE_BODY_CONTENT
1293#ifndef GV_HIDE_BODY_CONTENT
1301#ifndef GV_HIDE_ENVELOPE
1322 if (b->
next && link_next)
1324 char name[256] = { 0 };
1346#ifndef GV_HIDE_BODY_CONTENT
1364#ifndef GV_HIDE_ENVELOPE
1387 struct ListHead *links)
1407#define ADD_FLAG(F) add_flag(buf, (env->changed & F), #F)
1416#define ADDR_LIST(AL) dot_addr_list(fp, #AL, &env->AL, links)
1473#define ADD_BOOL(F) add_flag(buf, e->F, #F)
1503#define ADD_BOOL(F) add_flag(buf, (e->security & F), #F)
1538 snprintf(zone,
sizeof(zone),
" (%c%02u%02u)", e->
zoccident ?
'-' :
'+',
1560#ifndef GV_HIDE_ENVELOPE
1588 char name[256] = { 0 };
1591 time_t now = time(NULL);
1595 FILE *fp = fopen(name,
"w");
1610 char name[256] = { 0 };
1617 snprintf(format,
sizeof(format),
"%%T-%s.gv", title);
1619 time_t now = time(NULL);
1623 FILE *fp = fopen(name,
"w");
1659 short idxmax,
struct ListHead *links)
1667 for (
size_t i = 0; i < idxmax; i++)
1669 snprintf(arr,
sizeof(arr),
"idx[%zu]", i);
1670 dot_ptr(fp, arr, idx[i],
"#3bcbc4");
1675 for (
size_t i = 0; i < idxlen; i++)
1678 dot_add_link(links, idx, idx[i],
"AttachCtx->idx", NULL,
false, NULL);
1689 for (
size_t i = 0; i < vcount; i++)
1691 snprintf(arr,
sizeof(arr),
"v2r[%zu]", i);
1699 struct ListHead *links)
1707 for (
size_t i = 0; i < fp_max; i++)
1709 snprintf(arr,
sizeof(arr),
"fp_idx[%zu]", i);
1717 short body_max,
struct ListHead *links)
1725 for (
size_t i = 0; i < body_max; i++)
1727 snprintf(arr,
sizeof(arr),
"body_idx[%zu]", i);
1728 dot_ptr(fp, arr, body_idx[i],
"#2020ff");
1733 for (
size_t i = 0; i < body_max; i++)
1737 dot_body(fp, body_idx[i], links,
true);
1738 dot_add_link(links, body_idx, body_idx[i],
"AttachCtx->Body", NULL,
false,
"#008000");
1754 dot_add_link(links, actx, actx->
idx,
"AttachCtx->idx", NULL,
false, NULL);
1760 dot_add_link(links, actx, actx->
v2r,
"AttachCtx->v2r", NULL,
false, NULL);
1778 char name[256] = { 0 };
1781 time_t now = time(NULL);
1785 FILE *fp = fopen(name,
"w");
1800 static struct Mapping PatternNames[] = {
1858 if ((pat->
min != 0) || (pat->
max != 0))
1864#define ADD_BOOL(F) add_flag(buf, pat->F, #F)
1904 dot_add_link(links, pat, first,
"Pattern->child", NULL,
false,
"#00ff00");
1913 char name[256] = { 0 };
1922 dot_add_link(links, prev, np,
"PatternList->next", NULL,
false,
"#ff0000");
1937 char name[256] = { 0 };
1940 time_t now = time(NULL);
1944 FILE *fp = fopen(name,
"w");
1965 char *just =
"UNKNOWN";
1969 just =
"JUSTIFY_LEFT";
1972 just =
"JUSTIFY_CENTER";
1975 just =
"JUSTIFY_RIGHT";
2008 char *pad =
"UNKNOWN";
2012 pad =
"EPT_FILL_EOL";
2015 pad =
"EPT_HARD_FILL";
2018 pad =
"EPT_SOFT_FILL";
2030 dot_add_link(links, node, left,
"Pad->left",
"left",
false,
"#80ff80");
2037 dot_add_link(links, node, right,
"Pad->right",
"right",
false,
"#ff8080");
2058 dot_add_link(links, node, node_cond,
"Condition->condition",
"condition",
false,
"#ff80ff");
2062 dot_add_link(links, node, node_true,
"Condition->true",
"true",
false,
"#80ff80");
2067 dot_add_link(links, node, node_false,
"Condition->false",
"false",
false,
"#ff8080");
2074 struct ListHead *links)
2089 struct ListHead *links)
2124 dot_add_link(links, node, child,
"Node->children",
"children",
false,
"#80ff80");
2126 char name[256] = { 0 };
2138 dot_add_link(links, prev, child,
"Node->next",
"next",
false,
"#80ff80");
2219 char name[256] = { 0 };
2222 time_t now = time(NULL);
2226 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.
bool group_match(struct Group *g, const char *str)
Does a string match an entry in a Group?
#define ARRAY_FIRST(head)
Convenience method to get the first element.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_FREE(head)
Release all memory.
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
Convenience wrapper for the debug headers.
const char * name_content_encoding(enum ContentEncoding enc)
Get the name of a content encoding.
const char * name_content_type(enum ContentType type)
Get the name of a content type.
const char * name_content_disposition(enum ContentDisposition disp)
Get the name of a content disposition.
const char * name_expando_uid(enum ExpandoDomain did, int uid)
Get the name of an email expando field.
const char * name_expando_domain(enum ExpandoDomain did)
Get the name of an expando domain.
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)
Dump POP mailbox metadata.
void dot_attach_ctx(FILE *fp, const struct AttachCtx *actx, struct ListHead *links)
void dot_add_link(struct ListHead *links, const void *src, const void *dst, const char *label, const char *short_label, bool back, const char *colour)
Add a link between two objects in GraphViz.
void dot_ptr_name(char *buf, size_t buflen, const void *ptr)
Generate GraphViz object name from pointer.
void dot_parameter_list(FILE *fp, const char *name, const struct ParameterList *pl)
void dot_expando_node_condition(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dot_graph_header(FILE *fp)
Write GraphViz graph header.
void dot_account_pop(FILE *fp, struct PopAccountData *adata, struct ListHead *links)
Dump POP account data.
void dot_object_footer(FILE *fp)
Write GraphViz object footer.
void dot_path_fs(char *buf, size_t buflen, const char *path)
Extract filesystem path from full path.
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)
Dump IMAP mailbox metadata.
void dot_comp(FILE *fp, struct CompressInfo *ci, struct ListHead *links)
void dot_mailbox_type(FILE *fp, const char *name, enum MailboxType type)
Write a mailbox type field to GraphViz output.
void dot_attach_ptr2(FILE *fp, struct AttachPtr *aptr, struct ListHead *links)
void dot_type_date(char *buf, size_t buflen, time_t timestamp)
Format a timestamp for GraphViz output.
void dump_graphviz(const char *title, const struct MailboxView *mv)
Dump NeoMutt data structures to GraphViz format.
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)
Write a number type field to GraphViz output.
void dot_type_char(FILE *fp, const char *name, char ch)
Write a character type field to GraphViz output.
void dot_expando_node_expando(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dot_account_mbox(FILE *fp, struct MboxAccountData *adata, struct ListHead *links)
Dump Mbox account data.
void dot_type_file(FILE *fp, const char *name, FILE *struct_fp)
Write a file pointer field to GraphViz output.
void dot_format(FILE *fp, struct ExpandoFormat *fmt)
void dot_type_bool(FILE *fp, const char *name, bool val)
Write a boolean type field to GraphViz output.
void dot_expando_node_unknown(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dot_account_array(FILE *fp, struct AccountArray *aa, struct ListHead *links)
Dump an array of accounts.
void dump_graphviz_expando_node(const struct ExpandoNode *node)
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)
Dump IMAP account data.
void dot_mview(FILE *fp, const struct MailboxView *mv, struct ListHead *links)
Dump a mailbox view.
void dot_type_umask(char *buf, size_t buflen, int umask)
Format a file mode as octal string.
void dot_graph_footer(FILE *fp, struct ListHead *links)
Write GraphViz graph footer with links.
void dot_expando_node_empty(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dump_graphviz_attach_ctx(const struct AttachCtx *actx)
void dot_account(FILE *fp, struct Account *a, struct ListHead *links)
Dump an account object.
void dot_connection(FILE *fp, struct Connection *c, struct ListHead *links)
Dump a connection.
void dot_mailbox_mbox(FILE *fp, struct MboxAccountData *mdata, struct ListHead *links)
Dump Mbox mailbox metadata.
void dot_type_string(FILE *fp, const char *name, const char *str, bool force)
Write a string type field to GraphViz output.
void dot_account_notmuch(FILE *fp, struct NmAccountData *adata, struct ListHead *links)
Dump Notmuch account data.
void dot_array_actx_fp_idx(FILE *fp, FILE **fp_idx, short fp_len, short fp_max, struct ListHead *links)
void dot_envelope(FILE *fp, const struct Envelope *env, struct ListHead *links)
void dot_path_imap(char *buf, size_t buflen, const char *path)
Extract IMAP path from full path.
void dot_expando_node(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dump_graphviz_email(const struct Email *e, const char *title)
void dot_expando_node_conditional_bool(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dot_node(FILE *fp, void *ptr, const char *name, const char *colour)
Write a simple GraphViz node.
void dot_mailbox_notmuch(FILE *fp, struct NmMboxData *mdata, struct ListHead *links)
Dump Notmuch mailbox metadata.
void dot_pattern(FILE *fp, struct Pattern *pat, struct ListHead *links)
void dot_content(FILE *fp, struct Content *cont, struct ListHead *links)
void dot_body(FILE *fp, const struct Body *b, struct ListHead *links, bool link_next)
void dot_expando_node_conditional_date(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dot_account_nntp(FILE *fp, struct NntpAccountData *adata, struct ListHead *links)
Dump NNTP account data.
void dot_attach_ptr(FILE *fp, struct AttachPtr *aptr, struct ListHead *links)
void dot_ptr(FILE *fp, const char *name, void *ptr, const char *colour)
Write a pointer field to GraphViz output.
void dot_expando_node_pad(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dot_expando_node_container(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
const char * pattern_type_name(int type)
void dump_graphviz_body(const struct Body *b)
void dot_object_header(FILE *fp, const void *ptr, const char *name, const char *colour)
Write GraphViz object header.
void dump_graphviz_patternlist(struct PatternList *pl)
void dot_mailbox_array(FILE *fp, struct MailboxArray *ma, struct ListHead *links)
Dump an array of mailboxes.
void dot_expando_node_text(FILE *fp, const struct ExpandoNode *node, struct ListHead *links)
void dot_email(FILE *fp, const struct Email *e, struct ListHead *links)
void dot_mailbox(FILE *fp, struct Mailbox *m, struct ListHead *links)
Dump a mailbox object.
void dot_type_string_escape(struct Buffer *buf)
Escape special characters in a string for GraphViz.
void dot_mailbox_maildir(FILE *fp, struct MaildirMboxData *mdata, struct ListHead *links)
Dump Maildir mailbox metadata.
void dot_mailbox_nntp(FILE *fp, struct NntpMboxData *mdata, struct ListHead *links)
Dump NNTP mailbox metadata.
void dot_patternlist(FILE *fp, const struct PatternList *pl, struct ListHead *links)
Convenience wrapper for the gui headers.
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.
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_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 MailboxArray mailboxes
All Mailboxes.
struct ConfigSubset * sub
Inherited config items.
void * adata
Private data (for Mailbox backends)
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.
int did
Domain ID, e.g. ED_EMAIL.
const char * text
Node-specific text.
enum ExpandoNodeType type
Type of Node, e.g. ENT_EXPANDO.
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.
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 AccountArray accounts
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 -.
time_t newgroups_time
Last newgroups request time.
bool newsrc_modified
Newsrc file was modified.
bool hasXOVER
Server supports XOVER command.
struct Connection * conn
Connection to NNTP Server.
char * authenticators
Authenticators list.
char * overview_fmt
Overview format.
bool hasXGTITLE
Server supports XGTITLE command.
unsigned int groups_num
Number of newsgroups.
bool hasCAPABILITIES
Server supports CAPABILITIES command.
bool hasSTARTTLS
Server supports STARTTLS command.
bool hasLISTGROUPrange
Server supports LISTGROUPrange command.
time_t check_time
Last check time.
time_t mtime
Newsrc modification time.
unsigned int groups_max
Maximum number of newsgroups.
bool hasLISTGROUP
Server supports LISTGROUP command.
FILE * fp_newsrc
Newsrc file handle.
bool cacheable
Can be cached.
bool hasOVER
Server supports OVER command.
char * newsrc_file
Newsrc file path.
bool hasDATE
Server supports DATE command.
bool hasLIST_NEWSGROUPS
Server supports LIST_NEWSGROUPS command.
NNTP-specific Mailbox data -.
anum_t last_cached
Last cached article.
bool deleted
Newsgroup is deleted.
bool allowed
Posting allowed.
anum_t last_message
Last article number.
char * group
Name of newsgroup.
char * desc
Description of newsgroup.
anum_t unread
Unread articles.
anum_t last_loaded
Last loaded article.
bool has_new_mail
Has new articles.
anum_t first_message
First article number.
bool subscribed
Subscribed to this 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.
union Pattern::@006112053024257132210207314205210350156165326341 p
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 -.
time_t check_time
Last check time.
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 HashElemArray get_elem_list(struct ConfigSet *cs, enum GetElemListFlags flags)
Create a sorted list of all config items.
@ GEL_ALL_CONFIG
All the normal config (no synonyms or deprecated)
#define CONFIG_TYPE(t)
Extract the type from the flags.
#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.