From 88402a1cddba79e339fc92037be2449c429c0780 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Dec 2018 20:05:00 -0500 Subject: Rename SerdStyle to SerdWriterFlags --- include/serd/serd.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'include/serd') diff --git a/include/serd/serd.h b/include/serd/serd.h index e177235b..941473ac 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -230,19 +230,22 @@ typedef struct { } SerdURIView; /** - Syntax style options. + Writer style options. These flags allow more precise control of writer output style. Note that some options are only supported for some syntaxes, for example, NTriples does not support abbreviation and is always ASCII. */ typedef enum { - SERD_STYLE_ABBREVIATED = 1u << 0u, ///< Abbreviate triples when possible. - SERD_STYLE_ASCII = 1u << 1u, ///< Escape all non-ASCII characters. - SERD_STYLE_RESOLVED = 1u << 2u, ///< Resolve URIs against base URI. - SERD_STYLE_CURIED = 1u << 3u, ///< Shorten URIs into CURIEs. - SERD_STYLE_BULK = 1u << 4u, ///< Write output in pages. -} SerdStyle; + SERD_WRITE_ABBREVIATED = 1u << 0u, ///< Abbreviate triples when possible + SERD_WRITE_ASCII = 1u << 1u, ///< Escape all non-ASCII characters + SERD_WRITE_RESOLVED = 1u << 2u, ///< Resolve URIs against base URI + SERD_WRITE_CURIED = 1u << 3u, ///< Shorten URIs into CURIEs + SERD_WRITE_BULK = 1u << 4u, ///< Write output in pages +} SerdWriterFlag; + +/// Bitwise OR of SerdWriterFlag values +typedef uint32_t SerdWriterFlags; /** Free memory allocated by Serd @@ -869,7 +872,7 @@ serd_reader_free(SerdReader* SERD_NULLABLE reader); SERD_API SerdWriter* SERD_ALLOCATED serd_writer_new(SerdSyntax syntax, - SerdStyle style, + SerdWriterFlags flags, SerdEnv* SERD_NONNULL env, const SerdURIView* SERD_NULLABLE base_uri, SerdSink SERD_NONNULL ssink, -- cgit v1.2.1