--- /dev/null
+Return-Path: <cceleri@cs.stanford.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 0DCB1431FC2\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 11:58:50 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id BR1npQAm0JHh for <notmuch@notmuchmail.org>;\r
+ Tue, 6 May 2014 11:58:41 -0700 (PDT)\r
+Received: from smtp1.cs.Stanford.EDU (smtp1.cs.Stanford.EDU [171.64.64.25])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 5E516431FAF\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 11:58:41 -0700 (PDT)\r
+Received: from c-24-11-133-78.hsd1.sc.comcast.net ([24.11.133.78]\r
+ helo=jane.lan)\r
+ by smtp1.cs.Stanford.EDU with esmtpsa (TLSv1:DHE-RSA-SEED-SHA:128)\r
+ (Exim 4.80.1) (envelope-from <cceleri@cs.stanford.edu>)\r
+ id 1WhkZb-0004tB-Jj; Tue, 06 May 2014 11:58:40 -0700\r
+From: Charles Celerier <cceleri@cs.stanford.edu>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] lib: Precede all function names in notmuch-private.h with an\r
+ underscore.\r
+Date: Tue, 6 May 2014 14:58:36 -0400\r
+Message-Id: <1399402716-13714-1-git-send-email-cceleri@cs.stanford.edu>\r
+X-Mailer: git-send-email 1.8.5.2 (Apple Git-48)\r
+X-Scan-Signature: 7030b7a26f924acffcd1b682d2211542\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 06 May 2014 18:58:50 -0000\r
+\r
+An underscore should precede every function name in\r
+lib/notmuch-private.h. This was not true and was noted by the failure of\r
+test T360-symbol-hiding on Mac OS/X. This patch inserts an underscore\r
+before each function name in lib/notmuch-private.h where the underscore\r
+was missing and renames functions appropriately where they are used.\r
+\r
+Signed-off-by: Charles Celerier <cceleri@cs.stanford.edu>\r
+---\r
+ lib/database.cc | 24 ++++++++++++------------\r
+ lib/message-file.c | 8 ++++----\r
+ lib/message.cc | 8 ++++----\r
+ lib/notmuch-private.h | 14 +++++++-------\r
+ lib/sha1.c | 4 ++--\r
+ lib/thread.cc | 4 ++--\r
+ 6 files changed, 31 insertions(+), 31 deletions(-)\r
+\r
+diff --git a/lib/database.cc b/lib/database.cc\r
+index 1efb14d..d9a01b7 100644\r
+--- a/lib/database.cc\r
++++ b/lib/database.cc\r
+@@ -356,7 +356,7 @@ _message_id_compressed (void *ctx, const char *message_id)\r
+ {\r
+ char *sha1, *compressed;\r
+ \r
+- sha1 = notmuch_sha1_of_string (message_id);\r
++ sha1 = _notmuch_sha1_of_string (message_id);\r
+ \r
+ compressed = talloc_asprintf (ctx, "notmuch-sha1-%s", sha1);\r
+ free (sha1);\r
+@@ -1356,7 +1356,7 @@ _notmuch_database_get_directory_db_path (const char *path)\r
+ int term_len = strlen (_find_prefix ("directory")) + strlen (path);\r
+ \r
+ if (term_len > NOTMUCH_TERM_MAX)\r
+- return notmuch_sha1_of_string (path);\r
++ return _notmuch_sha1_of_string (path);\r
+ else\r
+ return path;\r
+ }\r
+@@ -1758,12 +1758,12 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,\r
+ _my_talloc_free_for_g_hash, NULL);\r
+ this_message_id = notmuch_message_get_message_id (message);\r
+ \r
+- refs = notmuch_message_file_get_header (message_file, "references");\r
++ refs = _notmuch_message_file_get_header (message_file, "references");\r
+ last_ref_message_id = parse_references (message,\r
+ this_message_id,\r
+ parents, refs);\r
+ \r
+- in_reply_to = notmuch_message_file_get_header (message_file, "in-reply-to");\r
++ in_reply_to = _notmuch_message_file_get_header (message_file, "in-reply-to");\r
+ in_reply_to_message_id = parse_references (message,\r
+ this_message_id,\r
+ parents, in_reply_to);\r
+@@ -1961,7 +1961,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,\r
+ if (ret)\r
+ return ret;\r
+ \r
+- message_file = notmuch_message_file_open (filename);\r
++ message_file = _notmuch_message_file_open (filename);\r
+ if (message_file == NULL)\r
+ return NOTMUCH_STATUS_FILE_ERROR;\r
+ \r
+@@ -1982,9 +1982,9 @@ notmuch_database_add_message (notmuch_database_t *notmuch,\r
+ * let's make sure that what we're looking at looks like an\r
+ * actual email message.\r
+ */\r
+- from = notmuch_message_file_get_header (message_file, "from");\r
+- subject = notmuch_message_file_get_header (message_file, "subject");\r
+- to = notmuch_message_file_get_header (message_file, "to");\r
++ from = _notmuch_message_file_get_header (message_file, "from");\r
++ subject = _notmuch_message_file_get_header (message_file, "subject");\r
++ to = _notmuch_message_file_get_header (message_file, "to");\r
+ \r
+ if ((from == NULL || *from == '\0') &&\r
+ (subject == NULL || *subject == '\0') &&\r
+@@ -1997,7 +1997,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,\r
+ /* Now that we're sure it's mail, the first order of business\r
+ * is to find a message ID (or else create one ourselves). */\r
+ \r
+- header = notmuch_message_file_get_header (message_file, "message-id");\r
++ header = _notmuch_message_file_get_header (message_file, "message-id");\r
+ if (header && *header != '\0') {\r
+ message_id = _parse_message_id (message_file, header, NULL);\r
+ \r
+@@ -2018,7 +2018,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,\r
+ if (message_id == NULL ) {\r
+ /* No message-id at all, let's generate one by taking a\r
+ * hash over the file's contents. */\r
+- char *sha1 = notmuch_sha1_of_file (filename);\r
++ char *sha1 = _notmuch_sha1_of_file (filename);\r
+ \r
+ /* If that failed too, something is really wrong. Give up. */\r
+ if (sha1 == NULL) {\r
+@@ -2058,7 +2058,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,\r
+ if (ret)\r
+ goto DONE;\r
+ \r
+- date = notmuch_message_file_get_header (message_file, "date");\r
++ date = _notmuch_message_file_get_header (message_file, "date");\r
+ _notmuch_message_set_header_values (message, date, from, subject);\r
+ \r
+ ret = _notmuch_message_index_file (message, message_file);\r
+@@ -2087,7 +2087,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,\r
+ }\r
+ \r
+ if (message_file)\r
+- notmuch_message_file_close (message_file);\r
++ _notmuch_message_file_close (message_file);\r
+ \r
+ ret2 = notmuch_database_end_atomic (notmuch);\r
+ if ((ret == NOTMUCH_STATUS_SUCCESS ||\r
+diff --git a/lib/message-file.c b/lib/message-file.c\r
+index 6782882..f702eb5 100644\r
+--- a/lib/message-file.c\r
++++ b/lib/message-file.c\r
+@@ -99,19 +99,19 @@ _notmuch_message_file_open_ctx (void *ctx, const char *filename)\r
+ \r
+ FAIL:\r
+ fprintf (stderr, "Error opening %s: %s\n", filename, strerror (errno));\r
+- notmuch_message_file_close (message);\r
++ _notmuch_message_file_close (message);\r
+ \r
+ return NULL;\r
+ }\r
+ \r
+ notmuch_message_file_t *\r
+-notmuch_message_file_open (const char *filename)\r
++_notmuch_message_file_open (const char *filename)\r
+ {\r
+ return _notmuch_message_file_open_ctx (NULL, filename);\r
+ }\r
+ \r
+ void\r
+-notmuch_message_file_close (notmuch_message_file_t *message)\r
++_notmuch_message_file_close (notmuch_message_file_t *message)\r
+ {\r
+ talloc_free (message);\r
+ }\r
+@@ -277,7 +277,7 @@ _notmuch_message_file_get_combined_header (notmuch_message_file_t *message,\r
+ }\r
+ \r
+ const char *\r
+-notmuch_message_file_get_header (notmuch_message_file_t *message,\r
++_notmuch_message_file_get_header (notmuch_message_file_t *message,\r
+ const char *header)\r
+ {\r
+ const char *value;\r
+diff --git a/lib/message.cc b/lib/message.cc\r
+index 9243b76..eec8428 100644\r
+--- a/lib/message.cc\r
++++ b/lib/message.cc\r
+@@ -439,7 +439,7 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header)\r
+ if (message->message_file == NULL)\r
+ return NULL;\r
+ \r
+- return notmuch_message_file_get_header (message->message_file, header);\r
++ return _notmuch_message_file_get_header (message->message_file, header);\r
+ }\r
+ \r
+ /* Return the message ID from the In-Reply-To header of 'message'.\r
+@@ -898,13 +898,13 @@ notmuch_message_get_tags (notmuch_message_t *message)\r
+ }\r
+ \r
+ const char *\r
+-notmuch_message_get_author (notmuch_message_t *message)\r
++_notmuch_message_get_author (notmuch_message_t *message)\r
+ {\r
+ return message->author;\r
+ }\r
+ \r
+ void\r
+-notmuch_message_set_author (notmuch_message_t *message,\r
++_notmuch_message_set_author (notmuch_message_t *message,\r
+ const char *author)\r
+ {\r
+ if (message->author)\r
+@@ -971,7 +971,7 @@ void\r
+ _notmuch_message_close (notmuch_message_t *message)\r
+ {\r
+ if (message->message_file) {\r
+- notmuch_message_file_close (message->message_file);\r
++ _notmuch_message_file_close (message->message_file);\r
+ message->message_file = NULL;\r
+ }\r
+ }\r
+diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h\r
+index 703ae7b..17f3061 100644\r
+--- a/lib/notmuch-private.h\r
++++ b/lib/notmuch-private.h\r
+@@ -316,11 +316,11 @@ _notmuch_message_clear_data (notmuch_message_t *message);\r
+ /* Set the author member of 'message' - this is the representation used\r
+ * when displaying the message */\r
+ void\r
+-notmuch_message_set_author (notmuch_message_t *message, const char *author);\r
++_notmuch_message_set_author (notmuch_message_t *message, const char *author);\r
+ \r
+ /* Get the author member of 'message' */\r
+ const char *\r
+-notmuch_message_get_author (notmuch_message_t *message);\r
++_notmuch_message_get_author (notmuch_message_t *message);\r
+ \r
+ /* message-file.c */\r
+ \r
+@@ -337,7 +337,7 @@ typedef struct _notmuch_message_file notmuch_message_file_t;\r
+ * Returns NULL if any error occurs.\r
+ */\r
+ notmuch_message_file_t *\r
+-notmuch_message_file_open (const char *filename);\r
++_notmuch_message_file_open (const char *filename);\r
+ \r
+ /* Like notmuch_message_file_open but with 'ctx' as the talloc owner. */\r
+ notmuch_message_file_t *\r
+@@ -345,7 +345,7 @@ _notmuch_message_file_open_ctx (void *ctx, const char *filename);\r
+ \r
+ /* Close a notmuch message previously opened with notmuch_message_open. */\r
+ void\r
+-notmuch_message_file_close (notmuch_message_file_t *message);\r
++_notmuch_message_file_close (notmuch_message_file_t *message);\r
+ \r
+ /* Parse the message.\r
+ *\r
+@@ -386,7 +386,7 @@ _notmuch_message_file_get_mime_message (notmuch_message_file_t *message,\r
+ * contain a header line matching 'header'.\r
+ */\r
+ const char *\r
+-notmuch_message_file_get_header (notmuch_message_file_t *message,\r
++_notmuch_message_file_get_header (notmuch_message_file_t *message,\r
+ const char *header);\r
+ \r
+ /* index.cc */\r
+@@ -455,10 +455,10 @@ _notmuch_message_add_reply (notmuch_message_t *message,\r
+ /* sha1.c */\r
+ \r
+ char *\r
+-notmuch_sha1_of_string (const char *str);\r
++_notmuch_sha1_of_string (const char *str);\r
+ \r
+ char *\r
+-notmuch_sha1_of_file (const char *filename);\r
++_notmuch_sha1_of_file (const char *filename);\r
+ \r
+ /* string-list.c */\r
+ \r
+diff --git a/lib/sha1.c b/lib/sha1.c\r
+index cc48108..94060d5 100644\r
+--- a/lib/sha1.c\r
++++ b/lib/sha1.c\r
+@@ -50,7 +50,7 @@ _hex_of_sha1_digest (const unsigned char digest[SHA1_DIGEST_SIZE])\r
+ * should free() when finished.\r
+ */\r
+ char *\r
+-notmuch_sha1_of_string (const char *str)\r
++_notmuch_sha1_of_string (const char *str)\r
+ {\r
+ sha1_ctx sha1;\r
+ unsigned char digest[SHA1_DIGEST_SIZE];\r
+@@ -74,7 +74,7 @@ notmuch_sha1_of_string (const char *str)\r
+ * file not found, etc.), this function returns NULL.\r
+ */\r
+ char *\r
+-notmuch_sha1_of_file (const char *filename)\r
++_notmuch_sha1_of_file (const char *filename)\r
+ {\r
+ FILE *file;\r
+ #define BLOCK_SIZE 4096\r
+diff --git a/lib/thread.cc b/lib/thread.cc\r
+index 8f53e12..8922403 100644\r
+--- a/lib/thread.cc\r
++++ b/lib/thread.cc\r
+@@ -284,7 +284,7 @@ _thread_add_message (notmuch_thread_t *thread,\r
+ }\r
+ clean_author = _thread_cleanup_author (thread, author, from);\r
+ _thread_add_author (thread, clean_author);\r
+- notmuch_message_set_author (message, clean_author);\r
++ _notmuch_message_set_author (message, clean_author);\r
+ }\r
+ g_object_unref (G_OBJECT (list));\r
+ }\r
+@@ -373,7 +373,7 @@ _thread_add_matched_message (notmuch_thread_t *thread,\r
+ NOTMUCH_MESSAGE_FLAG_MATCH, 1);\r
+ }\r
+ \r
+- _thread_add_matched_author (thread, notmuch_message_get_author (hashed_message));\r
++ _thread_add_matched_author (thread, _notmuch_message_get_author (hashed_message));\r
+ }\r
+ \r
+ static void\r
+-- \r
+1.8.5.2 (Apple Git-48)\r
+\r