diff options
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/serdi.c b/src/serdi.c index 890408d2..56762b23 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -147,18 +147,8 @@ read_file(SerdWorld* const world, syntax = syntax ? syntax : serd_guess_syntax(filename); syntax = syntax ? syntax : SERD_TRIG; - SerdByteSource* byte_source = NULL; - if (!strcmp(filename, "-")) { - SerdNode* name = serd_new_string(SERD_STRING("stdin")); - - byte_source = serd_byte_source_new_function( - serd_file_read_byte, (SerdStreamErrorFunc)ferror, NULL, stdin, name, 1); - - serd_node_free(name); - } else { - byte_source = - serd_byte_source_new_filename(filename, bulk_read ? SERD_PAGE_SIZE : 1u); - } + SerdByteSource* byte_source = + serd_open_input(filename, bulk_read ? SERD_PAGE_SIZE : 1u); if (!byte_source) { SERDI_ERRORF( |