feat(Core/Misc): replace all prefix preprocessor defines from CompilerDefs with AC_ (#2419)

This commit is contained in:
Kargatum
2019-11-15 23:27:31 +07:00
committed by GitHub
parent f9a8de9be7
commit a3206c56dc
12 changed files with 48 additions and 51 deletions

View File

@@ -23,7 +23,7 @@
#include "Player.h"
#include "Util.h"
#if PLATFORM != PLATFORM_WINDOWS
#if AC_PLATFORM != AC_PLATFORM_WINDOWS
#include <readline/readline.h>
#include <readline/history.h>
@@ -79,7 +79,7 @@ int cli_hook_func()
void utf8print(void* /*arg*/, const char* str)
{
#if PLATFORM == PLATFORM_WINDOWS
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
wchar_t wtemp_buf[6000];
size_t wtemp_len = 6000-1;
if (!Utf8toWStr(str, strlen(str), wtemp_buf, wtemp_len))
@@ -122,7 +122,7 @@ void CliRunnable::run()
{
///- Display the list of available CLI functions then beep
//TC_LOG_INFO("server.worldserver", "");
#if PLATFORM != PLATFORM_WINDOWS
#if AC_PLATFORM != AC_PLATFORM_WINDOWS
rl_attempted_completion_function = cli_completion;
rl_event_hook = cli_hook_func;
#endif
@@ -141,7 +141,7 @@ void CliRunnable::run()
char *command_str ; // = fgets(commandbuf, sizeof(commandbuf), stdin);
#if PLATFORM == PLATFORM_WINDOWS
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
char commandbuf[256];
command_str = fgets(commandbuf, sizeof(commandbuf), stdin);
#else
@@ -160,7 +160,7 @@ void CliRunnable::run()
if (!*command_str)
{
#if PLATFORM == PLATFORM_WINDOWS
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
printf("AC>");
#else
free(command_str);
@@ -171,7 +171,7 @@ void CliRunnable::run()
std::string command;
if (!consoleToUtf8(command_str, command)) // convert from console encoding to utf8
{
#if PLATFORM == PLATFORM_WINDOWS
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
printf("AC>");
#else
free(command_str);
@@ -181,7 +181,7 @@ void CliRunnable::run()
fflush(stdout);
sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished));
#if PLATFORM != PLATFORM_WINDOWS
#if AC_PLATFORM != AC_PLATFORM_WINDOWS
add_history(command.c_str());
free(command_str);
#endif