From: Brendan Cully Date: Fri, 5 Aug 2005 02:16:46 +0000 (+0000) Subject: Move some attachment-related prototypes and structures into attach.h X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf425fba7adac1b316b1761d78a9d4f0ad3291a7;p=neomutt Move some attachment-related prototypes and structures into attach.h from the global headers. A small step towards sane dependency tracking and code cleanliness. --- diff --git a/attach.c b/attach.c index 3de0b3f2b..3d6e56742 100644 --- a/attach.c +++ b/attach.c @@ -23,6 +23,7 @@ #include "mutt.h" #include "mutt_menu.h" +#include "attach.h" #include "mutt_curses.h" #include "keymap.h" #include "rfc1524.h" diff --git a/attach.h b/attach.h index 2e17a449f..f859415c5 100644 --- a/attach.h +++ b/attach.h @@ -18,6 +18,26 @@ /* common protos for compose / attach menus */ +#ifndef _ATTACH_H_ +#define _ATTACH_H_ 1 + +#include "mutt_menu.h" + +typedef struct attachptr +{ + BODY *content; + int parent_type; + char *tree; + int level; + int num; + unsigned int unowned : 1; /* don't unlink on detach */ +} ATTACHPTR; + +ATTACHPTR **mutt_gen_attach_list (BODY *, int, ATTACHPTR **, short *, short *, + int, int); +void mutt_update_tree (ATTACHPTR **, short); +int mutt_view_attachment (FILE*, BODY *, int, HEADER *, ATTACHPTR **, short); + int mutt_tag_attach (MUTTMENU *menu, int n, int m); int mutt_attach_display_loop (MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, BODY *cur, ATTACHPTR ***idxp, short *idxlen, short *idxmax, @@ -32,3 +52,5 @@ void mutt_attach_bounce (FILE *, HEADER *, ATTACHPTR **, short, BODY *); void mutt_attach_resend (FILE *, HEADER *, ATTACHPTR **, short, BODY *); void mutt_attach_forward (FILE *, HEADER *, ATTACHPTR **, short, BODY *); void mutt_attach_reply (FILE *, HEADER *, ATTACHPTR **, short, BODY *, int); + +#endif /* _ATTACH_H_ */ diff --git a/browser.c b/browser.c index 108efd4ea..e654baa83 100644 --- a/browser.c +++ b/browser.c @@ -23,6 +23,7 @@ #include "mutt.h" #include "mutt_curses.h" #include "mutt_menu.h" +#include "attach.h" #include "buffy.h" #include "mapping.h" #include "sort.h" diff --git a/curs_main.c b/curs_main.c index c8c4225dc..8b1f0b587 100644 --- a/curs_main.c +++ b/curs_main.c @@ -23,6 +23,7 @@ #include "mutt.h" #include "mutt_curses.h" #include "mutt_menu.h" +#include "attach.h" #include "mailbox.h" #include "mapping.h" #include "sort.h" diff --git a/mutt.h b/mutt.h index 0fe838601..5512e6462 100644 --- a/mutt.h +++ b/mutt.h @@ -848,16 +848,6 @@ typedef struct unsigned int closing : 1; /* mailbox is being closed */ } CONTEXT; -typedef struct attachptr -{ - BODY *content; - int parent_type; - char *tree; - int level; - int num; - unsigned int unowned : 1; /* don't unlink on detach */ -} ATTACHPTR; - typedef struct { FILE *fpin; diff --git a/mutt_menu.h b/mutt_menu.h index 9ed85bba7..77b6df746 100644 --- a/mutt_menu.h +++ b/mutt_menu.h @@ -20,6 +20,9 @@ * This file is named mutt_menu.h so it doesn't collide with ncurses menu.h */ +#ifndef _MUTT_MENU_H_ +#define _MUTT_MENU_H_ 1 + #include "keymap.h" #include "mutt_regex.h" @@ -108,3 +111,5 @@ int mutt_menuLoop (MUTTMENU *); /* used in both the index and pager index to make an entry. */ void index_make_entry (char *, size_t, struct menu_t *, int); int index_color (int); + +#endif /* _MUTT_MENU_H_ */ diff --git a/pager.h b/pager.h index 762e0d3cf..68f4c2cfc 100644 --- a/pager.h +++ b/pager.h @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +#include "attach.h" + /* dynamic internal flags */ #define M_SHOWFLAT (1<<0) #define M_SHOWCOLOR (1<<1) diff --git a/protos.h b/protos.h index ec006da60..f8edff06d 100644 --- a/protos.h +++ b/protos.h @@ -116,8 +116,6 @@ int mutt_hcache_delete(void *db, const char *filename, size_t (*keylen)(const ch #endif /* USE_HCACHE */ -ATTACHPTR **mutt_gen_attach_list (BODY *, int, ATTACHPTR **, short *, short *, int, int); - time_t mutt_decrease_mtime (const char *, struct stat *); time_t mutt_local_tz (time_t); time_t mutt_mktime (struct tm *, int); @@ -248,7 +246,6 @@ void mutt_tag_set_flag (int, int); void mutt_unblock_signals (void); void mutt_unblock_signals_system (int); void mutt_update_encoding (BODY *a); -void mutt_update_tree (ATTACHPTR **, short); void mutt_version (void); void mutt_view_attachments (HEADER *); void mutt_write_address_list (ADDRESS *adr, FILE *fp, int linelen, int display); @@ -347,7 +344,6 @@ int mutt_compose_menu (HEADER *, char *, size_t, HEADER *); int mutt_thread_set_flag (HEADER *, int, int, int); int mutt_user_is_recipient (HEADER *); void mutt_update_num_postponed (void); -int mutt_view_attachment (FILE*, BODY *, int, HEADER *, ATTACHPTR **, short); int mutt_wait_filter (pid_t); int mutt_which_case (const char *); int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int, char *);