aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-04-08 02:16:50 +0000
committernyamatongwe <devnull@localhost>2000-04-08 02:16:50 +0000
commit4fe90137dc48e5ca07e9223694ab8926c9ebbf13 (patch)
treec731acca218796e64e4dfcfad2d5b507377dd60a /win32/PlatWin.cxx
parent7651d2bdd62655820b09e91d4efa7d3673eddcb8 (diff)
downloadscintilla-mirror-4fe90137dc48e5ca07e9223694ab8926c9ebbf13.tar.gz
Warning squashing.
Updated contributors list. Fixed lexing of MS warnings.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx29
1 files changed, 1 insertions, 28 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index eb81b8fa2..de124ea10 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -11,6 +11,7 @@
#include "Platform.h"
#include "PlatformRes.h"
+#include "UniConversion.h"
Point Point::FromLong(long lpoint) {
return Point(static_cast<short>(LOWORD(lpoint)), static_cast<short>(HIWORD(lpoint)));
@@ -323,34 +324,6 @@ void Surface::Copy(PRectangle rc, Point from, Surface &surfaceSource) {
surfaceSource.hdc, from.x, from.y, SRCCOPY);
}
-int UCS2FromUTF8(const char *s, int len, wchar_t *tbuf, int tlen) {
-#ifdef USE_API
- return ::MultiByteToWideChar(CP_UTF8, 0, s, len, tbuf, tlen);
-#else
- int ui=0;
- const unsigned char *us = reinterpret_cast<const unsigned char *>(s);
- int i=0;
- while ((i<len) && (ui<tlen)) {
- unsigned char ch = us[i++];
- if (ch < 0x80) {
- tbuf[ui] = ch;
- } else if (ch < 0x80 + 0x40 + 0x20) {
- tbuf[ui] = (ch & 0x1F) << 6;
- ch = us[i++];
- tbuf[ui] += ch & 0x7F;
- } else {
- tbuf[ui] = (ch & 0xF) << 12;
- ch = us[i++];
- tbuf[ui] += (ch & 0x7F) << 6;
- ch = us[i++];
- tbuf[ui] += ch & 0x7F;
- }
- ui++;
- }
- return ui;
-#endif
-}
-
#define MAX_US_LEN 5000
void Surface::DrawText(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back) {