From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH] remove boolean "first" argument from format_part_sprinter
Date: Fri, 14 Jul 2017 15:05:06 +0200 [thread overview]
Message-ID: <20170714130506.22402-1-dkg@fifthhorseman.net> (raw)
This argument seems to be unused, and format_part_sprinter isn't
required to meet any specific API so it seems cleaner and simpler to
drop it.
---
notmuch-client.h | 2 +-
notmuch-reply.c | 2 +-
notmuch-show.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/notmuch-client.h b/notmuch-client.h
index 77b34184..5b91235a 100644
--- a/notmuch-client.h
+++ b/notmuch-client.h
@@ -240,7 +240,7 @@ show_one_part (const char *filename, int part);
void
format_part_sprinter (const void *ctx, struct sprinter *sp, mime_node_t *node,
- notmuch_bool_t first, notmuch_bool_t output_body,
+ notmuch_bool_t output_body,
notmuch_bool_t include_html);
void
diff --git a/notmuch-reply.c b/notmuch-reply.c
index e6c16641..876f1d6d 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -673,7 +673,7 @@ static int do_reply(notmuch_config_t *config,
/* Start the original */
sp->map_key (sp, "original");
- format_part_sprinter (config, sp, node, TRUE, TRUE, FALSE);
+ format_part_sprinter (config, sp, node, TRUE, FALSE);
/* End */
sp->end (sp);
diff --git a/notmuch-show.c b/notmuch-show.c
index 084b7dab..2487d43d 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -588,7 +588,7 @@ format_omitted_part_meta_sprinter (sprinter_t *sp, GMimeObject *meta, GMimePart
void
format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node,
- notmuch_bool_t first, notmuch_bool_t output_body,
+ notmuch_bool_t output_body,
notmuch_bool_t include_html)
{
/* Any changes to the JSON or S-Expression format should be
@@ -604,7 +604,7 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node,
if (output_body) {
sp->map_key (sp, "body");
sp->begin_list (sp);
- format_part_sprinter (ctx, sp, mime_node_child (node, 0), first, TRUE, include_html);
+ format_part_sprinter (ctx, sp, mime_node_child (node, 0), TRUE, include_html);
sp->end (sp);
}
sp->end (sp);
@@ -706,7 +706,7 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node,
}
for (i = 0; i < node->nchildren; i++)
- format_part_sprinter (ctx, sp, mime_node_child (node, i), i == 0, TRUE, include_html);
+ format_part_sprinter (ctx, sp, mime_node_child (node, i), TRUE, include_html);
/* Close content structures */
for (i = 0; i < nclose; i++)
@@ -720,7 +720,7 @@ format_part_sprinter_entry (const void *ctx, sprinter_t *sp,
mime_node_t *node, unused (int indent),
const notmuch_show_params_t *params)
{
- format_part_sprinter (ctx, sp, node, TRUE, params->output_body, params->include_html);
+ format_part_sprinter (ctx, sp, node, params->output_body, params->include_html);
return NOTMUCH_STATUS_SUCCESS;
}
--
2.13.2
next reply other threads:[~2017-07-14 13:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 13:05 Daniel Kahn Gillmor [this message]
2017-08-17 1:05 ` [PATCH] remove boolean "first" argument from format_part_sprinter David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170714130506.22402-1-dkg@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).