projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
the C gods blessed us with a preprocessor, use it.
[apps/madmutt.git]
/
send.c
diff --git
a/send.c
b/send.c
index
d39deae
..
dfed65c
100644
(file)
--- a/
send.c
+++ b/
send.c
@@
-13,11
+13,12
@@
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
+#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
#include "mutt.h"
#include "enter.h"
#include "mutt.h"
#include "enter.h"
-#include "ascii.h"
#include "mutt_curses.h"
#include "rfc2047.h"
#include "rfc3676.h"
#include "mutt_curses.h"
#include "rfc2047.h"
#include "rfc3676.h"
@@
-213,7
+214,7
@@
static int edit_envelope (ENVELOPE * en, int flags)
#ifdef USE_NNTP
if (option (OPTNEWSSEND)) {
if (en->newsgroups)
#ifdef USE_NNTP
if (option (OPTNEWSSEND)) {
if (en->newsgroups)
-
strfcpy (buf, en->newsgroups, sizeof (buf)
);
+
m_strcpy(buf, sizeof(buf), en->newsgroups
);
else
buf[0] = 0;
if (mutt_get_field ("Newsgroups: ", buf, sizeof (buf), 0) != 0)
else
buf[0] = 0;
if (mutt_get_field ("Newsgroups: ", buf, sizeof (buf), 0) != 0)
@@
-222,7
+223,7
@@
static int edit_envelope (ENVELOPE * en, int flags)
en->newsgroups = m_strdup(buf);
if (en->followup_to)
en->newsgroups = m_strdup(buf);
if (en->followup_to)
-
strfcpy (buf, en->followup_to, sizeof (buf)
);
+
m_strcpy(buf, sizeof(buf), en->followup_to
);
else
buf[0] = 0;
if (option (OPTASKFOLLOWUP)
else
buf[0] = 0;
if (option (OPTASKFOLLOWUP)
@@
-232,7
+233,7
@@
static int edit_envelope (ENVELOPE * en, int flags)
en->followup_to = m_strdup(buf);
if (en->x_comment_to)
en->followup_to = m_strdup(buf);
if (en->x_comment_to)
-
strfcpy (buf, en->x_comment_to, sizeof (buf)
);
+
m_strcpy(buf, sizeof(buf), en->x_comment_to
);
else
buf[0] = 0;
if (option (OPTXCOMMENTTO) && option (OPTASKXCOMMENTTO)
else
buf[0] = 0;
if (option (OPTXCOMMENTTO) && option (OPTASKXCOMMENTTO)
@@
-256,7
+257,7
@@
static int edit_envelope (ENVELOPE * en, int flags)
if (option (OPTFASTREPLY))
return (0);
else
if (option (OPTFASTREPLY))
return (0);
else
-
strfcpy (buf, en->subject, sizeof (buf)
);
+
m_strcpy(buf, sizeof(buf), en->subject
);
}
else {
char *p;
}
else {
char *p;
@@
-264,9
+265,8
@@
static int edit_envelope (ENVELOPE * en, int flags)
buf[0] = 0;
for (; uh; uh = uh->next) {
if (ascii_strncasecmp ("subject:", uh->data, 8) == 0) {
buf[0] = 0;
for (; uh; uh = uh->next) {
if (ascii_strncasecmp ("subject:", uh->data, 8) == 0) {
- p = uh->data + 8;
- SKIPWS (p);
- strncpy (buf, p, sizeof (buf));
+ p = vskipspaces(uh->data + 8);
+ m_strcpy(buf, sizeof(buf), p);
}
}
}
}
}
}
@@
-302,10
+302,9
@@
static int edit_envelope (ENVELOPE * en, int flags)
}
#ifdef USE_NNTP
}
#ifdef USE_NNTP
-char *nntp_get_header
(const char *s)
+char *nntp_get_header(const char *s)
{
{
- SKIPWS (s);
- return m_strdup(s);
+ return m_strdup(skipspaces(s));
}
#endif
}
#endif
@@
-750,7
+749,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 &&
if ((flags & SENDNEWS)) {
/* in case followup set Newsgroups: with Followup-To: if it present */
if (!env->newsgroups && curenv &&
-
str_casecmp
(curenv->followup_to, "poster"))
+
m_strcasecmp
(curenv->followup_to, "poster"))
env->newsgroups = m_strdup(curenv->followup_to);
}
else
env->newsgroups = m_strdup(curenv->followup_to);
}
else
@@
-1325,7
+1324,7
@@
int ci_send_message (int flags, /* send mode */
if (option (OPTSIGONTOP)
&& (!(flags & (SENDMAILX | SENDKEY)) && Editor
if (option (OPTSIGONTOP)
&& (!(flags & (SENDMAILX | SENDKEY)) && Editor
- &&
str_cmp
(Editor, "builtin") != 0))
+ &&
m_strcmp
(Editor, "builtin") != 0))
append_signature (tempfp);
/* include replies/forwarded messages, unless we are given a template */
append_signature (tempfp);
/* include replies/forwarded messages, unless we are given a template */
@@
-1335,7
+1334,7
@@
int ci_send_message (int flags, /* send mode */
if (!option (OPTSIGONTOP)
&& (!(flags & (SENDMAILX | SENDKEY)) && Editor
if (!option (OPTSIGONTOP)
&& (!(flags & (SENDMAILX | SENDKEY)) && Editor
- &&
str_cmp
(Editor, "builtin") != 0))
+ &&
m_strcmp
(Editor, "builtin") != 0))
append_signature (tempfp);
/*
append_signature (tempfp);
/*
@@
-1449,7
+1448,7
@@
int ci_send_message (int flags, /* send mode */
if (mutt_needs_mailcap (msg->content)) {
if (!mutt_edit_attachment (msg->content))
goto cleanup;
if (mutt_needs_mailcap (msg->content)) {
if (!mutt_edit_attachment (msg->content))
goto cleanup;
- } else if (!Editor ||
str_cmp
("builtin", Editor) == 0)
+ } else if (!Editor ||
m_strcmp
("builtin", Editor) == 0)
mutt_builtin_editor (msg->content->filename, msg, cur);
else if (option (OPTEDITHDRS)) {
mutt_env_to_local (msg->env);
mutt_builtin_editor (msg->content->filename, msg, cur);
else if (option (OPTEDITHDRS)) {
mutt_env_to_local (msg->env);
@@
-1701,7
+1700,7
@@
int ci_send_message (int flags, /* send mode */
fcc[0] = '\0';
#endif
fcc[0] = '\0';
#endif
- if (*fcc &&
str_cmp
("/dev/null", fcc) != 0) {
+ if (*fcc &&
m_strcmp
("/dev/null", fcc) != 0) {
BODY *tmpbody = msg->content;
BODY *save_sig = NULL;
BODY *save_parts = NULL;
BODY *tmpbody = msg->content;
BODY *save_sig = NULL;
BODY *save_parts = NULL;
@@
-1712,8
+1711,8
@@
int ci_send_message (int flags, /* send mode */
/* check to see if the user wants copies of all attachments */
if (!option (OPTFCCATTACH) && msg->content->type == TYPEMULTIPART) {
if (WithCrypto
/* check to see if the user wants copies of all attachments */
if (!option (OPTFCCATTACH) && msg->content->type == TYPEMULTIPART) {
if (WithCrypto
- && (
str_cmp
(msg->content->subtype, "encrypted") == 0 ||
-
str_cmp
(msg->content->subtype, "signed") == 0)) {
+ && (
m_strcmp
(msg->content->subtype, "encrypted") == 0 ||
+
m_strcmp
(msg->content->subtype, "signed") == 0)) {
if (clear_content->type == TYPEMULTIPART) {
if (!(msg->security & ENCRYPT) && (msg->security & SIGN)) {
/* save initial signature and attachments */
if (clear_content->type == TYPEMULTIPART) {
if (!(msg->security & ENCRYPT) && (msg->security & SIGN)) {
/* save initial signature and attachments */