diff options
author | David Robillard <d@drobilla.net> | 2022-10-23 22:11:35 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 38f85ad8c53c618033e3d0b7cb1fe782c38cf0a3 (patch) | |
tree | 8f5f1e7be38d98c9e354a67bdf7b94a3e35c3a60 /src/serdi.c | |
parent | 3b89559e4c08202bee228e25ea42a4371e333c9b (diff) | |
download | serd-38f85ad8c53c618033e3d0b7cb1fe782c38cf0a3.tar.gz serd-38f85ad8c53c618033e3d0b7cb1fe782c38cf0a3.tar.bz2 serd-38f85ad8c53c618033e3d0b7cb1fe782c38cf0a3.zip |
Add SerdCaret
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/serdi.c b/src/serdi.c index 4649f57a..0932348c 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -298,15 +298,18 @@ main(int argc, char** argv) serd_writer_chop_blank_prefix(writer, chop_prefix); serd_reader_add_blank_prefix(reader, add_prefix); - SerdStatus st = SERD_SUCCESS; + SerdStatus st = SERD_SUCCESS; + SerdNode* input_name = NULL; if (from_string) { - st = serd_reader_start_string(reader, input); + input_name = serd_new_string(serd_string("string")); + st = serd_reader_start_string(reader, input, input_name); } else if (from_stdin) { - st = serd_reader_start_stream(reader, + input_name = serd_new_string(serd_string("stdin")); + st = serd_reader_start_stream(reader, serd_file_read_byte, (SerdStreamErrorFunc)ferror, stdin, - "(stdin)", + input_name, 1); } else { st = serd_reader_start_file(reader, input, bulk_read); @@ -320,6 +323,7 @@ main(int argc, char** argv) serd_reader_free(reader); serd_writer_finish(writer); serd_writer_free(writer); + serd_node_free(input_name); serd_env_free(env); serd_node_free(base); serd_world_free(world); |