aboutsummaryrefslogtreecommitdiffhomepage
path: root/sprinter-text.c
Commit message (Collapse)AuthorAge
* sprinter: add text0 formatter for null character separated textGravatar Jani Nikula2012-12-18
| | | | | Same as the text formatter, but with each field separated by a null character rather than a newline character.
* sprinters: bugfix when NULL passed for a string.Gravatar Mark Walters2012-08-12
| | | | | | | | | | | | The string function in a sprinter may be called with a NULL string pointer (eg if a header is absent). This causes a segfault. We fix this by checking for a null pointer in the string functions and update the sprinter documentation. At the moment some output when format=text is done directly rather than via an sprinter: in that case a null pointer is passed to printf or similar and a "(null)" appears in the output. That behaviour is not changed in this patch.
* sprinter: Add a string_len methodGravatar Austin Clements2012-08-03
| | | | | | | This method allows callers to output strings with specific lengths. It's useful both for strings with embedded NULs (which JSON can represent, though parser support is apparently spotty), and non-terminated strings.
* Add structured output formatter for JSON and plain text (but don't use them ↵Gravatar craven@gmx.net2012-07-24
yet). Using the new structured printer support in sprinter.h, implement sprinter_json_create, which returns a new JSON structured output formatter. The formatter prints output similar to the existing JSON, but with differences in whitespace (mostly newlines, --output=summary prints the entire message summary on one line, not split across multiple lines). Also implement a "structured" formatter for plain text that prints prefixed strings, to be used with notmuch-search.c plain text output.