part4: adapt codebase to changes in lib/

mostly straightforward except for CVSFile / Filesystem. moved the former
into the newly created latter component. removed VFSUtil entirely (that
functionality is available from lib/file/file_system_util.h)

Xeromyces.cpp: simplify buffer handling since smart pointers are now in
play. also use WriteBuffer instead of membuffer.

This was SVN commit r5519.
This commit is contained in:
janwas
2007-12-20 20:21:45 +00:00
parent 63086f4e26
commit e2eb5b2610
68 changed files with 619 additions and 980 deletions
+4 -8
View File
@@ -6,8 +6,7 @@
#include "ScriptGlue.h"
#include "ps/Profile.h"
#include "ps/CLogger.h"
#include "lib/res/res.h"
#include "ps/Filesystem.h"
#if OS_WIN
@@ -116,15 +115,12 @@ void ScriptingHost::RunScript(const CStr& filename, JSObject* globalObject)
{
const char* fn = filename.c_str();
FileIOBuf buf;
size_t size;
if(vfs_load(fn, buf, size) != INFO::OK) // ERRTODO: translate/pass it on
shared_ptr<u8> buf; size_t size;
if(g_VFS->LoadFile(fn, buf, size) != INFO::OK) // ERRTODO: translate/pass it on
throw PSERROR_Scripting_LoadFile_OpenFailed();
const char* script = (const char*)buf;
const char* script = (const char*)buf.get();
RunMemScript(script, size, fn, 1, globalObject);
(void)file_buf_free(buf);
}
jsval ScriptingHost::CallFunction(const std::string & functionName, jsval * params, int numParams)