[PATCH v3 00/13] Convert notmuch show to use structure printers

Austin Clements amdragon at MIT.EDU
Thu Aug 2 18:14:46 PDT 2012


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 at 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 {




More information about the notmuch mailing list