diff options
| author | Jani Nikula <jani@nikula.org> | 2017-10-07 11:44:04 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-10-09 22:24:02 -0300 |
| commit | 0f314c0c99befea599a68bea51d759b4133efef6 (patch) | |
| tree | 6d7fa97122e87bf6dcdb221267ac052f48331f59 /sprinter-sexp.c | |
| parent | 54aef071590cb23f61da943daa29080cf7446696 (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 'sprinter-sexp.c')
| -rw-r--r-- | sprinter-sexp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sprinter-sexp.c b/sprinter-sexp.c index 08783e11..6891ea42 100644 --- a/sprinter-sexp.c +++ b/sprinter-sexp.c @@ -33,7 +33,7 @@ struct sprinter_sexp { /* A flag to signify that a separator should be inserted in the * output as soon as possible. */ - notmuch_bool_t insert_separator; + bool insert_separator; }; struct sexp_state { @@ -41,7 +41,7 @@ struct sexp_state { /* True if nothing has been printed in this aggregate yet. * Suppresses the space before a value. */ - notmuch_bool_t first; + bool first; }; /* Helper function to set up the stream to print a value. If this @@ -55,12 +55,12 @@ sexp_begin_value (struct sprinter *sp) if (! sps->state->first) { if (sps->insert_separator) { fputc ('\n', sps->stream); - sps->insert_separator = FALSE; + sps->insert_separator = false; } else { fputc (' ', sps->stream); } } else { - sps->state->first = FALSE; + sps->state->first = false; } } return sps; @@ -76,7 +76,7 @@ sexp_begin_aggregate (struct sprinter *sp) fputc ('(', sps->stream); state->parent = sps->state; - state->first = TRUE; + state->first = true; sps->state = state; } @@ -169,7 +169,7 @@ sexp_integer (struct sprinter *sp, int val) } static void -sexp_boolean (struct sprinter *sp, notmuch_bool_t val) +sexp_boolean (struct sprinter *sp, bool val) { struct sprinter_sexp *sps = sexp_begin_value (sp); @@ -202,7 +202,7 @@ sexp_separator (struct sprinter *sp) { struct sprinter_sexp *sps = (struct sprinter_sexp *) sp; - sps->insert_separator = TRUE; + sps->insert_separator = true; } struct sprinter * @@ -221,7 +221,7 @@ sprinter_sexp_create (const void *ctx, FILE *stream) .map_key = sexp_map_key, .separator = sexp_separator, .set_prefix = sexp_set_prefix, - .is_text_printer = FALSE, + .is_text_printer = false, } }; struct sprinter_sexp *res; |
