diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2010-05-10 11:04:06 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-21 10:36:22 (GMT) |
commit | 9fcbca8de0963e2429dc7d25adccbf6a895fa7e8 (patch) | |
tree | a2bf6793a2ba235dcf66e108e6642f3c8cad1492 /util/unicode | |
parent | acaad4c6cc36439b3b836992949d287b53574f06 (diff) | |
download | Qt-9fcbca8de0963e2429dc7d25adccbf6a895fa7e8.zip Qt-9fcbca8de0963e2429dc7d25adccbf6a895fa7e8.tar.gz Qt-9fcbca8de0963e2429dc7d25adccbf6a895fa7e8.tar.bz2 |
move QUnicodeTables:: script() and lineBreakClass() implementations
from qchar.cpp to qunicodetables.cpp
Diffstat (limited to 'util/unicode')
-rw-r--r-- | util/unicode/main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index f2ebe7c..5303c0d 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -1908,6 +1908,19 @@ QByteArray createScriptTableDeclaration() } declaration += "\n};\n\n} // namespace QUnicodeTables\n\n"; + declaration += + "Q_CORE_EXPORT int QT_FASTCALL QUnicodeTables::script(uint ucs4)\n" + "{\n" + " if (ucs4 > 0xffff)\n" + " return Common;\n" + " int script = uc_scripts[ucs4 >> 7];\n" + " if (script < ScriptSentinel)\n" + " return script;\n" + " script = (((script - ScriptSentinel) * UnicodeBlockSize) + UnicodeBlockCount);\n" + " script = uc_scripts[script + (ucs4 & 0x7f)];\n" + " return script;\n" + "}\n\n"; + qDebug("createScriptTableDeclaration: table size is %d bytes", unicodeBlockCount + (extraBlockList.size() * unicodeBlockSize)); @@ -2168,6 +2181,11 @@ static QByteArray createPropertyInfo() " return uc_properties + index;\n" "}\n\n"; + out += "Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4)\n" + "{\n" + " return (QUnicodeTables::LineBreakClass)qGetProp(ucs4)->line_break_class;\n" + "}\n\n"; + out += "static const ushort specialCaseMap[] = {\n "; for (int i = 0; i < specialCaseMap.size(); ++i) { out += QByteArray(" 0x") + QByteArray::number(specialCaseMap.at(i), 16); |