diff options
author | rubidium <rubidium@openttd.org> | 2007-12-25 11:26:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-12-25 11:26:07 +0000 |
commit | 81bf9f8503c52974c232252a20d1b1528be66d58 (patch) | |
tree | 54a33aa10dd79668da9f46e61e427ace39f5d37f /src/openttd.cpp | |
parent | 00c9d3ef20c83df43118a9ace5b8dd8eca26a126 (diff) | |
download | openttd-81bf9f8503c52974c232252a20d1b1528be66d58.tar.xz |
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 004bb3275..560c3f42e 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -13,7 +13,6 @@ #include "openttd.h" #include "table/strings.h" #include "bridge_map.h" -#include "functions.h" #include "mixer.h" #include "spritecache.h" #include "gfxinit.h" @@ -120,34 +119,6 @@ void CDECL ShowInfoF(const char *str, ...) } -void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize) -{ - FILE *in; - byte *mem; - size_t len; - - in = fopen(filename, "rb"); - if (in == NULL) return NULL; - - fseek(in, 0, SEEK_END); - len = ftell(in); - fseek(in, 0, SEEK_SET); - if (len > maxsize || (mem = MallocT<byte>(len + 1)) == NULL) { - fclose(in); - return NULL; - } - mem[len] = 0; - if (fread(mem, len, 1, in) != 1) { - fclose(in); - free(mem); - return NULL; - } - fclose(in); - - *lenp = len; - return mem; -} - extern const char _openttd_revision[]; static void showhelp() { |