summaryrefslogtreecommitdiffstats
path: root/command-line-arguments.h
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 /command-line-arguments.h
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 'command-line-arguments.h')
-rw-r--r--command-line-arguments.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/command-line-arguments.h b/command-line-arguments.h
index dfc808bd..76ca4dcb 100644
--- a/command-line-arguments.h
+++ b/command-line-arguments.h
@@ -1,6 +1,8 @@
#ifndef NOTMUCH_OPTS_H
#define NOTMUCH_OPTS_H
+#include <stdbool.h>
+
#include "notmuch.h"
/*
@@ -17,7 +19,7 @@ typedef struct notmuch_keyword {
typedef struct notmuch_opt_desc {
/* One and only one of opt_* must be set. */
const struct notmuch_opt_desc *opt_inherit;
- notmuch_bool_t *opt_bool;
+ bool *opt_bool;
int *opt_int;
int *opt_keyword;
int *opt_flags;
@@ -27,8 +29,8 @@ typedef struct notmuch_opt_desc {
/* Must be set except for opt_inherit and opt_position. */
const char *name;
- /* Optional, if non-NULL, set to TRUE if the option is present. */
- notmuch_bool_t *present;
+ /* Optional, if non-NULL, set to true if the option is present. */
+ bool *present;
/* Must be set for opt_keyword and opt_flags. */
const struct notmuch_keyword *keywords;
@@ -64,7 +66,7 @@ parse_arguments (int argc, char **argv, const notmuch_opt_desc_t *options, int o
int
parse_option (int argc, char **argv, const notmuch_opt_desc_t* options, int opt_index);
-notmuch_bool_t
+bool
parse_position_arg (const char *arg,
int position_arg_index,
const notmuch_opt_desc_t* options);