projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wibble.
[apps/madmutt.git]
/
copy.c
diff --git
a/copy.c
b/copy.c
index
65ed14c
..
d386400
100644
(file)
--- a/
copy.c
+++ b/
copy.c
@@
-10,12
+10,13
@@
#include <lib-lib/lib-lib.h>
#include <lib-mime/mime.h>
#include <lib-lib/lib-lib.h>
#include <lib-mime/mime.h>
+#include <lib-mx/mx.h>
#include "mutt.h"
#include "handler.h"
#include "mutt.h"
#include "handler.h"
-#include "mx.h"
#include "copy.h"
#include <lib-crypt/crypt.h>
#include "copy.h"
#include <lib-crypt/crypt.h>
+#include <lib-ui/curses.h>
#include "mutt_idna.h"
static int address_header_decode (char **str);
#include "mutt_idna.h"
static int address_header_decode (char **str);
@@
-32,7
+33,7
@@
mutt_copy_hdr (FILE* in, FILE* out, off_t off_start, off_t off_end,
int this_is_from;
int ignore = 0;
char buf[STRING]; /* should be long enough to get most fields in one pass */
int this_is_from;
int ignore = 0;
char buf[STRING]; /* should be long enough to get most fields in one pass */
- char *
n
l;
+ char *
eo
l;
string_list_t *t;
char **headers;
int hdr_count;
string_list_t *t;
char **headers;
int hdr_count;
@@
-54,13
+55,13
@@
mutt_copy_hdr (FILE* in, FILE* out, off_t off_start, off_t off_end,
* we can do a more efficient line to line copying
*/
while (ftello (in) < off_end) {
* we can do a more efficient line to line copying
*/
while (ftello (in) < off_end) {
-
n
l = strchr (buf, '\n');
+
eo
l = strchr (buf, '\n');
if ((fgets (buf, sizeof (buf), in)) == NULL)
break;
/* Is it the begining of a header? */
if ((fgets (buf, sizeof (buf), in)) == NULL)
break;
/* Is it the begining of a header? */
- if (
n
l && buf[0] != ' ' && buf[0] != '\t') {
+ if (
eo
l && buf[0] != ' ' && buf[0] != '\t') {
ignore = 1;
if (!from && m_strncmp("From ", buf, 5) == 0) {
if ((flags & CH_FROM) == 0)
ignore = 1;
if (!from && m_strncmp("From ", buf, 5) == 0) {
if ((flags & CH_FROM) == 0)
@@
-115,14
+116,14
@@
mutt_copy_hdr (FILE* in, FILE* out, off_t off_start, off_t off_end,
/* Read all the headers into the array */
while (ftello (in) < off_end) {
/* Read all the headers into the array */
while (ftello (in) < off_end) {
-
n
l = strchr (buf, '\n');
+
eo
l = strchr (buf, '\n');
/* Read a line */
if ((fgets (buf, sizeof (buf), in)) == NULL)
break;
/* Is it the begining of a header? */
/* Read a line */
if ((fgets (buf, sizeof (buf), in)) == NULL)
break;
/* Is it the begining of a header? */
- if (
n
l && buf[0] != ' ' && buf[0] != '\t') {
+ if (
eo
l && buf[0] != ' ' && buf[0] != '\t') {
/* set curline to 1 for To:/Cc:/Bcc: and 0 otherwise */
curline = (flags & CH_WEED) && (m_strncmp("To:", buf, 3) == 0 ||
/* set curline to 1 for To:/Cc:/Bcc: and 0 otherwise */
curline = (flags & CH_WEED) && (m_strncmp("To:", buf, 3) == 0 ||
@@
-615,12
+616,12
@@
_mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body,
fseeko (fp, cur->offset, 0);
if (mutt_copy_bytes (fp, fpout, cur->length) == -1) {
fseeko (fp, cur->offset, 0);
if (mutt_copy_bytes (fp, fpout, cur->length) == -1) {
-
fclose (
fp);
+
m_fclose(&
fp);
body_list_wipe(&cur);
return (-1);
}
body_list_wipe(&cur);
body_list_wipe(&cur);
return (-1);
}
body_list_wipe(&cur);
-
fclose (
fp);
+
m_fclose(&
fp);
}
else {
fseeko (fpin, body->offset, 0);
}
else {
fseeko (fpin, body->offset, 0);