some improvements i think
This commit is contained in:
19
asmrigs/brb/main.cpp
Normal file
19
asmrigs/brb/main.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "brb.h"
|
||||
#include "tier0/commandline.h"
|
||||
#include "tier2/ifilesystem.h"
|
||||
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
CommandLine()->CreateCommandLine(argc, argv);
|
||||
|
||||
CreateInterfaceFn filesystemFactory = Sys_GetFactory("filesystem_std");
|
||||
filesystem = (IFileSystem*)filesystemFactory(FILESYSTEM_INTERFACE_VERSION, NULL);
|
||||
|
||||
IFileHandle *pFile = filesystem->Open(argv[1], FILEMODE_READ);
|
||||
const char *szFileContents = filesystem->ReadString(pFile);
|
||||
filesystem->Close(pFile);
|
||||
|
||||
|
||||
V_free((void*)szFileContents);
|
||||
}
|
||||
Reference in New Issue
Block a user