summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c44a0ed)
In addition to simplifying the code, we'll need the notmuch_message_t*
in show_message_body shortly.
query_string_from_args (void *ctx, int argc, char *argv[]);
notmuch_status_t
query_string_from_args (void *ctx, int argc, char *argv[]);
notmuch_status_t
-show_message_body (const char *filename,
+show_message_body (notmuch_message_t *message,
const notmuch_show_format_t *format,
notmuch_show_params_t *params);
const notmuch_show_format_t *format,
notmuch_show_params_t *params);
notmuch_message_get_header (message, "date"),
notmuch_message_get_header (message, "from"));
notmuch_message_get_header (message, "date"),
notmuch_message_get_header (message, "from"));
- show_message_body (notmuch_message_get_filename (message),
- format, params);
+ show_message_body (message, format, params);
notmuch_message_destroy (message);
}
notmuch_message_destroy (message);
}
}
if (format->part_content)
}
if (format->part_content)
- show_message_body (notmuch_message_get_filename (message),
- format, params);
+ show_message_body (message, format, params);
if (params->part <= 0) {
fputs (format->body_end, stdout);
if (params->part <= 0) {
fputs (format->body_end, stdout);
-show_message_body (const char *filename,
+show_message_body (notmuch_message_t *message,
const notmuch_show_format_t *format,
notmuch_show_params_t *params)
{
const notmuch_show_format_t *format,
notmuch_show_params_t *params)
{
GMimeParser *parser = NULL;
GMimeMessage *mime_message = NULL;
notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
GMimeParser *parser = NULL;
GMimeMessage *mime_message = NULL;
notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
+ const char *filename = notmuch_message_get_filename (message);
FILE *file = NULL;
show_message_state_t state;
FILE *file = NULL;
show_message_state_t state;