diff options
Diffstat (limited to 'util/unicode/main.cpp')
-rw-r--r-- | util/unicode/main.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index c995a40343..fe6d4fbca1 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -1293,6 +1293,18 @@ static void readArabicShaping() { qDebug("Reading ArabicShaping.txt"); + // Initialize defaults: + // Code points that are not explicitly listed in ArabicShaping.txt are either of joining type T or U: + // - Those that not explicitly listed that are of General Category Mn, Me, or Cf have joining type T. + // - All others not explicitly listed have joining type U. + for (int codepoint = 0; codepoint <= QChar::LastValidCodePoint; ++codepoint) { + UnicodeData &d = UnicodeData::valueRef(codepoint); + if (d.p.joining == QChar::Joining_None) { + if (d.p.category == QChar::Mark_NonSpacing || d.p.category == QChar::Mark_Enclosing || d.p.category == QChar::Other_Format) + d.p.joining = QChar::Joining_Transparent; + } + } + QFile f("data/ArabicShaping.txt"); if (!f.exists()) qFatal("Couldn't find ArabicShaping.txt"); @@ -1338,17 +1350,6 @@ static void readArabicShaping() break; } } - - // Code points that are not explicitly listed in ArabicShaping.txt are either of joining type T or U: - // - Those that not explicitly listed that are of General Category Mn, Me, or Cf have joining type T. - // - All others not explicitly listed have joining type U. - for (int codepoint = 0; codepoint <= QChar::LastValidCodePoint; ++codepoint) { - UnicodeData &d = UnicodeData::valueRef(codepoint); - if (d.p.joining == QChar::Joining_None) { - if (d.p.category == QChar::Mark_NonSpacing || d.p.category == QChar::Mark_Enclosing || d.p.category == QChar::Other_Format) - d.p.joining = QChar::Joining_Transparent; - } - } } static void readDerivedAge() @@ -2525,7 +2526,7 @@ static QByteArray createSpecialCaseMap() out.chop(1); out += "\n};\n\n"; - qDebug(" memory usage: %d bytes", specialCaseMap.size()*sizeof(unsigned short)); + qDebug(" memory usage: %ld bytes", specialCaseMap.size()*sizeof(unsigned short)); return out; } @@ -3021,7 +3022,7 @@ int main(int, char **) "****************************************************************************/\n\n"; QByteArray note = - "/* This file is autogenerated from the Unicode "DATA_VERSION_S" database. Do not edit */\n\n"; + "/* This file is autogenerated from the Unicode " DATA_VERSION_S " database. Do not edit */\n\n"; QByteArray warning = "//\n" @@ -3062,9 +3063,10 @@ int main(int, char **) f.write(warning); f.write("#ifndef QUNICODETABLES_P_H\n" "#define QUNICODETABLES_P_H\n\n" + "#include <QtCore/private/qglobal_p.h>\n\n" "#include <QtCore/qchar.h>\n\n" "QT_BEGIN_NAMESPACE\n\n"); - f.write("#define UNICODE_DATA_VERSION "DATA_VERSION_STR"\n\n"); + f.write("#define UNICODE_DATA_VERSION " DATA_VERSION_STR "\n\n"); f.write("namespace QUnicodeTables {\n\n"); f.write(property_string); f.write(grapheme_break_class_string); |