const char *item_sep;
const char *item_end;
const char *results_end;
+ const char *results_null;
} search_format_t;
static void
"%s", " ",
")", "\n",
"",
+ "\n",
"",
};
"]", ",\n",
"}",
"]\n",
+ "]\n",
};
static void
notmuch_thread_destroy (thread);
}
- fputs (format->results_end, stdout);
+ if (first_thread)
+ fputs (format->results_null, stdout);
+ else
+ fputs (format->results_end, stdout);
return 0;
}
notmuch_messages_destroy (messages);
- fputs (format->results_end, stdout);
+ if (first_message)
+ fputs (format->results_null, stdout);
+ else
+ fputs (format->results_end, stdout);
return 0;
}
if (messages)
notmuch_messages_destroy (messages);
- fputs (format->results_end, stdout);
+ if (first_tag)
+ fputs (format->results_null, stdout);
+ else
+ fputs (format->results_end, stdout);
return 0;
}