70#define GV_HIDE_MVIEW_CONTENTS
81void dot_patternlist(FILE *fp,
struct PatternList *pl,
struct ListHead *links);
86 static const char *values[] = {
"false",
"true" };
87 fprintf(fp,
"\t\t<tr>\n");
88 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
89 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
90 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", values[val]);
91 fprintf(fp,
"\t\t</tr>\n");
97 fprintf(fp,
"\t\t<tr>\n");
98 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
99 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
101 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">NUL</td>\n");
103 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">'%c'</td>\n", ch);
104 fprintf(fp,
"\t\t</tr>\n");
115 fprintf(fp,
"\t\t<tr>\n");
116 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
117 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
120 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%p (%d)</td>\n",
121 (
void *) struct_fp, fileno(struct_fp));
125 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">NULL</td>\n");
127 fprintf(fp,
"\t\t</tr>\n");
132 fprintf(fp,
"\t\t<tr>\n");
133 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
134 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
135 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%d</td>\n", num);
136 fprintf(fp,
"\t\t</tr>\n");
141 for (
int i =
buf_len(buf) - 1; i >= 0; i--)
143 if (
buf_at(buf, i) ==
'<')
145 else if (
buf_at(buf, i) ==
'>')
147 else if (
buf_at(buf, 1) ==
'&')
154 if ((!str || (str[0] ==
'\0')) && !force)
162 bool quoted = ((
buf_at(buf, 0) !=
'[') && (
buf_at(buf, 0) !=
'*'));
164 fprintf(fp,
"\t\t<tr>\n");
165 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
166 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
168 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">\"%s\"</td>\n",
buf_string(buf));
170 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n",
buf_string(buf));
171 fprintf(fp,
"\t\t</tr>\n");
179 snprintf(buf, buflen,
"0%03o", umask);
185 snprintf(buf, buflen,
"obj_%p", ptr);
188void dot_ptr(FILE *fp,
const char *name,
void *ptr,
const char *colour)
190 fprintf(fp,
"\t\t<tr>\n");
191 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
192 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
195 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\">%p</td>\n",
200 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%p</td>\n", ptr);
202 fprintf(fp,
"\t\t</tr>\n");
205void dot_add_link(
struct ListHead *links,
void *src,
void *dst,
const char *label,
206 const char *short_label,
bool back,
const char *colour)
213 char obj1[64] = { 0 };
214 char obj2[64] = { 0 };
215 char text[512] = { 0 };
216 char lstr[128] = { 0 };
217 char sstr[128] = { 0 };
223 snprintf(lstr,
sizeof(lstr),
"edgetooltip=\"%s\"", label);
226 snprintf(sstr,
sizeof(sstr),
"label=\"%s\"", short_label);
228 snprintf(text,
sizeof(text),
"%s -> %s [ %s %s %s color=\"%s\" ]", obj1, obj2,
229 back ?
"dir=back" :
"", lstr, sstr, colour);
235 fprintf(fp,
"digraph neomutt\n");
236 fprintf(fp,
"{\n\n");
238 fprintf(fp,
"\tgraph [\n");
239 fprintf(fp,
"\t\trankdir=\"TB\"\n");
240 fprintf(fp,
"\t\tnodesep=\"0.5\"\n");
241 fprintf(fp,
"\t\tranksep=\"0.5\"\n");
242 fprintf(fp,
"\t];\n");
244 fprintf(fp,
"\tnode [\n");
245 fprintf(fp,
"\t\tshape=\"plain\"\n");
246 fprintf(fp,
"\t];\n");
248 fprintf(fp,
"\tedge [\n");
249 fprintf(fp,
"\t\tpenwidth=\"4.5\"\n");
250 fprintf(fp,
"\t\tarrowsize=\"1.0\"\n");
251 fprintf(fp,
"\t\tcolor=\"#c0c0c0\"\n");
252 fprintf(fp,
"\t];\n");
262 fprintf(fp,
"\t%s;\n", np->
data);
264 fprintf(fp,
"\n}\n");
269 char obj[64] = { 0 };
275 fprintf(fp,
"\t%s [\n", obj);
276 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
277 "color=\"#d0d0d0\">\n");
278 fprintf(fp,
"\t\t<tr>\n");
279 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",
281 fprintf(fp,
"\t\t</tr>\n");
286 fprintf(fp,
"\t\t</table>>\n");
287 fprintf(fp,
"\t];\n");
291void dot_node(FILE *fp,
void *ptr,
const char *name,
const char *colour)
293 char obj[64] = { 0 };
296 fprintf(fp,
"\t%s [\n", obj);
297 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
298 "color=\"#d0d0d0\">\n");
299 fprintf(fp,
"\t\t<tr>\n");
300 fprintf(fp,
"\t\t\t<td border=\"0\" bgcolor=\"%s\" port=\"top\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font></td>\n",
302 fprintf(fp,
"\t\t</tr>\n");
306void dot_node_link(FILE *fp,
void *ptr,
const char *name,
void *link,
const char *colour)
308 char obj[64] = { 0 };
311 fprintf(fp,
"\t%s [\n", obj);
312 fprintf(fp,
"\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
313 "color=\"#d0d0d0\">\n");
314 fprintf(fp,
"\t\t<tr>\n");
315 fprintf(fp,
"\t\t\t<td border=\"0\" bgcolor=\"%s\" port=\"top\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font></td>\n",
317 fprintf(fp,
"\t\t</tr>\n");
319 fprintf(fp,
"\t\t<tr>\n");
320 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\">%p</td>\n", colour, link);
321 fprintf(fp,
"\t\t</tr>\n");
334 const char *slash = strrchr(path,
'/');
345 char tmp[1024] = { 0 };
350 if (u->
path && (u->
path[0] !=
'\0'))
353 snprintf(buf, buflen,
"%s:%s", u->
host, u->
user);
358#ifndef GV_HIDE_CONFIG
360 struct ListHead *links)
372 snprintf(scope,
sizeof(scope),
"%s:", sub->
name);
375 for (
size_t i = 0; list[i]; i++)
382 size_t slen = strlen(scope);
385 if (strchr(iname + slen,
':'))
428 const char *typestr = NULL;
457 typestr =
"COMPRESSED";
463 fprintf(fp,
"\t\t<tr>\n");
464 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
465 fprintf(fp,
"\t\t\t<td border=\"0\">=</td>\n");
466 fprintf(fp,
"\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", typestr);
467 fprintf(fp,
"\t\t</tr>\n");
482 char buf[64] = { 0 };
496 char buf[64] = { 0 };
546 char buf[64] = { 0 };
617#ifndef GV_HIDE_CONFIG
636 char name[256] = { 0 };
653#ifndef GV_HIDE_CONFIG
678 dot_add_link(links, prev, np,
"MailboxNode->next", NULL,
false, NULL);
718 dot_add_link(links, adata, adata->
conn,
"ImapAccountData->conn", NULL,
false, NULL);
724 char buf[64] = { 0 };
775 dot_add_link(links, adata, adata->
conn,
"NntpAccountData->conn", NULL,
false, NULL);
790 char buf[64] = { 0 };
805 dot_add_link(links, adata, adata->
conn,
"PopAccountData->conn", NULL,
false, NULL);
837#ifndef GV_HIDE_CONFIG
843 char name[256] = { 0 };
861 dot_add_link(links, a, first,
"Account->mailboxes", NULL,
false, NULL);
877 dot_add_link(links, prev, np,
"Account->next", NULL,
false, NULL);
888#ifdef GV_HIDE_MVIEW_CONTENTS
899 char name[256] = { 0 };
902 time_t now = time(NULL);
907 snprintf(name,
sizeof(name),
"%s-%s.gv", date, title);
915 FILE *fp = fopen(name,
"w");
921#ifndef GV_HIDE_NEOMUTT
924 "NeoMutt->accounts", NULL,
false, NULL);
925#ifndef GV_HIDE_CONFIG
929 char obj1[64] = { 0 };
930 char obj2[64] = { 0 };
933 buf_printf(buf,
"{ rank=same %s %s }", obj1, obj2);
945#ifndef GV_HIDE_NEOMUTT
947 fprintf(fp,
"\t{ rank=same ");
951 fprintf(fp,
"%s ", name);
954 fprintf(fp,
"%s ", name);
959 fprintf(fp,
"\t{ rank=same ");
968 fprintf(fp,
"%s ",
name);
977#ifndef GV_HIDE_BODY_CONTENT
1009#define ADD_BOOL(F) add_flag(buf, cont->F, #F)
1043 dot_add_link(links, aptr->
body, aptr,
"AttachPtr->body", NULL,
true, NULL);
1046void dot_body(FILE *fp,
struct Body *b,
struct ListHead *links,
bool link_next)
1075#define ADD_BOOL(F) add_flag(buf, b->F, #F)
1099#ifdef GV_HIDE_BODY_CONTENT
1112#ifndef GV_HIDE_BODY_CONTENT
1120#ifndef GV_HIDE_ENVELOPE
1141 if (b->
next && link_next)
1143 char name[256] = { 0 };
1165#ifndef GV_HIDE_BODY_CONTENT
1183#ifndef GV_HIDE_ENVELOPE
1206 struct ListHead *links)
1225#define ADD_FLAG(F) add_flag(buf, (env->changed & F), #F)
1233#define ADDR_LIST(AL) dot_addr_list(fp, #AL, &env->AL, links)
1289#define ADD_BOOL(F) add_flag(buf, e->F, #F)
1318#define ADD_BOOL(F) add_flag(buf, (e->security & F), #F)
1353 snprintf(zone,
sizeof(zone),
" (%c%02u%02u)", e->
zoccident ?
'-' :
'+',
1375#ifndef GV_HIDE_ENVELOPE
1403 char name[256] = { 0 };
1406 time_t now = time(NULL);
1410 FILE *fp = fopen(name,
"w");
1425 char name[256] = { 0 };
1432 snprintf(format,
sizeof(format),
"%%T-%s.gv", title);
1434 time_t now = time(NULL);
1438 FILE *fp = fopen(name,
"w");
1474 short idxmax,
struct ListHead *links)
1482 for (
size_t i = 0; i < idxmax; i++)
1484 snprintf(arr,
sizeof(arr),
"idx[%zu]", i);
1485 dot_ptr(fp, arr, idx[i],
"#3bcbc4");
1490 for (
size_t i = 0; i < idxlen; i++)
1493 dot_add_link(links, idx, idx[i],
"AttachCtx->idx", NULL,
false, NULL);
1504 for (
size_t i = 0; i < vcount; i++)
1506 snprintf(arr,
sizeof(arr),
"v2r[%zu]", i);
1514 struct ListHead *links)
1522 for (
size_t i = 0; i < fp_max; i++)
1524 snprintf(arr,
sizeof(arr),
"fp_idx[%zu]", i);
1532 short body_max,
struct ListHead *links)
1540 for (
size_t i = 0; i < body_max; i++)
1542 snprintf(arr,
sizeof(arr),
"body_idx[%zu]", i);
1543 dot_ptr(fp, arr, body_idx[i],
"#2020ff");
1548 for (
size_t i = 0; i < body_max; i++)
1552 dot_body(fp, body_idx[i], links,
true);
1553 dot_add_link(links, body_idx, body_idx[i],
"AttachCtx->Body", NULL,
false,
"#008000");
1569 dot_add_link(links, actx, actx->
idx,
"AttachCtx->idx", NULL,
false, NULL);
1575 dot_add_link(links, actx, actx->
v2r,
"AttachCtx->v2r", NULL,
false, NULL);
1593 char name[256] = { 0 };
1596 time_t now = time(NULL);
1600 FILE *fp = fopen(name,
"w");
1615 static struct Mapping PatternNames[] = {
1673 if ((pat->
min != 0) || (pat->
max != 0))
1679#define ADD_BOOL(F) add_flag(buf, pat->F, #F)
1719 dot_add_link(links, pat, first,
"Pattern->child", NULL,
false,
"#00ff00");
1728 char name[256] = { 0 };
1737 dot_add_link(links, prev, np,
"PatternList->next", NULL,
false,
"#ff0000");
1752 char name[256] = { 0 };
1755 time_t now = time(NULL);
1759 FILE *fp = fopen(name,
"w");
1780 char *just =
"UNKNOWN";
1784 just =
"JUSTIFY_LEFT";
1787 just =
"JUSTIFY_CENTER";
1790 just =
"JUSTIFY_RIGHT";
1823 char *
pad =
"UNKNOWN";
1827 pad =
"EPT_FILL_EOL";
1830 pad =
"EPT_HARD_FILL";
1833 pad =
"EPT_SOFT_FILL";
1845 dot_add_link(links, node, left,
"Pad->left",
"left",
false,
"#80ff80");
1852 dot_add_link(links, node, right,
"Pad->right",
"right",
false,
"#ff8080");
1873 dot_add_link(links, node, node_cond,
"Condition->condition",
"condition",
false,
"#ff80ff");
1877 dot_add_link(links, node, node_true,
"Condition->true",
"true",
false,
"#80ff80");
1882 dot_add_link(links, node, node_false,
"Condition->false",
"false",
false,
"#ff8080");
1889 struct ListHead *links)
1904 struct ListHead *links)
1939 dot_add_link(links, node, child,
"Node->children",
"children",
false,
"#80ff80");
1941 char name[256] = { 0 };
1953 dot_add_link(links, prev, child,
"Node->next",
"next",
false,
"#80ff80");
2034 char name[256] = { 0 };
2037 time_t now = time(NULL);
2041 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_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.
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.
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.
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.
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.