X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=command-line-arguments.h;h=4c4d240e10dc17a4e3a966b839a7013c6d40a360;hp=af8b1cebd626d9fd5d5ce8fb89af063581e81c64;hb=23819e82d061502fce8d3876f3e606aa56ca6ea0;hpb=2cf7b27a0c4b4e746e2e40752c55ddb4d54798b2 diff --git a/command-line-arguments.h b/command-line-arguments.h index af8b1ceb..4c4d240e 100644 --- a/command-line-arguments.h +++ b/command-line-arguments.h @@ -5,9 +5,11 @@ enum notmuch_opt_type { NOTMUCH_OPT_END = 0, + NOTMUCH_OPT_INHERIT, /* another options table */ NOTMUCH_OPT_BOOLEAN, /* --verbose */ NOTMUCH_OPT_INT, /* --frob=8 */ NOTMUCH_OPT_KEYWORD, /* --format=raw|json|text */ + NOTMUCH_OPT_KEYWORD_FLAGS, /* the above with values OR'd together */ NOTMUCH_OPT_STRING, /* --file=/tmp/gnarf.txt */ NOTMUCH_OPT_POSITION /* notmuch dump pos_arg */ }; @@ -38,7 +40,7 @@ typedef struct notmuch_opt_desc { void *output_var; const char *name; int arg_id; - struct notmuch_keyword *keywords; + const struct notmuch_keyword *keywords; } notmuch_opt_desc_t; @@ -68,8 +70,8 @@ parse_arguments (int argc, char **argv, const notmuch_opt_desc_t *options, int o * functions. */ -notmuch_bool_t -parse_option (const char *arg, const notmuch_opt_desc_t* options); +int +parse_option (int argc, char **argv, const notmuch_opt_desc_t* options, int opt_index); notmuch_bool_t parse_position_arg (const char *arg,