X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=protos.h;h=2f375c2736a55301e8c07f4bc3f616d3b492e4fe;hp=b9edfc3165b3e3dda26d90308682f84c45f4fa7f;hb=666a29207bb781f47ec85f6a3c3cdeb554b30c21;hpb=fa7f733a61a6fe3143198791ab470ddf4d08fdbe diff --git a/protos.h b/protos.h index b9edfc3..2f375c2 100644 --- a/protos.h +++ b/protos.h @@ -16,13 +16,8 @@ #elif HAVE_INTTYPES_H #include #endif -#include "mbyte.h" -#ifdef DEBUG -#define dprint(N,X) do { if(debuglevel>=N) fprintf X; } while (0) -#else -#define dprint(N,X) -#endif +#include "mbyte.h" #define MoreArgs(p) (*p->dptr && *p->dptr != ';' && *p->dptr != '#') @@ -30,14 +25,6 @@ void _mutt_make_string (char *, size_t, const char *, CONTEXT *, HEADER *, format_flag); -int mutt_extract_token (BUFFER *, BUFFER *, int); -BUFFER *mutt_buffer_init (BUFFER *); -BUFFER *mutt_buffer_from (BUFFER *, char *); -void mutt_buffer_free (BUFFER **); -void mutt_buffer_add (BUFFER *, const char *, size_t); -void mutt_buffer_addstr (BUFFER *, const char *); -void mutt_buffer_addch (BUFFER *, char); - #define mutt_system(x) _mutt_system(x,0) int _mutt_system (const char *, int); @@ -55,10 +42,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 *, @@ -79,10 +66,7 @@ int query_quadoption (int, const char *); int quadoption (int); ADDRESS *mutt_default_from (void); -ADDRESS *mutt_get_address (ENVELOPE *, char **); -ADDRESS *mutt_lookup_alias (const char *s); ADDRESS *mutt_remove_duplicates (ADDRESS *); -ADDRESS *mutt_expand_aliases (ADDRESS *); ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *); BODY *mutt_make_file_attach (const char *); @@ -105,6 +89,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); @@ -158,7 +149,6 @@ void mutt_account_hook (const char *url); void mutt_add_to_reference_headers (ENVELOPE * env, ENVELOPE * curenv, LIST *** pp, LIST *** qq); void mutt_adv_mktemp (char *, size_t); -void mutt_alias_menu (char *, size_t, ALIAS *); void mutt_allow_interrupt (int); void mutt_attach_init (BODY *); void mutt_block_signals (void); @@ -166,12 +156,9 @@ void mutt_block_signals_system (void); void mutt_body_handler (BODY *, STATE *); int mutt_bounce_message (FILE * fp, HEADER *, ADDRESS *); void mutt_break_thread (HEADER *); -void mutt_buffy (char *, size_t); -int mutt_buffy_list (void); void mutt_canonical_charset (char *, size_t, const char *); void mutt_check_rescore (CONTEXT *); void mutt_clear_error (void); -void mutt_create_alias (ENVELOPE *, ADDRESS *); void mutt_decode_attachment (BODY *, STATE *); void mutt_decode_base64 (STATE * s, long len, int istext, iconv_t cd); void mutt_default_save (char *, size_t, HEADER *); @@ -183,7 +170,6 @@ void mutt_edit_headers (const char *, const char *, HEADER *, char *, size_t); void mutt_curses_error (const char *, ...); void mutt_curses_message (const char *, ...); void mutt_enter_command (void); -void mutt_expand_aliases_env (ENVELOPE *); void mutt_expand_file_fmt (char *, size_t, const char *, const char *); void mutt_expand_fmt (char *, size_t, const char *, const char *); void mutt_expand_link (char *, const char *, const char *); @@ -195,7 +181,6 @@ void mutt_format_s (char *, size_t, const char *, const char *); void mutt_format_s_tree (char *, size_t, const char *, const char *); void mutt_forward_intro (FILE * fp, HEADER * cur); void mutt_forward_trailer (FILE * fp); -void mutt_free_alias (ALIAS **); void mutt_free_body (BODY **); void mutt_free_color (int fg, int bg); void mutt_free_enter_state (ENTER_STATE **); @@ -212,6 +197,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__) @@ -220,7 +206,8 @@ void mutt_normalize_time (struct tm *); void mutt_paddstr (int, const char *); void mutt_parse_mime_message (CONTEXT * ctx, HEADER *); void mutt_parse_part (FILE *, BODY *); -void mutt_perror (const char *); +#define mutt_perror(a) _mutt_perror (a, __FILE__, __LINE__) +void _mutt_perror (const char*, const char*,int); void mutt_prepare_envelope (ENVELOPE *, int); void mutt_unprepare_envelope (ENVELOPE *); void mutt_pretty_mailbox (char *); @@ -259,17 +246,12 @@ void mutt_write_address_list (ADDRESS * adr, FILE * fp, int linelen, int display); void mutt_set_virtual (CONTEXT *); -int mutt_addr_is_user (ADDRESS *); int mutt_addwch (wchar_t); -int mutt_alias_complete (char *, size_t); int mutt_alloc_color (int fg, int bg); int mutt_any_key_to_continue (const char *); -int mutt_buffy_check (int); -int mutt_buffy_notify (void); int mutt_builtin_editor (const char *, HEADER *, HEADER *); int mutt_can_decode (BODY *); int mutt_change_flag (HEADER *, int); -int mutt_check_alias_name (const char *, char *); int mutt_check_encoding (const char *); int mutt_check_key (const char *); int mutt_check_menu (const char *); @@ -285,6 +267,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); @@ -304,8 +287,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); @@ -332,7 +315,6 @@ int mutt_parse_color (BUFFER *, BUFFER *, unsigned long, BUFFER *); int mutt_parse_uncolor (BUFFER *, BUFFER *, unsigned long, BUFFER *); int mutt_parse_hook (BUFFER *, BUFFER *, unsigned long, BUFFER *); int mutt_parse_macro (BUFFER *, BUFFER *, unsigned long, BUFFER *); -int mutt_parse_mailboxes (BUFFER *, BUFFER *, unsigned long, BUFFER *); int mutt_parse_mono (BUFFER *, BUFFER *, unsigned long, BUFFER *); int mutt_parse_unmono (BUFFER *, BUFFER *, unsigned long, BUFFER *); int mutt_parse_push (BUFFER *, BUFFER *, unsigned long, BUFFER *); @@ -349,7 +331,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 *); @@ -378,8 +360,6 @@ pid_t mutt_create_filter (const char *, FILE **, FILE **, FILE **); pid_t mutt_create_filter_fd (const char *, FILE **, FILE **, FILE **, int, int, int); -ADDRESS *alias_reverse_lookup (ADDRESS *); - /* base64.c */ void mutt_to_base64 (unsigned char *, const unsigned char *, size_t, size_t); int mutt_from_base64 (char *, const char *); @@ -399,7 +379,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);