]> git.notmuchmail.org Git - notmuch/commitdiff
Hook up our fancy new notmuch_parse_date function.
authorCarl Worth <cworth@cworth.org>
Mon, 19 Oct 2009 20:35:29 +0000 (13:35 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 19 Oct 2009 20:35:29 +0000 (13:35 -0700)
With all the de-glib-ification out of the way, we can now use it
to allow for date-based sorting of Xapian search results.

Makefile
database.cc
date.c

index b7ebfb816802cb4a4a1ff7ee3b2c0330a1fe33d2..ef8d6410ad26a2202fbc2fd44fcd7493d145b4ac 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ all: $(PROGS)
 %.o: %.c
        $(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@
 
-notmuch: notmuch.o database.o message.o xutil.o
+notmuch: notmuch.o database.o date.o message.o xutil.o
        $(CC) $(MYLDFLAGS) $^ -o $@
 
 notmuch-index-message: notmuch-index-message.cc
index 7ea1f4168fb42bea820e147a0bfed14654258364..6ac04f74ee4f4dbbd19908f3d82c47c554458d2d 100644 (file)
@@ -554,13 +554,11 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
 
        free (message_id);
 
-/*
        date = notmuch_message_get_header (message, "date");
        time_value = notmuch_parse_date (date, NULL);
 
        doc.add_value (NOTMUCH_VALUE_DATE,
                       Xapian::sortable_serialise (time_value));
-*/
 
        db->add_document (doc);
     } catch (const Xapian::Error &error) {
diff --git a/date.c b/date.c
index 3f337c962247f71c37ae217bc3fd18be959bbd5d..c116bbd5f432f54dfa41b6aa991a0caccdd0b972 100644 (file)
--- a/date.c
+++ b/date.c
@@ -27,6 +27,8 @@
 
 #include <time.h>
 
+#include <glib.h> /* For g_ascii_strncasecmp only. */
+
 #ifndef FALSE
 #define FALSE 0
 #endif