diff options
author | Peter Feigl <craven@gmx.net> | 2012-12-06 22:12:11 +0100 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-12-08 09:26:29 -0400 |
commit | fd3ffe35a2bf15676426235b809df915cd3473e4 (patch) | |
tree | 4095b4bef556bd11cb4ee11a4a7c193e0b81f4e1 /sprinter.h | |
parent | 540a34d096035ebf0c79990f030210b3fb65fa4f (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.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |