NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
graphviz.c File Reference
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include "mutt/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "conn/lib.h"
#include "lib.h"
#include "compmbox/lib.h"
#include "mbox/lib.h"
#include "nntp/lib.h"
#include "notmuch/lib.h"
#include "context.h"
#include "imap/private.h"
#include "maildir/edata.h"
#include "maildir/mdata.h"
#include "maildir/private.h"
#include "mutt_globals.h"
#include "nntp/adata.h"
#include "nntp/mdata.h"
#include "notmuch/adata.h"
#include "notmuch/mdata.h"
#include "notmuch/private.h"
#include "pop/adata.h"
#include "pop/private.h"
+ Include dependency graph for graphviz.c:

Go to the source code of this file.

Macros

#define GV_HIDE_CONTEXT_CONTENTS
 
#define ADD_BOOL(F)   add_flag(&buf, cont->F, #F)
 
#define ADD_BOOL(F)   add_flag(&buf, b->F, #F)
 
#define ADD_FLAG(F)   add_flag(&buf, (env->changed & F), #F)
 
#define ADDR_LIST(AL)   dot_addr_list(fp, #AL, &env->AL, links)
 
#define ADD_BOOL(F)   add_flag(&buf, e->F, #F)
 
#define ADD_BOOL(F)   add_flag(&buf, (e->security & F), #F)
 

Functions

static void dot_email (FILE *fp, struct Email *e, struct ListHead *links)
 
static void dot_envelope (FILE *fp, struct Envelope *env, struct ListHead *links)
 
const char * get_content_type (enum ContentType type)
 
const char * get_content_encoding (enum ContentEncoding enc)
 
const char * get_content_disposition (enum ContentDisposition disp)
 
void add_flag (struct Buffer *buf, bool is_set, const char *name)
 
static void dot_type_bool (FILE *fp, const char *name, bool val)
 
static void dot_type_char (FILE *fp, const char *name, char ch)
 
static void dot_type_date (char *buf, size_t buflen, time_t timestamp)
 
static void dot_type_file (FILE *fp, const char *name, FILE *struct_fp)
 
static void dot_type_number (FILE *fp, const char *name, int num)
 
static void dot_type_string_escape (char *buf, size_t buflen)
 
static void dot_type_string (FILE *fp, const char *name, const char *str, bool force)
 
static void dot_type_umask (char *buf, size_t buflen, int umask)
 
static void dot_ptr_name (char *buf, size_t buflen, const void *ptr)
 
static void dot_ptr (FILE *fp, const char *name, void *ptr, const char *colour)
 
static void dot_add_link (struct ListHead *links, void *src, void *dst, const char *label, bool back, const char *colour)
 
static void dot_graph_header (FILE *fp)
 
static void dot_graph_footer (FILE *fp, struct ListHead *links)
 
static void dot_object_header (FILE *fp, const void *ptr, const char *name, const char *colour)
 
static void dot_object_footer (FILE *fp)
 
static void dot_node (FILE *fp, void *ptr, const char *name, const char *colour)
 
static void dot_node_link (FILE *fp, void *ptr, const char *name, void *link, const char *colour)
 
static void dot_path_fs (char *buf, size_t buflen, const char *path)
 
static void dot_path_imap (char *buf, size_t buflen, const char *path)
 
static void dot_config (FILE *fp, const char *name, int type, struct ConfigSubset *sub, struct ListHead *links)
 
static void dot_comp (FILE *fp, struct CompressInfo *ci, struct ListHead *links)
 
static void dot_mailbox_type (FILE *fp, const char *name, enum MailboxType type)
 
static void dot_mailbox_imap (FILE *fp, struct ImapMboxData *mdata, struct ListHead *links)
 
static void dot_mailbox_maildir (FILE *fp, struct MaildirMboxData *mdata, struct ListHead *links)
 
static void dot_mailbox_mbox (FILE *fp, struct MboxAccountData *mdata, struct ListHead *links)
 
static void dot_mailbox_nntp (FILE *fp, struct NntpMboxData *mdata, struct ListHead *links)
 
static void dot_mailbox_notmuch (FILE *fp, struct NmMboxData *mdata, struct ListHead *links)
 
static void dot_mailbox_pop (FILE *fp, struct PopAccountData *adata, struct ListHead *links)
 
static void dot_mailbox (FILE *fp, struct Mailbox *m, struct ListHead *links)
 
static void dot_mailbox_node (FILE *fp, struct MailboxNode *mn, struct ListHead *links)
 
static void dot_mailbox_list (FILE *fp, struct MailboxList *ml, struct ListHead *links, bool abbr)
 
static void dot_connection (FILE *fp, struct Connection *c, struct ListHead *links)
 
static void dot_account_imap (FILE *fp, struct ImapAccountData *adata, struct ListHead *links)
 
static void dot_account_mbox (FILE *fp, struct MboxAccountData *adata, struct ListHead *links)
 
static void dot_account_nntp (FILE *fp, struct NntpAccountData *adata, struct ListHead *links)
 
static void dot_account_notmuch (FILE *fp, struct NmAccountData *adata, struct ListHead *links)
 
static void dot_account_pop (FILE *fp, struct PopAccountData *adata, struct ListHead *links)
 
static void dot_account (FILE *fp, struct Account *a, struct ListHead *links)
 
static void dot_account_list (FILE *fp, struct AccountList *al, struct ListHead *links)
 
static void dot_context (FILE *fp, struct Context *ctx, struct ListHead *links)
 
void dump_graphviz (const char *title, struct Context *ctx)
 
static void dot_parameter_list (FILE *fp, const char *name, const struct ParameterList *pl)
 
static void dot_content (FILE *fp, struct Content *cont, struct ListHead *links)
 
void dot_attach_ptr (FILE *fp, struct AttachPtr *aptr, struct ListHead *links)
 
static void dot_body (FILE *fp, struct Body *b, struct ListHead *links, bool link_next)
 
static void dot_list_head (FILE *fp, const char *name, const struct ListHead *list)
 
static void dot_addr_list (FILE *fp, const char *name, const struct AddressList *al, struct ListHead *links)
 
void dump_graphviz_email (struct Email *e)
 
static void dot_attach_ptr2 (FILE *fp, struct AttachPtr *aptr, struct ListHead *links)
 
static void dot_array_actx_idx (FILE *fp, struct AttachPtr **idx, short idxlen, short idxmax, struct ListHead *links)
 
static void dot_array_actx_v2r (FILE *fp, short *v2r, short vcount, struct ListHead *links)
 
static void dot_array_actx_fp_idx (FILE *fp, FILE **fp_idx, short fp_len, short fp_max, struct ListHead *links)
 
static void dot_array_actx_body_idx (FILE *fp, struct Body **body_idx, short body_len, short body_max, struct ListHead *links)
 
static void dot_attach_ctx (FILE *fp, struct AttachCtx *actx, struct ListHead *links)
 
void dump_graphviz_attach_ctx (struct AttachCtx *actx)
 

Detailed Description

Create a GraphViz dot file from the NeoMutt objects

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file graphviz.c.

Macro Definition Documentation

◆ GV_HIDE_CONTEXT_CONTENTS

#define GV_HIDE_CONTEXT_CONTENTS

Definition at line 58 of file graphviz.c.

◆ ADD_BOOL [1/4]

#define ADD_BOOL (   F)    add_flag(&buf, cont->F, #F)

◆ ADD_BOOL [2/4]

#define ADD_BOOL (   F)    add_flag(&buf, b->F, #F)

◆ ADD_FLAG

#define ADD_FLAG (   F)    add_flag(&buf, (env->changed & F), #F)

◆ ADDR_LIST

#define ADDR_LIST (   AL)    dot_addr_list(fp, #AL, &env->AL, links)

◆ ADD_BOOL [3/4]

#define ADD_BOOL (   F)    add_flag(&buf, e->F, #F)

◆ ADD_BOOL [4/4]

#define ADD_BOOL (   F)    add_flag(&buf, (e->security & F), #F)

Function Documentation

◆ dot_email()

static void dot_email ( FILE *  fp,
struct Email e,
struct ListHead *  links 
)
static

Definition at line 1301 of file graphviz.c.

