X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-restore.c;h=0025e2c316bed501fc19bb4412ffb3c858dac14d;hp=d6429efb404519fd23dfaf6c1450c22b62782937;hb=54aef071590cb23f61da943daa29080cf7446696;hpb=651da30c0941081cf730930fc1a7cac34954ca0e diff --git a/notmuch-restore.c b/notmuch-restore.c index d6429efb..0025e2c3 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -227,7 +227,7 @@ notmuch_restore_command (notmuch_config_t *config, int argc, char *argv[]) tag_op_flag_t flags = 0; tag_op_list_t *tag_ops; - char *input_file_name = NULL; + const char *input_file_name = NULL; const char *name_for_error = NULL; gzFile input = NULL; char *line = NULL; @@ -247,20 +247,20 @@ notmuch_restore_command (notmuch_config_t *config, int argc, char *argv[]) flags |= TAG_FLAG_MAILDIR_SYNC; notmuch_opt_desc_t options[] = { - { NOTMUCH_OPT_KEYWORD, &input_format, "format", 'f', + { .opt_keyword = &input_format, .name = "format", .keywords = (notmuch_keyword_t []){ { "auto", DUMP_FORMAT_AUTO }, { "batch-tag", DUMP_FORMAT_BATCH_TAG }, { "sup", DUMP_FORMAT_SUP }, { 0, 0 } } }, - { NOTMUCH_OPT_KEYWORD_FLAGS, &include, "include", 'I', + { .opt_flags = &include, .name = "include", .keywords = (notmuch_keyword_t []){ { "config", DUMP_INCLUDE_CONFIG }, { "properties", DUMP_INCLUDE_PROPERTIES }, { "tags", DUMP_INCLUDE_TAGS} } }, - { NOTMUCH_OPT_STRING, &input_file_name, "input", 'i', 0 }, - { NOTMUCH_OPT_BOOLEAN, &accumulate, "accumulate", 'a', 0 }, - { NOTMUCH_OPT_INHERIT, (void *) ¬much_shared_options, NULL, 0, 0 }, - { 0, 0, 0, 0, 0 } + { .opt_string = &input_file_name, .name = "input" }, + { .opt_bool = &accumulate, .name = "accumulate" }, + { .opt_inherit = notmuch_shared_options }, + { } }; opt_index = parse_arguments (argc, argv, options, 1);