aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore/CliRunnable.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-08-15 19:08:39 -0700
committermaximius <none@none>2009-08-15 19:08:39 -0700
commite5813517947e5af7ecc5fbef7516a8252f458f52 (patch)
treeec7e28483fe321457bc2be109ddebf3124958ba6 /src/trinitycore/CliRunnable.cpp
parentc88304af95f9e289036a9c4e4e5433cc95044677 (diff)
*Replace every tab with 4 spaces, checked by hand
--HG-- branch : trunk
Diffstat (limited to 'src/trinitycore/CliRunnable.cpp')
-rw-r--r--src/trinitycore/CliRunnable.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp
index d950adc22f8..fb7276548ce 100644
--- a/src/trinitycore/CliRunnable.cpp
+++ b/src/trinitycore/CliRunnable.cpp
@@ -57,17 +57,17 @@ char * command_finder(const char* text, int state)
while(ret = cmd[idx].Name)
{
if(!cmd[idx].AllowConsole)
- {
- idx++;
- continue;
- }
+ {
+ idx++;
+ continue;
+ }
idx++;
//printf("Checking %s \n", cmd[idx].Name);
if (strncmp(ret, text, len) == 0)
- return strdup(ret);
+ return strdup(ret);
if(cmd[idx].Name == NULL)
- break;
+ break;
}
return ((char*)NULL);
@@ -378,9 +378,9 @@ void CliRunnable::run()
bool canflush = true;
///- Display the list of available CLI functions then beep
sLog.outString("");
- #if PLATFORM != WINDOWS
+ #if PLATFORM != WINDOWS
rl_attempted_completion_function = cli_completion;
- #endif
+ #endif
if(sConfig.GetBoolDefault("BeepAtStart", true))
printf("\a"); // \a = Alert
@@ -395,13 +395,13 @@ void CliRunnable::run()
char *command_str ; // = fgets(commandbuf,sizeof(commandbuf),stdin);
- #if PLATFORM == WINDOWS
- command_str = fgets(commandbuf,sizeof(commandbuf),stdin);
- #else
- command_str = readline("TC>");
- rl_bind_key('\t',rl_complete);
- #endif
- if (command_str != NULL)
+ #if PLATFORM == WINDOWS
+ command_str = fgets(commandbuf,sizeof(commandbuf),stdin);
+ #else
+ command_str = readline("TC>");
+ rl_bind_key('\t',rl_complete);
+ #endif
+ if (command_str != NULL)
{
for(int x=0;command_str[x];x++)
if(command_str[x]=='\r'||command_str[x]=='\n')
@@ -413,27 +413,27 @@ void CliRunnable::run()
if(!*command_str)
{
- #if PLATFORM == WINDOWS
- printf("TC>");
- #endif
+ #if PLATFORM == WINDOWS
+ printf("TC>");
+ #endif
continue;
}
std::string command;
if(!consoleToUtf8(command_str,command)) // convert from console encoding to utf8
{
- #if PLATFORM == WINDOWS
- printf("TC>");
- #endif
+ #if PLATFORM == WINDOWS
+ printf("TC>");
+ #endif
continue;
}
- fflush(stdout);
+ fflush(stdout);
sWorld.QueueCliCommand(&utf8print,command.c_str());
- #if PLATFORM != WINDOWS
- add_history(command.c_str());
- #endif
+ #if PLATFORM != WINDOWS
+ add_history(command.c_str());
+ #endif
- }
+ }
else if (feof(stdin))
{
World::StopNow(SHUTDOWN_EXIT_CODE);