aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/CommandLine
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-05-23 18:34:02 +0200
committerNaios <naios-dev@live.de>2017-05-23 18:46:44 +0200
commit9ec2a82cac993648ed603711f84b6b743ca1e106 (patch)
tree350b58c26e075f52d778adb757f2f539f23b95cb /src/server/worldserver/CommandLine
parent04dfd78dac85f18b3a6d389f2b9f65ab0a534dff (diff)
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)
Diffstat (limited to 'src/server/worldserver/CommandLine')
-rw-r--r--src/server/worldserver/CommandLine/CliRunnable.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index 633cde6a9ad..d5e03edbd04 100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -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