Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib)
(cherry picked from commit b8db320bf14e327bcd12279871b914d8635ef122)
This commit is contained in:
1 parent
496bb4b105
commit
d8b9d2a9da
17 files changed
+65
-67
No files matched your search
@@ -29,7 +29,7 @@
|
||||
#include "Log.h"
|
||||
#include "Util.h"
|
||||
|
||||
#if PLATFORM != PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
#include "Chat.h"
|
||||
@@ -86,7 +86,7 @@ int cli_hook_func()
|
||||
|
||||
void utf8print(void* /*arg*/, const char* str)
|
||||
{
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
wchar_t wtemp_buf[6000];
|
||||
size_t wtemp_len = 6000-1;
|
||||
if (!Utf8toWStr(str, strlen(str), wtemp_buf, wtemp_len))
|
||||
@@ -129,7 +129,7 @@ void CliThread()
|
||||
{
|
||||
///- Display the list of available CLI functions then beep
|
||||
//TC_LOG_INFO("server.worldserver", "");
|
||||
#if PLATFORM != PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
|
||||
rl_attempted_completion_function = cli_completion;
|
||||
rl_event_hook = cli_hook_func;
|
||||
#endif
|
||||
@@ -148,7 +148,7 @@ void CliThread()
|
||||
|
||||
char *command_str ; // = fgets(commandbuf, sizeof(commandbuf), stdin);
|
||||
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
char commandbuf[256];
|
||||
command_str = fgets(commandbuf, sizeof(commandbuf), stdin);
|
||||
#else
|
||||
@@ -167,7 +167,7 @@ void CliThread()
|
||||
|
||||
if (!*command_str)
|
||||
{
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
printf("TC>");
|
||||
#else
|
||||
free(command_str);
|
||||
@@ -178,7 +178,7 @@ void CliThread()
|
||||
std::string command;
|
||||
if (!consoleToUtf8(command_str, command)) // convert from console encoding to utf8
|
||||
{
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
printf("TC>");
|
||||
#else
|
||||
free(command_str);
|
||||
@@ -188,7 +188,7 @@ void CliThread()
|
||||
|
||||
fflush(stdout);
|
||||
sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished));
|
||||
#if PLATFORM != PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
|
||||
add_history(command.c_str());
|
||||
free(command_str);
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user