X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=copy.c;h=c63ab8d67bd94700c8e56de920e218e206340150;hb=fcaada9d60ee8f52bbc8503c06fe061ca9e2fa68;hp=65ed14cfe5c2cb6b8b13fb62d481da0389db5eff;hpb=16536d59024177409f49134c3f03f69855c144b9;p=apps%2Fmadmutt.git diff --git a/copy.c b/copy.c index 65ed14c..c63ab8d 100644 --- a/copy.c +++ b/copy.c @@ -10,12 +10,13 @@ #include #include +#include #include "mutt.h" #include "handler.h" -#include "mx.h" #include "copy.h" #include +#include #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 */ - char *nl; + char *eol; 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) { - nl = strchr (buf, '\n'); + eol = strchr (buf, '\n'); if ((fgets (buf, sizeof (buf), in)) == NULL) break; /* Is it the begining of a header? */ - if (nl && buf[0] != ' ' && buf[0] != '\t') { + if (eol && buf[0] != ' ' && buf[0] != '\t') { 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) { - nl = strchr (buf, '\n'); + eol = strchr (buf, '\n'); /* Read a line */ if ((fgets (buf, sizeof (buf), in)) == NULL) break; /* Is it the begining of a header? */ - if (nl && buf[0] != ' ' && buf[0] != '\t') { + if (eol && 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 ||