X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=b8b03cdbc0d409e04e791e36a4e9ee37c6f51db3;hp=97281374b22252059fcbf65ff28d426615b2a632;hb=4a6721970a42a9f86149fb5d395d1001fed2d305;hpb=d57da17fcd30a5cbe191ccd42906e489dd2bd6a3 diff --git a/notmuch-count.c b/notmuch-count.c index 97281374..b8b03cdb 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -166,24 +166,24 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[]) notmuch_bool_t batch = FALSE; notmuch_bool_t print_lastmod = FALSE; FILE *input = stdin; - char *input_file_name = NULL; + const char *input_file_name = NULL; int ret; notmuch_opt_desc_t options[] = { - { NOTMUCH_OPT_KEYWORD, &output, "output", 'o', + { .opt_keyword = &output, .name = "output", .keywords = (notmuch_keyword_t []){ { "threads", OUTPUT_THREADS }, { "messages", OUTPUT_MESSAGES }, { "files", OUTPUT_FILES }, { 0, 0 } } }, - { NOTMUCH_OPT_KEYWORD, &exclude, "exclude", 'x', + { .opt_keyword = &exclude, .name = "exclude", .keywords = (notmuch_keyword_t []){ { "true", EXCLUDE_TRUE }, { "false", EXCLUDE_FALSE }, { 0, 0 } } }, - { NOTMUCH_OPT_BOOLEAN, &print_lastmod, "lastmod", 'l', 0 }, - { NOTMUCH_OPT_BOOLEAN, &batch, "batch", 0, 0 }, - { NOTMUCH_OPT_STRING, &input_file_name, "input", 'i', 0 }, - { NOTMUCH_OPT_INHERIT, (void *) ¬much_shared_options, NULL, 0, 0 }, - { 0, 0, 0, 0, 0 } + { .opt_bool = &print_lastmod, .name = "lastmod" }, + { .opt_bool = &batch, .name = "batch" }, + { .opt_string = &input_file_name, .name = "input" }, + { .opt_inherit = notmuch_shared_options }, + { } }; opt_index = parse_arguments (argc, argv, options, 1);