aboutsummaryrefslogtreecommitdiffhomepage
path: root/sprinter.h
diff options
context:
space:
mode:
authorGravatar Peter Feigl <craven@gmx.net>2012-12-06 22:12:11 +0100
committerGravatar David Bremner <bremner@debian.org>2012-12-08 09:26:29 -0400
commitfd3ffe35a2bf15676426235b809df915cd3473e4 (patch)
tree4095b4bef556bd11cb4ee11a4a7c193e0b81f4e1 /sprinter.h
parent540a34d096035ebf0c79990f030210b3fb65fa4f (diff)
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 ]
Diffstat (limited to 'sprinter.h')
-rw-r--r--sprinter.h4
1 files changed, 4 insertions, 0 deletions
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