diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-12-05 20:09:36 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-12-05 20:19:49 +0200 |
commit | 937173596bd77d773c3fc8330a1ebbe2c8c13df6 (patch) | |
tree | 559222a39bffe42f3b0ac9df12cc0a7a1d65f24f /mail | |
parent | 025c888ab07458c7b2a1e73d6b607cc9ce26cca6 (diff) | |
download | mailutils-937173596bd77d773c3fc8330a1ebbe2c8c13df6.tar.gz mailutils-937173596bd77d773c3fc8330a1ebbe2c8c13df6.tar.bz2 |
Implement mu_scan_datetime.
* include/mailutils/stream.h (mu_fixed_memory_stream_create): New proto.
* libmailutils/stream/memory_stream.c
(mu_fixed_memory_stream_create): New function.
* include/mailutils/util.h (mu_parse_imap_date_time)
(mu_parse_ctime_date_time): Remove.
(mu_scan_datetime): New proto.
(mu_strftime): Remove const from the last arg.
(MU_DATETIME_FROM,MU_DATETIME_IMAP)
(MU_DATETIME_IMAP_SEARCH,MU_DATETIME_INTERNALDATE): New defines.
* libmailutils/base/strftime.c: New file.
* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add strftime.c.
* libmailutils/base/date.c (mu_scan_datetime): New function.
* libmailutils/base/mutil.c (mu_strftime): Remove.
* libmailutils/tests/scantime.at: New file.
* libmailutils/tests/scantime.c: New file.
* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add scantime.
(TESTSUITE_AT): Add scantime.at.
* libmailutils/tests/strftime.c (main): Call mu_set_program_name.
* libmailutils/tests/testsuite.at: Include scantime.at
* libmu_sieve/actions.c (mime_create_reason): Use mu_c_streamftime.
* imap4d/fetch.c (_frt_internaldate): Use mu_scan_datetime.
* imap4d/util.c (util_parse_internal_date): Likewise.
* libmu_scm/mu_message.c (mu-message-get-envelope-date): Likewise.
* libproto/imap/fetch.c (_date_mapper): Likewise.
* mail/from.c (hdr_date): Use mu_scan_datetime.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/from.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mail/from.c b/mail/from.c index f3a291211..e4aeda2f5 100644 --- a/mail/from.c +++ b/mail/from.c @@ -213,7 +213,7 @@ hdr_date (struct header_call_args *args, void *data) mu_message_get_envelope (args->msg, &env); if (mu_envelope_sget_date (env, &p) == 0 - && mu_parse_ctime_date_time (&p, &tm, &tz) == 0) + && mu_scan_datetime (p, MU_DATETIME_FROM, &tm, &tz, NULL) == 0) strftime (date, sizeof(date), "%a %b %e %H:%M", &tm); } return header_buf_string (args, date); |