]> git.notmuchmail.org Git - notmuch/blobdiff - date.c
date.c: Rename function to notmuch_parse_date
[notmuch] / date.c
diff --git a/date.c b/date.c
index 102d688afc86e1d8791a191ce5b5eed558194f5c..7fdbb7101cf4d447ec649f225ef512cbc5c84af8 100644 (file)
--- a/date.c
+++ b/date.c
@@ -115,8 +115,8 @@ typedef struct _date_token {
        size_t len;
 } date_token;
 
-#define date_token_free(tok) g_slice_free (date_token, tok)
-#define date_token_new() g_slice_new (date_token)
+#define date_token_free(tok) free (tok)
+#define date_token_new() malloc (sizeof (date_token))
 
 static date_token *
 datetok (const char *date)
@@ -363,6 +363,8 @@ get_tzone (date_token **token)
        return -1;
 }
 
+#define HAVE_TIMEZONE
+
 static time_t
 mktime_utc (struct tm *tm)
 {
@@ -636,21 +638,8 @@ gmime_datetok_table_init (void)
 }
 #endif
 
-
-/**
- * g_mime_utils_header_decode_date:
- * @str: input date string
- * @tz_offset: timezone offset
- *
- * Decodes the rfc822 date string and saves the GMT offset into
- * @tz_offset if non-NULL.
- *
- * Returns: the time_t representation of the date string specified by
- * @str or (time_t) %0 on error. If @tz_offset is non-NULL, the value
- * of the timezone offset will be stored.
- **/
 time_t
-g_mime_utils_header_decode_date (const char *str, int *tz_offset)
+notmuch_parse_date (const char *str, int *tz_offset)
 {
        date_token *token, *tokens;
        time_t date;