aboutsummaryrefslogtreecommitdiffstats
path: root/src/serdi.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-03 22:15:53 +0200
committerDavid Robillard <d@drobilla.net>2018-11-25 22:12:47 +0100
commit47e35393464abc9d92f92974ecef173c7e1b372f (patch)
tree8c1b1a473e804d07fb73c135d9fc78625f8ce3f6 /src/serdi.c
parent191392584bebb14bed9bb325f54a035e0072622a (diff)
downloadserd-47e35393464abc9d92f92974ecef173c7e1b372f.tar.gz
serd-47e35393464abc9d92f92974ecef173c7e1b372f.tar.bz2
serd-47e35393464abc9d92f92974ecef173c7e1b372f.zip
Add SerdCursor to public API
Diffstat (limited to 'src/serdi.c')
-rw-r--r--src/serdi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/serdi.c b/src/serdi.c
index 7543ed7c..1e562ff0 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -234,15 +234,18 @@ main(int argc, char** argv)
serd_reader_add_blank_prefix(reader, add_prefix);
serd_node_free(root);
- SerdStatus status = SERD_SUCCESS;
+ SerdStatus status = SERD_SUCCESS;
+ SerdNode* input_name = NULL;
if (from_string) {
- status = serd_reader_start_string(reader, input);
+ input_name = serd_new_string("string");
+ status = serd_reader_start_string(reader, input, input_name);
} else if (from_stdin) {
+ input_name = serd_new_string("stdin");
status = serd_reader_start_stream(reader,
serd_file_read_byte,
(SerdStreamErrorFunc)ferror,
stdin,
- "(stdin)",
+ input_name,
1);
} else {
status = serd_reader_start_file(reader, input, bulk_read);