From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A77E4431FC3 for ; Fri, 2 Mar 2012 21:20:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qIsQI1IkaW9l for ; Fri, 2 Mar 2012 21:20:38 -0800 (PST) Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU [18.9.25.14]) by olra.theworths.org (Postfix) with ESMTP id 4CBB5431FC4 for ; Fri, 2 Mar 2012 21:20:33 -0800 (PST) X-AuditID: 1209190e-b7f7c6d0000008c3-7a-4f51aa211d7a Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id 02.37.02243.12AA15F4; Sat, 3 Mar 2012 00:20:33 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q235KW9h030587; Sat, 3 Mar 2012 00:20:32 -0500 Received: from drake.mit.edu (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [209.6.116.242]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q235KUeE022256 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 3 Mar 2012 00:20:31 -0500 (EST) Received: from amthrax by drake.mit.edu with local (Exim 4.77) (envelope-from ) id 1S3hOQ-0000h4-Qo; Sat, 03 Mar 2012 00:20:30 -0500 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 4/5] show: Move format_part_content_raw with the other new-style formats Date: Sat, 3 Mar 2012 00:20:24 -0500 Message-Id: <1330752025-2542-5-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1330752025-2542-1-git-send-email-amdragon@mit.edu> References: <1330752025-2542-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixG6noqu4KtDf4Mg2dovrN2cyOzB6PFt1 izmAMYrLJiU1J7MstUjfLoErY/uX9UwFqwUrNs88wd7AOJ2vi5GDQ0LARKL5SFgXIyeQKSZx 4d56ti5GLg4hgX2MEov2fGeGcNYzSsy80MUI4dxjktg1YzYLhDOfUaL/ZgcbSD+bgIbEtv3L GUFsEQFpiZ13Z7OCrGAWUJP406UCEhYWiJC4eXgqWAmLgKrEhW3XWUFsXgF7iRlzprNAnKEg cW71OXYQm1PAQaLl+DGwGiGgmh/9nSwTGPkXMDKsYpRNya3SzU3MzClOTdYtTk7My0st0jXW y80s0UtNKd3ECAoaTkm+HYxfDyodYhTgYFTi4b30MsBfiDWxrLgy9xCjJAeTkihv+fJAfyG+ pPyUyozE4oz4otKc1OJDjBIczEoivMs8gXK8KYmVValF+TApaQ4WJXFeNa13fkIC6Yklqdmp qQWpRTBZGQ4OJQneqJVAjYJFqempFWmZOSUIaSYOTpDhPEDDW0FqeIsLEnOLM9Mh8qcYFaXE eXNBEgIgiYzSPLheWFS/YhQHekWYNwCkigeYEOC6XwENZgIavPiyH8jgkkSElFQD47qbZy/I m2QdjNrGff/4h6vdC95yf/80mVn65NTCa74bEtTla6dN6Vn84PWMjt0SRzaLKB1n5/yr0J0z d+2G+VWXPLme+skeXbanzdnv1Ffhbc7z+zQXhG1/n6EYIH1T1509IeGP/A7dCzsWe8nxidkJ LF4af0IlyjTAl11+YtSkyvtXwvl93ZVYijMSDbWYi4oTAYiFwZPFAgAA X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2012 05:20:41 -0000 Just code motion. --- notmuch-show.c | 54 +++++++++++++++++++++++++++--------------------------- 1 files changed, 27 insertions(+), 27 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 72c141e..6f6052c 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -475,33 +475,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) @@ -758,6 +731,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, -- 1.7.7.3