diff options
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/serdi.c b/src/serdi.c index 8a4a52cf..42da9fd5 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -102,11 +102,11 @@ main(int argc, char** argv) SerdSyntax input_syntax = SERD_SYNTAX_EMPTY; SerdSyntax output_syntax = SERD_SYNTAX_EMPTY; + SerdReaderFlags reader_flags = 0; SerdWriterFlags writer_flags = 0; bool from_string = false; bool from_stdin = false; bool bulk_read = true; - bool lax = false; bool osyntax_set = false; bool quiet = false; size_t stack_size = 1048576U; @@ -142,8 +142,8 @@ main(int argc, char** argv) } else if (opt == 'h') { return print_usage(prog, false); } else if (opt == 'l') { + reader_flags |= SERD_READ_LAX; writer_flags |= SERD_WRITE_LAX; - lax = true; } else if (opt == 'q') { quiet = true; } else if (opt == 't') { @@ -254,10 +254,9 @@ main(int argc, char** argv) const SerdLimits limits = {stack_size, MAX_DEPTH}; serd_world_set_limits(world, limits); - SerdReader* const reader = - serd_reader_new(world, input_syntax, serd_writer_sink(writer)); + SerdReader* const reader = serd_reader_new( + world, input_syntax, reader_flags, serd_writer_sink(writer)); - serd_reader_set_strict(reader, !lax); if (quiet) { serd_world_set_error_func(world, quiet_error_func, NULL); } |