From c55c34f4a08829c2734168a912c0ad371b934d30 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 13 Oct 2009 13:28:13 -0700 Subject: [PATCH] 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). --- .gitignore | 3 ++- Makefile | 7 +++---- g_mime_test.c => notmuch-index-message.cc | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) rename g_mime_test.c => notmuch-index-message.cc (99%) 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 similarity index 99% rename from g_mime_test.c rename to 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; } -- 2.43.0