NeoMutt  2023-11-03-85-g512e01
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h File Reference

Convenience wrapper for the debug headers. More...

#include <stddef.h>
#include <stdbool.h>
#include <time.h>
#include "mutt/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "menu/lib.h"
+ Include dependency graph for lib.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void add_flag (struct Buffer *buf, bool is_set, const char *name)
 
void show_backtrace (void)
 Log the program's call stack.
 
char body_name (const struct Body *b)
 
void dump_addr_list (char *buf, size_t buflen, const struct AddressList *al, const char *name)
 
void dump_attach (const struct AttachPtr *att)
 
void dump_body (const struct Body *body)
 
void dump_body_next (struct Buffer *buf, const struct Body *b)
 
void dump_body_one_line (const struct Body *b)
 
void dump_email (const struct Email *e)
 
void dump_envelope (const struct Envelope *env)
 
void dump_list_head (const struct ListHead *list, const char *name)
 
void dump_param_list (const struct ParameterList *pl)
 
void dump_graphviz (const char *title, struct MailboxView *mv)
 
void dump_graphviz_attach_ctx (struct AttachCtx *actx)
 
void dump_graphviz_body (struct Body *b)
 
void dump_graphviz_email (struct Email *e, const char *title)
 
void dump_keybindings (void)
 Dump all the keybindings to the log.
 
