X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-mime%2Frfc3676.c;h=404b02b419e2f085ef57f63da32f4c39ce9c97b7;hb=5b365d691700e8e59f96dfa3a4c209574da29898;hp=1fdcf0d5ebed1a6d3932c77b0d564c521cbf5cac;hpb=8d5f74a1030b2e5e93027c91c35b7facea2d61be;p=apps%2Fmadmutt.git diff --git a/lib-mime/rfc3676.c b/lib-mime/rfc3676.c index 1fdcf0d..404b02b 100644 --- a/lib-mime/rfc3676.c +++ b/lib-mime/rfc3676.c @@ -9,26 +9,14 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include +#include + +#include #include #include "state.h" +#include "rfc3676.h" #define FLOWED_MAX 77 @@ -214,6 +202,18 @@ int rfc3676_handler (BODY * a, STATE * s) { return (0); } +/* sets mtime of 'to' to mtime of 'from' */ +static void mutt_set_mtime (const char* from, const char* to) { + struct utimbuf utim; + struct stat st; + + if (stat (from, &st) != -1) { + utim.actime = st.st_mtime; + utim.modtime = st.st_mtime; + utime (to, &utim); + } +} + void rfc3676_space_stuff (HEADER* hdr) { FILE* in = NULL, *out = NULL; char buf[LONG_STRING]; @@ -231,7 +231,7 @@ void rfc3676_space_stuff (HEADER* hdr) { } while (fgets (buf, sizeof (buf), in)) { - if (ascii_strncmp ("From ", buf, 4) == 0 || buf[0] == ' ') { + if (m_strncmp("From ", buf, 4) == 0 || buf[0] == ' ') { fputc (' ', out); } fputs (buf, out);