From 842f7bfc720d5642dfaa506ab426bfc05e19eb97 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Sun, 8 Apr 2012 20:57:47 +2000 Subject: [PATCH] [PATCH 3/6] Remove show-message.c --- 8b/cc3240db1ef03c8a72e7ecf3d8452e51e65df0 | 227 ++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 8b/cc3240db1ef03c8a72e7ecf3d8452e51e65df0 diff --git a/8b/cc3240db1ef03c8a72e7ecf3d8452e51e65df0 b/8b/cc3240db1ef03c8a72e7ecf3d8452e51e65df0 new file mode 100644 index 000000000..36bd9da89 --- /dev/null +++ b/8b/cc3240db1ef03c8a72e7ecf3d8452e51e65df0 @@ -0,0 +1,227 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 5BC8C431FD6 + for ; Sat, 7 Apr 2012 17:58:05 -0700 (PDT) +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 sNt0QtO5g-YM for ; + Sat, 7 Apr 2012 17:58:01 -0700 (PDT) +Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU + [18.9.25.13]) + by olra.theworths.org (Postfix) with ESMTP id 5CB9F431FCF + for ; Sat, 7 Apr 2012 17:58:00 -0700 (PDT) +X-AuditID: 1209190d-b7fbf6d0000008ba-21-4f80e298fbbd +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP + id E7.6E.02234.892E08F4; Sat, 7 Apr 2012 20:58:00 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q380vx8t027086; + Sat, 7 Apr 2012 20:57:59 -0400 +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 q380vwJs002166 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Sat, 7 Apr 2012 20:57:59 -0400 (EDT) +Received: from amthrax by drake.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1SGgS6-0001SS-5K; Sat, 07 Apr 2012 20:57:58 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: =?UTF-8?q?=5BPATCH=203/6=5D=20Remove=20show-message=2Ec?= +Date: Sat, 7 Apr 2012 20:57:47 -0400 +Message-Id: <1333846670-5356-4-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1333846670-5356-1-git-send-email-amdragon@mit.edu> +References: <1333846670-5356-1-git-send-email-amdragon@mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IR4hRV1p3xqMHfYMV8XovrN2cyOzB6PFt1 + izmAMYrLJiU1J7MstUjfLoEr4/q02YwFD5Uq9j3Zx9TAeFe6i5GTQ0LARGL5j9uMELaYxIV7 + 69m6GLk4hAT2MUpsufmYFcJZzyjRP38lO0iVkMA9Jolpt4shEvMZJfoazoC1swloSGzbvxzM + FhGQlth5dzZQNwcHs4CaxJ8uFRBTWMBJ4sI/QZAKFgFVibb/a8GqeQXsJe59aGKFOEJB4tm6 + 40wgNqeAg8T21q3MEGvtJZYuPg5VLyhxcuYTFojp6hLr5wmBhJkF5CWat85mnsAoNAtJ1SyE + qllIqhYwMq9ilE3JrdLNTczMKU5N1i1OTszLSy3SNdLLzSzRS00p3cQIDl9J3h2M7w4qHWIU + 4GBU4uF9uKPBX4g1say4MvcQoyQHk5Io79MHQCG+pPyUyozE4oz4otKc1OJDjBIczEoivPcP + A+V4UxIrq1KL8mFS0hwsSuK8qlrv/IQE0hNLUrNTUwtSi2CyMhwcShK8rx8CNQoWpaanVqRl + 5pQgpJk4OEGG8wANvwdSw1tckJhbnJkOkT/FqMtx93zvFUYhlrz8vFQpcd59IEUCIEUZpXlw + c2Bp5xWjONBbwrzfQap4gCkLbtIroCVMQEtqXtWDLClJREhJNTBm2t5Rv7rjI//a39a6Lw+1 + Z7VM+aQ85d7tUKmw4vmzq7bVtUzaGP70N5t+xY457hWr1/ydUmq9ZjPrAvcl7/isFSbeavN3 + cJxgfEx0SfqXwqVfQpc1XJzpI/CTs/FMR00e25nF1WEPV+8L+f6lV6btXcjHdcFRUmsuP75j + Jt8rvIJRin0F27E5SizFGYmGWsxFxYkAx1ZUeRYDAAA= +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: Sun, 08 Apr 2012 00:58:06 -0000 + +There are no more calls to show_message_body. +--- + Makefile.local | 1 - + notmuch-client.h | 5 --- + show-message.c | 106 ------------------------------------------------------ + 3 files changed, 0 insertions(+), 112 deletions(-) + delete mode 100644 show-message.c + +diff --git a/Makefile.local b/Makefile.local +index 1131dea..935f0f1 100644 +--- a/Makefile.local ++++ b/Makefile.local +@@ -301,7 +301,6 @@ notmuch_client_srcs = \ + notmuch-tag.c \ + notmuch-time.c \ + query-string.c \ +- show-message.c \ + mime-node.c \ + json.c + +diff --git a/notmuch-client.h b/notmuch-client.h +index 203ac49..34155fc 100644 +--- a/notmuch-client.h ++++ b/notmuch-client.h +@@ -184,11 +184,6 @@ char * + query_string_from_args (void *ctx, int argc, char *argv[]); + + notmuch_status_t +-show_message_body (notmuch_message_t *message, +- const notmuch_show_format_t *format, +- notmuch_show_params_t *params); +- +-notmuch_status_t + show_one_part (const char *filename, int part); + + void +diff --git a/show-message.c b/show-message.c +deleted file mode 100644 +index 83ecf81..0000000 +--- a/show-message.c ++++ /dev/null +@@ -1,106 +0,0 @@ +-/* notmuch - Not much of an email program, (just index and search) +- * +- * Copyright © 2009 Carl Worth +- * Copyright © 2009 Keith Packard +- * +- * This program is free software: you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation, either version 3 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program. If not, see http://www.gnu.org/licenses/ . +- * +- * Authors: Carl Worth +- * Keith Packard +- */ +- +-#include "notmuch-client.h" +- +-typedef struct show_message_state { +- int part_count; +-} show_message_state_t; +- +-static void +-show_message_part (mime_node_t *node, +- show_message_state_t *state, +- const notmuch_show_format_t *format, +- int first) +-{ +- /* Formatters expect the envelope for embedded message parts */ +- GMimeObject *part = node->envelope_part ? +- GMIME_OBJECT (node->envelope_part) : node->part; +- int i; +- +- if (!first) +- fputs (format->part_sep, stdout); +- +- /* Format this part */ +- if (format->part_start) +- format->part_start (part, &(state->part_count)); +- +- if (node->decrypt_attempted && format->part_encstatus) +- format->part_encstatus (node->decrypt_success); +- +- if (node->verify_attempted && format->part_sigstatus) +-#ifdef GMIME_ATLEAST_26 +- format->part_sigstatus (node->sig_list); +-#else +- format->part_sigstatus (node->sig_validity); +-#endif +- +- format->part_content (part); +- +- if (node->envelope_part) { +- fputs (format->header_start, stdout); +- if (format->header_message_part) +- format->header_message_part (GMIME_MESSAGE (node->part)); +- fputs (format->header_end, stdout); +- +- fputs (format->body_start, stdout); +- } +- +- /* Recurse over the children */ +- state->part_count += 1; +- for (i = 0; i < node->nchildren; i++) +- show_message_part (mime_node_child (node, i), state, format, i == 0); +- +- /* Finish this part */ +- if (node->envelope_part) +- fputs (format->body_end, stdout); +- +- if (format->part_end) +- format->part_end (part); +-} +- +-notmuch_status_t +-show_message_body (notmuch_message_t *message, +- const notmuch_show_format_t *format, +- notmuch_show_params_t *params) +-{ +- notmuch_status_t ret; +- show_message_state_t state; +- mime_node_t *root, *part; +- +- ret = mime_node_open (NULL, message, params->cryptoctx, params->decrypt, +- &root); +- if (ret) +- return ret; +- +- /* The caller of show_message_body has already handled the +- * outermost envelope, so skip it. */ +- state.part_count = MAX (params->part, 1); +- +- part = mime_node_seek_dfs (root, state.part_count); +- if (part) +- show_message_part (part, &state, format, TRUE); +- +- talloc_free (root); +- +- return NOTMUCH_STATUS_SUCCESS; +-} +-- +1.7.9.1 + -- 2.26.2