#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"
#ifndef MUTT_ADDRBOOK_H
#define MUTT_ADDRBOOK_H
+#include <stdio.h>
+
+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 */
+
#include "mutt.h"
#include "alias.h"
#include "globals.h"
+#include "hdrline.h"
#include "mutt_curses.h"
#include "options.h"
#include "protos.h"
#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"
#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;
#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"
/* 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 */
#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"
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);
int mutt_parse_unmono(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
#endif /* MUTT_COLOR_H */
+
#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"
/* 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";
#ifndef MUTT_COMMANDS_H
#define MUTT_COMMANDS_H
+#include <stdbool.h>
#include <stdio.h>
struct Body;
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);
#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"
#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.");
#ifndef MUTT_COMPOSE_H
#define MUTT_COMPOSE_H
+#include <stdio.h>
+
+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 */
+
#include "globals.h"
#include "mailbox.h"
#include "mutt_curses.h"
+#include "muttlib.h"
#include "mx.h"
#include "options.h"
#include "protos.h"
extern bool SslUseTlsv12;
extern bool SslVerifyDates;
extern bool SslVerifyHost;
-
#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"
#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"
#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"
#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"
#include <wchar.h>
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 */
#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"
#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"
#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.");
#ifndef MUTT_CURS_MAIN_H
#define MUTT_CURS_MAIN_H
+#include <stdbool.h>
+#include <stdio.h>
+
+struct Context;
+struct Header;
+struct Menu;
+
/* These Config Variables are only used in curs_main.c */
extern bool ChangeFolderNext;
extern bool CollapseAll;
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 */
#include "alias.h"
#include "context.h"
#include "globals.h"
+#include "hdrline.h"
#include "mutt_curses.h"
#include "mutt_header.h"
#include "mutt_window.h"
#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 */
#include "alias.h"
#include "browser.h"
#include "buffy.h"
+#include "curs_lib.h"
#include "enter_state.h"
#include "globals.h"
#include "history.h"
#include "mutt_window.h"
#include "opcodes.h"
#include "protos.h"
+#include "query.h"
/**
* enum RedrawFlags - redraw flags for mutt_enter_string_full()
#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"
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 */
#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
#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"
#ifndef MUTT_HDRLINE_H
#define MUTT_HDRLINE_H
+#include <stdbool.h>
+#include <stdio.h>
+#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 */
#include <string.h>
#include <wchar.h>
#include "mutt/mutt.h"
+#include "curs_lib.h"
#include "globals.h"
#include "keymap.h"
#include "mutt_window.h"
#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
#include "mutt.h"
#include "alias.h"
#include "globals.h"
+#include "hdrline.h"
#include "mailbox.h"
#include "ncrypt/ncrypt.h"
#include "options.h"
/* 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
#ifndef MUTT_HOOK_H
#define MUTT_HOOK_H
+#include <stdbool.h>
#include <stdio.h>
struct Address;
#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"
/**
* 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
*/
#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"
#include "mutt/mutt.h"
#include "mutt.h"
#include "keymap.h"
+#include "curs_lib.h"
#include "functions.h"
#include "globals.h"
#include "mutt_curses.h"
#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;
#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"
#ifndef MUTT_MAIN_H
#define MUTT_MAIN_H
+#include <stdbool.h>
+
/* These Config Variables are only used in main.c */
extern bool ResumeEditedDraftFiles;
+void mutt_exit(int code);
+
#endif /* MUTT_MAIN_H */
#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"
/* 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];
#ifndef MUTT_MENU_H
#define MUTT_MENU_H
+#include <regex.h>
+#include <stdbool.h>
+#include <stdio.h>
+
/* 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 */
#include <limits.h>
#include <regex.h>
#include <stdbool.h>
-#include "where.h"
+#include <stdint.h>
struct Buffer;
struct ListHead;
#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() */
#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"
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
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.
#include "mutt.h"
#include "alias.h"
#include "context.h"
+#include "curs_main.h"
#include "globals.h"
#include "ncrypt/ncrypt.h"
#include "options.h"
#include <time.h>
#include "mutt/mutt.h"
#include "mutt.h"
+#include "curs_lib.h"
#include "globals.h"
#include "mutt_curses.h"
#include "mutt_window.h"
+++ /dev/null
-/**
- * @file
- * GUI handling of selectable lists
- *
- * @authors
- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
- *
- * @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 <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _MUTT_MENU_H
-#define _MUTT_MENU_H
-
-#include <regex.h>
-#include <stdbool.h>
-#include <stdio.h>
-
-#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 */
#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 */
#include "conn/conn.h"
#include "mutt.h"
#include "alias.h"
+#include "curs_lib.h"
#include "filter.h"
#include "format_flags.h"
#include "globals.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
+#include "format_flags.h"
struct Address;
struct Body;
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);
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);
#include "options.h"
#include "pattern.h"
#include "protos.h"
+#include "score.h"
#include "sort.h"
#include "url.h"
#ifdef USE_SIDEBAR
/* 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
#include "context.h"
#include "copy.h"
#include "cryptglue.h"
+#include "curs_lib.h"
#include "globals.h"
#include "handler.h"
#include "mutt_curses.h"
#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
#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"
#include "pgp.h"
#include "crypt.h"
#include "cryptglue.h"
+#include "curs_lib.h"
#include "filter.h"
#include "globals.h"
#include "handler.h"
#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? */
#include "mutt_curses.h"
#include "mutt_logging.h"
#include "mutt_window.h"
+#include "muttlib.h"
#include "ncrypt.h"
#include "pgp.h"
#include "pgpkey.h"
#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"
#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"
#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;
char *SmimePk7outCommand;
char *SmimeSignCommand;
char *SmimeSignDigestAlg;
-long SmimeTimeout;
+long SmimeTimeout;
char *SmimeVerifyCommand;
char *SmimeVerifyOpaqueCommand;
#include "mutt_logging.h"
#include "mutt_socket.h"
#include "mutt_window.h"
+#include "muttlib.h"
#include "mx.h"
#include "nntp.h"
#include "options.h"
/* 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;
#include "mutt_notmuch.h"
#include "buffy.h"
#include "context.h"
+#include "curs_main.h"
#include "globals.h"
#include "mailbox.h"
#include "maildir/maildir.h"
#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;
#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"
#include "recvattach.h"
#include "recvcmd.h"
#include "sort.h"
+#include "status.h"
#include "terminal.h"
#ifdef USE_SIDEBAR
#include "sidebar.h"
#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)
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);
#include "mutt.h"
#include "globals.h"
#include "mailbox.h"
+#include "muttlib.h"
#include "ncrypt/ncrypt.h"
#include "options.h"
#include "protos.h"
#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"
#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 */
/* These Config Variables are only used in pop/pop_auth.c */
char *PopAuthenticators;
-bool PopAuthTryAll;
+bool PopAuthTryAll;
#ifdef USE_SASL
/**
#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"
#include <sys/time.h>
#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"
#include <stdio.h>
#include <time.h>
#include "mutt.h"
-#include "format_flags.h"
struct Address;
struct AliasList;
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()
*/
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);
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);
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);
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);
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);
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,
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);
#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"
#ifndef MUTT_QUERY_H
#define MUTT_QUERY_H
+#include <stdio.h>
+
/* 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 */
#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"
/* 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);
#include "copy.h"
#include "globals.h"
#include "handler.h"
+#include "hdrline.h"
#include "mutt_body.h"
#include "mutt_logging.h"
#include "mutt_window.h"
#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"
#include "state.h"
/* These Config Variables are only used in rfc3676.c */
-bool ReflowSpaceQuotes;
+bool ReflowSpaceQuotes;
short ReflowWrap;
#define FLOWED_MAX 72
#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"
#ifndef MUTT_SCORE_H
#define MUTT_SCORE_H
+#include <stdbool.h>
+
+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 */
#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"
#include "pattern.h"
#include "protos.h"
#include "rfc3676.h"
+#include "smtp.h"
#include "sort.h"
#include "url.h"
#ifdef USE_NNTP
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)
{
#ifndef MUTT_SEND_H
#define MUTT_SEND_H
+#include <stdbool.h>
#include <stdio.h>
struct Address;
#include "buffy.h"
#include "context.h"
#include "copy.h"
+#include "curs_lib.h"
#include "filter.h"
#include "format_flags.h"
#include "globals.h"
#include "mailbox.h"
#include "mutt_curses.h"
#include "mutt_window.h"
+#include "muttlib.h"
#include "mx.h"
#include "ncrypt/ncrypt.h"
#include "options.h"
#include "recvattach.h"
#include "rfc2047.h"
#include "rfc2231.h"
+#include "smtp.h"
#include "state.h"
#ifdef USE_NNTP
#include "nntp/nntp.h"
#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;
/**
#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"
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 */
#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 */
#include "mutt_thread.h"
#include "options.h"
#include "protos.h"
+#include "score.h"
#ifdef USE_NNTP
#include "mx.h"
#include "nntp/nntp.h"
return nntp_compare_order;
else
#endif
- return compare_order;
+ return compare_order;
case SORT_RECEIVED:
return compare_date_received;
case SORT_SCORE:
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[];
#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"
#ifndef MUTT_STATUS_H
#define MUTT_STATUS_H
+#include <stdio.h>
+
+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 */