From 6fea4bf527650656b6ea741d77a04e3a1bb24934 Mon Sep 17 00:00:00 2001 From: nukeykt Date: Sun, 28 Jul 2019 18:20:25 +0900 Subject: [PATCH] Fix compilation on linux --- source/blood/src/common.cpp | 10 +++++----- source/rr/src/common.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/blood/src/common.cpp b/source/blood/src/common.cpp index 2eb2aac01..93d556bf8 100644 --- a/source/blood/src/common.cpp +++ b/source/blood/src/common.cpp @@ -468,16 +468,16 @@ static char* KeyValues_FindKeyValue(char **vdfbuf, char * const vdfbufend, const static void G_ParseSteamKeyValuesForPaths(const char *vdf) { - int32_t fd = Bopen(vdf, BO_RDONLY); - int32_t size = Bfilelength(fd); + buildvfs_fd fd = buildvfs_open_read(vdf); + int32_t size = buildvfs_length(fd); char *vdfbufstart, *vdfbuf, *vdfbufend; if (size <= 0) return; vdfbufstart = vdfbuf = (char*)Xmalloc(size); - size = (int32_t)Bread(fd, vdfbuf, size); - Bclose(fd); + size = (int32_t)buildvfs_read(fd, vdfbuf, size); + buildvfs_close(fd); vdfbufend = vdfbuf + size; if (KeyValues_FindParentKey(&vdfbuf, vdfbufend, "LibraryFolders")) @@ -488,7 +488,7 @@ static void G_ParseSteamKeyValuesForPaths(const char *vdf) G_AddSteamPaths(result); } - Bfree(vdfbufstart); + Xfree(vdfbufstart); } #endif #endif diff --git a/source/rr/src/common.cpp b/source/rr/src/common.cpp index ab96de410..beaf82954 100644 --- a/source/rr/src/common.cpp +++ b/source/rr/src/common.cpp @@ -696,16 +696,16 @@ static char* KeyValues_FindKeyValue(char **vdfbuf, char * const vdfbufend, const static void G_ParseSteamKeyValuesForPaths(const char *vdf) { - int32_t fd = Bopen(vdf, BO_RDONLY); - int32_t size = Bfilelength(fd); + buildvfs_fd fd = buildvfs_open_read(vdf); + int32_t size = buildvfs_length(fd); char *vdfbufstart, *vdfbuf, *vdfbufend; if (size <= 0) return; vdfbufstart = vdfbuf = (char*)Xmalloc(size); - size = (int32_t)Bread(fd, vdfbuf, size); - Bclose(fd); + size = (int32_t)buildvfs_read(fd, vdfbuf, size); + buildvfs_close(fd); vdfbufend = vdfbuf + size; if (KeyValues_FindParentKey(&vdfbuf, vdfbufend, "LibraryFolders")) @@ -716,7 +716,7 @@ static void G_ParseSteamKeyValuesForPaths(const char *vdf) G_AddSteamPaths(result); } - Bfree(vdfbufstart); + Xfree(vdfbufstart); } #endif #endif