1 Return-Path: <cceleri@cs.stanford.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 0DCB1431FC2
\r
6 for <notmuch@notmuchmail.org>; Tue, 6 May 2014 11:58:50 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id BR1npQAm0JHh for <notmuch@notmuchmail.org>;
\r
16 Tue, 6 May 2014 11:58:41 -0700 (PDT)
\r
17 Received: from smtp1.cs.Stanford.EDU (smtp1.cs.Stanford.EDU [171.64.64.25])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 5E516431FAF
\r
21 for <notmuch@notmuchmail.org>; Tue, 6 May 2014 11:58:41 -0700 (PDT)
\r
22 Received: from c-24-11-133-78.hsd1.sc.comcast.net ([24.11.133.78]
\r
24 by smtp1.cs.Stanford.EDU with esmtpsa (TLSv1:DHE-RSA-SEED-SHA:128)
\r
25 (Exim 4.80.1) (envelope-from <cceleri@cs.stanford.edu>)
\r
26 id 1WhkZb-0004tB-Jj; Tue, 06 May 2014 11:58:40 -0700
\r
27 From: Charles Celerier <cceleri@cs.stanford.edu>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: [PATCH] lib: Precede all function names in notmuch-private.h with an
\r
31 Date: Tue, 6 May 2014 14:58:36 -0400
\r
32 Message-Id: <1399402716-13714-1-git-send-email-cceleri@cs.stanford.edu>
\r
33 X-Mailer: git-send-email 1.8.5.2 (Apple Git-48)
\r
34 X-Scan-Signature: 7030b7a26f924acffcd1b682d2211542
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.13
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Tue, 06 May 2014 18:58:50 -0000
\r
49 An underscore should precede every function name in
\r
50 lib/notmuch-private.h. This was not true and was noted by the failure of
\r
51 test T360-symbol-hiding on Mac OS/X. This patch inserts an underscore
\r
52 before each function name in lib/notmuch-private.h where the underscore
\r
53 was missing and renames functions appropriately where they are used.
\r
55 Signed-off-by: Charles Celerier <cceleri@cs.stanford.edu>
\r
57 lib/database.cc | 24 ++++++++++++------------
\r
58 lib/message-file.c | 8 ++++----
\r
59 lib/message.cc | 8 ++++----
\r
60 lib/notmuch-private.h | 14 +++++++-------
\r
62 lib/thread.cc | 4 ++--
\r
63 6 files changed, 31 insertions(+), 31 deletions(-)
\r
65 diff --git a/lib/database.cc b/lib/database.cc
\r
66 index 1efb14d..d9a01b7 100644
\r
67 --- a/lib/database.cc
\r
68 +++ b/lib/database.cc
\r
69 @@ -356,7 +356,7 @@ _message_id_compressed (void *ctx, const char *message_id)
\r
71 char *sha1, *compressed;
\r
73 - sha1 = notmuch_sha1_of_string (message_id);
\r
74 + sha1 = _notmuch_sha1_of_string (message_id);
\r
76 compressed = talloc_asprintf (ctx, "notmuch-sha1-%s", sha1);
\r
78 @@ -1356,7 +1356,7 @@ _notmuch_database_get_directory_db_path (const char *path)
\r
79 int term_len = strlen (_find_prefix ("directory")) + strlen (path);
\r
81 if (term_len > NOTMUCH_TERM_MAX)
\r
82 - return notmuch_sha1_of_string (path);
\r
83 + return _notmuch_sha1_of_string (path);
\r
87 @@ -1758,12 +1758,12 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,
\r
88 _my_talloc_free_for_g_hash, NULL);
\r
89 this_message_id = notmuch_message_get_message_id (message);
\r
91 - refs = notmuch_message_file_get_header (message_file, "references");
\r
92 + refs = _notmuch_message_file_get_header (message_file, "references");
\r
93 last_ref_message_id = parse_references (message,
\r
97 - in_reply_to = notmuch_message_file_get_header (message_file, "in-reply-to");
\r
98 + in_reply_to = _notmuch_message_file_get_header (message_file, "in-reply-to");
\r
99 in_reply_to_message_id = parse_references (message,
\r
101 parents, in_reply_to);
\r
102 @@ -1961,7 +1961,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
106 - message_file = notmuch_message_file_open (filename);
\r
107 + message_file = _notmuch_message_file_open (filename);
\r
108 if (message_file == NULL)
\r
109 return NOTMUCH_STATUS_FILE_ERROR;
\r
111 @@ -1982,9 +1982,9 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
112 * let's make sure that what we're looking at looks like an
\r
113 * actual email message.
\r
115 - from = notmuch_message_file_get_header (message_file, "from");
\r
116 - subject = notmuch_message_file_get_header (message_file, "subject");
\r
117 - to = notmuch_message_file_get_header (message_file, "to");
\r
118 + from = _notmuch_message_file_get_header (message_file, "from");
\r
119 + subject = _notmuch_message_file_get_header (message_file, "subject");
\r
120 + to = _notmuch_message_file_get_header (message_file, "to");
\r
122 if ((from == NULL || *from == '\0') &&
\r
123 (subject == NULL || *subject == '\0') &&
\r
124 @@ -1997,7 +1997,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
125 /* Now that we're sure it's mail, the first order of business
\r
126 * is to find a message ID (or else create one ourselves). */
\r
128 - header = notmuch_message_file_get_header (message_file, "message-id");
\r
129 + header = _notmuch_message_file_get_header (message_file, "message-id");
\r
130 if (header && *header != '\0') {
\r
131 message_id = _parse_message_id (message_file, header, NULL);
\r
133 @@ -2018,7 +2018,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
134 if (message_id == NULL ) {
\r
135 /* No message-id at all, let's generate one by taking a
\r
136 * hash over the file's contents. */
\r
137 - char *sha1 = notmuch_sha1_of_file (filename);
\r
138 + char *sha1 = _notmuch_sha1_of_file (filename);
\r
140 /* If that failed too, something is really wrong. Give up. */
\r
141 if (sha1 == NULL) {
\r
142 @@ -2058,7 +2058,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
146 - date = notmuch_message_file_get_header (message_file, "date");
\r
147 + date = _notmuch_message_file_get_header (message_file, "date");
\r
148 _notmuch_message_set_header_values (message, date, from, subject);
\r
150 ret = _notmuch_message_index_file (message, message_file);
\r
151 @@ -2087,7 +2087,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
155 - notmuch_message_file_close (message_file);
\r
156 + _notmuch_message_file_close (message_file);
\r
158 ret2 = notmuch_database_end_atomic (notmuch);
\r
159 if ((ret == NOTMUCH_STATUS_SUCCESS ||
\r
160 diff --git a/lib/message-file.c b/lib/message-file.c
\r
161 index 6782882..f702eb5 100644
\r
162 --- a/lib/message-file.c
\r
163 +++ b/lib/message-file.c
\r
164 @@ -99,19 +99,19 @@ _notmuch_message_file_open_ctx (void *ctx, const char *filename)
\r
167 fprintf (stderr, "Error opening %s: %s\n", filename, strerror (errno));
\r
168 - notmuch_message_file_close (message);
\r
169 + _notmuch_message_file_close (message);
\r
174 notmuch_message_file_t *
\r
175 -notmuch_message_file_open (const char *filename)
\r
176 +_notmuch_message_file_open (const char *filename)
\r
178 return _notmuch_message_file_open_ctx (NULL, filename);
\r
182 -notmuch_message_file_close (notmuch_message_file_t *message)
\r
183 +_notmuch_message_file_close (notmuch_message_file_t *message)
\r
185 talloc_free (message);
\r
187 @@ -277,7 +277,7 @@ _notmuch_message_file_get_combined_header (notmuch_message_file_t *message,
\r
191 -notmuch_message_file_get_header (notmuch_message_file_t *message,
\r
192 +_notmuch_message_file_get_header (notmuch_message_file_t *message,
\r
193 const char *header)
\r
196 diff --git a/lib/message.cc b/lib/message.cc
\r
197 index 9243b76..eec8428 100644
\r
198 --- a/lib/message.cc
\r
199 +++ b/lib/message.cc
\r
200 @@ -439,7 +439,7 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header)
\r
201 if (message->message_file == NULL)
\r
204 - return notmuch_message_file_get_header (message->message_file, header);
\r
205 + return _notmuch_message_file_get_header (message->message_file, header);
\r
208 /* Return the message ID from the In-Reply-To header of 'message'.
\r
209 @@ -898,13 +898,13 @@ notmuch_message_get_tags (notmuch_message_t *message)
\r
213 -notmuch_message_get_author (notmuch_message_t *message)
\r
214 +_notmuch_message_get_author (notmuch_message_t *message)
\r
216 return message->author;
\r
220 -notmuch_message_set_author (notmuch_message_t *message,
\r
221 +_notmuch_message_set_author (notmuch_message_t *message,
\r
222 const char *author)
\r
224 if (message->author)
\r
225 @@ -971,7 +971,7 @@ void
\r
226 _notmuch_message_close (notmuch_message_t *message)
\r
228 if (message->message_file) {
\r
229 - notmuch_message_file_close (message->message_file);
\r
230 + _notmuch_message_file_close (message->message_file);
\r
231 message->message_file = NULL;
\r
234 diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
\r
235 index 703ae7b..17f3061 100644
\r
236 --- a/lib/notmuch-private.h
\r
237 +++ b/lib/notmuch-private.h
\r
238 @@ -316,11 +316,11 @@ _notmuch_message_clear_data (notmuch_message_t *message);
\r
239 /* Set the author member of 'message' - this is the representation used
\r
240 * when displaying the message */
\r
242 -notmuch_message_set_author (notmuch_message_t *message, const char *author);
\r
243 +_notmuch_message_set_author (notmuch_message_t *message, const char *author);
\r
245 /* Get the author member of 'message' */
\r
247 -notmuch_message_get_author (notmuch_message_t *message);
\r
248 +_notmuch_message_get_author (notmuch_message_t *message);
\r
250 /* message-file.c */
\r
252 @@ -337,7 +337,7 @@ typedef struct _notmuch_message_file notmuch_message_file_t;
\r
253 * Returns NULL if any error occurs.
\r
255 notmuch_message_file_t *
\r
256 -notmuch_message_file_open (const char *filename);
\r
257 +_notmuch_message_file_open (const char *filename);
\r
259 /* Like notmuch_message_file_open but with 'ctx' as the talloc owner. */
\r
260 notmuch_message_file_t *
\r
261 @@ -345,7 +345,7 @@ _notmuch_message_file_open_ctx (void *ctx, const char *filename);
\r
263 /* Close a notmuch message previously opened with notmuch_message_open. */
\r
265 -notmuch_message_file_close (notmuch_message_file_t *message);
\r
266 +_notmuch_message_file_close (notmuch_message_file_t *message);
\r
268 /* Parse the message.
\r
270 @@ -386,7 +386,7 @@ _notmuch_message_file_get_mime_message (notmuch_message_file_t *message,
\r
271 * contain a header line matching 'header'.
\r
274 -notmuch_message_file_get_header (notmuch_message_file_t *message,
\r
275 +_notmuch_message_file_get_header (notmuch_message_file_t *message,
\r
276 const char *header);
\r
279 @@ -455,10 +455,10 @@ _notmuch_message_add_reply (notmuch_message_t *message,
\r
283 -notmuch_sha1_of_string (const char *str);
\r
284 +_notmuch_sha1_of_string (const char *str);
\r
287 -notmuch_sha1_of_file (const char *filename);
\r
288 +_notmuch_sha1_of_file (const char *filename);
\r
290 /* string-list.c */
\r
292 diff --git a/lib/sha1.c b/lib/sha1.c
\r
293 index cc48108..94060d5 100644
\r
296 @@ -50,7 +50,7 @@ _hex_of_sha1_digest (const unsigned char digest[SHA1_DIGEST_SIZE])
\r
297 * should free() when finished.
\r
300 -notmuch_sha1_of_string (const char *str)
\r
301 +_notmuch_sha1_of_string (const char *str)
\r
304 unsigned char digest[SHA1_DIGEST_SIZE];
\r
305 @@ -74,7 +74,7 @@ notmuch_sha1_of_string (const char *str)
\r
306 * file not found, etc.), this function returns NULL.
\r
309 -notmuch_sha1_of_file (const char *filename)
\r
310 +_notmuch_sha1_of_file (const char *filename)
\r
313 #define BLOCK_SIZE 4096
\r
314 diff --git a/lib/thread.cc b/lib/thread.cc
\r
315 index 8f53e12..8922403 100644
\r
316 --- a/lib/thread.cc
\r
317 +++ b/lib/thread.cc
\r
318 @@ -284,7 +284,7 @@ _thread_add_message (notmuch_thread_t *thread,
\r
320 clean_author = _thread_cleanup_author (thread, author, from);
\r
321 _thread_add_author (thread, clean_author);
\r
322 - notmuch_message_set_author (message, clean_author);
\r
323 + _notmuch_message_set_author (message, clean_author);
\r
325 g_object_unref (G_OBJECT (list));
\r
327 @@ -373,7 +373,7 @@ _thread_add_matched_message (notmuch_thread_t *thread,
\r
328 NOTMUCH_MESSAGE_FLAG_MATCH, 1);
\r
331 - _thread_add_matched_author (thread, notmuch_message_get_author (hashed_message));
\r
332 + _thread_add_matched_author (thread, _notmuch_message_get_author (hashed_message));
\r
337 1.8.5.2 (Apple Git-48)
\r