diff options
author | Eugene Sandulenko | 2010-08-06 13:13:25 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 22:35:55 +0000 |
commit | 47904bc7b2992189bb554833f00a79ff0fea9fb8 (patch) | |
tree | 1cec51758c6741b970bd064fafee77607b9f884f /engines/sword25/kernel/log.cpp | |
parent | ca17def625154e5f758b797e4fc48c76b0566320 (diff) | |
download | scummvm-rg350-47904bc7b2992189bb554833f00a79ff0fea9fb8.tar.gz scummvm-rg350-47904bc7b2992189bb554833f00a79ff0fea9fb8.tar.bz2 scummvm-rg350-47904bc7b2992189bb554833f00a79ff0fea9fb8.zip |
SWORD25: Mass-astyle.
svn-id: r53222
Diffstat (limited to 'engines/sword25/kernel/log.cpp')
-rw-r--r-- | engines/sword25/kernel/log.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/engines/sword25/kernel/log.cpp b/engines/sword25/kernel/log.cpp index 36a17115d3..07c57e9931 100644 --- a/engines/sword25/kernel/log.cpp +++ b/engines/sword25/kernel/log.cpp @@ -23,7 +23,7 @@ * */ -/* +/* * This code is based on Broken Sword 2.5 engine * * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer @@ -41,18 +41,18 @@ namespace Sword25 { // Constants static const char *BF_LOG_FILENAME = "log.txt"; -static const size_t LOG_BUFFERSIZE = 1024 * 16; +static const size_t LOG_BUFFERSIZE = 1024 * 16; // Logging will take place only when it's activated #ifdef BS_ACTIVATE_LOGGING -Common::WriteStream* BS_Log::_LogFile = NULL; -bool BS_Log::_LineBegin = true; -const char * BS_Log::_Prefix = NULL; -const char * BS_Log::_File = NULL; -int BS_Log::_Line = 0; -bool BS_Log::_AutoNewline = false; -Common::Array<BS_Log::LOG_LISTENER_CALLBACK> BS_Log::_LogListener; +Common::WriteStream *BS_Log::_LogFile = NULL; +bool BS_Log::_LineBegin = true; +const char *BS_Log::_Prefix = NULL; +const char *BS_Log::_File = NULL; +int BS_Log::_Line = 0; +bool BS_Log::_AutoNewline = false; +Common::Array<BS_Log::LOG_LISTENER_CALLBACK> BS_Log::_LogListener; bool BS_Log::_CreateLog() { // Open the log file @@ -109,7 +109,7 @@ void BS_Log::LogPrefix(const char *Prefix, const char *Format, ...) { if (!NextLine || *(NextLine + strlen("\n")) == 0) { _snprintf(ExtFormat, sizeof(ExtFormat), "%s%s", ExtFormat, Format); if (NextLine) _LineBegin = true; - break; + break; } else { strncat(ExtFormat, Format, (NextLine - Format) + strlen("\n")); _snprintf(ExtFormat, sizeof(ExtFormat), "%s%s: ", ExtFormat, Prefix); @@ -117,7 +117,7 @@ void BS_Log::LogPrefix(const char *Prefix, const char *Format, ...) { Format = NextLine + strlen("\n"); } - + // Create message va_list ArgList; va_start(ArgList, Format); @@ -140,7 +140,7 @@ void BS_Log::LogDecorated(const char *Format, ...) { char SecondaryPrefix[1024]; if (_File && _Line) _snprintf(SecondaryPrefix, sizeof(SecondaryPrefix), "(file: %s, line: %d) - ", _File, _Line); - + // Nachricht zeilenweise ausgeben und an jeden Zeilenanfang das Präfix setzen char *MessageWalker = Message; for (;;) { @@ -183,7 +183,7 @@ void BS_Log::LogDecorated(const char *Format, ...) { _FlushLog(); } -int BS_Log::_WriteLog(const char * Message) { +int BS_Log::_WriteLog(const char *Message) { if (!_LogFile) if (!_CreateLog()) return false; Common::Array<LOG_LISTENER_CALLBACK>::iterator Iter = _LogListener.begin(); @@ -207,7 +207,7 @@ void BS_Log_C(const char *Message) { #else -void BS_Log_C(const char* Message) {}; +void BS_Log_C(const char *Message) {}; #endif |