char *ob;
size_t ibl, obl, ubl, ubl1, n, ret;
int i;
char *ob;
size_t ibl, obl, ubl, ubl1, n, ret;
int i;
- n = iconv (cd1, ibl ? &ib : 0, &ibl, &ob, &obl);
+ n = my_iconv(cd1, ibl ? &ib : 0, &ibl, &ob, &obl);
assert (n == (size_t) (-1) || !n || ICONV_NONTRANS);
if (n == (size_t) (-1) &&
((errno != EINVAL && errno != E2BIG) || ib == bufi)) {
assert (n == (size_t) (-1) || !n || ICONV_NONTRANS);
if (n == (size_t) (-1) &&
((errno != EINVAL && errno != E2BIG) || ib == bufi)) {
if (cd[i] != (iconv_t) (-1) && score[i] != (size_t) (-1)) {
ub = bufu, ubl = ubl1;
ob = bufo, obl = sizeof (bufo);
if (cd[i] != (iconv_t) (-1) && score[i] != (size_t) (-1)) {
ub = bufu, ubl = ubl1;
ob = bufo, obl = sizeof (bufo);
- n = iconv (cd[i], (ibl || ubl) ? &ub : 0, &ubl, &ob, &obl);
+ n = my_iconv(cd[i], (ibl || ubl) ? &ub : 0, &ubl, &ob, &obl);
if (n == (size_t) (-1)) {
assert (errno == E2BIG ||
(BUGGY_ICONV && (errno == EILSEQ || errno == ENOENT)));
if (n == (size_t) (-1)) {
assert (errno == E2BIG ||
(BUGGY_ICONV && (errno == EILSEQ || errno == ENOENT)));
/*
* can't use strtok() because we use it in an inner loop below, so use
* a switch statement here instead.
/*
* can't use strtok() because we use it in an inner loop below, so use
* a switch statement here instead.
default:
debug_print (1, ("Internal error, count = %d.\n", count));
goto bye; /* shouldn't happen */
default:
debug_print (1, ("Internal error, count = %d.\n", count));
goto bye; /* shouldn't happen */
a->parts = mutt_parse_messageRFC822 (fpin, a);
transform_to_7bit (a->parts, fpin);
a->parts = mutt_parse_messageRFC822 (fpin, a);
transform_to_7bit (a->parts, fpin);
mutt_copy_hdr (fpin, fpout, a->offset, a->offset + a->length,
CH_MIME | CH_NONEWLINE | CH_XMIT, NULL);
mutt_copy_hdr (fpin, fpout, a->offset, a->offset + a->length,
CH_MIME | CH_NONEWLINE | CH_XMIT, NULL);
mutt_write_mime_header (a->parts, fpout);
fputc ('\n', fpout);
mutt_write_mime_body (a->parts, fpout);
mutt_write_mime_header (a->parts, fpout);
fputc ('\n', fpout);
mutt_write_mime_body (a->parts, fpout);
#ifdef USE_NNTP
if (env->newsgroups)
fprintf (fp, "Newsgroups: %s\n", env->newsgroups);
else if (mode == 1 && option (OPTNEWSSEND) && EDIT_HEADER("Newsgroups:"))
#ifdef USE_NNTP
if (env->newsgroups)
fprintf (fp, "Newsgroups: %s\n", env->newsgroups);
else if (mode == 1 && option (OPTNEWSSEND) && EDIT_HEADER("Newsgroups:"))
if (env->followup_to)
fprintf (fp, "Followup-To: %s\n", env->followup_to);
else if (mode == 1 && option (OPTNEWSSEND) && EDIT_HEADER("Followup-To:"))
if (env->followup_to)
fprintf (fp, "Followup-To: %s\n", env->followup_to);
else if (mode == 1 && option (OPTNEWSSEND) && EDIT_HEADER("Followup-To:"))
if (env->x_comment_to)
fprintf (fp, "X-Comment-To: %s\n", env->x_comment_to);
else if (mode == 1 && option (OPTNEWSSEND) && option (OPTXCOMMENTTO) &&
EDIT_HEADER("X-Comment-To:"))
if (env->x_comment_to)
fprintf (fp, "X-Comment-To: %s\n", env->x_comment_to);
else if (mode == 1 && option (OPTNEWSSEND) && option (OPTXCOMMENTTO) &&
EDIT_HEADER("X-Comment-To:"))
#endif
if (env->subject)
fprintf (fp, "Subject: %s\n", env->subject);
else if (mode == 1 && EDIT_HEADER("Subject:"))
#endif
if (env->subject)
fprintf (fp, "Subject: %s\n", env->subject);
else if (mode == 1 && EDIT_HEADER("Subject:"))
mutt_write_address_list (env->reply_to, fp, 10, 0);
}
else if (mode > 0 && EDIT_HEADER("Reply-To:"))
mutt_write_address_list (env->reply_to, fp, 10, 0);
}
else if (mode > 0 && EDIT_HEADER("Reply-To:"))
}
/* Add a vanity header */
fprintf (fp, "User-Agent: %s (%s)\n", mutt_make_version (0), os);
}
/* Add a vanity header */
fprintf (fp, "User-Agent: %s (%s)\n", mutt_make_version (0), os);
-send_msg (const char *path, char **args, const char *msg, char **tempfile)
+send_msg(const char *path, const char **args, const char *msg, char **tempfile)
-static char **add_args (char **args, size_t * argslen, size_t * argsmax,
- ADDRESS * addr)
+static const char **
+add_args(const char **args, size_t *argslen, size_t *argsmax, ADDRESS * addr)
{
for (; addr; addr = addr->next) {
/* weed out group mailboxes, since those are for display only */
{
for (; addr; addr = addr->next) {
/* weed out group mailboxes, since those are for display only */
-static char **add_option (char **args, size_t * argslen, size_t * argsmax,
- char *s)
+static const char **
+add_option(const char **args, size_t *argslen, size_t *argsmax, const char *s)
- if (*argslen == *argsmax)
- mem_realloc (&args, (*argsmax += 5) * sizeof (char *));
- args[(*argslen)++] = s;
- return (args);
+ if (*argslen == *argsmax) {
+ mem_realloc(&args, (*argsmax += 5) * sizeof (char *));
+ }
+ args[(*argslen)++] = s;
+ return (args);
int eightbit)
{ /* message contains 8bit chars */
char *ps = NULL, *path = NULL, *s = NULL, *childout = NULL;
int eightbit)
{ /* message contains 8bit chars */
char *ps = NULL, *path = NULL, *s = NULL, *childout = NULL;
- args = add_option (args, &argslen, &argsmax, "-B8BITMIME");
+ args = add_option(args, &argslen, &argsmax, "-B8BITMIME");
fprintf (f, "Resent-From: %s", resent_from);
fprintf (f, "\nResent-%s", mutt_make_date (date, sizeof (date)));
if (MsgIdFormat && *MsgIdFormat)
fprintf (f, "Resent-From: %s", resent_from);
fprintf (f, "\nResent-%s", mutt_make_date (date, sizeof (date)));
if (MsgIdFormat && *MsgIdFormat)
fprintf (msg->fp, "Lines: %d\n\n", lines);
/* copy the body and clean up */
fprintf (msg->fp, "Lines: %d\n\n", lines);
/* copy the body and clean up */