aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorAustin Clements <amdragon@MIT.EDU>2012-03-06 18:48:42 +0000
committerDavid Bremner <bremner@debian.org>2012-03-18 09:14:21 -0300
commit7e1742a82c4b52f5337d8db53347d547a4ac67b4 (patch)
tree9496bb34dcd3bdbfa0fa88579bbd77886cf0b079 /notmuch-show.c
parentd4312393530f70416612cf88dccc2620412a2bc6 (diff)
show: Move format_part_content_raw with the other new-style formats
Just code motion.
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index 353bda5e..341634de 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -476,33 +476,6 @@ format_part_sigstatus_json (mime_node_t *node)
}
#endif
-static void
-format_part_content_raw (GMimeObject *part)
-{
- if (! GMIME_IS_PART (part))
- return;
-
- GMimeStream *stream_stdout;
- GMimeStream *stream_filter = NULL;
- GMimeDataWrapper *wrapper;
-
- stream_stdout = g_mime_stream_file_new (stdout);
- g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);
-
- stream_filter = g_mime_stream_filter_new (stream_stdout);
-
- wrapper = g_mime_part_get_content_object (GMIME_PART (part));
-
- if (wrapper && stream_filter)
- g_mime_data_wrapper_write_to_stream (wrapper, stream_filter);
-
- if (stream_filter)
- g_object_unref (stream_filter);
-
- if (stream_stdout)
- g_object_unref(stream_stdout);
-}
-
static notmuch_status_t
format_part_text (const void *ctx, mime_node_t *node,
int indent, const notmuch_show_params_t *params)
@@ -760,6 +733,33 @@ format_part_mbox (const void *ctx, mime_node_t *node, unused (int indent),
return NOTMUCH_STATUS_SUCCESS;
}
+static void
+format_part_content_raw (GMimeObject *part)
+{
+ if (! GMIME_IS_PART (part))
+ return;
+
+ GMimeStream *stream_stdout;
+ GMimeStream *stream_filter = NULL;
+ GMimeDataWrapper *wrapper;
+
+ stream_stdout = g_mime_stream_file_new (stdout);
+ g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);
+
+ stream_filter = g_mime_stream_filter_new (stream_stdout);
+
+ wrapper = g_mime_part_get_content_object (GMIME_PART (part));
+
+ if (wrapper && stream_filter)
+ g_mime_data_wrapper_write_to_stream (wrapper, stream_filter);
+
+ if (stream_filter)
+ g_object_unref (stream_filter);
+
+ if (stream_stdout)
+ g_object_unref(stream_stdout);
+}
+
static notmuch_status_t
show_message (void *ctx,
const notmuch_show_format_t *format,