+ if (strcmp (argv[i], "--") == 0) {
+ i++;
+ break;
+ }
+ if (STRNCMP_LITERAL (argv[i], "--format=") == 0) {
+ opt = argv[i] + sizeof ("--format=") - 1;
+ if (strcmp (opt, "text") == 0) {
+ format = &format_text;
+ } else if (strcmp (opt, "json") == 0) {
+ format = &format_json;
+ params.entire_thread = 1;
+ } else if (strcmp (opt, "mbox") == 0) {
+ format = &format_mbox;
+ } else if (strcmp (opt, "raw") == 0) {
+ params.raw = 1;
+ } else {
+ fprintf (stderr, "Invalid value for --format: %s\n", opt);
+ return 1;
+ }
+ } else if (STRNCMP_LITERAL (argv[i], "--entire-thread") == 0) {
+ params.entire_thread = 1;
+ } else {
+ fprintf (stderr, "Unrecognized option: %s\n", argv[i]);
+ return 1;
+ }