projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove some mutt_mktemp
[apps/madmutt.git]
/
handler.c
diff --git
a/handler.c
b/handler.c
index
26d1a99
..
cc0a3c1
100644
(file)
--- a/
handler.c
+++ b/
handler.c
@@
-7,17
+7,6
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-
#include <lib-lib/lib-lib.h>
#include <lib-mime/mime.h>
#include <lib-lib/lib-lib.h>
#include <lib-mime/mime.h>
@@
-25,6
+14,8
@@
#include <lib-ui/curses.h>
#include <lib-ui/curses.h>
+#include <lib-sys/unix.h>
+
#include "mutt.h"
#include "recvattach.h"
#include "handler.h"
#include "mutt.h"
#include "recvattach.h"
#include "handler.h"
@@
-148,7
+139,7
@@
static void qp_decode_line (char *dest, char *src, ssize_t * l, int last)
*
*/
*
*/
-void mutt_decode_quoted (STATE * s, long len, int istext, iconv_t cd)
+
static
void mutt_decode_quoted (STATE * s, long len, int istext, iconv_t cd)
{
char line[STRING];
char decline[2 * STRING];
{
char line[STRING];
char decline[2 * STRING];
@@
-279,14
+270,14
@@
void mutt_decode_base64 (STATE * s, long len, int istext, iconv_t cd)
state_reset_prefix (s);
}
state_reset_prefix (s);
}
-unsigned char decode_byte (char ch)
+
static
unsigned char decode_byte (char ch)
{
if (ch == 96)
return 0;
return ch - 32;
}
{
if (ch == 96)
return 0;
return ch - 32;
}
-void mutt_decode_uuencoded (STATE * s, long len, int istext, iconv_t cd)
+
static
void mutt_decode_uuencoded (STATE * s, long len, int istext, iconv_t cd)
{
char tmps[SHORT_STRING];
char linelen, c, l, out;
{
char tmps[SHORT_STRING];
char linelen, c, l, out;
@@
-640,7
+631,7
@@
static void enriched_set_flags (const char *tag, struct enriched_state *stte)
}
}
}
}
-int text_enriched_handler (BODY * a, STATE * s)
+
static
int text_enriched_handler (BODY * a, STATE * s)
{
enum {
TEXT, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
{
enum {
TEXT, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
@@
-1397,10
+1388,9
@@
int mutt_body_handler (BODY * b, STATE * s)
if (!plaintext) {
/* decode to a tempfile, saving the original destination */
fp = s->fpout;
if (!plaintext) {
/* decode to a tempfile, saving the original destination */
fp = s->fpout;
-
mutt_mktemp (tempfile
);
- if (
(s->fpout = safe_fopen (tempfile, "w")) == NULL
) {
+
s->fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL
);
+ if (
!s->fpout
) {
mutt_error _("Unable to open temporary file!");
mutt_error _("Unable to open temporary file!");
-
goto bail;
}
/* decoding the attachment changes the size and offset, so save a copy
goto bail;
}
/* decoding the attachment changes the size and offset, so save a copy
@@
-1416,9
+1406,9
@@
int mutt_body_handler (BODY * b, STATE * s)
s->prefix = NULL;
decode = 1;
s->prefix = NULL;
decode = 1;
- }
- else
+ } else {
b->type = TYPETEXT;
b->type = TYPETEXT;
+ }
mutt_decode_attachment (b, s);
mutt_decode_attachment (b, s);