aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/kernel/log.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-14 22:25:56 +0000
committerEugene Sandulenko2010-10-12 22:44:55 +0000
commit3f69477b44cd6adfd916962f240bef714f522f11 (patch)
tree5173041779b04567d4b50d432d90ed383ac1ffda /engines/sword25/kernel/log.cpp
parent8977f88834bf5ea70e1f66c14ef535d055bbc1ac (diff)
downloadscummvm-rg350-3f69477b44cd6adfd916962f240bef714f522f11.tar.gz
scummvm-rg350-3f69477b44cd6adfd916962f240bef714f522f11.tar.bz2
scummvm-rg350-3f69477b44cd6adfd916962f240bef714f522f11.zip
SWORD25: Portability fixes. Now compiles and runs under Linux.
svn-id: r53240
Diffstat (limited to 'engines/sword25/kernel/log.cpp')
-rw-r--r--engines/sword25/kernel/log.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/sword25/kernel/log.cpp b/engines/sword25/kernel/log.cpp
index 07c57e9931..259c02449f 100644
--- a/engines/sword25/kernel/log.cpp
+++ b/engines/sword25/kernel/log.cpp
@@ -85,7 +85,7 @@ void BS_Log::Log(const char *Format, ...) {
// Create the message
va_list ArgList;
va_start(ArgList, Format);
- _vsnprintf(Message, sizeof(Message), Format, ArgList);
+ vsnprintf(Message, sizeof(Message), Format, ArgList);
// Log the message
_WriteLog(Message);
@@ -100,19 +100,19 @@ void BS_Log::LogPrefix(const char *Prefix, const char *Format, ...) {
// If the issue has ceased at the beginning of a new line, the new issue to begin with the prefix
ExtFormat[0] = 0;
if (_LineBegin) {
- _snprintf(ExtFormat, sizeof(ExtFormat), "%s%s: ", ExtFormat, Prefix);
+ snprintf(ExtFormat, sizeof(ExtFormat), "%s%s: ", ExtFormat, Prefix);
_LineBegin = false;
}
// Format String pass line by line and each line with the initial prefix
for (;;) {
const char *NextLine = strstr(Format, "\n");
if (!NextLine || *(NextLine + strlen("\n")) == 0) {
- _snprintf(ExtFormat, sizeof(ExtFormat), "%s%s", ExtFormat, Format);
+ snprintf(ExtFormat, sizeof(ExtFormat), "%s%s", ExtFormat, Format);
if (NextLine) _LineBegin = true;
break;
} else {
strncat(ExtFormat, Format, (NextLine - Format) + strlen("\n"));
- _snprintf(ExtFormat, sizeof(ExtFormat), "%s%s: ", ExtFormat, Prefix);
+ snprintf(ExtFormat, sizeof(ExtFormat), "%s%s: ", ExtFormat, Prefix);
}
Format = NextLine + strlen("\n");
@@ -121,7 +121,7 @@ void BS_Log::LogPrefix(const char *Prefix, const char *Format, ...) {
// Create message
va_list ArgList;
va_start(ArgList, Format);
- _vsnprintf(Message, sizeof(Message), ExtFormat, ArgList);
+ vsnprintf(Message, sizeof(Message), ExtFormat, ArgList);
// Log the message
_WriteLog(Message);
@@ -134,12 +134,12 @@ void BS_Log::LogDecorated(const char *Format, ...) {
char Message[LOG_BUFFERSIZE];
va_list ArgList;
va_start(ArgList, Format);
- _vsnprintf(Message, sizeof(Message), Format, ArgList);
+ vsnprintf(Message, sizeof(Message), Format, ArgList);
// Zweiten Prefix erzeugen, falls gewünscht
char SecondaryPrefix[1024];
if (_File && _Line)
- _snprintf(SecondaryPrefix, sizeof(SecondaryPrefix), "(file: %s, line: %d) - ", _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;