forked from github/server
compile on VS2010, without C11
This commit is contained in:
parent
4a08cdd23e
commit
5af91b21aa
|
@ -32,10 +32,11 @@ static int tolua_storage_create(lua_State * L)
|
||||||
const char *type = tolua_tostring(L, 2, "rb");
|
const char *type = tolua_tostring(L, 2, "rb");
|
||||||
gamedata *data = (gamedata *)calloc(1, sizeof(gamedata));
|
gamedata *data = (gamedata *)calloc(1, sizeof(gamedata));
|
||||||
storage *store = (storage *)calloc(1, sizeof(storage));
|
storage *store = (storage *)calloc(1, sizeof(storage));
|
||||||
|
FILE * F;
|
||||||
|
|
||||||
data->store = store;
|
data->store = store;
|
||||||
|
|
||||||
FILE *F = fopen(filename, type);
|
F = fopen(filename, type);
|
||||||
if (strchr(type, 'r')) {
|
if (strchr(type, 'r')) {
|
||||||
fread(&data->version, sizeof(int), 1, F);
|
fread(&data->version, sizeof(int), 1, F);
|
||||||
fseek(F, sizeof(int), SEEK_CUR);
|
fseek(F, sizeof(int), SEEK_CUR);
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <curses.h>
|
|
||||||
#include <util/bool.h>
|
#include <util/bool.h>
|
||||||
|
#include <curses.h>
|
||||||
|
|
||||||
#include <kernel/config.h>
|
#include <kernel/config.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue