Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove parse.cpp (C preprocessor/tokenization library) and trapcalls #154

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ set(QCOMMONLIST
${ENGINE_DIR}/qcommon/net_chan.cpp
${ENGINE_DIR}/qcommon/net_ip.cpp
${ENGINE_DIR}/qcommon/net_types.h
${ENGINE_DIR}/qcommon/parse.cpp
${ENGINE_DIR}/qcommon/print_translated.h
${ENGINE_DIR}/qcommon/qcommon.h
${ENGINE_DIR}/qcommon/qfiles.h
Expand Down
29 changes: 1 addition & 28 deletions src/common/IPC/CommonSyscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,14 @@ namespace VM {
QVM_COMMON_FS_WRITE,
QVM_COMMON_FS_SEEK,
QVM_COMMON_FS_TELL,
QVM_COMMON_FS_FILELENGTH,
QVM_COMMON_FS_FILELENGTH,
QVM_COMMON_FS_RENAME,
QVM_COMMON_FS_FCLOSE_FILE,
QVM_COMMON_FS_GET_FILE_LIST,
QVM_COMMON_FS_GET_FILE_LIST_RECURSIVE,
QVM_COMMON_FS_FIND_PAK,
QVM_COMMON_FS_LOAD_PAK,
QVM_COMMON_FS_LOAD_MAP_METADATA,

QVM_COMMON_PARSE_ADD_GLOBAL_DEFINE,
QVM_COMMON_PARSE_LOAD_SOURCE,
QVM_COMMON_PARSE_FREE_SOURCE,
QVM_COMMON_PARSE_READ_TOKEN,
QVM_COMMON_PARSE_SOURCE_FILE_AND_LINE,
};

using ErrorMsg = IPC::SyncMessage<
Expand Down Expand Up @@ -136,27 +130,6 @@ namespace VM {
IPC::Message<IPC::Id<VM::QVM_COMMON, QVM_COMMON_FS_LOAD_MAP_METADATA>>
>;

using ParseAddGlobalDefineMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM_COMMON, QVM_COMMON_PARSE_ADD_GLOBAL_DEFINE>, std::string>,
IPC::Reply<int>
> ;
using ParseLoadSourceMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM_COMMON, QVM_COMMON_PARSE_LOAD_SOURCE>, std::string>,
IPC::Reply<int>
>;
using ParseFreeSourceMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM_COMMON, QVM_COMMON_PARSE_FREE_SOURCE>, int>,
IPC::Reply<int>
>;
using ParseReadTokenMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM_COMMON, QVM_COMMON_PARSE_READ_TOKEN>, int>,
IPC::Reply<bool, pc_token_t>
>;
using ParseSourceFileAndLineMsg = IPC::SyncMessage<
IPC::Message<IPC::Id<VM::QVM_COMMON, QVM_COMMON_PARSE_SOURCE_FILE_AND_LINE>, int>,
IPC::Reply<int, std::string, int>
>;

// Misc Syscall Definitions

enum EngineMiscMessages {
Expand Down
5 changes: 0 additions & 5 deletions src/engine/client/cg_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@ bool trap_GetEntityToken( char *buffer, int bufferSize );
void trap_SendMessage(const std::vector<uint8_t>& message);
messageStatus_t trap_MessageStatus();
std::vector<std::vector<Keyboard::Key>> trap_Key_GetKeysForBinds(int team, const std::vector<std::string>& binds);
int trap_Parse_AddGlobalDefine( const char *define );
int trap_Parse_LoadSource( const char *filename );
int trap_Parse_FreeSource( int handle );
bool trap_Parse_ReadToken( int handle, pc_token_t *pc_token );
int trap_Parse_SourceFileAndLine( int handle, char *filename, int *line );
int trap_Key_GetCharForScancode( int scancode );
bool trap_R_inPVS( const vec3_t p1, const vec3_t p2 );
bool trap_R_inPVVS( const vec3_t p1, const vec3_t p2 );
Expand Down
32 changes: 0 additions & 32 deletions src/engine/framework/CommonVMServices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,38 +337,6 @@ namespace VM {
});
break;

case QVM_COMMON_PARSE_ADD_GLOBAL_DEFINE:
IPC::HandleMsg<ParseAddGlobalDefineMsg>(channel, std::move(reader), [this](const std::string& define, int& res) {
res = Parse_AddGlobalDefine(define.c_str());
});
break;

case QVM_COMMON_PARSE_LOAD_SOURCE:
IPC::HandleMsg<ParseLoadSourceMsg>(channel, std::move(reader), [this](const std::string& name, int& res) {
res = Parse_LoadSourceHandle(name.c_str());
});
break;

case QVM_COMMON_PARSE_FREE_SOURCE:
IPC::HandleMsg<ParseFreeSourceMsg>(channel, std::move(reader), [this](int source, int& res) {
res = Parse_FreeSourceHandle(source);
});
break;

case QVM_COMMON_PARSE_READ_TOKEN:
IPC::HandleMsg<ParseReadTokenMsg>(channel, std::move(reader), [this](int source, bool& res, pc_token_t& token) {
res = Parse_ReadTokenHandle(source, &token);
});
break;

case QVM_COMMON_PARSE_SOURCE_FILE_AND_LINE:
IPC::HandleMsg<ParseSourceFileAndLineMsg>(channel, std::move(reader), [this](int source, int& res, std::string& file, int& line) {
char buffer[128] = {0};
res = Parse_SourceFileAndLine(source, buffer, &line);
file = buffer;
});
break;

default:
Com_Error(errorParm_t::ERR_DROP, "Bad log syscall number '%d' for VM '%s'", minor, vmName.c_str());
}
Expand Down
Loading