diff options
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/serdi.c b/src/serdi.c index 8939ae3b..9bf42ac2 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -205,25 +205,10 @@ main(int argc, char** argv) SerdWorld* world = serd_world_new(); SerdEnv* env = serd_env_new(base); - SerdStyleFlags output_style = 0; - if (output_syntax == SERD_NTRIPLES || ascii) { - output_style |= SERD_STYLE_ASCII; - } else if (output_syntax == SERD_TURTLE) { - output_style |= SERD_STYLE_ABBREVIATED; - if (!full_uris) { - output_style |= SERD_STYLE_CURIED; - } - } - - if ((input_syntax == SERD_TURTLE || input_syntax == SERD_TRIG) || - (output_style & SERD_STYLE_CURIED)) { - // Base URI may change and/or we're abbreviating URIs, so must resolve - output_style |= SERD_STYLE_RESOLVED; - } - - if (bulk_write) { - output_style |= SERD_STYLE_BULK; - } + const SerdStyleFlags output_style = + ((ascii ? SERD_STYLE_ASCII : 0) | // + (bulk_write ? SERD_STYLE_BULK : 0) | // + (full_uris ? (SERD_STYLE_UNQUALIFIED | SERD_STYLE_UNRESOLVED) : 0)); SerdWriter* writer = serd_writer_new(world, output_syntax, |