]> git.eshelyaron.com Git - emacs.git/commitdiff
(mbx_delimit_begin): Also write the current time.
authorGlenn Morris <rgm@gnu.org>
Wed, 11 Feb 2009 03:59:52 +0000 (03:59 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 11 Feb 2009 03:59:52 +0000 (03:59 +0000)
lib-src/ChangeLog
lib-src/movemail.c

index dc74be755fa3a125c51614d1420b31e8588527a2..dd5c78d0a6fe054f17cd8f784f7557c75cf36636 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-11  Glenn Morris  <rgm@gnu.org>
+
+       * movemail.c (mbx_delimit_begin): Also write the current time.
+
 2009-02-10  Glenn Morris  <rgm@gnu.org>
 
        * movemail.c (mbx_delimit_begin, mbx_delimit_end): Write mbox rather
index d452fd15a782dd60adcbca7c3f4f238bcddcfe7f..d9443740b4bc433da33c36f735b624450eaecee2 100644 (file)
@@ -683,6 +683,8 @@ xmalloc (size)
 #include <winsock.h>
 #endif
 #include <pwd.h>
+#include <string.h>
+#include <time.h>
 
 #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);
 }