aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorAustin Clements <amdragon@MIT.EDU>2012-04-07 20:57:46 -0400
committerDavid Bremner <bremner@debian.org>2012-04-15 09:42:15 -0300
commitb92f15d014604452c148e75b5b8bd38b3f382f20 (patch)
tree2d3be7ad73b9b36ac55c3485b0bbec1354ff7a37 /notmuch-show.c
parent98cad5a207438601942ecb8142a41133d54f0fbc (diff)
show: Remove support for old-style formatters in show_message
show_message used to have a compatibility path for old-style formatters. This removes that.
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c52
1 files changed, 13 insertions, 39 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index 7af8e64e..69164bda 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -815,46 +815,20 @@ show_message (void *ctx,
int indent,
notmuch_show_params_t *params)
{
- if (format->part) {
- void *local = talloc_new (ctx);
- mime_node_t *root, *part;
- notmuch_status_t status;
-
- status = mime_node_open (local, message, params->cryptoctx,
- params->decrypt, &root);
- if (status)
- goto DONE;
- part = mime_node_seek_dfs (root, (params->part < 0 ? 0 : params->part));
- if (part)
- status = format->part (local, part, indent, params);
- DONE:
- talloc_free (local);
- return status;
- }
-
- if (params->part <= 0) {
- fputs (format->message_start, stdout);
- if (format->message)
- format->message(ctx, message, indent);
-
- fputs (format->header_start, stdout);
- if (format->header)
- format->header(ctx, message);
- fputs (format->header_end, stdout);
-
- fputs (format->body_start, stdout);
- }
-
- if (format->part_content)
- show_message_body (message, format, params);
-
- if (params->part <= 0) {
- fputs (format->body_end, stdout);
-
- fputs (format->message_end, stdout);
- }
+ void *local = talloc_new (ctx);
+ mime_node_t *root, *part;
+ notmuch_status_t status;
- return NOTMUCH_STATUS_SUCCESS;
+ status = mime_node_open (local, message, params->cryptoctx,
+ params->decrypt, &root);
+ if (status)
+ goto DONE;
+ part = mime_node_seek_dfs (root, (params->part < 0 ? 0 : params->part));
+ if (part)
+ status = format->part (local, part, indent, params);
+ DONE:
+ talloc_free (local);
+ return status;
}
static notmuch_status_t