From 4424a6f7781fcb9095618b2f2c846f3f99859b49 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 9 Jul 2021 21:39:31 -0400 Subject: Replace serd_reader_set_strict() with SerdReaderFlags --- src/serdi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/serdi.c') diff --git a/src/serdi.c b/src/serdi.c index ea6bb22b..3f3bce06 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -100,12 +100,12 @@ 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 bulk_write = false; - bool lax = false; bool osyntax_set = false; bool quiet = false; size_t stack_size = 4194304; @@ -134,8 +134,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') { @@ -262,10 +262,9 @@ main(int argc, char** argv) SerdWriter* const writer = serd_writer_new(world, output_syntax, writer_flags, env, byte_sink); - SerdReader* const reader = - serd_reader_new(world, input_syntax, serd_writer_sink(writer), stack_size); + SerdReader* const reader = serd_reader_new( + world, input_syntax, reader_flags, serd_writer_sink(writer), stack_size); - serd_reader_set_strict(reader, !lax); if (quiet) { serd_world_set_error_func(world, quiet_error_func, NULL); } -- cgit v1.2.1