aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-03-08 17:44:28 +0100
committerShauren <shauren.trinity@gmail.com>2011-03-08 17:44:28 +0100
commitca0adc6a75f4de359df237da7355bf0efa5da7a1 (patch)
tree81edb9297de694b3cf65772f3af98c394c50c941 /src
parente25a5ca4f8728fa51fa06bba15c7ee9cfe4d34b5 (diff)
Core/CLI: Use proper define in platform checks
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/worldserver/CommandLine/CliRunnable.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index e8def4532e8..a7775291834 100755
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -35,7 +35,7 @@
#include "Player.h"
#include "Util.h"
-#if PLATFORM != WINDOWS
+#if PLATFORM != PLATFORM_WINDOWS
#include <readline/readline.h>
#include <readline/history.h>
@@ -564,7 +564,7 @@ void CliRunnable::run()
{
///- Display the list of available CLI functions then beep
//sLog->outString("");
- #if PLATFORM != WINDOWS
+ #if PLATFORM != PLATFORM_WINDOWS
rl_attempted_completion_function = cli_completion;
rl_event_hook = cli_hook_func;
#endif
@@ -582,9 +582,9 @@ void CliRunnable::run()
char *command_str ; // = fgets(commandbuf,sizeof(commandbuf),stdin);
- #if PLATFORM == WINDOWS
+ #if PLATFORM == PLATFORM_WINDOWS
char commandbuf[256];
- command_str = fgets(commandbuf,sizeof(commandbuf),stdin);
+ command_str = fgets(commandbuf, sizeof(commandbuf), stdin);
#else
command_str = readline("TC>");
rl_bind_key('\t',rl_complete);
@@ -609,14 +609,14 @@ void CliRunnable::run()
std::string command;
if (!consoleToUtf8(command_str,command)) // convert from console encoding to utf8
{
- #if PLATFORM == WINDOWS
+ #if PLATFORM == PLATFORM_WINDOWS
printf("TC>");
#endif
continue;
}
fflush(stdout);
sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished));
- #if PLATFORM != WINDOWS
+ #if PLATFORM != PLATFORM_WINDOWS
add_history(command.c_str());
#endif