aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/world.c b/src/world.c
index cb4ba02d..9f10de49 100644
--- a/src/world.c
+++ b/src/world.c
@@ -5,44 +5,17 @@
#include "caret.h"
#include "node.h"
-#include "serd_config.h"
-#include "system.h"
#include "serd/node.h"
#include "serd/string_view.h"
-#if defined(USE_POSIX_FADVISE)
-# include <fcntl.h>
-#endif
-
#include <assert.h>
-#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-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_BAD_STREAM, "failed to open file %s (%s)\n", path, message);
- return NULL;
- }
-
-#if USE_POSIX_FADVISE && USE_FILENO
- (void)posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL);
-#endif
-
- return fd;
-}
-
SerdStatus
serd_world_error(const SerdWorld* const world, const SerdError* const e)
{