aboutsummaryrefslogtreecommitdiffhomepage
path: root/show-message.c
diff options
context:
space:
mode:
authorGravatar Jameson Graef Rollins <jrollins@finestructure.net>2011-05-22 19:56:53 -0700
committerGravatar Carl Worth <cworth@cworth.org>2011-05-23 14:55:27 -0700
commit6c2417cabc1b35ea4fc9db6493d85354b1039d6d (patch)
tree2294ff3d2ad52b12cb657966d984c29b0acd89c0 /show-message.c
parentd2177d0b22a95989dee4f46a1b2cca68484a2ce3 (diff)
add part_sep formatter to replace "first" argument to part format functions
A new field "part_sep" is added to the notmuch_show_format structure, to be used for part separation. This is cleaner than the "first" argument that was being passed around to the part arguments, and allows the function that handles overall part output formatting (show_message_part) to directly handle when outputting the separator.
Diffstat (limited to 'show-message.c')
-rw-r--r--show-message.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/show-message.c b/show-message.c
index 3c29f26a..c5556d81 100644
--- a/show-message.c
+++ b/show-message.c
@@ -28,12 +28,15 @@ show_message_part (GMimeObject *part,
const notmuch_show_format_t *format,
int first)
{
+ if (!first)
+ fputs (format->part_sep, stdout);
+
if (GMIME_IS_MULTIPART (part)) {
GMimeMultipart *multipart = GMIME_MULTIPART (part);
int i;
*part_count = *part_count + 1;
- format->part (part, part_count, first);
+ format->part (part, part_count);
for (i = 0; i < g_mime_multipart_get_count (multipart); i++) {
show_message_part (g_mime_multipart_get_part (multipart, i),
@@ -65,7 +68,7 @@ show_message_part (GMimeObject *part,
*part_count = *part_count + 1;
- format->part (part, part_count, first);
+ format->part (part, part_count);
if (format->part_end)
format->part_end (part);
}