NeoMutt  2025-12-11-800-ga0ee0f
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
22
41
42#ifndef MUTT_DEBUG_LIB_H
43#define MUTT_DEBUG_LIB_H
44
45#include "config.h"
46#include <stdbool.h>
47#include <stddef.h>
48#include <time.h>
49#include "mutt/lib.h"
50#include "email/lib.h"
51#include "core/lib.h"
52#include "expando/lib.h"
53#include "menu/lib.h"
54
55struct AddressList;
56struct AttachCtx;
57struct AttachPtr;
58struct MailboxView;
59struct MuttWindow;
60struct PagerPrivateData;
61
62// Common
63void add_flag (struct Buffer *buf, bool is_set, const char *name);
64
65// Backtrace
66void show_backtrace(void);
67
68// Email
69char body_name (const struct Body *b);
70void dump_addr_list (char *buf, size_t buflen, const struct AddressList *al, const char *name);
71void dump_attach (const struct AttachPtr *att);
72void dump_body (const struct Body *body);
73void dump_body_next (struct Buffer *buf, const struct Body *b);
74void dump_body_one_line (const struct Body *b);
75void dump_email (const struct Email *e);
76void dump_envelope (const struct Envelope *env);
77void dump_list_head (const struct ListHead *list, const char *name);
78void dump_param_list (const struct ParameterList *pl);
79
80// Expando
81const char *name_expando_domain (enum ExpandoDomain did);
82const char *name_expando_node_type (enum ExpandoNodeType type);
83const char *name_expando_pad_type (enum ExpandoPadType type);
84const char *name_expando_uid (enum ExpandoDomain did, int uid);
85const char *name_expando_uid_alias (int uid);
86const char *name_expando_uid_all (int uid);
87const char *name_expando_uid_attach (int uid);
88const char *name_expando_uid_autocrypt (int uid);
89const char *name_expando_uid_body (int uid);
90const char *name_expando_uid_compose (int uid);
91const char *name_expando_uid_compress (int uid);
92const char *name_expando_uid_email (int uid);
93const char *name_expando_uid_envelope (int uid);
94const char *name_expando_uid_folder (int uid);
95const char *name_expando_uid_global (int uid);
96const char *name_expando_uid_history (int uid);
97const char *name_expando_uid_index (int uid);
98const char *name_expando_uid_mailbox (int uid);
99const char *name_expando_uid_menu (int uid);
100const char *name_expando_uid_nntp (int uid);
101const char *name_expando_uid_pattern (int uid);
102const char *name_expando_uid_pgp (int uid);
103const char *name_expando_uid_pgp_cmd (int uid);
104const char *name_expando_uid_pgp_key (int uid);
106const char *name_expando_uid_sidebar (int uid);
107const char *name_expando_uid_smime_cmd (int uid);
108const char *name_format_justify (enum FormatJustify just);
109
110// Graphviz
111void dump_graphviz (const char *title, const struct MailboxView *mv);
112void dump_graphviz_attach_ctx (const struct AttachCtx *actx);
113void dump_graphviz_body (const struct Body *b);
114void dump_graphviz_email (const struct Email *e, const char *title);
115void dump_graphviz_expando_node(const struct ExpandoNode *node);
116
117// Keymap
118void dump_menu_binds(bool brief);
119void dump_menu_funcs(bool brief);
120
121// Logging
122extern bool DebugLogColor;
123extern bool DebugLogLevel;
124extern bool DebugLogTimestamp;
125
126extern int log_disp_debug (time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format, ...);
127
128// Names
129const char *name_color_id (int cid);
130const char *name_command_id (enum CommandId id);
131const char *name_content_disposition(enum ContentDisposition disp);
132const char *name_content_encoding (enum ContentEncoding enc);
133const char *name_content_type (enum ContentType type);
134const char *name_mailbox_type (enum MailboxType type);
135const char *name_menu_type (enum MenuType mt);
136const char *name_notify_config (int id);
137const char *name_notify_global (int id);
138const char *name_notify_mailbox (int id);
139const char *name_notify_mview (int id);
140const char *name_notify_type (enum NotifyType type);
141const char *name_window_size (const struct MuttWindow *win);
142const char *name_window_type (const struct MuttWindow *win);
143
144// Notify
145int debug_all_observer(struct NotifyCallback *nc);
146
147// Pager
148#ifdef USE_DEBUG_COLOR
149void dump_pager(struct PagerPrivateData *priv);
150#else
151static inline void dump_pager(struct PagerPrivateData *priv) {}
152#endif
153
154// Window
155void debug_win_dump(void);
156
157#endif /* MUTT_DEBUG_LIB_H */
CommandId
ID of Command.
Definition command.h:58
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
Definition mailbox.h:40
const char * name_expando_pad_type(enum ExpandoPadType type)
Get the name of an expando padding type.
void dump_list_head(const struct ListHead *list, const char *name)
Dump a list of strings.
Definition email.c:68
const char * name_expando_uid_history(int uid)
const char * name_expando_uid_pgp(int uid)
void dump_email(const struct Email *e)
Dump an email message.
Definition email.c:170
const char * name_content_encoding(enum ContentEncoding enc)
Get the name of a content encoding.
Definition names.c:177
const char * name_window_size(const struct MuttWindow *win)
Get the name of a window size.
Definition names.c:416
const char * name_expando_uid_compress(int uid)
void dump_graphviz(const char *title, const struct MailboxView *mv)
Dump NeoMutt data structures to GraphViz format.
Definition graphviz.c:1072
const char * name_expando_uid_compose(int uid)
void debug_win_dump(void)
Dump all windows to debug output.
Definition window.c:116
const char * name_notify_global(int id)
Get the name of a global notification type.
Definition names.c:305
const char * name_mailbox_type(enum MailboxType type)
Get the name of a mailbox type.
Definition names.c:250
const char * name_expando_uid_pgp_key(int uid)
const char * name_menu_type(enum MenuType mt)
Get the name of a menu type.
Definition names.c:275
const char * name_command_id(enum CommandId id)
Get the name of a Command id.
Definition names.c:52
const char * name_expando_uid_mailbox(int uid)
const char * name_notify_type(enum NotifyType type)
Get the name of a notification type.
Definition names.c:214
bool DebugLogLevel
Prefix log level, e.g. [E].
Definition logging.c:40
const char * name_expando_uid_autocrypt(int uid)
void dump_graphviz_expando_node(const struct ExpandoNode *node)
Definition graphviz.c:2217
void dump_body_next(struct Buffer *buf, const struct Body *b)
Dump the body tree structure.
Definition email.c:445
const char * name_expando_uid_folder(int uid)
void dump_menu_binds(bool brief)
Dump all menu bindings.
Definition keymap.c:264
void dump_graphviz_attach_ctx(const struct AttachCtx *actx)
Definition graphviz.c:1776
const char * name_expando_node_type(enum ExpandoNodeType type)
Get the name of an expando node type.
const char * name_expando_uid_sidebar(int uid)
void dump_attach(const struct AttachPtr *att)
Dump an attachment.
Definition email.c:383
const char * name_window_type(const struct MuttWindow *win)
Get the name of a window type.
Definition names.c:374
const char * name_expando_uid_pgp_cmd(int uid)
bool DebugLogColor
Output ANSI colours.
Definition logging.c:39
const char * name_notify_mview(int id)
Get the name of a mailbox view notification type.
Definition names.c:358
void dump_param_list(const struct ParameterList *pl)
Dump a parameter list.
Definition email.c:267
const char * name_notify_config(int id)
Get the name of a config notification type.
Definition names.c:321
bool DebugLogTimestamp
Show the timestamp.
Definition logging.c:41
const char * name_expando_uid_attach(int uid)
const char * name_content_type(enum ContentType type)
Get the name of a content type.
Definition names.c:154
const char * name_expando_uid_alias(int uid)
Get the name of an alias expando field.
const char * name_expando_uid_body(int uid)
void dump_envelope(const struct Envelope *env)
Dump an envelope.
Definition email.c:93
const char * name_expando_uid_pattern(int uid)
static void dump_pager(struct PagerPrivateData *priv)
Definition lib.h:151
void dump_graphviz_email(const struct Email *e, const char *title)
Definition graphviz.c:1608
const char * name_content_disposition(enum ContentDisposition disp)
Get the name of a content disposition.
Definition names.c:197
int debug_all_observer(struct NotifyCallback *nc)
Debug observer for all notifications.
Definition notify.c:237
const char * name_expando_uid(enum ExpandoDomain did, int uid)
Get the name of an email expando field.
const char * name_expando_uid_envelope(int uid)
void dump_menu_funcs(bool brief)
Dump all menu functions.
Definition keymap.c:250
void add_flag(struct Buffer *buf, bool is_set, const char *name)
Add a flag name to a buffer if set.
Definition common.c:40
const char * name_expando_uid_pgp_key_gpgme(int uid)
void dump_body_one_line(const struct Body *b)
Dump body layout as a one-line summary.
Definition email.c:465
const char * name_notify_mailbox(int id)
Get the name of a mailbox notification type.
Definition names.c:337
const char * name_expando_uid_menu(int uid)
void dump_graphviz_body(const struct Body *b)
Definition graphviz.c:1586
const char * name_expando_domain(enum ExpandoDomain did)
Get the name of an expando domain.
void show_backtrace(void)
Log the program's call stack.
Definition backtrace.c:40
const char * name_expando_uid_email(int uid)
const char * name_color_id(int cid)
Get the name of a color ID.
Definition names.c:435
char body_name(const struct Body *b)
Get the first character of a body.
Definition email.c:417
const char * name_expando_uid_all(int uid)
const char * name_expando_uid_index(int uid)
void dump_body(const struct Body *body)
Dump a message body.
Definition email.c:294
const char * name_format_justify(enum FormatJustify just)
const char * name_expando_uid_global(int uid)
const char * name_expando_uid_nntp(int uid)
void dump_addr_list(char *buf, size_t buflen, const struct AddressList *al, const char *name)
Dump an address list.
Definition email.c:47
const char * name_expando_uid_smime_cmd(int uid)
ExpandoDomain
Expando Data Domains.
Definition domain.h:34
Structs that make up an email.
Parse Expando string.
FormatJustify
Alignment for format_string()
Definition format.h:33
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 -.
Definition logging.c:74
LogLevel
Names for the Logging Levels.
Definition logging2.h:40
GUI present the user with a selectable list.
ContentEncoding
Content-Transfer-Encoding.
Definition mime.h:47
ContentType
Content-Type.
Definition mime.h:30
ContentDisposition
Content-Disposition values.
Definition mime.h:61
Convenience wrapper for the library headers.
ExpandoNodeType
Type of Expando Node.
Definition node.h:36
ExpandoPadType
Padding type.
NotifyType
Notification Types.
Definition notify_type.h:34
A set of attachments.
Definition attach.h:63
An email to which things will be attached.
Definition attach.h:35
The body of an email.
Definition body.h:36
String manipulation buffer.
Definition buffer.h:36
The envelope/body of an email.
Definition email.h:39
The header of an Email.
Definition envelope.h:57
Basic Expando Node.
Definition node.h:67
View of a Mailbox.
Definition mview.h:40
Data passed to a notification function.
Definition observer.h:34
Private state data for the Pager.
MenuType
Types of GUI selections.
Definition type.h:33