From 15ccb113fada55a7f17efa2d9713395bdbb677c6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 22 Jul 2000 14:03:39 +0000 Subject: Changed key codes to not overlap printing keys. Mved the #ifs around DBCS support to avoid warnings on GTK+. --- src/Document.cxx | 8 ++++++-- src/DocumentAccessor.cxx | 13 +++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index b6b875c66..f8d349adb 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -201,8 +201,8 @@ bool Document::IsCrLf(int pos) { return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); } -bool Document::IsDBCS(int pos) { #if PLAT_WIN +bool Document::IsDBCS(int pos) { if (dbcsCodePage) { if (SC_CP_UTF8 == dbcsCodePage) { unsigned char ch = static_cast(cb.CharAt(pos)); @@ -224,10 +224,14 @@ bool Document::IsDBCS(int pos) { } } return false; +} #else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool Document::IsDBCS(int) { return false; -#endif } +#endif int Document::LenChar(int pos) { if (IsCrLf(pos)) { diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx index d3811b77c..6828e37c3 100644 --- a/src/DocumentAccessor.cxx +++ b/src/DocumentAccessor.cxx @@ -21,21 +21,22 @@ DocumentAccessor::~DocumentAccessor() { } +#if PLAT_WIN bool DocumentAccessor::InternalIsLeadByte(char ch) { -#if PLAT_GTK - // TODO: support DBCS under GTK+ - return false; -#elif PLAT_WIN if (SC_CP_UTF8 == codePage) // For lexing, all characters >= 0x80 are treated the // same so none is considered a lead byte. return false; else return IsDBCSLeadByteEx(codePage, ch); -#elif PLAT_WX +} +#else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool DocumentAccessor::InternalIsLeadByte(char) { return false; -#endif } +#endif void DocumentAccessor::Fill(int position) { if (lenDoc == -1) -- cgit v1.2.3