aboutsummaryrefslogtreecommitdiff
path: root/command-line-arguments.h
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2017-10-01 23:53:14 +0300
committerDavid Bremner <david@tethera.net>2017-10-04 22:01:40 -0300
commitbc99087ff95d0cdada827f3b838d05e0c9448b63 (patch)
treee20f30db8c36a080a0e0f03923a7da68294bf373 /command-line-arguments.h
parent25960b5ecdc6374fc87a3cb12c1c393497b262da (diff)
cli: add .present field to opt desc to check if the arg was present
Add pointer to boolean .present field to opt desc, which (if non-NULL) will be set to TRUE if the argument in question is present on the command line. Unchanged otherwise.
Diffstat (limited to 'command-line-arguments.h')
-rw-r--r--command-line-arguments.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/command-line-arguments.h b/command-line-arguments.h
index ff51abce..dfc808bd 100644
--- a/command-line-arguments.h
+++ b/command-line-arguments.h
@@ -27,6 +27,9 @@ 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;
+
/* Must be set for opt_keyword and opt_flags. */
const struct notmuch_keyword *keywords;
} notmuch_opt_desc_t;