aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-14 17:32:01 +0200
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commitb81636681210b56caa0b9ad2d84118c8f355a186 (patch)
tree27d90d11c4e0370bb5e47bce3431e249e856a6c4 /serd
parentd459c6044e3bfdacded8d21c49315cf447e22d3e (diff)
downloadserd-b81636681210b56caa0b9ad2d84118c8f355a186.tar.gz
serd-b81636681210b56caa0b9ad2d84118c8f355a186.tar.bz2
serd-b81636681210b56caa0b9ad2d84118c8f355a186.zip
Add empty syntax type for suppressing output
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/serd/serd.h b/serd/serd.h
index c48ace10..e76aaa44 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -117,10 +117,11 @@ typedef enum {
/// RDF syntax type
typedef enum {
- SERD_TURTLE = 1, ///< Terse triples http://www.w3.org/TR/turtle
- SERD_NTRIPLES = 2, ///< Line-based triples http://www.w3.org/TR/n-triples/
- SERD_NQUADS = 3, ///< Line-based quads http://www.w3.org/TR/n-quads/
- SERD_TRIG = 4 ///< Terse quads http://www.w3.org/TR/trig/
+ SERD_SYNTAX_EMPTY = 0, ///< Empty syntax (suppress input or output)
+ SERD_TURTLE = 1, ///< Terse triples http://www.w3.org/TR/turtle
+ SERD_NTRIPLES = 2, ///< Flat triples http://www.w3.org/TR/n-triples/
+ SERD_NQUADS = 3, ///< Flat quads http://www.w3.org/TR/n-quads/
+ SERD_TRIG = 4 ///< Terse quads http://www.w3.org/TR/trig/
} SerdSyntax;
/// Flags indicating inline abbreviation information for a statement
@@ -473,8 +474,8 @@ serd_byte_sink_free(SerdByteSink* sink);
/**
Get a syntax by name
- Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG". Zero
- is returned if the name is not recognized.
+ Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG".
+ `SERD_SYNTAX_EMPTY` is returned if the name is not recognized.
*/
SERD_API
SerdSyntax
@@ -483,8 +484,8 @@ serd_syntax_by_name(const char* name);
/**
Guess a syntax from a filename
- This uses the file extension to guess the syntax of a file. Zero is
- returned if the extension is not recognized.
+ This uses the file extension to guess the syntax of a file.
+ `SERD_SYNTAX_EMPTY` is returned if the extension is not recognized.
*/
SERD_API
SerdSyntax