1 Return-Path: <bremner@tesseract.cs.unb.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 arlo.cworth.org (Postfix) with ESMTP id 9E7916DE02D0
\r
6 for <notmuch@notmuchmail.org>; Sat, 26 Mar 2016 11:23:56 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[AWL=-0.021,
\r
12 HEADER_FROM_DIFFERENT_DOMAINS=0.001] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 4XoRpjCcZ7Bu for <notmuch@notmuchmail.org>;
\r
16 Sat, 26 Mar 2016 11:23:49 -0700 (PDT)
\r
17 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])
\r
18 by arlo.cworth.org (Postfix) with ESMTPS id 52AB76DE026C
\r
19 for <notmuch@notmuchmail.org>; Sat, 26 Mar 2016 11:23:23 -0700 (PDT)
\r
20 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)
\r
21 (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
22 id 1ajsTU-0000v3-Vp; Sat, 26 Mar 2016 13:58:13 -0400
\r
23 Received: (nullmailer pid 8818 invoked by uid 1000);
\r
24 Sat, 26 Mar 2016 17:57:27 -0000
\r
25 From: David Bremner <david@tethera.net>
\r
26 To: notmuch@notmuchmail.org
\r
27 Subject: [Patch v2 08/13] CLI: add print_status_database
\r
28 Date: Sat, 26 Mar 2016 14:57:18 -0300
\r
29 Message-Id: <1459015043-8460-9-git-send-email-david@tethera.net>
\r
30 X-Mailer: git-send-email 2.6.4
\r
31 In-Reply-To: <1459015043-8460-1-git-send-email-david@tethera.net>
\r
32 References: <1459015043-8460-1-git-send-email-david@tethera.net>
\r
33 X-BeenThere: notmuch@notmuchmail.org
\r
34 X-Mailman-Version: 2.1.20
\r
36 List-Id: "Use and development of the notmuch mail system."
\r
37 <notmuch.notmuchmail.org>
\r
38 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
39 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
41 List-Post: <mailto:notmuch@notmuchmail.org>
\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
43 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
45 X-List-Received-Date: Sat, 26 Mar 2016 18:23:56 -0000
\r
47 This could probably be used at quite a few places in the existing code,
\r
48 but in the immediate future I plan to use in some new code in
\r
51 notmuch-client.h | 5 +++++
\r
52 status.c | 17 +++++++++++++++++
\r
53 2 files changed, 22 insertions(+)
\r
55 diff --git a/notmuch-client.h b/notmuch-client.h
\r
56 index 18e6c60..b3d0b66 100644
\r
57 --- a/notmuch-client.h
\r
58 +++ b/notmuch-client.h
\r
59 @@ -462,6 +462,11 @@ print_status_query (const char *loc,
\r
60 const notmuch_query_t *query,
\r
61 notmuch_status_t status);
\r
64 +print_status_database (const char *loc,
\r
65 + const notmuch_database_t *database,
\r
66 + notmuch_status_t status);
\r
68 #include "command-line-arguments.h"
\r
70 extern char *notmuch_requested_db_uuid;
\r
71 diff --git a/status.c b/status.c
\r
72 index 8fa81cb..45d3fb4 100644
\r
75 @@ -19,3 +19,20 @@ print_status_query (const char *loc,
\r
81 +print_status_database (const char *loc,
\r
82 + const notmuch_database_t *notmuch,
\r
83 + notmuch_status_t status)
\r
88 + fprintf (stderr, "%s: %s\n", loc,
\r
89 + notmuch_status_to_string (status));
\r
90 + msg = notmuch_database_status_string (notmuch);
\r
92 + fputs (msg, stderr);
\r