In preparation for actually creating a Xapian index from the
message, (not that we're doing that quite yet).
xapian-dump
-g_mime_test
+notmuch-index-message
+
-PROGS=g_mime_test xapian-dump
+PROGS=notmuch-index-message xapian-dump
-MYCFLAGS=-Wall
MYCXXFLAGS=-Wall
all: $(PROGS)
-g_mime_test: g_mime_test.c
- $(CC) $(CFLAGS) $(MYCFLAGS) g_mime_test.c `pkg-config --cflags --libs gmime-2.4` -o g_mime_test
+notmuch-index-message: notmuch-index-message.cc
+ $(CC) $(CXXFLAGS) $(MYCXXFLAGS) notmuch-index-message.cc `pkg-config --cflags --libs gmime-2.4` `xapian-config --cxxflags --libs` -o notmuch-index-message
xapian-dump: xapian-dump.cc
$(CXX) $(CXXFLAGS) $(MYCXXFLAGS) xapian-dump.cc `xapian-config --libs --cxxflags` -o xapian-dump
static const char *
find_prefix (const char *name)
{
- int i;
+ unsigned int i;
for (i = 0; i < ARRAY_SIZE (NORMAL_PREFIX); i++)
if (strcmp (name, NORMAL_PREFIX[i].name) == 0)
fprintf (stderr, "Error opening %s: %s\n", filename, strerror (errno));
exit (1);
}
-
+
g_mime_init (0);
-
+
stream = g_mime_stream_file_new (file);
parser = g_mime_parser_new_with_stream (stream);
g_object_unref (message);
g_object_unref (parser);
g_object_unref (stream);
-
+
return 0;
}