Hook up our fancy new notmuch_parse_date function.

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.
This commit is contained in:
Carl Worth 2009-10-19 13:35:29 -07:00
parent 401c6cc579
commit fa562fa22b
3 changed files with 3 additions and 3 deletions

View file

@ -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

View 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) {

2
date.c
View file

@ -27,6 +27,8 @@
#include <time.h>
#include <glib.h> /* For g_ascii_strncasecmp only. */
#ifndef FALSE
#define FALSE 0
#endif