]> granicus.if.org Git - mutt/commitdiff
Move some attachment-related prototypes and structures into attach.h
authorBrendan Cully <brendan@kublai.com>
Fri, 5 Aug 2005 02:16:46 +0000 (02:16 +0000)
committerBrendan Cully <brendan@kublai.com>
Fri, 5 Aug 2005 02:16:46 +0000 (02:16 +0000)
from the global headers. A small step towards sane dependency tracking
and code cleanliness.

attach.c
attach.h
browser.c
curs_main.c
mutt.h
mutt_menu.h
pager.h
protos.h

index 3de0b3f2bde2152ab50344847842b99c957e2d68..3d6e56742c47c25c2a3b8c0e3be50f304d6ea5cb 100644 (file)
--- 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"
index 2e17a449fe90ece906cb2c8f474b6fc399b97d16..f859415c54df12b45ce94bb42a9a9afdfff3141d 100644 (file)
--- a/attach.h
+++ b/attach.h
 
 /* 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_ */
index 108efd4ea18750640b933a43a3fc741c21696616..e654baa8344b4fe2185969ccaa6bd62cc03b6caa 100644 (file)
--- 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"
index c8c4225dcc4e638ebc0d6c4fa0ffa84df0f54a1f..8b1f0b587361994c7adb0740031b5b03f45df73f 100644 (file)
@@ -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 0fe838601aa725d5c5fda0cbc452727325eed7a3..5512e6462890985e36f8cdb34ff5585df25b1dfc 100644 (file)
--- 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;
index 9ed85bba79bab02bb35058b7cc2b1442db964b1c..77b6df74656d135074aea709f230325bdd43df17 100644 (file)
@@ -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 762e0d3cfe606dd96cf773d216c874515df2e7a6..68f4c2cfcce4fe969ffa80e8790d88afdaf37973 100644 (file)
--- 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)
index ec006da60aef698bd3e0228394feba9eb4e00ca0..f8edff06d6d296d7d1b88d0c689a480316f88b85 100644 (file)
--- 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 *);