Rocco Rutte:
[apps/madmutt.git] / protos.h
index b8c08cc..43ade4c 100644 (file)
--- a/protos.h
+++ b/protos.h
 #endif
 #include "mbyte.h"
 
-#ifdef DEBUG
-#define dprint(N,X) do { if(debuglevel>=N) fprintf X; } while (0)
-#else
-#define dprint(N,X)
-#endif
-
 #define MoreArgs(p) (*p->dptr && *p->dptr != ';' && *p->dptr != '#')
 
 #define mutt_make_string(A,B,C,D,E) _mutt_make_string(A,B,C,D,E,0)
@@ -55,10 +49,10 @@ int _mutt_aside_thread (HEADER *, short, short);
 int _mutt_traverse_thread (CONTEXT * ctx, HEADER * hdr, int flag);
 
 
-#define mutt_new_parameter() safe_calloc (1, sizeof (PARAMETER))
-#define mutt_new_header() safe_calloc (1, sizeof (HEADER))
-#define mutt_new_envelope() safe_calloc (1, sizeof (ENVELOPE))
-#define mutt_new_enter_state() safe_calloc (1, sizeof (ENTER_STATE))
+#define mutt_new_parameter() mem_calloc (1, sizeof (PARAMETER))
+#define mutt_new_header() mem_calloc (1, sizeof (HEADER))
+#define mutt_new_envelope() mem_calloc (1, sizeof (ENVELOPE))
+#define mutt_new_enter_state() mem_calloc (1, sizeof (ENTER_STATE))
 
 typedef const char *format_t (char *, size_t, char, const char *,
                               const char *, const char *, const char *,
@@ -105,6 +99,13 @@ LIST *mutt_parse_references (char *, int);
 ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *, short, short);
 HEADER *mutt_dup_header (HEADER *);
 
+int mutt_cmp_header (const HEADER*, const HEADER*);
+int mutt_cmp_addr (const ADDRESS * a, const ADDRESS * b);
+int mutt_cmp_list (const LIST * a, const LIST * b);
+int mutt_cmp_env (const ENVELOPE * e1, const ENVELOPE * e2);
+int mutt_cmp_param (const PARAMETER * p1, const PARAMETER * p2);
+int mutt_cmp_body (const BODY * b1, const BODY * b2);
+
 #if USE_HCACHE
 void *mutt_hcache_open (const char *path, const char *folder);
 void mutt_hcache_close (void *db);
@@ -210,6 +211,7 @@ void mutt_make_help (char *, size_t, char *, int, int);
 void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx,
                                    HEADER * cur, ENVELOPE * curenv);
 void mutt_make_post_indent (CONTEXT * ctx, HEADER * cur, FILE * out);
+void mutt_merge_envelopes (ENVELOPE* base, ENVELOPE** extra);
 void mutt_message_to_7bit (BODY *, FILE *);
 
 #define mutt_mktemp(a) _mutt_mktemp (a, __FILE__, __LINE__)
@@ -282,6 +284,7 @@ int mutt_compose_attachment (BODY * a);
 int mutt_copy_body (FILE *, BODY **, BODY *);
 int mutt_decode_save_attachment (FILE *, BODY *, char *, int, int);
 int mutt_display_message (HEADER * h);
+int mutt_dump_variables (void);
 int mutt_edit_attachment (BODY *);
 int mutt_edit_message (CONTEXT *, HEADER *);
 int mutt_fetch_recips (ENVELOPE * out, ENVELOPE * in, int flags);
@@ -301,8 +304,8 @@ int _mutt_enter_string (char *, size_t, int, int, int, int, char ***, int *,
                         ENTER_STATE *);
 #define mutt_get_field(A,B,C,D) _mutt_get_field(A,B,C,D,0,NULL,NULL)
 int _mutt_get_field (char *, char *, size_t, int, int, char ***, int *);
+int mutt_get_field_unbuffered (char *, char *, size_t, int);
 int mutt_get_hook_type (const char *);
-int mutt_get_password (char *, char *, size_t);
 int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t);
 int mutt_get_tmp_attachment (BODY *);
 int mutt_index_menu (void);
@@ -345,7 +348,7 @@ int mutt_print_attachment (FILE *, BODY *);
 int mutt_query_complete (char *, size_t);
 int mutt_query_variables (LIST * queries);
 int mutt_save_attachment (FILE *, BODY *, char *, int, HEADER *);
-void _mutt_save_message (HEADER *, CONTEXT *, int, int, int);
+int _mutt_save_message (HEADER *, CONTEXT *, int, int, int);
 int mutt_save_message (HEADER *, int, int, int, int *);
 int mutt_search_command (int, int);
 int mutt_skipchars (const char *, const char *);
@@ -395,7 +398,7 @@ int mutt_wctoutf8 (char *s, unsigned int c);
        (option (OPTLOCALES) ? 0 : (wc >= 0xa0)))
 #endif
 
-#define new_pattern() safe_calloc(1, sizeof (pattern_t))
+#define new_pattern() mem_calloc(1, sizeof (pattern_t))
 
 int mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags,
                        CONTEXT * ctx, HEADER * h);