summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
26ba4ab)
Unlike the previous patches, this function is used for all formats.
However, for formats other than the JSON format, the sprinter methods
used by show_message are all no-ops, so this code continues to
function correctly for all of the formats.
Converting show_message eliminates show_null_message in the process,
since this maps directly to an sprinter method.
return NOTMUCH_STATUS_SUCCESS;
}
return NOTMUCH_STATUS_SUCCESS;
}
-static notmuch_status_t
-show_null_message (const notmuch_show_format_t *format)
-{
- /* Output a null message. Currently empty for all formats except Json */
- if (format->null_message)
- printf ("%s", format->null_message);
- return NOTMUCH_STATUS_SUCCESS;
-}
-
static notmuch_status_t
show_message (void *ctx,
const notmuch_show_format_t *format,
static notmuch_status_t
show_message (void *ctx,
const notmuch_show_format_t *format,
notmuch_message_t *message;
notmuch_bool_t match;
notmuch_bool_t excluded;
notmuch_message_t *message;
notmuch_bool_t match;
notmuch_bool_t excluded;
int next_indent;
notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS;
int next_indent;
notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS;
- if (format->message_set_start)
- fputs (format->message_set_start, stdout);
for (;
notmuch_messages_valid (messages);
notmuch_messages_move_to_next (messages))
{
for (;
notmuch_messages_valid (messages);
notmuch_messages_move_to_next (messages))
{
- if (!first_set && format->message_set_sep)
- fputs (format->message_set_sep, stdout);
- first_set = 0;
-
- if (format->message_set_start)
- fputs (format->message_set_start, stdout);
message = notmuch_messages_get (messages);
message = notmuch_messages_get (messages);
res = status;
next_indent = indent + 1;
} else {
res = status;
next_indent = indent + 1;
} else {
- status = show_null_message (format);
- if (!status && format->message_set_sep)
- fputs (format->message_set_sep, stdout);
-
status = show_messages (ctx,
format, sp,
notmuch_message_get_replies (message),
status = show_messages (ctx,
format, sp,
notmuch_message_get_replies (message),
notmuch_message_destroy (message);
notmuch_message_destroy (message);
- if (format->message_set_end)
- fputs (format->message_set_end, stdout);
- if (format->message_set_end)
- fputs (format->message_set_end, stdout);