aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/utils/convert_utf.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-08-31 17:29:16 +0200
committerEinar Johan Trøan Sømåen2012-08-31 17:29:16 +0200
commit8a212c3b6cb5100d750fb3025e79af64e4ed86e4 (patch)
tree521eb405ff0abea29fe2e9a58ea79baa0d5bb374 /engines/wintermute/utils/convert_utf.cpp
parentb01f09e82fd254823a839a8d4f622dc4d35bde6a (diff)
downloadscummvm-rg350-8a212c3b6cb5100d750fb3025e79af64e4ed86e4.tar.gz
scummvm-rg350-8a212c3b6cb5100d750fb3025e79af64e4ed86e4.tar.bz2
scummvm-rg350-8a212c3b6cb5100d750fb3025e79af64e4ed86e4.zip
WINTERMUTE: Add namespacing to the UTF-conversion code
Diffstat (limited to 'engines/wintermute/utils/convert_utf.cpp')
-rw-r--r--engines/wintermute/utils/convert_utf.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/wintermute/utils/convert_utf.cpp b/engines/wintermute/utils/convert_utf.cpp
index db0c0fa9f9..7ebc011d01 100644
--- a/engines/wintermute/utils/convert_utf.cpp
+++ b/engines/wintermute/utils/convert_utf.cpp
@@ -41,9 +41,11 @@
#include "engines/wintermute/utils/convert_utf.h"
#ifdef CVTUTF_DEBUG
-#include <stdio.h>
+#include "common/textconsole.h"
#endif
+namespace Wintermute {
+
static const int halfShift = 10; /* used for shifting by 10 bits */
static const UTF32 halfBase = 0x0010000UL;
@@ -158,8 +160,7 @@ ConversionResult ConvertUTF16toUTF32(
*targetStart = target;
#ifdef CVTUTF_DEBUG
if (result == sourceIllegal) {
- fprintf(stderr, "ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2);
- fflush(stderr);
+ warning("ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2);
}
#endif
return result;
@@ -610,3 +611,5 @@ ConversionResult ConvertUTF8toUTF32(
similarly unrolled loops.
--------------------------------------------------------------------- */
+
+} // End of namespace Wintermute