From: Tomi Ollila Date: Thu, 12 Jul 2012 10:05:42 +0000 (+0300) Subject: Re: [PATCH v4 1/3] Add support for structured output formatters. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4147f97b3faea94050baa78030a7cb637c499f55;p=notmuch-archives.git Re: [PATCH v4 1/3] Add support for structured output formatters. --- diff --git a/5a/bf91a769cecc672286bf8cd3b0cd8ff1aad5ff b/5a/bf91a769cecc672286bf8cd3b0cd8ff1aad5ff new file mode 100644 index 000000000..c74f27db1 --- /dev/null +++ b/5a/bf91a769cecc672286bf8cd3b0cd8ff1aad5ff @@ -0,0 +1,82 @@ +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 58AFE431FC7 + for ; Thu, 12 Jul 2012 03:05:37 -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 qrthtVlVTtet for ; + Thu, 12 Jul 2012 03:05:33 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 3FBB1431FAE + for ; Thu, 12 Jul 2012 03:05:33 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id C2252100386; Thu, 12 Jul 2012 13:05:42 +0300 (EEST) +From: Tomi Ollila +To: craven@gmx.net, notmuch@notmuchmail.org +Subject: Re: [PATCH v4 1/3] Add support for structured output formatters. +In-Reply-To: <1342079004-5300-2-git-send-email-craven@gmx.net> +References: <87d34hsdx8.fsf@awakening.csail.mit.edu> + <1342079004-5300-1-git-send-email-craven@gmx.net> + <1342079004-5300-2-git-send-email-craven@gmx.net> +User-Agent: Notmuch/0.13.2+74~g65b26b0 (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: Thu, 12 Jul 2012 10:05:37 -0000 + +On Thu, Jul 12 2012, craven@gmx.net wrote: + +> This patch adds a new type sprinter_t, which is used for structured +> formatting, e.g. JSON or S-Expressions. The structure printer is the +> code from Austin Clements (id:87d34hsdx8.fsf@awakening.csail.mit.edu). + +... + +> + +> +/* Create a new structure printer that emits JSON */ +> +struct sprinter * +> +sprinter_json_new(const void *ctx, FILE *stream); +> + +> +/* A dummy structure printer that signifies that standard text output is +> + * to be used instead of any structured format. +> + */ +> +struct sprinter * +> +sprinter_text; + +Looks good... but this needs to be 'extern struct sprinter * sprinter_text;' + +see id:"1340563714-3103-1-git-send-email-tomi.ollila@iki.fi" +for reference. + + +> + +> +#endif // NOTMUCH_SPRINTER_H +> -- +> 1.7.11.1 + +Tomi