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 C2D51429E37 for ; Thu, 2 Aug 2012 18:15:34 -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 qYsxmmocphoN for ; Thu, 2 Aug 2012 18:15:33 -0700 (PDT) Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by olra.theworths.org (Postfix) with ESMTP id CF643429E43 for ; Thu, 2 Aug 2012 18:15:11 -0700 (PDT) X-AuditID: 12074422-b7f1f6d00000090b-ea-501b261f1c4e Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id EA.20.02315.F162B105; Thu, 2 Aug 2012 21:15:11 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q731FBF8008957; Thu, 2 Aug 2012 21:15:11 -0400 Received: from drake.dyndns.org (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 q731F45r002795 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Thu, 2 Aug 2012 21:15:05 -0400 (EDT) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1Sx6To-0003wd-IW; Thu, 02 Aug 2012 21:15:04 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v3 12/13] show: Convert do_show to use sprinter Date: Thu, 2 Aug 2012 21:14:58 -0400 Message-Id: <1343956499-14543-13-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1343956499-14543-1-git-send-email-amdragon@mit.edu> References: <1343956499-14543-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOIsWRmVeSWpSXmKPExsUixCmqrSuvJh1g8OGVpsXquTwW12/OZLZ4 s3IeqwOzx85Zd9k9Dn9dyOLxbNUt5gDmKC6blNSczLLUIn27BK6Mnt0X2Ap+cVbcnvmFrYHx EXsXIyeHhICJxKxD/xkhbDGJC/fWs3UxcnEICexjlJjy9hCUs55RovfBaVYI5yGTxP+HH9gh nLmMEgueXmAF6WcT0JDYtn852CwRAWmJnXdng8WZBeIktkyB2CEsYC+x4fdlNhCbRUBV4tW/ 72B38Ao4SpzcspAJ4g55iaf3+8BqOIHir9++AusVEnCQWN7WzTqBkX8BI8MqRtmU3Crd3MTM nOLUZN3i5MS8vNQiXVO93MwSvdSU0k2MoPBid1HawfjzoNIhRgEORiUeXmNJ6QAh1sSy4src Q4ySHExKorzMSkAhvqT8lMqMxOKM+KLSnNTiQ4wSHMxKIrxVS6QChHhTEiurUovyYVLSHCxK 4rzXUm76CwmkJ5akZqemFqQWwWRlODiUJHj7VIGGChalpqdWpGXmlCCkmTg4QYbzAA3fDlLD W1yQmFucmQ6RP8WoKCXOmw6SEABJZJTmwfXC4v8VozjQK8K87SBVPMDUAdf9CmgwE9BgOzOQ q4tLEhFSUg2MkzjCLKwiWt2OLxNL0+hu77bw1EroZ5XevSmvgNvQ83bej3NbuFfdfVV3bbPd WoMzF1rSDhT9WdbzueKlwPHWCxrd7/xcGlzvBmluOTkzjW/lWq0nwROFOrhdb3RfeWVqZ3tE v5/5asAEgbOXs39s1DZs7nmcsMozdHJpg1FFs5f6zlCleHklluKMREMt5qLiRAAlToi+2gIA AA== Cc: tomi.ollila@iki.fi 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: Fri, 03 Aug 2012 01:15:35 -0000 --- notmuch-show.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index ec3e861..89bf2e7 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -961,11 +961,9 @@ do_show (void *ctx, notmuch_threads_t *threads; notmuch_thread_t *thread; notmuch_messages_t *messages; - int first_toplevel = 1; notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS; - if (format->message_set_start) - fputs (format->message_set_start, stdout); + sp->begin_list (sp); for (threads = notmuch_query_search_threads (query); notmuch_threads_valid (threads); @@ -979,10 +977,6 @@ do_show (void *ctx, INTERNAL_ERROR ("Thread %s has no toplevel messages.\n", notmuch_thread_get_thread_id (thread)); - if (!first_toplevel && format->message_set_sep) - fputs (format->message_set_sep, stdout); - first_toplevel = 0; - status = show_messages (ctx, format, sp, messages, 0, params); if (status && !res) res = status; @@ -991,8 +985,7 @@ do_show (void *ctx, } - if (format->message_set_end) - fputs (format->message_set_end, stdout); + sp->end (sp); return res != NOTMUCH_STATUS_SUCCESS; } -- 1.7.10