projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move more functions in file.c
[apps/madmutt.git]
/
sendlib.c
diff --git
a/sendlib.c
b/sendlib.c
index
f5bbd84
..
cfb71cf
100644
(file)
--- a/
sendlib.c
+++ b/
sendlib.c
@@
-231,7
+231,8
@@
static void encode_base64 (fgetconv_t * fc, FILE * fout, int istext)
fputc ('\n', fout);
}
fputc ('\n', fout);
}
-static void encode_8bit (fgetconv_t * fc, FILE * fout, int istext)
+static void encode_8bit (fgetconv_t * fc, FILE * fout,
+ int istext __attribute__ ((unused)))
{
int ch;
{
int ch;
@@
-395,7
+396,7
@@
int mutt_write_mime_body (BODY * a, FILE * f)
#undef write_as_text_part
fgetconv_close (&fc);
#undef write_as_text_part
fgetconv_close (&fc);
-
fclose (
fpin);
+
m_fclose(&
fpin);
return (ferror (f) ? -1 : 0);
}
return (ferror (f) ? -1 : 0);
}
@@
-885,7
+886,7
@@
int mutt_lookup_mime_type (BODY * att, const char *path)
p = NULL;
}
}
p = NULL;
}
}
-
fclose (
f);
+
m_fclose(&
f);
}
}
}
}
@@
-918,7
+919,7
@@
void mutt_message_to_7bit (BODY * a, FILE * fp)
a->offset = 0;
if (stat (a->filename, &sb) == -1) {
mutt_perror ("stat");
a->offset = 0;
if (stat (a->filename, &sb) == -1) {
mutt_perror ("stat");
-
fclose (
fpin);
+
m_fclose(&
fpin);
}
a->length = sb.st_size;
}
}
a->length = sb.st_size;
}
@@
-946,9
+947,9
@@
cleanup:
p_delete(&line);
if (fpin && !fp)
p_delete(&line);
if (fpin && !fp)
-
fclose (
fpin);
+
m_fclose(&
fpin);
if (fpout)
if (fpout)
-
fclose (
fpout);
+
m_fclose(&
fpout);
else
return;
else
return;
@@
-995,7
+996,7
@@
static void transform_to_7bit (BODY * a, FILE * fpin)
}
s.fpin = fpin;
mutt_decode_attachment (a, &s);
}
s.fpin = fpin;
mutt_decode_attachment (a, &s);
-
fclose (
s.fpout);
+
m_fclose(&
s.fpout);
a->d_filename = a->filename;
a->filename = m_strdup(buff);
a->unlink = 1;
a->d_filename = a->filename;
a->filename = m_strdup(buff);
a->unlink = 1;
@@
-1112,8
+1113,8
@@
BODY *mutt_make_message_attach (CONTEXT * ctx, HEADER * hdr, int attach_msg)
return (NULL);
}
return (NULL);
}
-
mutt_mktemp (buffer
);
- if (
(fp = safe_fopen (buffer, "w+")) == NULL
)
+
fp = m_tempfile(buffer, sizeof(buffer), NONULL(Tempdir), NULL
);
+ if (
!fp
)
return NULL;
body = body_new();
return NULL;
body = body_new();
@@
-1167,7
+1168,7
@@
BODY *mutt_make_message_attach (CONTEXT * ctx, HEADER * hdr, int attach_msg)
mutt_update_encoding (body);
body->parts = body->hdr->content;
mutt_update_encoding (body);
body->parts = body->hdr->content;
-
fclose (
fp);
+
m_fclose(&
fp);
return (body);
}
return (body);
}
@@
-1680,7
+1681,7
@@
static char *mutt_gen_msgid (void)
return m_strdup(buf);
}
return m_strdup(buf);
}
-static RETSIGTYPE alarm_handler (int sig)
+static RETSIGTYPE alarm_handler (int sig
__attribute__ ((unused))
)
{
SigAlrm = 1;
}
{
SigAlrm = 1;
}
@@
-2085,7
+2086,7
@@
static int _mutt_bounce_message (FILE * fp, HEADER * h, address_t * to,
mutt_copy_header (fp, h, f, ch_flags, NULL);
fputc ('\n', f);
mutt_copy_bytes (fp, f, h->content->length);
mutt_copy_header (fp, h, f, ch_flags, NULL);
fputc ('\n', f);
mutt_copy_bytes (fp, f, h->content->length);
-
fclose (
f);
+
m_fclose(&
f);
ret = mutt_invoke_mta(env_from, to, NULL, NULL, tempfile,
h->content->encoding == ENC8BIT);
ret = mutt_invoke_mta(env_from, to, NULL, NULL, tempfile,
h->content->encoding == ENC8BIT);
@@
-2265,7
+2266,7
@@
int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid,
fflush (tempfp);
if (ferror (tempfp)) {
fflush (tempfp);
if (ferror (tempfp)) {
-
fclose (
tempfp);
+
m_fclose(&
tempfp);
unlink (tempfile);
mx_commit_message (msg, &f); /* XXX - really? */
mx_close_message (&msg);
unlink (tempfile);
mx_commit_message (msg, &f); /* XXX - really? */
mx_close_message (&msg);
@@
-2283,7
+2284,7
@@
int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid,
/* copy the body and clean up */
rewind (tempfp);
r = mutt_copy_stream (tempfp, msg->fp);
/* copy the body and clean up */
rewind (tempfp);
r = mutt_copy_stream (tempfp, msg->fp);
- if (
fclose (
tempfp) != 0)
+ if (
m_fclose(&
tempfp) != 0)
r = -1;
/* if there was an error, leave the temp version */
if (!r)
r = -1;
/* if there was an error, leave the temp version */
if (!r)