[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 99 / c8539fc3589a33fd323fb1bb22bb4a0486de32
1 Return-Path: <awg@lagos.xvx.ca>\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 51C03431FBC\r
6         for <notmuch@notmuchmail.org>; Sat, 13 Jul 2013 17:55:49 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 kne9YvzV4uQQ for <notmuch@notmuchmail.org>;\r
16         Sat, 13 Jul 2013 17:55:48 -0700 (PDT)\r
17 Received: from smtp-out-01.shaw.ca (smtp-out-01.shaw.ca [64.59.136.137])\r
18         by olra.theworths.org (Postfix) with ESMTP id 1BF96431FD0\r
19         for <notmuch@notmuchmail.org>; Sat, 13 Jul 2013 17:55:37 -0700 (PDT)\r
20 X-Cloudmark-SP-Filtered: true\r
21 X-Cloudmark-SP-Result: v=1.1 cv=GLqYwptGXHjY6tPk5kWRtHXJM/YfZPTWiIs1znw4zms=\r
22         c=1 sm=1\r
23         a=529rJtm0sH4A:10 a=BLceEmwcHowA:10 a=gumk1giGF0obp6xRQyl7Yg==:17\r
24         a=6LECOPO3Nxskhww-8YwA:9 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
25 Received: from unknown (HELO lagos.xvx.ca) ([68.150.39.45])\r
26         by smtp-out-01.shaw.ca with ESMTP; 13 Jul 2013 18:46:01 -0600\r
27 Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
28         id ADDF48009323; Sat, 13 Jul 2013 18:46:01 -0600 (MDT)\r
29 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
30 To: notmuch@notmuchmail.org\r
31 Subject: [PATCH 1/3] cli: Return an error code from add_message_to_database\r
32 Date: Sat, 13 Jul 2013 18:45:44 -0600\r
33 Message-Id: <1373762746-22308-2-git-send-email-awg+notmuch@xvx.ca>\r
34 X-Mailer: git-send-email 1.7.9.5\r
35 In-Reply-To: <1373762746-22308-1-git-send-email-awg+notmuch@xvx.ca>\r
36 References: <1373762746-22308-1-git-send-email-awg+notmuch@xvx.ca>\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sun, 14 Jul 2013 00:55:49 -0000\r
50 \r
51 The error code isn't necessary when we're inserting a new message from\r
52 standard input, but it will be useful for an upcoming command that\r
53 allows an existing file to be indexed.\r
54 ---\r
55  notmuch-insert.c |    8 +++++---\r
56  1 file changed, 5 insertions(+), 3 deletions(-)\r
57 \r
58 diff --git a/notmuch-insert.c b/notmuch-insert.c\r
59 index 2207b1e..d32a535 100644\r
60 --- a/notmuch-insert.c\r
61 +++ b/notmuch-insert.c\r
62 @@ -293,7 +293,7 @@ copy_stdin (int fdin, int fdout)\r
63  \r
64  /* Add the specified message file to the notmuch database, applying tags.\r
65   * The file is renamed to encode notmuch tags as maildir flags. */\r
66 -static void\r
67 +static int\r
68  add_file_to_database (notmuch_database_t *notmuch, const char *path,\r
69                       tag_op_list_t *tag_ops)\r
70  {\r
71 @@ -318,7 +318,7 @@ add_file_to_database (notmuch_database_t *notmuch, const char *path,\r
72      case NOTMUCH_STATUS_LAST_STATUS:\r
73         fprintf (stderr, "Error: failed to add `%s' to notmuch database: %s\n",\r
74                  path, notmuch_status_to_string (status));\r
75 -       return;\r
76 +       return status;\r
77      }\r
78  \r
79      if (status == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) {\r
80 @@ -331,6 +331,8 @@ add_file_to_database (notmuch_database_t *notmuch, const char *path,\r
81      }\r
82  \r
83      notmuch_message_destroy (message);\r
84 +\r
85 +    return status;\r
86  }\r
87  \r
88  static notmuch_bool_t\r
89 @@ -377,7 +379,7 @@ insert_message (void *ctx, notmuch_database_t *notmuch, int fdin,\r
90  \r
91      /* Even if adding the message to the notmuch database fails,\r
92       * the message is on disk and we consider the delivery completed. */\r
93 -    add_file_to_database (notmuch, newpath, tag_ops);\r
94 +    (void) add_file_to_database (notmuch, newpath, tag_ops);\r
95  \r
96      return TRUE;\r
97  \r
98 -- \r
99 1.7.9.5\r
100 \r