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 01D2B429E4C for ; Thu, 2 Aug 2012 18:15:15 -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 QwjCuRxFoHH6 for ; Thu, 2 Aug 2012 18:15:12 -0700 (PDT) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by olra.theworths.org (Postfix) with ESMTP id 800CA429E26 for ; Thu, 2 Aug 2012 18:15:08 -0700 (PDT) X-AuditID: 12074424-b7fa06d0000008c2-c4-501b261bb2b6 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id 35.5C.02242.B162B105; Thu, 2 Aug 2012 21:15:07 -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 q731F6f4012763; Thu, 2 Aug 2012 21:15:06 -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 q731F4Au002783 (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 1Sx6Tn-0003w7-UZ; Thu, 02 Aug 2012 21:15:03 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v3 00/13] Convert notmuch show to use structure printers Date: Thu, 2 Aug 2012 21:14:46 -0400 Message-Id: <1343956499-14543-1-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDIsWRmVeSWpSXmKPExsUixCmqrCutJh1gMPe1hMXquTwW12/OZLZ4 s3IeqwOzx85Zd9k9Dn9dyOLxbNUt5gDmKC6blNSczLLUIn27BK6MrgtnWAvu8FZc67nA3MC4 gbuLkZNDQsBEYu6Jt2wQtpjEhXvrgWwuDiGBfYwSu76eYwZJCAmsZ5Q4M8MSIvGQSeLQp80s EIm5jBJrH9aC2GwCGhLb9i9nBLFFBKQldt6dzQpiMwsYSlz+2gFWLyzgIdG15wtYDYuAqsTi /e1ANgcHr4CDxNVHGhBHyEs8vd/HNoGRdwEjwypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdc73c zBK91JTSTYygQGF3UdnB2HxI6RCjAAejEg+vkaR0gBBrYllxZe4hRkkOJiVRXmYloBBfUn5K ZUZicUZ8UWlOavEhRgkOZiUR3qolUgFCvCmJlVWpRfkwKWkOFiVx3uspN/2FBNITS1KzU1ML UotgsjIcHEoSvMGqQEMFi1LTUyvSMnNKENJMHJwgw3mAhtuD1PAWFyTmFmemQ+RPMSpKifOm gyQEQBIZpXlwvbBIfsUoDvSKMK8XSBUPMAnAdb8CGswENNjODOTq4pJEhJRUA+NhaY7muBMb vjv93+R7wub32z0pF/7nX+JP7Z64yU55omQtmy8L45Zb+u29HpektquXWzsdmyokeHNjjcC2 XyKPfdle/uiXyfE0PKvgm5WxxqNqSY3XxEK5CUXfFHpfhN14IFjVdS498UbnPLbdeqwpive3 dMuY9hZsrnCNV3s1c6fltQ8XMpRYijMSDbWYi4oTAUbwaGC/AgAA 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:15 -0000 Relative to version 2 [0], this version fixes a duplicate typedef of struct sprinter that was not standards compliant and failed to compile on older gccs [1] (thanks to Tomi for discovering that and figuring out what was going on). The diff relative to version 2 follows. [0] id:"1343449754-9010-1-git-send-email-amdragon@mit.edu" [1] http://stackoverflow.com/questions/8594954/repeated-typedefs-invalid-in-c-but-valid-in-c diff --git a/notmuch-client.h b/notmuch-client.h index de31aa1..ae9344b 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -66,12 +66,12 @@ typedef GMimeCipherContext notmuch_crypto_context_t; #define STRINGIFY_(s) #s typedef struct mime_node mime_node_t; -typedef struct sprinter sprinter_t; +struct sprinter; struct notmuch_show_params; typedef struct notmuch_show_format { - sprinter_t *(*new_sprinter) (const void *ctx, FILE *stream); - notmuch_status_t (*part) (const void *ctx, sprinter_t *sprinter, + struct sprinter *(*new_sprinter) (const void *ctx, FILE *stream); + notmuch_status_t (*part) (const void *ctx, struct sprinter *sprinter, struct mime_node *node, int indent, const struct notmuch_show_params *params); } notmuch_show_format_t; @@ -175,11 +175,11 @@ notmuch_status_t show_one_part (const char *filename, int part); void -format_part_json (const void *ctx, sprinter_t *sp, mime_node_t *node, +format_part_json (const void *ctx, struct sprinter *sp, mime_node_t *node, notmuch_bool_t first, notmuch_bool_t output_body); void -format_headers_json (sprinter_t *sp, GMimeMessage *message, +format_headers_json (struct sprinter *sp, GMimeMessage *message, notmuch_bool_t reply); typedef enum {