summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/Alphabet.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/dasher/Alphabet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/Alphabet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/inputmethods/dasher/Alphabet.cpp b/inputmethods/dasher/Alphabet.cpp
index dc58b35..6327d8a 100644
--- a/inputmethods/dasher/Alphabet.cpp
+++ b/inputmethods/dasher/Alphabet.cpp
@@ -1,58 +1,58 @@
// Alphabet.cpp
//
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2001-2002 David Ward
//
/////////////////////////////////////////////////////////////////////////////
#include "Alphabet.h"
#include "AlphabetMap.h"
//#include <iostream>
//WinCE doesn't have iostream!
using namespace Dasher;
using namespace std;
-CAlphabet::CAlphabet() : m_Groups(0), m_DefaultEncoding(Opts::Western), m_Orientation(Opts::LeftToRight)
+CAlphabet::CAlphabet() : m_DefaultEncoding(Opts::Western), m_Orientation(Opts::LeftToRight), m_Groups(0)
{
m_Characters.push_back("");
m_Display.push_back("");
m_Colours.push_back("");
m_Foreground.push_back("");
m_Group.push_back(0);
}
void CAlphabet::GetSymbols(vector<symbol>* Symbols, string* Input, bool IsMore)
{
string Tmp;
symbol CurSymbol=0, TmpSymbol=0;
bool KeyIsPrefix;
- int z= Input->size();
+ // int z= Input->size();
int extras;
unsigned int bit;
for (unsigned int i=0; i<Input->size(); i++) {
Tmp = (*Input)[i];
/* The string we've been given is in UTF-8. The symbols are
also in UTF-8, so we need to pass the entire UTF-8 character
which may be several bytes long. RFC 2279 describes this
encoding */
if ((*Input)[i] & 0x80) { // Character is more than 1 byte long
extras = 1;
for (bit = 0x20; ((*Input)[i] & bit) != 0; bit >>= 1)
extras++;
if (extras > 5) {
} // Malformed character
while (extras-->0) {
Tmp += (*Input)[++i];
}
}
CurSymbol = TextMap.Get(Tmp, &KeyIsPrefix);