int log_disp_debug (time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
 Display a log line on screen - Implements log_dispatcher_t -.
 
const char * name_content_disposition (enum ContentDisposition disp)
 
const char * name_content_encoding (enum ContentEncoding enc)
 
const char * name_content_type (enum ContentType type)
 
const char * name_mailbox_type (enum MailboxType type)
 
const char * name_menu_type (enum MenuType mt)
 
const char * name_notify_config (int id)
 
const char * name_notify_global (int id)
 
const char * name_notify_mailbox (int id)
 
const char * name_notify_mview (int id)
 
const char * name_notify_type (enum NotifyType type)
 
const char * name_window_size (const struct MuttWindow *win)
 
const char * name_window_type (const struct MuttWindow *win)
 
int debug_all_observer (struct NotifyCallback *nc)
 
void dump_pager (struct PagerPrivateData *priv)
 
void debug_win_dump (void)
 

Variables

bool DebugLogColor
 Output ANSI colours.
 
bool DebugLogLevel
 Prefix log level, e.g. [E].
 
bool DebugLogTimestamp
 Show the timestamp.
 

Detailed Description

Convenience wrapper for the debug headers.

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 lib.h.

Function Documentation

◆ add_flag()

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

Definition at line 34 of file common.c.

35{
36 if (!buf || !name)
37 return;
38
39 if (is_set)
40 {
41 if (!buf_is_empty(buf))
42 buf_addch(buf, ',');
43 buf_addstr(buf, name);
44 }
45}
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition: buffer.c:303
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
Definition: buffer.c:253
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:238
+ Here is the call graph for this function:

◆ show_backtrace()

void show_backtrace ( void  )

Log the program's call stack.

Definition at line 39 of file backtrace.c.

40{
41 unw_cursor_t cursor;
42 unw_context_t uc;
43 unw_word_t ip, sp;
44 char buf[256];
45
46 printf("\n%s\n", mutt_make_version());
47 printf("Backtrace\n");
48 mutt_debug(LL_DEBUG1, "\nBacktrace\n");
49 unw_getcontext(&uc);
50 unw_init_local(&cursor, &uc);
51 while (unw_step(&cursor) > 0)
52 {
53 unw_get_reg(&cursor, UNW_REG_IP, &ip);
54 unw_get_reg(&cursor, UNW_REG_SP, &sp);
55 unw_get_proc_name(&cursor, buf, sizeof(buf), &ip);
56 if (buf[0] == '_')
57 continue;
58 printf(" %s() ip = %lx, sp = %lx\n", buf, (long) ip, (long) sp);
59 mutt_debug(LL_DEBUG1, " %s() ip = %lx, sp = %lx\n", buf, (long) ip, (long) sp);
60 }
61 printf("\n");
62}
#define mutt_debug(LEVEL,...)
Definition: logging2.h:89
@ LL_DEBUG1
Log at debug level 1.
Definition: logging2.h:43
const char * mutt_make_version(void)
Generate the NeoMutt version string.
Definition: muttlib.c:1433
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ body_name()

char body_name ( const struct Body b)

Definition at line 375 of file email.c.

376{
377 if (!b)
378 return '!';
379
380 if (b->type == TYPE_MULTIPART)
381 return '&';
382
383 if (b->description)
384 return b->description[0];
385
386 if (b->filename)
387 {
388 const char *base = basename(b->filename);
389 if (mutt_str_startswith(base, "neomutt-"))
390 return '0';
391
392 return base[0];
393 }
394
395 return '!';
396}
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition: mime.h:37
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
Definition: string.c:228
char * description
content-description
Definition: body.h:55
unsigned int type
content-type primary type, ContentType
Definition: body.h:40
char * filename
When sending a message, this is the file to which this structure refers.
Definition: body.h:58
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_addr_list()

void dump_addr_list ( char *  buf,
size_t  buflen,
const struct AddressList *  al,
const char *  name 
)

Definition at line 40 of file email.c.

41{
42 if (!buf || !al)
43 return;
44 if (TAILQ_EMPTY(al))
45 return;
46
47 buf[0] = '\0';
48 struct Buffer *tmpbuf = buf_pool_get();
49 mutt_addrlist_write(al, tmpbuf, true);
50 mutt_str_copy(buf, buf_string(tmpbuf), buflen);
51 buf_pool_release(&tmpbuf);
52
53 mutt_debug(LL_DEBUG1, "\t%s: %s\n", name, buf);
54}
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
Definition: address.c:1207
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:93
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:653
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:81
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition: pool.c:94
#define TAILQ_EMPTY(head)
Definition: queue.h:721
String manipulation buffer.
Definition: buffer.h:34
+ Here is the call graph for this function:

◆ dump_attach()

void dump_attach ( const struct AttachPtr att)

Definition at line 347 of file email.c.

348{
349 mutt_debug(LL_DEBUG1, "AttachPtr\n");
350
351 if (!att)
352 {
353 mutt_debug(LL_DEBUG1, "\tNULL pointer\n");
354 return;
355 }
356
357 struct Buffer buf = buf_make(256);
358
359#define ADD_FLAG(F) add_flag(&buf, att->F, #F)
360 ADD_FLAG(unowned);
361 ADD_FLAG(decrypted);
362 ADD_FLAG(collapsed);
363#undef ADD_FLAG
364
365 if (att->fp)
366 mutt_debug(LL_DEBUG1, "\tfp: %p (%d)\n", (void *) att->fp, fileno(att->fp));
367 mutt_debug(LL_DEBUG1, "\tparent_type: %d\n", att->parent_type);
368 mutt_debug(LL_DEBUG1, "\tlevel: %d\n", att->level);
369 mutt_debug(LL_DEBUG1, "\tnum: %d\n", att->num);
370
371 // struct Body *content; ///< Attachment
372 buf_dealloc(&buf);
373}
void buf_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:389
struct Buffer buf_make(size_t size)
Make a new buffer on the stack.
Definition: buffer.c:70
#define ADD_FLAG(F)
int num
Attachment index number.
Definition: attach.h:41
int level
Nesting depth of attachment.
Definition: attach.h:40
FILE * fp
Used in the recvattach menu.
Definition: attach.h:37
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition: attach.h:38
+ Here is the call graph for this function:

◆ dump_body()

void dump_body ( const struct Body body)

Definition at line 264 of file email.c.

265{
266 mutt_debug(LL_DEBUG1, "Body\n");
267
268 if (!body)
269 {
270 mutt_debug(LL_DEBUG1, "\tNULL pointer\n");
271 return;
272 }
273
274 struct Buffer buf = buf_make(256);
275 char arr[256];
276
277#define ADD_FLAG(F) add_flag(&buf, body->F, #F)
278 ADD_FLAG(attach_qualifies);
279 ADD_FLAG(badsig);
280 ADD_FLAG(deleted);
281 ADD_FLAG(force_charset);
282 ADD_FLAG(goodsig);
283#ifdef USE_AUTOCRYPT
284 ADD_FLAG(is_autocrypt);
285#endif
286 ADD_FLAG(noconv);
287 ADD_FLAG(tagged);
288 ADD_FLAG(unlink);
289 ADD_FLAG(use_disp);
290 ADD_FLAG(warnsig);
291#undef ADD_FLAG
292 mutt_debug(LL_DEBUG1, "\tFlags: %s\n", buf_is_empty(&buf) ? "[NONE]" : buf_string(&buf));
293
294#define OPT_STRING(S) \
295 if (body->S) \
296 mutt_debug(LL_DEBUG1, "\t%s: %s\n", #S, body->S)
297 OPT_STRING(charset);
298 OPT_STRING(description);
299 OPT_STRING(d_filename);
300 OPT_STRING(filename);
301 OPT_STRING(form_name);
302 OPT_STRING(language);
303 OPT_STRING(subtype);
304 OPT_STRING(xtype);
305#undef OPT_STRING
306
307 mutt_debug(LL_DEBUG1, "\thdr_offset: %ld\n", body->hdr_offset);
308 mutt_debug(LL_DEBUG1, "\toffset: %ld\n", body->offset);
309 mutt_debug(LL_DEBUG1, "\tlength: %ld\n", body->length);
310 mutt_debug(LL_DEBUG1, "\tattach_count: %d\n", body->attach_count);
311
312 mutt_debug(LL_DEBUG1, "\tcontent type: %s\n", name_content_type(body->type));
313 mutt_debug(LL_DEBUG1, "\tcontent encoding: %s\n", name_content_encoding(body->encoding));
314 mutt_debug(LL_DEBUG1, "\tcontent disposition: %s\n",
316
317 if (body->stamp != 0)
318 {
319 mutt_date_make_tls(arr, sizeof(arr), body->stamp);
320 mutt_debug(LL_DEBUG1, "\tstamp: %s\n", arr);
321 }
322
324
325 // struct Content *content; ///< Detailed info about the content of the attachment.
326 // struct Body *next; ///< next attachment in the list
327 // struct Body *parts; ///< parts of a multipart or message/rfc822
328 // struct Email *email; ///< header information for message/rfc822
329 // struct AttachPtr *aptr; ///< Menu information, used in recvattach.c
330 // struct Envelope *mime_headers; ///< Memory hole protected headers
331
332 if (body->next)
333 {
334 mutt_debug(LL_DEBUG1, "-NEXT-------------------------\n");
335 dump_body(body->next);
336 }
337 if (body->parts)
338 {
339 mutt_debug(LL_DEBUG1, "-PARTS-------------------------\n");
340 dump_body(body->parts);
341 }
342 if (body->next || body->parts)
343 mutt_debug(LL_DEBUG1, "--------------------------\n");
344 buf_dealloc(&buf);
345}
#define OPT_STRING(S)
void dump_param_list(const struct ParameterList *pl)
Definition: email.c:241
void dump_body(const struct Body *body)
Definition: email.c:264
const char * name_content_encoding(enum ContentEncoding enc)
Definition: names.c:65
const char * name_content_type(enum ContentType type)
Definition: names.c:47
const char * name_content_disposition(enum ContentDisposition disp)
Definition: names.c:80
int mutt_date_make_tls(char *buf, size_t buflen, time_t timestamp)
Format date in TLS certificate verification style.
Definition: date.c:810
struct Body * parts
parts of a multipart or message/rfc822
Definition: body.h:72
LOFF_T offset
offset where the actual data begins
Definition: body.h:52
signed short attach_count
Number of attachments.
Definition: body.h:90
time_t stamp
Time stamp of last encoding update.
Definition: body.h:76
LOFF_T length
length (in bytes) of attachment
Definition: body.h:53
struct ParameterList parameter
Parameters of the content-type.
Definition: body.h:62
unsigned int disposition
content-disposition, ContentDisposition
Definition: body.h:42
struct Body * next
next attachment in the list
Definition: body.h:71
unsigned int encoding
content-transfer-encoding, ContentEncoding
Definition: body.h:41
long hdr_offset
Offset in stream where the headers begin.
Definition: body.h:80
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_body_next()

void dump_body_next ( struct Buffer buf,
const struct Body b 
)

Definition at line 398 of file email.c.

399{
400 if (!b)
401 return;
402
403 buf_addstr(buf, "<");
404 for (; b; b = b->next)
405 {
406 buf_add_printf(buf, "%c", body_name(b));
407 dump_body_next(buf, b->parts);
408 if (b->next)
409 buf_addch(buf, ',');
410 }
411 buf_addstr(buf, ">");
412}
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
Definition: buffer.c:216
void dump_body_next(struct Buffer *buf, const struct Body *b)
Definition: email.c:398
char body_name(const struct Body *b)
Definition: email.c:375
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_body_one_line()

void dump_body_one_line ( const struct Body b)

Definition at line 414 of file email.c.

415{
416 if (!b)
417 return;
418
419 struct Buffer *buf = buf_pool_get();
420 buf_addstr(buf, "Body layout: ");
421 dump_body_next(buf, b);
422
423 mutt_message("%s", buf_string(buf));
424 buf_pool_release(&buf);
425}
#define mutt_message(...)
Definition: logging2.h:91
+ Here is the call graph for this function:

◆ dump_email()

void dump_email ( const struct Email e)

Definition at line 148 of file email.c.

149{
150 mutt_debug(LL_DEBUG1, "Email\n");
151
152 if (!e)
153 {
154 mutt_debug(LL_DEBUG1, "\tNULL pointer\n");
155 return;
156 }
157
158 struct Buffer buf = buf_make(256);
159 char arr[256];
160
161 mutt_debug(LL_DEBUG1, "\tpath: %s\n", e->path);
162
163#define ADD_FLAG(F) add_flag(&buf, e->F, #F)
164 ADD_FLAG(active);
165 ADD_FLAG(attach_del);
166 ADD_FLAG(attach_valid);
167 ADD_FLAG(changed);
168 ADD_FLAG(collapsed);
169 ADD_FLAG(deleted);
170 ADD_FLAG(display_subject);
171 ADD_FLAG(expired);
172 ADD_FLAG(flagged);
173 ADD_FLAG(matched);
174 ADD_FLAG(mime);
175 ADD_FLAG(old);
176 ADD_FLAG(purge);
177 ADD_FLAG(quasi_deleted);
178 ADD_FLAG(read);
179 ADD_FLAG(recip_valid);
180 ADD_FLAG(replied);
181 ADD_FLAG(searched);
182 ADD_FLAG(subject_changed);
183 ADD_FLAG(superseded);
184 ADD_FLAG(tagged);
185 ADD_FLAG(threaded);
186 ADD_FLAG(trash);
187 ADD_FLAG(visible);
188#undef ADD_FLAG
189 mutt_debug(LL_DEBUG1, "\tFlags: %s\n", buf_is_empty(&buf) ? "[NONE]" : buf_string(&buf));
190
191#define ADD_FLAG(F) add_flag(&buf, (e->security & F), #F)
192 buf_reset(&buf);
207#undef ADD_FLAG
208 mutt_debug(LL_DEBUG1, "\tSecurity: %s\n",
209 buf_is_empty(&buf) ? "[NONE]" : buf_string(&buf));
210
211 mutt_date_make_tls(arr, sizeof(arr), e->date_sent);
212 mutt_debug(LL_DEBUG1, "\tSent: %s (%c%02u%02u)\n", arr,
213 e->zoccident ? '-' : '+', e->zhours, e->zminutes);
214
215 mutt_date_make_tls(arr, sizeof(arr), e->received);
216 mutt_debug(LL_DEBUG1, "\tRecv: %s\n", arr);
217
218 buf_dealloc(&buf);
219
220 mutt_debug(LL_DEBUG1, "\tnum_hidden: %ld\n", e->num_hidden);
221 mutt_debug(LL_DEBUG1, "\trecipient: %d\n", e->recipient);
222 mutt_debug(LL_DEBUG1, "\toffset: %ld\n", e->offset);
223 mutt_debug(LL_DEBUG1, "\tlines: %d\n", e->lines);
224 mutt_debug(LL_DEBUG1, "\tindex: %d\n", e->index);
225 mutt_debug(LL_DEBUG1, "\tmsgno: %d\n", e->msgno);
226 mutt_debug(LL_DEBUG1, "\tvnum: %d\n", e->vnum);
227 mutt_debug(LL_DEBUG1, "\tscore: %d\n", e->score);
228 mutt_debug(LL_DEBUG1, "\tattach_total: %d\n", e->attach_total);
229 // if (e->maildir_flags)
230 // mutt_debug(LL_DEBUG1, "\tmaildir_flags: %s\n", e->maildir_flags);
231
232 // struct MuttThread *thread
233 // struct Envelope *env
234 // struct Body *content
235 // struct TagList tags
236
237 // void *edata
238 buf_dealloc(&buf);
239}
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
Definition: buffer.c:88
#define SEC_INLINE
Email has an inline signature.
Definition: lib.h:86
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition: lib.h:88
#define SEC_OPPENCRYPT
Opportunistic encrypt mode.
Definition: lib.h:87
#define PGP_TRADITIONAL_CHECKED
Email has a traditional (inline) signature.
Definition: lib.h:93
#define SEC_GOODSIGN
Email has a valid signature.
Definition: lib.h:81
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:91
#define SEC_SIGNOPAQUE
Email has an opaque signature (encrypted)
Definition: lib.h:84
#define SEC_BADSIGN
Email has a bad signature.
Definition: lib.h:82
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:92
#define SEC_PARTSIGN
Not all parts of the email is signed.
Definition: lib.h:83
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:79
#define SEC_AUTOCRYPT_OVERRIDE
(Autocrypt) Indicates manual set/unset of encryption
Definition: lib.h:89
#define SEC_SIGN
Email is signed.
Definition: lib.h:80
#define SEC_KEYBLOCK
Email has a key attached.
Definition: lib.h:85
unsigned int zminutes
Minutes away from UTC.
Definition: email.h:55
int lines
How many lines in the body of this message?
Definition: email.h:60
size_t num_hidden
Number of hidden messages in this view (only valid when collapsed is set)
Definition: email.h:124
bool zoccident
True, if west of UTC, False if east.
Definition: email.h:56
LOFF_T offset
Where in the stream does this message begin?
Definition: email.h:69
short attach_total
Number of qualifying attachments in message, if attach_valid.
Definition: email.h:116
unsigned int zhours
Hours away from UTC.
Definition: email.h:54
time_t date_sent
Time when the message was sent (UTC)
Definition: email.h:58
int vnum
Virtual message number.
Definition: email.h:115
int score
Message score.
Definition: email.h:114
int msgno
Number displayed to the user.
Definition: email.h:112
char * path
Path of Email (for local Mailboxes)
Definition: email.h:68
int index
The absolute (unsorted) message number.
Definition: email.h:111
short recipient
User_is_recipient()'s return value, cached.
Definition: email.h:117
time_t received
Time when the message was placed in the mailbox.
Definition: email.h:59
+ Here is the call graph for this function:

◆ dump_envelope()

void dump_envelope ( const struct Envelope env)

Definition at line 77 of file email.c.

78{
79 mutt_debug(LL_DEBUG1, "Envelope\n");
80
81 if (!env)
82 {
83 mutt_debug(LL_DEBUG1, "\tNULL pointer\n");
84 return;
85 }
86
87 struct Buffer buf = buf_make(256);
88 char arr[1024];
89
90#define ADD_FLAG(F) add_flag(&buf, (env->changed & F), #F)
95#undef ADD_FLAG
96 mutt_debug(LL_DEBUG1, "\tchanged: %s\n",
97 buf_is_empty(&buf) ? "[NONE]" : buf_string(&buf));
98
99#define ADDR_LIST(AL) dump_addr_list(arr, sizeof(arr), &env->AL, #AL)
100 ADDR_LIST(return_path);
101 ADDR_LIST(from);
102 ADDR_LIST(to);
103 ADDR_LIST(cc);
104 ADDR_LIST(bcc);
105 ADDR_LIST(sender);
106 ADDR_LIST(reply_to);
107 ADDR_LIST(mail_followup_to);
108 ADDR_LIST(x_original_to);
109#undef ADDR_LIST
110
111#define OPT_STRING(S) \
112 if (env->S) \
113 mutt_debug(LL_DEBUG1, "\t%s: %s\n", #S, env->S)
114 OPT_STRING(list_post);
115 OPT_STRING(list_subscribe);
116 OPT_STRING(list_unsubscribe);
117 OPT_STRING(subject);
118 OPT_STRING(real_subj);
119 OPT_STRING(disp_subj);
120 OPT_STRING(message_id);
121 OPT_STRING(supersedes);
122 OPT_STRING(date);
123 OPT_STRING(x_label);
124 OPT_STRING(organization);
125 OPT_STRING(newsgroups);
126 OPT_STRING(xref);
127 OPT_STRING(followup_to);
128 OPT_STRING(x_comment_to);
129#undef OPT_STRING
130
131 dump_list_head(&env->references, "references");
132 dump_list_head(&env->in_reply_to, "in_reply_to");
133 dump_list_head(&env->userhdrs, "userhdrs");
134
135 if (!buf_is_empty(&env->spam))
136 mutt_debug(LL_DEBUG1, "\tspam: %s\n", buf_string(&env->spam));
137
138#ifdef USE_AUTOCRYPT
139 if (env->autocrypt)
140 mutt_debug(LL_DEBUG1, "\tautocrypt: %p\n", (void *) env->autocrypt);
141 if (env->autocrypt_gossip)
142 mutt_debug(LL_DEBUG1, "\tautocrypt_gossip: %p\n", (void *) env->autocrypt_gossip);
143#endif
144
145 buf_dealloc(&buf);
146}
void dump_list_head(const struct ListHead *list, const char *name)
Definition: email.c:56
#define ADDR_LIST(AL)
#define MUTT_ENV_CHANGED_SUBJECT
Protected header update.
Definition: envelope.h:37
#define MUTT_ENV_CHANGED_XLABEL
X-Label edited.
Definition: envelope.h:36
#define MUTT_ENV_CHANGED_IRT
In-Reply-To changed to link/break threads.
Definition: envelope.h:34
#define MUTT_ENV_CHANGED_REFS
References changed to break thread.
Definition: envelope.h:35
struct ListHead userhdrs
user defined headers
Definition: envelope.h:85
struct AutocryptHeader * autocrypt_gossip
Autocrypt Gossip header.
Definition: envelope.h:88
struct ListHead references
message references (in reverse order)
Definition: envelope.h:83
struct AutocryptHeader * autocrypt
Autocrypt header.
Definition: envelope.h:87
struct Buffer spam
Spam header.
Definition: envelope.h:82
struct ListHead in_reply_to
in-reply-to header content
Definition: envelope.h:84
+ Here is the call graph for this function:

◆ dump_list_head()

void dump_list_head ( const struct ListHead *  list,
const char *  name 
)

Definition at line 56 of file email.c.

57{
58 if (!list || !name)
59 return;
60 if (STAILQ_EMPTY(list))
61 return;
62
63 struct Buffer buf = buf_make(256);
64
65 struct ListNode *np = NULL;
66 STAILQ_FOREACH(np, list, entries)
67 {
68 if (!buf_is_empty(&buf))
69 buf_addch(&buf, ',');
70 buf_addstr(&buf, np->data);
71 }
72
73 mutt_debug(LL_DEBUG1, "\t%s: %s\n", name, buf_string(&buf));
74 buf_dealloc(&buf);
75}
#define STAILQ_FOREACH(var, head, field)
Definition: queue.h:352
#define STAILQ_EMPTY(head)
Definition: queue.h:348
A List node for strings.
Definition: list.h:35
char * data
String.
Definition: list.h:36
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_param_list()

void dump_param_list ( const struct ParameterList *  pl)

Definition at line 241 of file email.c.

242{
243 mutt_debug(LL_DEBUG1, "\tparameters\n");
244
245 if (!pl)
246 {
247 mutt_debug(LL_DEBUG1, "\tNULL pointer\n");
248 return;
249 }
250
251 if (TAILQ_EMPTY(pl))
252 {
253 mutt_debug(LL_DEBUG1, "\tempty\n");
254 return;
255 }
256
257 struct Parameter *np = NULL;
258 TAILQ_FOREACH(np, pl, entries)
259 {
260 mutt_debug(LL_DEBUG1, "\t\t%s = %s\n", NONULL(np->attribute), NONULL(np->value));
261 }
262}
#define TAILQ_FOREACH(var, head, field)
Definition: queue.h:725
#define NONULL(x)
Definition: string2.h:37
Attribute associated with a MIME part.
Definition: parameter.h:33
char * attribute
Parameter name.
Definition: parameter.h:34
char * value
Parameter value.
Definition: parameter.h:35
+ Here is the caller graph for this function:

◆ dump_graphviz()

void dump_graphviz ( const char *  title,
struct MailboxView mv 
)

Definition at line 879 of file graphviz.c.

880{
881 char name[256] = { 0 };
882 struct ListHead links = STAILQ_HEAD_INITIALIZER(links);
883
884 time_t now = time(NULL);
885 if (title)
886 {
887 char date[128];
888 mutt_date_localtime_format(date, sizeof(date), "%T", now);
889 snprintf(name, sizeof(name), "%s-%s.gv", date, title);
890 }
891 else
892 {
893 mutt_date_localtime_format(name, sizeof(name), "%T.gv", now);
894 }
895
896 umask(022);
897 FILE *fp = fopen(name, "w");
898 if (!fp)
899 return;
900
902
903#ifndef GV_HIDE_NEOMUTT
904 dot_node(fp, NeoMutt, "NeoMutt", "#ffa500");
906 "NeoMutt->accounts", false, NULL);
907#ifndef GV_HIDE_CONFIG
908 dot_config(fp, (const char *) NeoMutt->sub, 0, NeoMutt->sub, &links);
909 dot_add_link(&links, NeoMutt, NeoMutt->sub, "NeoMutt Config", false, NULL);
910 struct Buffer *buf = buf_pool_get();
911 char obj1[64] = { 0 };
912 char obj2[64] = { 0 };
913 dot_ptr_name(obj1, sizeof(obj1), NeoMutt);
914 dot_ptr_name(obj2, sizeof(obj2), NeoMutt->sub);
915 buf_printf(buf, "{ rank=same %s %s }", obj1, obj2);
916 mutt_list_insert_tail(&links, buf_strdup(buf));
917 buf_pool_release(&buf);
918#endif
919#endif
920
921 dot_account_list(fp, &NeoMutt->accounts, &links);
922
923#ifndef GV_HIDE_MVIEW
924 if (mv)
925 dot_mview(fp, mv, &links);
926
927#ifndef GV_HIDE_NEOMUTT
928 /* Globals */
929 fprintf(fp, "\t{ rank=same ");
930 if (mv)
931 {
932 dot_ptr_name(name, sizeof(name), mv);
933 fprintf(fp, "%s ", name);
934 }
935 dot_ptr_name(name, sizeof(name), NeoMutt);
936 fprintf(fp, "%s ", name);
937 fprintf(fp, "}\n");
938#endif
939#endif
940
941 fprintf(fp, "\t{ rank=same ");
942 struct Account *np = NULL;
943 TAILQ_FOREACH(np, &NeoMutt->accounts, entries)
944 {
945#ifdef GV_HIDE_MBOX
946 if (np->type == MUTT_MBOX)
947 continue;
948#endif
949 dot_ptr_name(name, sizeof(name), np);
950 fprintf(fp, "%s ", name);
951 }
952 fprintf(fp, "}\n");
953
954 dot_graph_footer(fp, &links);
955 fclose(fp);
956 mutt_list_free(&links);
957}
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:173
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
Definition: buffer.c:542
void dot_ptr_name(char *buf, size_t buflen, const void *ptr)
Definition: graphviz.c:177
void dot_graph_header(FILE *fp)
Definition: graphviz.c:223
void dot_account_list(FILE *fp, struct AccountList *al, struct ListHead *links)
Definition: graphviz.c:847
void dot_config(FILE *fp, const char *name, int type, struct ConfigSubset *sub, struct ListHead *links)
Definition: graphviz.c:349
void dot_graph_footer(FILE *fp, struct ListHead *links)
Definition: graphviz.c:246
void dot_mview(FILE *fp, struct MailboxView *mv, struct ListHead *links)
Definition: graphviz.c:866
void dot_node(FILE *fp, void *ptr, const char *name, const char *colour)
Definition: graphviz.c:281
void dot_add_link(struct ListHead *links, void *src, void *dst, const char *label, bool back, const char *colour)
Definition: graphviz.c:199
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
Definition: list.c:64
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:122
@ MUTT_MBOX
'mbox' Mailbox type
Definition: mailbox.h:45
size_t mutt_date_localtime_format(char *buf, size_t buflen, const char *format, time_t t)
Format localtime.
Definition: date.c:924
#define STAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:324
#define TAILQ_FIRST(head)
Definition: queue.h:723
A group of associated Mailboxes.
Definition: account.h:37
enum MailboxType type
Type of Mailboxes this Account contains.
Definition: account.h:38
char * name
Name of Account.
Definition: account.h:39
Container for Accounts, Notifications.
Definition: neomutt.h:41
struct AccountList accounts
List of all Accounts.
Definition: neomutt.h:46
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:45
+ 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 1571 of file graphviz.c.

1572{
1573 char name[256] = { 0 };
1574 struct ListHead links = STAILQ_HEAD_INITIALIZER(links);
1575
1576 time_t now = time(NULL);
1577 mutt_date_localtime_format(name, sizeof(name), "%T-actx.gv", now);
1578
1579 umask(022);
1580 FILE *fp = fopen(name, "w");
1581 if (!fp)
1582 return;
1583
1584 dot_graph_header(fp);
1585
1586 dot_attach_ctx(fp, actx, &links);
1587
1588 dot_graph_footer(fp, &links);
1589 fclose(fp);
1590 mutt_list_free(&links);
1591}
void dot_attach_ctx(FILE *fp, struct AttachCtx *actx, struct ListHead *links)
Definition: graphviz.c:1537
+ Here is the call graph for this function:

◆ dump_graphviz_body()

void dump_graphviz_body ( struct Body b)

Definition at line 1381 of file graphviz.c.

1382{
1383 char name[256] = { 0 };
1384 struct ListHead links = STAILQ_HEAD_INITIALIZER(links);
1385
1386 time_t now = time(NULL);
1387 mutt_date_localtime_format(name, sizeof(name), "%T-email.gv", now);
1388
1389 umask(022);
1390 FILE *fp = fopen(name, "w");
1391 if (!fp)
1392 return;
1393
1394 dot_graph_header(fp);
1395
1396 dot_body(fp, b, &links, true);
1397
1398 dot_graph_footer(fp, &links);
1399 fclose(fp);
1400 mutt_list_free(&links);
1401}
void dot_body(FILE *fp, struct Body *b, struct ListHead *links, bool link_next)
Definition: graphviz.c:1028
+ Here is the call graph for this function:

◆ dump_graphviz_email()

void dump_graphviz_email ( struct Email e,
const char *  title 
)

Definition at line 1403 of file graphviz.c.

1404{
1405 char name[256] = { 0 };
1406 struct ListHead links = STAILQ_HEAD_INITIALIZER(links);
1407
1408 if (!title)
1409 title = "email";
1410
1411 char format[64];
1412 snprintf(format, sizeof(format), "%%T-%s.gv", title);
1413
1414 time_t now = time(NULL);
1415 mutt_date_localtime_format(name, sizeof(name), format, now);
1416
1417 umask(022);
1418 FILE *fp = fopen(name, "w");
1419 if (!fp)
1420 return;
1421
1422 dot_graph_header(fp);
1423
1424 dot_email(fp, e, &links);
1425
1426 dot_graph_footer(fp, &links);
1427 fclose(fp);
1428 mutt_list_free(&links);
1429}
void dot_email(FILE *fp, struct Email *e, struct ListHead *links)
Definition: graphviz.c:1262
+ Here is the call graph for this function:

◆ dump_keybindings()

void dump_keybindings ( void  )

Dump all the keybindings to the log.

Definition at line 145 of file keymap.c.

146{
147 mutt_debug(LL_DEBUG1, "Keybindings:\n");
148 for (int i = 1; i < MENU_MAX; i++)
149 {
151 log_menu(i, &Keymaps[i]);
152 }
153}
struct KeymapList Keymaps[MENU_MAX]
Array of key mappings, one for each MenuType.
Definition: lib.c:129
void log_menu(enum MenuType menu, struct KeymapList *kml)
Dump a Menu's keybindings to the log.
Definition: keymap.c:115
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition: mapping.c:42
const struct Mapping MenuNames[]
Menu name lookup table.
Definition: type.c:37
@ MENU_MAX
Definition: type.h:60
+ Here is the call graph for this function:

◆ name_content_disposition()

const char * name_content_disposition ( enum ContentDisposition  disp)

Definition at line 80 of file names.c.

81{
82 switch (disp)
83 {
89 }
90}
@ DISP_ATTACH
Content is attached.
Definition: mime.h:63
@ DISP_INLINE
Content is inline.
Definition: mime.h:62
@ DISP_NONE
No preferred disposition.
Definition: mime.h:65
@ DISP_FORM_DATA
Content is form-data.
Definition: mime.h:64
#define DEBUG_NAME(NAME)
Definition: names.c:39
#define DEBUG_DEFAULT
Definition: names.c:43
+ Here is the caller graph for this function:

◆ name_content_encoding()

const char * name_content_encoding ( enum ContentEncoding  enc)

Definition at line 65 of file names.c.

66{
67 switch (enc)
68 {
77 }
78}
@ ENC_7BIT
7-bit text
Definition: mime.h:49
@ ENC_UUENCODED
UUEncoded text.
Definition: mime.h:54
@ ENC_OTHER
Encoding unknown.
Definition: mime.h:48
@ ENC_BINARY
Binary.
Definition: mime.h:53
@ ENC_BASE64
Base-64 encoded text.
Definition: mime.h:52
@ ENC_8BIT
8-bit text
Definition: mime.h:50
@ ENC_QUOTED_PRINTABLE
Quoted-printable text.
Definition: mime.h:51
+ Here is the caller graph for this function:

◆ name_content_type()

const char * name_content_type ( enum ContentType  type)

Definition at line 47 of file names.c.

48{
49 switch (type)
50 {
62 }
63}
@ TYPE_AUDIO
Type: 'audio/*'.
Definition: mime.h:32
@ TYPE_IMAGE
Type: 'image/*'.
Definition: mime.h:34
@ TYPE_OTHER
Unknown Content-Type.
Definition: mime.h:31
@ TYPE_MESSAGE
Type: 'message/*'.
Definition: mime.h:35
@ TYPE_MODEL
Type: 'model/*'.
Definition: mime.h:36
@ TYPE_APPLICATION
Type: 'application/*'.
Definition: mime.h:33
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
@ TYPE_ANY
Type: '*' or '.*'.
Definition: mime.h:40
@ TYPE_VIDEO
Type: 'video/*'.
Definition: mime.h:39
+ Here is the caller graph for this function:

◆ name_mailbox_type()

const char * name_mailbox_type ( enum MailboxType  type)

Definition at line 123 of file names.c.

124{
125 switch (type)
126 {
140 }
141}
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
@ MUTT_MMDF
'mmdf' Mailbox type
Definition: mailbox.h:46
@ MUTT_MAILBOX_ERROR
Error occurred examining Mailbox.
Definition: mailbox.h:43
@ MUTT_POP
'POP3' Mailbox type
Definition: mailbox.h:52
@ MUTT_MH
'MH' Mailbox type
Definition: mailbox.h:47
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
Definition: mailbox.h:49
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:50
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
Definition: mailbox.h:42
@ MUTT_COMPRESSED
Compressed file Mailbox type.
Definition: mailbox.h:53
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
Definition: mailbox.h:44
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:48
+ Here is the caller graph for this function:

◆ name_menu_type()

const char * name_menu_type ( enum MenuType  mt)

Definition at line 143 of file names.c.

144{
145 switch (mt)
146 {
149#ifdef USE_AUTOCRYPT
151#endif
156#ifdef CRYPT_BACKEND_GPGME
159#endif
161#ifdef MIXMASTER
163#endif
171 }
172}
@ MENU_KEY_SELECT_PGP
Select a PGP key.
Definition: type.h:48
@ MENU_INDEX
Index panel (list of emails)
Definition: type.h:51
@ MENU_MIXMASTER
Create/edit a Mixmaster chain.
Definition: type.h:53
@ MENU_KEY_SELECT_SMIME
Select a SMIME key.
Definition: type.h:49
@ MENU_QUERY
Select from results of external query.
Definition: type.h:58
@ MENU_AUTOCRYPT
Autocrypt Account menu.
Definition: type.h:40
@ MENU_COMPOSE
Compose an email.
Definition: type.h:42
@ MENU_ATTACHMENT
Select an attachment.
Definition: type.h:38
@ MENU_PGP
PGP encryption menu.
Definition: type.h:56
@ MENU_GENERIC
Generic selection list.
Definition: type.h:46
@ MENU_PAGER
Pager pager (email viewer)
Definition: type.h:55
@ MENU_SMIME
SMIME encryption menu.
Definition: type.h:59
@ MENU_EDITOR
Text entry area.
Definition: type.h:44
@ MENU_ALIAS
Select an email address by its alias.
Definition: type.h:37
@ MENU_FOLDER
General file/mailbox browser.
Definition: type.h:45
@ MENU_POSTPONED
Select a postponed email.
Definition: type.h:57

◆ name_notify_config()

const char * name_notify_config ( int  id)

Definition at line 185 of file names.c.

186{
187 switch (id)
188 {
193 }
194}
@ NT_CONFIG_DELETED
Config item has been deleted.
Definition: subset.h:64
@ NT_CONFIG_RESET
Config item has been reset to initial, or parent, value.
Definition: subset.h:63
@ NT_CONFIG_SET
Config item has been set.
Definition: subset.h:62
+ Here is the caller graph for this function:

◆ name_notify_global()

const char * name_notify_global ( int  id)

Definition at line 174 of file names.c.

175{
176 switch (id)
177 {
182 }
183}
@ NT_GLOBAL_STARTUP
NeoMutt is initialised.
Definition: neomutt.h:59
@ NT_GLOBAL_COMMAND
A NeoMutt command.
Definition: neomutt.h:61
@ NT_GLOBAL_SHUTDOWN
NeoMutt is about to close.
Definition: neomutt.h:60
+ Here is the caller graph for this function:

◆ name_notify_mailbox()

const char * name_notify_mailbox ( int  id)

Definition at line 196 of file names.c.

197{
198 switch (id)
199 {
209 }
210}
@ NT_MAILBOX_UNTAG
Clear the 'last-tagged' pointer.
Definition: mailbox.h:179
@ NT_MAILBOX_CHANGE
Mailbox has been changed.
Definition: mailbox.h:172
@ NT_MAILBOX_RESORT
Email list needs resorting.
Definition: mailbox.h:177
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
Definition: mailbox.h:170
@ NT_MAILBOX_INVALID
Email list was changed.
Definition: mailbox.h:176
@ NT_MAILBOX_DELETE_ALL
All Mailboxes are about to be deleted.
Definition: mailbox.h:171
@ NT_MAILBOX_UPDATE
Update internal tables.
Definition: mailbox.h:178
@ NT_MAILBOX_ADD
Mailbox has been added.
Definition: mailbox.h:169
+ Here is the caller graph for this function:

◆ name_notify_mview()

const char * name_notify_mview ( int  id)

Definition at line 212 of file names.c.

213{
214 switch (id)
215 {
220 }
221}
@ NT_MVIEW_DELETE
The Mview is about to be destroyed.
Definition: mview.h:62
@ NT_MVIEW_CHANGE
The Mview has changed.
Definition: mview.h:63
@ NT_MVIEW_ADD
The Mview has been opened.
Definition: mview.h:61
+ Here is the caller graph for this function:

◆ name_notify_type()

const char * name_notify_type ( enum NotifyType  type)

Definition at line 92 of file names.c.

93{
94 switch (type)
95 {
120 }
121}
@ NT_TIMEOUT
Timeout has occurred.
Definition: notify_type.h:56
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:57
@ NT_MENU
Menu has changed, MenuRedrawFlags.
Definition: notify_type.h:51
@ NT_ATTACH
Attachment command changed, NotifyAttach.
Definition: notify_type.h:39
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:43
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition: notify_type.h:41
@ NT_EMAIL
Email has changed, NotifyEmail, EventEmail.
Definition: notify_type.h:44
@ NT_BINDING
Key binding has changed, NotifyBinding, EventBinding.
Definition: notify_type.h:40
@ NT_ENVELOPE
Envelope has changed, NotifyEnvelope.
Definition: notify_type.h:45
@ NT_SCORE
Email scoring has changed.
Definition: notify_type.h:54
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition: notify_type.h:49
@ NT_PAGER
Pager data has changed, NotifyPager, PagerPrivateData.
Definition: notify_type.h:53
@ NT_COMMAND
A Command has been executed, Command.
Definition: notify_type.h:42
@ NT_HEADER
A header has changed, NotifyHeader EventHeader.
Definition: notify_type.h:47
@ NT_ACCOUNT
Account has changed, NotifyAccount, EventAccount.
Definition: notify_type.h:36
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:48
@ NT_ALL
Register for all notifications.
Definition: notify_type.h:35
@ NT_MVIEW
MailboxView has changed, NotifyMview, EventMview.
Definition: notify_type.h:50
@ NT_GLOBAL
Not object-related, NotifyGlobal.
Definition: notify_type.h:46
@ NT_ALTERN
Alternates command changed, NotifyAlternates.
Definition: notify_type.h:38
@ NT_SUBJRX
Subject Regex has changed, NotifySubjRx.
Definition: notify_type.h:55
@ NT_RESIZE
Window has been resized.
Definition: notify_type.h:52
@ NT_ALIAS
Alias has changed, NotifyAlias, EventAlias.
Definition: notify_type.h:37
+ Here is the caller graph for this function:

◆ name_window_size()

const char * name_window_size ( const struct MuttWindow win)

Definition at line 261 of file names.c.

262{
263 if (!win)
264 return "NULL";
265
266 switch (win->size)
267 {
272 }
273}
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
Definition: mutt_window.h:47
@ MUTT_WIN_SIZE_MINIMISE
Window size depends on its children.
Definition: mutt_window.h:49
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
Definition: mutt_window.h:48
enum MuttWindowSize size
Type of Window, e.g. MUTT_WIN_SIZE_FIXED.
Definition: mutt_window.h:131
+ Here is the caller graph for this function:

◆ name_window_type()

const char * name_window_type ( const struct MuttWindow win)

Definition at line 223 of file names.c.

224{
225 if (!win)
226 return "NULL";
227
228 switch (win->type)
229 {
258 }
259}
@ WT_CUSTOM
Window with a custom drawing function.
Definition: mutt_window.h:95
@ WT_ROOT
Parent of All Windows.
Definition: mutt_window.h:72
@ WT_DLG_ALIAS
Alias Dialog, dlg_alias()
Definition: mutt_window.h:77
@ WT_ALL_DIALOGS
Container for All Dialogs (nested Windows)
Definition: mutt_window.h:74
@ WT_DLG_BROWSER
Browser Dialog, dlg_browser()
Definition: mutt_window.h:80
@ WT_MESSAGE
Window for messages/errors.
Definition: mutt_window.h:99
@ WT_DLG_SMIME
Smime Dialog, dlg_smime()
Definition: mutt_window.h:92
@ WT_DLG_QUERY
Query Dialog, dlg_query()
Definition: mutt_window.h:90
@ WT_DLG_HISTORY
History Dialog, dlg_history()
Definition: mutt_window.h:85
@ WT_DLG_PGP
Pgp Dialog, dlg_pgp()
Definition: mutt_window.h:88
@ WT_CONTAINER
Invisible shaping container Window.
Definition: mutt_window.h:73
@ WT_DLG_CERTIFICATE
Certificate Dialog, dlg_certificate()
Definition: mutt_window.h:81
@ WT_DLG_COMPOSE
Compose Dialog, dlg_compose()
Definition: mutt_window.h:82
@ WT_DLG_INDEX
Index Dialog, dlg_index()
Definition: mutt_window.h:86
@ WT_PAGER
A panel containing the Pager Window.
Definition: mutt_window.h:100
@ WT_DLG_GPGME
GPGME Dialog, dlg_gpgme()
Definition: mutt_window.h:83
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
Definition: mutt_window.h:102
@ WT_HELP_BAR
Help Bar containing list of useful key bindings.
Definition: mutt_window.h:96
@ WT_DLG_MIXMASTER
Mixmaster Dialog, dlg_mixmaster()
Definition: mutt_window.h:91
@ WT_DLG_POSTPONED
Postponed Dialog, dlg_postponed()
Definition: mutt_window.h:89
@ WT_INDEX
A panel containing the Index Window.
Definition: mutt_window.h:97
@ WT_DLG_ATTACHMENT
Attachment Dialog, dlg_attachment()
Definition: mutt_window.h:78
@ WT_SIDEBAR
Side panel containing Accounts or groups of data.
Definition: mutt_window.h:101
@ WT_DLG_PAGER
Pager Dialog, dlg_pager()
Definition: mutt_window.h:84
@ WT_DLG_AUTOCRYPT
Autocrypt Dialog, dlg_autocrypt()
Definition: mutt_window.h:79
@ WT_MENU
An Window containing a Menu.
Definition: mutt_window.h:98
@ WT_DLG_PATTERN
Pattern Dialog, dlg_pattern()
Definition: mutt_window.h:87
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:144

◆ debug_all_observer()

int debug_all_observer ( struct NotifyCallback nc)

Definition at line 205 of file notify.c.

206{
207 mutt_debug(LL_DEBUG1, "\033[1;31mNotification:\033[0m %s\n",
209
210 switch (nc->event_type)
211 {
212 case NT_ACCOUNT:
214 break;
215 case NT_COLOR:
217 break;
218 case NT_COMMAND:
220 break;
221 case NT_CONFIG:
223 break;
224 case NT_MVIEW:
226 break;
227 case NT_EMAIL:
229 break;
230 case NT_GLOBAL:
232 break;
233 case NT_MAILBOX:
235 break;
236 case NT_RESIZE:
237 case NT_TIMEOUT:
238 break; // no other data
239 case NT_WINDOW:
242 else if (nc->event_subtype == NT_WINDOW_FOCUS)
244 break;
245 default:
246 mutt_debug(LL_DEBUG1, " Event Type: %d\n", nc->event_type);
247 mutt_debug(LL_DEBUG1, " Event Sub-type: %d\n", nc->event_subtype);
248 mutt_debug(LL_DEBUG1, " Event Data: %p\n", nc->event_data);
249 break;
250 }
251
252 mutt_debug(LL_DEBUG1, " Global Data: %p\n", nc->global_data);
253
254 mutt_debug(LL_DEBUG5, "debug done\n");
255 return 0;
256}
const char * name_notify_type(enum NotifyType type)
Definition: names.c:92
static void notify_dump_global(struct NotifyCallback *nc)
Definition: notify.c:125
static void notify_dump_config(struct NotifyCallback *nc)
Definition: notify.c:91
static void notify_dump_mview(struct NotifyCallback *nc)
Definition: notify.c:102
static void notify_dump_command(struct NotifyCallback *nc)
Definition: notify.c:81
static void notify_dump_color(struct NotifyCallback *nc)
Definition: notify.c:54
static void notify_dump_mailbox(struct NotifyCallback *nc)
Definition: notify.c:130
static void notify_dump_window_focus(struct NotifyCallback *nc)
Definition: notify.c:175
static void notify_dump_account(struct NotifyCallback *nc)
Definition: notify.c:43
static void notify_dump_email(struct NotifyCallback *nc)
Definition: notify.c:114
static void notify_dump_window_state(struct NotifyCallback *nc)
Definition: notify.c:140
@ LL_DEBUG5
Log at debug level 5.
Definition: logging2.h:47
@ NT_WINDOW_STATE
Window state has changed, e.g. WN_VISIBLE.
Definition: mutt_window.h:230
@ NT_WINDOW_FOCUS
Window focus has changed.
Definition: mutt_window.h:232
void * event_data
Data from notify_send()
Definition: observer.h:38
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:36
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:37
void * global_data
Data from notify_observer_add()
Definition: observer.h:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_pager()

void dump_pager ( struct PagerPrivateData priv)

Definition at line 101 of file pager.c.

102{
103 if (!priv)
104 return;
105
106 mutt_debug(LL_DEBUG1, "----------------------------------------------\n");
107 mutt_debug(LL_DEBUG1, "Pager: %d lines (fd %d)\n", priv->lines_used, fileno(priv->fp));
108 for (int i = 0; i < priv->lines_used; i++)
109 {
110 dump_line(i, &priv->lines[i]);
111 }
112}
void dump_line(int i, struct Line *line)
Definition: pager.c:58
int lines_used
Size of lines array (used entries)
Definition: private_data.h:49
struct Line * lines
Array of text lines in pager.
Definition: private_data.h:48
FILE * fp
File containing decrypted/decoded/weeded Email.
Definition: private_data.h:44
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ debug_win_dump()

void debug_win_dump ( void  )

Definition at line 78 of file window.c.

79{
81 mutt_debug(LL_DEBUG1, "\n");
83 mutt_debug(LL_DEBUG1, "\n");
84#ifdef DEBUG_SHOW_SERIALISE
85 struct Buffer buf = buf_make(1024);
86 win_serialise(RootWindow, &buf);
87 mutt_debug(LL_DEBUG1, "%s\n", buf_string(&buf));
88 buf_dealloc(&buf);
89#endif
90 WinFocus = NULL;
91}
static void win_dump(struct MuttWindow *win, int indent)
Definition: window.c:42
static struct MuttWindow * WinFocus
The Window that is currently focussed.
Definition: window.c:40
struct MuttWindow * window_get_focus(void)
Get the currently focused Window.
Definition: mutt_window.c:668
struct MuttWindow * RootWindow
Parent of all Windows.
Definition: rootwin.c:106
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ DebugLogColor

bool DebugLogColor
extern

Output ANSI colours.

Definition at line 39 of file logging.c.

◆ DebugLogLevel

bool DebugLogLevel
extern

Prefix log level, e.g. [E].

Definition at line 40 of file logging.c.

◆ DebugLogTimestamp

bool DebugLogTimestamp
extern

Show the timestamp.

Definition at line 41 of file logging.c.