diff options
author | David Robillard <d@drobilla.net> | 2020-06-28 23:26:48 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-13 23:05:24 -0500 |
commit | 55e28966226268a57edb07419ac419ef53ac437d (patch) | |
tree | 317a3e50480f97a415dae5a7d096726a0c730c0a /src/world.c | |
parent | b98bd7a32cf4302e0a210dd8558edd3ab2088525 (diff) | |
download | serd-55e28966226268a57edb07419ac419ef53ac437d.tar.gz serd-55e28966226268a57edb07419ac419ef53ac437d.tar.bz2 serd-55e28966226268a57edb07419ac419ef53ac437d.zip |
Make Reader always read from a ByteSource
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/world.c b/src/world.c index e0ce9201..bd70d615 100644 --- a/src/world.c +++ b/src/world.c @@ -19,14 +19,7 @@ #include "caret.h" #include "namespaces.h" #include "node.h" -#include "serd_config.h" -#include "system.h" -#if defined(USE_POSIX_FADVISE) -# include <fcntl.h> -#endif - -#include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -34,26 +27,6 @@ #define BLANK_CHARS 12 -FILE* -serd_world_fopen(SerdWorld* world, const char* path, const char* mode) -{ - FILE* fd = fopen(path, mode); - if (!fd) { - char message[1024] = {0}; - serd_system_strerror(errno, message, sizeof(message)); - - serd_world_errorf( - world, SERD_ERR_INTERNAL, "failed to open file %s (%s)\n", path, message); - return NULL; - } - -#if USE_POSIX_FADVISE && USE_FILENO - posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL); -#endif - - return fd; -} - SerdStatus serd_world_error(const SerdWorld* const world, const SerdError* const e) { |