From 5262f832018923ecc8ccd25bedecbd5a291a563f Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 11 Jul 2013 10:43:40 +1000 Subject: Include case conversion data in Scintilla so that all platforms will perform case conversion of Unicode text in accordance with Unicode. --- src/Document.cxx | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) (limited to 'src/Document.cxx') diff --git a/src/Document.cxx b/src/Document.cxx index a00fc9fc2..0637c8d50 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -28,6 +28,7 @@ #include "CharClassify.h" #include "CharacterSet.h" #include "Decoration.h" +#include "CaseFolder.h" #include "Document.h" #include "RESearch.h" #include "UniConversion.h" @@ -1496,47 +1497,6 @@ bool Document::IsWordAt(int start, int end) const { return IsWordStartAt(start) && IsWordEndAt(end); } -static inline char MakeLowerCase(char ch) { - if (ch < 'A' || ch > 'Z') - return ch; - else - return static_cast(ch - 'A' + 'a'); -} - -CaseFolderTable::CaseFolderTable() { - for (size_t iChar=0; iChar(iChar); - } -} - -CaseFolderTable::~CaseFolderTable() { -} - -size_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { - if (lenMixed > sizeFolded) { - return 0; - } else { - for (size_t i=0; i(mixed[i])]; - } - return lenMixed; - } -} - -void CaseFolderTable::SetTranslation(char ch, char chTranslation) { - mapping[static_cast(ch)] = chTranslation; -} - -void CaseFolderTable::StandardASCII() { - for (size_t iChar=0; iChar= 'A' && iChar <= 'Z') { - mapping[iChar] = static_cast(iChar - 'A' + 'a'); - } else { - mapping[iChar] = static_cast(iChar); - } - } -} - bool Document::MatchesWordOptions(bool word, bool wordStart, int pos, int length) const { return (!word && !wordStart) || (word && IsWordAt(pos, pos + length)) || -- cgit v1.2.3