]> git.notmuchmail.org Git - notmuch/blob - status.c
notmuch-emacs-mua: make --auto-daemon imply --create-frame
[notmuch] / status.c
1 #include "notmuch-client.h"
2
3 notmuch_status_t
4 print_status_query (const char *loc,
5                     const notmuch_query_t *query,
6                     notmuch_status_t status)
7 {
8     if (status) {
9         const char *msg;
10         notmuch_database_t *notmuch;
11
12         fprintf (stderr, "%s: %s\n", loc,
13                  notmuch_status_to_string (status));
14
15         notmuch = notmuch_query_get_database (query);
16         msg = notmuch_database_status_string (notmuch);
17         if (msg)
18             fputs (msg, stderr);
19     }
20     return status;
21 }