aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-13 13:28:13 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-13 13:31:17 -0700
commitc55c34f4a08829c2734168a912c0ad371b934d30 (patch)
treebfee05f3366b11bde16f353e3fae12426227ea57
parenta68a023d474931d8dfad27596a16511851b4d063 (diff)
Rename g_mime_test to notmuch-index-message
In preparation for actually creating a Xapian index from the message, (not that we're doing that quite yet).
-rw-r--r--.gitignore3
-rw-r--r--Makefile7
-rw-r--r--notmuch-index-message.cc (renamed from g_mime_test.c)8
3 files changed, 9 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index de876006..d74db384 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
xapian-dump
-g_mime_test
+notmuch-index-message
+
diff --git a/Makefile b/Makefile
index 614c5760..bf3a5200 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,11 @@
-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
diff --git a/g_mime_test.c b/notmuch-index-message.cc
index 5ac9200c..cf99e6e4 100644
--- a/g_mime_test.c
+++ b/notmuch-index-message.cc
@@ -64,7 +64,7 @@ prefix_t BOOLEAN_PREFIX[] = {
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)
@@ -175,9 +175,9 @@ main (int argc, char **argv)
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);
@@ -238,6 +238,6 @@ main (int argc, char **argv)
g_object_unref (message);
g_object_unref (parser);
g_object_unref (stream);
-
+
return 0;
}