summaryrefslogtreecommitdiffstats
path: root/notmuch-count.c
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2017-10-07 11:44:04 +0300
committerDavid Bremner <david@tethera.net>2017-10-09 22:24:02 -0300
commit0f314c0c99befea599a68bea51d759b4133efef6 (patch)
tree6d7fa97122e87bf6dcdb221267ac052f48331f59 /notmuch-count.c
parent54aef071590cb23f61da943daa29080cf7446696 (diff)
cli: convert notmuch_bool_t to stdbool
C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the cli and test binaries to stdbool.
Diffstat (limited to 'notmuch-count.c')
-rw-r--r--notmuch-count.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/notmuch-count.c b/notmuch-count.c
index b8b03cdb..1ae7d514 100644
--- a/notmuch-count.c
+++ b/notmuch-count.c
@@ -29,8 +29,8 @@ enum {
/* The following is to allow future options to be added more easily */
enum {
- EXCLUDE_TRUE,
- EXCLUDE_FALSE,
+ EXCLUDE_true,
+ EXCLUDE_false,
};
/* Return the number of files matching the query, or -1 for an error */
@@ -160,11 +160,11 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[])
char *query_str;
int opt_index;
int output = OUTPUT_MESSAGES;
- int exclude = EXCLUDE_TRUE;
+ int exclude = EXCLUDE_true;
const char **search_exclude_tags = NULL;
size_t search_exclude_tags_length = 0;
- notmuch_bool_t batch = FALSE;
- notmuch_bool_t print_lastmod = FALSE;
+ bool batch = false;
+ bool print_lastmod = false;
FILE *input = stdin;
const char *input_file_name = NULL;
int ret;
@@ -176,8 +176,8 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[])
{ "files", OUTPUT_FILES },
{ 0, 0 } } },
{ .opt_keyword = &exclude, .name = "exclude", .keywords =
- (notmuch_keyword_t []){ { "true", EXCLUDE_TRUE },
- { "false", EXCLUDE_FALSE },
+ (notmuch_keyword_t []){ { "true", EXCLUDE_true },
+ { "false", EXCLUDE_false },
{ 0, 0 } } },
{ .opt_bool = &print_lastmod, .name = "lastmod" },
{ .opt_bool = &batch, .name = "batch" },
@@ -193,7 +193,7 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[])
notmuch_process_shared_options (argv[0]);
if (input_file_name) {
- batch = TRUE;
+ batch = true;
input = fopen (input_file_name, "r");
if (input == NULL) {
fprintf (stderr, "Error opening %s for reading: %s\n",
@@ -221,7 +221,7 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[])
return EXIT_FAILURE;
}
- if (exclude == EXCLUDE_TRUE) {
+ if (exclude == EXCLUDE_true) {
search_exclude_tags = notmuch_config_get_search_exclude_tags
(config, &search_exclude_tags_length);
}