[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / e9 / 878d9b2a173a4e8c22e592e407ad311e67144f
1 Return-Path: <hohndel@gr8dns.org>\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 A6B0A418C25\r
6         for <notmuch@notmuchmail.org>; Sat, 24 Apr 2010 11:21:15 -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: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\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 OrzSW+JSebEc for <notmuch@notmuchmail.org>;\r
16         Sat, 24 Apr 2010 11:21:11 -0700 (PDT)\r
17 Received: from mail.hohndel.org (mail.hohndel.org [65.23.157.147])\r
18         by olra.theworths.org (Postfix) with ESMTP id BB889418C38\r
19         for <notmuch@notmuchmail.org>; Sat, 24 Apr 2010 11:21:10 -0700 (PDT)\r
20 Received: by mail.hohndel.org (Postfix, from userid 112)\r
21         id 675AB340FA; Sat, 24 Apr 2010 14:21:10 -0400 (EDT)\r
22 Received: from x200.gr8dns.org (unknown [65.23.157.147])\r
23         by mail.hohndel.org (Postfix) with ESMTP id 3D7C1340F4;\r
24         Sat, 24 Apr 2010 14:21:01 -0400 (EDT)\r
25 Received: by x200.gr8dns.org (Postfix, from userid 500)\r
26         id ED8AFCC59A; Sat, 24 Apr 2010 11:21:00 -0700 (PDT)\r
27 From: Dirk Hohndel <hohndel@infradead.org>\r
28 To: <notmuch@notmuchmail.org>\r
29 Subject: [PATCH 1/5] Add authors member to message\r
30 Date: Sat, 24 Apr 2010 11:20:53 -0700\r
31 Message-Id: <1272133257-15708-2-git-send-email-hohndel@infradead.org>\r
32 X-Mailer: git-send-email 1.6.6.1\r
33 In-Reply-To: <1272133257-15708-1-git-send-email-hohndel@infradead.org>\r
34 References: <1272133257-15708-1-git-send-email-hohndel@infradead.org>\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\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: Sat, 24 Apr 2010 18:21:16 -0000\r
48 \r
49 message->authors contains the author's name (as we want to print it)\r
50 get / set methods are declared in notmuch-private.h\r
51 \r
52 Signed-off-by: Dirk Hohndel <hohndel@infradead.org>\r
53 ---\r
54  lib/message.cc        |   18 ++++++++++++++++++\r
55  lib/notmuch-private.h |   10 ++++++++++\r
56  2 files changed, 28 insertions(+), 0 deletions(-)\r
57 \r
58 diff --git a/lib/message.cc b/lib/message.cc\r
59 index 721c9a6..4b2f98f 100644\r
60 --- a/lib/message.cc\r
61 +++ b/lib/message.cc\r
62 @@ -35,6 +35,7 @@ struct _notmuch_message {\r
63      char *thread_id;\r
64      char *in_reply_to;\r
65      char *filename;\r
66 +    char *author;\r
67      notmuch_message_file_t *message_file;\r
68      notmuch_message_list_t *replies;\r
69      unsigned long flags;\r
70 @@ -110,6 +111,7 @@ _notmuch_message_create (const void *talloc_owner,\r
71      message->in_reply_to = NULL;\r
72      message->filename = NULL;\r
73      message->message_file = NULL;\r
74 +    message->author = NULL;\r
75  \r
76      message->replies = _notmuch_message_list_create (message);\r
77      if (unlikely (message->replies == NULL)) {\r
78 @@ -533,6 +535,22 @@ notmuch_message_get_tags (notmuch_message_t *message)\r
79      return _notmuch_convert_tags(message, i, end);\r
80  }\r
81  \r
82 +const char *\r
83 +notmuch_message_get_author (notmuch_message_t *message)\r
84 +{\r
85 +    return message->author;\r
86 +}\r
87 +\r
88 +void\r
89 +notmuch_message_set_author (notmuch_message_t *message,\r
90 +                           const char *author)\r
91 +{\r
92 +    if (message->author)\r
93 +       talloc_free(message->author);\r
94 +    message->author = talloc_strdup(message, author);\r
95 +    return;\r
96 +}\r
97 +\r
98  void\r
99  _notmuch_message_set_date (notmuch_message_t *message,\r
100                            const char *date)\r
101 diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h\r
102 index 94cce1b..6e83cc3 100644\r
103 --- a/lib/notmuch-private.h\r
104 +++ b/lib/notmuch-private.h\r
105 @@ -275,6 +275,16 @@ _notmuch_message_talloc_copy_data (notmuch_message_t *message);\r
106  void\r
107  _notmuch_message_clear_data (notmuch_message_t *message);\r
108  \r
109 +/* Set the author member of 'message' - this is the representation used\r
110 + * when displaying the message */\r
111 +void\r
112 +notmuch_message_set_author (notmuch_message_t *message, const char *author);\r
113 +\r
114 +/* Get the author member of 'message' */\r
115 +const char *\r
116 +notmuch_message_get_author (notmuch_message_t *message);\r
117 +\r
118 +\r
119  /* index.cc */\r
120  \r
121  notmuch_status_t\r
122 -- \r
123 1.6.6.1\r
124 \r