Mercurial > emacs
diff lib-src/movemail.c @ 101936:696b3e7c297b
(mbx_delimit_begin): Also write the current time.
| author | Glenn Morris <rgm@gnu.org> |
|---|---|
| date | Wed, 11 Feb 2009 03:59:52 +0000 |
| parents | 091a8cf73243 |
| children | 86059ded629a |
line wrap: on
line diff
--- a/lib-src/movemail.c Wed Feb 11 03:52:56 2009 +0000 +++ b/lib-src/movemail.c Wed Feb 11 03:59:52 2009 +0000 @@ -683,6 +683,8 @@ #include <winsock.h> #endif #include <pwd.h> +#include <string.h> +#include <time.h> #define NOTOK (-1) #define OK 0 @@ -923,7 +925,16 @@ 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); }