1302 {
1303  struct Buffer buf = mutt_buffer_make(256);
1304  char arr[256];
1305 
1306  dot_object_header(fp, e, "Email", "#ff80ff");
1307 
1308  dot_type_string(fp, "path", e->path, true);
1309 
1310 #define ADD_BOOL(F) add_flag(&buf, e->F, #F)
1311  ADD_BOOL(active);
1312  ADD_BOOL(attach_del);
1313  ADD_BOOL(attach_valid);
1314  ADD_BOOL(changed);
1315  ADD_BOOL(collapsed);
1316  ADD_BOOL(deleted);
1317  ADD_BOOL(display_subject);
1318  ADD_BOOL(expired);
1319  ADD_BOOL(flagged);
1320  ADD_BOOL(matched);
1321  ADD_BOOL(mime);
1322  ADD_BOOL(old);
1323  ADD_BOOL(purge);
1324  ADD_BOOL(quasi_deleted);
1325  ADD_BOOL(read);
1326  ADD_BOOL(recip_valid);
1327  ADD_BOOL(replied);
1328  ADD_BOOL(searched);
1329  ADD_BOOL(subject_changed);
1330  ADD_BOOL(superseded);
1331  ADD_BOOL(tagged);
1332  ADD_BOOL(threaded);
1333  ADD_BOOL(trash);
1334  ADD_BOOL(visible);
1335 #undef ADD_BOOL
1336  dot_type_string(fp, "bools",
1337  mutt_buffer_is_empty(&buf) ? "[NONE]" : mutt_buffer_string(&buf), true);
1338 
1339  mutt_buffer_reset(&buf);
1340 #define ADD_BOOL(F) add_flag(&buf, (e->security & F), #F)
1342  ADD_BOOL(SEC_SIGN);
1355 #undef ADD_BOOL
1356  dot_type_string(fp, "security",
1357  mutt_buffer_is_empty(&buf) ? "[NONE]" : mutt_buffer_string(&buf), true);
1358 
1359  dot_type_number(fp, "num_hidden", e->num_hidden);
1360  dot_type_number(fp, "offset", e->offset);
1361  dot_type_number(fp, "lines", e->lines);
1362  dot_type_number(fp, "index", e->index);
1363  dot_type_number(fp, "msgno", e->msgno);
1364  dot_type_number(fp, "vnum", e->vnum);
1365  dot_type_number(fp, "score", e->score);
1366  dot_type_number(fp, "attach_total", e->attach_total);
1367 
1369  if (edata)
1370  dot_type_string(fp, "maildir_flags", edata->maildir_flags, false);
1371 
1372  if (e->date_sent != 0)
1373  {
1374  char zone[32];
1375  dot_type_date(arr, sizeof(arr), e->date_sent);
1376  snprintf(zone, sizeof(zone), " (%c%02u%02u)", e->zoccident ? '-' : '+',
1377  e->zhours, e->zminutes);
1378  mutt_str_cat(arr, sizeof(arr), zone);
1379  dot_type_string(fp, "date_sent", arr, false);
1380  }
1381 
1382  if (e->received != 0)
1383  {
1384  dot_type_date(arr, sizeof(arr), e->received);
1385  dot_type_string(fp, "received", arr, false);
1386  }
1387 
1388  dot_object_footer(fp);
1389 
1390  if (e->body)
1391  {
1392  dot_body(fp, e->body, links, true);
1393  dot_add_link(links, e, e->body, "Email->body", false, NULL);
1394  }
1395 
1396  if (e->env)
1397  {
1398  dot_envelope(fp, e->env, links);
1399  dot_add_link(links, e, e->env, "Email->env", false, NULL);
1400 
1401  mutt_buffer_reset(&buf);
1402  mutt_buffer_addstr(&buf, "{ rank=same ");
1403 
1404  dot_ptr_name(arr, sizeof(arr), e);
1405  mutt_buffer_add_printf(&buf, "%s ", arr);
1406 
1407  dot_ptr_name(arr, sizeof(arr), e->env);
1408  mutt_buffer_add_printf(&buf, "%s ", arr);
1409 
1410  mutt_buffer_addstr(&buf, "}");
1411 
1413  }
1414 
1415  // struct TagList tags;
1416 
1417  mutt_buffer_dealloc(&buf);
1418 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_envelope()

static void dot_envelope ( FILE *  fp,
struct Envelope env,
struct ListHead *  links 
)
static

Definition at line 1242 of file graphviz.c.

1243 {
1244  struct Buffer buf = mutt_buffer_make(256);
1245 
1246  dot_object_header(fp, env, "Envelope", "#ffff00");
1247 
1248 #define ADD_FLAG(F) add_flag(&buf, (env->changed & F), #F)
1253 #undef ADD_BOOL
1254  dot_type_string(fp, "changed",
1255  mutt_buffer_is_empty(&buf) ? "[NONE]" : mutt_buffer_string(&buf), true);
1256 
1257 #define ADDR_LIST(AL) dot_addr_list(fp, #AL, &env->AL, links)
1258  ADDR_LIST(return_path);
1259  ADDR_LIST(from);
1260  ADDR_LIST(to);
1261  ADDR_LIST(cc);
1262  ADDR_LIST(bcc);
1263  ADDR_LIST(sender);
1264  ADDR_LIST(reply_to);
1265  ADDR_LIST(mail_followup_to);
1266  ADDR_LIST(x_original_to);
1267 #undef ADDR_LIST
1268 
1269  dot_type_string(fp, "date", env->date, false);
1270  dot_type_string(fp, "disp_subj", env->disp_subj, false);
1271  dot_type_string(fp, "followup_to", env->followup_to, false);
1272  dot_type_string(fp, "list_post", env->list_post, false);
1273  dot_type_string(fp, "message_id", env->message_id, false);
1274  dot_type_string(fp, "newsgroups", env->newsgroups, false);
1275  dot_type_string(fp, "organization", env->organization, false);
1276  dot_type_string(fp, "real_subj", env->real_subj, false);
1277  dot_type_string(fp, "spam", mutt_buffer_string(&env->spam), false);
1278  dot_type_string(fp, "subject", env->subject, false);
1279  dot_type_string(fp, "supersedes", env->supersedes, false);
1280  dot_type_string(fp, "xref", env->xref, false);
1281  dot_type_string(fp, "x_comment_to", env->x_comment_to, false);
1282  dot_type_string(fp, "x_label", env->x_label, false);
1283 
1284  if (0)
1285  {
1286  dot_list_head(fp, "references", &env->references);
1287  dot_list_head(fp, "in_reply_to", &env->in_reply_to);
1288  dot_list_head(fp, "userhdrs", &env->userhdrs);
1289  }
1290 
1291 #ifdef USE_AUTOCRYPT
1292  dot_ptr(fp, "autocrypt", env->autocrypt, NULL);
1293  dot_ptr(fp, "autocrypt_gossip", env->autocrypt_gossip, NULL);
1294 #endif
1295 
1296  dot_object_footer(fp);
1297 
1298  mutt_buffer_dealloc(&buf);
1299 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_content_type()

const char * get_content_type ( enum ContentType  type)

Definition at line 67 of file graphviz.c.

68 {
69  switch (type)
70  {
71  case TYPE_OTHER:
72  return "TYPE_OTHER";
73  case TYPE_AUDIO:
74  return "TYPE_AUDIO";
75  case TYPE_APPLICATION:
76  return "TYPE_APPLICATION";
77  case TYPE_IMAGE:
78  return "TYPE_IMAGE";
79  case TYPE_MESSAGE:
80  return "TYPE_MESSAGE";
81  case TYPE_MODEL:
82  return "TYPE_MODEL";
83  case TYPE_MULTIPART:
84  return "TYPE_MULTIPART";
85  case TYPE_TEXT:
86  return "TYPE_TEXT";
87  case TYPE_VIDEO:
88  return "TYPE_VIDEO";
89  case TYPE_ANY:
90  return "TYPE_ANY";
91  default:
92  return "UNKNOWN";
93  }
94 }
+ Here is the caller graph for this function:

◆ get_content_encoding()

const char * get_content_encoding ( enum ContentEncoding  enc)

Definition at line 96 of file graphviz.c.

97 {
98  switch (enc)
99  {
100  case ENC_OTHER:
101  return "ENC_OTHER";
102  case ENC_7BIT:
103  return "ENC_7BIT";
104  case ENC_8BIT:
105  return "ENC_8BIT";
107  return "ENC_QUOTED_PRINTABLE";
108  case ENC_BASE64:
109  return "ENC_BASE64";
110  case ENC_BINARY:
111  return "ENC_BINARY";
112  case ENC_UUENCODED:
113  return "ENC_UUENCODED";
114  default:
115  return "UNKNOWN";
116  }
117 }
+ Here is the caller graph for this function:

◆ get_content_disposition()

const char * get_content_disposition ( enum ContentDisposition  disp)

Definition at line 119 of file graphviz.c.

120 {
121  switch (disp)
122  {
123  case DISP_INLINE:
124  return "DISP_INLINE";
125  case DISP_ATTACH:
126  return "DISP_ATTACH";
127  case DISP_FORM_DATA:
128  return "DISP_FORM_DATA";
129  case DISP_NONE:
130  return "DISP_NONE";
131  default:
132  return "UNKNOWN";
133  }
134 }
+ Here is the caller graph for this function:

◆ add_flag()

void add_flag ( struct Buffer buf,
bool  is_set,
const char *  name 
)

Definition at line 136 of file graphviz.c.

137 {
138  if (!buf || !name)
139  return;
140 
141  if (is_set)
142  {
143  if (!mutt_buffer_is_empty(buf))
144  mutt_buffer_addch(buf, ',');
145  mutt_buffer_addstr(buf, name);
146  }
147 }
+ Here is the call graph for this function:

◆ dot_type_bool()

static void dot_type_bool ( FILE *  fp,
const char *  name,
bool  val 
)
static

Definition at line 149 of file graphviz.c.

150 {
151  static const char *values[] = { "false", "true" };
152  fprintf(fp, "\t\t<tr>\n");
153  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
154  fprintf(fp, "\t\t\t<td border=\"0\">=</td>\n");
155  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", values[val]);
156  fprintf(fp, "\t\t</tr>\n");
157 }
+ Here is the caller graph for this function:

◆ dot_type_char()

static void dot_type_char ( FILE *  fp,
const char *  name,
char  ch 
)
static

Definition at line 159 of file graphviz.c.

160 {
161  fprintf(fp, "\t\t<tr>\n");
162  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
163  fprintf(fp, "\t\t\t<td border=\"0\">=</td>\n");
164  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%c</td>\n", ch);
165  fprintf(fp, "\t\t</tr>\n");
166 }
+ Here is the caller graph for this function:

◆ dot_type_date()

static void dot_type_date ( char *  buf,
size_t  buflen,
time_t  timestamp 
)
static

Definition at line 168 of file graphviz.c.

169 {
170  mutt_date_localtime_format(buf, buflen, "%Y-%m-%d %H:%M:%S", timestamp);
171 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_type_file()

static void dot_type_file ( FILE *  fp,
const char *  name,
FILE *  struct_fp 
)
static

Definition at line 173 of file graphviz.c.

174 {
175  fprintf(fp, "\t\t<tr>\n");
176  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
177  fprintf(fp, "\t\t\t<td border=\"0\">=</td>\n");
178  if (struct_fp)
179  {
180  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%p (%d)</td>\n",
181  (void *) struct_fp, fileno(struct_fp));
182  }
183  else
184  {
185  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">NULL</td>\n");
186  }
187  fprintf(fp, "\t\t</tr>\n");
188 }
+ Here is the caller graph for this function:

◆ dot_type_number()

static void dot_type_number ( FILE *  fp,
const char *  name,
int  num 
)
static

Definition at line 190 of file graphviz.c.

191 {
192  fprintf(fp, "\t\t<tr>\n");
193  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
194  fprintf(fp, "\t\t\t<td border=\"0\">=</td>\n");
195  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%d</td>\n", num);
196  fprintf(fp, "\t\t</tr>\n");
197 }
+ Here is the caller graph for this function:

◆ dot_type_string_escape()

static void dot_type_string_escape ( char *  buf,
size_t  buflen 
)
static

Definition at line 199 of file graphviz.c.

200 {
201  for (; buf[0]; buf++)
202  {
203  if (buf[0] == '<')
204  mutt_str_inline_replace(buf, buflen, 1, "&lt;");
205  else if (buf[0] == '>')
206  mutt_str_inline_replace(buf, buflen, 1, "&gt;");
207  else if (buf[0] == '&')
208  mutt_str_inline_replace(buf, buflen, 1, "&amp;");
209  }
210 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_type_string()

static void dot_type_string ( FILE *  fp,
const char *  name,
const char *  str,
bool  force 
)
static

Definition at line 212 of file graphviz.c.

213 {
214  if ((!str || (str[0] == '\0')) && !force)
215  return;
216 
217  char buf[1024] = "[NULL]";
218 
219  if (str)
220  {
221  mutt_str_copy(buf, str, sizeof(buf));
222  dot_type_string_escape(buf, sizeof(buf));
223  }
224 
225  bool quoted = ((buf[0] != '[') && (buf[0] != '*'));
226 
227  fprintf(fp, "\t\t<tr>\n");
228  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
229  fprintf(fp, "\t\t\t<td border=\"0\">=</td>\n");
230  if (quoted)
231  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">\"%s\"</td>\n", buf);
232  else
233  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", buf);
234  fprintf(fp, "\t\t</tr>\n");
235 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_type_umask()

static void dot_type_umask ( char *  buf,
size_t  buflen,
int  umask 
)
static

Definition at line 237 of file graphviz.c.

238 {
239  snprintf(buf, buflen, "0%03o", umask);
240 }
+ Here is the caller graph for this function:

◆ dot_ptr_name()

static void dot_ptr_name ( char *  buf,
size_t  buflen,
const void *  ptr 
)
static

Definition at line 242 of file graphviz.c.

243 {
244  snprintf(buf, buflen, "obj_%p", ptr);
245 }
+ Here is the caller graph for this function:

◆ dot_ptr()

static void dot_ptr ( FILE *  fp,
const char *  name,
void *  ptr,
const char *  colour 
)
static

Definition at line 247 of file graphviz.c.

248 {
249  fprintf(fp, "\t\t<tr>\n");
250  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
251  fprintf(fp, "\t\t\t<td border=\"0\">=</td>\n");
252  if (colour && ptr)
253  {
254  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\">%p</td>\n",
255  colour, ptr);
256  }
257  else
258  {
259  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%p</td>\n", ptr);
260  }
261  fprintf(fp, "\t\t</tr>\n");
262 }
+ Here is the caller graph for this function:

◆ dot_add_link()

static void dot_add_link ( struct ListHead *  links,
void *  src,
void *  dst,
const char *  label,
bool  back,
const char *  colour 
)
static

Definition at line 264 of file graphviz.c.

266 {
267  if (!src || !dst)
268  return;
269  if (!colour)
270  colour = "#c0c0c0";
271 
272  char obj1[16] = { 0 };
273  char obj2[16] = { 0 };
274  char text[256] = { 0 };
275  char lstr[128] = { 0 };
276 
277  dot_ptr_name(obj1, sizeof(obj1), src);
278  dot_ptr_name(obj2, sizeof(obj2), dst);
279 
280  if (label)
281  snprintf(lstr, sizeof(lstr), "edgetooltip=\"%s\"", label);
282 
283  snprintf(text, sizeof(text), "%s -> %s [ %s %s color=\"%s\" ]", obj1, obj2,
284  back ? "dir=back" : "", lstr, colour);
285  mutt_list_insert_tail(links, mutt_str_dup(text));
286 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_graph_header()

static void dot_graph_header ( FILE *  fp)
static

Definition at line 288 of file graphviz.c.

289 {
290  fprintf(fp, "digraph neomutt\n");
291  fprintf(fp, "{\n\n");
292 
293  fprintf(fp, "\tgraph [\n");
294  fprintf(fp, "\t\trankdir=\"TB\"\n");
295  fprintf(fp, "\t\tnodesep=\"0.5\"\n");
296  fprintf(fp, "\t\tranksep=\"0.5\"\n");
297  fprintf(fp, "\t];\n");
298  fprintf(fp, "\n");
299  fprintf(fp, "\tnode [\n");
300  fprintf(fp, "\t\tshape=\"plain\"\n");
301  fprintf(fp, "\t];\n");
302  fprintf(fp, "\n");
303  fprintf(fp, "\tedge [\n");
304  fprintf(fp, "\t\tpenwidth=\"4.5\"\n");
305  fprintf(fp, "\t\tarrowsize=\"1.0\"\n");
306  fprintf(fp, "\t\tcolor=\"#c0c0c0\"\n");
307  fprintf(fp, "\t];\n");
308  fprintf(fp, "\n");
309 }
+ Here is the caller graph for this function:

◆ dot_graph_footer()

static void dot_graph_footer ( FILE *  fp,
struct ListHead *  links 
)
static

Definition at line 311 of file graphviz.c.

312 {
313  fprintf(fp, "\n");
314  struct ListNode *np = NULL;
315  STAILQ_FOREACH(np, links, entries)
316  {
317  fprintf(fp, "\t%s;\n", np->data);
318  }
319  fprintf(fp, "\n}\n");
320 }
+ Here is the caller graph for this function:

◆ dot_object_header()

static void dot_object_header ( FILE *  fp,
const void *  ptr,
const char *  name,
const char *  colour 
)
static

Definition at line 322 of file graphviz.c.

323 {
324  char obj[16] = { 0 };
325  dot_ptr_name(obj, sizeof(obj), ptr);
326 
327  if (!colour)
328  colour = "#ffff80";
329 
330  fprintf(fp, "\t%s [\n", obj);
331  fprintf(fp, "\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
332  "color=\"#d0d0d0\">\n");
333  fprintf(fp, "\t\t<tr>\n");
334  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",
335  colour, name, ptr);
336  fprintf(fp, "\t\t</tr>\n");
337 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_object_footer()

static void dot_object_footer ( FILE *  fp)
static

Definition at line 339 of file graphviz.c.

340 {
341  fprintf(fp, "\t\t</table>>\n");
342  fprintf(fp, "\t];\n");
343  fprintf(fp, "\n");
344 }
+ Here is the caller graph for this function:

◆ dot_node()

static void dot_node ( FILE *  fp,
void *  ptr,
const char *  name,
const char *  colour 
)
static

Definition at line 346 of file graphviz.c.

347 {
348  char obj[16] = { 0 };
349  dot_ptr_name(obj, sizeof(obj), ptr);
350 
351  fprintf(fp, "\t%s [\n", obj);
352  fprintf(fp, "\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
353  "color=\"#d0d0d0\">\n");
354  fprintf(fp, "\t\t<tr>\n");
355  fprintf(fp, "\t\t\t<td border=\"0\" bgcolor=\"%s\" port=\"top\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font></td>\n",
356  colour, name);
357  fprintf(fp, "\t\t</tr>\n");
358  dot_object_footer(fp);
359 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_node_link()

static void dot_node_link ( FILE *  fp,
void *  ptr,
const char *  name,
void *  link,
const char *  colour 
)
static

Definition at line 361 of file graphviz.c.

362 {
363  char obj[16] = { 0 };
364  dot_ptr_name(obj, sizeof(obj), ptr);
365 
366  fprintf(fp, "\t%s [\n", obj);
367  fprintf(fp, "\t\tlabel=<<table cellspacing=\"0\" border=\"1\" rows=\"*\" "
368  "color=\"#d0d0d0\">\n");
369  fprintf(fp, "\t\t<tr>\n");
370  fprintf(fp, "\t\t\t<td border=\"0\" bgcolor=\"%s\" port=\"top\"><font color=\"#000000\" point-size=\"20\"><b>%s</b></font></td>\n",
371  colour, name);
372  fprintf(fp, "\t\t</tr>\n");
373 
374  fprintf(fp, "\t\t<tr>\n");
375  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\" bgcolor=\"%s\">%p</td>\n", colour, link);
376  fprintf(fp, "\t\t</tr>\n");
377 
378  dot_object_footer(fp);
379 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_path_fs()

static void dot_path_fs ( char *  buf,
size_t  buflen,
const char *  path 
)
static

Definition at line 381 of file graphviz.c.

382 {
383  if (!path)
384  {
385  buf[0] = '\0';
386  return;
387  }
388 
389  const char *slash = strrchr(path, '/');
390  if (slash)
391  slash++;
392  else
393  slash = path;
394 
395  mutt_str_copy(buf, slash, buflen);
396 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_path_imap()

static void dot_path_imap ( char *  buf,
size_t  buflen,
const char *  path 
)
static

Definition at line 398 of file graphviz.c.

399 {
400  char tmp[1024] = { 0 };
401  mutt_str_copy(tmp, path, sizeof(tmp));
402 
403  struct Url *u = url_parse(tmp);
404 
405  if (u->path && (u->path[0] != '\0'))
406  mutt_str_copy(buf, u->path, buflen);
407  else
408  snprintf(buf, buflen, "%s:%s", u->host, u->user);
409 
410  url_free(&u);
411 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_config()

static void dot_config ( FILE *  fp,
const char *  name,
int  type,
struct ConfigSubset sub,
struct ListHead *  links 
)
static

Definition at line 413 of file graphviz.c.

415 {
416  if (!sub)
417  return;
418 
419  struct Buffer value = mutt_buffer_make(256);
420  dot_object_header(fp, (void *) name, "Config", "#ffff80");
421  dot_type_string(fp, "scope", sub->name, true);
422 
423  if (sub->name)
424  {
425  char scope[256];
426  snprintf(scope, sizeof(scope), "%s:", sub->name);
427 
428  struct HashElem **list = get_elem_list(sub->cs);
429  for (size_t i = 0; list[i]; i++)
430  {
431  struct HashElem *item = list[i];
432  if ((item->type & type) == 0)
433  continue;
434 
435  const char *iname = item->key.strkey;
436  size_t slen = strlen(scope);
437  if (mutt_str_startswith(iname, scope) != 0)
438  {
439  if (strchr(iname + slen, ':'))
440  continue;
441  if ((DTYPE(item->type) == DT_STRING) && (item->type & DT_SENSITIVE))
442  {
443  dot_type_string(fp, iname + slen, "***", true);
444  }
445  else
446  {
447  mutt_buffer_reset(&value);
448  cs_subset_he_string_get(sub, item, &value);
449  dot_type_string(fp, iname + slen, value.data, true);
450  }
451  }
452  }
453  }
454  else
455  {
456  struct HashElem **list = get_elem_list(sub->cs);
457  int i = 0;
458  for (; list[i]; i++)
459  ; // do nothing
460 
461  dot_type_number(fp, "count", i);
462  FREE(&list);
463  }
464 
465  dot_object_footer(fp);
466  mutt_buffer_dealloc(&value);
467 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_comp()

static void dot_comp ( FILE *  fp,
struct CompressInfo ci,
struct ListHead *  links 
)
static

Definition at line 469 of file graphviz.c.

470 {
471  dot_object_header(fp, ci, "CompressInfo", "#c0c060");
472  dot_type_string(fp, "append", ci->cmd_append, true);
473  dot_type_string(fp, "close", ci->cmd_close, true);
474  dot_type_string(fp, "open", ci->cmd_open, true);
475  dot_object_footer(fp);
476 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_type()

static void dot_mailbox_type ( FILE *  fp,
const char *  name,
enum MailboxType  type 
)
static

Definition at line 478 of file graphviz.c.

479 {
480  const char *typestr = NULL;
481 
482  switch (type)
483  {
484  case MUTT_MBOX:
485  typestr = "MBOX";
486  break;
487  case MUTT_MMDF:
488  typestr = "MMDF";
489  break;
490  case MUTT_MH:
491  typestr = "MH";
492  break;
493  case MUTT_MAILDIR:
494  typestr = "MAILDIR";
495  break;
496  case MUTT_NNTP:
497  typestr = "NNTP";
498  break;
499  case MUTT_IMAP:
500  typestr = "IMAP";
501  break;
502  case MUTT_NOTMUCH:
503  typestr = "NOTMUCH";
504  break;
505  case MUTT_POP:
506  typestr = "POP";
507  break;
508  case MUTT_COMPRESSED:
509  typestr = "COMPRESSED";
510  break;
511  default:
512  typestr = "UNKNOWN";
513  }
514 
515  fprintf(fp, "\t\t<tr>\n");
516  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", name);
517  fprintf(fp, "\t\t\t<td border=\"0\">=</td>\n");
518  fprintf(fp, "\t\t\t<td border=\"0\" align=\"left\">%s</td>\n", typestr);
519  fprintf(fp, "\t\t</tr>\n");
520 }
+ Here is the caller graph for this function:

◆ dot_mailbox_imap()

static void dot_mailbox_imap ( FILE *  fp,
struct ImapMboxData mdata,
struct ListHead *  links 
)
static

Definition at line 522 of file graphviz.c.

523 {
524  dot_object_header(fp, mdata, "ImapMboxData", "#60c060");
525  dot_type_string(fp, "name", mdata->name, true);
526  dot_type_string(fp, "munge_name", mdata->munge_name, true);
527  dot_type_string(fp, "real_name", mdata->real_name, true);
528  dot_object_footer(fp);
529 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_maildir()

static void dot_mailbox_maildir ( FILE *  fp,
struct MaildirMboxData mdata,
struct ListHead *  links 
)
static

Definition at line 531 of file graphviz.c.

532 {
533  char buf[64] = { 0 };
534 
535  dot_object_header(fp, mdata, "MaildirMboxData", "#60c060");
536 
537  dot_type_date(buf, sizeof(buf), mdata->mtime_cur.tv_sec);
538  dot_type_string(fp, "mtime_cur", buf, true);
539 
540  dot_type_umask(buf, sizeof(buf), mdata->mh_umask);
541  dot_type_string(fp, "mh_umask", buf, true);
542  dot_object_footer(fp);
543 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_mbox()

static void dot_mailbox_mbox ( FILE *  fp,
struct MboxAccountData mdata,
struct ListHead *  links 
)
static

Definition at line 545 of file graphviz.c.

546 {
547  char buf[64] = { 0 };
548 
549  dot_object_header(fp, mdata, "MboxAccountData", "#60c060");
550  dot_ptr(fp, "fp", mdata->fp, NULL);
551 
552  dot_type_date(buf, sizeof(buf), mdata->atime.tv_sec);
553  dot_type_string(fp, "atime", buf, true);
554 
555  dot_object_footer(fp);
556 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_nntp()

static void dot_mailbox_nntp ( FILE *  fp,
struct NntpMboxData mdata,
struct ListHead *  links 
)
static

Definition at line 558 of file graphviz.c.

559 {
560  dot_object_header(fp, mdata, "NntpMboxData", "#60c060");
561  dot_type_string(fp, "group", mdata->group, true);
562  dot_type_string(fp, "desc", mdata->desc, true);
563 
564  dot_type_number(fp, "first_message", mdata->first_message);
565  dot_type_number(fp, "last_message", mdata->last_message);
566  dot_type_number(fp, "last_loaded", mdata->last_loaded);
567  dot_type_number(fp, "last_cached", mdata->last_cached);
568  dot_type_number(fp, "unread", mdata->unread);
569 
570  dot_type_bool(fp, "subscribed", mdata->subscribed);
571  dot_type_bool(fp, "has_new_mail", mdata->has_new_mail);
572  dot_type_bool(fp, "allowed", mdata->allowed);
573  dot_type_bool(fp, "deleted", mdata->deleted);
574 
575  dot_object_footer(fp);
576 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_notmuch()

static void dot_mailbox_notmuch ( FILE *  fp,
struct NmMboxData mdata,
struct ListHead *  links 
)
static

Definition at line 578 of file graphviz.c.

579 {
580  dot_object_header(fp, mdata, "NmMboxData", "#60c060");
581  dot_type_number(fp, "db_limit", mdata->db_limit);
582  dot_object_footer(fp);
583 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_pop()

static void dot_mailbox_pop ( FILE *  fp,
struct PopAccountData adata,
struct ListHead *  links 
)
static

Definition at line 585 of file graphviz.c.

586 {
587  dot_object_header(fp, adata, "PopAccountData", "#60c060");
588  dot_ptr(fp, "conn", adata->conn, "#ff8080");
589  dot_object_footer(fp);
590 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox()

static void dot_mailbox ( FILE *  fp,
struct Mailbox m,
struct ListHead *  links 
)
static

Definition at line 592 of file graphviz.c.

593 {
594  char buf[64] = { 0 };
595 
596  dot_object_header(fp, m, "Mailbox", "#80ff80");
597  dot_mailbox_type(fp, "type", m->type);
598  dot_type_string(fp, "name", m->name, false);
599 
600  if ((m->type == MUTT_IMAP) || (m->type == MUTT_POP))
601  {
602  dot_path_imap(buf, sizeof(buf), mutt_buffer_string(&m->pathbuf));
603  dot_type_string(fp, "pathbuf", buf, true);
604  dot_path_imap(buf, sizeof(buf), m->realpath);
605  dot_type_string(fp, "realpath", buf, true);
606  }
607  else
608  {
609  dot_path_fs(buf, sizeof(buf), mutt_buffer_string(&m->pathbuf));
610  dot_type_string(fp, "pathbuf", buf, true);
611  dot_path_fs(buf, sizeof(buf), m->realpath);
612  dot_type_string(fp, "realpath", buf, true);
613  }
614 
615 #ifdef GV_HIDE_MDATA
616  dot_ptr(fp, "mdata", m->mdata, NULL);
617 #endif
618  dot_ptr(fp, "account", m->account, "#80ffff");
619 
620  dot_type_number(fp, "msg_count", m->msg_count);
621  // dot_type_number(fp, "msg_unread", m->msg_unread);
622  // dot_type_number(fp, "msg_flagged", m->msg_flagged);
623  // dot_type_number(fp, "msg_new", m->msg_new);
624  // dot_type_number(fp, "msg_deleted", m->msg_deleted);
625  // dot_type_number(fp, "msg_tagged", m->msg_tagged);
626 
627  dot_ptr(fp, "emails", m->emails, NULL);
628  dot_type_number(fp, "email_max", m->email_max);
629  dot_ptr(fp, "v2r", m->v2r, NULL);
630  dot_type_number(fp, "vcount", m->vcount);
631 
632  dot_object_footer(fp);
633 
634  // dot_add_link(links, m, m->mdata, false, NULL);
635 
636 #ifndef GV_HIDE_MDATA
637  if (m->mdata)
638  {
639  if (m->type == MUTT_MAILDIR)
640  dot_mailbox_maildir(fp, m->mdata, links);
641  else if (m->type == MUTT_IMAP)
642  dot_mailbox_imap(fp, m->mdata, links);
643  else if (m->type == MUTT_POP)
644  dot_mailbox_pop(fp, m->mdata, links);
645  else if (m->type == MUTT_MBOX)
646  dot_mailbox_mbox(fp, m->mdata, links);
647  else if (m->type == MUTT_NNTP)
648  dot_mailbox_nntp(fp, m->mdata, links);
649  else if (m->type == MUTT_NOTMUCH)
650  dot_mailbox_notmuch(fp, m->mdata, links);
651 
652  dot_add_link(links, m, m->mdata, "Mailbox->mdata", false, NULL);
653  }
654 #endif
655 
656  if (m->compress_info)
657  {
658  dot_comp(fp, m->compress_info, links);
659  dot_add_link(links, m, m->compress_info, "Mailbox->compress_info", false, NULL);
660  }
661 
662 #ifndef GV_HIDE_CONFIG
663  if (m->name)
664  {
665  dot_config(fp, m->name, DT_INHERIT_MBOX, m->sub, links);
666  dot_add_link(links, m, m->name, "Mailbox Config", false, NULL);
667  }
668 #endif
669 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_node()

static void dot_mailbox_node ( FILE *  fp,
struct MailboxNode mn,
struct ListHead *  links 
)
static

Definition at line 671 of file graphviz.c.

672 {
673  dot_node(fp, mn, "MN", "#80ff80");
674 
675  dot_mailbox(fp, mn->mailbox, links);
676 
677  dot_add_link(links, mn, mn->mailbox, "MailboxNode->mailbox", false, NULL);
678 
679  struct Buffer buf;
680  mutt_buffer_init(&buf);
681 
682  char name[256] = { 0 };
683  mutt_buffer_addstr(&buf, "{ rank=same ");
684 
685  dot_ptr_name(name, sizeof(name), mn);
686  mutt_buffer_add_printf(&buf, "%s ", name);
687 
688  dot_ptr_name(name, sizeof(name), mn->mailbox);
689  mutt_buffer_add_printf(&buf, "%s ", name);
690 
691 #ifndef GV_HIDE_MDATA
692  if (mn->mailbox->mdata)
693  {
694  dot_ptr_name(name, sizeof(name), mn->mailbox->mdata);
695  mutt_buffer_add_printf(&buf, "%s ", name);
696  }
697 #endif
698 
699 #ifndef GV_HIDE_CONFIG
700  if (mn->mailbox->name)
701  {
702  dot_ptr_name(name, sizeof(name), mn->mailbox->name);
703  mutt_buffer_add_printf(&buf, "%s ", name);
704  }
705 #endif
706 
707  mutt_buffer_addstr(&buf, "}");
708 
709  mutt_list_insert_tail(links, mutt_str_dup(buf.data));
710  mutt_buffer_dealloc(&buf);
711 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_mailbox_list()

static void dot_mailbox_list ( FILE *  fp,
struct MailboxList *  ml,
struct ListHead *  links,
bool  abbr 
)
static

Definition at line 713 of file graphviz.c.

714 {
715  struct MailboxNode *prev = NULL;
716  struct MailboxNode *np = NULL;
717  STAILQ_FOREACH(np, ml, entries)
718  {
719  if (abbr)
720  dot_node_link(fp, np, "MN", np->mailbox, "#80ff80");
721  else
722  dot_mailbox_node(fp, np, links);
723  if (prev)
724  dot_add_link(links, prev, np, "MailboxNode->next", false, NULL);
725  prev = np;
726  }
727 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_connection()

static void dot_connection ( FILE *  fp,
struct Connection c,
struct ListHead *  links 
)
static

Definition at line 729 of file graphviz.c.

730 {
731  dot_object_header(fp, c, "Connection", "#ff8080");
732  // dot_ptr(fp, "sockdata", c->sockdata, "#60c0c0");
733  dot_type_number(fp, "fd", c->fd);
734  dot_object_footer(fp);
735 
736  dot_object_header(fp, c->inbuf, "ConnAccount", "#ff8080");
737  dot_type_string(fp, "user", c->account.user, true);
738  dot_type_string(fp, "host", c->account.host, true);
739  dot_type_number(fp, "port", c->account.port);
740  dot_object_footer(fp);
741 
742  dot_add_link(links, c, c->inbuf, "Connection.ConnAccount", false, NULL);
743 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_account_imap()

static void dot_account_imap ( FILE *  fp,
struct ImapAccountData adata,
struct ListHead *  links 
)
static

Definition at line 745 of file graphviz.c.

746 {
747  dot_object_header(fp, adata, "ImapAccountData", "#60c0c0");
748  // dot_type_string(fp, "mbox_name", adata->mbox_name, true);
749  // dot_type_string(fp, "login", adata->conn->account.login, true);
750  dot_type_string(fp, "user", adata->conn->account.user, true);
751  dot_type_string(fp, "pass", adata->conn->account.pass[0] ? "***" : "", true);
752  dot_type_number(fp, "port", adata->conn->account.port);
753  // dot_ptr(fp, "conn", adata->conn, "#ff8080");
754  dot_type_bool(fp, "unicode", adata->unicode);
755  dot_type_bool(fp, "qresync", adata->qresync);
756  dot_type_char(fp, "seqid", adata->seqid);
757  dot_ptr(fp, "mailbox", adata->mailbox, "#80ff80");
758  dot_object_footer(fp);
759 
760  if (adata->conn)
761  {
762  dot_connection(fp, adata->conn, links);
763  dot_add_link(links, adata, adata->conn, "ImapAccountData->conn", false, NULL);
764  }
765 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_account_mbox()

static void dot_account_mbox ( FILE *  fp,
struct MboxAccountData adata,
struct ListHead *  links 
)
static

Definition at line 767 of file graphviz.c.

768 {
769  char buf[64] = { 0 };
770 
771  dot_object_header(fp, adata, "MboxAccountData", "#60c0c0");
772  dot_ptr(fp, "fp", adata->fp, NULL);
773 
774  dot_type_date(buf, sizeof(buf), adata->atime.tv_sec);
775  dot_type_string(fp, "atime", buf, true);
776  dot_type_bool(fp, "locked", adata->locked);
777  dot_type_bool(fp, "append", adata->append);
778 
779  dot_object_footer(fp);
780 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_account_nntp()

static void dot_account_nntp ( FILE *  fp,
struct NntpAccountData adata,
struct ListHead *  links 
)
static

Definition at line 782 of file graphviz.c.

783 {
784  dot_object_header(fp, adata, "NntpAccountData", "#60c0c0");
785  dot_type_number(fp, "groups_num", adata->groups_num);
786 
787  dot_type_bool(fp, "hasCAPABILITIES", adata->hasCAPABILITIES);
788  dot_type_bool(fp, "hasSTARTTLS", adata->hasSTARTTLS);
789  dot_type_bool(fp, "hasDATE", adata->hasDATE);
790  dot_type_bool(fp, "hasLIST_NEWSGROUPS", adata->hasLIST_NEWSGROUPS);
791  dot_type_bool(fp, "hasXGTITLE", adata->hasXGTITLE);
792  dot_type_bool(fp, "hasLISTGROUP", adata->hasLISTGROUP);
793  dot_type_bool(fp, "hasLISTGROUPrange", adata->hasLISTGROUPrange);
794  dot_type_bool(fp, "hasOVER", adata->hasOVER);
795  dot_type_bool(fp, "hasXOVER", adata->hasXOVER);
796  dot_type_bool(fp, "cacheable", adata->cacheable);
797  dot_type_bool(fp, "newsrc_modified", adata->newsrc_modified);
798 
799  dot_type_string(fp, "authenticators", adata->authenticators, true);
800  dot_type_string(fp, "overview_fmt", adata->overview_fmt, true);
801  dot_type_string(fp, "newsrc_file", adata->newsrc_file, true);
802  dot_type_file(fp, "newsrc_fp", adata->fp_newsrc);
803 
804  dot_type_number(fp, "groups_num", adata->groups_num);
805  dot_type_number(fp, "groups_max", adata->groups_max);
806 
807  char buf[128];
808  dot_type_date(buf, sizeof(buf), adata->mtime);
809  dot_type_string(fp, "mtime", buf, true);
810  dot_type_date(buf, sizeof(buf), adata->newgroups_time);
811  dot_type_string(fp, "newgroups_time", buf, true);
812  dot_type_date(buf, sizeof(buf), adata->check_time);
813  dot_type_string(fp, "check_time", buf, true);
814 
815  dot_object_footer(fp);
816 
817  if (adata->conn)
818  {
819  dot_connection(fp, adata->conn, links);
820  dot_add_link(links, adata, adata->conn, "NntpAccountData->conn", false, NULL);
821  }
822 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_account_notmuch()

static void dot_account_notmuch ( FILE *  fp,
struct NmAccountData adata,
struct ListHead *  links 
)
static

Definition at line 824 of file graphviz.c.

825 {
826  dot_object_header(fp, adata, "NmAccountData", "#60c0c0");
827  dot_ptr(fp, "db", adata->db, NULL);
828  dot_object_footer(fp);
829 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_account_pop()

static void dot_account_pop ( FILE *  fp,
struct PopAccountData adata,
struct ListHead *  links 
)
static

Definition at line 831 of file graphviz.c.

832 {
833  char buf[64] = { 0 };
834 
835  dot_object_header(fp, adata, "PopAccountData", "#60c0c0");
836 
837  dot_type_date(buf, sizeof(buf), adata->check_time);
838  dot_type_string(fp, "check_time", buf, true);
839 
840  dot_type_string(fp, "login", adata->conn->account.login, true);
841  dot_type_string(fp, "user", adata->conn->account.user, true);
842  dot_type_string(fp, "pass", adata->conn->account.pass[0] ? "***" : "", true);
843  dot_type_number(fp, "port", adata->conn->account.port);
844  // dot_ptr(fp, "conn", adata->conn, "#ff8080");
845  dot_object_footer(fp);
846 
847  if (adata->conn)
848  {
849  dot_connection(fp, adata->conn, links);
850  dot_add_link(links, adata, adata->conn, "PopAccountData->conn", false, NULL);
851  }
852 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_account()

static void dot_account ( FILE *  fp,
struct Account a,
struct ListHead *  links 
)
static

Definition at line 854 of file graphviz.c.

855 {
856  dot_object_header(fp, a, "Account", "#80ffff");
857  dot_mailbox_type(fp, "type", a->type);
858  dot_type_string(fp, "name", a->name, true);
859  // dot_ptr(fp, "adata", a->adata, "#60c0c0");
860  dot_object_footer(fp);
861 
862  if (a->adata)
863  {
864  if (a->type == MUTT_IMAP)
865  dot_account_imap(fp, a->adata, links);
866  else if (a->type == MUTT_POP)
867  dot_account_pop(fp, a->adata, links);
868  else if (a->type == MUTT_MBOX)
869  dot_account_mbox(fp, a->adata, links);
870  else if (a->type == MUTT_NNTP)
871  dot_account_nntp(fp, a->adata, links);
872  else if (a->type == MUTT_NOTMUCH)
873  dot_account_notmuch(fp, a->adata, links);
874 
875  dot_add_link(links, a, a->adata, "Account->adata", false, NULL);
876  }
877 
878 #ifndef GV_HIDE_CONFIG
879  if (a->name)
880  {
881  dot_config(fp, a->name, DT_INHERIT_ACC, a->sub, links);
882  dot_add_link(links, a, a->name, "Config", false, NULL);
883 
884  char name[256] = { 0 };
885  struct Buffer buf;
886  mutt_buffer_init(&buf);
887 
888  mutt_buffer_addstr(&buf, "{ rank=same ");
889 
890  dot_ptr_name(name, sizeof(name), a);
891  mutt_buffer_add_printf(&buf, "%s ", name);
892 
893  dot_ptr_name(name, sizeof(name), a->name);
894  mutt_buffer_add_printf(&buf, "%s ", name);
895 
896  mutt_buffer_addstr(&buf, "}");
897  mutt_list_insert_tail(links, mutt_str_dup(buf.data));
898  mutt_buffer_dealloc(&buf);
899  }
900 #endif
901 
902  struct MailboxNode *first = STAILQ_FIRST(&a->mailboxes);
903  dot_add_link(links, a, first, "Account->mailboxes", false, NULL);
904  dot_mailbox_list(fp, &a->mailboxes, links, false);
905 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_account_list()

static void dot_account_list ( FILE *  fp,
struct AccountList *  al,
struct ListHead *  links 
)
static

Definition at line 907 of file graphviz.c.

908 {
909  struct Account *prev = NULL;
910  struct Account *np = NULL;
911  TAILQ_FOREACH(np, al, entries)
912  {
913 #ifdef GV_HIDE_MBOX
914  if (np->type == MUTT_MBOX)
915  continue;
916 #endif
917  dot_account(fp, np, links);
918  if (prev)
919  dot_add_link(links, prev, np, "Account->next", false, NULL);
920 
921  prev = np;
922  }
923 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_context()

static void dot_context ( FILE *  fp,
struct Context ctx,
struct ListHead *  links 
)
static

Definition at line 925 of file graphviz.c.

926 {
927  dot_object_header(fp, ctx, "Context", "#ff80ff");
928  dot_ptr(fp, "mailbox", ctx->mailbox, "#80ff80");
929 #ifdef GV_HIDE_CONTEXT_CONTENTS
930  dot_type_number(fp, "vsize", ctx->vsize);
931  dot_type_string(fp, "pattern", ctx->pattern, true);
932  dot_type_bool(fp, "collapsed", ctx->collapsed);
933 #endif
934  dot_object_footer(fp);
935 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_graphviz()

void dump_graphviz ( const char *  title,
struct Context ctx 
)

Definition at line 937 of file graphviz.c.

938 {
939  char name[256] = { 0 };
940  struct ListHead links = STAILQ_HEAD_INITIALIZER(links);
941 
942  time_t now = time(NULL);
943  if (title)
944  {
945  char date[128];
946  mutt_date_localtime_format(date, sizeof(date), "%R", now);
947  snprintf(name, sizeof(name), "%s-%s.gv", date, title);
948  }
949  else
950  {
951  mutt_date_localtime_format(name, sizeof(name), "%R.gv", now);
952  }
953 
954  umask(022);
955  FILE *fp = fopen(name, "w");
956  if (!fp)
957  return;
958 
959  dot_graph_header(fp);
960 
961 #ifndef GV_HIDE_NEOMUTT
962  dot_node(fp, NeoMutt, "NeoMutt", "#ffa500");
964  "NeoMutt->accounts", false, NULL);
965 #ifndef GV_HIDE_CONFIG
966  dot_config(fp, (const char *) NeoMutt->sub, 0, NeoMutt->sub, &links);
967  dot_add_link(&links, NeoMutt, NeoMutt->sub, "NeoMutt Config", false, NULL);
968  struct Buffer buf = mutt_buffer_make(256);
969  char obj1[16] = { 0 };
970  char obj2[16] = { 0 };
971  dot_ptr_name(obj1, sizeof(obj1), NeoMutt);
972  dot_ptr_name(obj2, sizeof(obj2), NeoMutt->sub);
973  mutt_buffer_printf(&buf, "{ rank=same %s %s }", obj1, obj2);
975  mutt_buffer_dealloc(&buf);
976 #endif
977 #endif
978 
979  dot_account_list(fp, &NeoMutt->accounts, &links);
980 
981 #ifndef GV_HIDE_CONTEXT
982  if (ctx)
983  dot_context(fp, ctx, &links);
984 
985 #ifndef GV_HIDE_NEOMUTT
986  /* Globals */
987  fprintf(fp, "\t{ rank=same ");
988  if (ctx)
989  {
990  dot_ptr_name(name, sizeof(name), ctx);
991  fprintf(fp, "%s ", name);
992  }
993  dot_ptr_name(name, sizeof(name), NeoMutt);
994  fprintf(fp, "%s ", name);
995  fprintf(fp, "}\n");
996 #endif
997 #endif
998 
999  fprintf(fp, "\t{ rank=same ");
1000  struct Account *np = NULL;
1001  TAILQ_FOREACH(np, &NeoMutt->accounts, entries)
1002  {
1003 #ifdef GV_HIDE_MBOX
1004  if (np->type == MUTT_MBOX)
1005  continue;
1006 #endif
1007  dot_ptr_name(name, sizeof(name), np);
1008  fprintf(fp, "%s ", name);
1009  }
1010  fprintf(fp, "}\n");
1011 
1012  dot_graph_footer(fp, &links);
1013  fclose(fp);
1014  mutt_list_free(&links);
1015 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_parameter_list()

static void dot_parameter_list ( FILE *  fp,
const char *  name,
const struct ParameterList *  pl 
)
static

Definition at line 1017 of file graphviz.c.

1018 {
1019  if (!pl)
1020  return;
1021  if (TAILQ_EMPTY(pl))
1022  return;
1023 
1024  dot_object_header(fp, pl, "ParameterList", "#00ff00");
1025 
1026  struct Parameter *np = NULL;
1027  TAILQ_FOREACH(np, pl, entries)
1028  {
1029  dot_type_string(fp, np->attribute, np->value, false);
1030  }
1031 
1032  dot_object_footer(fp);
1033 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_content()

static void dot_content ( FILE *  fp,
struct Content cont,
struct ListHead *  links 
)
static

Definition at line 1035 of file graphviz.c.

1036 {
1037  struct Buffer buf = mutt_buffer_make(256);
1038 
1039  dot_object_header(fp, cont, "Content", "#800080");
1040 
1041  dot_type_number(fp, "hibin", cont->hibin);
1042  dot_type_number(fp, "lobin", cont->lobin);
1043  dot_type_number(fp, "nulbin", cont->nulbin);
1044  dot_type_number(fp, "crlf", cont->crlf);
1045  dot_type_number(fp, "ascii", cont->ascii);
1046  dot_type_number(fp, "linemax", cont->linemax);
1047 
1048 #define ADD_BOOL(F) add_flag(&buf, cont->F, #F)
1049  ADD_BOOL(space);
1050  ADD_BOOL(binary);
1051  ADD_BOOL(from);
1052  ADD_BOOL(dot);
1053  ADD_BOOL(cr);
1054 #undef ADD_BOOL
1055 
1056  dot_object_footer(fp);
1057 
1058  mutt_buffer_dealloc(&buf);
1059 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_attach_ptr()

void dot_attach_ptr ( FILE *  fp,
struct AttachPtr aptr,
struct ListHead *  links 
)

Definition at line 1061 of file graphviz.c.

1062 {
1063  if (!aptr)
1064  return;
1065 
1066  struct Buffer buf = mutt_buffer_make(256);
1067 
1068  dot_object_header(fp, aptr, "AttachPtr", "#ff0000");
1069 
1070  dot_type_file(fp, "fp", aptr->fp);
1071 
1072  dot_type_string(fp, "parent_type", get_content_type(aptr->parent_type), false);
1073 
1074  dot_type_number(fp, "level", aptr->level);
1075  dot_type_number(fp, "num", aptr->num);
1076 
1077  dot_type_bool(fp, "unowned", aptr->unowned);
1078  dot_type_bool(fp, "decrypted", aptr->decrypted);
1079 
1080  dot_object_footer(fp);
1081 
1082  dot_add_link(links, aptr->body, aptr, "AttachPtr->body", true, NULL);
1083 
1084  mutt_buffer_dealloc(&buf);
1085 }
+ Here is the call graph for this function:

◆ dot_body()

static void dot_body ( FILE *  fp,
struct Body b,
struct ListHead *  links,
bool  link_next 
)
static

Definition at line 1087 of file graphviz.c.

1088 {
1089  struct Buffer buf = mutt_buffer_make(256);
1090 
1091  dot_object_header(fp, b, "Body", "#2020ff");
1092 
1093  char file[256];
1094  dot_path_fs(file, sizeof(file), b->filename);
1095  dot_type_string(fp, "file", file, false);
1096 
1097  dot_type_string(fp, "charset", b->charset, false);
1098  dot_type_string(fp, "description", b->description, false);
1099  dot_type_string(fp, "d_filename", b->d_filename, false);
1100  dot_type_string(fp, "form_name", b->form_name, false);
1101  dot_type_string(fp, "language", b->language, false);
1102  dot_type_string(fp, "subtype", b->subtype, false);
1103  dot_type_string(fp, "xtype", b->xtype, false);
1104 
1105  dot_type_string(fp, "type", get_content_type(b->type), true);
1106  dot_type_string(fp, "encoding", get_content_encoding(b->encoding), true);
1107  dot_type_string(fp, "disposition", get_content_disposition(b->disposition), true);
1108 
1109  if (b->stamp != 0)
1110  {
1111  char arr[64];
1112  dot_type_date(arr, sizeof(arr), b->stamp);
1113  dot_type_string(fp, "stamp", arr, true);
1114  }
1115 
1116 #define ADD_BOOL(F) add_flag(&buf, b->F, #F)
1117  ADD_BOOL(attach_qualifies);
1118  ADD_BOOL(badsig);
1119  ADD_BOOL(collapsed);
1120  ADD_BOOL(deleted);
1121  ADD_BOOL(force_charset);
1122  ADD_BOOL(goodsig);
1123 #ifdef USE_AUTOCRYPT
1124  ADD_BOOL(is_autocrypt);
1125 #endif
1126  ADD_BOOL(noconv);
1127  ADD_BOOL(tagged);
1128  ADD_BOOL(unlink);
1129  ADD_BOOL(use_disp);
1130  ADD_BOOL(warnsig);
1131 #undef ADD_BOOL
1132  dot_type_string(fp, "bools",
1133  mutt_buffer_is_empty(&buf) ? "[NONE]" : mutt_buffer_string(&buf), true);
1134 
1135  dot_type_number(fp, "attach_count", b->attach_count);
1136  dot_type_number(fp, "hdr_offset", b->hdr_offset);
1137  dot_type_number(fp, "length", b->length);
1138  dot_type_number(fp, "offset", b->offset);
1139 
1140  dot_ptr(fp, "aptr", b->aptr, "#3bcbc4");
1141  dot_object_footer(fp);
1142 
1143  if (!TAILQ_EMPTY(&b->parameter))
1144  {
1145  dot_parameter_list(fp, "parameter", &b->parameter);
1146  dot_add_link(links, b, &b->parameter, "Body->mime_headers", false, NULL);
1147  }
1148 
1149  if (b->mime_headers)
1150  {
1151  dot_envelope(fp, b->mime_headers, links);
1152  dot_add_link(links, b, b->mime_headers, "Body->mime_headers", false, NULL);
1153  }
1154 
1155  if (b->email)
1156  {
1157  dot_email(fp, b->email, links);
1158  dot_add_link(links, b, b->email, "Body->email", false, NULL);
1159  }
1160 
1161  if (b->parts)
1162  {
1163  if (!b->email)
1164  dot_body(fp, b->parts, links, true);
1165  dot_add_link(links, b, b->parts, "Body->parts", false, "#ff0000");
1166  }
1167 
1168  if (b->next && link_next)
1169  {
1170  char name[256] = { 0 };
1171  mutt_buffer_reset(&buf);
1172 
1173  mutt_buffer_addstr(&buf, "{ rank=same ");
1174 
1175  dot_ptr_name(name, sizeof(name), b);
1176  mutt_buffer_add_printf(&buf, "%s ", name);
1177 
1178  for (; b->next; b = b->next)
1179  {
1180  dot_body(fp, b->next, links, false);
1181  dot_add_link(links, b, b->next, "Body->next", false, "#008000");
1182 
1183  dot_ptr_name(name, sizeof(name), b->next);
1184  mutt_buffer_add_printf(&buf, "%s ", name);
1185  }
1186 
1187  mutt_buffer_addstr(&buf, "}");
1189  }
1190  else
1191  {
1192  if (b->content)
1193  {
1194  dot_content(fp, b->content, links);
1195  dot_add_link(links, b, b->content, "Body->content", false, NULL);
1196  }
1197 
1198  // if (b->aptr)
1199  // {
1200  // dot_attach_ptr(fp, b->aptr, links);
1201  // dot_add_link(links, b, b->aptr, "Body->aptr", false, NULL);
1202  // }
1203  }
1204 
1205  mutt_buffer_dealloc(&buf);
1206 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_list_head()

static void dot_list_head ( FILE *  fp,
const char *  name,
const struct ListHead *  list 
)
static

Definition at line 1208 of file graphviz.c.

1209 {
1210  if (!list || !name)
1211  return;
1212  if (STAILQ_EMPTY(list))
1213  return;
1214 
1215  struct Buffer buf = mutt_buffer_make(256);
1216 
1217  struct ListNode *np = NULL;
1218  STAILQ_FOREACH(np, list, entries)
1219  {
1220  if (!mutt_buffer_is_empty(&buf))
1221  mutt_buffer_addch(&buf, ',');
1222  mutt_buffer_addstr(&buf, np->data);
1223  }
1224 
1225  dot_type_string(fp, name, mutt_buffer_string(&buf), false);
1226 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_addr_list()

static void dot_addr_list ( FILE *  fp,
const char *  name,
const struct AddressList *  al,
struct ListHead *  links 
)
static

Definition at line 1228 of file graphviz.c.

1230 {
1231  if (!al)
1232  return;
1233  if (TAILQ_EMPTY(al))
1234  return;
1235 
1236  char buf[1024] = { 0 };
1237 
1238  mutt_addrlist_write(al, buf, sizeof(buf), true);
1239  dot_type_string(fp, name, buf, false);
1240 }
+ Here is the call graph for this function:

◆ dump_graphviz_email()

void dump_graphviz_email ( struct Email e)

Definition at line 1420 of file graphviz.c.

1421 {
1422  char name[256] = { 0 };
1423  struct ListHead links = STAILQ_HEAD_INITIALIZER(links);
1424 
1425  time_t now = time(NULL);
1426  mutt_date_localtime_format(name, sizeof(name), "%R-email.gv", now);
1427 
1428  umask(022);
1429  FILE *fp = fopen(name, "w");
1430  if (!fp)
1431  return;
1432 
1433  dot_graph_header(fp);
1434 
1435  dot_email(fp, e, &links);
1436 
1437  dot_graph_footer(fp, &links);
1438  fclose(fp);
1439  mutt_list_free(&links);
1440 }
+ Here is the call graph for this function:

◆ dot_attach_ptr2()

static void dot_attach_ptr2 ( FILE *  fp,
struct AttachPtr aptr,
struct ListHead *  links 
)
static

Definition at line 1442 of file graphviz.c.

1443 {
1444  if (!aptr)
1445  return;
1446 
1447  struct Buffer buf = mutt_buffer_make(256);
1448 
1449  dot_object_header(fp, aptr, "AttachPtr", "#3bcbc4");
1450 
1451  dot_ptr(fp, "body", aptr->body, "#2020ff");
1452  dot_type_file(fp, "fp", aptr->fp);
1453 
1454  dot_type_string(fp, "parent_type", get_content_type(aptr->parent_type), false);
1455  dot_type_number(fp, "level", aptr->level);
1456  dot_type_number(fp, "num", aptr->num);
1457  dot_type_bool(fp, "unowned", aptr->unowned);
1458  dot_type_bool(fp, "decrypted", aptr->decrypted);
1459 
1460  // dot_type_string(fp, "tree", aptr->tree, false);
1461 
1462  dot_object_footer(fp);
1463 
1464  mutt_buffer_dealloc(&buf);
1465 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_array_actx_idx()

static void dot_array_actx_idx ( FILE *  fp,
struct AttachPtr **  idx,
short  idxlen,
short  idxmax,
struct ListHead *  links 
)
static

Definition at line 1467 of file graphviz.c.

1469 {
1470  dot_object_header(fp, idx, "AttachCtx-&gt;idx", "#9347de");
1471 
1472  dot_type_number(fp, "idxlen", idxlen);
1473  dot_type_number(fp, "idxmax", idxmax);
1474 
1475  char arr[32];
1476  for (size_t i = 0; i < idxmax; i++)
1477  {
1478  snprintf(arr, sizeof(arr), "idx[%ld]", i);
1479  dot_ptr(fp, arr, idx[i], "#3bcbc4");
1480  }
1481 
1482  dot_object_footer(fp);
1483 
1484  for (size_t i = 0; i < idxlen; i++)
1485  {
1486  dot_attach_ptr2(fp, idx[i], links);
1487  dot_add_link(links, idx, idx[i], "AttachCtx-&gt;idx", false, NULL);
1488  }
1489 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_array_actx_v2r()

static void dot_array_actx_v2r ( FILE *  fp,
short *  v2r,
short  vcount,
struct ListHead *  links 
)
static

Definition at line 1491 of file graphviz.c.

1492 {
1493  dot_object_header(fp, v2r, "AttachCtx-&gt;v2r", "#9347de");
1494 
1495  dot_type_number(fp, "vcount", vcount);
1496 
1497  char arr[32];
1498  for (size_t i = 0; i < vcount; i++)
1499  {
1500  snprintf(arr, sizeof(arr), "v2r[%ld]", i);
1501  dot_type_number(fp, arr, v2r[i]);
1502  }
1503 
1504  dot_object_footer(fp);
1505 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_array_actx_fp_idx()

static void dot_array_actx_fp_idx ( FILE *  fp,
FILE **  fp_idx,
short  fp_len,
short  fp_max,
struct ListHead *  links 
)
static

Definition at line 1507 of file graphviz.c.

1509 {
1510  dot_object_header(fp, fp_idx, "AttachCtx-&gt;fp_idx", "#f86e28");
1511 
1512  dot_type_number(fp, "fp_len", fp_len);
1513  dot_type_number(fp, "fp_max", fp_max);
1514 
1515  char arr[32];
1516  for (size_t i = 0; i < fp_max; i++)
1517  {
1518  snprintf(arr, sizeof(arr), "fp_idx[%ld]", i);
1519  dot_type_file(fp, arr, fp_idx[i]);
1520  }
1521 
1522  dot_object_footer(fp);
1523 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_array_actx_body_idx()

static void dot_array_actx_body_idx ( FILE *  fp,
struct Body **  body_idx,
short  body_len,
short  body_max,
struct ListHead *  links 
)
static

Definition at line 1525 of file graphviz.c.

1527 {
1528  dot_object_header(fp, body_idx, "AttachCtx-&gt;body_idx", "#4ff270");
1529 
1530  dot_type_number(fp, "body_len", body_len);
1531  dot_type_number(fp, "body_max", body_max);
1532 
1533  char arr[32];
1534  for (size_t i = 0; i < body_max; i++)
1535  {
1536  snprintf(arr, sizeof(arr), "body_idx[%ld]", i);
1537  dot_ptr(fp, arr, body_idx[i], "#2020ff");
1538  }
1539 
1540  dot_object_footer(fp);
1541 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dot_attach_ctx()

static void dot_attach_ctx ( FILE *  fp,
struct AttachCtx actx,
struct ListHead *  links 
)
static

Definition at line 1543 of file graphviz.c.

1544 {
1545  struct Buffer buf = mutt_buffer_make(256);
1546  // char arr[256];
1547 
1548  dot_object_header(fp, actx, "AttachCtx", "#9347de");
1549 
1550  dot_ptr(fp, "email", actx->email, "#ff80ff");
1551  dot_type_file(fp, "fp_root", actx->fp_root);
1552 
1553  dot_object_footer(fp);
1554 
1555  if (actx->idx)
1556  {
1557  dot_array_actx_idx(fp, actx->idx, actx->idxlen, actx->idxmax, links);
1558  dot_add_link(links, actx, actx->idx, "AttachCtx-&gt;idx", false, NULL);
1559  }
1560 
1561  if (actx->v2r)
1562  {
1563  dot_array_actx_v2r(fp, actx->v2r, actx->vcount, links);
1564  dot_add_link(links, actx, actx->v2r, "AttachCtx-&gt;v2r", false, NULL);
1565  }
1566 
1567  if (actx->fp_idx)
1568  {
1569  dot_array_actx_fp_idx(fp, actx->fp_idx, actx->fp_len, actx->fp_max, links);
1570  dot_add_link(links, actx, actx->fp_idx, "AttachCtx-&gt;fp_idx", false, NULL);
1571  }
1572 
1573  if (actx->body_idx)
1574  {
1575  dot_array_actx_body_idx(fp, actx->body_idx, actx->body_len, actx->body_max, links);
1576  dot_add_link(links, actx, actx->body_idx, "AttachCtx-&gt;body_idx", false, NULL);
1577  }
1578 
1579  mutt_buffer_dealloc(&buf);
1580 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_graphviz_attach_ctx()

void dump_graphviz_attach_ctx ( struct AttachCtx actx)

Definition at line 1582 of file graphviz.c.

1583 {
1584  char name[256] = { 0 };
1585  struct ListHead links = STAILQ_HEAD_INITIALIZER(links);
1586 
1587  time_t now = time(NULL);
1588  mutt_date_localtime_format(name, sizeof(name), "%R-actx.gv", now);
1589 
1590  umask(022);
1591  FILE *fp = fopen(name, "w");
1592  if (!fp)
1593  return;
1594 
1595  dot_graph_header(fp);
1596 
1597  dot_attach_ctx(fp, actx, &links);
1598 
1599  dot_graph_footer(fp, &links);
1600  fclose(fp);
1601  mutt_list_free(&links);
1602 }
+ Here is the call graph for this function:
NntpAccountData::cacheable
bool cacheable
Definition: adata.h:46
Body::hdr_offset
long hdr_offset
Offset in stream where the headers begin.
Definition: body.h:42
NntpMboxData::unread
anum_t unread
Definition: mdata.h:39
MaildirMboxData::mh_umask
mode_t mh_umask
Definition: mdata.h:37
Email::date_sent
time_t date_sent
Time when the message was sent (UTC)
Definition: email.h:82
NntpMboxData::group
char * group
Definition: mdata.h:33
Email::msgno
int msgno
Number displayed to the user.
Definition: email.h:87
Envelope::subject
char * subject
Email's subject.
Definition: envelope.h:66
ImapMboxData::real_name
char * real_name
Original Mailbox name, e.g.: INBOX can be just \0.
Definition: mdata.h:42
dot_account_list
static void dot_account_list(FILE *fp, struct AccountList *al, struct ListHead *links)
Definition: graphviz.c:907
ENC_BINARY
@ ENC_BINARY
Binary.
Definition: mime.h:53
ENC_QUOTED_PRINTABLE
@ ENC_QUOTED_PRINTABLE
Quoted-printable text.
Definition: mime.h:51
dot_type_string
static void dot_type_string(FILE *fp, const char *name, const char *str, bool force)
Definition: graphviz.c:212
dot_envelope
static void dot_envelope(FILE *fp, struct Envelope *env, struct ListHead *links)
Definition: graphviz.c:1242
DT_STRING
#define DT_STRING
a string
Definition: types.h:41
AttachPtr::decrypted
bool decrypted
Not part of message as stored in the email->body.
Definition: attach.h:43
CompressInfo::cmd_close
const char * cmd_close
close-hook command
Definition: lib.h:51
AttachCtx::fp_root
FILE * fp_root
Used by recvattach for updating.
Definition: attach.h:52
MUTT_MMDF
@ MUTT_MMDF
'mmdf' Mailbox type
Definition: mailbox.h:49
Envelope::followup_to
char * followup_to
List of 'followup-to' fields.
Definition: envelope.h:77
dot_object_footer
static void dot_object_footer(FILE *fp)
Definition: graphviz.c:339
MUTT_ENV_CHANGED_IRT
#define MUTT_ENV_CHANGED_IRT
In-Reply-To changed to link/break threads.
Definition: envelope.h:32
ConnAccount::host
char host[128]
Server to login to.
Definition: connaccount.h:53
AttachCtx::body_idx
struct Body ** body_idx
Extra struct Body* used for decryption.
Definition: attach.h:65
MailboxNode
List of Mailboxes.
Definition: mailbox.h:152
NeoMutt::accounts
struct AccountList accounts
List of all Accounts.
Definition: neomutt.h:40
NntpAccountData::authenticators
char * authenticators
Definition: adata.h:50
PopAccountData::check_time
time_t check_time
Definition: adata.h:49
AttachCtx::vcount
short vcount
The number of virtual attachments.
Definition: attach.h:59
ImapMboxData::munge_name
char * munge_name
Munged version of the mailbox name.
Definition: mdata.h:41
Email::lines
int lines
How many lines in the body of this message?
Definition: email.h:85
NntpAccountData::groups_max
unsigned int groups_max
Definition: adata.h:57
AttachCtx::fp_idx
FILE ** fp_idx
Extra FILE* used for decryption.
Definition: attach.h:61
Envelope::in_reply_to
struct ListHead in_reply_to
in-reply-to header content
Definition: envelope.h:82
Envelope::message_id
char * message_id
Message ID.
Definition: envelope.h:69
ENC_UUENCODED
@ ENC_UUENCODED
UUEncoded text.
Definition: mime.h:54
NntpAccountData::hasXGTITLE
bool hasXGTITLE
Definition: adata.h:39
NntpAccountData::hasLISTGROUPrange
bool hasLISTGROUPrange
Definition: adata.h:41
APPLICATION_SMIME
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:98
dot_path_fs
static void dot_path_fs(char *buf, size_t buflen, const char *path)
Definition: graphviz.c:381
Mailbox::v2r
int * v2r
Mapping from virtual to real msgno.
Definition: mailbox.h:101
Mailbox::emails
struct Email ** emails
Array of Emails.
Definition: mailbox.h:99
HashElem::key
union HashKey key
Key representing the data.
Definition: hash.h:46
Body::content
struct Content * content
Detailed info about the content of the attachment.
Definition: body.h:51
Envelope::organization
char * organization
Organisation header.
Definition: envelope.h:73
AttachPtr::num
int num
Attachment index number.
Definition: attach.h:41
DT_INHERIT_ACC
#define DT_INHERIT_ACC
Config item can be Account-specific.
Definition: types.h:51
DISP_FORM_DATA
@ DISP_FORM_DATA
Content is form-data.
Definition: mime.h:64
ListNode
A List node for strings.
Definition: list.h:34
Buffer
String manipulation buffer.
Definition: buffer.h:33
NntpAccountData::groups_num
unsigned int groups_num
Definition: adata.h:56
dot_account_imap
static void dot_account_imap(FILE *fp, struct ImapAccountData *adata, struct ListHead *links)
Definition: graphviz.c:745
AttachCtx::body_len
short body_len
Number of Body parts.
Definition: attach.h:66
Account::type
enum MailboxType type
Type of Mailboxes this Account contains.
Definition: account.h:38
Envelope::supersedes
char * supersedes
Supersedes header.
Definition: envelope.h:70
Connection::account
struct ConnAccount account
Account details: username, password, etc.
Definition: connection.h:36
Body::offset
LOFF_T offset
offset where the actual data begins
Definition: body.h:44
SEC_OPPENCRYPT
#define SEC_OPPENCRYPT
Opportunistic encrypt mode.
Definition: lib.h:93
dot_path_imap
static void dot_path_imap(char *buf, size_t buflen, const char *path)
Definition: graphviz.c:398
SEC_AUTOCRYPT_OVERRIDE
#define SEC_AUTOCRYPT_OVERRIDE
(Autocrypt) Indicates manual set/unset of encryption
Definition: lib.h:95
Body::next
struct Body * next
next attachment in the list
Definition: body.h:53
mutt_buffer_is_empty
bool mutt_buffer_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition: buffer.c:252
mutt_buffer_dealloc
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:294
SEC_ENCRYPT
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:85
AttachPtr::fp
FILE * fp
Used in the recvattach menu.
Definition: attach.h:37
dot_array_actx_idx
static void dot_array_actx_idx(FILE *fp, struct AttachPtr **idx, short idxlen, short idxmax, struct ListHead *links)
Definition: graphviz.c:1467
SEC_SIGN
#define SEC_SIGN
Email is signed.
Definition: lib.h:86
mutt_buffer_add_printf
int mutt_buffer_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
Definition: buffer.c:203
NntpAccountData::check_time
time_t check_time
Definition: adata.h:55
mutt_addrlist_write
size_t mutt_addrlist_write(const struct AddressList *al, char *buf, size_t buflen, bool display)
Write an Address to a buffer.
Definition: address.c:1150
Parameter::value
char * value
Parameter value.
Definition: parameter.h:35
dot_context
static void dot_context(FILE *fp, struct Context *ctx, struct ListHead *links)
Definition: graphviz.c:925
MUTT_POP
@ MUTT_POP
'POP3' Mailbox type
Definition: mailbox.h:55
Envelope::x_label
char * x_label
X-Label.
Definition: envelope.h:72
Account::name
char * name
Name of Account.
Definition: account.h:39
Context::vsize
off_t vsize
Size (in bytes) of the messages shown.
Definition: context.h:40
DTYPE
#define DTYPE(x)
Mask for the Data Type.
Definition: types.h:44
Email::num_hidden
size_t num_hidden
Number of hidden messages in this view (only valid when collapsed is set)
Definition: email.h:75
ConnAccount::login
char login[128]
Login name.
Definition: connaccount.h:54
dot_content
static void dot_content(FILE *fp, struct Content *cont, struct ListHead *links)
Definition: graphviz.c:1035
TAILQ_EMPTY
#define TAILQ_EMPTY(head)
Definition: queue.h:714
Email::offset
LOFF_T offset
Where in the stream does this message begin?
Definition: email.h:84
arr
struct Email * arr[10]
Definition: mailbox.c:233
TAILQ_FOREACH
#define TAILQ_FOREACH(var, head, field)
Definition: queue.h:718
NmAccountData::db
notmuch_database_t * db
Definition: adata.h:36
mutt_buffer_init
struct Buffer * mutt_buffer_init(struct Buffer *buf)
Initialise a new Buffer.
Definition: buffer.c:46
Envelope::autocrypt
struct AutocryptHeader * autocrypt
Definition: envelope.h:85
Content::linemax
long linemax
Length of the longest line in the file.
Definition: content.h:40
MaildirMboxData::mtime_cur
struct timespec mtime_cur
Definition: mdata.h:36
CompressInfo::cmd_open
const char * cmd_open
open-hook command
Definition: lib.h:52
NntpAccountData::hasOVER
bool hasOVER
Definition: adata.h:42
dot_type_string_escape
static void dot_type_string_escape(char *buf, size_t buflen)
Definition: graphviz.c:199
dot_mailbox_imap
static void dot_mailbox_imap(FILE *fp, struct ImapMboxData *mdata, struct ListHead *links)
Definition: graphviz.c:522
TYPE_VIDEO
@ TYPE_VIDEO
Type: 'video/*'.
Definition: mime.h:39
NntpMboxData::desc
char * desc
Definition: mdata.h:34
mutt_str_dup
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:370
dot_ptr
static void dot_ptr(FILE *fp, const char *name, void *ptr, const char *colour)
Definition: graphviz.c:247
Envelope::date
char * date
Sent date.
Definition: envelope.h:71
Envelope::x_comment_to
char * x_comment_to
List of 'X-comment-to' fields.
Definition: envelope.h:78
FREE
#define FREE(x)
Definition: memory.h:40
Content::hibin
long hibin
8-bit characters
Definition: content.h:35
dot_array_actx_fp_idx
static void dot_array_actx_fp_idx(FILE *fp, FILE **fp_idx, short fp_len, short fp_max, struct ListHead *links)
Definition: graphviz.c:1507
STAILQ_FIRST
#define STAILQ_FIRST(head)
Definition: queue.h:347
Body::disposition
unsigned int disposition
content-disposition, ContentDisposition
Definition: body.h:67
Email::path
char * path
Path of Email (for local Mailboxes)
Definition: email.h:92
Body::encoding
unsigned int encoding
content-transfer-encoding, ContentEncoding
Definition: body.h:66
dot_array_actx_body_idx
static void dot_array_actx_body_idx(FILE *fp, struct Body **body_idx, short body_len, short body_max, struct ListHead *links)
Definition: graphviz.c:1525
DISP_ATTACH
@ DISP_ATTACH
Content is attached.
Definition: mime.h:63
Content::lobin
long lobin
Unprintable 7-bit chars (eg., control chars)
Definition: content.h:36
NntpMboxData::first_message
anum_t first_message
Definition: mdata.h:35
dot_type_bool
static void dot_type_bool(FILE *fp, const char *name, bool val)
Definition: graphviz.c:149
MailboxNode::mailbox
struct Mailbox * mailbox
Mailbox in the list.
Definition: mailbox.h:154
dot_attach_ptr2
static void dot_attach_ptr2(FILE *fp, struct AttachPtr *aptr, struct ListHead *links)
Definition: graphviz.c:1442
mutt_buffer_reset
void mutt_buffer_reset(struct Buffer *buf)
Reset an existing Buffer.
Definition: buffer.c:79
Content::nulbin
long nulbin
Null characters (0x0)
Definition: content.h:37
STAILQ_EMPTY
#define STAILQ_EMPTY(head)
Definition: queue.h:345
dot_account_nntp
static void dot_account_nntp(FILE *fp, struct NntpAccountData *adata, struct ListHead *links)
Definition: graphviz.c:782
Parameter
Attribute associated with a MIME part.
Definition: parameter.h:32
Envelope::real_subj
char * real_subj
Offset of the real subject.
Definition: envelope.h:67
Body::subtype
char * subtype
content-type subtype
Definition: body.h:37
url_parse
struct Url * url_parse(const char *src)
Fill in Url.
Definition: url.c:234
mutt_list_insert_tail
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
Definition: list.c:64
STAILQ_FOREACH
#define STAILQ_FOREACH(var, head, field)
Definition: queue.h:349
ImapAccountData::conn
struct Connection * conn
Definition: adata.h:38
Mailbox::vcount
int vcount
The number of virtual messages.
Definition: mailbox.h:102
Email::zoccident
bool zoccident
True, if west of UTC, False if east.
Definition: email.h:65
NntpAccountData::fp_newsrc
FILE * fp_newsrc
Definition: adata.h:48
NntpMboxData::allowed
bool allowed
Definition: mdata.h:42
NntpAccountData::conn
struct Connection * conn
Definition: adata.h:60
TYPE_AUDIO
@ TYPE_AUDIO
Type: 'audio/*'.
Definition: mime.h:32
Body::attach_count
signed short attach_count
Number of attachments.
Definition: body.h:59
get_elem_list
struct HashElem ** get_elem_list(struct ConfigSet *cs)
Create a sorted list of all config items.
Definition: subset.c:64
MUTT_COMPRESSED
@ MUTT_COMPRESSED
Compressed file Mailbox type.
Definition: mailbox.h:56
PGP_TRADITIONAL_CHECKED
#define PGP_TRADITIONAL_CHECKED
Email has a traditional (inline) signature.
Definition: lib.h:99
Connection::fd
int fd
Socket file descriptor.
Definition: connection.h:40
timestamp
static const char * timestamp(time_t stamp)
Create a YYYY-MM-DD HH:MM:SS timestamp.
Definition: logging.c:77
dot_mailbox_notmuch
static void dot_mailbox_notmuch(FILE *fp, struct NmMboxData *mdata, struct ListHead *links)
Definition: graphviz.c:578
Email::received
time_t received
Time when the message was placed in the mailbox.
Definition: email.h:83
TAILQ_FIRST
#define TAILQ_FIRST(head)
Definition: queue.h:716
NntpAccountData::newsrc_file
char * newsrc_file
Definition: adata.h:49
dot_array_actx_v2r
static void dot_array_actx_v2r(FILE *fp, short *v2r, short vcount, struct ListHead *links)
Definition: graphviz.c:1491
NntpAccountData::hasDATE
bool hasDATE
Definition: adata.h:37
Envelope::xref
char * xref
List of cross-references.
Definition: envelope.h:76
mutt_buffer_addch
size_t mutt_buffer_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
Definition: buffer.c:240
mutt_date_localtime_format
size_t mutt_date_localtime_format(char *buf, size_t buflen, const char *format, time_t t)
Format localtime.
Definition: date.c:680
HashKey::strkey
const char * strkey
String key.
Definition: hash.h:36
NntpAccountData::hasCAPABILITIES
bool hasCAPABILITIES
Definition: adata.h:35
Body::xtype
char * xtype
content-type if x-unknown
Definition: body.h:36
MUTT_NNTP
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
Definition: mailbox.h:52
timespec::tv_sec
time_t tv_sec
Definition: file.h:51
Body::form_name
char * form_name
Content-Disposition form-data name param.
Definition: body.h:41
Mailbox::type
enum MailboxType type
Mailbox type.
Definition: mailbox.h:105
Mailbox::mdata
void * mdata
Driver specific data.
Definition: mailbox.h:136
Parameter::attribute
char * attribute
Parameter name.
Definition: parameter.h:34
ADD_FLAG
#define ADD_FLAG(F)
MboxAccountData::fp
FILE * fp
Mailbox file.
Definition: lib.h:52
Account
A group of associated Mailboxes.
Definition: account.h:36
MaildirEmailData
Maildir-specific Email data -.
Definition: edata.h:33
AttachPtr::level
int level
Nesting depth of attachment.
Definition: attach.h:40
Email::zminutes
unsigned int zminutes
Minutes away from UTC.
Definition: email.h:64
PopAccountData::conn
struct Connection * conn
Definition: adata.h:36
ConfigSubset::name
const char * name
Scope name of Subset.
Definition: subset.h:48
dot_list_head
static void dot_list_head(FILE *fp, const char *name, const struct ListHead *list)
Definition: graphviz.c:1208
NntpAccountData::hasXOVER
bool hasXOVER
Definition: adata.h:43
Body::length
LOFF_T length
length (in bytes) of attachment
Definition: body.h:45
Mailbox::name
char * name
A short name for the Mailbox.
Definition: mailbox.h:85
Url
A parsed URL proto://user:password@host:port/path?a=1&b=2
Definition: url.h:67
ENC_8BIT
@ ENC_8BIT
8-bit text
Definition: mime.h:50
APPLICATION_PGP
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:97
dot_mailbox_pop
static void dot_mailbox_pop(FILE *fp, struct PopAccountData *adata, struct ListHead *links)
Definition: graphviz.c:585
Mailbox::account
struct Account * account
Account that owns this Mailbox.
Definition: mailbox.h:131
AttachCtx::fp_max
short fp_max
Size of FILE array.
Definition: attach.h:63
Account::mailboxes
struct MailboxList mailboxes
List of Mailboxes.
Definition: account.h:41
DISP_NONE
@ DISP_NONE
No preferred disposition.
Definition: mime.h:65
Connection::inbuf
char inbuf[1024]
Buffer for incoming traffic.
Definition: connection.h:38
url_free
void url_free(struct Url **ptr)
Free the contents of a URL.
Definition: url.c:123
Mailbox::msg_count
int msg_count
Total number of messages.
Definition: mailbox.h:91
ImapAccountData::unicode
bool unicode
If true, we can send UTF-8, and the server will use UTF8 rather than mUTF7.
Definition: adata.h:59
ConfigSubset::cs
struct ConfigSet * cs
Parent ConfigSet.
Definition: subset.h:51
NntpMboxData::last_message
anum_t last_message
Definition: mdata.h:36
dot_comp
static void dot_comp(FILE *fp, struct CompressInfo *ci, struct ListHead *links)
Definition: graphviz.c:469
MUTT_ENV_CHANGED_SUBJECT
#define MUTT_ENV_CHANGED_SUBJECT
Protected header update.
Definition: envelope.h:35
Body::description
char * description
content-description
Definition: body.h:40
TYPE_ANY
@ TYPE_ANY
Type: '*' or '.*'.
Definition: mime.h:40
TYPE_MODEL
@ TYPE_MODEL
Type: 'model/*'.
Definition: mime.h:36
MUTT_NOTMUCH
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:54
MUTT_IMAP
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:53
dot_node_link
static void dot_node_link(FILE *fp, void *ptr, const char *name, void *link, const char *colour)
Definition: graphviz.c:361
MboxAccountData::locked
bool locked
is the mailbox locked?
Definition: lib.h:55
Body::parts
struct Body * parts
parts of a multipart or message/rfc822
Definition: body.h:54
TYPE_MESSAGE
@ TYPE_MESSAGE
Type: 'message/*'.
Definition: mime.h:35
AttachPtr::body
struct Body * body
Attachment.
Definition: attach.h:36
Context::mailbox
struct Mailbox * mailbox
Definition: context.h:50
NntpAccountData::mtime
time_t mtime
Definition: adata.h:53
MUTT_MH
@ MUTT_MH
'MH' Mailbox type
Definition: mailbox.h:50
Email::env
struct Envelope * env
Envelope information.
Definition: email.h:90
Content::ascii
long ascii
Number of ascii chars.
Definition: content.h:39
Body::charset
char * charset
Send mode: charset of attached file as stored on disk.
Definition: body.h:49
Mailbox::email_max
int email_max
Number of pointers in emails.
Definition: mailbox.h:100
DT_SENSITIVE
#define DT_SENSITIVE
Contains sensitive value, e.g. password.
Definition: types.h:49
HashElem::type
int type
Type of data stored in Hash Table, e.g. DT_STRING.
Definition: hash.h:45
Context::collapsed
bool collapsed
Are all threads collapsed?
Definition: context.h:48
TYPE_IMAGE
@ TYPE_IMAGE
Type: 'image/*'.
Definition: mime.h:34
dot_account_notmuch
static void dot_account_notmuch(FILE *fp, struct NmAccountData *adata, struct ListHead *links)
Definition: graphviz.c:824
Email::attach_total
short attach_total
Number of qualifying attachments in message, if attach_valid.
Definition: email.h:97
Mailbox::realpath
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:84
Email::zhours
unsigned int zhours
Hours away from UTC.
Definition: email.h:63
Url::user
char * user
Username.
Definition: url.h:70
mutt_buffer_string
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:77
dot_mailbox_node
static void dot_mailbox_node(FILE *fp, struct MailboxNode *mn, struct ListHead *links)
Definition: graphviz.c:671
Envelope::disp_subj
char * disp_subj
Display subject (modified copy of subject)
Definition: envelope.h:68
dot_type_umask
static void dot_type_umask(char *buf, size_t buflen, int umask)
Definition: graphviz.c:237
NntpMboxData::last_loaded
anum_t last_loaded
Definition: mdata.h:37
dot_connection
static void dot_connection(FILE *fp, struct Connection *c, struct ListHead *links)
Definition: graphviz.c:729
dot_add_link
static void dot_add_link(struct ListHead *links, void *src, void *dst, const char *label, bool back, const char *colour)
Definition: graphviz.c:264
dot_mailbox_nntp
static void dot_mailbox_nntp(FILE *fp, struct NntpMboxData *mdata, struct ListHead *links)
Definition: graphviz.c:558
Email::score
int score
Message score.
Definition: email.h:89
dot_account
static void dot_account(FILE *fp, struct Account *a, struct ListHead *links)
Definition: graphviz.c:854
SEC_BADSIGN
#define SEC_BADSIGN
Email has a bad signature.
Definition: lib.h:88
dot_mailbox
static void dot_mailbox(FILE *fp, struct Mailbox *m, struct ListHead *links)
Definition: graphviz.c:592
Envelope::newsgroups
char * newsgroups
List of newsgroups.
Definition: envelope.h:75
dot_account_pop
static void dot_account_pop(FILE *fp, struct PopAccountData *adata, struct ListHead *links)
Definition: graphviz.c:831
MboxAccountData::append
bool append
mailbox is opened in append mode
Definition: lib.h:56
NntpMboxData::subscribed
bool subscribed
Definition: mdata.h:40
STAILQ_HEAD_INITIALIZER
#define STAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:321
dot_object_header
static void dot_object_header(FILE *fp, const void *ptr, const char *name, const char *colour)
Definition: graphviz.c:322
HashElem
The item stored in a Hash Table.
Definition: hash.h:43
AttachCtx::fp_len
short fp_len
Number of FILE handles.
Definition: attach.h:62
ADD_BOOL
#define ADD_BOOL(F)
NntpAccountData::newsrc_modified
bool newsrc_modified
Definition: adata.h:47
dot_node
static void dot_node(FILE *fp, void *ptr, const char *name, const char *colour)
Definition: graphviz.c:346
mutt_str_cat
char * mutt_str_cat(char *buf, size_t buflen, const char *s)
Concatenate two strings.
Definition: string.c:385
Envelope::userhdrs
struct ListHead userhdrs
user defined headers
Definition: envelope.h:83
Mailbox::compress_info
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:124
TYPE_APPLICATION
@ TYPE_APPLICATION
Type: 'application/*'.
Definition: mime.h:33
Body::d_filename
char * d_filename
filename to be used for the content-disposition header.
Definition: body.h:47
MUTT_ENV_CHANGED_REFS
#define MUTT_ENV_CHANGED_REFS
References changed to break thread.
Definition: envelope.h:33
ConnAccount::port
unsigned short port
Port to connect to.
Definition: connaccount.h:57
Content::crlf
long crlf
\r and \n characters
Definition: content.h:38
Body::stamp
time_t stamp
Time stamp of last encoding update.
Definition: body.h:61
Body::aptr
struct AttachPtr * aptr
Menu information, used in recvattach.c.
Definition: body.h:57
dot_mailbox_maildir
static void dot_mailbox_maildir(FILE *fp, struct MaildirMboxData *mdata, struct ListHead *links)
Definition: graphviz.c:531
ENC_BASE64
@ ENC_BASE64
Base-64 encoded text.
Definition: mime.h:52
Email::edata
void * edata
Driver-specific data.
Definition: email.h:111
TYPE_TEXT
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
AttachCtx::body_max
short body_max
Size of Body array.
Definition: attach.h:67
dot_account_mbox
static void dot_account_mbox(FILE *fp, struct MboxAccountData *adata, struct ListHead *links)
Definition: graphviz.c:767
dot_graph_header
static void dot_graph_header(FILE *fp)
Definition: graphviz.c:288
CompressInfo::cmd_append
const char * cmd_append
append-hook command
Definition: lib.h:50
NeoMutt
Container for Accounts, Notifications.
Definition: neomutt.h:36
DISP_INLINE
@ DISP_INLINE
Content is inline.
Definition: mime.h:62
SEC_INLINE
#define SEC_INLINE
Email has an inline signature.
Definition: lib.h:92
dot_mailbox_mbox
static void dot_mailbox_mbox(FILE *fp, struct MboxAccountData *mdata, struct ListHead *links)
Definition: graphviz.c:545
ImapAccountData::mailbox
struct Mailbox * mailbox
Current selected mailbox.
Definition: adata.h:73
AttachCtx::email
struct Email * email
Used by recvattach for updating.
Definition: attach.h:51
Body::type
unsigned int type
content-type primary type, ContentType
Definition: body.h:65
ENC_OTHER
@ ENC_OTHER
Encoding unknown.
Definition: mime.h:48
TYPE_OTHER
@ TYPE_OTHER
Unknown Content-Type.
Definition: mime.h:31
ADDR_LIST
#define ADDR_LIST(AL)
cs_subset_he_string_get
int cs_subset_he_string_get(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
Definition: subset.c:341
dot_type_char
static void dot_type_char(FILE *fp, const char *name, char ch)
Definition: graphviz.c:159
NntpAccountData::overview_fmt
char * overview_fmt
Definition: adata.h:51
Url::host
char * host
Host.
Definition: url.h:72
ImapAccountData::seqid
unsigned char seqid
tag sequence prefix
Definition: adata.h:53
AttachCtx::v2r
short * v2r
Mapping from virtual to real attachment.
Definition: attach.h:58
Envelope::spam
struct Buffer spam
Spam header.
Definition: envelope.h:80
dot_graph_footer
static void dot_graph_footer(FILE *fp, struct ListHead *links)
Definition: graphviz.c:311
Email::vnum
int vnum
Virtual message number.
Definition: email.h:88
dot_ptr_name
static void dot_ptr_name(char *buf, size_t buflen, const void *ptr)
Definition: graphviz.c:242
Envelope::list_post
char * list_post
This stores a mailto URL, or nothing.
Definition: envelope.h:65
ConnAccount::pass
char pass[256]
Password.
Definition: connaccount.h:56
Account::adata
void * adata
Private data (for Mailbox backends)
Definition: account.h:43
ListNode::data
char * data
String.
Definition: list.h:36
NntpMboxData::deleted
bool deleted
Definition: mdata.h:43
NntpMboxData::last_cached
anum_t last_cached
Definition: mdata.h:38
get_content_type
const char * get_content_type(enum ContentType type)
Definition: graphviz.c:67
dot_type_number
static void dot_type_number(FILE *fp, const char *name, int num)
Definition: graphviz.c:190
dot_config
static void dot_config(FILE *fp, const char *name, int type, struct ConfigSubset *sub, struct ListHead *links)
Definition: graphviz.c:413
Email::index
int index
The absolute (unsorted) message number.
Definition: email.h:86
NntpMboxData::has_new_mail
bool has_new_mail
Definition: mdata.h:41
AttachCtx::idx
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:54
NeoMutt::sub
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
SEC_SIGNOPAQUE
#define SEC_SIGNOPAQUE
Email has an opaque signature (encrypted)
Definition: lib.h:90
mutt_buffer_addstr
size_t mutt_buffer_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:225
maildir_edata_get
struct MaildirEmailData * maildir_edata_get(struct Email *e)
Get the private data for this Email.
Definition: edata.c:64
Context::pattern
char * pattern
Limit pattern string.
Definition: context.h:41
MUTT_MAILDIR
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:51
Body::email
struct Email * email
header information for message/rfc822
Definition: body.h:55
MboxAccountData::atime
struct timespec atime
File's last-access time.
Definition: lib.h:53
Url::path
char * path
Path.
Definition: url.h:74
dot_mailbox_type
static void dot_mailbox_type(FILE *fp, const char *name, enum MailboxType type)
Definition: graphviz.c:478
AttachPtr::parent_type
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition: attach.h:38
dot_parameter_list
static void dot_parameter_list(FILE *fp, const char *name, const struct ParameterList *pl)
Definition: graphviz.c:1017
NntpAccountData::hasLIST_NEWSGROUPS
bool hasLIST_NEWSGROUPS
Definition: adata.h:38
Body::parameter
struct ParameterList parameter
parameters of the content-type
Definition: body.h:39
SEC_KEYBLOCK
#define SEC_KEYBLOCK
Email has a key attached.
Definition: lib.h:91
Mailbox::sub
struct ConfigSubset * sub
Inherited config items.
Definition: mailbox.h:86
DT_INHERIT_MBOX
#define DT_INHERIT_MBOX
Config item can be Mailbox-specific.
Definition: types.h:52
AttachCtx::idxmax
short idxmax
Size of attachment array.
Definition: attach.h:56
Buffer::data
char * data
Pointer to data.
Definition: buffer.h:35
TYPE_MULTIPART
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition: mime.h:37
mutt_str_inline_replace
bool mutt_str_inline_replace(char *buf, size_t buflen, size_t xlen, const char *rstr)
Replace the beginning of a string.
Definition: string.c:1013
mutt_str_startswith
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
Definition: string.c:160
NmMboxData::db_limit
int db_limit
Maximum number of results to return.
Definition: mdata.h:39
NntpAccountData::hasSTARTTLS
bool hasSTARTTLS
Definition: adata.h:36
mutt_buffer_printf
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:160
Envelope::references
struct ListHead references
message references (in reverse order)
Definition: envelope.h:81
dot_body
static void dot_body(FILE *fp, struct Body *b, struct ListHead *links, bool link_next)
Definition: graphviz.c:1087
NntpAccountData::hasLISTGROUP
bool hasLISTGROUP
Definition: adata.h:40
dot_email
static void dot_email(FILE *fp, struct Email *e, struct ListHead *links)
Definition: graphviz.c:1301
mutt_buffer_make
struct Buffer mutt_buffer_make(size_t size)
Make a new buffer on the stack.
Definition: buffer.c:61
mutt_list_free
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:122
AttachPtr::unowned
bool unowned
Don't unlink on detach.
Definition: attach.h:42
MUTT_MBOX
@ MUTT_MBOX
'mbox' Mailbox type
Definition: mailbox.h:48
dot_type_date
static void dot_type_date(char *buf, size_t buflen, time_t timestamp)
Definition: graphviz.c:168
get_content_encoding
const char * get_content_encoding(enum ContentEncoding enc)
Definition: graphviz.c:96
SEC_GOODSIGN
#define SEC_GOODSIGN
Email has a valid signature.
Definition: lib.h:87
NntpAccountData::newgroups_time
time_t newgroups_time
Definition: adata.h:54
ConnAccount::user
char user[128]
Username.
Definition: connaccount.h:55
AttachCtx::idxlen
short idxlen
Number of attachmentes.
Definition: attach.h:55
ENC_7BIT
@ ENC_7BIT
7-bit text
Definition: mime.h:49
Mailbox::pathbuf
struct Buffer pathbuf
Definition: mailbox.h:83
ImapAccountData::qresync
bool qresync
true, if QRESYNC is successfully ENABLE'd
Definition: adata.h:60
Body::language
char * language
content-language (RFC8255)
Definition: body.h:38
SEC_AUTOCRYPT
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition: lib.h:94
ImapMboxData::name
char * name
Mailbox name.
Definition: mdata.h:40
get_content_disposition
const char * get_content_disposition(enum ContentDisposition disp)
Definition: graphviz.c:119
dot_type_file
static void dot_type_file(FILE *fp, const char *name, FILE *struct_fp)
Definition: graphviz.c:173
SEC_PARTSIGN
#define SEC_PARTSIGN
Not all parts of the email is signed.
Definition: lib.h:89
Body::mime_headers
struct Envelope * mime_headers
Memory hole protected headers.
Definition: body.h:63
dot_mailbox_list
static void dot_mailbox_list(FILE *fp, struct MailboxList *ml, struct ListHead *links, bool abbr)
Definition: graphviz.c:713
dot_attach_ctx
static void dot_attach_ctx(FILE *fp, struct AttachCtx *actx, struct ListHead *links)
Definition: graphviz.c:1543
Body::filename
char * filename
when sending a message, this is the file to which this structure refers
Definition: body.h:46
Email::body
struct Body * body
List of MIME parts.
Definition: email.h:91
MUTT_ENV_CHANGED_XLABEL
#define MUTT_ENV_CHANGED_XLABEL
X-Label edited.
Definition: envelope.h:34
Envelope::autocrypt_gossip
struct AutocryptHeader * autocrypt_gossip
Definition: envelope.h:86
idx
size_t idx
Definition: mailbox.c:234
Account::sub
struct ConfigSubset * sub
Inherited config items.
Definition: account.h:40
mutt_str_copy
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:716