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-12-31 11:37:47 -0500
commit5246440bc489b9b8168d0e26700cf5f343895169 (patch)
tree345fd9e2916a0e92205186e011721d9c8459c047 /src/serdi.c
parentc10db88a4eac181e83acff319e77308291c59645 (diff)
downloadserd-5246440bc489b9b8168d0e26700cf5f343895169.tar.gz
serd-5246440bc489b9b8168d0e26700cf5f343895169.tar.bz2
serd-5246440bc489b9b8168d0e26700cf5f343895169.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 b0c3eb3a..204d381a 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -238,15 +238,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);