X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=93fb16f32f9a897309657dac170b433360d6b28b;hp=8f72e587537ab4912d4a70800afad4445b1a6371;hb=661c35712343408b4c034e13fc6cc8be7d580e21;hpb=2d09775baf1591e51ef7a8911655f2a5e9651c47 diff --git a/notmuch-show.c b/notmuch-show.c index 8f72e587..93fb16f3 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -65,6 +65,8 @@ format_part_content_json (GMimeObject *part); static void format_part_end_json (GMimeObject *part); +/* Any changes to the JSON format should be reflected in the file + * devel/schemata. */ static const notmuch_show_format_t format_json = { "[", NULL, "{", format_message_json, @@ -1029,7 +1031,7 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) notmuch_database_t *notmuch; notmuch_query_t *query; char *query_string; - int opt_index; + int opt_index, ret; const notmuch_show_format_t *format = &format_text; notmuch_show_params_t params = { .part = -1 }; int format_sel = NOTMUCH_FORMAT_NOT_SPECIFIED; @@ -1134,9 +1136,9 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) } if (params.part >= 0) - return do_show_single (ctx, query, format, ¶ms); + ret = do_show_single (ctx, query, format, ¶ms); else - return do_show (ctx, query, format, ¶ms); + ret = do_show (ctx, query, format, ¶ms); notmuch_query_destroy (query); notmuch_database_close (notmuch); @@ -1144,5 +1146,5 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) if (params.cryptoctx) g_object_unref(params.cryptoctx); - return 0; + return ret; }