From 0cddc7c56b4ced2b71daaa5cb342d850fa14b28b Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sun, 8 Jul 2018 14:57:34 +0100 Subject: [PATCH] split protos.h 2 --- addrbook.c | 3 +- addrbook.h | 7 +++ alias.c | 1 + browser.c | 7 ++- buffy.c | 6 +- color.c | 2 +- color.h | 2 + commands.c | 20 +++--- commands.h | 4 +- compose.c | 10 ++- compose.h | 7 +++ compress.c | 1 + conn/conn_globals.c | 1 - conn/ssl.c | 2 +- conn/ssl_gnutls.c | 2 +- copy.c | 2 + curs_lib.c | 4 +- curs_lib.h | 50 +++++++++------ curs_main.c | 23 ++++--- curs_main.h | 14 +++++ edit.c | 1 + edit.h | 4 ++ enter.c | 2 + flags.c | 4 +- format_flags.h | 4 -- handler.c | 8 +-- hdrline.c | 1 + hdrline.h | 16 +++++ help.c | 1 + history.c | 5 +- hook.c | 5 +- hook.h | 1 + imap/command.c | 2 +- imap/util.c | 7 ++- init.c | 2 +- keymap.c | 1 + maildir/mh.c | 6 +- main.c | 3 + main.h | 4 ++ menu.c | 7 ++- menu.h | 108 +++++++++++++++++++++++++++++++ mutt.h | 4 +- mutt_attach.c | 3 +- mutt_curses.h | 13 ---- mutt_header.c | 1 + mutt_logging.c | 1 + mutt_menu.h | 140 ----------------------------------------- mutt_window.c | 2 +- muttlib.c | 1 + muttlib.h | 3 + mx.c | 5 +- ncrypt/crypt.c | 11 ++-- ncrypt/crypt_gpgme.c | 4 +- ncrypt/pgp.c | 9 +-- ncrypt/pgpinvoke.c | 1 + ncrypt/pgpkey.c | 4 +- ncrypt/smime.c | 10 +-- nntp/newsrc.c | 1 + nntp/nntp.c | 6 +- notmuch/mutt_notmuch.c | 7 ++- pager.c | 25 +++++--- pager.h | 2 - parse.c | 1 + pattern.c | 3 +- pop/pop.c | 6 +- pop/pop_auth.c | 2 +- postpone.c | 3 +- progress.c | 3 +- protos.h | 25 -------- query.c | 3 +- query.h | 5 ++ recvattach.c | 9 ++- recvcmd.c | 1 + remailer.c | 4 +- rfc3676.c | 2 +- score.c | 3 +- score.h | 11 ++++ send.c | 72 +++++++++++---------- send.h | 1 + sendlib.c | 25 ++++---- sidebar.c | 10 +-- smtp.h | 6 ++ sort.c | 3 +- sort.h | 1 - status.c | 3 +- status.h | 6 ++ 86 files changed, 460 insertions(+), 361 deletions(-) delete mode 100644 mutt_menu.h diff --git a/addrbook.c b/addrbook.c index ea256b1ec..a76825b78 100644 --- a/addrbook.c +++ b/addrbook.c @@ -37,8 +37,9 @@ #include "format_flags.h" #include "globals.h" #include "keymap.h" -#include "mutt_menu.h" +#include "menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "opcodes.h" #include "options.h" #include "protos.h" diff --git a/addrbook.h b/addrbook.h index 2ed67d09f..b58e24d4f 100644 --- a/addrbook.h +++ b/addrbook.h @@ -23,8 +23,15 @@ #ifndef MUTT_ADDRBOOK_H #define MUTT_ADDRBOOK_H +#include + +struct AliasList; + /* These Config Variables are only used in addrbook.c */ extern char *AliasFormat; extern short SortAlias; +void mutt_alias_menu(char *buf, size_t buflen, struct AliasList *aliases); + #endif /* MUTT_ADDRBOOK_H */ + diff --git a/alias.c b/alias.c index e75a46b35..43a477197 100644 --- a/alias.c +++ b/alias.c @@ -35,6 +35,7 @@ #include "mutt.h" #include "alias.h" #include "globals.h" +#include "hdrline.h" #include "mutt_curses.h" #include "options.h" #include "protos.h" diff --git a/browser.c b/browser.c index 7c336fc6d..46aa01324 100644 --- a/browser.c +++ b/browser.c @@ -41,14 +41,15 @@ #include "browser.h" #include "buffy.h" #include "context.h" +#include "curs_lib.h" #include "format_flags.h" #include "globals.h" #include "keymap.h" #include "mailbox.h" #include "maildir/maildir.h" +#include "menu.h" #include "mutt_attach.h" #include "mutt_curses.h" -#include "mutt_menu.h" #include "mutt_window.h" #include "muttlib.h" #include "mx.h" @@ -68,11 +69,11 @@ #endif /* These Config Variables are only used in browser.c */ -bool BrowserAbbreviateMailboxes; +bool BrowserAbbreviateMailboxes; char *FolderFormat; char *GroupIndexFormat; char *NewsgroupsCharset; -bool ShowOnlyUnread; +bool ShowOnlyUnread; short SortBrowser; char *VfolderFormat; diff --git a/buffy.c b/buffy.c index 4e062bba1..a4333f564 100644 --- a/buffy.c +++ b/buffy.c @@ -36,7 +36,7 @@ #include "globals.h" #include "mailbox.h" #include "maildir/maildir.h" -#include "mutt_menu.h" +#include "menu.h" #include "mutt_window.h" #include "mx.h" #include "options.h" @@ -53,9 +53,9 @@ /* These Config Variables are only used in buffy.c */ short MailCheck; -bool MailCheckStats; +bool MailCheckStats; short MailCheckStatsInterval; -bool MaildirCheckCur; +bool MaildirCheckCur; static time_t BuffyTime = 0; /**< last time we started checking for mail */ static time_t BuffyStatsTime = 0; /**< last time we check performed mail_check_stats */ diff --git a/color.c b/color.c index 12b560589..cba681a64 100644 --- a/color.c +++ b/color.c @@ -32,8 +32,8 @@ #include "context.h" #include "globals.h" #include "keymap.h" +#include "menu.h" #include "mutt_curses.h" -#include "mutt_menu.h" #include "options.h" #include "pattern.h" #include "protos.h" diff --git a/color.h b/color.h index bfc96a5e7..a42df44a2 100644 --- a/color.h +++ b/color.h @@ -25,6 +25,7 @@ struct Buffer; +void ci_start_color(void); int mutt_alloc_color(int fg, int bg); int mutt_combine_color(int fg_attr, int bg_attr); void mutt_free_color(int fg, int bg); @@ -35,3 +36,4 @@ int mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned long data int mutt_parse_unmono(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err); #endif /* MUTT_COLOR_H */ + diff --git a/commands.c b/commands.c index 2e1dc52e0..560839890 100644 --- a/commands.c +++ b/commands.c @@ -37,21 +37,23 @@ #include "buffy.h" #include "context.h" #include "copy.h" +#include "curs_lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" +#include "hdrline.h" #include "keymap.h" #include "mailbox.h" +#include "menu.h" #include "mutt_curses.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" -#include "recvattach.h" #include "mx.h" #include "ncrypt/ncrypt.h" #include "options.h" #include "pager.h" #include "protos.h" +#include "recvattach.h" #include "sort.h" #ifdef USE_IMAP #include "imap/imap.h" @@ -65,13 +67,13 @@ /* These Config Variables are only used in commands.c */ unsigned char CryptVerifySig; /* verify PGP signatures */ -char * DisplayFilter; -bool PipeDecode; -char * PipeSep; -bool PipeSplit; -bool PrintDecode; -bool PrintSplit; -bool PromptAfter; +char *DisplayFilter; +bool PipeDecode; +char *PipeSep; +bool PipeSplit; +bool PrintDecode; +bool PrintSplit; +bool PromptAfter; static const char *ExtPagerProgress = "all"; diff --git a/commands.h b/commands.h index 4dfdecd21..ec60d6381 100644 --- a/commands.h +++ b/commands.h @@ -23,6 +23,7 @@ #ifndef MUTT_COMMANDS_H #define MUTT_COMMANDS_H +#include #include struct Body; @@ -49,8 +50,9 @@ int mutt_edit_content_type(struct Header *h, struct Body *b, FILE *fp); void mutt_enter_command(void); void mutt_pipe_message(struct Header *h); void mutt_print_message(struct Header *h); -int mutt_save_message_ctx(struct Header *h, int delete, int decode, int decrypt, struct Context *ctx); +int mutt_save_message_ctx(struct Header *h, int delete, int decode, int decrypt, struct Context *ctx); int mutt_save_message(struct Header *h, int delete, int decode, int decrypt); +int mutt_select_sort(int reverse); void mutt_shell_escape(void); void mutt_version(void); diff --git a/compose.c b/compose.c index f81e18cb9..47bf8aac9 100644 --- a/compose.c +++ b/compose.c @@ -35,16 +35,20 @@ #include "mutt.h" #include "alias.h" #include "context.h" +#include "curs_lib.h" +#include "curs_main.h" +#include "edit.h" #include "format_flags.h" #include "globals.h" #include "keymap.h" #include "mailbox.h" +#include "menu.h" #include "mutt_attach.h" #include "mutt_curses.h" #include "mutt_header.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "mx.h" #include "ncrypt/ncrypt.h" #include "opcodes.h" @@ -63,8 +67,8 @@ #endif /* These Config Variables are only used in compose.c */ -char * ComposeFormat; -char * Ispell; +char *ComposeFormat; +char *Ispell; unsigned char Postpone; static const char *There_are_no_attachments = N_("There are no attachments."); diff --git a/compose.h b/compose.h index 7642b8ec2..54dc8e023 100644 --- a/compose.h +++ b/compose.h @@ -23,9 +23,16 @@ #ifndef MUTT_COMPOSE_H #define MUTT_COMPOSE_H +#include + +struct Header; + /* These Config Variables are only used in compose.c */ extern char * ComposeFormat; extern char * Ispell; extern unsigned char Postpone; +int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen, struct Header *cur, int flags); + #endif /* MUTT_COMPOSE_H */ + diff --git a/compress.c b/compress.c index a94ae753d..8fac96c7a 100644 --- a/compress.c +++ b/compress.c @@ -42,6 +42,7 @@ #include "globals.h" #include "mailbox.h" #include "mutt_curses.h" +#include "muttlib.h" #include "mx.h" #include "options.h" #include "protos.h" diff --git a/conn/conn_globals.c b/conn/conn_globals.c index 892e0a12f..1a0a52bde 100644 --- a/conn/conn_globals.c +++ b/conn/conn_globals.c @@ -58,4 +58,3 @@ extern bool SslUseTlsv11; extern bool SslUseTlsv12; extern bool SslVerifyDates; extern bool SslVerifyHost; - diff --git a/conn/ssl.c b/conn/ssl.c index e1915d799..de4334985 100644 --- a/conn/ssl.c +++ b/conn/ssl.c @@ -58,9 +58,9 @@ #include "connection.h" #include "globals.h" #include "keymap.h" +#include "menu.h" #include "mutt_account.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "opcodes.h" #include "options.h" #include "protos.h" diff --git a/conn/ssl_gnutls.c b/conn/ssl_gnutls.c index e50fc727b..20b905b6e 100644 --- a/conn/ssl_gnutls.c +++ b/conn/ssl_gnutls.c @@ -42,8 +42,8 @@ #include "conn_globals.h" #include "connection.h" #include "keymap.h" +#include "menu.h" #include "mutt_account.h" -#include "mutt_menu.h" #include "opcodes.h" #include "options.h" #include "protos.h" diff --git a/copy.c b/copy.c index c786a953b..85dce0259 100644 --- a/copy.c +++ b/copy.c @@ -38,8 +38,10 @@ #include "context.h" #include "globals.h" #include "handler.h" +#include "hdrline.h" #include "mailbox.h" #include "mutt_window.h" +#include "muttlib.h" #include "mx.h" #include "ncrypt/ncrypt.h" #include "options.h" diff --git a/curs_lib.c b/curs_lib.c index 13f292290..89a40564d 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -39,13 +39,15 @@ #include "mutt/mutt.h" #include "email/email.h" #include "mutt.h" +#include "curs_lib.h" #include "browser.h" #include "context.h" +#include "curs_lib.h" #include "enter_state.h" #include "globals.h" +#include "menu.h" #include "mutt_curses.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" #include "opcodes.h" #include "options.h" diff --git a/curs_lib.h b/curs_lib.h index 2e9e187fd..a16f02327 100644 --- a/curs_lib.h +++ b/curs_lib.h @@ -28,28 +28,40 @@ #include struct Context; +struct Pager; /* These Config Variables are only used in curs_lib.c */ extern bool MetaKey; /**< interpret ALT-x as ESC-x */ -bool message_is_tagged(struct Context *ctx, int index); -bool message_is_visible(struct Context *ctx, int index); -int mutt_addwch(wchar_t wc); -int mutt_any_key_to_continue(const char *s); -void mutt_edit_file(const char *editor, const char *data); -int mutt_enter_fname_full(const char *prompt, char *buf, size_t blen, int buffy, int multiple, char ***files, int *numfiles, int flags); -void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s); -void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s); -int mutt_get_field_full(const char *field, char *buf, size_t buflen, int complete, int multiple, char ***files, int *numfiles); -int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags); -int mutt_multi_choice(char *prompt, char *letters); -void mutt_paddstr(int n, const char *s); -void mutt_perror_debug(const char *s); -void mutt_query_exit(void); -void mutt_show_error(void); -void mutt_simple_format(char *buf, size_t buflen, int min_width, int max_width, int justify, char pad_char, const char *s, size_t n, int arboreal); -int mutt_strwidth(const char *s); -size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width); -int mutt_yesorno(const char *msg, int def); +bool message_is_tagged(struct Context *ctx, int index); +bool message_is_visible(struct Context *ctx, int index); +int mutt_addwch(wchar_t wc); +int mutt_any_key_to_continue(const char *s); +int mutt_do_pager(const char *banner, const char *tempfile, int do_color, struct Pager *info); +void mutt_edit_file(const char *editor, const char *data); +void mutt_endwin(void); +int mutt_enter_fname_full(const char *prompt, char *buf, size_t blen, int buffy, int multiple, char ***files, int *numfiles, int flags); +void mutt_flushinp(void); +void mutt_flush_macro_to_endcond(void); +void mutt_flush_unget_to_endcond(void); +void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s); +void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s); +struct Event mutt_getch(void); +int mutt_get_field_full(const char *field, char *buf, size_t buflen, int complete, int multiple, char ***files, int *numfiles); +int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags); +int mutt_multi_choice(char *prompt, char *letters); +void mutt_need_hard_redraw(void); +void mutt_paddstr(int n, const char *s); +void mutt_perror_debug(const char *s); +void mutt_push_macro_event(int ch, int op); +void mutt_query_exit(void); +void mutt_refresh(void); +void mutt_show_error(void); +void mutt_simple_format(char *buf, size_t buflen, int min_width, int max_width, int justify, char pad_char, const char *s, size_t n, int arboreal); +int mutt_strwidth(const char *s); +void mutt_unget_event(int ch, int op); +void mutt_unget_string(char *s); +size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width); +int mutt_yesorno(const char *msg, int def); #endif /* MUTT_CURS_LIB_H */ diff --git a/curs_main.c b/curs_main.c index 3531b16e8..6d46a3be1 100644 --- a/curs_main.c +++ b/curs_main.c @@ -32,18 +32,22 @@ #include "email/email.h" #include "conn/conn.h" #include "mutt.h" +#include "curs_main.h" #include "alias.h" #include "browser.h" #include "buffy.h" +#include "commands.h" #include "context.h" +#include "curs_lib.h" #include "format_flags.h" #include "globals.h" +#include "hdrline.h" #include "keymap.h" #include "mailbox.h" +#include "menu.h" #include "mutt_curses.h" #include "mutt_header.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_thread.h" #include "mutt_window.h" #include "mx.h" @@ -54,8 +58,11 @@ #include "pattern.h" #include "progress.h" #include "protos.h" +#include "query.h" #include "recvattach.h" +#include "score.h" #include "sort.h" +#include "status.h" #include "terminal.h" #ifdef USE_SIDEBAR #include "sidebar.h" @@ -77,14 +84,14 @@ #endif /* These Config Variables are only used in curs_main.c */ -bool ChangeFolderNext; -bool CollapseAll; -bool CollapseFlagged; -bool CollapseUnread; +bool ChangeFolderNext; +bool CollapseAll; +bool CollapseFlagged; +bool CollapseUnread; char *MarkMacroPrefix; -bool PgpAutoDecode; -bool UncollapseJump; -bool UncollapseNew; +bool PgpAutoDecode; +bool UncollapseJump; +bool UncollapseNew; static const char *No_mailbox_is_open = N_("No mailbox is open."); static const char *There_are_no_messages = N_("There are no messages."); diff --git a/curs_main.h b/curs_main.h index dcafa39c5..839ccb630 100644 --- a/curs_main.h +++ b/curs_main.h @@ -23,6 +23,13 @@ #ifndef MUTT_CURS_MAIN_H #define MUTT_CURS_MAIN_H +#include +#include + +struct Context; +struct Header; +struct Menu; + /* These Config Variables are only used in curs_main.c */ extern bool ChangeFolderNext; extern bool CollapseAll; @@ -33,4 +40,11 @@ extern bool PgpAutoDecode; extern bool UncollapseJump; extern bool UncollapseNew; +int index_color(int index_no); +void index_make_entry(char *buf, size_t buflen, struct Menu *menu, int num); +void mutt_draw_statusline(int cols, const char *buf, size_t buflen); +int mutt_index_menu(void); +void mutt_set_header_color(struct Context *ctx, struct Header *curhdr); +void update_index(struct Menu *menu, struct Context *ctx, int check, int oldcount, int index_hint); + #endif /* MUTT_CURS_MAIN_H */ diff --git a/edit.c b/edit.c index 9f03adb00..0a9c5d147 100644 --- a/edit.c +++ b/edit.c @@ -35,6 +35,7 @@ #include "alias.h" #include "context.h" #include "globals.h" +#include "hdrline.h" #include "mutt_curses.h" #include "mutt_header.h" #include "mutt_window.h" diff --git a/edit.h b/edit.h index dc61ca75e..934386095 100644 --- a/edit.h +++ b/edit.h @@ -23,7 +23,11 @@ #ifndef MUTT_EDIT_H #define MUTT_EDIT_H +struct Header; + /* These Config Variables are only used in edit.c */ extern char *Escape; +int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur); + #endif /* MUTT_EDIT_H */ diff --git a/enter.c b/enter.c index 37ddc2f82..b13acb8e3 100644 --- a/enter.c +++ b/enter.c @@ -38,6 +38,7 @@ #include "alias.h" #include "browser.h" #include "buffy.h" +#include "curs_lib.h" #include "enter_state.h" #include "globals.h" #include "history.h" @@ -46,6 +47,7 @@ #include "mutt_window.h" #include "opcodes.h" #include "protos.h" +#include "query.h" /** * enum RedrawFlags - redraw flags for mutt_enter_string_full() diff --git a/flags.c b/flags.c index ba8d6a38e..1f4419c2f 100644 --- a/flags.c +++ b/flags.c @@ -33,9 +33,11 @@ #include "email/email.h" #include "mutt.h" #include "context.h" +#include "curs_lib.h" +#include "curs_main.h" #include "globals.h" +#include "menu.h" #include "mutt_curses.h" -#include "mutt_menu.h" #include "mutt_window.h" #include "mx.h" #include "options.h" diff --git a/format_flags.h b/format_flags.h index 1adb636c3..e19e62d05 100644 --- a/format_flags.h +++ b/format_flags.h @@ -45,8 +45,4 @@ typedef const char *format_t(char *buf, size_t buflen, size_t col, int cols, const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags); -void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, - const char *src, format_t *callback, - unsigned long data, enum FormatFlag flags); - #endif /* _MUTT_FORMAT_FLAGS_H */ diff --git a/handler.c b/handler.c index e945f4474..7fa4faa13 100644 --- a/handler.c +++ b/handler.c @@ -56,11 +56,11 @@ #endif /* These Config Variables are only used in handler.c */ -bool HonorDisposition; -bool ImplicitAutoview; -bool IncludeOnlyfirst; +bool HonorDisposition; +bool ImplicitAutoview; +bool IncludeOnlyfirst; char *PreferredLanguages; -bool ReflowText; +bool ReflowText; char *ShowMultipartAlternative; #define BUFI_SIZE 1000 diff --git a/hdrline.c b/hdrline.c index c70af2a43..e41db6e3f 100644 --- a/hdrline.c +++ b/hdrline.c @@ -40,6 +40,7 @@ #include "mutt_curses.h" #include "mutt_thread.h" #include "mutt_window.h" +#include "muttlib.h" #include "ncrypt/ncrypt.h" #include "options.h" #include "protos.h" diff --git a/hdrline.h b/hdrline.h index f8cb07be7..2863b99ab 100644 --- a/hdrline.h +++ b/hdrline.h @@ -23,9 +23,25 @@ #ifndef MUTT_HDRLINE_H #define MUTT_HDRLINE_H +#include +#include +#include "format_flags.h" + +struct Address; +struct Context; +struct Header; +struct HdrFormatInfo; + /* These Config Variables are only used in hdrline.c */ extern struct MbTable *FlagChars; extern struct MbTable *FromChars; extern struct MbTable *ToChars; +bool mutt_is_mail_list(struct Address *addr); +bool mutt_is_subscribed_list(struct Address *addr); +void mutt_make_string_flags(char *buf, size_t buflen, const char *s, struct Context *ctx, struct Header *hdr, enum FormatFlag flags); +void mutt_make_string_info(char *buf, size_t buflen, int cols, const char *s, struct HdrFormatInfo *hfi, enum FormatFlag flags); + +#define mutt_make_string(A, B, C, D, E) mutt_make_string_flags(A, B, C, D, E, 0) + #endif /* MUTT_HDRLINE_H */ diff --git a/help.c b/help.c index 9c42ed402..743df7d56 100644 --- a/help.c +++ b/help.c @@ -28,6 +28,7 @@ #include #include #include "mutt/mutt.h" +#include "curs_lib.h" #include "globals.h" #include "keymap.h" #include "mutt_window.h" diff --git a/history.c b/history.c index 61be6daed..6f07cac4d 100644 --- a/history.c +++ b/history.c @@ -80,15 +80,16 @@ #include "history.h" #include "format_flags.h" #include "keymap.h" -#include "mutt_menu.h" +#include "menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "opcodes.h" #include "protos.h" /* These Config Variables are only used in history.c */ short History; char *HistoryFile; -bool HistoryRemoveDups; +bool HistoryRemoveDups; short SaveHistory; #define HC_FIRST HC_CMD diff --git a/hook.c b/hook.c index e79017054..2286358e1 100644 --- a/hook.c +++ b/hook.c @@ -38,6 +38,7 @@ #include "mutt.h" #include "alias.h" #include "globals.h" +#include "hdrline.h" #include "mailbox.h" #include "ncrypt/ncrypt.h" #include "options.h" @@ -51,8 +52,8 @@ struct Context; /* These Config Variables are only used in hook.c */ char *DefaultHook; -bool ForceName; -bool SaveName; +bool ForceName; +bool SaveName; /** * struct Hook - A list of user hooks diff --git a/hook.h b/hook.h index cd4f870fa..97845db95 100644 --- a/hook.h +++ b/hook.h @@ -23,6 +23,7 @@ #ifndef MUTT_HOOK_H #define MUTT_HOOK_H +#include #include struct Address; diff --git a/imap/command.c b/imap/command.c index fd8ab1a76..0cf105ad7 100644 --- a/imap/command.c +++ b/imap/command.c @@ -46,10 +46,10 @@ #include "globals.h" #include "imap/imap.h" #include "mailbox.h" +#include "menu.h" #include "message.h" #include "mutt_account.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_socket.h" #include "mx.h" #include "options.h" diff --git a/imap/util.c b/imap/util.c index 0546e6364..10f403954 100644 --- a/imap/util.c +++ b/imap/util.c @@ -800,9 +800,10 @@ void imap_qualify_path(char *dest, size_t len, struct ImapMbox *mx, char *path) /** * imap_quote_string - quote string according to IMAP rules - * @param dest Buffer for the result - * @param dlen Length of the buffer - * @param src String to be quoted + * @param dest Buffer for the result + * @param dlen Length of the buffer + * @param src String to be quoted + * @param quote_backtick If true, quote backticks too * * Surround string with quotes, escape " and \ with backslash */ diff --git a/init.c b/init.c index d2c353445..952b56026 100644 --- a/init.c +++ b/init.c @@ -47,8 +47,8 @@ #include "keymap.h" #include "mailbox.h" #include "mbtable.h" +#include "menu.h" #include "mutt_curses.h" -#include "mutt_menu.h" #include "mutt_window.h" #include "mx.h" #include "myvar.h" diff --git a/keymap.c b/keymap.c index e2efdceff..8035d3b80 100644 --- a/keymap.c +++ b/keymap.c @@ -31,6 +31,7 @@ #include "mutt/mutt.h" #include "mutt.h" #include "keymap.h" +#include "curs_lib.h" #include "functions.h" #include "globals.h" #include "mutt_curses.h" diff --git a/maildir/mh.c b/maildir/mh.c index c36629f97..3e7d9cce4 100644 --- a/maildir/mh.c +++ b/maildir/mh.c @@ -61,9 +61,9 @@ #endif /* These Config Variables are only used in maildir/mh.c */ -bool CheckNew; -bool MaildirHeaderCacheVerify; -bool MhPurge; +bool CheckNew; +bool MaildirHeaderCacheVerify; +bool MhPurge; char *MhSeqFlagged; char *MhSeqReplied; char *MhSeqUnseen; diff --git a/main.c b/main.c index 489414db4..20fad6f73 100644 --- a/main.c +++ b/main.c @@ -48,6 +48,9 @@ #include "alias.h" #include "browser.h" #include "buffy.h" +#include "color.h" +#include "curs_lib.h" +#include "curs_main.h" #include "globals.h" #include "keymap.h" #include "mailbox.h" diff --git a/main.h b/main.h index bef7ce331..98f8dc443 100644 --- a/main.h +++ b/main.h @@ -23,7 +23,11 @@ #ifndef MUTT_MAIN_H #define MUTT_MAIN_H +#include + /* These Config Variables are only used in main.c */ extern bool ResumeEditedDraftFiles; +void mutt_exit(int code); + #endif /* MUTT_MAIN_H */ diff --git a/menu.c b/menu.c index 8a19ef767..12f32cc91 100644 --- a/menu.c +++ b/menu.c @@ -30,12 +30,13 @@ #include "mutt/mutt.h" #include "email/email.h" #include "mutt.h" +#include "menu.h" #include "context.h" +#include "curs_lib.h" #include "globals.h" #include "keymap.h" #include "mutt_curses.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" #include "opcodes.h" #include "options.h" @@ -47,8 +48,8 @@ /* These Config Variables are only used in menu.c */ short MenuContext; -bool MenuMoveOff; /**< allow menu to scroll past last entry */ -bool MenuScroll; /**< scroll menu instead of implicit next-page */ +bool MenuMoveOff; /**< allow menu to scroll past last entry */ +bool MenuScroll; /**< scroll menu instead of implicit next-page */ char *SearchBuffers[MENU_MAX]; diff --git a/menu.h b/menu.h index 622b5e576..73ac94130 100644 --- a/menu.h +++ b/menu.h @@ -23,9 +23,117 @@ #ifndef MUTT_MENU_H #define MUTT_MENU_H +#include +#include +#include + /* These Config Variables are only used in menu.c */ extern short MenuContext; extern bool MenuMoveOff; /**< allow menu to scroll past last entry */ extern bool MenuScroll; /**< scroll menu instead of implicit next-page */ +#define REDRAW_INDEX (1 << 0) +#define REDRAW_MOTION (1 << 1) +#define REDRAW_MOTION_RESYNCH (1 << 2) +#define REDRAW_CURRENT (1 << 3) +#define REDRAW_STATUS (1 << 4) +#define REDRAW_FULL (1 << 5) +#define REDRAW_BODY (1 << 6) +#define REDRAW_FLOW (1 << 7) /* Used by pager to reflow text */ +#ifdef USE_SIDEBAR +#define REDRAW_SIDEBAR (1 << 8) +#endif + +#define MUTT_MODEFMT "-- NeoMutt: %s" + +/** + * struct Menu - GUI selectable list of items + */ +struct Menu +{ + char *title; /**< the title of this menu */ + char *help; /**< quickref for the current menu */ + void *data; /**< extra data for the current menu */ + int current; /**< current entry */ + int max; /**< the number of entries in the menu */ + int redraw; /**< when to redraw the screen */ + int menu; /**< menu definition for keymap entries. */ + int offset; /**< row offset within the window to start the index */ + int pagelen; /**< number of entries per screen */ + bool tagprefix : 1; + bool is_mailbox_list : 1; + struct MuttWindow *indexwin; + struct MuttWindow *statuswin; + struct MuttWindow *helpwin; + struct MuttWindow *messagewin; + + /* Setting dialog != NULL overrides normal menu behavior. + * In dialog mode menubar is hidden and prompt keys are checked before + * normal menu movement keys. This can cause problems with scrolling, if + * prompt keys override movement keys. + */ + char **dialog; /**< dialog lines themselves */ + char *prompt; /**< prompt for user, similar to mutt_multi_choice */ + char *keys; /**< keys used in the prompt */ + + /* callback to generate an index line for the requested element */ + void (*make_entry)(char *buf, size_t buflen, struct Menu *menu, int num); + + /* how to search the menu */ + int (*search)(struct Menu *, regex_t *re, int n); + + int (*tag)(struct Menu *, int i, int m); + + /* these are used for custom redrawing callbacks */ + void (*custom_menu_redraw)(struct Menu *); + void *redraw_data; + + /* color pair to be used for the requested element + * (default function returns ColorDefs[MT_COLOR_NORMAL]) + */ + int (*color)(int i); + + /* the following are used only by mutt_menu_loop() */ + int top; /**< entry that is the top of the current page */ + int oldcurrent; /**< for driver use only. */ + int search_dir; /**< direction of search */ + int tagged; /**< number of tagged entries */ +}; + +void menu_bottom_page(struct Menu *menu); +void menu_check_recenter(struct Menu *menu); +void menu_current_bottom(struct Menu *menu); +void menu_current_middle(struct Menu *menu); +void menu_current_top(struct Menu *menu); +void menu_first_entry(struct Menu *menu); +void menu_half_down(struct Menu *menu); +void menu_half_up(struct Menu *menu); +void menu_last_entry(struct Menu *menu); +void menu_middle_page(struct Menu *menu); +void menu_next_line(struct Menu *menu); +void menu_next_page(struct Menu *menu); +void menu_prev_line(struct Menu *menu); +void menu_prev_page(struct Menu *menu); +void menu_redraw_current(struct Menu *menu); +void menu_redraw_full(struct Menu *menu); +void menu_redraw_index(struct Menu *menu); +void menu_redraw_motion(struct Menu *menu); +#ifdef USE_SIDEBAR +void menu_redraw_sidebar(struct Menu *menu); +#endif +void menu_redraw_status(struct Menu *menu); +int menu_redraw(struct Menu *menu); +void menu_top_page(struct Menu *menu); +void mutt_menu_current_redraw(void); +void mutt_menu_destroy(struct Menu **p); +void mutt_menu_init(void); +int mutt_menu_loop(struct Menu *menu); +struct Menu *mutt_menu_new(int menu); +void mutt_menu_pop_current(struct Menu *menu); +void mutt_menu_push_current(struct Menu *menu); +void mutt_menu_set_current_redraw_full(void); +void mutt_menu_set_current_redraw(int redraw); +void mutt_menu_set_redraw_full(int menu_type); +void mutt_menu_set_redraw(int menu_type, int redraw); + #endif /* MUTT_MENU_H */ diff --git a/mutt.h b/mutt.h index 95bb33636..e198d9d36 100644 --- a/mutt.h +++ b/mutt.h @@ -28,7 +28,7 @@ #include #include #include -#include "where.h" +#include struct Buffer; struct ListHead; @@ -260,8 +260,6 @@ enum QuadOptionResponse #define MUTT_SPAM 1 #define MUTT_NOSPAM 2 -bool mutt_matches_ignore(const char *s); - int mutt_init(bool skip_sys_rc, struct ListHead *commands); /* flag to mutt_pattern_comp() */ diff --git a/mutt_attach.c b/mutt_attach.c index b58816fed..f7550165b 100644 --- a/mutt_attach.c +++ b/mutt_attach.c @@ -34,13 +34,14 @@ #include "mutt/mutt.h" #include "email/email.h" #include "mutt.h" +#include "mutt_attach.h" #include "context.h" #include "copy.h" +#include "curs_lib.h" #include "filter.h" #include "globals.h" #include "handler.h" #include "mailbox.h" -#include "mutt_attach.h" #include "mutt_curses.h" #include "mx.h" #include "ncrypt/ncrypt.h" diff --git a/mutt_curses.h b/mutt_curses.h index edec65212..6523c8e9a 100644 --- a/mutt_curses.h +++ b/mutt_curses.h @@ -111,18 +111,7 @@ struct Event int op; /**< function op */ }; -struct Event mutt_getch(void); - -void mutt_endwin(void); -void mutt_flushinp(void); -void mutt_refresh(void); void mutt_resize_screen(void); -void mutt_unget_event(int ch, int op); -void mutt_unget_string(char *s); -void mutt_push_macro_event(int ch, int op); -void mutt_flush_macro_to_endcond(void); -void mutt_flush_unget_to_endcond(void); -void mutt_need_hard_redraw(void); /* ---------------------------------------------------------------------------- * Support for color @@ -214,8 +203,6 @@ extern struct ColorLineHead ColorIndexFlagsList; extern struct ColorLineHead ColorIndexSubjectList; extern struct ColorLineHead ColorIndexTagList; -void ci_start_color(void); - /* If the system has bkgdset() use it rather than attrset() so that the clr*() * functions will properly set the background attributes all the way to the * right column. diff --git a/mutt_header.c b/mutt_header.c index 3abbf0af3..d0f92e471 100644 --- a/mutt_header.c +++ b/mutt_header.c @@ -32,6 +32,7 @@ #include "mutt.h" #include "alias.h" #include "context.h" +#include "curs_main.h" #include "globals.h" #include "ncrypt/ncrypt.h" #include "options.h" diff --git a/mutt_logging.c b/mutt_logging.c index 7e1b8f20f..b3108679f 100644 --- a/mutt_logging.c +++ b/mutt_logging.c @@ -37,6 +37,7 @@ #include #include "mutt/mutt.h" #include "mutt.h" +#include "curs_lib.h" #include "globals.h" #include "mutt_curses.h" #include "mutt_window.h" diff --git a/mutt_menu.h b/mutt_menu.h deleted file mode 100644 index 998a4420b..000000000 --- a/mutt_menu.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * @file - * GUI handling of selectable lists - * - * @authors - * Copyright (C) 1996-2000 Michael R. Elkins - * - * @copyright - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 2 of the License, or (at your option) any later - * version. - * - * 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 . - */ - -#ifndef _MUTT_MENU_H -#define _MUTT_MENU_H - -#include -#include -#include - -#define REDRAW_INDEX (1 << 0) -#define REDRAW_MOTION (1 << 1) -#define REDRAW_MOTION_RESYNCH (1 << 2) -#define REDRAW_CURRENT (1 << 3) -#define REDRAW_STATUS (1 << 4) -#define REDRAW_FULL (1 << 5) -#define REDRAW_BODY (1 << 6) -#define REDRAW_FLOW (1 << 7) /* Used by pager to reflow text */ -#ifdef USE_SIDEBAR -#define REDRAW_SIDEBAR (1 << 8) -#endif - -#define MUTT_MODEFMT "-- NeoMutt: %s" - -/** - * struct Menu - GUI selectable list of items - */ -struct Menu -{ - char *title; /**< the title of this menu */ - char *help; /**< quickref for the current menu */ - void *data; /**< extra data for the current menu */ - int current; /**< current entry */ - int max; /**< the number of entries in the menu */ - int redraw; /**< when to redraw the screen */ - int menu; /**< menu definition for keymap entries. */ - int offset; /**< row offset within the window to start the index */ - int pagelen; /**< number of entries per screen */ - bool tagprefix : 1; - bool is_mailbox_list : 1; - struct MuttWindow *indexwin; - struct MuttWindow *statuswin; - struct MuttWindow *helpwin; - struct MuttWindow *messagewin; - - /* Setting dialog != NULL overrides normal menu behavior. - * In dialog mode menubar is hidden and prompt keys are checked before - * normal menu movement keys. This can cause problems with scrolling, if - * prompt keys override movement keys. - */ - char **dialog; /**< dialog lines themselves */ - char *prompt; /**< prompt for user, similar to mutt_multi_choice */ - char *keys; /**< keys used in the prompt */ - - /* callback to generate an index line for the requested element */ - void (*make_entry)(char *buf, size_t buflen, struct Menu *menu, int num); - - /* how to search the menu */ - int (*search)(struct Menu *, regex_t *re, int n); - - int (*tag)(struct Menu *, int i, int m); - - /* these are used for custom redrawing callbacks */ - void (*custom_menu_redraw)(struct Menu *); - void *redraw_data; - - /* color pair to be used for the requested element - * (default function returns ColorDefs[MT_COLOR_NORMAL]) - */ - int (*color)(int i); - - /* the following are used only by mutt_menu_loop() */ - int top; /**< entry that is the top of the current page */ - int oldcurrent; /**< for driver use only. */ - int search_dir; /**< direction of search */ - int tagged; /**< number of tagged entries */ -}; - -int menu_redraw(struct Menu *menu); -void menu_bottom_page(struct Menu *menu); -void menu_check_recenter(struct Menu *menu); -void menu_current_bottom(struct Menu *menu); -void menu_current_middle(struct Menu *menu); -void menu_current_top(struct Menu *menu); -void menu_first_entry(struct Menu *menu); -void menu_half_down(struct Menu *menu); -void menu_half_up(struct Menu *menu); -void menu_last_entry(struct Menu *menu); -void menu_middle_page(struct Menu *menu); -void menu_next_line(struct Menu *menu); -void menu_next_page(struct Menu *menu); -void menu_prev_line(struct Menu *menu); -void menu_prev_page(struct Menu *menu); -void menu_redraw_current(struct Menu *menu); -void menu_redraw_full(struct Menu *menu); -void menu_redraw_index(struct Menu *menu); -void menu_redraw_motion(struct Menu *menu); -#ifdef USE_SIDEBAR -void menu_redraw_sidebar(struct Menu *menu); -#endif -void menu_redraw_status(struct Menu *menu); -void menu_status_line(char *buf, size_t buflen, struct Menu *menu, const char *p); -void menu_top_page(struct Menu *menu); - -void mutt_menu_current_redraw(void); -void mutt_menu_destroy(struct Menu **p); -void mutt_menu_init(void); -int mutt_menu_loop(struct Menu *menu); -struct Menu *mutt_menu_new(int menu); -void mutt_menu_pop_current(struct Menu *menu); -void mutt_menu_push_current(struct Menu *menu); -void mutt_menu_set_current_redraw_full(void); -void mutt_menu_set_current_redraw(int redraw); -void mutt_menu_set_redraw_full(int menu_type); -void mutt_menu_set_redraw(int menu_type, int redraw); - -/* used in both the index and pager index to make an entry. */ -void index_make_entry(char *buf, size_t buflen, struct Menu *menu, int num); -int index_color(int index_no); - -#endif /* _MUTT_MENU_H */ diff --git a/mutt_window.c b/mutt_window.c index a63baf1c6..c997f244c 100644 --- a/mutt_window.c +++ b/mutt_window.c @@ -32,7 +32,7 @@ #include "mutt/mutt.h" #include "mutt_window.h" #include "globals.h" -#include "mutt_menu.h" +#include "menu.h" #include "options.h" struct MuttWindow *MuttHelpWindow = NULL; /**< Help Window */ diff --git a/muttlib.c b/muttlib.c index 7533f4899..5dcb9c2a7 100644 --- a/muttlib.c +++ b/muttlib.c @@ -40,6 +40,7 @@ #include "conn/conn.h" #include "mutt.h" #include "alias.h" +#include "curs_lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/muttlib.h b/muttlib.h index 1f459f029..14395d007 100644 --- a/muttlib.h +++ b/muttlib.h @@ -27,6 +27,7 @@ #include #include #include +#include "format_flags.h" struct Address; struct Body; @@ -42,6 +43,7 @@ int mutt_check_overwrite(const char *attname, const char *path, char *fn void mutt_encode_path(char *dest, size_t dlen, const char *src); void mutt_expand_file_fmt(char *dest, size_t destlen, const char *fmt, const char *src); void mutt_expand_fmt(char *dest, size_t destlen, const char *fmt, const char *src); +void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, unsigned long data, enum FormatFlag flags); char * mutt_expand_path(char *s, size_t slen); char * mutt_expand_path_regex(char *s, size_t slen, bool regex); char * mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw); @@ -49,6 +51,7 @@ void mutt_get_parent_path(char *output, char *path, size_t olen); int mutt_inbox_cmp(const char *a, const char *b); bool mutt_is_text_part(struct Body *b); const char *mutt_make_version(void); +bool mutt_matches_ignore(const char *s); void mutt_mktemp_full(char *s, size_t slen, const char *prefix, const char *suffix, const char *src, int line); bool mutt_needs_mailcap(struct Body *m); FILE * mutt_open_read(const char *path, pid_t *thepid); diff --git a/mx.c b/mx.c index 92e55177b..0ab89be52 100644 --- a/mx.c +++ b/mx.c @@ -57,6 +57,7 @@ #include "options.h" #include "pattern.h" #include "protos.h" +#include "score.h" #include "sort.h" #include "url.h" #ifdef USE_SIDEBAR @@ -83,9 +84,9 @@ /* These Config Variables are only used in mx.c */ unsigned char CatchupNewsgroup; -bool KeepFlagged; +bool KeepFlagged; unsigned char Move; -char * Trash; +char *Trash; /** * mx_get_ops - Get mailbox operations diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index 3c4b49407..008921aaf 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -45,6 +45,7 @@ #include "context.h" #include "copy.h" #include "cryptglue.h" +#include "curs_lib.h" #include "globals.h" #include "handler.h" #include "mutt_curses.h" @@ -54,14 +55,14 @@ #include "state.h" /* These Config Variables are only used in ncrypt/crypt.c */ -bool CryptTimestamp; +bool CryptTimestamp; unsigned char PgpEncryptSelf; unsigned char PgpMimeAuto; /* ask to revert to PGP/MIME when inline fails */ -bool PgpRetainableSigs; -bool PgpSelfEncrypt; -bool PgpStrictEnc; +bool PgpRetainableSigs; +bool PgpSelfEncrypt; +bool PgpStrictEnc; unsigned char SmimeEncryptSelf; -bool SmimeSelfEncrypt; +bool SmimeSelfEncrypt; /** * crypt_current_time - Print the current time diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 7cdd4c6cd..f5894af6e 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -53,15 +53,17 @@ #include "mutt.h" #include "alias.h" #include "crypt.h" +#include "curs_lib.h" #include "format_flags.h" #include "globals.h" #include "handler.h" #include "keymap.h" +#include "menu.h" #include "mutt_attach.h" #include "mutt_curses.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "ncrypt.h" #include "opcodes.h" #include "options.h" diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index 00b8f64bd..d3bfdda4e 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -47,6 +47,7 @@ #include "pgp.h" #include "crypt.h" #include "cryptglue.h" +#include "curs_lib.h" #include "filter.h" #include "globals.h" #include "handler.h" @@ -61,12 +62,12 @@ #include "state.h" /* These Config Variables are only used in ncrypt/pgp.c */ -bool PgpCheckExit; -bool PgpCheckGpgDecryptStatusFd; +bool PgpCheckExit; +bool PgpCheckGpgDecryptStatusFd; struct Regex *PgpDecryptionOkay; struct Regex *PgpGoodSign; -long PgpTimeout; -bool PgpUseGpgAgent; +long PgpTimeout; +bool PgpUseGpgAgent; char PgpPass[LONG_STRING]; time_t PgpExptime = 0; /* when does the cached passphrase expire? */ diff --git a/ncrypt/pgpinvoke.c b/ncrypt/pgpinvoke.c index 056c31ff7..223da3a4b 100644 --- a/ncrypt/pgpinvoke.c +++ b/ncrypt/pgpinvoke.c @@ -43,6 +43,7 @@ #include "mutt_curses.h" #include "mutt_logging.h" #include "mutt_window.h" +#include "muttlib.h" #include "ncrypt.h" #include "pgp.h" #include "pgpkey.h" diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index 247f7a4a2..6d36df92b 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -43,14 +43,16 @@ #include "mutt.h" #include "pgpkey.h" #include "crypt.h" +#include "curs_lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" #include "gnupgparse.h" #include "keymap.h" +#include "menu.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "ncrypt.h" #include "opcodes.h" #include "options.h" diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 9af789b29..fd72ff722 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -43,15 +43,17 @@ #include "copy.h" #include "crypt.h" #include "cryptglue.h" +#include "curs_lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" #include "handler.h" #include "keymap.h" +#include "menu.h" #include "mutt_curses.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "ncrypt.h" #include "opcodes.h" #include "options.h" @@ -59,11 +61,11 @@ #include "state.h" /* These Config Variables are only used in ncrypt/smime.c */ -bool SmimeAskCertLabel; +bool SmimeAskCertLabel; char *SmimeCaLocation; char *SmimeCertificates; char *SmimeDecryptCommand; -bool SmimeDecryptUseDefaultKey; +bool SmimeDecryptUseDefaultKey; char *SmimeEncryptCommand; char *SmimeGetCertCommand; char *SmimeGetCertEmailCommand; @@ -73,7 +75,7 @@ char *SmimeKeys; char *SmimePk7outCommand; char *SmimeSignCommand; char *SmimeSignDigestAlg; -long SmimeTimeout; +long SmimeTimeout; char *SmimeVerifyCommand; char *SmimeVerifyOpaqueCommand; diff --git a/nntp/newsrc.c b/nntp/newsrc.c index 7c46404c2..9d535bd3b 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -50,6 +50,7 @@ #include "mutt_logging.h" #include "mutt_socket.h" #include "mutt_window.h" +#include "muttlib.h" #include "mx.h" #include "nntp.h" #include "options.h" diff --git a/nntp/nntp.c b/nntp/nntp.c index b603293a3..6ce1b9f67 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -67,10 +67,10 @@ /* These Config Variables are only used in nntp/nntp.c */ char *NntpAuthenticators; short NntpContext; -bool NntpListgroup; -bool NntpLoadDescription; +bool NntpListgroup; +bool NntpLoadDescription; short NntpPoll; -bool ShowNewNews; +bool ShowNewNews; struct NntpServer *CurrentNewsSrv; diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c index 77efaad8a..d5bb03bce 100644 --- a/notmuch/mutt_notmuch.c +++ b/notmuch/mutt_notmuch.c @@ -52,6 +52,7 @@ #include "mutt_notmuch.h" #include "buffy.h" #include "context.h" +#include "curs_main.h" #include "globals.h" #include "mailbox.h" #include "maildir/maildir.h" @@ -63,12 +64,12 @@ #include "url.h" /* These Config Variables are only used in notmuch/mutt_notmuch.c */ -int NmDbLimit; +int NmDbLimit; char *NmDefaultUri; char *NmExcludeTags; -int NmOpenTimeout; +int NmOpenTimeout; char *NmQueryType; -int NmQueryWindowCurrentPosition; +int NmQueryWindowCurrentPosition; char *NmQueryWindowTimebase; char *NmRecordTags; char *NmUnreadTag; diff --git a/pager.c b/pager.c index bdd61871b..5c88916d1 100644 --- a/pager.c +++ b/pager.c @@ -37,16 +37,20 @@ #include "pager.h" #include "alias.h" #include "buffy.h" +#include "commands.h" #include "context.h" +#include "curs_lib.h" +#include "curs_main.h" #include "format_flags.h" #include "globals.h" +#include "hdrline.h" #include "keymap.h" #include "mailbox.h" +#include "menu.h" #include "mutt_attach.h" #include "mutt_curses.h" #include "mutt_header.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" #include "mx.h" #include "ncrypt/ncrypt.h" @@ -56,6 +60,7 @@ #include "recvattach.h" #include "recvcmd.h" #include "sort.h" +#include "status.h" #include "terminal.h" #ifdef USE_SIDEBAR #include "sidebar.h" @@ -68,16 +73,16 @@ #endif /* These Config Variables are only used in pager.c */ -bool AllowAnsi; -bool HeaderColorPartial; -short PagerContext; -short PagerIndexLines; -bool PagerStop; -short SearchContext; -short SkipQuotedOffset; -bool SmartWrap; +bool AllowAnsi; +bool HeaderColorPartial; +short PagerContext; +short PagerIndexLines; +bool PagerStop; +short SearchContext; +short SkipQuotedOffset; +bool SmartWrap; struct Regex *Smileys; -bool Tilde; +bool Tilde; #define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT) diff --git a/pager.h b/pager.h index aee0f589b..b3d74c8f1 100644 --- a/pager.h +++ b/pager.h @@ -71,9 +71,7 @@ struct Pager struct AttachCtx *actx; /**< attachment information */ }; -int mutt_do_pager(const char *banner, const char *tempfile, int do_color, struct Pager *info); int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *extra); -void update_index(struct Menu *menu, struct Context *ctx, int check, int oldcount, int index_hint); void mutt_clear_pager_position(void); diff --git a/parse.c b/parse.c index e5b63d321..02c7be884 100644 --- a/parse.c +++ b/parse.c @@ -33,6 +33,7 @@ #include "mutt.h" #include "globals.h" #include "mailbox.h" +#include "muttlib.h" #include "ncrypt/ncrypt.h" #include "options.h" #include "protos.h" diff --git a/pattern.c b/pattern.c index 8b6fba6ae..aa744cfd2 100644 --- a/pattern.c +++ b/pattern.c @@ -42,9 +42,10 @@ #include "globals.h" #include "group.h" #include "handler.h" +#include "hdrline.h" #include "mailbox.h" +#include "menu.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mx.h" #include "ncrypt/ncrypt.h" #include "opcodes.h" diff --git a/pop/pop.c b/pop/pop.c index ee6f05350..2c5a91311 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -63,10 +63,10 @@ #endif /* These Config Variables are only used in pop/pop.c */ -short PopCheckinterval; +short PopCheckinterval; unsigned char PopDelete; -char * PopHost; -bool PopLast; +char *PopHost; +bool PopLast; #ifdef USE_HCACHE #define HC_FNAME "neomutt" /* filename for hcache as POP lacks paths */ diff --git a/pop/pop_auth.c b/pop/pop_auth.c index 4c503835a..a089256ca 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -47,7 +47,7 @@ /* These Config Variables are only used in pop/pop_auth.c */ char *PopAuthenticators; -bool PopAuthTryAll; +bool PopAuthTryAll; #ifdef USE_SASL /** diff --git a/postpone.c b/postpone.c index 4d492cca0..eb918081e 100644 --- a/postpone.c +++ b/postpone.c @@ -43,10 +43,11 @@ #include "format_flags.h" #include "globals.h" #include "handler.h" +#include "hdrline.h" #include "keymap.h" #include "mailbox.h" +#include "menu.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_thread.h" #include "ncrypt/ncrypt.h" #include "opcodes.h" diff --git a/progress.c b/progress.c index 357b8135f..51c8fb7f0 100644 --- a/progress.c +++ b/progress.c @@ -34,10 +34,11 @@ #include #include "mutt/mutt.h" #include "mutt.h" -#include "mutt_logging.h" #include "progress.h" +#include "curs_lib.h" #include "globals.h" #include "mutt_curses.h" +#include "mutt_logging.h" #include "options.h" #include "protos.h" diff --git a/protos.h b/protos.h index cd4f3ba12..3fb7120de 100644 --- a/protos.h +++ b/protos.h @@ -30,7 +30,6 @@ #include #include #include "mutt.h" -#include "format_flags.h" struct Address; struct AliasList; @@ -46,10 +45,6 @@ struct ParameterList; struct stat; struct passwd; -#define mutt_make_string(A, B, C, D, E) mutt_make_string_flags(A, B, C, D, E, 0) -void mutt_make_string_flags(char *buf, size_t buflen, const char *s, - struct Context *ctx, struct Header *hdr, enum FormatFlag flags); - /** * struct HdrFormatInfo - Data passed to index_format_str() */ @@ -69,9 +64,6 @@ enum XdgType XDG_CONFIG_DIRS, }; -void mutt_make_string_info(char *buf, size_t buflen, int cols, const char *s, - struct HdrFormatInfo *hfi, enum FormatFlag flags); - int mutt_system(const char *cmd); void mutt_parse_content_type(char *s, struct Body *ct); @@ -121,10 +113,8 @@ void mutt_alias_menu(char *buf, size_t buflen, struct AliasList *aliases); int mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to); void mutt_check_stats(void); int mutt_count_body_parts(struct Context *ctx, struct Header *hdr); -void mutt_check_rescore(struct Context *ctx); void mutt_default_save(char *path, size_t pathlen, struct Header *hdr); void mutt_display_address(struct Envelope *env); -void mutt_draw_statusline(int cols, const char *buf, size_t buflen); int mutt_edit_content_type (struct Header *h, struct Body *b, FILE *fp); void mutt_edit_file(const char *editor, const char *data); void mutt_encode_descriptions(struct Body *b, short recurse); @@ -162,10 +152,8 @@ void mutt_pretty_mailbox(char *s, size_t buflen); void mutt_pipe_message(struct Header *h); void mutt_print_message(struct Header *h); void mutt_query_exit(void); -void mutt_query_menu(char *buf, size_t buflen); void mutt_safe_path(char *s, size_t l, struct Address *a); void mutt_save_path(char *d, size_t dsize, struct Address *a); -void mutt_score_message(struct Context *ctx, struct Header *hdr, bool upd_ctx); void mutt_select_fcc(char *path, size_t pathlen, struct Header *hdr); void mutt_message_hook(struct Context *ctx, struct Header *hdr, int type); void mutt_set_flag_update(struct Context *ctx, struct Header *h, int flag, bool bf, bool upd_ctx); @@ -183,7 +171,6 @@ int mutt_addwch(wchar_t wc); int mutt_alloc_color(int fg, int bg); int mutt_combine_color(int fg_attr, int bg_attr); int mutt_any_key_to_continue(const char *s); -int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur); int mutt_change_flag(struct Header *h, int bf); int mutt_check_encoding(const char *c); @@ -214,11 +201,8 @@ int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags); int mutt_get_postponed(struct Context *ctx, struct Header *hdr, struct Header **cur, char *fcc, size_t fcclen); int mutt_parse_crypt_hdr(const char *p, int set_empty_signas, int crypt_app); -int mutt_index_menu(void); int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Address *cc, struct Address *bcc, const char *msg, int eightbit); -bool mutt_is_mail_list(struct Address *addr); -bool mutt_is_subscribed_list(struct Address *addr); bool mutt_is_text_part(struct Body *b); int mutt_lookup_mime_type(struct Body *att, const char *path); int mutt_multi_choice(char *prompt, char *letters); @@ -231,21 +215,13 @@ int mutt_parse_mono(struct Buffer *buf, struct Buffer *s, unsigned long data, st int mutt_parse_unmono(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err); int mutt_rfc822_parse_line(struct Envelope *e, struct Header *hdr, char *line, char *p, short user_hdrs, short weed, short do_2047); -int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err); -int mutt_parse_unscore(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err); int mutt_parse_unhook(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err); void mutt_delete_hooks(int type); -int mutt_query_complete(char *buf, size_t buflen); int mutt_save_message_ctx(struct Header *h, int delete, int decode, int decrypt, struct Context *ctx); int mutt_save_message(struct Header *h, int delete, int decode, int decrypt); -#ifdef USE_SMTP -int mutt_smtp_send(const struct Address *from, const struct Address *to, const struct Address *cc, - const struct Address *bcc, const char *msgfile, int eightbit); -#endif size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width); int mutt_strwidth(const char *s); -int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen, struct Header *cur, int flags); int mutt_thread_set_flag(struct Header *hdr, int flag, int bf, int subthread); void mutt_update_num_postponed(void); int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, int post, @@ -259,7 +235,6 @@ int mutt_write_one_header(FILE *fp, const char *tag, const char *value, int mutt_rfc822_write_header(FILE *fp, struct Envelope *env, struct Body *attach, int mode, bool privacy); void mutt_write_references(const struct ListHead *r, FILE *f, size_t trim); int mutt_yesorno(const char *msg, int def); -void mutt_set_header_color(struct Context *ctx, struct Header *curhdr); void mutt_sleep(short s); int mutt_save_confirm(const char *s, struct stat *st); diff --git a/query.c b/query.c index 4239427fc..de63586e6 100644 --- a/query.c +++ b/query.c @@ -34,9 +34,10 @@ #include "format_flags.h" #include "globals.h" #include "keymap.h" +#include "menu.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "opcodes.h" #include "protos.h" diff --git a/query.h b/query.h index 42381f3cc..617270543 100644 --- a/query.h +++ b/query.h @@ -23,8 +23,13 @@ #ifndef MUTT_QUERY_H #define MUTT_QUERY_H +#include + /* These Config Variables are only used in query.c */ extern char *QueryCommand; extern char *QueryFormat; +int mutt_query_complete(char *buf, size_t buflen); +void mutt_query_menu(char *buf, size_t buflen); + #endif /* MUTT_QUERY_H */ diff --git a/recvattach.c b/recvattach.c index cb9e6476f..80c3edff3 100644 --- a/recvattach.c +++ b/recvattach.c @@ -33,17 +33,20 @@ #include "mutt.h" #include "recvattach.h" #include "context.h" +#include "curs_lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" #include "handler.h" +#include "hdrline.h" #include "keymap.h" #include "mailbox.h" +#include "menu.h" #include "mutt_attach.h" #include "mutt_curses.h" #include "mutt_logging.h" -#include "mutt_menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "mx.h" #include "ncrypt/ncrypt.h" #include "opcodes.h" @@ -58,8 +61,8 @@ /* These Config Variables are only used in recvattach.c */ char *AttachSep; -bool AttachSplit; -bool DigestCollapse; +bool AttachSplit; +bool DigestCollapse; char *MessageFormat; static void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init); diff --git a/recvcmd.c b/recvcmd.c index 7a3204f6e..3ff1a5ad4 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -32,6 +32,7 @@ #include "copy.h" #include "globals.h" #include "handler.h" +#include "hdrline.h" #include "mutt_body.h" #include "mutt_logging.h" #include "mutt_window.h" diff --git a/remailer.c b/remailer.c index 981f56fa8..305946bf7 100644 --- a/remailer.c +++ b/remailer.c @@ -30,13 +30,15 @@ #include "email/email.h" #include "mutt.h" #include "remailer.h" +#include "curs_lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" #include "keymap.h" +#include "menu.h" #include "mutt_curses.h" -#include "mutt_menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "opcodes.h" #include "options.h" #include "protos.h" diff --git a/rfc3676.c b/rfc3676.c index e69d89ef3..18aebd001 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -38,7 +38,7 @@ #include "state.h" /* These Config Variables are only used in rfc3676.c */ -bool ReflowSpaceQuotes; +bool ReflowSpaceQuotes; short ReflowWrap; #define FLOWED_MAX 72 diff --git a/score.c b/score.c index d23bb7fd1..023641018 100644 --- a/score.c +++ b/score.c @@ -26,10 +26,11 @@ #include "mutt/mutt.h" #include "email/email.h" #include "mutt.h" +#include "score.h" #include "context.h" #include "globals.h" #include "keymap.h" -#include "mutt_menu.h" +#include "menu.h" #include "options.h" #include "pattern.h" #include "protos.h" diff --git a/score.h b/score.h index c60a1055f..18752badf 100644 --- a/score.h +++ b/score.h @@ -23,9 +23,20 @@ #ifndef MUTT_SCORE_H #define MUTT_SCORE_H +#include + +struct Buffer; +struct Header; +struct Context; + /* These Config Variables are only used in score.c */ extern short ScoreThresholdDelete; extern short ScoreThresholdFlag; extern short ScoreThresholdRead; +void mutt_check_rescore(struct Context *ctx); +int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err); +int mutt_parse_unscore(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err); +void mutt_score_message(struct Context *ctx, struct Header *hdr, bool upd_ctx); + #endif /* MUTT_SCORE_H */ diff --git a/send.c b/send.c index 64346b870..9afcac7cb 100644 --- a/send.c +++ b/send.c @@ -35,10 +35,13 @@ #include "email/email.h" #include "mutt.h" #include "alias.h" +#include "compose.h" #include "context.h" #include "copy.h" +#include "edit.h" #include "filter.h" #include "globals.h" +#include "hdrline.h" #include "mailbox.h" #include "mutt_attach.h" #include "mutt_header.h" @@ -48,6 +51,7 @@ #include "pattern.h" #include "protos.h" #include "rfc3676.h" +#include "smtp.h" #include "sort.h" #include "url.h" #ifdef USE_NNTP @@ -66,46 +70,46 @@ unsigned char AbortNoattach; /* forgotten attachment detector */ struct Regex *AbortNoattachRegex; unsigned char AbortNosubject; unsigned char AbortUnmodified; -bool AskFollowUp; -bool AskXCommentTo; -char * ContentType; -bool CryptAutoencrypt; -bool CryptAutopgp; -bool CryptAutosign; -bool CryptAutosmime; -bool CryptReplyencrypt; -bool CryptReplysign; -bool CryptReplysignencrypted; -char * EmptySubject; -bool FastReply; +bool AskFollowUp; +bool AskXCommentTo; +char *ContentType; +bool CryptAutoencrypt; +bool CryptAutopgp; +bool CryptAutosign; +bool CryptAutosmime; +bool CryptReplyencrypt; +bool CryptReplysign; +bool CryptReplysignencrypted; +char *EmptySubject; +bool FastReply; unsigned char FccAttach; -bool FccClear; -bool FollowupTo; -char * ForwardAttributionIntro; -char * ForwardAttributionTrailer; +bool FccClear; +bool FollowupTo; +char *ForwardAttributionIntro; +char *ForwardAttributionTrailer; unsigned char ForwardEdit; -char * ForwardFormat; -bool ForwardReferences; -bool Hdrs; +char *ForwardFormat; +bool ForwardReferences; +bool Hdrs; unsigned char HonorFollowupTo; -bool IgnoreListReplyTo; +bool IgnoreListReplyTo; unsigned char Include; -bool Metoo; -bool NmRecord; -bool PgpReplyinline; -char * PostIndentString; -bool PostponeEncrypt; -char * PostponeEncryptAs; +bool Metoo; +bool NmRecord; +bool PgpReplyinline; +char *PostIndentString; +bool PostponeEncrypt; +char *PostponeEncryptAs; unsigned char Recall; -bool ReplySelf; +bool ReplySelf; unsigned char ReplyTo; -bool ReplyWithXorig; -bool ReverseName; -bool ReverseRealname; -bool SigDashes; -char * Signature; -bool SigOnTop; -bool UseFrom; +bool ReplyWithXorig; +bool ReverseName; +bool ReverseRealname; +bool SigDashes; +char *Signature; +bool SigOnTop; +bool UseFrom; static void append_signature(FILE *f) { diff --git a/send.h b/send.h index 31ba03320..2b5a933d4 100644 --- a/send.h +++ b/send.h @@ -23,6 +23,7 @@ #ifndef MUTT_SEND_H #define MUTT_SEND_H +#include #include struct Address; diff --git a/sendlib.c b/sendlib.c index c7b4e27c1..712a558d7 100644 --- a/sendlib.c +++ b/sendlib.c @@ -41,6 +41,7 @@ #include "buffy.h" #include "context.h" #include "copy.h" +#include "curs_lib.h" #include "filter.h" #include "format_flags.h" #include "globals.h" @@ -48,6 +49,7 @@ #include "mailbox.h" #include "mutt_curses.h" #include "mutt_window.h" +#include "muttlib.h" #include "mx.h" #include "ncrypt/ncrypt.h" #include "options.h" @@ -56,6 +58,7 @@ #include "recvattach.h" #include "rfc2047.h" #include "rfc2231.h" +#include "smtp.h" #include "state.h" #ifdef USE_NNTP #include "nntp/nntp.h" @@ -67,22 +70,22 @@ #endif /* These Config Variables are only used in sendlib.c */ -bool Allow8bit; +bool Allow8bit; char *AttachCharset; -bool BounceDelivered; -bool EncodeFrom; -bool ForwardDecrypt; -bool HiddenHost; +bool BounceDelivered; +bool EncodeFrom; +bool ForwardDecrypt; +bool HiddenHost; char *Inews; -bool MimeForwardDecode; -bool MimeSubject; /**< encode subject line with RFC2047 */ +bool MimeForwardDecode; +bool MimeSubject; /**< encode subject line with RFC2047 */ char *MimeTypeQueryCommand; -bool MimeTypeQueryFirst; +bool MimeTypeQueryFirst; char *Sendmail; short SendmailWait; -bool Use8bitmime; -bool UseEnvelopeFrom; -bool UserAgent; +bool Use8bitmime; +bool UseEnvelopeFrom; +bool UserAgent; short WrapHeaders; /** diff --git a/sidebar.c b/sidebar.c index 389a39c5c..3b20133a7 100644 --- a/sidebar.c +++ b/sidebar.c @@ -41,8 +41,8 @@ #include "context.h" #include "format_flags.h" #include "globals.h" +#include "menu.h" #include "mutt_curses.h" -#include "mutt_menu.h" #include "mutt_window.h" #include "muttlib.h" #include "mx.h" @@ -58,12 +58,12 @@ short SidebarComponentDepth; char *SidebarDelimChars; char *SidebarDividerChar; -bool SidebarFolderIndent; +bool SidebarFolderIndent; char *SidebarFormat; char *SidebarIndentString; -bool SidebarNewMailOnly; -bool SidebarNextNewWrap; -bool SidebarShortPath; +bool SidebarNewMailOnly; +bool SidebarNextNewWrap; +bool SidebarShortPath; short SidebarSortMethod; /* Previous values for some sidebar config */ diff --git a/smtp.h b/smtp.h index e6b818b3a..f4fbab0d3 100644 --- a/smtp.h +++ b/smtp.h @@ -23,7 +23,13 @@ #ifndef MUTT_SMTP_H #define MUTT_SMTP_H +struct Address; + /* These Config Variables are only used in smtp.c */ extern char *SmtpAuthenticators; +#ifdef USE_SMTP +int mutt_smtp_send(const struct Address *from, const struct Address *to, const struct Address *cc, const struct Address *bcc, const char *msgfile, int eightbit); +#endif + #endif /* MUTT_SMTP_H */ diff --git a/sort.c b/sort.c index a946ea956..c51fef0c0 100644 --- a/sort.c +++ b/sort.c @@ -34,6 +34,7 @@ #include "mutt_thread.h" #include "options.h" #include "protos.h" +#include "score.h" #ifdef USE_NNTP #include "mx.h" #include "nntp/nntp.h" @@ -273,7 +274,7 @@ sort_t *mutt_get_sort_func(int method) return nntp_compare_order; else #endif - return compare_order; + return compare_order; case SORT_RECEIVED: return compare_date_received; case SORT_SCORE: diff --git a/sort.h b/sort.h index 7c9facba0..9b3548953 100644 --- a/sort.h +++ b/sort.h @@ -76,7 +76,6 @@ typedef int sort_t(const void *a, const void *b); sort_t *mutt_get_sort_func(int method); void mutt_sort_headers(struct Context *ctx, int init); -int mutt_select_sort(int reverse); int perform_auxsort(int retval, const void *a, const void *b); extern const struct Mapping SortMethods[]; diff --git a/status.c b/status.c index 72a418515..9b877dfe5 100644 --- a/status.c +++ b/status.c @@ -34,8 +34,9 @@ #include "format_flags.h" #include "globals.h" #include "mbtable.h" -#include "mutt_menu.h" +#include "menu.h" #include "mutt_window.h" +#include "muttlib.h" #include "mx.h" #include "options.h" #include "protos.h" diff --git a/status.h b/status.h index 4dbd13af9..dd0bd972e 100644 --- a/status.h +++ b/status.h @@ -23,7 +23,13 @@ #ifndef MUTT_STATUS_H #define MUTT_STATUS_H +#include + +struct Menu; + /* These Config Variables are only used in status.c */ extern struct MbTable *StatusChars; +void menu_status_line(char *buf, size_t buflen, struct Menu *menu, const char *p); + #endif /* MUTT_STATUS_H */ -- 2.50.1