[PATCH 3/6] Remove show-message.c
authorAustin Clements <amdragon@MIT.EDU>
Sun, 8 Apr 2012 00:57:47 +0000 (20:57 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:08 +0000 (09:46 -0800)
8b/cc3240db1ef03c8a72e7ecf3d8452e51e65df0 [new file with mode: 0644]

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