aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-14 17:32:01 +0200
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commit0daee5d67f5924f260651556a46f0af354fca341 (patch)
tree2e000a4090e7d9ee2d57b1757e831942a70bc2c2 /include
parent2ab2b5f2c7bd4d26aa99eee959f0e5192b3813dc (diff)
downloadserd-0daee5d67f5924f260651556a46f0af354fca341.tar.gz
serd-0daee5d67f5924f260651556a46f0af354fca341.tar.bz2
serd-0daee5d67f5924f260651556a46f0af354fca341.zip
Add empty syntax type for suppressing output
Diffstat (limited to 'include')
-rw-r--r--include/serd/serd.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index ba1b4ddc..79353e50 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -127,10 +127,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
@@ -461,8 +462,8 @@ serd_byte_sink_free(SerdByteSink* SERD_NULLABLE 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_PURE_API
SerdSyntax
@@ -471,8 +472,8 @@ serd_syntax_by_name(const char* SERD_NONNULL 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_PURE_API
SerdSyntax