From fd3ffe35a2bf15676426235b809df915cd3473e4 Mon Sep 17 00:00:00 2001 From: Peter Feigl Date: Thu, 6 Dec 2012 22:12:11 +0100 Subject: Adding an S-expression structured output printer. This commit adds a structured output printer for Lisp S-Expressions. Later commits will use this printer in notmuch search, show and reply. The structure is the same as json, but: - arrays are written as lists: ("foo" "bar" "baaz" 1 2 3) - maps are written as p-lists: (:key "value" :other-key "other-value") - true is written as t - false is written as nil - null is written as nil [ whitespace changes by db ] --- sprinter.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sprinter.h') diff --git a/sprinter.h b/sprinter.h index 912a5262..59776a9c 100644 --- a/sprinter.h +++ b/sprinter.h @@ -70,4 +70,8 @@ sprinter_text_create (const void *ctx, FILE *stream); struct sprinter * sprinter_json_create (const void *ctx, FILE *stream); +/* Create a new structure printer that emits S-Expressions. */ +struct sprinter * +sprinter_sexp_create (const void *ctx, FILE *stream); + #endif // NOTMUCH_SPRINTER_H -- cgit v1.2.3