aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-29 20:05:00 -0500
committerDavid Robillard <d@drobilla.net>2021-03-07 15:32:23 -0500
commit88402a1cddba79e339fc92037be2449c429c0780 (patch)
tree0764b3080cbf216ae5993ac77718ea10f3803f0f /include
parentf4b1ec91cff0a543a8f7e553ab2113a1c31e0d86 (diff)
downloadserd-88402a1cddba79e339fc92037be2449c429c0780.tar.gz
serd-88402a1cddba79e339fc92037be2449c429c0780.tar.bz2
serd-88402a1cddba79e339fc92037be2449c429c0780.zip
Rename SerdStyle to SerdWriterFlags
Diffstat (limited to 'include')
-rw-r--r--include/serd/serd.h19
1 files changed, 11 insertions, 8 deletions
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,