Skip to content

Commit

Permalink
split protos.h 2
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Jul 16, 2018
1 parent 2ed7153 commit 0cddc7c
Show file tree
Hide file tree
Showing 86 changed files with 460 additions and 361 deletions.
3 changes: 2 additions & 1 deletion addrbook.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions addrbook.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@
#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 */

1 change: 1 addition & 0 deletions alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions buffy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion color.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions color.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 */

20 changes: 11 additions & 9 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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";

Expand Down
4 changes: 3 additions & 1 deletion commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#ifndef MUTT_COMMANDS_H
#define MUTT_COMMANDS_H

#include <stdbool.h>
#include <stdio.h>

struct Body;
Expand All @@ -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);

Expand Down
10 changes: 7 additions & 3 deletions compose.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.");
Expand Down
7 changes: 7 additions & 0 deletions compose.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@
#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 */

1 change: 1 addition & 0 deletions compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion conn/conn_globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ extern bool SslUseTlsv11;
extern bool SslUseTlsv12;
extern bool SslVerifyDates;
extern bool SslVerifyHost;

2 changes: 1 addition & 1 deletion conn/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion conn/ssl_gnutls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion curs_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
50 changes: 31 additions & 19 deletions curs_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,40 @@
#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 */
Loading

0 comments on commit 0cddc7c

Please sign in to comment.