aboutsummaryrefslogtreecommitdiff
path: root/test
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 /test
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 'test')
-rw-r--r--test/arg-test.c6
-rw-r--r--test/hex-xcode.c8
-rw-r--r--test/random-corpus.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/test/arg-test.c b/test/arg-test.c
index 64751df4..7aff8255 100644
--- a/test/arg-test.c
+++ b/test/arg-test.c
@@ -12,9 +12,9 @@ int main(int argc, char **argv){
const char *pos_arg1=NULL;
const char *pos_arg2=NULL;
const char *string_val=NULL;
- notmuch_bool_t bool_val = FALSE;
- notmuch_bool_t fl_set = FALSE, int_set = FALSE, bool_set = FALSE,
- kw_set = FALSE, string_set = FALSE, pos1_set = FALSE, pos2_set = FALSE;
+ bool bool_val = false;
+ bool fl_set = false, int_set = false, bool_set = false,
+ kw_set = false, string_set = false, pos1_set = false, pos2_set = false;
notmuch_opt_desc_t parent_options[] = {
{ .opt_flags = &fl_val, .name = "flag", .present = &fl_set, .keywords =
diff --git a/test/hex-xcode.c b/test/hex-xcode.c
index 221ccdb9..33046e9a 100644
--- a/test/hex-xcode.c
+++ b/test/hex-xcode.c
@@ -16,7 +16,7 @@ enum direction {
DECODE
};
-static int inplace = FALSE;
+static bool inplace = false;
static int
xcode (void *ctx, enum direction dir, char *in, char **buf_p, size_t *size_p)
@@ -45,7 +45,7 @@ main (int argc, char **argv)
{
int dir = DECODE;
- notmuch_bool_t omit_newline = FALSE;
+ bool omit_newline = false;
notmuch_opt_desc_t options[] = {
{ .opt_keyword = &dir, .name = "direction", .keywords =
@@ -71,7 +71,7 @@ main (int argc, char **argv)
char *buffer = NULL;
size_t buf_size = 0;
- notmuch_bool_t read_stdin = TRUE;
+ bool read_stdin = true;
for (; opt_index < argc; opt_index++) {
@@ -82,7 +82,7 @@ main (int argc, char **argv)
if (! omit_newline)
putchar ('\n');
- read_stdin = FALSE;
+ read_stdin = false;
}
if (! read_stdin)
diff --git a/test/random-corpus.c b/test/random-corpus.c
index e3b855e1..9272afda 100644
--- a/test/random-corpus.c
+++ b/test/random-corpus.c
@@ -179,7 +179,7 @@ main (int argc, char **argv)
exit (1);
}
- config = notmuch_config_open (ctx, config_path, FALSE);
+ config = notmuch_config_open (ctx, config_path, false);
if (config == NULL)
return 1;