X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=command-line-arguments.h;h=c0228f7cb634dca5f34182a53e40d0803dc644c5;hp=ff51abceb117dbac79da53c728c8555d56d37263;hb=733ccfabca350f65a1d0ba1f64792a8a436da273;hpb=4a6721970a42a9f86149fb5d395d1001fed2d305 diff --git a/command-line-arguments.h b/command-line-arguments.h index ff51abce..c0228f7c 100644 --- a/command-line-arguments.h +++ b/command-line-arguments.h @@ -1,6 +1,8 @@ #ifndef NOTMUCH_OPTS_H #define NOTMUCH_OPTS_H +#include + #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,6 +29,12 @@ 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. */ + bool *present; + + /* Optional, allow empty strings for opt_string. */ + bool allow_empty; + /* Must be set for opt_keyword and opt_flags. */ const struct notmuch_keyword *keywords; } notmuch_opt_desc_t; @@ -61,7 +69,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);