From 3460dc5c49396e4270aaef3ed4063f59b5c91900 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 21 Dec 2001 19:51:58 +0000 Subject: Completely rewritten. It is now a load faster and a heck of a lot more 2001-12-21 Jeffrey Stedfast * broken-date-parser.c (parse_broken_date): Completely rewritten. It is now a load faster and a heck of a lot more accurate, also now returns a time_t and sets the saveoffset variable rather than returning a new char* buffer for the normal camel date parser to re-parse. This saves a fair number of cpu cycles :-) * camel-mime-utils.c (header_decode_date): Cleanup the broken date parsing code. svn path=/trunk/; revision=15205 --- camel/camel-mime-utils.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'camel/camel-mime-utils.c') diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 0d14cb035d..0834a73814 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -3326,21 +3326,12 @@ header_decode_date(const char *in, int *saveoffset) inptr++; } else { #ifndef CLEAN_DATE - char *newdate; - - w(g_warning("day not followed by ',' it's probably a broken mail client, so we'll ignore its date entirely")); - w(printf ("Giving it one last chance...\n")); - newdate = parse_broken_date (in); - if (newdate) { - w(printf ("Got: %s\n", newdate)); - t = header_decode_date (newdate, saveoffset); - g_free (newdate); - return t; - } -#endif + return parse_broken_date (in, saveoffset); +#else if (saveoffset) *saveoffset = 0; return 0; +#endif /* ! CLEAN_DATE */ } } } -- cgit v1.2.3