1 Return-Path: <bremner@tethera.net>
\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 811A46DE02B7
\r
6 for <notmuch@notmuchmail.org>; Tue, 22 Mar 2016 03:57:11 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.029 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.018, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]
\r
14 Received: from arlo.cworth.org ([127.0.0.1])
\r
15 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id QerLwCrZy6qN for <notmuch@notmuchmail.org>;
\r
17 Tue, 22 Mar 2016 03:57:03 -0700 (PDT)
\r
18 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id 195D06DE02CC
\r
20 for <notmuch@notmuchmail.org>; Tue, 22 Mar 2016 03:55:28 -0700 (PDT)
\r
21 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)
\r
22 (envelope-from <bremner@tethera.net>)
\r
23 id 1aiJyl-00016o-K5; Tue, 22 Mar 2016 06:56:03 -0400
\r
24 Received: (nullmailer pid 14083 invoked by uid 1000);
\r
25 Tue, 22 Mar 2016 10:55:11 -0000
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: notmuch@notmuchmail.org
\r
28 Subject: [PATCH 08/13] CLI: add print_status_database
\r
29 Date: Tue, 22 Mar 2016 07:54:49 -0300
\r
30 Message-Id: <1458644094-13951-9-git-send-email-david@tethera.net>
\r
31 X-Mailer: git-send-email 2.7.0
\r
32 In-Reply-To: <1458644094-13951-1-git-send-email-david@tethera.net>
\r
33 References: <1458644094-13951-1-git-send-email-david@tethera.net>
\r
34 X-BeenThere: notmuch@notmuchmail.org
\r
35 X-Mailman-Version: 2.1.20
\r
37 List-Id: "Use and development of the notmuch mail system."
\r
38 <notmuch.notmuchmail.org>
\r
39 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
42 List-Post: <mailto:notmuch@notmuchmail.org>
\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
44 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
46 X-List-Received-Date: Tue, 22 Mar 2016 10:57:11 -0000
\r
48 This could probably be used at quite a few places in the existing code,
\r
49 but in the immediate future I plan to use in some new code in
\r
52 notmuch-client.h | 5 +++++
\r
53 status.c | 17 +++++++++++++++++
\r
54 2 files changed, 22 insertions(+)
\r
56 diff --git a/notmuch-client.h b/notmuch-client.h
\r
57 index 18e6c60..b3d0b66 100644
\r
58 --- a/notmuch-client.h
\r
59 +++ b/notmuch-client.h
\r
60 @@ -462,6 +462,11 @@ print_status_query (const char *loc,
\r
61 const notmuch_query_t *query,
\r
62 notmuch_status_t status);
\r
65 +print_status_database (const char *loc,
\r
66 + const notmuch_database_t *database,
\r
67 + notmuch_status_t status);
\r
69 #include "command-line-arguments.h"
\r
71 extern char *notmuch_requested_db_uuid;
\r
72 diff --git a/status.c b/status.c
\r
73 index 8fa81cb..45d3fb4 100644
\r
76 @@ -19,3 +19,20 @@ print_status_query (const char *loc,
\r
82 +print_status_database (const char *loc,
\r
83 + const notmuch_database_t *notmuch,
\r
84 + notmuch_status_t status)
\r
89 + fprintf (stderr, "%s: %s\n", loc,
\r
90 + notmuch_status_to_string (status));
\r
91 + msg = notmuch_database_status_string (notmuch);
\r
93 + fputs (msg, stderr);
\r