From: Glenn Morris Date: Wed, 11 Feb 2009 03:59:52 +0000 (+0000) Subject: (mbx_delimit_begin): Also write the current time. X-Git-Tag: emacs-pretest-23.0.91~299 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d228a23c4af25dc5ff8c9f92492f5aacda5c607b;p=emacs.git (mbx_delimit_begin): Also write the current time. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index dc74be755fa..dd5c78d0a6f 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2009-02-11 Glenn Morris + + * movemail.c (mbx_delimit_begin): Also write the current time. + 2009-02-10 Glenn Morris * movemail.c (mbx_delimit_begin, mbx_delimit_end): Write mbox rather diff --git a/lib-src/movemail.c b/lib-src/movemail.c index d452fd15a78..d9443740b4b 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -683,6 +683,8 @@ xmalloc (size) #include #endif #include +#include +#include #define NOTOK (-1) #define OK 0 @@ -923,7 +925,16 @@ int mbx_delimit_begin (mbf) FILE *mbf; { - if (fputs ("From movemail\n", mbf) == EOF) + time_t now; + struct tm *ltime; + char fromline[40] = "From movemail "; + + now = time (NULL); + ltime = localtime (&now); + + strcat (fromline, asctime (ltime)); + + if (fputs (fromline, mbf) == EOF) return (NOTOK); return (OK); }