X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=a5ba72cf3580dbc499d83d6aeb4dfa92bf150b74;hp=02d0ee06ec7617ee77bf0958600cebb9d23aaf82;hb=10e80e482eff3762b0b8d41b0c7795b76704479c;hpb=22601f25ede6703ba7cd06ee84eddd2045308570 diff --git a/sendlib.c b/sendlib.c index 02d0ee0..a5ba72c 100644 --- a/sendlib.c +++ b/sendlib.c @@ -13,18 +13,34 @@ # include "config.h" #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include #include #include +#include + +#include +#include #include +#include + #include "mutt.h" #include "handler.h" #include "recvattach.h" -#include "mutt_curses.h" #include "mx.h" #include "copy.h" #include "pager.h" @@ -32,19 +48,6 @@ #include #include "mutt_idna.h" -#include "lib/debug.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #ifdef USE_LIBESMTP # include "mutt_libesmtp.h" #endif /* USE_LIBESMTP */ @@ -887,7 +890,7 @@ int mutt_lookup_mime_type (BODY * att, const char *path) snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL (Homedir)); break; case 1: - m_strcpy(buf, sizeof(buf), SYSCONFDIR "/muttng-mime.types"); + m_strcpy(buf, sizeof(buf), SYSCONFDIR "/madmutt-mime.types"); break; case 2: m_strcpy(buf, sizeof(buf), PKGDATADIR "/mime.types"); @@ -1403,9 +1406,9 @@ void mutt_write_address_list (address_t * adr, FILE * fp, int linelen, /* need to write the list in reverse because they are stored in reverse order * when parsed to speed up threading */ -void mutt_write_references (LIST * r, FILE * f) +void mutt_write_references (string_list_t * r, FILE * f) { - LIST **ref = NULL; + string_list_t **ref = NULL; int refcnt = 0, refmax = 0; for (; (TrimRef == 0 || refcnt < TrimRef) && r; r = r->next) { @@ -1443,7 +1446,7 @@ int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach, { char buffer[LONG_STRING]; char *p; - LIST *tmp = env->userhdrs; + string_list_t *tmp = env->userhdrs; int has_agent = 0; /* user defined user-agent header field exists */ list2_t* hdrs = list_from_str (EditorHeaders, " "); @@ -1599,7 +1602,7 @@ int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach, return (ferror (fp) == 0 ? 0 : -1); } -static void encode_headers (LIST * h) +static void encode_headers (string_list_t * h) { char *tmp; char *p; @@ -2024,11 +2027,8 @@ static int mutt_invoke_sendmail (address_t * from, /* the sender */ if ((i = send_msg (path, args, msg, &childout)) != (EX_OK & 0xff)) { if (i != S_BKG) { - const char *e = mutt_strsysexit (i); - - e = mutt_strsysexit (i); mutt_error (_("Error sending message, child exited %d (%s)."), i, - NONULL (e)); + m_strsysexit(i)); if (childout) { struct stat st; @@ -2171,12 +2171,12 @@ void mutt_prepare_envelope (ENVELOPE * env, int final) void mutt_unprepare_envelope (ENVELOPE * env) { - LIST *item; + string_list_t *item; for (item = env->userhdrs; item; item = item->next) rfc2047_decode (&item->data); - address_delete (&env->mail_followup_to); + address_list_wipe(&env->mail_followup_to); /* back conversions */ rfc2047_decode_adrlist (env->to); @@ -2268,7 +2268,7 @@ int mutt_bounce_message (FILE * fp, HEADER * h, address_t * to) ret = _mutt_bounce_message (fp, h, to, resent_from, from); - address_delete (&from); + address_list_wipe(&from); return ret; } @@ -2297,7 +2297,7 @@ address_t *mutt_remove_duplicates (address_t * addr) *last = addr->next; addr->next = NULL; - address_delete (&addr); + address_list_wipe(&addr); addr = *last; } @@ -2422,7 +2422,7 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, */ if (post && hdr->chain && hdr->chain) { - LIST *p; + string_list_t *p; fputs ("X-Mutt-Mix:", msg->fp); for (p = hdr->chain; p; p = p->next)