- int i;
-
- argc--; argv++; /* skip subcommand argument */
-
- for (i = 0; i < argc && argv[i][0] == '-'; i++) {
- if (strcmp (argv[i], "--") == 0) {
- i++;
- break;
- }
- {
- fprintf (stderr, "Unrecognized option: %s\n", argv[i]);
- return 1;
- }
- }
+ int opt_index;
+ int output = OUTPUT_MESSAGES;
+ notmuch_bool_t no_exclude = FALSE;
+ unsigned int i;
+
+ notmuch_opt_desc_t options[] = {
+ { NOTMUCH_OPT_KEYWORD, &output, "output", 'o',
+ (notmuch_keyword_t []){ { "threads", OUTPUT_THREADS },
+ { "messages", OUTPUT_MESSAGES },
+ { 0, 0 } } },
+ { NOTMUCH_OPT_BOOLEAN, &no_exclude, "no-exclude", 'd', 0 },
+ { 0, 0, 0, 0, 0 }
+ };