aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-29 20:05:00 -0500
committerDavid Robillard <d@drobilla.net>2019-12-19 20:57:54 -0500
commita20bfec928afe3be17765f7b044ecd7244502689 (patch)
treee0b2f7f0ec0fa6c7cc1624d3d8a324a5b01a1cfc /src
parent32cf2d08a75f8192b5354af74b9342afacdcb9eb (diff)
downloadserd-a20bfec928afe3be17765f7b044ecd7244502689.tar.gz
serd-a20bfec928afe3be17765f7b044ecd7244502689.tar.bz2
serd-a20bfec928afe3be17765f7b044ecd7244502689.zip
Rename SerdStyle to SerdWriterFlags
Diffstat (limited to 'src')
-rw-r--r--src/serdi.c4
-rw-r--r--src/writer.c52
2 files changed, 28 insertions, 28 deletions
diff --git a/src/serdi.c b/src/serdi.c
index 33f384eb..c2ac567c 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -202,14 +202,14 @@ main(int argc, char** argv)
SerdWorld* world = serd_world_new();
SerdEnv* env = serd_env_new(base);
- const SerdStyleFlags output_style = (ascii ? SERD_STYLE_ASCII : 0);
+ const SerdWriterFlags writer_flags = (ascii ? SERD_STYLE_ASCII : 0);
SerdByteSink* byte_sink = serd_byte_sink_new(
(SerdWriteFunc)fwrite, out_fd, bulk_write ? 4096 : 1);
SerdWriter* writer = serd_writer_new(world,
output_syntax,
- output_style,
+ writer_flags,
env,
(SerdWriteFunc)serd_byte_sink_write,
byte_sink);
diff --git a/src/writer.c b/src/writer.c
index c0d47863..29dd67c3 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -101,24 +101,24 @@ static const SepRule rules[] = {
};
struct SerdWriterImpl {
- SerdWorld* world;
- SerdSink iface;
- SerdSyntax syntax;
- SerdStyleFlags style;
- SerdEnv* env;
- SerdNode* root_node;
- SerdURI root_uri;
- SerdStack anon_stack;
- SerdWriteFunc write_func;
- void* stream;
- SerdErrorSink error_sink;
- void* error_handle;
- WriteContext context;
- unsigned indent;
- char* bprefix;
- size_t bprefix_len;
- Sep last_sep;
- bool empty;
+ SerdWorld* world;
+ SerdSink iface;
+ SerdSyntax syntax;
+ SerdWriterFlags flags;
+ SerdEnv* env;
+ SerdNode* root_node;
+ SerdURI root_uri;
+ SerdStack anon_stack;
+ SerdWriteFunc write_func;
+ void* stream;
+ SerdErrorSink error_sink;
+ void* msg_handle;
+ WriteContext context;
+ unsigned indent;
+ char* bprefix;
+ size_t bprefix_len;
+ Sep last_sep;
+ bool empty;
};
typedef enum {
@@ -191,7 +191,7 @@ write_character(SerdWriter* writer, const uint8_t* utf8, size_t* size)
break;
}
- if (!(writer->style & SERD_STYLE_ASCII)) {
+ if (!(writer->flags & SERD_STYLE_ASCII)) {
// Write UTF-8 character directly to UTF-8 output
return sink(utf8, *size, writer);
}
@@ -895,18 +895,18 @@ serd_writer_finish(SerdWriter* writer)
}
SerdWriter*
-serd_writer_new(SerdWorld* world,
- SerdSyntax syntax,
- SerdStyleFlags style,
- SerdEnv* env,
- SerdWriteFunc write_func,
- void* stream)
+serd_writer_new(SerdWorld* world,
+ SerdSyntax syntax,
+ SerdWriterFlags flags,
+ SerdEnv* env,
+ SerdWriteFunc write_func,
+ void* stream)
{
const WriteContext context = WRITE_CONTEXT_NULL;
SerdWriter* writer = (SerdWriter*)calloc(1, sizeof(SerdWriter));
writer->world = world;
writer->syntax = syntax;
- writer->style = style;
+ writer->flags = flags;
writer->env = env;
writer->root_node = NULL;
writer->root_uri = SERD_URI_NULL;