Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C5A7A431E62 for ; Fri, 3 Aug 2012 02:35:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 buHikfsnnLRs for ; Fri, 3 Aug 2012 02:35:25 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id AA2D0431FAE for ; Fri, 3 Aug 2012 02:35:25 -0700 (PDT) Received: by guru.guru-group.fi (Postfix, from userid 501) id 29137100372; Fri, 3 Aug 2012 12:35:29 +0300 (EEST) From: Tomi Ollila To: Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH v3 00/13] Convert notmuch show to use structure printers In-Reply-To: <1343956499-14543-1-git-send-email-amdragon@mit.edu> References: <1343956499-14543-1-git-send-email-amdragon@mit.edu> User-Agent: Notmuch/0.13.2+123~gc7b631e (http://notmuchmail.org) Emacs/23.1.1 (x86_64-redhat-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 09:35:26 -0000 On Fri, Aug 03 2012, Austin Clements wrote: > 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). LGTM. Tomi > 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 { > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch