X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=send.c;h=d777335f8fab322f3ad7b257abd248bb21f818e0;hp=8f09f36c45fc863a826ea26f6774b9d42d21decd;hb=182468398773e3de240bf548e62a015c58583dd7;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/send.c b/send.c index 8f09f36..d777335 100644 --- a/send.c +++ b/send.c @@ -1,19 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1996-2002 Michael R. Elkins - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. */ #if HAVE_CONFIG_H @@ -25,13 +16,17 @@ #include "rfc2047.h" #include "keymap.h" #include "mime.h" -#include "mailbox.h" #include "copy.h" #include "mx.h" #include "mutt_crypt.h" #include "mutt_idna.h" #include "url.h" +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/str.h" +#include "lib/debug.h" + #include #include #include @@ -296,7 +291,7 @@ static int edit_envelope (ENVELOPE * en, int flags) return (-1); } - mutt_str_replace (&en->subject, buf); + str_replace (&en->subject, buf); return 0; } @@ -351,7 +346,7 @@ static void process_user_header (ENVELOPE * env) env->reply_to = rfc822_parse_adrlist (env->reply_to, uh->data + 9); } else if (ascii_strncasecmp ("message-id:", uh->data, 11) == 0) - mutt_str_replace (&env->message_id, uh->data + 11); + str_replace (&env->message_id, uh->data + 11); else if (ascii_strncasecmp ("to:", uh->data, 3) != 0 && ascii_strncasecmp ("cc:", uh->data, 3) != 0 && ascii_strncasecmp ("bcc:", uh->data, 4) != 0 && @@ -654,7 +649,7 @@ void mutt_make_forward_subject (ENVELOPE * env, CONTEXT * ctx, HEADER * cur) /* set the default subject for the message. */ mutt_make_string (buffer, sizeof (buffer), NONULL (ForwFmt), ctx, cur); - mutt_str_replace (&env->subject, buffer); + str_replace (&env->subject, buffer); } void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx, @@ -764,7 +759,7 @@ envelope_defaults (ENVELOPE * env, CONTEXT * ctx, HEADER * cur, int flags) if ((flags & SENDNEWS)) { /* in case followup set Newsgroups: with Followup-To: if it present */ if (!env->newsgroups && curenv && - mutt_strcasecmp (curenv->followup_to, "poster")) + safe_strcasecmp (curenv->followup_to, "poster")) env->newsgroups = safe_strdup (curenv->followup_to); } else @@ -1214,10 +1209,8 @@ int ci_send_message (int flags, /* send mode */ } if (!tempfp) { - dprint (1, - (debugfile, - "newsend_message: can't create tempfile %s (errno=%d)\n", - msg->content->filename, errno)); + debug_print (1, ("can't create tempfile %s (errno=%d)\n", + msg->content->filename, errno)); mutt_perror (msg->content->filename); goto cleanup; } @@ -1668,7 +1661,7 @@ int ci_send_message (int flags, /* send mode */ */ #ifdef USE_IMAP - if ((flags & SENDBATCH) && fcc[0] && mx_is_imap (fcc)) + if ((flags & SENDBATCH) && fcc[0] && mx_get_magic (fcc) == M_IMAP) fcc[0] = '\0'; #endif