From 755521aba6d63fc572b5b3ee43193ea24a2d5513 Mon Sep 17 00:00:00 2001 From: Andrew Smolko Date: Thu, 8 Nov 2018 18:18:55 +0300 Subject: [PATCH 01/73] Fix hang in QMacPasteboard::formats() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PasteboardGetItemCount() can return -1 as result to unsigned variable, so the further loop will iterate "forever". Return early to avoid hang. Change-Id: Ie91dba1c193d04513f0496d20bd0b6b0b5b6c151 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qmacclipboard.mm | 28 ++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/cocoa/qmacclipboard.mm b/src/plugins/platforms/cocoa/qmacclipboard.mm index f3467fdc73..3a39e32fb5 100644 --- a/src/plugins/platforms/cocoa/qmacclipboard.mm +++ b/src/plugins/platforms/cocoa/qmacclipboard.mm @@ -49,6 +49,7 @@ #include #include #include "qcocoahelpers.h" +#include QT_BEGIN_NAMESPACE @@ -61,6 +62,23 @@ QT_BEGIN_NAMESPACE QMacPasteboard code *****************************************************************************/ +namespace +{ +OSStatus PasteboardGetItemCountSafe(PasteboardRef paste, ItemCount *cnt) +{ + Q_ASSERT(paste); + Q_ASSERT(cnt); + const OSStatus result = PasteboardGetItemCount(paste, cnt); + // Despite being declared unsigned, this API can return -1 + if (std::make_signed::type(*cnt) < 0) + *cnt = 0; + return result; +} +} // namespace + +// Ensure we don't call the broken one later on +#define PasteboardGetItemCount + class QMacMimeData : public QMimeData { public: @@ -210,7 +228,7 @@ QMacPasteboard::hasOSType(int c_flavor) const sync(); ItemCount cnt = 0; - if (PasteboardGetItemCount(paste, &cnt) || !cnt) + if (PasteboardGetItemCountSafe(paste, &cnt) || !cnt) return false; #ifdef DEBUG_PASTEBOARD @@ -257,7 +275,7 @@ QMacPasteboard::hasFlavor(QString c_flavor) const sync(); ItemCount cnt = 0; - if (PasteboardGetItemCount(paste, &cnt) || !cnt) + if (PasteboardGetItemCountSafe(paste, &cnt) || !cnt) return false; #ifdef DEBUG_PASTEBOARD @@ -374,7 +392,7 @@ QMacPasteboard::formats() const QStringList ret; ItemCount cnt = 0; - if (PasteboardGetItemCount(paste, &cnt) || !cnt) + if (PasteboardGetItemCountSafe(paste, &cnt) || !cnt) return ret; #ifdef DEBUG_PASTEBOARD @@ -417,7 +435,7 @@ QMacPasteboard::hasFormat(const QString &format) const sync(); ItemCount cnt = 0; - if (PasteboardGetItemCount(paste, &cnt) || !cnt) + if (PasteboardGetItemCountSafe(paste, &cnt) || !cnt) return false; #ifdef DEBUG_PASTEBOARD @@ -460,7 +478,7 @@ QMacPasteboard::retrieveData(const QString &format, QVariant::Type) const sync(); ItemCount cnt = 0; - if (PasteboardGetItemCount(paste, &cnt) || !cnt) + if (PasteboardGetItemCountSafe(paste, &cnt) || !cnt) return QByteArray(); #ifdef DEBUG_PASTEBOARD From 6dcc13d4024ed5fd56610c44140aed72e0248a8e Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 19 Nov 2018 19:05:13 +0100 Subject: [PATCH 02/73] Make QCOMPARE()'s handling of non-finite float match double The qCompare() implementation for double was handling infinities and NaN the way tests need, but the one for float didn't; it has just the same need, so apply the same fix. Extends 79493a3ee1. Change-Id: I8425026acb61d535e449f579b77fdcd609157f7c Reviewed-by: Thiago Macieira --- src/testlib/qtestcase.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index f5668c274e..1090428bb0 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -2437,7 +2437,16 @@ bool QTest::compare_helper(bool success, const char *failureMsg, bool QTest::qCompare(float const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) { - return compare_helper(qFuzzyCompare(t1, t2), "Compared floats are not the same (fuzzy compare)", + bool equal = false; + int cl1 = std::fpclassify(t1); + int cl2 = std::fpclassify(t2); + if (cl1 == FP_INFINITE) + equal = ((t1 < 0) == (t2 < 0)) && cl2 == FP_INFINITE; + else if (cl1 == FP_NAN) + equal = (cl2 == FP_NAN); + else + equal = qFuzzyCompare(t1, t2); + return compare_helper(equal, "Compared floats are not the same (fuzzy compare)", toString(t1), toString(t2), actual, expected, file, line); } From 108c9015b960fccd79efc6de4459dbf05f6ced54 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 16 Nov 2018 14:29:42 +0100 Subject: [PATCH 03/73] Implement transient locale as instantiating a class A couple of QLocale tests were using setlocale twice to provide a transient locale tweak in tests; however, if the test in between fails, that can leave the program running in the "transient" locale after. So implement a proper class whose destructor ensures the transient is tidied away. Also change the locale in use by one of these transient changes: it purported to be checking things didn't depend on locale, but was using the same local as most of the test-cases for its test. Change-Id: I0d954edcc96019a8c2eb12b7a7c568e8b87a41d5 Reviewed-by: Thiago Macieira Reviewed-by: Ulf Hermann --- .../corelib/tools/qlocale/tst_qlocale.cpp | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index b7cb8a1bdc..4803451399 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -153,6 +153,16 @@ private: QString m_decimal, m_thousand, m_sdate, m_ldate, m_time; QString m_sysapp; bool europeanTimeZone; + + class TransientLocale + { + const int m_category; + const char *const m_prior; + public: + TransientLocale(int category, const char *locale) + : m_category(category), m_prior(setlocale(category, locale)) {} + ~TransientLocale() { setlocale(m_category, m_prior); } + }; }; tst_QLocale::tst_QLocale() @@ -806,10 +816,12 @@ void tst_QLocale::stringToDouble() double d = locale.toDouble(num_str, &ok); QCOMPARE(ok, good); - char *currentLocale = setlocale(LC_ALL, "de_DE"); - QCOMPARE(locale.toDouble(num_str, &ok), d); // make sure result is independent of locale - QCOMPARE(ok, good); - setlocale(LC_ALL, currentLocale); + { + // Make sure result is independent of locale: + TransientLocale ignoreme(LC_ALL, "ar_SA"); + QCOMPARE(locale.toDouble(num_str, &ok), d); + QCOMPARE(ok, good); + } if (ok) { double diff = d - num; @@ -939,9 +951,8 @@ void tst_QLocale::doubleToString() const QLocale locale(locale_name); QCOMPARE(locale.toString(num, mode, precision), num_str); - char *currentLocale = setlocale(LC_ALL, "de_DE"); + TransientLocale ignoreme(LC_ALL, "de_DE"); QCOMPARE(locale.toString(num, mode, precision), num_str); - setlocale(LC_ALL, currentLocale); } void tst_QLocale::strtod_data() From 704137f8de49a55a1b21bb6d612d2594562f51ce Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 16 Nov 2018 15:44:44 +0100 Subject: [PATCH 04/73] tst_QLocale: Add tests for toFloat() Mirror those for toDouble(). Change-Id: Ide0ef3cd99528d575f6a578ef19547f3b1119c5d Reviewed-by: Ulf Hermann --- .../corelib/tools/qlocale/tst_qlocale.cpp | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 4803451399..fa1a64a045 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -83,6 +83,8 @@ private slots: void matchingLocales(); void stringToDouble_data(); void stringToDouble(); + void stringToFloat_data() { stringToDouble_data(); } + void stringToFloat(); void doubleToString_data(); void doubleToString(); void strtod_data(); @@ -801,7 +803,7 @@ void tst_QLocale::stringToDouble_data() void tst_QLocale::stringToDouble() { -#define MY_DOUBLE_EPSILON (2.22045e-16) +#define MY_DOUBLE_EPSILON (2.22045e-16) // 1/2^{52}; double has a 53-bit mantissa QFETCH(QString, locale_name); QFETCH(QString, num_str); @@ -824,6 +826,8 @@ void tst_QLocale::stringToDouble() } if (ok) { + // First use fuzzy-compare, then a more precise check: + QCOMPARE(d, num); double diff = d - num; if (diff < 0) diff = -diff; @@ -834,11 +838,60 @@ void tst_QLocale::stringToDouble() QCOMPARE(ok, good); if (ok) { + QCOMPARE(d, num); double diff = d - num; if (diff < 0) diff = -diff; QVERIFY(diff <= MY_DOUBLE_EPSILON); } +#undef MY_DOUBLE_EPSILON +} + +void tst_QLocale::stringToFloat() +{ +#define MY_FLOAT_EPSILON (2.384e-7) // 1/2^{22}; float has a 23-bit mantissa + + QFETCH(QString, locale_name); + QFETCH(QString, num_str); + QFETCH(bool, good); + QFETCH(double, num); + QStringRef num_strRef = num_str.leftRef(-1); + float fnum = num; + + QLocale locale(locale_name); + QCOMPARE(locale.name(), locale_name); + + bool ok; + float f = locale.toFloat(num_str, &ok); + QCOMPARE(ok, good); + + { + // Make sure result is independent of locale: + TransientLocale ignoreme(LC_ALL, "ar_SA"); + QCOMPARE(locale.toFloat(num_str, &ok), f); + QCOMPARE(ok, good); + } + + if (ok) { + // First use fuzzy-compare, then a more precise check: + QCOMPARE(f, fnum); + float diff = f - fnum; + if (diff < 0) + diff = -diff; + QVERIFY(diff <= MY_FLOAT_EPSILON); + } + + f = locale.toFloat(num_strRef, &ok); + QCOMPARE(ok, good); + + if (ok) { + QCOMPARE(f, fnum); + float diff = f - fnum; + if (diff < 0) + diff = -diff; + QVERIFY(diff <= MY_FLOAT_EPSILON); + } +#undef MY_FLOAT_EPSILON } void tst_QLocale::doubleToString_data() From a9923674030980706940b3ee11145c38674bb35d Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 19 Nov 2018 16:27:03 +0100 Subject: [PATCH 05/73] Change documentation of some toDouble()s to reflect reality They actually return infinity if conversion overflows, while still setting ok to false; they were documented to return 0 on failure, with no mention of this special handling of overflow. Documented reality rather than changing the behavior. Gave underflow as an example of failure other than overflow (toDouble()s do indeed fail on it). Added some tests of out-of-range values, infinities and NaNs. [ChangeLog][QtCore][toDouble] QString, QByteArray and QLocale return an infinity on overflow (since 5.7), while setting ok to false; this was at odds with their documented behavior of returning 0 on failure. The documentation now reflects the actual behavior. Fixes: QTBUG-71256 Change-Id: I8d7e80ba1f06091cf0f1480c341553381103703b Reviewed-by: Ulf Hermann --- src/corelib/tools/qbytearray.cpp | 3 +- src/corelib/tools/qlocale.cpp | 18 ++++-- src/corelib/tools/qstring.cpp | 6 +- .../corelib/tools/qlocale/tst_qlocale.cpp | 56 +++++++++++++++---- 4 files changed, 62 insertions(+), 21 deletions(-) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 424420204a..1b7a4366c7 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -3871,7 +3871,8 @@ ushort QByteArray::toUShort(bool *ok, int base) const /*! Returns the byte array converted to a \c double value. - Returns 0.0 if the conversion fails. + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for other reasons (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 6361280bc7..8f9fb3de2d 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -1373,8 +1373,10 @@ float QLocale::toFloat(const QString &s, bool *ok) const } /*! - Returns the double represented by the localized string \a s, or - 0.0 if the conversion failed. + Returns the double represented by the localized string \a s. + + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for any other reason (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. @@ -1542,8 +1544,10 @@ float QLocale::toFloat(const QStringRef &s, bool *ok) const } /*! - Returns the double represented by the localized string \a s, or - 0.0 if the conversion failed. + Returns the double represented by the localized string \a s. + + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for any other reason (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. @@ -1711,8 +1715,10 @@ float QLocale::toFloat(QStringView s, bool *ok) const } /*! - Returns the double represented by the localized string \a s, or - 0.0 if the conversion failed. + Returns the double represented by the localized string \a s. + + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for any other reason (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 0a8b2b4238..1381e8c11c 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -7169,7 +7169,8 @@ ushort QString::toUShort(bool *ok, int base) const /*! Returns the string converted to a \c double value. - Returns 0.0 if the conversion fails. + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for other reasons (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. @@ -11794,7 +11795,8 @@ ushort QStringRef::toUShort(bool *ok, int base) const /*! Returns the string converted to a \c double value. - Returns 0.0 if the conversion fails. + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for other reasons (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index fa1a64a045..7bf6d1327e 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -83,7 +83,7 @@ private slots: void matchingLocales(); void stringToDouble_data(); void stringToDouble(); - void stringToFloat_data() { stringToDouble_data(); } + void stringToFloat_data(); void stringToFloat(); void doubleToString_data(); void doubleToString(); @@ -155,6 +155,7 @@ private: QString m_decimal, m_thousand, m_sdate, m_ldate, m_time; QString m_sysapp; bool europeanTimeZone; + void toReal_data(); class TransientLocale { @@ -679,7 +680,7 @@ void tst_QLocale::unixLocaleName() #undef TEST_NAME } -void tst_QLocale::stringToDouble_data() +void tst_QLocale::toReal_data() { QTest::addColumn("locale_name"); QTest::addColumn("num_str"); @@ -801,6 +802,32 @@ void tst_QLocale::stringToDouble_data() QTest::newRow("de_DE 9.876543,0e--2") << QString("de_DE") << QString("9.876543,0e")+QChar(8722)+QString("2") << false << 0.0; } +void tst_QLocale::stringToDouble_data() +{ + toReal_data(); + if (std::numeric_limits::has_infinity) { + double huge = std::numeric_limits::infinity(); + QTest::newRow("C inf") << QString("C") << QString("inf") << true << huge; + QTest::newRow("C +inf") << QString("C") << QString("+inf") << true << +huge; + QTest::newRow("C -inf") << QString("C") << QString("-inf") << true << -huge; + // Overflow: + QTest::newRow("C huge") << QString("C") << QString("2e308") << false << huge; + QTest::newRow("C -huge") << QString("C") << QString("-2e308") << false << -huge; + } + if (std::numeric_limits::has_quiet_NaN) + QTest::newRow("C qnan") << QString("C") << QString("NaN") << true << std::numeric_limits::quiet_NaN(); + + // In range (but outside float's range): + QTest::newRow("C big") << QString("C") << QString("3.5e38") << true << 3.5e38; + QTest::newRow("C -big") << QString("C") << QString("-3.5e38") << true << -3.5e38; + QTest::newRow("C small") << QString("C") << QString("1e-45") << true << 1e-45; + QTest::newRow("C -small") << QString("C") << QString("-1e-45") << true << -1e-45; + + // Underflow: + QTest::newRow("C tiny") << QString("C") << QString("2e-324") << false << 0.; + QTest::newRow("C -tiny") << QString("C") << QString("-2e-324") << false << 0.; +} + void tst_QLocale::stringToDouble() { #define MY_DOUBLE_EPSILON (2.22045e-16) // 1/2^{52}; double has a 53-bit mantissa @@ -825,28 +852,33 @@ void tst_QLocale::stringToDouble() QCOMPARE(ok, good); } - if (ok) { + if (ok || std::isinf(num)) { // First use fuzzy-compare, then a more precise check: QCOMPARE(d, num); - double diff = d - num; - if (diff < 0) - diff = -diff; - QVERIFY(diff <= MY_DOUBLE_EPSILON); + if (std::isfinite(num)) { + double diff = d > num ? d - num : num - d; + QVERIFY(diff <= MY_DOUBLE_EPSILON); + } } d = locale.toDouble(num_strRef, &ok); QCOMPARE(ok, good); - if (ok) { + if (ok || std::isinf(num)) { QCOMPARE(d, num); - double diff = d - num; - if (diff < 0) - diff = -diff; - QVERIFY(diff <= MY_DOUBLE_EPSILON); + if (std::isfinite(num)) { + double diff = d > num ? d - num : num - d; + QVERIFY(diff <= MY_DOUBLE_EPSILON); + } } #undef MY_DOUBLE_EPSILON } +void tst_QLocale::stringToFloat_data() +{ + toReal_data(); +} + void tst_QLocale::stringToFloat() { #define MY_FLOAT_EPSILON (2.384e-7) // 1/2^{22}; float has a 23-bit mantissa From ce159d1a3e48308d54300560f024e8501c1395c9 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 19 Nov 2018 19:53:38 +0100 Subject: [PATCH 06/73] Fix toFloat()s between float and double ranges and document Revised some toFloat()s to be consistent with the matching toDouble()s; previously, they would return infinity if toDouble() did but return 0 if toDouble() got a finite value outside float's range. That also applied to values that underflowed float's range, succeeding and returning 0 as long as they were within double's range but failing if toDouble() underflowed. Now float-underflow also fails. Amended their documentation to reflect this more consistent reality. Added some tests of out-of-range values, infinities and NaNs. [ChangeLog][QtCore][toFloat] QString, QByteArray and QLocale returned an infinity on double-overflow (since 5.7) but returned 0 on a finite double outside float's range, while setting ok to false; this was at odds with their documented behavior of returning 0 on any failure. They also succeeded, returning zero, on underflow of float's range, unless double underflowed, where they failed. Changed the handling of values outside float's range to match that of values outside double's range: fail, returning an infinity on overflow or zero on underflow. The documentation now reflects the revised behavior, which matches toDouble(). Change-Id: Ia168bcacf7def0df924840d45d8edc5f850449d6 Reviewed-by: Ulf Hermann --- src/corelib/tools/qbytearray.cpp | 3 +- src/corelib/tools/qlocale.cpp | 18 +++++--- src/corelib/tools/qlocale_p.h | 11 ++++- src/corelib/tools/qstring.cpp | 6 ++- .../corelib/tools/qlocale/tst_qlocale.cpp | 42 ++++++++++++++----- 5 files changed, 60 insertions(+), 20 deletions(-) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 1b7a4366c7..2a97fa50a9 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -3899,7 +3899,8 @@ double QByteArray::toDouble(bool *ok) const /*! Returns the byte array converted to a \c float value. - Returns 0.0 if the conversion fails. + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for other reasons (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 8f9fb3de2d..417b1e41f6 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -1353,8 +1353,10 @@ qulonglong QLocale::toULongLong(const QString &s, bool *ok) const } /*! - Returns the float represented by the localized string \a s, or 0.0 - if the conversion failed. + Returns the float represented by the localized string \a s. + + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for any other reason (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. @@ -1522,8 +1524,10 @@ qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const } /*! - Returns the float represented by the localized string \a s, or 0.0 - if the conversion failed. + Returns the float represented by the localized string \a s. + + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for any other reason (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. @@ -1696,8 +1700,10 @@ qulonglong QLocale::toULongLong(QStringView s, bool *ok) const } /*! - Returns the float represented by the localized string \a s, or 0.0 - if the conversion failed. + Returns the float represented by the localized string \a s. + + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for any other reason (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h index 6669ae7c8b..deca671627 100644 --- a/src/corelib/tools/qlocale_p.h +++ b/src/corelib/tools/qlocale_p.h @@ -249,7 +249,16 @@ public: if (std::fabs(d) > std::numeric_limits::max()) { if (ok != 0) *ok = false; - return 0.0f; + const float huge = std::numeric_limits::infinity(); + return d < 0 ? -huge : huge; + } + if (std::fabs(d) >= std::numeric_limits::min() // i.e. d != 0 + && std::fabs(d) < std::numeric_limits::min()) { + // Values smaller than std::numeric_limits::min() have + // failed already; match them. + if (ok != 0) + *ok = false; + return 0; } return float(d); } diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 1381e8c11c..94b1784202 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -7208,7 +7208,8 @@ double QString::toDouble(bool *ok) const /*! Returns the string converted to a \c float value. - Returns 0.0 if the conversion fails. + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for other reasons (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. @@ -11821,7 +11822,8 @@ double QStringRef::toDouble(bool *ok) const /*! Returns the string converted to a \c float value. - Returns 0.0 if the conversion fails. + Returns an infinity if the conversion overflows or 0.0 if the + conversion fails for other reasons (e.g. underflow). If \a ok is not \c nullptr, failure is reported by setting *\a{ok} to \c false, and success by setting *\a{ok} to \c true. diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 7bf6d1327e..b8f1cc568a 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -877,6 +877,28 @@ void tst_QLocale::stringToDouble() void tst_QLocale::stringToFloat_data() { toReal_data(); + if (std::numeric_limits::has_infinity) { + double huge = std::numeric_limits::infinity(); + QTest::newRow("C inf") << QString("C") << QString("inf") << true << huge; + QTest::newRow("C +inf") << QString("C") << QString("+inf") << true << +huge; + QTest::newRow("C -inf") << QString("C") << QString("-inf") << true << -huge; + // Overflow float, but not double: + QTest::newRow("C big") << QString("C") << QString("3.5e38") << false << huge; + QTest::newRow("C -big") << QString("C") << QString("-3.5e38") << false << -huge; + // Overflow double, too: + QTest::newRow("C huge") << QString("C") << QString("2e308") << false << huge; + QTest::newRow("C -huge") << QString("C") << QString("-2e308") << false << -huge; + } + if (std::numeric_limits::has_quiet_NaN) + QTest::newRow("C qnan") << QString("C") << QString("NaN") << true << double(std::numeric_limits::quiet_NaN()); + + // Underflow float, but not double: + QTest::newRow("C small") << QString("C") << QString("1e-45") << false << 0.; + QTest::newRow("C -small") << QString("C") << QString("-1e-45") << false << 0.; + + // Underflow double, too: + QTest::newRow("C tiny") << QString("C") << QString("2e-324") << false << 0.; + QTest::newRow("C -tiny") << QString("C") << QString("-2e-324") << false << 0.; } void tst_QLocale::stringToFloat() @@ -904,24 +926,24 @@ void tst_QLocale::stringToFloat() QCOMPARE(ok, good); } - if (ok) { + if (ok || std::isinf(fnum)) { // First use fuzzy-compare, then a more precise check: QCOMPARE(f, fnum); - float diff = f - fnum; - if (diff < 0) - diff = -diff; - QVERIFY(diff <= MY_FLOAT_EPSILON); + if (std::isfinite(fnum)) { + float diff = f > fnum ? f - fnum : fnum - f; + QVERIFY(diff <= MY_FLOAT_EPSILON); + } } f = locale.toFloat(num_strRef, &ok); QCOMPARE(ok, good); - if (ok) { + if (ok || std::isinf(fnum)) { QCOMPARE(f, fnum); - float diff = f - fnum; - if (diff < 0) - diff = -diff; - QVERIFY(diff <= MY_FLOAT_EPSILON); + if (std::isfinite(fnum)) { + float diff = f > fnum ? f - fnum : fnum - f; + QVERIFY(diff <= MY_FLOAT_EPSILON); + } } #undef MY_FLOAT_EPSILON } From d8b401959f6f58bc80f767684b250dd4589735d6 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 19 Nov 2018 16:26:02 +0100 Subject: [PATCH 07/73] Recognize E along with e as exponent character in asciiToDouble Fixed a misguided condition in the check for bogus texts in the sscanf branch of the decoder; it checked for 'e' but neglected 'E', which is just as valid. Change-Id: I9236c76faea000c92df641930e401bce445e06c8 Reviewed-by: Ulf Hermann --- src/corelib/tools/qlocale_tools.cpp | 2 +- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp index 4d969a4723..a315356a23 100644 --- a/src/corelib/tools/qlocale_tools.cpp +++ b/src/corelib/tools/qlocale_tools.cpp @@ -350,7 +350,7 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed, ok = false; for (int i = 0; i < processed; ++i) { char c = num[i]; - if ((c < '0' || c > '9') && c != '.' && c != '-' && c != '+' && c != 'e') { + if ((c < '0' || c > '9') && c != '.' && c != '-' && c != '+' && c != 'e' && c != 'E') { // Garbage found processed = 0; return 0.0; diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index b8f1cc568a..fd37a03b8e 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -693,6 +693,8 @@ void tst_QLocale::toReal_data() QTest::newRow("C 1.234e-10") << QString("C") << QString("1.234e-10") << true << 1.234e-10; QTest::newRow("C 1.234E10") << QString("C") << QString("1.234E10") << true << 1.234e10; QTest::newRow("C 1e10") << QString("C") << QString("1e10") << true << 1.0e10; + QTest::newRow("C 1e310") << QString("C") << QString("1e310") << false << std::numeric_limits::infinity(); + QTest::newRow("C 1E310") << QString("C") << QString("1E310") << false << std::numeric_limits::infinity(); QTest::newRow("C 1") << QString("C") << QString(" 1") << true << 1.0; QTest::newRow("C 1") << QString("C") << QString(" 1") << true << 1.0; QTest::newRow("C 1 ") << QString("C") << QString("1 ") << true << 1.0; From 71bd06d516a2410ae0ea698e79dcb94aba9bc5b4 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Wed, 13 Jun 2018 16:35:40 +0300 Subject: [PATCH 08/73] Make developer build tests pass for boot2qt Some tests were fixed and others were skipped/blacklisted. Task-number: QTBUG-63152 Change-Id: Ica7df555f8d152ee589865911130525101d4b941 Reviewed-by: Liang Qi --- tests/auto/corelib/global/qlogging/BLACKLIST | 4 ++++ tests/auto/corelib/io/qstandardpaths/BLACKLIST | 3 --- .../corelib/io/qstandardpaths/qstandardpaths.pro | 3 +++ .../corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 6 ++++++ .../corelib/serialization/qtextstream/test/test.pro | 2 ++ .../serialization/qtextstream/tst_qtextstream.cpp | 5 ++++- tests/auto/network/access/http2/http2.pro | 3 ++- tests/auto/network/access/http2/tst_http2.cpp | 5 +++++ .../network/socket/qtcpsocket/tst_qtcpsocket.cpp | 12 +++++++++++- tests/auto/other/qobjectrace/qobjectrace.pro | 3 +++ tests/auto/other/qobjectrace/tst_qobjectrace.cpp | 4 ++++ tests/auto/testlib/selftests/tst_selftests.cpp | 3 +++ .../auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 12 ++++++++++++ 13 files changed, 59 insertions(+), 6 deletions(-) delete mode 100644 tests/auto/corelib/io/qstandardpaths/BLACKLIST diff --git a/tests/auto/corelib/global/qlogging/BLACKLIST b/tests/auto/corelib/global/qlogging/BLACKLIST index 1dcee92361..e474064f54 100644 --- a/tests/auto/corelib/global/qlogging/BLACKLIST +++ b/tests/auto/corelib/global/qlogging/BLACKLIST @@ -1,3 +1,7 @@ +[qMessagePattern:backtrace] +# QTBUG-63915 +b2qt 64bit + [qMessagePattern:backtrace depth,separator] # QTBUG-63915 b2qt 64bit diff --git a/tests/auto/corelib/io/qstandardpaths/BLACKLIST b/tests/auto/corelib/io/qstandardpaths/BLACKLIST deleted file mode 100644 index d5ee9650cd..0000000000 --- a/tests/auto/corelib/io/qstandardpaths/BLACKLIST +++ /dev/null @@ -1,3 +0,0 @@ -[testFindExecutable] -# QTBUG-64404 -b2qt 64bit diff --git a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro index 9fd7047405..44b1ce8dd8 100644 --- a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro +++ b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro @@ -5,3 +5,6 @@ INCLUDEPATH += ../../../../shared/ HEADERS += ../../../../shared/emulationdetector.h SOURCES = tst_qstandardpaths.cpp TESTDATA += tst_qstandardpaths.cpp qstandardpaths.pro + +# QTBUG-64404 +boot2qt: DEFINES+=SKIP_FINDEXECUTABLE diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 3de777653e..e316ce9acb 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -369,6 +369,12 @@ static inline QFileInfo findSh() void tst_qstandardpaths::testFindExecutable_data() { +#ifdef SKIP_FINDEXECUTABLE + // Test needs to be skipped or Q_ASSERT below will cancel the test + // and report FAIL regardless of BLACKLIST contents + QSKIP("QTBUG-64404"); +#endif + QTest::addColumn("directory"); QTest::addColumn("needle"); QTest::addColumn("expected"); diff --git a/tests/auto/corelib/serialization/qtextstream/test/test.pro b/tests/auto/corelib/serialization/qtextstream/test/test.pro index 3dcfa0b414..0f289a5ce1 100644 --- a/tests/auto/corelib/serialization/qtextstream/test/test.pro +++ b/tests/auto/corelib/serialization/qtextstream/test/test.pro @@ -3,6 +3,8 @@ TARGET = ../tst_qtextstream QT = core network testlib SOURCES = ../tst_qtextstream.cpp RESOURCES += ../qtextstream.qrc +INCLUDEPATH += ../../../../../shared/ +HEADERS += ../../../../../shared/emulationdetector.h win32 { CONFIG(debug, debug|release) { diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp index df8746e518..77675b8e44 100644 --- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp @@ -44,7 +44,7 @@ # include #endif #include "../../../network-settings.h" - +#include "emulationdetector.h" QT_BEGIN_NAMESPACE template<> struct QMetaTypeId @@ -1459,6 +1459,9 @@ void tst_QTextStream::pos2() // ------------------------------------------------------------------------------ void tst_QTextStream::pos3LargeFile() { + if (EmulationDetector::isRunningArmOnX86()) + QSKIP("Running QTextStream::pos() in tight loop is too slow on emulator"); + { QFile file(testFileName); file.open(QIODevice::WriteOnly | QIODevice::Text); diff --git a/tests/auto/network/access/http2/http2.pro b/tests/auto/network/access/http2/http2.pro index e130f30784..b244a827bd 100644 --- a/tests/auto/network/access/http2/http2.pro +++ b/tests/auto/network/access/http2/http2.pro @@ -2,7 +2,8 @@ QT += core core-private network network-private testlib CONFIG += testcase parallel_test c++11 TARGET = tst_http2 -HEADERS += http2srv.h +INCLUDEPATH += ../../../../shared/ +HEADERS += http2srv.h ../../../../shared/emulationdetector.h SOURCES += tst_http2.cpp http2srv.cpp DEFINES += SRCDIR=\\\"$$PWD/\\\" diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp index ecf4c5814a..51e30804a3 100644 --- a/tests/auto/network/access/http2/tst_http2.cpp +++ b/tests/auto/network/access/http2/tst_http2.cpp @@ -48,6 +48,8 @@ #include #include +#include "emulationdetector.h" + #if !defined(QT_NO_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_TLSEXT) // HTTP/2 over TLS requires ALPN/NPN to negotiate the protocol version. const bool clearTextHTTP2 = false; @@ -292,6 +294,9 @@ void tst_Http2::flowControlServerSide() // to let all replies finish without any error. using namespace Http2; + if (EmulationDetector::isRunningArmOnX86()) + QSKIP("Test is too slow to run on emulator"); + clearHTTP2State(); serverPort = 0; diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp index 263a475435..c473230246 100644 --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp @@ -2429,7 +2429,17 @@ void tst_QTcpSocket::suddenRemoteDisconnect() QString::fromLatin1("Could not start %1: %2").arg(processExe, serverProcess.errorString()))); while (!serverProcess.canReadLine()) QVERIFY(serverProcess.waitForReadyRead(10000)); - QCOMPARE(serverProcess.readLine().data(), QByteArray(server.toLatin1() + "\n").data()); + + QByteArray line = serverProcess.readLine(); + + // Ignore following print, happens on Qemu: + if (line == "getsockopt level=41 optname=26 not yet supported\n") { + while (!serverProcess.canReadLine()) + QVERIFY(serverProcess.waitForReadyRead(10000)); + line = serverProcess.readLine(); + } + + QCOMPARE(line.data(), QByteArray(server.toLatin1() + "\n").data()); // Start client QProcess clientProcess; diff --git a/tests/auto/other/qobjectrace/qobjectrace.pro b/tests/auto/other/qobjectrace/qobjectrace.pro index 94e7928585..6536810534 100644 --- a/tests/auto/other/qobjectrace/qobjectrace.pro +++ b/tests/auto/other/qobjectrace/qobjectrace.pro @@ -2,3 +2,6 @@ CONFIG += testcase SOURCES += tst_qobjectrace.cpp QT = core testlib +INCLUDEPATH += ../../../shared/ +HEADERS += ../../../shared/emulationdetector.h + diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp index e6eb51500b..0d656e223c 100644 --- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp +++ b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp @@ -30,6 +30,7 @@ #include #include +#include "emulationdetector.h" enum { OneMinute = 60 * 1000, TwoMinutes = OneMinute * 2 }; @@ -256,6 +257,9 @@ public: void tst_QObjectRace::destroyRace() { + if (EmulationDetector::isRunningArmOnX86()) + QSKIP("Test is too slow to run on emulator"); + enum { ThreadCount = 10, ObjectCountPerThread = 2777, ObjectCount = ThreadCount * ObjectCountPerThread }; diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 63e5721e7e..26e3ccd0fb 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -659,6 +659,9 @@ static inline QByteArray msgProcessError(const QString &binary, const QStringLis void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& loggers, QStringList const& arguments, bool crashes) { + if (EmulationDetector::isRunningArmOnX86() && (subdir == "crashes")) + QSKIP("Skipping \"crashes\" due to QTBUG-71915"); + #if defined(__GNUC__) && defined(__i386) && defined(Q_OS_LINUX) if (arguments.contains("-callgrind")) { QProcess checkProcess; diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 7c1deb8fff..d5eef521ed 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -1671,6 +1671,13 @@ void tst_QComboBox::setCustomModelAndView() QTRY_VERIFY(combo.view()->isVisible()); const QRect subItemRect = view->visualRect(model->indexFromItem(subItem)); QWidget *window = view->window(); + + // QComboBox sometimes ignores the mouse click event for doubleClickInterval + // depending on which tests have been run previously. On arm this happens + // more often than on x86. Search for maybeIgnoreMouseButtonRelease to see + // why this happens. + QTest::qWait(QApplication::doubleClickInterval()); + QTest::mouseClick(window->windowHandle(), Qt::LeftButton, 0, view->mapTo(window, subItemRect.center())); QTRY_COMPARE(combo.currentText(), subItem21Text); } @@ -3436,6 +3443,11 @@ void tst_QComboBox::task_QTBUG_52027_mapCompleterIndex() model->setFilterFixedString("foobar1"); completer->setModel(model); + if (QGuiApplication::platformName() == "offscreen") { + QWARN("Offscreen platform requires explicit activateWindow()"); + cbox.activateWindow(); + } + QApplication::setActiveWindow(&cbox); QVERIFY(QTest::qWaitForWindowActive(&cbox)); From d41879db384905c47c8fca976ae70ad6595de41f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 27 Nov 2018 13:59:53 +0100 Subject: [PATCH 09/73] Documention: Use const-ref in the snippets for qOverload() This makes it clearer that const-ref needs to be specified in the template arguments of qOverload() and related. Change-Id: I527c8ca853be159af8665e9759d9549df10573b3 Reviewed-by: Martin Smith Reviewed-by: Olivier Goffart (Woboq GmbH) --- .../snippets/code/src_corelib_global_qglobal.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp index 7fdff974c1..0248640369 100644 --- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp @@ -647,24 +647,24 @@ template<> class QTypeInfo : public QTypeInfoMerger {}; //! [52] struct Foo { void overloadedFunction(); - void overloadedFunction(int, QString); + void overloadedFunction(int, const QString &); }; ... qOverload<>(&Foo::overloadedFunction) - ... qOverload(&Foo::overloadedFunction) + ... qOverload(&Foo::overloadedFunction) //! [52] //! [53] ... QOverload<>::of(&Foo::overloadedFunction) - ... QOverload::of(&Foo::overloadedFunction) + ... QOverload::of(&Foo::overloadedFunction) //! [53] //! [54] struct Foo { - void overloadedFunction(int, QString); - void overloadedFunction(int, QString) const; + void overloadedFunction(int, const QString &); + void overloadedFunction(int, const QString &) const; }; - ... qConstOverload(&Foo::overloadedFunction) - ... qNonConstOverload(&Foo::overloadedFunction) + ... qConstOverload(&Foo::overloadedFunction) + ... qNonConstOverload(&Foo::overloadedFunction) //! [54] //! [qlikely] From 4e01b851159342122d42be1091d4cfa464700a4e Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 15 Nov 2018 17:59:18 +0100 Subject: [PATCH 10/73] QDateTimeEdit: fix setDate() if time is in a spring-forward If the time the widget is set to use falls in the gap skipped by a spring-forward, setting the date to the day of the spring-forward turned a valid date into an invalid date-time. So use the usual trick to map the "draft" date-time to a valid one. Fixes: QTBUG-64485 Fixes: QTBUG-58947 Change-Id: Ib8f0f092cd5d6dce3da31eb52cd42150ca0d1fcb Reviewed-by: Mitch Curtis --- src/widgets/widgets/qdatetimeedit.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp index fca81bec48..68bfd175ff 100644 --- a/src/widgets/widgets/qdatetimeedit.cpp +++ b/src/widgets/widgets/qdatetimeedit.cpp @@ -273,7 +273,13 @@ void QDateTimeEdit::setDate(const QDate &date) setDateRange(date, date); d->clearCache(); - d->setValue(QDateTime(date, d->value.toTime(), d->spec), EmitIfChanged); + QDateTime when(date, d->value.toTime(), d->spec); + // The specified time might not exist on the specified day, + // i.e. the time is in the gap a spring-forward jumps over. + if (!when.isValid()) + when = QDateTime::fromMSecsSinceEpoch(when.toMSecsSinceEpoch(), d->spec); + Q_ASSERT(when.isValid()); + d->setValue(when, EmitIfChanged); d->updateTimeSpec(); } } From d1f924bbce4e0057bdfe3cf3c10140895bec7510 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 23 Nov 2018 17:59:49 +0100 Subject: [PATCH 11/73] Fix tst_QStyleSheetStyle crash on uncommon multi-screen setup It would crash if there is no screen at 0,0. Change-Id: Ic84d75b3d8b917fe3696530cbe843e82923ba676 Reviewed-by: Friedemann Kleint --- .../widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index f5d9433f70..03f24ba151 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -2085,7 +2085,8 @@ void tst_QStyleSheetStyle::highdpiImages() QFETCH(QColor, color); QWidget w; - QScreen *screen = QGuiApplication::screenAt(w.pos()); + QScreen *screen = QGuiApplication::primaryScreen(); + w.move(screen->availableGeometry().topLeft()); QHighDpiScaling::setScreenFactor(screen, screenFactor); w.setStyleSheet("QWidget { background-image: url(\":/images/testimage.png\"); }"); w.show(); From a5e32f93759db5aff30994546cd1cc172e6a57dc Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 27 Nov 2018 14:34:26 +0100 Subject: [PATCH 12/73] Re-enable the QScroller tests on macOS Maybe they aren't flaky anymore... let's find out. Task-number: QTBUG-29950 Task-number: QTBUG-30133 Change-Id: I1a2a3ef7facac5b6e59588d7c6b1b28b40a788ea Reviewed-by: Friedemann Kleint --- tests/auto/widgets/util/qscroller/tst_qscroller.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp index 43063881b2..fac13c7074 100644 --- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp +++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp @@ -347,9 +347,6 @@ void tst_QScroller::scrollerProperties() void tst_QScroller::scrollTo() { -#ifdef Q_OS_MAC - QSKIP("Flakey test - QTBUG-29950"); -#endif { tst_QScrollerWidget *sw = new tst_QScrollerWidget(); sw->scrollArea = QRectF( 0, 0, 1000, 1000 ); @@ -376,9 +373,6 @@ void tst_QScroller::scrollTo() void tst_QScroller::scroll() { -#ifdef Q_OS_MAC - QSKIP("Flakey test - QTBUG-30133"); -#endif #ifndef QT_NO_GESTURES // -- good case. normal scroll tst_QScrollerWidget *sw = new tst_QScrollerWidget(); @@ -419,9 +413,6 @@ void tst_QScroller::scroll() void tst_QScroller::overshoot() { -#ifdef Q_OS_MAC - QSKIP("Flakey test - QTBUG-29950"); -#endif #ifndef QT_NO_GESTURES tst_QScrollerWidget *sw = new tst_QScrollerWidget(); sw->scrollArea = QRectF(0, 0, 1000, 1000); From f1812aad895ed2b8337a6d98d05623714680aba9 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 8 Nov 2018 14:11:11 +0100 Subject: [PATCH 13/73] QFocusFrame: protect it from being moved around by accident If a focus frame is set around a widget that exist inside a QAbstractItemView, both the focus frame and the widget will be scrolled when the table is scrolled (since the focus frame is a child of the view). The result is that after the widget has been scrolled (which will move the focus frame to the correct position as well), the focus frame will be scrolled next, and therefore away from the widget. This patch will catch this case by always adjusting the focus frame position when someone tries to move it. Trying to move the focus frame away from the widget it tracks will anyway be flaky. Fixes: QTBUG-63877 Change-Id: Ic2aacc4fafc219280e32092c258a7539d0db9cd0 Reviewed-by: Timur Pocheptsov --- src/widgets/widgets/qfocusframe.cpp | 20 +++++++++- .../widgets/qfocusframe/tst_qfocusframe.cpp | 39 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/widgets/widgets/qfocusframe.cpp b/src/widgets/widgets/qfocusframe.cpp index 8b8f4db86e..0992becdf0 100644 --- a/src/widgets/widgets/qfocusframe.cpp +++ b/src/widgets/widgets/qfocusframe.cpp @@ -335,7 +335,25 @@ QFocusFrame::eventFilter(QObject *o, QEvent *e) /*! \reimp */ bool QFocusFrame::event(QEvent *e) { - return QWidget::event(e); + Q_D(QFocusFrame); + + switch (e->type()) { + case QEvent::Move: + case QEvent::Resize: + if (d->widget) { + // When we're tracking a widget, we don't allow anyone to move the focus frame around. + // We do our best with event filters to make it stay on top of the widget, so trying to + // move the frame somewhere else will be flaky at best. This can e.g happen for general + // purpose code, like QAbstractScrollView, that bulk-moves all children a certain distance. + // So we need to call updateSize() when that happens to ensure that the focus frame stays + // on top of the widget. + d->updateSize(); + } + break; + default: + return QWidget::event(e); + } + return true; } QT_END_NAMESPACE diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp index e6e689336a..657a1ea55c 100644 --- a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp +++ b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp @@ -32,6 +32,8 @@ #include #include #include +#include +#include class tst_QFocusFrame : public QObject { @@ -43,6 +45,7 @@ public: private slots: void getSetCheck(); + void focusFrameInsideScrollview(); }; tst_QFocusFrame::tst_QFocusFrame() @@ -68,5 +71,41 @@ void tst_QFocusFrame::getSetCheck() delete obj1; } +void tst_QFocusFrame::focusFrameInsideScrollview() +{ + // Make sure that the focus frame follows the widget, even + // if the widget is inside a QAbstractItemView. A QAbstractItemView will scroll + // all the children, including the focus frame, when it scrolls, which + // is why special considerations are taken inside the focus frame to + // prevent the frame to scroll away from the widget it tracks. + + if (qApp->style()->objectName() != QLatin1String("macintosh")) + QSKIP("This test is only valid when using a style that has a focus frame"); + + QWidget window; + window.setGeometry(100, 100, 500, 500); + + QTableView tableView(&window); + tableView.resize(window.size()); + QStandardItemModel *itemModel = new QStandardItemModel(); + for (int i = 0; i < 50; ++i) + itemModel->appendRow(new QStandardItem("Value")); + tableView.setModel(itemModel); + tableView.edit(itemModel->index(8, 0)); + + window.show(); + QFocusFrame *focusFrame = nullptr; + QTRY_VERIFY(focusFrame = window.findChild()); + const QPoint initialOffset = focusFrame->widget()->mapToGlobal(QPoint()) - focusFrame->mapToGlobal(QPoint()); + + tableView.scrollTo(itemModel->index(40, 0)); + QPoint offsetAfterScroll = focusFrame->widget()->mapToGlobal(QPoint()) - focusFrame->mapToGlobal(QPoint()); + QCOMPARE(offsetAfterScroll, initialOffset); + + tableView.scrollTo(itemModel->index(0, 0)); + offsetAfterScroll = focusFrame->widget()->mapToGlobal(QPoint()) - focusFrame->mapToGlobal(QPoint()); + QCOMPARE(offsetAfterScroll, initialOffset); +} + QTEST_MAIN(tst_QFocusFrame) #include "tst_qfocusframe.moc" From 4447db44652420d80886de8de4b02f3bcd9fe86c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 27 Nov 2018 08:26:40 +0100 Subject: [PATCH 14/73] Active Qt Servers: Fix midl warning about unknown option Remove the option from msvc-desktop.conf, which duplicates the /nologo option in idcidl.prf. Fixes: QTBUG-72046 Change-Id: I906097e0611f4578c307616b3f9ebecdfc4d8812 Reviewed-by: Volker Hilsheimer --- mkspecs/common/msvc-desktop.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index a4fadeb029..c0d4bd2acc 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -106,7 +106,7 @@ QMAKE_LIBS_OPENGL_ES2_DEBUG = gdi32.lib user32.lib QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib QMAKE_LIBS_QT_ENTRY = -lqtmain -QMAKE_IDL = midl /NOLOGO +QMAKE_IDL = midl QMAKE_LIB = lib /NOLOGO QMAKE_RC = rc /NOLOGO From dba606767056986a8c0cc973ec5932f603f14759 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 25 Oct 2018 16:35:58 -0700 Subject: [PATCH 15/73] Optimize QSharedPointer::getAndRef with the three-operand testAndSet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally QAtomicPointer didn't have the three-operand version, resulting in code like: if (!atomic.testAndSetXxx(expected, newvalue)) expected = atomic.load(); The three-operand version gives us the current value of the atomic in case the test failed and it's free in all architectures, unlike the extra load. I have to use testAndSetOrdered here because I need the failing load to use the Acquire memory order, even though that has an extra Acquire for the successful case we don't need. QAtomicPointer does not have testAndSetReleaseAcquire. Change-Id: I1bd327aeaf73421a8ec5fffd1560fe30d3bfd9b8 Reviewed-by: Romain Pokrzywka Reviewed-by: Jędrzej Nowacki --- src/corelib/tools/qsharedpointer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 622b03f42d..a1caeeb135 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -1383,15 +1383,18 @@ QtSharedPointer::ExternalRefCountData *QtSharedPointer::ExternalRefCountData::ge ExternalRefCountData *x = new ExternalRefCountData(Qt::Uninitialized); x->strongref.store(-1); x->weakref.store(2); // the QWeakPointer that called us plus the QObject itself - if (!d->sharedRefcount.testAndSetRelease(0, x)) { + + ExternalRefCountData *ret; + if (d->sharedRefcount.testAndSetOrdered(nullptr, x, ret)) { // ought to be release+acquire; this is acq_rel+acquire + ret = x; + } else { // ~ExternalRefCountData has a Q_ASSERT, so we use this trick to // only execute this if Q_ASSERTs are enabled Q_ASSERT((x->weakref.store(0), true)); delete x; - x = d->sharedRefcount.loadAcquire(); - x->weakref.ref(); + ret->weakref.ref(); } - return x; + return ret; } /** From d8962144b425b9929770b67bcfb8247a9e9b9022 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 26 Oct 2018 23:22:22 -0700 Subject: [PATCH 16/73] Fix calculation of the string tab size in QElfParser First of all, we were using the wrong size variable: instead of the size of the section, found in the section header, we were using the size of each section entry in the section table. Since that's usually smaller, we weren't hitting a problem. Second, if the string table is the last thing in the file and there's nothing else after it, not even padding, then offset + section_size can be equal to the file size. In fact, the .shstrtab section is usually the last one, as it contains the section names themselves, so it stands to reason that it's the second to last thing written. For generic linkers, the last data in the file is the section table itself, so usually the file is larger by at least a kilobyte, which is why we haven't hit this bug. It could only manifest as deciding that certain specially-crafted but valid ELF files were invalid. I can't think of a way to trick it into thinking an invalid ELF is valid. That's another reason why this code needs to be rewritten with more modern coding styles and actually using Fixes: QTBUG-71443 Change-Id: I1bd327aeaf73421a8ec5fffd156162f2df5557b8 Reviewed-by: Simon Hausmann --- src/corelib/plugin/qelfparser_p.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 159a324c6b..13eee3539e 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -168,11 +168,11 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library parseSectionHeader(dataStart + soff, &strtab); m_stringTableFileOffset = strtab.offset; - if ((quint32)(m_stringTableFileOffset + e_shentsize) >= fdlen || m_stringTableFileOffset == 0) { + if ((quint32)(strtab.offset + strtab.size) > fdlen || strtab.offset == 0) { if (lib) lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)") .arg(library, QLibrary::tr("string table seems to be at %1") - .arg(QString::number(soff, 16))); + .arg(QString::number(strtab.offset, 16))); return Corrupt; } From ae8389e19c5804c867b2981311c623003a691474 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 16 Nov 2018 17:24:09 +0100 Subject: [PATCH 17/73] Ensure alignment of image-data Instead of relying on the return value of malloc having the correct alignment, use proper non-throwing new[] operators. Change-Id: I06c6c619e21c848f3d184bdb7cef8c5589c1c7ab Reviewed-by: Thiago Macieira --- src/gui/image/qimage.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 0105f1decd..da963adae6 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -149,7 +149,10 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format) d->bytes_per_line = params.bytesPerLine; d->nbytes = params.totalSize; - d->data = (uchar *)malloc(d->nbytes); + if (depth == 64) + d->data = (uchar *)new (std::nothrow) quint64[d->nbytes / sizeof(quint64)]; + else // nbytes is known to already be a multipla of 4: + d->data = (uchar *)new (std::nothrow) quint32[d->nbytes / sizeof(quint32)]; if (!d->data) return nullptr; @@ -165,8 +168,13 @@ QImageData::~QImageData() if (is_cached) QImagePixmapCleanupHooks::executeImageHooks((((qint64) ser_no) << 32) | ((qint64) detach_no)); delete paintEngine; - if (data && own_data) - free(data); + if (data && own_data) { + // Casting to avoid being theoretically UB: + if (depth == 64) + delete[] (quint64 *)data; + else + delete[] (quint32 *)data; + } data = 0; } From 49d63057e31427aff84d4fe33d60bacfe2445076 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Wed, 28 Nov 2018 10:09:00 +0100 Subject: [PATCH 18/73] qobject_p.h: Use nullptr everywhere Change-Id: I605e44607cc09775548c1e6b781d476c1627c9c7 Reviewed-by: Simon Hausmann --- src/corelib/kernel/qobject_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 6aea40cf4a..5dfef786ec 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -341,7 +341,7 @@ inline QMetaObject::Connection QObjectPrivate::connect(const typename QtPrivate: Q_STATIC_ASSERT_X((QtPrivate::AreArgumentsCompatible::value), "Return type of the slot is not compatible with the return type of the signal."); - const int *types = 0; + const int *types = nullptr; if (type == Qt::QueuedConnection || type == Qt::BlockingQueuedConnection) types = QtPrivate::ConnectionTypes::types(); From f4a84ac966077ec9e27c99a43b6911ebab1331bb Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 28 Nov 2018 10:50:18 +0100 Subject: [PATCH 19/73] QWindowContainer: Fix warning triggered by QT_ASCII_CAST_WARN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends 52bd707f0d6a585c2f5da9565834eb91f1d3dbc8. Change-Id: Icc42edc7a943099b36bfa92fe7cd1a92db344991 Reviewed-by: Tor Arne Vestbø --- src/widgets/kernel/qwindowcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index d2680e5280..4ef34f0102 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -231,7 +231,7 @@ QWindowContainer::QWindowContainer(QWindow *embeddedWindow, QWidget *parent, Qt: QString windowName = d->window->objectName(); if (windowName.isEmpty()) windowName = QString::fromUtf8(d->window->metaObject()->className()); - d->fakeParent.setObjectName(windowName + "ContainerFakeParent"); + d->fakeParent.setObjectName(windowName + QLatin1String("ContainerFakeParent")); d->window->setParent(&d->fakeParent); setAcceptDrops(true); From 9e1cb252e0c2628c238150250670a55bd479846c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 16 Nov 2018 20:38:39 +0100 Subject: [PATCH 20/73] Destroy QWindowContainer's fake parent window when not needed Keeping the fake parent window around in a created state means we're wasting system resources such as native platform views/windows, and makes it harder to debug the lifetime of these resources. The fake window will be re-created if re-parented into at a later point. Change-Id: Ib82560e7e565af19d58afe121fd087669a6ffb95 Reviewed-by: Richard Moe Gustavsen --- src/widgets/kernel/qwindowcontainer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index 4ef34f0102..4b289d2d33 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -315,6 +315,7 @@ bool QWindowContainer::event(QEvent *e) d->window->setParent(d->usesNativeWidgets ? windowHandle() : window()->windowHandle()); + d->fakeParent.destroy(); } if (d->window->parent()) { d->markParentChain(); @@ -404,6 +405,7 @@ void QWindowContainer::parentWasChanged(QWidget *parent) Q_ASSERT(toplevel->windowHandle()); } d->window->setParent(toplevel->windowHandle()); + d->fakeParent.destroy(); d->updateGeometry(); } } From 4213f239361e042ae5a053e3eaa87931b6696caf Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Tue, 23 Oct 2018 18:06:55 +0200 Subject: [PATCH 21/73] xcb: Fix leaking events on destroy This patch amends 243c3044b647357ca6df79ac1497ae43de957d31 Change-Id: Ieeebb1e2b94d7c191bf80a1f439c826c406a0c08 Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbeventqueue.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.cpp b/src/plugins/platforms/xcb/qxcbeventqueue.cpp index 862f68764b..f6158d3127 100644 --- a/src/plugins/platforms/xcb/qxcbeventqueue.cpp +++ b/src/plugins/platforms/xcb/qxcbeventqueue.cpp @@ -105,7 +105,8 @@ QXcbEventQueue::~QXcbEventQueue() wait(); } - while (xcb_generic_event_t *event = takeFirst()) + flushBufferedEvents(); + while (xcb_generic_event_t *event = takeFirst(QEventLoop::AllEvents)) free(event); if (m_head && m_head->fromHeap) @@ -219,6 +220,8 @@ void QXcbEventQueue::run() tail->next = qXcbEventNodeFactory(event); tail = tail->next; m_tail.store(tail, std::memory_order_release); + } else { + free(event); } }; From 030b17ecc099ab3191b9b7a43a61560cf3d43f29 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Thu, 22 Nov 2018 11:58:14 +0100 Subject: [PATCH 22/73] QDBusConnection: prevent leaking connection/server on destroy Amends fix 68964b1023 Change-Id: I05816f4b4d2128ed0b669e124d9c9eef92122ec0 Reviewed-by: Alex Blasche Reviewed-by: Thiago Macieira --- src/dbus/qdbusintegrator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 03de5b0091..dfef25e3a8 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1062,10 +1062,11 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate() "Timer and socket errors will follow and the program will probably crash", qPrintable(name)); + auto lastMode = mode; // reset on connection close closeConnection(); qDeleteAll(cachedMetaObjects); - if (mode == ClientMode || mode == PeerMode) { + if (lastMode == ClientMode || lastMode == PeerMode) { // the bus service object holds a reference back to us; // we need to destroy it before we finish destroying ourselves Q_ASSERT(ref.load() == 0); @@ -1077,7 +1078,7 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate() if (connection) q_dbus_connection_unref(connection); connection = 0; - } else if (mode == ServerMode) { + } else if (lastMode == ServerMode) { if (server) q_dbus_server_unref(server); server = 0; From bd989d1652b8ad77088edbc7a68475dd1aabe52e Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 23 Nov 2018 13:02:33 +0100 Subject: [PATCH 23/73] xcb: free leaking clipboard events The leak has been there since the beginnings of Qt 5.0. Change-Id: I238181dcc63cb4cf8a60b5c565b184d8278d0315 Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbclipboard.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp index 9c7559d514..bc92f82d5f 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.cpp +++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp @@ -261,7 +261,9 @@ QXcbClipboard::~QXcbClipboard() connection()->sync(); // waiting until the clipboard manager fetches the content. - if (!waitForClipboardEvent(m_owner, XCB_SELECTION_NOTIFY, true)) { + if (auto event = waitForClipboardEvent(m_owner, XCB_SELECTION_NOTIFY, true)) { + free(event); + } else { qWarning("QXcbClipboard: Unable to receive an event from the " "clipboard manager in a reasonable time"); } @@ -838,6 +840,7 @@ QByteArray QXcbClipboard::clipboardReadIncrementalProperty(xcb_window_t win, xcb if (!ge) break; xcb_property_notify_event_t *event = (xcb_property_notify_event_t *)ge; + QScopedPointer guard(event); if (event->atom != property || event->state != XCB_PROPERTY_NEW_VALUE @@ -869,8 +872,6 @@ QByteArray QXcbClipboard::clipboardReadIncrementalProperty(xcb_window_t win, xcb } else { break; } - - free(ge); } // timed out ... create a new requestor window, otherwise the requestor From b22c4e593b99675a641fd6403a70ad9974b02508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sat, 24 Nov 2018 22:50:16 +0100 Subject: [PATCH 24/73] CoreText: Localize getTraitValue helper function It's only used in a single function (twice), so let's keep it closer to the call site. Change-Id: I7f8ceadc380171237eef3fa6b03ccd6bc89e99af Reviewed-by: Simon Hausmann --- .../fontdatabases/mac/qfontengine_coretext.mm | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 0430e79bac..c00b9c3d46 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -155,17 +155,6 @@ static void loadAdvancesForGlyphs(CTFontRef ctfont, } } -static float getTraitValue(CFDictionaryRef allTraits, CFStringRef trait) -{ - if (CFDictionaryContainsKey(allTraits, trait)) { - CFNumberRef traitNum = (CFNumberRef) CFDictionaryGetValue(allTraits, trait); - float v = 0; - CFNumberGetValue(traitNum, kCFNumberFloatType, &v); - return v; - } - return 0; -} - int QCoreTextFontEngine::antialiasingThreshold = 0; QFontEngine::GlyphFormat QCoreTextFontEngine::defaultGlyphFormat = QFontEngine::Format_A32; @@ -277,6 +266,16 @@ void QCoreTextFontEngine::init() if (traits & kCTFontItalicTrait) fontDef.style = QFont::StyleItalic; + static const auto getTraitValue = [](CFDictionaryRef allTraits, CFStringRef trait) -> float { + if (CFDictionaryContainsKey(allTraits, trait)) { + CFNumberRef traitNum = (CFNumberRef) CFDictionaryGetValue(allTraits, trait); + float v = 0; + CFNumberGetValue(traitNum, kCFNumberFloatType, &v); + return v; + } + return 0; + }; + CFDictionaryRef allTraits = CTFontCopyTraits(ctfont); fontDef.weight = QCoreTextFontEngine::qtWeightFromCFWeight(getTraitValue(allTraits, kCTFontWeightTrait)); int slant = static_cast(getTraitValue(allTraits, kCTFontSlantTrait) * 500 + 500); From 9dd2048c1a11b29f0e16a7906e216133201d24db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sat, 24 Nov 2018 23:15:07 +0100 Subject: [PATCH 25/73] CoreText: Simplify and share code for loading glyph advances The function doesn't need the flags argument, nor does it need the ctfont or fontdef arguments if it's a normal const member function. It can also be used from QCoreTextFontEngine::stringToCMap(), instead of duplicating the code. This was originally the case before b4aa5d97 which improved surrogate pair handling, but for some reason the change introduced the duplicate code instead of just changing the arguments in the function call slightly. The use of 0xff000000 to skip certain glyphs looks dubious, and is probably related to QFontEngineMulti's use of the high byte to indicate which engine the glyph came from, but the multi engine strips this away before calling out to the concrete engine so it could potentially be removed in a later patch. Change-Id: I6c693595616da1b69fdbe3d7a31e392a8443369d Reviewed-by: Simon Hausmann --- .../fontdatabases/mac/qfontengine_coretext.mm | 65 +++++++------------ .../mac/qfontengine_coretext_p.h | 2 + 2 files changed, 27 insertions(+), 40 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index c00b9c3d46..a58ea71b19 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -133,28 +133,6 @@ QFont::Weight QCoreTextFontEngine::qtWeightFromCFWeight(float value) return ret; } -static void loadAdvancesForGlyphs(CTFontRef ctfont, - QVarLengthArray &cgGlyphs, - QGlyphLayout *glyphs, int len, - QFontEngine::ShaperFlags flags, - const QFontDef &fontDef) -{ - Q_UNUSED(flags); - QVarLengthArray advances(len); - CTFontGetAdvancesForGlyphs(ctfont, kCTFontOrientationHorizontal, cgGlyphs.data(), advances.data(), len); - - for (int i = 0; i < len; ++i) { - if (glyphs->glyphs[i] & 0xff000000) - continue; - glyphs->advances[i] = QFixed::fromReal(advances[i].width); - } - - if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { - for (int i = 0; i < len; ++i) - glyphs->advances[i] = glyphs->advances[i].round(); - } -} - int QCoreTextFontEngine::antialiasingThreshold = 0; QFontEngine::GlyphFormat QCoreTextFontEngine::defaultGlyphFormat = QFontEngine::Format_A32; @@ -360,22 +338,9 @@ bool QCoreTextFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout * *nglyphs = glyph_pos; glyphs->numGlyphs = glyph_pos; - if (flags & GlyphIndicesOnly) - return true; + if (!(flags & GlyphIndicesOnly)) + loadAdvancesForGlyphs(cgGlyphs, glyphs); - QVarLengthArray advances(glyph_pos); - CTFontGetAdvancesForGlyphs(ctfont, kCTFontOrientationHorizontal, cgGlyphs.data(), advances.data(), glyph_pos); - - for (int i = 0; i < glyph_pos; ++i) { - if (glyphs->glyphs[i] & 0xff000000) - continue; - glyphs->advances[i] = QFixed::fromReal(advances[i].width); - } - - if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { - for (int i = 0; i < glyph_pos; ++i) - glyphs->advances[i] = glyphs->advances[i].round(); - } return true; } @@ -801,17 +766,37 @@ QImage QCoreTextFontEngine::bitmapForGlyph(glyph_t glyph, QFixed subPixelPositio void QCoreTextFontEngine::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFlags flags) const { - int i, numGlyphs = glyphs->numGlyphs; + Q_UNUSED(flags); + + const int numGlyphs = glyphs->numGlyphs; QVarLengthArray cgGlyphs(numGlyphs); - for (i = 0; i < numGlyphs; ++i) { + for (int i = 0; i < numGlyphs; ++i) { if (glyphs->glyphs[i] & 0xff000000) cgGlyphs[i] = 0; else cgGlyphs[i] = glyphs->glyphs[i]; } - loadAdvancesForGlyphs(ctfont, cgGlyphs, glyphs, numGlyphs, flags, fontDef); + loadAdvancesForGlyphs(cgGlyphs, glyphs); +} + +void QCoreTextFontEngine::loadAdvancesForGlyphs(QVarLengthArray &cgGlyphs, QGlyphLayout *glyphs) const +{ + const int numGlyphs = glyphs->numGlyphs; + QVarLengthArray advances(numGlyphs); + CTFontGetAdvancesForGlyphs(ctfont, kCTFontOrientationHorizontal, cgGlyphs.data(), advances.data(), numGlyphs); + + for (int i = 0; i < numGlyphs; ++i) { + if (glyphs->glyphs[i] & 0xff000000) + continue; + glyphs->advances[i] = QFixed::fromReal(advances[i].width); + } + + if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { + for (int i = 0; i < numGlyphs; ++i) + glyphs->advances[i] = glyphs->advances[i].round(); + } } QFontEngine::FaceId QCoreTextFontEngine::faceId() const diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index b77aaa27c1..f4213a2ffa 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -128,6 +128,8 @@ public: protected: void init(); QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, bool colorful, const QTransform &m); + void loadAdvancesForGlyphs(QVarLengthArray &cgGlyphs, QGlyphLayout *glyphs) const; + CTFontRef ctfont; CGFontRef cgFont; int synthesisFlags; From 61a94d2d046c1448ba4c66dfc8e0246286bab14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sat, 24 Nov 2018 23:42:32 +0100 Subject: [PATCH 26/73] CoreText: Share code by using delegate constructor Change-Id: If3d5d533f98552335517ef61cb748d0117fe3053 Reviewed-by: Simon Hausmann --- .../fontdatabases/mac/qfontengine_coretext.mm | 15 +++++++++------ .../fontdatabases/mac/qfontengine_coretext_p.h | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index a58ea71b19..b5e4359caf 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -190,10 +190,8 @@ QCoreTextFontEngine *QCoreTextFontEngine::create(const QByteArray &fontData, qre } QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def) - : QFontEngine(Mac) + : QCoreTextFontEngine(def) { - fontDef = def; - transform = qt_transform_from_fontdef(fontDef); ctfont = font; CFRetain(ctfont); cgFont = CTFontCopyGraphicsFont(font, NULL); @@ -201,10 +199,8 @@ QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def) } QCoreTextFontEngine::QCoreTextFontEngine(CGFontRef font, const QFontDef &def) - : QFontEngine(Mac) + : QCoreTextFontEngine(def) { - fontDef = def; - transform = qt_transform_from_fontdef(fontDef); cgFont = font; // Keep reference count balanced CFRetain(cgFont); @@ -212,6 +208,13 @@ QCoreTextFontEngine::QCoreTextFontEngine(CGFontRef font, const QFontDef &def) init(); } +QCoreTextFontEngine::QCoreTextFontEngine(const QFontDef &def) + : QFontEngine(Mac) +{ + fontDef = def; + transform = qt_transform_from_fontdef(fontDef); +} + QCoreTextFontEngine::~QCoreTextFontEngine() { CFRelease(cgFont); diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index f4213a2ffa..33c3c0cd40 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -126,6 +126,7 @@ public: static QCoreTextFontEngine *create(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference); protected: + QCoreTextFontEngine(const QFontDef &def); void init(); QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, bool colorful, const QTransform &m); void loadAdvancesForGlyphs(QVarLengthArray &cgGlyphs, QGlyphLayout *glyphs) const; From d3ec5a2b09f3c9f5a67e757aa6b7b0dd09bbe97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 25 Nov 2018 00:41:00 +0100 Subject: [PATCH 27/73] CoreText: Use QCFType to track CoreFoundation member variables The operator T() function of QAppleRefCounted should be const so that the underlying type can be accessed from const member functions just like the naked underlying type could. Change-Id: I0819c5795d28442a6ff4db2732e211b183574f9f Reviewed-by: Simon Hausmann --- src/corelib/kernel/qcore_mac_p.h | 2 +- .../fontdatabases/mac/qfontengine_coretext.mm | 19 +++++++------------ .../mac/qfontengine_coretext_p.h | 4 ++-- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h index b14a494296..acb87f8a3c 100644 --- a/src/corelib/kernel/qcore_mac_p.h +++ b/src/corelib/kernel/qcore_mac_p.h @@ -89,7 +89,7 @@ public: QAppleRefCounted(QAppleRefCounted &&other) : value(other.value) { other.value = T(); } QAppleRefCounted(const QAppleRefCounted &other) : value(other.value) { if (value) RetainFunction(value); } ~QAppleRefCounted() { if (value) ReleaseFunction(value); } - operator T() { return value; } + operator T() const { return value; } void swap(QAppleRefCounted &other) Q_DECL_NOEXCEPT_EXPR(noexcept(qSwap(value, other.value))) { qSwap(value, other.value); } QAppleRefCounted &operator=(const QAppleRefCounted &other) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index b5e4359caf..2fba47d5dd 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -192,19 +192,16 @@ QCoreTextFontEngine *QCoreTextFontEngine::create(const QByteArray &fontData, qre QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def) : QCoreTextFontEngine(def) { - ctfont = font; - CFRetain(ctfont); - cgFont = CTFontCopyGraphicsFont(font, NULL); + ctfont = QCFType::constructFromGet(font); + cgFont = CTFontCopyGraphicsFont(font, nullptr); init(); } QCoreTextFontEngine::QCoreTextFontEngine(CGFontRef font, const QFontDef &def) : QCoreTextFontEngine(def) { - cgFont = font; - // Keep reference count balanced - CFRetain(cgFont); - ctfont = CTFontCreateWithGraphicsFont(font, fontDef.pixelSize, &transform, NULL); + cgFont = QCFType::constructFromGet(font); + ctfont = CTFontCreateWithGraphicsFont(font, fontDef.pixelSize, &transform, nullptr); init(); } @@ -217,14 +214,12 @@ QCoreTextFontEngine::QCoreTextFontEngine(const QFontDef &def) QCoreTextFontEngine::~QCoreTextFontEngine() { - CFRelease(cgFont); - CFRelease(ctfont); } void QCoreTextFontEngine::init() { - Q_ASSERT(ctfont != NULL); - Q_ASSERT(cgFont != NULL); + Q_ASSERT(ctfont); + Q_ASSERT(cgFont); face_id.index = 0; QCFString name = CTFontCopyName(ctfont, kCTFontUniqueNameKey); @@ -856,7 +851,7 @@ QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const Qt::HANDLE QCoreTextFontEngine::handle() const { - return (Qt::HANDLE)ctfont; + return (Qt::HANDLE)(static_cast(ctfont)); } bool QCoreTextFontEngine::supportsTransformation(const QTransform &transform) const diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index 33c3c0cd40..7ed2faff8e 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -131,8 +131,8 @@ protected: QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, bool colorful, const QTransform &m); void loadAdvancesForGlyphs(QVarLengthArray &cgGlyphs, QGlyphLayout *glyphs) const; - CTFontRef ctfont; - CGFontRef cgFont; + QCFType ctfont; + QCFType cgFont; int synthesisFlags; CGAffineTransform transform; QFixed avgCharWidth; From 17cdb28ed5f68eea42e544a71c81b920b56baaf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 25 Nov 2018 13:58:49 +0100 Subject: [PATCH 28/73] macOS: Fix use of deprecated enum value Change-Id: Ibf979837e1adcadcbb100d059b06b1a48157eab6 Reviewed-by: Simon Hausmann --- src/gui/painting/qcoregraphics.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm index 2249859c43..d45da14767 100644 --- a/src/gui/painting/qcoregraphics.mm +++ b/src/gui/painting/qcoregraphics.mm @@ -153,7 +153,7 @@ QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size) return QPixmap(); [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext setCurrentContext:gc]; - [image drawInRect:iconRect fromRect:iconRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil]; + [image drawInRect:iconRect fromRect:iconRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil]; [NSGraphicsContext restoreGraphicsState]; return pixmap; } From 5fd6f4d8824b51cfdb05b4dd918db04941366ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 25 Nov 2018 14:00:58 +0100 Subject: [PATCH 29/73] CoreText: Use QCFType instead of manual release/retain Change-Id: I4925ec0e563e784f542fd44706a214771c6abd2b Reviewed-by: Simon Hausmann --- .../fontdatabases/mac/qfontengine_coretext.mm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 2fba47d5dd..fbd2f81b19 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -252,12 +252,11 @@ void QCoreTextFontEngine::init() return 0; }; - CFDictionaryRef allTraits = CTFontCopyTraits(ctfont); + QCFType allTraits = CTFontCopyTraits(ctfont); fontDef.weight = QCoreTextFontEngine::qtWeightFromCFWeight(getTraitValue(allTraits, kCTFontWeightTrait)); int slant = static_cast(getTraitValue(allTraits, kCTFontSlantTrait) * 500 + 500); if (slant > 500 && !(traits & kCTFontItalicTrait)) fontDef.style = QFont::StyleOblique; - CFRelease(allTraits); if (fontDef.weight >= QFont::Bold && !(traits & kCTFontBoldTrait)) synthesisFlags |= SynthesizedBold; @@ -647,13 +646,13 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition #endif im.fill(0); // Faster than Qt::black - CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); + QCFType colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); uint cgflags = isColorGlyph ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst; #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version cgflags |= kCGBitmapByteOrder32Host; #endif - CGContextRef ctx = CGBitmapContextCreate(im.bits(), im.width(), im.height(), + QCFType ctx = CGBitmapContextCreate(im.bits(), im.width(), im.height(), 8, im.bytesPerLine(), colorspace, cgflags); Q_ASSERT(ctx); @@ -706,9 +705,6 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition CTFontDrawGlyphs(ctfont, &cgGlyph, &CGPointZero, 1, ctx); } - CGContextRelease(ctx); - CGColorSpaceRelease(colorspace); - #if defined(Q_OS_MACOS) if (blackOnWhiteGlyphs) im.invertPixels(); From 09e3457541c54b084365bfb77ad58474f0666374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 25 Nov 2018 14:09:00 +0100 Subject: [PATCH 30/73] macOS: Share code for resolving CGImage bitmapInfor for a QImage Removes assumptions about QImage format in a few places. Change-Id: I515701be53190429a48956c31986fa0804806406 Reviewed-by: Simon Hausmann --- src/gui/image/qimage_darwin.mm | 29 ++--------- src/gui/painting/qcoregraphics.mm | 48 +++++++++++++------ src/gui/painting/qcoregraphics_p.h | 2 + .../fontdatabases/mac/qfontengine_coretext.mm | 9 +--- 4 files changed, 41 insertions(+), 47 deletions(-) diff --git a/src/gui/image/qimage_darwin.mm b/src/gui/image/qimage_darwin.mm index a5c391ad21..7ca1a0869a 100644 --- a/src/gui/image/qimage_darwin.mm +++ b/src/gui/image/qimage_darwin.mm @@ -40,6 +40,7 @@ #include "qimage.h" #include +#include #import #import @@ -98,32 +99,10 @@ CGImageRef QImage::toCGImage() const if (isNull()) return nil; - // Determine the target native format - uint cgflags = kCGImageAlphaNone; - switch (format()) { - case QImage::Format_ARGB32: - cgflags = kCGImageAlphaFirst | kCGBitmapByteOrder32Host; - break; - case QImage::Format_RGB32: - cgflags = kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host; - break; - case QImage::Format_RGBA8888_Premultiplied: - cgflags = kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big; - break; - case QImage::Format_RGBA8888: - cgflags = kCGImageAlphaLast | kCGBitmapByteOrder32Big; - break; - case QImage::Format_RGBX8888: - cgflags = kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Big; - break; - case QImage::Format_ARGB32_Premultiplied: - cgflags = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host; - break; - default: break; - } + CGBitmapInfo bitmapInfo = qt_mac_bitmapInfoForImage(*this); // Format not supported: return nil CGImageRef - if (cgflags == kCGImageAlphaNone) + if (bitmapInfo == kCGImageAlphaNone) return nil; // Create a data provider that owns a copy of the QImage and references the image data. @@ -140,7 +119,7 @@ CGImageRef QImage::toCGImage() const const bool shouldInterpolate = false; return CGImageCreate(width(), height(), bitsPerComponent, bitsPerPixel, - this->bytesPerLine(), colorSpace, cgflags, dataProvider, + this->bytesPerLine(), colorSpace, bitmapInfo, dataProvider, decode, shouldInterpolate, kCGRenderingIntentDefault); } diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm index d45da14767..53066687d3 100644 --- a/src/gui/painting/qcoregraphics.mm +++ b/src/gui/painting/qcoregraphics.mm @@ -51,6 +51,33 @@ QT_BEGIN_NAMESPACE // ---------------------- Images ---------------------- +CGBitmapInfo qt_mac_bitmapInfoForImage(const QImage &image) +{ + CGBitmapInfo bitmapInfo = kCGImageAlphaNone; + switch (image.format()) { + case QImage::Format_ARGB32: + bitmapInfo = kCGImageAlphaFirst | kCGBitmapByteOrder32Host; + break; + case QImage::Format_RGB32: + bitmapInfo = kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host; + break; + case QImage::Format_RGBA8888_Premultiplied: + bitmapInfo = kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big; + break; + case QImage::Format_RGBA8888: + bitmapInfo = kCGImageAlphaLast | kCGBitmapByteOrder32Big; + break; + case QImage::Format_RGBX8888: + bitmapInfo = kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Big; + break; + case QImage::Format_ARGB32_Premultiplied: + bitmapInfo = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host; + break; + default: break; + } + return bitmapInfo; +} + CGImageRef qt_mac_toCGImage(const QImage &inImage) { CGImageRef cgImage = inImage.toCGImage(); @@ -362,13 +389,10 @@ QMacCGContext::QMacCGContext(QPaintDevice *paintDevice) : context(0) if (!image) return; // Context type not supported. - CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); - uint flags = kCGImageAlphaPremultipliedFirst; - flags |= kCGBitmapByteOrder32Host; + QCFType colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); + context = CGBitmapContextCreate(image->bits(), image->width(), image->height(), 8, + image->bytesPerLine(), colorSpace, qt_mac_bitmapInfoForImage(*image)); - context = CGBitmapContextCreate(image->bits(), image->width(), image->height(), - 8, image->bytesPerLine(), colorSpace, flags); - CFRelease(colorSpace); CGContextTranslateCTM(context, 0, image->height()); const qreal devicePixelRatio = paintDevice->devicePixelRatioF(); CGContextScaleCTM(context, devicePixelRatio, devicePixelRatio); @@ -396,16 +420,10 @@ QMacCGContext::QMacCGContext(QPainter *painter) : context(0) devType == QInternal::Pixmap || devType == QInternal::Image)) { - CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); - uint flags = kCGImageAlphaPremultipliedFirst; -#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version - flags |= kCGBitmapByteOrder32Host; -#endif const QImage *image = static_cast(paintEngine->paintDevice()); - - context = CGBitmapContextCreate((void *)image->bits(), image->width(), image->height(), - 8, image->bytesPerLine(), colorSpace, flags); - CFRelease(colorSpace); + QCFType colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); + context = CGBitmapContextCreate((void *)image->bits(), image->width(), image->height(), 8, + image->bytesPerLine(), colorSpace, qt_mac_bitmapInfoForImage(*image)); // Invert y axis CGContextTranslateCTM(context, 0, image->height()); diff --git a/src/gui/painting/qcoregraphics_p.h b/src/gui/painting/qcoregraphics_p.h index de721c94aa..868c2b08b5 100644 --- a/src/gui/painting/qcoregraphics_p.h +++ b/src/gui/painting/qcoregraphics_p.h @@ -64,6 +64,8 @@ QT_BEGIN_NAMESPACE +Q_GUI_EXPORT CGBitmapInfo qt_mac_bitmapInfoForImage(const QImage &image); + #ifdef HAVE_APPKIT Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QPixmap &pm); Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QIcon &icon, int defaultSize = 0); diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index fbd2f81b19..e4ee0c0ac4 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -45,7 +45,7 @@ #include #endif #include - +#include #include #include @@ -647,14 +647,9 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition im.fill(0); // Faster than Qt::black QCFType colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); - uint cgflags = isColorGlyph ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst; -#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version - cgflags |= kCGBitmapByteOrder32Host; -#endif - QCFType ctx = CGBitmapContextCreate(im.bits(), im.width(), im.height(), 8, im.bytesPerLine(), colorspace, - cgflags); + qt_mac_bitmapInfoForImage(im)); Q_ASSERT(ctx); CGContextSetFontSize(ctx, fontDef.pixelSize); const bool antialias = (aa || fontDef.pointSize > antialiasingThreshold) && !(fontDef.styleStrategy & QFont::NoAntialias); From 1f998e040eb7202691f4a4eb5fb77499247b2aab Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 27 Nov 2018 09:39:56 +0100 Subject: [PATCH 31/73] Fix crash in qmake parsing The read from a QHash needs to be protected too if other threads are writing. sync-up with qtc, no actual effect on qmake itself. Fixes: QTCREATORBUG-21416 Change-Id: I75e5634e11b10056d6dbb6fdceef482ca2222ca1 Reviewed-by: Allan Sandfeld Jensen (cherry picked from qtcreator/5f79b5d2e5e33321cdcd00362f0d6d9442a73ec2) Reviewed-by: Oswald Buddenhagen --- qmake/library/qmakevfs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmake/library/qmakevfs.cpp b/qmake/library/qmakevfs.cpp index 9fd6ae470c..1f77595535 100644 --- a/qmake/library/qmakevfs.cpp +++ b/qmake/library/qmakevfs.cpp @@ -109,10 +109,10 @@ int QMakeVfs::idForFileName(const QString &fn, VfsFlags flags) return id; } #endif - if (!(flags & VfsAccessedOnly)) { #ifdef PROPARSER_THREAD_SAFE - QMutexLocker locker(&s_mutex); + QMutexLocker locker(&s_mutex); #endif + if (!(flags & VfsAccessedOnly)) { int &id = s_fileIdMap[fn]; if (!id) { id = ++s_fileIdCounter; From d4e3442fdbb98b5c635448031ff9958819a46bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 25 Nov 2018 15:59:04 +0100 Subject: [PATCH 32/73] CoreText: Modernize font smoothing and antialiasing threshold detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The way macOS does font smoothing has changed in Mojave, and we need to take both this new algorithm into account, as well as support users who set legacy preferences to revert back to subpixel font smoothing. As a followup to this patch we will tweak some of the existing logic to take the new font smoothing algorithm into account, so this is just a first step. Change-Id: If37014c18515f406b8bb8194c9df7a75c2eb10fc Reviewed-by: Simon Hausmann Reviewed-by: Tor Arne Vestbø Reviewed-by: Allan Sandfeld Jensen --- .../mac/qcoretextfontdatabase.mm | 65 --------- .../fontdatabases/mac/qfontengine_coretext.mm | 125 +++++++++++++++++- .../mac/qfontengine_coretext_p.h | 15 ++- .../platforms/cocoa/qpaintengine_mac.mm | 2 +- 4 files changed, 132 insertions(+), 75 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index 3718ebdda6..ba23271e55 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -117,71 +117,6 @@ static NSInteger languageMapSort(id obj1, id obj2, void *context) QCoreTextFontDatabase::QCoreTextFontDatabase() : m_hasPopulatedAliases(false) { -#ifdef Q_OS_MACX - /* - font_smoothing = 0 means no smoothing, while 1-3 means subpixel - antialiasing with different hinting styles (but we don't care about the - exact value, only if subpixel rendering is available or not) - */ - int font_smoothing = 0; - -#if QT_CONFIG(settings) - QSettings appleSettings(QLatin1String("apple.com")); - QVariant appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold")); - if (appleValue.isValid()) - QCoreTextFontEngine::antialiasingThreshold = appleValue.toInt(); - - appleValue = appleSettings.value(QLatin1String("AppleFontSmoothing")); - if (appleValue.isValid()) { - font_smoothing = appleValue.toInt(); - } else -#endif // settings - { - // non-Apple displays do not provide enough information about subpixel rendering so - // draw text with cocoa and compare pixel colors to see if subpixel rendering is enabled - int w = 10; - int h = 10; - NSRect rect = NSMakeRect(0.0, 0.0, w, h); - NSImage *fontImage = [[NSImage alloc] initWithSize:NSMakeSize(w, h)]; - - [fontImage lockFocus]; - - [[NSColor whiteColor] setFill]; - NSRectFill(rect); - - NSString *str = @"X\\"; - NSFont *font = [NSFont fontWithName:@"Helvetica" size:10.0]; - NSMutableDictionary *attrs = [NSMutableDictionary dictionary]; - [attrs setObject:font forKey:NSFontAttributeName]; - [attrs setObject:[NSColor blackColor] forKey:NSForegroundColorAttributeName]; - - [str drawInRect:rect withAttributes:attrs]; - - NSBitmapImageRep *nsBitmapImage = [[NSBitmapImageRep alloc] initWithFocusedViewRect:rect]; - - [fontImage unlockFocus]; - - float red, green, blue; - for (int x = 0; x < w; x++) { - for (int y = 0; y < h; y++) { - NSColor *pixelColor = [nsBitmapImage colorAtX:x y:y]; - red = [pixelColor redComponent]; - green = [pixelColor greenComponent]; - blue = [pixelColor blueComponent]; - if (red != green || red != blue) - font_smoothing = 1; - } - } - - [nsBitmapImage release]; - [fontImage release]; - } - QCoreTextFontEngine::defaultGlyphFormat = (font_smoothing > 0 - ? QFontEngine::Format_A32 - : QFontEngine::Format_A8); -#else - QCoreTextFontEngine::defaultGlyphFormat = QFontEngine::Format_A8; -#endif } QCoreTextFontDatabase::~QCoreTextFontDatabase() diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index e4ee0c0ac4..d939ee1b24 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -85,6 +85,8 @@ QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") + static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f); bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length) @@ -133,9 +135,6 @@ QFont::Weight QCoreTextFontEngine::qtWeightFromCFWeight(float value) return ret; } -int QCoreTextFontEngine::antialiasingThreshold = 0; -QFontEngine::GlyphFormat QCoreTextFontEngine::defaultGlyphFormat = QFontEngine::Format_A32; - CGAffineTransform qt_transform_from_fontdef(const QFontDef &fontDef) { CGAffineTransform transform = CGAffineTransformIdentity; @@ -236,8 +235,10 @@ void QCoreTextFontEngine::init() if (traits & kCTFontColorGlyphsTrait) glyphFormat = QFontEngine::Format_ARGB; + else if (fontSmoothing() == FontSmoothing::Subpixel) + glyphFormat = QFontEngine::Format_A32; else - glyphFormat = defaultGlyphFormat; + glyphFormat = QFontEngine::Format_A8; if (traits & kCTFontItalicTrait) fontDef.style = QFont::StyleItalic; @@ -520,7 +521,7 @@ static void convertCGPathToQPainterPath(void *info, const CGPathElement *element myInfo->path->closeSubpath(); break; default: - qDebug() << "Unhandled path transform type: " << element->type; + qCWarning(lcQpaFonts) << "Unhandled path transform type: " << element->type; } } @@ -608,6 +609,118 @@ glyph_metrics_t QCoreTextFontEngine::alphaMapBoundingBox(glyph_t glyph, QFixed s return br; } +int QCoreTextFontEngine::antialiasingThreshold() +{ + static const int antialiasingThreshold = [] { + auto defaults = [NSUserDefaults standardUserDefaults]; + int threshold = [defaults integerForKey:@"AppleAntiAliasingThreshold"]; + qCDebug(lcQpaFonts) << "Resolved antialiasing threshold. Defaults =" + << [[defaults dictionaryRepresentation] dictionaryWithValuesForKeys:@[ + @"AppleAntiAliasingThreshold" + ]] << "Result =" << threshold; + return threshold; + }(); + return antialiasingThreshold; +} + +/* + Apple has gone through many iterations of its font smoothing algorithms, + and there are many ways to enable or disable certain aspects of it. As + keeping up with all the different toggles and behavior differences between + macOS versions is tricky, we resort to rendering a single glyph in a few + configurations, picking up the font smoothing algorithm from the observed + result. + + The possible values are: + + - Disabled: No font smoothing is applied. + + Possibly triggered by the user unchecking the "Use font smoothing when + available" checkbox in the system preferences or setting AppleFontSmoothing + to 0. Also controlled by the CGContextSetAllowsFontSmoothing() API, + which gets its default from the settings above. This API overrides + the more granular CGContextSetShouldSmoothFonts(), which we use to + enable (request) or disable font smoothing. + + Note that this does not exclude normal antialiasing, controlled by + the CGContextSetShouldAntialias() API. + + - Subpixel: Font smoothing is applied, and affects subpixels. + + This was the default mode on macOS versions prior to 10.14 (Mojave). + The font dilation (stem darkening) parameters were controlled by the + AppleFontSmoothing setting, ranging from 1 to 3 (light to strong). + + On Mojave it is no longer supported, but can be triggered by a legacy + override (CGFontRenderingFontSmoothingDisabled=NO), so we need to + still account for it, otherwise users will have a bad time. + + - Grayscale: Font smoothing is applied, but does not affect subpixels. + + This is the default mode on macOS 10.14 (Mojave). The font dilation + (stem darkening) parameters are not affected by the AppleFontSmoothing + setting, but are instead computed based on the fill color used when + drawing the glyphs (white fill gives a lighter dilation than black + fill). This affects how we build our glyph cache, since we produce + alpha maps by drawing white on black. +*/ +QCoreTextFontEngine::FontSmoothing QCoreTextFontEngine::fontSmoothing() +{ + static const FontSmoothing cachedFontSmoothing = [] { + static const int kSize = 10; + QCFType font = CTFontCreateWithName(CFSTR("Helvetica"), kSize, nullptr); + + UniChar character('X'); CGGlyph glyph; + CTFontGetGlyphsForCharacters(font, &character, &glyph, 1); + + auto drawGlyph = [&](bool smooth) -> QImage { + QImage image(kSize, kSize, QImage::Format_RGB32); + image.fill(0); + + QMacCGContext ctx(&image); + CGContextSetTextDrawingMode(ctx, kCGTextFill); + CGContextSetGrayFillColor(ctx, 1, 1); + + // Will be ignored if CGContextSetAllowsFontSmoothing() has been + // set to false by CoreGraphics based on user defaults. + CGContextSetShouldSmoothFonts(ctx, smooth); + + CTFontDrawGlyphs(font, &glyph, &CGPointZero, 1, ctx); + return image; + }; + + QImage nonSmoothed = drawGlyph(false); + QImage smoothed = drawGlyph(true); + + FontSmoothing fontSmoothing = FontSmoothing::Disabled; + [&] { + for (int x = 0; x < kSize; ++x) { + for (int y = 0; y < kSize; ++y) { + QRgb sp = smoothed.pixel(x, y); + if (qRed(sp) != qGreen(sp) || qRed(sp) != qBlue(sp)) { + fontSmoothing = FontSmoothing::Subpixel; + return; + } + + if (sp != nonSmoothed.pixel(x, y)) + fontSmoothing = FontSmoothing::Grayscale; + } + } + }(); + + auto defaults = [NSUserDefaults standardUserDefaults]; + qCDebug(lcQpaFonts) << "Resolved font smoothing algorithm. Defaults =" + << [[defaults dictionaryRepresentation] dictionaryWithValuesForKeys:@[ + @"AppleFontSmoothing", + @"CGFontRenderingFontSmoothingDisabled" + ]] << "Result =" << fontSmoothing; + + return fontSmoothing; + }(); + + return cachedFontSmoothing; +} + bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const { // Only works well when font-smoothing is enabled @@ -652,7 +765,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition qt_mac_bitmapInfoForImage(im)); Q_ASSERT(ctx); CGContextSetFontSize(ctx, fontDef.pixelSize); - const bool antialias = (aa || fontDef.pointSize > antialiasingThreshold) && !(fontDef.styleStrategy & QFont::NoAntialias); + const bool antialias = (aa || fontDef.pointSize > antialiasingThreshold()) && !(fontDef.styleStrategy & QFont::NoAntialias); CGContextSetShouldAntialias(ctx, antialias); const bool smoothing = antialias && !(fontDef.styleStrategy & QFont::NoSubpixelAntialias); CGContextSetShouldSmoothFonts(ctx, smoothing); diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index 7ed2faff8e..2ce46a4706 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -53,6 +53,7 @@ #include #include +#include #ifdef Q_OS_OSX #include @@ -63,8 +64,12 @@ QT_BEGIN_NAMESPACE +Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) + class QCoreTextFontEngine : public QFontEngine { + Q_GADGET + public: QCoreTextFontEngine(CTFontRef font, const QFontDef &def); QCoreTextFontEngine(CGFontRef font, const QFontDef &def); @@ -118,13 +123,17 @@ public: QFontEngine::Properties properties() const override; + enum FontSmoothing { Disabled, Subpixel, Grayscale }; + Q_ENUM(FontSmoothing); + + static FontSmoothing fontSmoothing(); + static int antialiasingThreshold(); + static bool ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length); static QFont::Weight qtWeightFromCFWeight(float value); - static int antialiasingThreshold; - static QFontEngine::GlyphFormat defaultGlyphFormat; - static QCoreTextFontEngine *create(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference); + protected: QCoreTextFontEngine(const QFontDef &def); void init(); diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm index 5c880b1cad..69e7a92234 100644 --- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm @@ -914,7 +914,7 @@ void QCoreGraphicsPaintEngine::drawTextItem(const QPointF &pos, const QTextItem QFontEngine *fe = ti.fontEngine; const bool textAA = ((state->renderHints() & QPainter::TextAntialiasing) - && (fe->fontDef.pointSize > QCoreTextFontEngine::antialiasingThreshold) + && (fe->fontDef.pointSize > QCoreTextFontEngine::antialiasingThreshold()) && !(fe->fontDef.styleStrategy & QFont::NoAntialias)); const bool lineAA = state->renderHints() & QPainter::Antialiasing; if (textAA != lineAA) From 6b93b01ad6dfb5b0b2f067462690bdf14668f96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 25 Nov 2018 16:22:30 +0100 Subject: [PATCH 33/73] CoreText: Add helper function to determine if a font has color glyphs Makes for clearer code than looking at the glyph format. Change-Id: Id6dd2a7851aac2a42cc27d9e2fb408ce9a5345d3 Reviewed-by: Simon Hausmann Reviewed-by: Allan Sandfeld Jensen --- .../fontdatabases/mac/qfontengine_coretext.mm | 16 ++++++++++------ .../fontdatabases/mac/qfontengine_coretext_p.h | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index d939ee1b24..91d3d811b5 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -433,6 +433,11 @@ qreal QCoreTextFontEngine::maxCharWidth() const return bb.xoff.toReal(); } +bool QCoreTextFontEngine::hasColorGlyphs() const +{ + return glyphFormat == QFontEngine::Format_ARGB; +} + void QCoreTextFontEngine::draw(CGContextRef ctx, qreal x, qreal y, const QTextItemInt &ti, int paintDeviceHeight) { QVarLengthArray positions; @@ -529,7 +534,7 @@ static void convertCGPathToQPainterPath(void *info, const CGPathElement *element void QCoreTextFontEngine::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nGlyphs, QPainterPath *path, QTextItem::RenderFlags) { - if (glyphFormat == QFontEngine::Format_ARGB) + if (hasColorGlyphs()) return; // We can't convert color-glyphs to path CGAffineTransform cgMatrix = CGAffineTransformIdentity; @@ -731,8 +736,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition { glyph_metrics_t br = alphaMapBoundingBox(glyph, subPixelPosition, matrix, glyphFormat); - bool isColorGlyph = glyphFormat == QFontEngine::Format_ARGB; - QImage::Format imageFormat = isColorGlyph ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32; + QImage::Format imageFormat = hasColorGlyphs() ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32; QImage im(br.width.ceil().toInt(), br.height.ceil().toInt(), imageFormat); if (!im.width() || !im.height()) return im; @@ -751,7 +755,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition if (!qt_mac_applicationIsInDarkMode()) glyphColor = CGColorGetConstantColor(kCGColorBlack); } - const bool blackOnWhiteGlyphs = !isColorGlyph + const bool blackOnWhiteGlyphs = !hasColorGlyphs() && CGColorEqualToColor(glyphColor, CGColorGetConstantColor(kCGColorBlack)); if (blackOnWhiteGlyphs) im.fill(Qt::white); @@ -775,7 +779,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition if (synthesisFlags & QFontEngine::SynthesizedItalic) cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, SYNTHETIC_ITALIC_SKEW, 1, 0, 0)); - if (!isColorGlyph) // CTFontDrawGlyphs incorporates the font's matrix already + if (!hasColorGlyphs()) // CTFontDrawGlyphs incorporates the font's matrix already cgMatrix = CGAffineTransformConcat(cgMatrix, transform); if (matrix.isScaling()) @@ -785,7 +789,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition qreal pos_x = -br.x.truncate() + subPixelPosition.toReal(); qreal pos_y = im.height() + br.y.toReal(); - if (!isColorGlyph) { + if (!hasColorGlyphs()) { CGContextSetTextMatrix(ctx, cgMatrix); #if defined(Q_OS_MACOS) CGContextSetFillColorWithColor(ctx, glyphColor); diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index 2ce46a4706..13505be0aa 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -139,6 +139,7 @@ protected: void init(); QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, bool colorful, const QTransform &m); void loadAdvancesForGlyphs(QVarLengthArray &cgGlyphs, QGlyphLayout *glyphs) const; + bool hasColorGlyphs() const; QCFType ctfont; QCFType cgFont; From ae1f749e9e25495e4ae1658289584adb74d0b076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 25 Nov 2018 21:51:21 +0100 Subject: [PATCH 34/73] CoreText: Rename argument to imageForGlyph to better reflect how it's used The 'aa' argument doesn't unconditionally enabled antialiasing, it just overrides the check that the pointSize is larger than the antialiasing threshold. If the styleStrategy has QFont::NoAntialias we still end up without antialiasing. Change-Id: I7130e7c68d883c2443756242e96790264f583b0f Reviewed-by: Simon Hausmann Reviewed-by: Allan Sandfeld Jensen --- .../fontdatabases/mac/qfontengine_coretext.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 91d3d811b5..b323496038 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -732,7 +732,8 @@ bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const return (glyphFormat == Format_A32) && !(fontDef.styleStrategy & (QFont::NoAntialias | QFont::NoSubpixelAntialias)); } -QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, bool aa, const QTransform &matrix) +QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, + bool overrideAntialiasingThreshold, const QTransform &matrix) { glyph_metrics_t br = alphaMapBoundingBox(glyph, subPixelPosition, matrix, glyphFormat); @@ -769,7 +770,8 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition qt_mac_bitmapInfoForImage(im)); Q_ASSERT(ctx); CGContextSetFontSize(ctx, fontDef.pixelSize); - const bool antialias = (aa || fontDef.pointSize > antialiasingThreshold()) && !(fontDef.styleStrategy & QFont::NoAntialias); + const bool antialias = (overrideAntialiasingThreshold || fontDef.pointSize > antialiasingThreshold()) + && !(fontDef.styleStrategy & QFont::NoAntialias); CGContextSetShouldAntialias(ctx, antialias); const bool smoothing = antialias && !(fontDef.styleStrategy & QFont::NoSubpixelAntialias); CGContextSetShouldSmoothFonts(ctx, smoothing); From 2a1c368c873afe9b222c759d4348b93beafca8ea Mon Sep 17 00:00:00 2001 From: Mikhail Svetkin Date: Fri, 16 Nov 2018 10:32:39 +0100 Subject: [PATCH 35/73] xcb: Use std::move and pass argument by rvalue reference It will avoid a creation of temporary object and avoid copying. Change-Id: Ifae5f6f9e36bcb07f4bacc31f151f8adcfa621a3 Reviewed-by: Anton Kudryavtsev Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbconnection_screens.cpp | 2 +- src/plugins/platforms/xcb/qxcbscreen.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp index fe9e0be86d..9aba996bb9 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp @@ -384,7 +384,7 @@ void QXcbConnection::initializeScreens() } siblings << screen; } - virtualDesktop->setScreens(siblings); + virtualDesktop->setScreens(std::move(siblings)); xcb_screen_next(&it); ++xcbScreenNumber; } // for each xcb screen diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index 7f22a8e4db..be6c45e415 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -79,7 +79,7 @@ public: QXcbScreen *screenAt(const QPoint &pos) const; QList screens() const { return m_screens; } - void setScreens(QList sl) { m_screens = sl; } + void setScreens(QList &&sl) { m_screens = std::move(sl); } void removeScreen(QPlatformScreen *s) { m_screens.removeOne(s); } void addScreen(QPlatformScreen *s); void setPrimaryScreen(QPlatformScreen *s); From 2e86b652b789374ed9e0ddb15b0f60dd24b99fe8 Mon Sep 17 00:00:00 2001 From: Val Doroshchuk Date: Wed, 19 Sep 2018 13:56:50 +0200 Subject: [PATCH 36/73] Fix crash in QSimpleDrag when no platform window No need to return top level window if it was not created. It means no platform resources have been allocated. Events might not be delivered if the wrong window is returned. Fixes: QTBUG-70544 Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qsimpledrag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index 2611dc8580..9aab332ef5 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -74,7 +74,7 @@ static QWindow* topLevelAt(const QPoint &pos) QWindowList list = QGuiApplication::topLevelWindows(); for (int i = list.count()-1; i >= 0; --i) { QWindow *w = list.at(i); - if (w->isVisible() && w->geometry().contains(pos) && !qobject_cast(w)) + if (w->isVisible() && w->handle() && w->geometry().contains(pos) && !qobject_cast(w)) return w; } return 0; From 3944f45c4d74b0389dc2246d1292790a9591ab82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 27 Nov 2018 17:13:38 +0100 Subject: [PATCH 37/73] CoreText: Remove handling of the AppleAntiAliasingThreshold user default The setting is not relevant for modern macOS applications, and none of the applications shipped with macOS today are affected by it. The only code path in macOS that picks it up is +[NSFont initialize] in the UIFoundation framework, storing it for later so that -[NSFont screenFont] and -[NSFont screenFontWithRenderingMode:] can use it, but these APIs are deprecated and we don't use them in Qt. Other NSFont code paths will not hit these APIs unless screen font substitution is enabled, something it hasn't been since OSX 10.7. https://preview.tinyurl.com/yctpfnqp Removing handling of this setting allows us to simplify the reasoning for whether or not antialiasing and font smoothing is enabled for a given engine. Change-Id: Ie2809052a1a0815d9bddedd4a6236eb6c898f993 Reviewed-by: Lars Knoll Reviewed-by: Allan Sandfeld Jensen --- .../fontdatabases/mac/qfontengine_coretext.mm | 26 ++++--------------- .../mac/qfontengine_coretext_p.h | 3 +-- .../platforms/cocoa/qpaintengine_mac.mm | 1 - 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index b323496038..7a26416868 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -614,20 +614,6 @@ glyph_metrics_t QCoreTextFontEngine::alphaMapBoundingBox(glyph_t glyph, QFixed s return br; } -int QCoreTextFontEngine::antialiasingThreshold() -{ - static const int antialiasingThreshold = [] { - auto defaults = [NSUserDefaults standardUserDefaults]; - int threshold = [defaults integerForKey:@"AppleAntiAliasingThreshold"]; - qCDebug(lcQpaFonts) << "Resolved antialiasing threshold. Defaults =" - << [[defaults dictionaryRepresentation] dictionaryWithValuesForKeys:@[ - @"AppleAntiAliasingThreshold" - ]] << "Result =" << threshold; - return threshold; - }(); - return antialiasingThreshold; -} - /* Apple has gone through many iterations of its font smoothing algorithms, and there are many ways to enable or disable certain aspects of it. As @@ -732,8 +718,7 @@ bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const return (glyphFormat == Format_A32) && !(fontDef.styleStrategy & (QFont::NoAntialias | QFont::NoSubpixelAntialias)); } -QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, - bool overrideAntialiasingThreshold, const QTransform &matrix) +QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix) { glyph_metrics_t br = alphaMapBoundingBox(glyph, subPixelPosition, matrix, glyphFormat); @@ -770,8 +755,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition qt_mac_bitmapInfoForImage(im)); Q_ASSERT(ctx); CGContextSetFontSize(ctx, fontDef.pixelSize); - const bool antialias = (overrideAntialiasingThreshold || fontDef.pointSize > antialiasingThreshold()) - && !(fontDef.styleStrategy & QFont::NoAntialias); + const bool antialias = !(fontDef.styleStrategy & QFont::NoAntialias); CGContextSetShouldAntialias(ctx, antialias); const bool smoothing = antialias && !(fontDef.styleStrategy & QFont::NoSubpixelAntialias); CGContextSetShouldSmoothFonts(ctx, smoothing); @@ -837,7 +821,7 @@ QImage QCoreTextFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosit if (x.type() > QTransform::TxScale) return QFontEngine::alphaMapForGlyph(glyph, subPixelPosition, x); - QImage im = imageForGlyph(glyph, subPixelPosition, false, x); + QImage im = imageForGlyph(glyph, subPixelPosition, x); QImage alphaMap(im.width(), im.height(), QImage::Format_Alpha8); @@ -859,7 +843,7 @@ QImage QCoreTextFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPo if (x.type() > QTransform::TxScale) return QFontEngine::alphaRGBMapForGlyph(glyph, subPixelPosition, x); - QImage im = imageForGlyph(glyph, subPixelPosition, true, x); + QImage im = imageForGlyph(glyph, subPixelPosition, x); qGamma_correct_back_to_linear_cs(&im); return im; } @@ -869,7 +853,7 @@ QImage QCoreTextFontEngine::bitmapForGlyph(glyph_t glyph, QFixed subPixelPositio if (t.type() > QTransform::TxScale) return QFontEngine::bitmapForGlyph(glyph, subPixelPosition, t); - return imageForGlyph(glyph, subPixelPosition, true, t); + return imageForGlyph(glyph, subPixelPosition, t); } void QCoreTextFontEngine::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFlags flags) const diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index 13505be0aa..0ff428084f 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -127,7 +127,6 @@ public: Q_ENUM(FontSmoothing); static FontSmoothing fontSmoothing(); - static int antialiasingThreshold(); static bool ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length); static QFont::Weight qtWeightFromCFWeight(float value); @@ -137,7 +136,7 @@ public: protected: QCoreTextFontEngine(const QFontDef &def); void init(); - QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, bool colorful, const QTransform &m); + QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &m); void loadAdvancesForGlyphs(QVarLengthArray &cgGlyphs, QGlyphLayout *glyphs) const; bool hasColorGlyphs() const; diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm index 69e7a92234..3677877538 100644 --- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm @@ -914,7 +914,6 @@ void QCoreGraphicsPaintEngine::drawTextItem(const QPointF &pos, const QTextItem QFontEngine *fe = ti.fontEngine; const bool textAA = ((state->renderHints() & QPainter::TextAntialiasing) - && (fe->fontDef.pointSize > QCoreTextFontEngine::antialiasingThreshold()) && !(fe->fontDef.styleStrategy & QFont::NoAntialias)); const bool lineAA = state->renderHints() & QPainter::Antialiasing; if (textAA != lineAA) From ec254d2555083ff258db9675fa43ad23888f0685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 27 Nov 2018 18:52:29 +0100 Subject: [PATCH 38/73] CoreText: Add font antialiasing and smoothing helper functions The font smoothing helper in particular now takes into account whether or not we're dealing with color glyphs, in which case we shouldn't (or don't need to) smooth, and also makes sure the QFont::NoSubpixelAntialias style strategy doesn't affect font smoothing when we're dealing with non-subpixel-antialiased font smoothing, as on macOS 10.14. Change-Id: Ibd477158629402c55cafec31576b6d9901d184cf Reviewed-by: Lars Knoll Reviewed-by: Allan Sandfeld Jensen --- .../fontdatabases/mac/qfontengine_coretext.mm | 29 ++++++++++++++++--- .../mac/qfontengine_coretext_p.h | 2 ++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 7a26416868..6c2ffba92e 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -712,6 +712,28 @@ QCoreTextFontEngine::FontSmoothing QCoreTextFontEngine::fontSmoothing() return cachedFontSmoothing; } +bool QCoreTextFontEngine::shouldAntialias() const +{ + return !(fontDef.styleStrategy & QFont::NoAntialias); +} + +bool QCoreTextFontEngine::shouldSmoothFont() const +{ + if (hasColorGlyphs()) + return false; + + if (!shouldAntialias()) + return false; + + switch (fontSmoothing()) { + case Disabled: return false; + case Subpixel: return !(fontDef.styleStrategy & QFont::NoSubpixelAntialias); + case Grayscale: return true; + } + + Q_UNREACHABLE(); +} + bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const { // Only works well when font-smoothing is enabled @@ -755,10 +777,9 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition qt_mac_bitmapInfoForImage(im)); Q_ASSERT(ctx); CGContextSetFontSize(ctx, fontDef.pixelSize); - const bool antialias = !(fontDef.styleStrategy & QFont::NoAntialias); - CGContextSetShouldAntialias(ctx, antialias); - const bool smoothing = antialias && !(fontDef.styleStrategy & QFont::NoSubpixelAntialias); - CGContextSetShouldSmoothFonts(ctx, smoothing); + + CGContextSetShouldAntialias(ctx, shouldAntialias()); + CGContextSetShouldSmoothFonts(ctx, shouldSmoothFont()); CGAffineTransform cgMatrix = CGAffineTransformIdentity; diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index 0ff428084f..28810f13bc 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -139,6 +139,8 @@ protected: QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &m); void loadAdvancesForGlyphs(QVarLengthArray &cgGlyphs, QGlyphLayout *glyphs) const; bool hasColorGlyphs() const; + bool shouldAntialias() const; + bool shouldSmoothFont() const; QCFType ctfont; QCFType cgFont; From 0cf5648ce6df8b60090a14f738dd5d66643a0532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 28 Nov 2018 12:12:07 +0100 Subject: [PATCH 39/73] CoreText: Store glyphs in linear RGB when needed by blending algorithm Instead of tying the linear-conversion to a specific function, we move it to imageForGlyph and base it on the premise for needing it. Change-Id: Ib8fc79ad419ef703abcb82785ac15d4c75fb98e6 Reviewed-by: Lars Knoll Reviewed-by: Allan Sandfeld Jensen --- .../fontdatabases/mac/qfontengine_coretext.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 6c2ffba92e..271f07e0c1 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -824,6 +824,9 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition CTFontDrawGlyphs(ctfont, &cgGlyph, &CGPointZero, 1, ctx); } + if (expectsGammaCorrectedBlending()) + qGamma_correct_back_to_linear_cs(&im); + #if defined(Q_OS_MACOS) if (blackOnWhiteGlyphs) im.invertPixels(); @@ -864,9 +867,7 @@ QImage QCoreTextFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPo if (x.type() > QTransform::TxScale) return QFontEngine::alphaRGBMapForGlyph(glyph, subPixelPosition, x); - QImage im = imageForGlyph(glyph, subPixelPosition, x); - qGamma_correct_back_to_linear_cs(&im); - return im; + return imageForGlyph(glyph, subPixelPosition, x); } QImage QCoreTextFontEngine::bitmapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t) From 6d58a1cecbaf0a6ed7d751f67450a86c742770ff Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 23 Nov 2018 17:19:14 +0100 Subject: [PATCH 40/73] Fix QPpdPrintDevice::isDefault How to test: * Have two printers * Use lpoptions -d to set the default printer to be one and then the other * Use lpstat -d to check setting the default printer worked * Use this simple test program and check the resulting values make sense qDebug() << "DefaultPrinter" << QPrinterInfo::defaultPrinter().printerName(); const QList list = QPrinterInfo::availablePrinters(); for(const QPrinterInfo &pi : list) { qDebug() << pi.printerName() << pi.isDefault(); } Fixes: QTBUG-70317 Change-Id: I535d11451c568630a374f5c37d8cac32cbb6d3ab Reviewed-by: Frederik Gladhorn --- src/plugins/printsupport/cups/qcupsprintersupport.cpp | 5 +++++ src/plugins/printsupport/cups/qcupsprintersupport_p.h | 2 ++ src/plugins/printsupport/cups/qppdprintdevice.cpp | 9 ++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/plugins/printsupport/cups/qcupsprintersupport.cpp b/src/plugins/printsupport/cups/qcupsprintersupport.cpp index 19e1df31f6..42a7a821f2 100644 --- a/src/plugins/printsupport/cups/qcupsprintersupport.cpp +++ b/src/plugins/printsupport/cups/qcupsprintersupport.cpp @@ -174,6 +174,11 @@ QStringList QCupsPrinterSupport::availablePrintDeviceIds() const } QString QCupsPrinterSupport::defaultPrintDeviceId() const +{ + return staticDefaultPrintDeviceId(); +} + +QString QCupsPrinterSupport::staticDefaultPrintDeviceId() { QString printerId; cups_dest_t *dests; diff --git a/src/plugins/printsupport/cups/qcupsprintersupport_p.h b/src/plugins/printsupport/cups/qcupsprintersupport_p.h index 42de28aec0..c2b4895c7f 100644 --- a/src/plugins/printsupport/cups/qcupsprintersupport_p.h +++ b/src/plugins/printsupport/cups/qcupsprintersupport_p.h @@ -71,6 +71,8 @@ public: QStringList availablePrintDeviceIds() const override; QString defaultPrintDeviceId() const override; + static QString staticDefaultPrintDeviceId(); + private: QString cupsOption(int i, const QString &key) const; }; diff --git a/src/plugins/printsupport/cups/qppdprintdevice.cpp b/src/plugins/printsupport/cups/qppdprintdevice.cpp index 51b93a0016..ea6336c4d1 100644 --- a/src/plugins/printsupport/cups/qppdprintdevice.cpp +++ b/src/plugins/printsupport/cups/qppdprintdevice.cpp @@ -39,6 +39,8 @@ #include "qppdprintdevice.h" +#include "qcupsprintersupport_p.h" + #include #include @@ -118,7 +120,12 @@ bool QPpdPrintDevice::isValid() const bool QPpdPrintDevice::isDefault() const { - return printerTypeFlags() & CUPS_PRINTER_DEFAULT; + // There seems to be a bug in cups in which printerTypeFlags + // returns CUPS_PRINTER_DEFAULT based only on system values, ignoring user lpoptions + // so we can't use that. And also there seems to be a bug in which dests returned + // by cupsGetNamedDest don't have is_default set at all so we can't use that either + // so go the long route and compare our id against the defaultPrintDeviceId + return id() == QCupsPrinterSupport::staticDefaultPrintDeviceId(); } QPrint::DeviceState QPpdPrintDevice::state() const From 6b875f0625acc6c6a4f8899b829176baaf7d8502 Mon Sep 17 00:00:00 2001 From: Thomas Miller Date: Wed, 14 Nov 2018 16:19:43 -0800 Subject: [PATCH 41/73] Implement mul_overflow for MSVC arm64 Change-Id: Ia7c79614e6ef21222fb9683b540ac51b45a77c49 Reviewed-by: Thiago Macieira --- src/corelib/global/qnumeric_p.h | 74 ++++++++++++--------------------- 1 file changed, 26 insertions(+), 48 deletions(-) diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h index e318c3759b..5326d9485b 100644 --- a/src/corelib/global/qnumeric_p.h +++ b/src/corelib/global/qnumeric_p.h @@ -58,14 +58,21 @@ #if defined(Q_CC_MSVC) # include -#endif - -#if defined(Q_CC_MSVC) -#include +# include +# if defined(Q_PROCESSOR_X86_64) || defined(Q_PROCESSOR_ARM_64) +# define Q_INTRINSIC_MUL_OVERFLOW64 +# define Q_UMULH(v1, v2) __umulh(v1, v2); +# define Q_SMULH(v1, v2) __mulh(v1, v2); +# pragma intrinsic(__umulh) +# pragma intrinsic(__mulh) +# endif #endif # if defined(Q_OS_INTEGRITY) && defined(Q_PROCESSOR_ARM_64) #include +# define Q_INTRINSIC_MUL_OVERFLOW64 +# define Q_UMULH(v1, v2) __MULUH64(v1, v2); +# define Q_SMULH(v1, v2) __MULSH64(v1, v2); #endif #if !defined(Q_CC_MSVC) && (defined(Q_OS_QNX) || defined(Q_CC_INTEL)) @@ -327,26 +334,26 @@ mul_overflow(T v1, T v2, T *r) return lr > std::numeric_limits::max() || lr < std::numeric_limits::min(); } -# if defined(Q_OS_INTEGRITY) && defined(Q_PROCESSOR_ARM_64) +# if defined(Q_INTRINSIC_MUL_OVERFLOW64) template <> inline bool mul_overflow(quint64 v1, quint64 v2, quint64 *r) { *r = v1 * v2; - return __MULUH64(v1, v2); + return Q_UMULH(v1, v2); } template <> inline bool mul_overflow(qint64 v1, qint64 v2, qint64 *r) { - qint64 high = __MULSH64(v1, v2); - if (high == 0) { - *r = v1 * v2; - return *r < 0; - } - if (high == -1) { - *r = v1 * v2; - return *r >= 0; - } - return true; + // This is slightly more complex than the unsigned case above: the sign bit + // of 'low' must be replicated as the entire 'high', so the only valid + // values for 'high' are 0 and -1. Use unsigned multiply since it's the same + // as signed for the low bits and use a signed right shift to verify that + // 'high' is nothing but sign bits that match the sign of 'low'. + + qint64 high = __mulh(v1, v2); + *r = qint64(quint64(v1) * quint64(v2)); + return (*r >> 63) != high; } +# if defined(Q_OS_INTEGRITY) && defined(Q_PROCESSOR_ARM_64) template <> inline bool mul_overflow(uint64_t v1, uint64_t v2, uint64_t *r) { return mul_overflow(v1,v2,reinterpret_cast(r)); @@ -356,8 +363,8 @@ template <> inline bool mul_overflow(int64_t v1, int64_t v2, int64_t *r) { return mul_overflow(v1,v2,reinterpret_cast(r)); } - -#endif +# endif // OS_INTEGRITY ARM64 +# endif // Q_INTRINSIC_MUL_OVERFLOW64 # if defined(Q_CC_MSVC) && defined(Q_PROCESSOR_X86) // We can use intrinsics for the unsigned operations with MSVC @@ -369,37 +376,8 @@ template <> inline bool add_overflow(unsigned v1, unsigned v2, unsigned *r) # if defined(Q_PROCESSOR_X86_64) template <> inline bool add_overflow(quint64 v1, quint64 v2, quint64 *r) { return _addcarry_u64(0, v1, v2, reinterpret_cast(r)); } - -# pragma intrinsic(_umul128) -template <> inline bool mul_overflow(quint64 v1, quint64 v2, quint64 *r) -{ - // use 128-bit multiplication with the _umul128 intrinsic - // https://msdn.microsoft.com/en-us/library/3dayytw9.aspx - quint64 high; - *r = _umul128(v1, v2, &high); - return high; -} - -# pragma intrinsic(_mul128) -template <> inline bool mul_overflow(qint64 v1, qint64 v2, qint64 *r) -{ - // Use 128-bit multiplication with the _mul128 intrinsic - // https://msdn.microsoft.com/en-us/library/82cxdw50.aspx - - // This is slightly more complex than the unsigned case above: the sign bit - // of 'low' must be replicated as the entire 'high', so the only valid - // values for 'high' are 0 and -1. - - qint64 high; - *r = _mul128(v1, v2, &high); - if (high == 0) - return *r < 0; - if (high == -1) - return *r >= 0; - return true; -} # endif // x86-64 -# endif // MSVC x86 +# endif // MSVC X86 #endif // !GCC } #endif // Q_CLANG_QDOC From 1eeebae7e3b5eb8dda37755b32aafe6719b5cf7b Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Wed, 21 Nov 2018 14:07:18 +0200 Subject: [PATCH 42/73] Fix compilation of qendian's qswap specializations on gcc 4.8 Task-number: QTBUG-71945 Change-Id: Icf2b75c72946f57ebffc880c9238531dea13ab5b Reviewed-by: Ivan Komissarov Reviewed-by: Simon Hausmann --- src/corelib/global/qendian.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index 0e67a1ab8e..f2e5833468 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -162,17 +162,17 @@ Float qbswapFloatHelper(Float source) return qFromUnaligned(&temp); } -template <> inline qfloat16 qbswap(qfloat16 source) +inline qfloat16 qbswap(qfloat16 source) { return qbswapFloatHelper(source); } -template <> inline float qbswap(float source) +inline float qbswap(float source) { return qbswapFloatHelper(source); } -template <> inline double qbswap(double source) +inline double qbswap(double source) { return qbswapFloatHelper(source); } @@ -185,7 +185,7 @@ template <> inline double qbswap(double source) */ template inline void qbswap(const T src, void *dest) { - qToUnaligned(qbswap(src), dest); + qToUnaligned(qbswap(src), dest); } template void *qbswap(const void *source, qsizetype count, void *dest) noexcept; @@ -223,9 +223,9 @@ template inline void qFromLittleEndian(const void *source, qsizetyp #else // Q_LITTLE_ENDIAN template inline Q_DECL_CONSTEXPR T qToBigEndian(T source) -{ return qbswap(source); } +{ return qbswap(source); } template inline Q_DECL_CONSTEXPR T qFromBigEndian(T source) -{ return qbswap(source); } +{ return qbswap(source); } template inline Q_DECL_CONSTEXPR T qToLittleEndian(T source) { return source; } template inline Q_DECL_CONSTEXPR T qFromLittleEndian(T source) From 247baedb2560d23d14f27cd52f4759e07b0049c0 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 28 Nov 2018 16:34:58 +0100 Subject: [PATCH 43/73] Doc: specifically list the QToolButton properties that actions affect Also, add a note that explains that autoRepeat does not affect QToolButton's autoRepeat property. Change-Id: I9e95cef9e9d1b5ee6cb1114d0b9a9fad562db601 Fixes: QTBUG-48204 Reviewed-by: Andy Shaw --- src/widgets/widgets/qtoolbutton.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp index 03950ef44b..6a24712319 100644 --- a/src/widgets/widgets/qtoolbutton.cpp +++ b/src/widgets/widgets/qtoolbutton.cpp @@ -898,7 +898,23 @@ bool QToolButton::autoRaise() const Sets the default action to \a action. If a tool button has a default action, the action defines the - button's properties like text, icon, tool tip, etc. + following properties of the button: + + \list + \li \l {QAbstractButton::}{checkable} + \li \l {QAbstractButton::}{checked} + \li \l {QWidget::}{enabled} + \li \l {QWidget::}{font} + \li \l {QAbstractButton::}{icon} + \li \l {QToolButton::}{popupMode} (assuming the action has a menu) + \li \l {QWidget::}{statusTip} + \li \l {QAbstractButton::}{text} + \li \l {QWidget::}{toolTip} + \li \l {QWidget::}{whatsThis} + \endlist + + Other properties, such as \l autoRepeat, are not affected + by actions. */ void QToolButton::setDefaultAction(QAction *action) { From 1f1dc3fc4c2e5e2d94e86dfc7235a4b762da2e72 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 16 Nov 2018 16:01:30 +0100 Subject: [PATCH 44/73] Fix gamma-correction in QCoreTextFontEngine with Mojave The code was previously assuming font-smoothing was only used with A32 font antialiasing, so the corresponding gamma-correction was not performed. Task-number: QTBUG-71075 Task-number: QTBUG-71946 Change-Id: I68d8304cf18638239d8bfac32c67333f16ccc7bd Reviewed-by: Lars Knoll --- src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 271f07e0c1..7fb22c0675 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -736,8 +736,7 @@ bool QCoreTextFontEngine::shouldSmoothFont() const bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const { - // Only works well when font-smoothing is enabled - return (glyphFormat == Format_A32) && !(fontDef.styleStrategy & (QFont::NoAntialias | QFont::NoSubpixelAntialias)); + return shouldSmoothFont(); } QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix) From c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 16 Nov 2018 17:07:33 +0100 Subject: [PATCH 45/73] src/3rdparty: remove xkbcommon The only reason why we bundled this library ~6 years ago was because it was not available on distributions that we supported at the time, but library was a hard dependency for XCB plugin. See: 2122e731abdb619249df89642c0800640b2fa428 Later more and more projects started to depend on it (compose input context plugin, libinput, mir, wayland). The configuration had become too complex, because some projects used bundled and some used the version from the system. Having libxkbcommon in 3rdparty sources is not necessary anymore, after RHEL 6.6 was removed from the list of supported platforms for Qt 5.12. Ubuntu 16.04 - 0.5.0 Ubuntu 18.04 - 0.8.0 openSUSE 42.3 - 0.6.1 RHEL-7.4 - 0.7.1 This will also simplify further development, e.g. QTBUG-42181 Bumped the minimal required version 0.4.1 -> 0.5.0. The patch also contains a code marked with "TRANSITION HACK", which is temporary needed so we can update the dependent wayland module. [ChangeLog][Third-Party Code] Removed xkbcommon from bundled sources. This library is present on all supported platforms. The minimal required version now is 0.5.0. Task-number: QTBUG-65503 Change-Id: Iec50829bb6f8fbb19f3c4e4ad62e332beb837de5 Reviewed-by: Lars Knoll Reviewed-by: Laszlo Agocs Reviewed-by: Oswald Buddenhagen --- config_help.txt | 5 +- src/3rdparty/xkbcommon-x11.pri | 14 - src/3rdparty/xkbcommon.pri | 60 - src/3rdparty/xkbcommon/LICENSE | 215 - src/3rdparty/xkbcommon/NEWS | 404 - src/3rdparty/xkbcommon/README.md | 75 - src/3rdparty/xkbcommon/qt_attribution.json | 29 - src/3rdparty/xkbcommon/src/atom.c | 225 - src/3rdparty/xkbcommon/src/atom.h | 49 - .../xkbcommon/src/compose/compose-state.c | 196 - src/3rdparty/xkbcommon/src/compose/parser.c | 737 -- src/3rdparty/xkbcommon/src/compose/parser.h | 36 - src/3rdparty/xkbcommon/src/compose/paths.c | 203 - src/3rdparty/xkbcommon/src/compose/paths.h | 42 - src/3rdparty/xkbcommon/src/compose/table.c | 219 - src/3rdparty/xkbcommon/src/compose/table.h | 100 - src/3rdparty/xkbcommon/src/context-priv.c | 190 - src/3rdparty/xkbcommon/src/context.c | 331 - src/3rdparty/xkbcommon/src/context.h | 127 - src/3rdparty/xkbcommon/src/darray.h | 209 - src/3rdparty/xkbcommon/src/keymap-priv.c | 150 - src/3rdparty/xkbcommon/src/keymap.c | 519 -- src/3rdparty/xkbcommon/src/keymap.h | 482 -- src/3rdparty/xkbcommon/src/keysym-utf.c | 937 --- src/3rdparty/xkbcommon/src/keysym.c | 762 -- src/3rdparty/xkbcommon/src/keysym.h | 65 - src/3rdparty/xkbcommon/src/ks_tables.h | 7116 ----------------- src/3rdparty/xkbcommon/src/scanner-utils.h | 195 - src/3rdparty/xkbcommon/src/state.c | 1446 ---- src/3rdparty/xkbcommon/src/text.c | 346 - src/3rdparty/xkbcommon/src/text.h | 76 - src/3rdparty/xkbcommon/src/utf8.c | 138 - src/3rdparty/xkbcommon/src/utf8.h | 36 - src/3rdparty/xkbcommon/src/utils.c | 163 - src/3rdparty/xkbcommon/src/utils.h | 276 - src/3rdparty/xkbcommon/src/x11/util.c | 217 - src/3rdparty/xkbcommon/src/x11/x11-keymap.c | 1177 --- src/3rdparty/xkbcommon/src/x11/x11-priv.h | 54 - src/3rdparty/xkbcommon/src/x11/x11-state.c | 71 - src/3rdparty/xkbcommon/src/xkbcomp/action.c | 871 -- src/3rdparty/xkbcommon/src/xkbcomp/action.h | 56 - .../xkbcommon/src/xkbcomp/ast-build.c | 806 -- .../xkbcommon/src/xkbcomp/ast-build.h | 125 - src/3rdparty/xkbcommon/src/xkbcomp/ast.h | 353 - src/3rdparty/xkbcommon/src/xkbcomp/compat.c | 932 --- src/3rdparty/xkbcommon/src/xkbcomp/expr.c | 686 -- src/3rdparty/xkbcommon/src/xkbcomp/expr.h | 85 - src/3rdparty/xkbcommon/src/xkbcomp/include.c | 309 - src/3rdparty/xkbcommon/src/xkbcomp/include.h | 42 - src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c | 668 -- .../xkbcommon/src/xkbcomp/keymap-dump.c | 664 -- src/3rdparty/xkbcommon/src/xkbcomp/keywords.c | 348 - .../xkbcommon/src/xkbcomp/parser-priv.h | 44 - src/3rdparty/xkbcommon/src/xkbcomp/parser.h | 157 - src/3rdparty/xkbcommon/src/xkbcomp/rules.c | 1037 --- src/3rdparty/xkbcommon/src/xkbcomp/rules.h | 32 - src/3rdparty/xkbcommon/src/xkbcomp/scanner.c | 208 - src/3rdparty/xkbcommon/src/xkbcomp/symbols.c | 1595 ---- src/3rdparty/xkbcommon/src/xkbcomp/types.c | 742 -- src/3rdparty/xkbcommon/src/xkbcomp/vmod.c | 105 - src/3rdparty/xkbcommon/src/xkbcomp/vmod.h | 34 - .../xkbcommon/src/xkbcomp/xkbcomp-keymap.c | 298 - .../xkbcommon/src/xkbcomp/xkbcomp-parser.c | 3392 -------- .../xkbcommon/src/xkbcomp/xkbcomp-priv.h | 124 - src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c | 139 - .../xkbcommon/xkbcommon/xkbcommon-compat.h | 98 - .../xkbcommon/xkbcommon/xkbcommon-compose.h | 493 -- .../xkbcommon/xkbcommon/xkbcommon-keysyms.h | 3004 ------- .../xkbcommon/xkbcommon/xkbcommon-names.h | 45 - .../xkbcommon/xkbcommon/xkbcommon-x11.h | 244 - src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h | 1868 ----- src/gui/configure.json | 55 +- .../input/libinput/libinput.pri | 5 +- .../input/libinput/qlibinputkeyboard.cpp | 16 +- .../platforminputcontexts/compose/compose.pro | 7 +- src/plugins/platforms/mirclient/mirclient.pro | 7 +- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 14 +- 77 files changed, 47 insertions(+), 37353 deletions(-) delete mode 100644 src/3rdparty/xkbcommon-x11.pri delete mode 100644 src/3rdparty/xkbcommon.pri delete mode 100644 src/3rdparty/xkbcommon/LICENSE delete mode 100644 src/3rdparty/xkbcommon/NEWS delete mode 100644 src/3rdparty/xkbcommon/README.md delete mode 100644 src/3rdparty/xkbcommon/qt_attribution.json delete mode 100644 src/3rdparty/xkbcommon/src/atom.c delete mode 100644 src/3rdparty/xkbcommon/src/atom.h delete mode 100644 src/3rdparty/xkbcommon/src/compose/compose-state.c delete mode 100644 src/3rdparty/xkbcommon/src/compose/parser.c delete mode 100644 src/3rdparty/xkbcommon/src/compose/parser.h delete mode 100644 src/3rdparty/xkbcommon/src/compose/paths.c delete mode 100644 src/3rdparty/xkbcommon/src/compose/paths.h delete mode 100644 src/3rdparty/xkbcommon/src/compose/table.c delete mode 100644 src/3rdparty/xkbcommon/src/compose/table.h delete mode 100644 src/3rdparty/xkbcommon/src/context-priv.c delete mode 100644 src/3rdparty/xkbcommon/src/context.c delete mode 100644 src/3rdparty/xkbcommon/src/context.h delete mode 100644 src/3rdparty/xkbcommon/src/darray.h delete mode 100644 src/3rdparty/xkbcommon/src/keymap-priv.c delete mode 100644 src/3rdparty/xkbcommon/src/keymap.c delete mode 100644 src/3rdparty/xkbcommon/src/keymap.h delete mode 100644 src/3rdparty/xkbcommon/src/keysym-utf.c delete mode 100644 src/3rdparty/xkbcommon/src/keysym.c delete mode 100644 src/3rdparty/xkbcommon/src/keysym.h delete mode 100644 src/3rdparty/xkbcommon/src/ks_tables.h delete mode 100644 src/3rdparty/xkbcommon/src/scanner-utils.h delete mode 100644 src/3rdparty/xkbcommon/src/state.c delete mode 100644 src/3rdparty/xkbcommon/src/text.c delete mode 100644 src/3rdparty/xkbcommon/src/text.h delete mode 100644 src/3rdparty/xkbcommon/src/utf8.c delete mode 100644 src/3rdparty/xkbcommon/src/utf8.h delete mode 100644 src/3rdparty/xkbcommon/src/utils.c delete mode 100644 src/3rdparty/xkbcommon/src/utils.h delete mode 100644 src/3rdparty/xkbcommon/src/x11/util.c delete mode 100644 src/3rdparty/xkbcommon/src/x11/x11-keymap.c delete mode 100644 src/3rdparty/xkbcommon/src/x11/x11-priv.h delete mode 100644 src/3rdparty/xkbcommon/src/x11/x11-state.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/action.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/action.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/ast.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/compat.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/expr.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/expr.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/include.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/include.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/keywords.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/parser.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/rules.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/rules.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/scanner.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/symbols.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/types.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/vmod.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/vmod.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-keymap.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-parser.c delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h delete mode 100644 src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c delete mode 100644 src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h delete mode 100644 src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compose.h delete mode 100644 src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h delete mode 100644 src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h delete mode 100644 src/3rdparty/xkbcommon/xkbcommon/xkbcommon-x11.h delete mode 100644 src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h diff --git a/config_help.txt b/config_help.txt index 44dccfb8da..5369163055 100644 --- a/config_help.txt +++ b/config_help.txt @@ -303,10 +303,7 @@ Gui, printing, widget options: -mtdev ............. Enable mtdev support [auto] -tslib ............. Enable tslib support [auto] -xcb-xinput ........ Enable XInput2 support [auto] - -xkbcommon-x11 ..... Select xkbcommon used in combination with xcb - [system/qt/no] - -xkbcommon-evdev ... Enable X-less xkbcommon in combination with libinput - [auto] + -xkbcommon ......... Enable key mapping support [auto] Image formats: -gif ............... Enable reading support for GIF [auto] diff --git a/src/3rdparty/xkbcommon-x11.pri b/src/3rdparty/xkbcommon-x11.pri deleted file mode 100644 index 58e3a63b46..0000000000 --- a/src/3rdparty/xkbcommon-x11.pri +++ /dev/null @@ -1,14 +0,0 @@ -include(xkbcommon.pri) - -# Build xkbcommon-x11 support library, it depends on -lxcb and -lxcb-xkb, linking is done -# in xcb-plugin.pro (linked to system libraries or if Qt was configured with -qt-xcb then -# linked to -lxcb-static). -INCLUDEPATH += $$PWD/xkbcommon/src/x11 - -# Need to rename several files, qmake has problems processing a project when -# sub-directories contain files with an equal names. - -SOURCES += \ - $$PWD/xkbcommon/src/x11/util.c \ - $$PWD/xkbcommon/src/x11/x11-keymap.c \ # renamed: keymap.c -> x11-keymap.c - $$PWD/xkbcommon/src/x11/x11-state.c # renamed: state.c -> x11-state.c diff --git a/src/3rdparty/xkbcommon.pri b/src/3rdparty/xkbcommon.pri deleted file mode 100644 index 63c8e687ec..0000000000 --- a/src/3rdparty/xkbcommon.pri +++ /dev/null @@ -1,60 +0,0 @@ -# Requires GNU C extensions -CONFIG -= strict_c - -INCLUDEPATH += $$PWD/xkbcommon \ - $$PWD/xkbcommon/xkbcommon \ - $$PWD/xkbcommon/src \ - $$PWD/xkbcommon/src/xkbcomp - -include($$shadowed($$PWD/../gui/qtgui-config.pri)) - -# Unused (but needs to be set to something) - we don't use APIs that read xkb -# config files from file system. We use APIs that fetch the necessary keymap -# details directly from X server. -DEFINES += DFLT_XKB_CONFIG_ROOT='\\"/usr/share/X11/xkb\\"' -# Unused (but needs to be set to something) - After QTBUG-42181, this needs to -# be become a configure switch. -DEFINES += XLOCALEDIR='\\"/usr/share/X11/locale/\\"' - -### RMLVO names can be overwritten with environmental variables (see libxkbcommon documentation) -DEFINES += DEFAULT_XKB_RULES='\\"evdev\\"' -DEFINES += DEFAULT_XKB_MODEL='\\"pc105\\"' -DEFINES += DEFAULT_XKB_LAYOUT='\\"us\\"' - -# Need to rename several files, qmake has problems processing a project when -# sub-directories contain files with an equal names. - -SOURCES += \ - $$PWD/xkbcommon/src/keysym-utf.c \ - $$PWD/xkbcommon/src/keymap.c \ - $$PWD/xkbcommon/src/keymap-priv.c \ - $$PWD/xkbcommon/src/utils.c \ - $$PWD/xkbcommon/src/atom.c \ - $$PWD/xkbcommon/src/compose/paths.c \ - $$PWD/xkbcommon/src/compose/parser.c \ - $$PWD/xkbcommon/src/compose/compose-state.c \ # renamed: keymap.c -> compose-state.c - $$PWD/xkbcommon/src/compose/table.c \ - $$PWD/xkbcommon/src/xkbcomp/xkbcomp-keymap.c \ # renamed: keymap.c -> xkbcomp-keymap.c - $$PWD/xkbcommon/src/xkbcomp/xkbcomp.c \ - $$PWD/xkbcommon/src/xkbcomp/keymap-dump.c \ - $$PWD/xkbcommon/src/xkbcomp/rules.c \ - $$PWD/xkbcommon/src/xkbcomp/expr.c \ - $$PWD/xkbcommon/src/xkbcomp/action.c \ - $$PWD/xkbcommon/src/xkbcomp/compat.c \ - $$PWD/xkbcommon/src/xkbcomp/types.c \ - $$PWD/xkbcommon/src/xkbcomp/scanner.c \ - $$PWD/xkbcommon/src/xkbcomp/xkbcomp-parser.c \ # renamed: parser.c -> xkbcomp-parser.c - $$PWD/xkbcommon/src/xkbcomp/ast-build.c \ - $$PWD/xkbcommon/src/xkbcomp/keywords.c \ - $$PWD/xkbcommon/src/xkbcomp/keycodes.c \ - $$PWD/xkbcommon/src/xkbcomp/vmod.c \ - $$PWD/xkbcommon/src/xkbcomp/include.c \ - $$PWD/xkbcommon/src/xkbcomp/symbols.c \ - $$PWD/xkbcommon/src/context-priv.c \ - $$PWD/xkbcommon/src/text.c \ - $$PWD/xkbcommon/src/context.c \ - $$PWD/xkbcommon/src/keysym.c \ - $$PWD/xkbcommon/src/utf8.c \ - $$PWD/xkbcommon/src/state.c - -TR_EXCLUDE += $$PWD/* diff --git a/src/3rdparty/xkbcommon/LICENSE b/src/3rdparty/xkbcommon/LICENSE deleted file mode 100644 index 3dcd0391fc..0000000000 --- a/src/3rdparty/xkbcommon/LICENSE +++ /dev/null @@ -1,215 +0,0 @@ -The following is a list of all copyright notices and license statements which -appear in the xkbcommon source tree. - -If making new contributions, the first form (i.e. Daniel Stone, Ran Benita, -etc) is vastly preferred. - -All licenses are derivative of the MIT/X11 license, mostly identical other -than no-endorsement clauses (e.g. paragraph 4 of The Open Group's license). - -These statements are split into two sections: one for the code compiled and -distributed as part of the libxkbcommon shared library and the code -component of all tests (i.e. everything under src/ and xkbcommon/, plus the -.c and .h files under test/), and another for the test data under test/data, -which is distributed with the xkbcommon source tarball, but not installed to -the system. - - -BEGINNING OF SOFTWARE COPYRIGHT/LICENSE STATEMENTS: - - -------------------------------------------------------------------------------- - -Copyright © 2009-2012, 2016 Daniel Stone -Copyright © 2012 Ran Benita -Copyright © 2010, 2012 Intel Corporation -Copyright © 2008, 2009 Dan Nicholson -Copyright © 2010 Francisco Jerez - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------------- - - -Copyright 1985, 1987, 1988, 1990, 1998 The Open Group - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the authors or their -institutions shall not be used in advertising or otherwise to promote the -sale, use or other dealings in this Software without prior written -authorization from the authors. - - -------------------------------------------------------------------------------- - - -Copyright (c) 1993, 1994, 1995, 1996 by Silicon Graphics Computer Systems, Inc. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -------------------------------------------------------------------------------- - - -Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - -------------------------------------------------------------------------------- - - -Copyright (C) 2011 Joseph Adams - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -------------------------------------------------------------------------------- - - - -END OF SOFTWARE COPYRIGHT/LICENSE STATEMENTS - - -BEGINNING OF LICENSE STATEMENTS FOR UNDISTRIBUTED DATA FILES IN test/data, -derived from xkeyboard-config: - - - -------------------------------------------------------------------------------- - -Copyright 1996 by Joseph Moss -Copyright (C) 2002-2007 Free Software Foundation, Inc. -Copyright (C) Dmitry Golubev , 2003-2004 -Copyright (C) 2004, Gregory Mokhin -Copyright (C) 2006 Erdal Ronahî - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of the copyright holder(s) not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. The copyright holder(s) makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -THE COPYRIGHT HOLDER(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - -------------------------------------------------------------------------------- - - Copyright 1992 by Oki Technosystems Laboratory, Inc. - Copyright 1992 by Fuji Xerox Co., Ltd. - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of Oki Technosystems -Laboratory and Fuji Xerox not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. -Oki Technosystems Laboratory and Fuji Xerox make no representations -about the suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -OKI TECHNOSYSTEMS LABORATORY AND FUJI XEROX DISCLAIM ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OKI TECHNOSYSTEMS -LABORATORY AND FUJI XEROX BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE -OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/3rdparty/xkbcommon/NEWS b/src/3rdparty/xkbcommon/NEWS deleted file mode 100644 index 50b01a3b5f..0000000000 --- a/src/3rdparty/xkbcommon/NEWS +++ /dev/null @@ -1,404 +0,0 @@ -libxkbcommon 0.8.2 - 2018-08-05 -================== - -- Fix various problems found with fuzzing (see commit messages for - more details): - - - Fix a few NULL-dereferences, out-of-bounds access and undefined behavior - in the XKB text format parser. - - -libxkbcommon 0.8.1 - 2018-08-03 -================== - -- Fix various problems found in the meson build (see commit messages for more - details): - - - Fix compilation on Darwin. - - - Fix compilation of the x11 tests and demos when XCB is installed in a - non-standard location. - - - Fix xkbcommon-x11.pc missing the Requires specification. - -- Fix various problems found with fuzzing and Coverity (see commit messages for - more details): - - - Fix stack overflow in the XKB text format parser when evaluating boolean - negation. - - - Fix NULL-dereferences in the XKB text format parser when some unsupported - tokens appear (the tokens are still parsed for backward compatibility). - - - Fix NULL-dereference in the XKB text format parser when parsing an - xkb_geometry section. - - - Fix an infinite loop in the Compose text format parser on some inputs. - - - Fix an invalid free() when using multiple keysyms. - -- Replace the Unicode characters for the leftanglebracket and rightanglebracket - keysyms from the deprecated LEFT/RIGHT-POINTING ANGLE BRACKET to - MATHEMATICAL LEFT/RIGHT ANGLE BRACKET. - -- Reject out-of-range Unicode codepoints in xkb_keysym_to_utf8 and - xkb_keysym_to_utf32. - - -libxkbcommon 0.8.0 - 2017-12-15 -================== - -- Added xkb_keysym_to_{upper,lower} to perform case-conversion directly on - keysyms. This is useful in some odd cases, but working with the Unicode - representations should be preferred when possible. - -- Added Unicode conversion rules for the signifblank and permille keysyms. - -- Fixed a bug in the parsing of XKB key type definitions where the number - of levels were determined by the number of level *names*. Keymaps which - omit level names were hence miscompiled. - - This regressed in version 0.4.3. Keymaps from xkeyboard-config were not - affected since they don't omit level names. - -- New API: - xkb_keysym_to_upper() - xkb_keysym_to_lower() - - -libxkbcommon 0.7.2 - 2017-08-04 -================== - -- Added a Meson build system as an alternative to existing autotools build - system. - - The intent is to remove the autotools build in one of the next releases. - Please try to convert to it and report any problems. - - See http://mesonbuild.com/Quick-guide.html for basic usage, the - meson_options.txt for the project-specific configuration options, - and the PACKAGING file for more details. - - There are some noteworthy differences compared to the autotools build: - - - Feature auto-detection is not performed. By default, all features are - enabled (currently: docs, x11, wayland). The build fails if any of - the required dependencies are not available. To disable a feature, - pass -Denable-=false to meson. - - - The libraries are either installed as shared or static, as specified - by the -Ddefault_library=shared/static option. With autotools, both - versions are installed by default. - - - xorg-util-macros is not used. - - - A parser generator (bison/byacc) is always required - there is no - fallback to pre-generated output bundled in the tarball, as there is - in autotools. - -- Removed Android.mk support. - -- Removed the *-uninstalled.pc pkgconfig files. - -- Ported the interactive-wayland demo program to v6 of the xdg-shell - protocol. - -- Added new keysym definitions from xproto. - -- New API: - XKB_KEY_XF86Keyboard - XKB_KEY_XF86WWAN - XKB_KEY_XF86RFKill - XKB_KEY_XF86AudioPreset - - -libxkbcommon 0.7.1 - 2017-01-18 -================== - -- Fixed various reported problems when the current locale is tr_TR.UTF-8. - - The function xkb_keysym_from_name() used to perform case-insensitive - string comparisons in a locale-dependent way, but required it to to - work as in the C/ASCII locale (the so called "Turkish i problem"). - - The function is now no longer affected by the current locale. - -- Fixed compilation in NetBSD. - - -libxkbcommon 0.7.0 - 2016-11-11 -================== - -- Added support for different "modes" of calculating consumed modifiers. - The existing mode, based on the XKB standard, has proven to be - unintuitive in various shortcut implementations. - - A new mode, based on the calculation used by the GTK toolkit, is added. - This mode is less eager to declare a modifier as consumed. - -- Added a new interactive demo program using the Wayland protocol. - See the PACKAGING file for the new (optional) test dependencies. - -- Fixed a compilation error on GNU Hurd. - -- New API: - enum xkb_consumed_mode - XKB_CONSUMED_MODE_XKB - XKB_CONSUMED_MODE_GTK - xkb_state_key_get_consumed_mods2 - xkb_state_mod_index_is_consumed2 - - -libxkbcommon 0.6.1 - 2016-04-08 -================== - -- Added LICENSE to distributed files in tarball releases. - -- Minor typo fix in xkb_keymap_get_as_string() documentation. - - -libxkbcommon 0.6.0 - 2016-03-16 -================== - -- If the XKB_CONFIG_ROOT environment variable is set, it is used as the XKB - configuration root instead of the path determined at build time. - -- Tests and benchmarks now build correctly on OSX. - -- An XKB keymap provides a name for each key it defines. Traditionally, - these names are limited to at most 4 characters, and are thus somewhat - obscure, but might still be useful (xkbcommon lifts the 4 character limit). - - The new functions xkb_keymap_key_get_name() and xkb_keymap_key_by_name() - can be used to get the name of a key or find a key by name. Note that - a key may have aliases. - -- Documentation improvements. - -- New API: - xkb_keymap_key_by_name() - xkb_keymap_key_get_name() - - -libxkbcommon 0.5.0 - 2014-10-18 -================== - -- Added support for Compose/dead keys in a new module (included in - libxkbcommon). See the documentation or the - xkbcommon/xkbcommon-compose.h header file for more details. - -- Improved and reordered some sections of the documentation. - -- The doxygen HTML pages were made nicer to read. - -- Most tests now run also on non-linux platforms. - -- A warning is emitted by default about RMLVO values which are not used - during keymap compilation, which are most often a user misconfiguration. - For example, "terminate:ctrl_alt_backspace" instead of - "terminate:ctrl_alt_bksp". - -- Added symbol versioning for libxkbcommon and libxkbcommon-x11. - Note: binaries compiled against this and future versions will not be - able to link against the previous versions of the library. - -- Removed several compatablity symbols from the binary (the API isn't - affected). This affects binaries which - - 1. Were compiled against a pre-stable (<0.2.0) version of libxkbcommon, and - 2. Are linked against the this or later version of libxkbcommon. - - Such a scenario is likely to fail already. - -- If Xvfb is not available, the x11comp test is now correctly skipped - instead of hanging. - -- Benchmarks were moved to a separate bench/ directory. - -- Build fixes from OpenBSD. - -- Fixed a bug where key type entries such as "map[None] = Level2;" were - ignored. - -- New API: - XKB_COMPOSE_* - xkb_compose_* - - -libxkbcommon 0.4.3 - 2014-08-19 -================== - -- Fixed a bug which caused xkb_x11_keymap_new_from_device() to misrepresent - modifiers for some keymaps. - - https://github.com/xkbcommon/libxkbcommon/issues/9 - -- Fixed a bug which caused xkb_x11_keymap_new_from_device() to ignore XKB - PrivateAction's. - -- Modifiers are now always fully resolved after xkb_state_update_mask(). - Previously the given state components were used as-is, without - considering virtual modifier mappings. - Note: this only affects non-standard uses of xkb_state_update_mask(). - -- Added a test for xkbcommon-x11, "x11comp". The test uses the system's - Xvfb server and xkbcomp. If they do not exist or fail, the test is - skipped. - -- Fixed memory leaks after parse errors in the XKB yacc parser. - The fix required changes which are currently incompatible with byacc. - - -libxkbcommon 0.4.2 - 2014-05-15 -================== - -- Fixed a bug where explicitly passing "--enable-x11" to ./configure would - in fact disable it (regressed in 0.4.1). - -- Added @since version annotations to the API documentation for everything - introduced after the initial stable release (0.2.0). - -- Added a section to the documentation about keysym transformations, and - clarified which functions perform a given transformation. - -- XKB files which fail to compile during keymap construction can no longer - have any effect on the resulting keymap: changes are only applied when - the entire compilation succeeds. - Note: this was a minor correctness issue inherited from xkbcomp. - -- Fix an out-of-bounds array access in src/x11/util.c:adopt_atoms() - error-handling code. - Note: it seems impossible to trigger in the current code since the input - size cannot exceed the required size. - - -libxkbcommon 0.4.1 - 2014-03-27 -================== - -- Converted README to markdown and added a Quick Guide to the - documentation, which breezes through the most common parts of - xkbcommon. - -- Added two new functions, xkb_state_key_get_utf{8,32}(). They - combine the operations of xkb_state_key_get_syms() and - xkb_keysym_to_utf{8,32}(), and provide a nicer interface for it - (espcially for multiple-keysyms-per-level). - -- The xkb_state_key_get_utf{8,32}() functions now apply Control - transformation: when the Control modifier is active, the string - is converted to an appropriate control character. - This matches the behavior of libX11's XLookupString(3), and - required by the XKB specification: - https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Control_Modifier - - https://bugs.freedesktop.org/show_bug.cgi?id=75892 - -- The consumed modifiers for a key are now calculated similarly - to libX11. The previous behavior caused a bug where Shift would - not cancel an active Caps Lock. - -- Make xkbcommon-x11 work with the keymap reported by the XQuartz - X server. - - https://bugs.freedesktop.org/show_bug.cgi?id=75798 - -- Reduce memory usage during keymap compilation some more. - -- New API: - xkb_state_key_get_consumed_mods() - xkb_state_key_get_utf8() - xkb_state_key_get_utf32() - -- Deprecated API: - XKB_MAP_COMPILE_PLACEHOLDER, XKB_MAP_NO_FLAGS - use XKB_KEYMAP_NO_FLAGS instead. - -- Bug fixes. - - -libxkbcommon 0.4.0 - 2014-02-02 -================== - -- Add a new add-on library, xkbcommon-x11, to support creating keymaps - with the XKB X11 protocol, by querying the X server directly. - See the xkbcommon/xkbcommon-x11.h header file for more details. - This library requires libxcb-xkb >= 1.10, and is enabled by default. - It can be disabled with the --disable-x11 configure switch. - Distributions are encouraged to split the necessary files for this - library (libxkbcommon-x11.so, xkbcommon-x11.pc, xkbcommon/xkbcommon-x11.h) - to a separate package, such that the main package does not depend on - X11 libraries. - -- Fix the keysym <-> name lookup table to not require huge amounts of - relocations. - -- Fix a bug in the keysym <-> name lookup, whereby lookup might fail in - some rare cases. - -- Reduce memory usage during keymap compilation. - -- New API: - New keysyms from xproto 7.0.25 (German T3 layout keysyms). - XKB_MOD_NAME_NUM for the usual NumLock modifier. - xkb_x11_* types and functions, XKB_X11_* constants. - - -libxkbcommon 0.3.2 - 2013-11-22 -================== - -- Log messages from the library now look like "xkbcommon: ERROR" by - default, instead of xkbcomp-like "Error: ". - -- Apply capitalization transformation on keysyms in - xkb_keysym_get_one_sym(), to match the behavior specified in the XKB - specification: - https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Lock_Modifier - -- Support byacc for generating the parser, in addition to Bison. - -- New API: - XKB_KEY_XF86AudioMicMute keysym from xproto 7.0.24. - XKB_KEYSYM_NO_FLAGS - XKB_CONTEXT_NO_FLAGS - XKB_MAP_COMPILE_NO_FLAGS - -- Bug fixes. - - -libxkbcommon 0.3.1 - 2013-06-03 -================== - -- Replace the flex scanner with a hand-written one. flex is no longer - a build requirement. - -- New API: - xkb_keymap_min_keycode() - xkb_keymap_max_keycode() - xkb_keymap_key_for_each() - - -libxkbcommon 0.3.0 - 2013-04-01 -================== - -- Allow passing NULL to *_unref() functions; do nothing instead of - crashing. - -- The functions xkb_keymap_num_levels_for_key() and - xkb_keymap_get_syms_by_level() now allow out-of-range values for the - 'layout' parameter. The functions now wrap the value around the number - of layouts instead of failing. - -- The function xkb_keysym_get_name() now types unicode keysyms in - uppercase and 0-padding, to match the format used by XKeysymToString(). - -- Building Linux-specific tests is no longer attempted on non-Linux - environments. - -- The function xkb_keymap_new_from_names() now accepts a NULL value for - the 'names' parameter, instead of failing. This is equivalent to passing - a 'struct xkb_rule_names' with all fields set to NULL. - -- New API: - xkb_keymap_new_from_buffer() - -- Bug fixes. diff --git a/src/3rdparty/xkbcommon/README.md b/src/3rdparty/xkbcommon/README.md deleted file mode 100644 index b8ae50de77..0000000000 --- a/src/3rdparty/xkbcommon/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# libxkbcommon - -libxkbcommon is a keyboard keymap compiler and support library which -processes a reduced subset of keymaps as defined by the XKB (X Keyboard -Extension) specification. It also contains a module for handling Compose -and dead keys. - -## Quick Guide - -See [Quick Guide](doc/quick-guide.md). - -## Building - -libxkbcommon is built with [Meson](http://mesonbuild.com/): - - meson setup build - ninja -C build - -To build for use with Wayland, you can disable X11 support while still -using the X11 keyboard configuration resource files thusly: - - meson setup build \ - -Denable-x11=false \ - -Dxkb-config-root=/usr/share/X11/xkb \ - -Dx-locale-root=/usr/share/X11/locale - ninja -C build - -## API - -While libxkbcommon's API is somewhat derived from the classic XKB API as found -in X11/extensions/XKB.h and friends, it has been substantially reworked to -expose fewer internal details to clients. - -See the [API Documentation](https://xkbcommon.org/doc/current/modules.html). - -## Dataset - -libxkbcommon does not distribute a keymap dataset itself, other than for -testing purposes. The most common dataset is xkeyboard-config, which is used -by all current distributions for their X11 XKB data. More information on -xkeyboard-config is available here: - https://www.freedesktop.org/wiki/Software/XKeyboardConfig - -The dataset for Compose is distributed in libX11, as part of the X locale -data. - -## Relation to X11 - -See [Compatibility](doc/compat.md) notes. - -## Development - -An extremely rudimentary homepage can be found at - https://xkbcommon.org - -xkbcommon is maintained in git at - https://github.com/xkbcommon/libxkbcommon - -Patches are always welcome, and may be sent to either - or -or through github. - -Bug reports are also welcome, and may be filed either at - Bugzilla https://bugs.freedesktop.org/describecomponents.cgi?product=libxkbcommon -or - Github https://github.com/xkbcommon/libxkbcommon/issues - -The maintainers are -- Daniel Stone -- Ran Benita - -## Credits - -Many thanks are due to Dan Nicholson for his heroic work in getting xkbcommon -off the ground initially. diff --git a/src/3rdparty/xkbcommon/qt_attribution.json b/src/3rdparty/xkbcommon/qt_attribution.json deleted file mode 100644 index 215a4513f3..0000000000 --- a/src/3rdparty/xkbcommon/qt_attribution.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Id": "xkbcommon", - "Name": "xkbcommon", - "QDocModule": "qtgui", - "QtUsage": "Used in xcb platform plugin. Configure with -system-xkbcommon-x11 to avoid.", - - "Description": "xkbcommon is a keymap compiler and support library which processes a reduced subset of keymaps as defined by the XKB specification.", - "Homepage": "http://xkbcommon.org/", - "Version": "0.8.2 + subsequent commits up to 31f1f355700870c6615399fbfa7934934b3a9a57", - "License": "MIT Licenses (with no-advertisement clause)", - "LicenseId": "MIT", - "LicenseFile": "LICENSE", - "Copyright": "Copyright 2009-2012, 2016 Daniel Stone -Copyright 2012 Ran Benita -Copyright 2010, 2012 Intel Corporation -Copyright 2008, 2009 Dan Nicholson -Copyright 2010 Francisco Jerez -Copyright 1985, 1987, 1988, 1990, 1998 The Open Group -Copyright 1993, 1994, 1995, 1996 by Silicon Graphics Computer Systems, Inc. -Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. -Copyright 2011 Joseph Adams -Copyright 1996 by Joseph Moss -Copyright 2002-2007 Free Software Foundation, Inc. -Copyright 2003-2004 Dmitry Golubev -Copyright 2004, Gregory Mokhin -Copyright 2006 Erdal Ronahî -Copyright 1992 by Oki Technosystems Laboratory, Inc. -Copyright 1992 by Fuji Xerox Co., Ltd." -} diff --git a/src/3rdparty/xkbcommon/src/atom.c b/src/3rdparty/xkbcommon/src/atom.c deleted file mode 100644 index 044f56681a..0000000000 --- a/src/3rdparty/xkbcommon/src/atom.c +++ /dev/null @@ -1,225 +0,0 @@ -/*********************************************************** - * Copyright 1987, 1998 The Open Group - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation. - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of The Open Group shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from The Open Group. - * - * - * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Digital not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - ******************************************************************/ - -/************************************************************ - * Copyright 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#include "utils.h" -#include "atom.h" - -struct atom_node { - xkb_atom_t left, right; - xkb_atom_t atom; - unsigned int fingerprint; - char *string; -}; - -struct atom_table { - xkb_atom_t root; - darray(struct atom_node) table; -}; - -struct atom_table * -atom_table_new(void) -{ - struct atom_table *table; - - table = calloc(1, sizeof(*table)); - if (!table) - return NULL; - - darray_init(table->table); - /* The original throw-away root is here, at the illegal atom 0. */ - darray_resize0(table->table, 1); - - return table; -} - -void -atom_table_free(struct atom_table *table) -{ - struct atom_node *node; - - if (!table) - return; - - darray_foreach(node, table->table) - free(node->string); - darray_free(table->table); - free(table); -} - -const char * -atom_text(struct atom_table *table, xkb_atom_t atom) -{ - if (atom == XKB_ATOM_NONE || atom >= darray_size(table->table)) - return NULL; - - return darray_item(table->table, atom).string; -} - -static bool -find_atom_pointer(struct atom_table *table, const char *string, size_t len, - xkb_atom_t **atomp_out, unsigned int *fingerprint_out) -{ - xkb_atom_t *atomp = &table->root; - unsigned int fingerprint = 0; - bool found = false; - - for (size_t i = 0; i < (len + 1) / 2; i++) { - fingerprint = fingerprint * 27 + string[i]; - fingerprint = fingerprint * 27 + string[len - 1 - i]; - } - - while (*atomp != XKB_ATOM_NONE) { - struct atom_node *node = &darray_item(table->table, *atomp); - - if (fingerprint < node->fingerprint) { - atomp = &node->left; - } - else if (fingerprint > node->fingerprint) { - atomp = &node->right; - } - else { - /* Now start testing the strings. */ - const int cmp = strncmp(string, node->string, len); - if (cmp < 0 || (cmp == 0 && len < strlen(node->string))) { - atomp = &node->left; - } - else if (cmp > 0) { - atomp = &node->right; - } - else { - found = true; - break; - } - } - } - - if (fingerprint_out) - *fingerprint_out = fingerprint; - if (atomp_out) - *atomp_out = atomp; - return found; -} - -xkb_atom_t -atom_lookup(struct atom_table *table, const char *string, size_t len) -{ - xkb_atom_t *atomp; - - if (!string) - return XKB_ATOM_NONE; - - if (!find_atom_pointer(table, string, len, &atomp, NULL)) - return XKB_ATOM_NONE; - - return *atomp; -} - -/* - * If steal is true, we do not strdup @string; therefore it must be - * dynamically allocated, NUL-terminated, not be free'd by the caller - * and not be used afterwards. Use to avoid some redundant allocations. - */ -xkb_atom_t -atom_intern(struct atom_table *table, const char *string, size_t len, - bool steal) -{ - xkb_atom_t *atomp; - struct atom_node node; - unsigned int fingerprint; - - if (!string) - return XKB_ATOM_NONE; - - if (find_atom_pointer(table, string, len, &atomp, &fingerprint)) { - if (steal) - free(UNCONSTIFY(string)); - return *atomp; - } - - if (steal) { - node.string = UNCONSTIFY(string); - } - else { - node.string = strndup(string, len); - if (!node.string) - return XKB_ATOM_NONE; - } - - node.left = node.right = XKB_ATOM_NONE; - node.fingerprint = fingerprint; - node.atom = darray_size(table->table); - /* Do this before the append, as it may realloc and change the offsets. */ - *atomp = node.atom; - darray_append(table->table, node); - - return node.atom; -} diff --git a/src/3rdparty/xkbcommon/src/atom.h b/src/3rdparty/xkbcommon/src/atom.h deleted file mode 100644 index 1bf8e49b8e..0000000000 --- a/src/3rdparty/xkbcommon/src/atom.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright © 2009 Dan Nicholson - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef ATOM_H -#define ATOM_H - -typedef uint32_t xkb_atom_t; - -#define XKB_ATOM_NONE 0 - -struct atom_table; - -struct atom_table * -atom_table_new(void); - -void -atom_table_free(struct atom_table *table); - -xkb_atom_t -atom_lookup(struct atom_table *table, const char *string, size_t len); - -xkb_atom_t -atom_intern(struct atom_table *table, const char *string, size_t len, - bool steal); - -const char * -atom_text(struct atom_table *table, xkb_atom_t atom); - -#endif /* ATOM_H */ diff --git a/src/3rdparty/xkbcommon/src/compose/compose-state.c b/src/3rdparty/xkbcommon/src/compose/compose-state.c deleted file mode 100644 index 8657ff7e17..0000000000 --- a/src/3rdparty/xkbcommon/src/compose/compose-state.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "table.h" -#include "utils.h" -#include "keysym.h" - -struct xkb_compose_state { - int refcnt; - enum xkb_compose_state_flags flags; - struct xkb_compose_table *table; - - /* - * Offsets into xkb_compose_table::nodes. - * - * They maintain the current and previous position in the trie; see - * xkb_compose_state_feed(). - * - * This is also sufficient for inferring the current status; see - * xkb_compose_state_get_status(). - */ - uint32_t prev_context; - uint32_t context; -}; - -XKB_EXPORT struct xkb_compose_state * -xkb_compose_state_new(struct xkb_compose_table *table, - enum xkb_compose_state_flags flags) -{ - struct xkb_compose_state *state; - - state = calloc(1, sizeof(*state)); - if (!state) - return NULL; - - state->refcnt = 1; - state->table = xkb_compose_table_ref(table); - - state->flags = flags; - state->prev_context = 0; - state->context = 0; - - return state; -} - -XKB_EXPORT struct xkb_compose_state * -xkb_compose_state_ref(struct xkb_compose_state *state) -{ - state->refcnt++; - return state; -} - -XKB_EXPORT void -xkb_compose_state_unref(struct xkb_compose_state *state) -{ - if (!state || --state->refcnt > 0) - return; - - xkb_compose_table_unref(state->table); - free(state); -} - -XKB_EXPORT struct xkb_compose_table * -xkb_compose_state_get_compose_table(struct xkb_compose_state *state) -{ - return state->table; -} - -XKB_EXPORT enum xkb_compose_feed_result -xkb_compose_state_feed(struct xkb_compose_state *state, xkb_keysym_t keysym) -{ - uint32_t context; - const struct compose_node *node; - - /* - * Modifiers do not affect the sequence directly. In particular, - * they do not cancel a sequence; otherwise it'd be impossible to - * have a sequence like (needs Shift in the middle). - * - * The following test is not really accurate - in order to test if - * a key is "modifier key", we really need the keymap, but we don't - * have it here. However, this is (approximately) what libX11 does - * as well. - */ - if (xkb_keysym_is_modifier(keysym)) - return XKB_COMPOSE_FEED_IGNORED; - - node = &darray_item(state->table->nodes, state->context); - - context = (node->is_leaf ? 0 : node->u.successor); - node = &darray_item(state->table->nodes, context); - - while (node->keysym != keysym && node->next != 0) { - context = node->next; - node = &darray_item(state->table->nodes, context); - } - - if (node->keysym != keysym) - context = 0; - - state->prev_context = state->context; - state->context = context; - return XKB_COMPOSE_FEED_ACCEPTED; -} - -XKB_EXPORT void -xkb_compose_state_reset(struct xkb_compose_state *state) -{ - state->prev_context = 0; - state->context = 0; -} - -XKB_EXPORT enum xkb_compose_status -xkb_compose_state_get_status(struct xkb_compose_state *state) -{ - const struct compose_node *prev_node, *node; - - prev_node = &darray_item(state->table->nodes, state->prev_context); - node = &darray_item(state->table->nodes, state->context); - - if (state->context == 0 && !prev_node->is_leaf) - return XKB_COMPOSE_CANCELLED; - - if (state->context == 0) - return XKB_COMPOSE_NOTHING; - - if (!node->is_leaf) - return XKB_COMPOSE_COMPOSING; - - return XKB_COMPOSE_COMPOSED; -} - -XKB_EXPORT int -xkb_compose_state_get_utf8(struct xkb_compose_state *state, - char *buffer, size_t size) -{ - const struct compose_node *node = - &darray_item(state->table->nodes, state->context); - - if (!node->is_leaf) - goto fail; - - /* If there's no string specified, but only a keysym, try to do the - * most helpful thing. */ - if (node->u.leaf.utf8 == 0 && node->u.leaf.keysym != XKB_KEY_NoSymbol) { - char name[64]; - int ret; - - ret = xkb_keysym_to_utf8(node->u.leaf.keysym, name, sizeof(name)); - if (ret < 0 || ret == 0) { - /* ret < 0 is impossible. - * ret == 0 means the keysym has no string representation. */ - goto fail; - } - - return snprintf(buffer, size, "%s", name); - } - - return snprintf(buffer, size, "%s", - &darray_item(state->table->utf8, node->u.leaf.utf8)); - -fail: - if (size > 0) - buffer[0] = '\0'; - return 0; -} - -XKB_EXPORT xkb_keysym_t -xkb_compose_state_get_one_sym(struct xkb_compose_state *state) -{ - const struct compose_node *node = - &darray_item(state->table->nodes, state->context); - if (!node->is_leaf) - return XKB_KEY_NoSymbol; - return node->u.leaf.keysym; -} diff --git a/src/3rdparty/xkbcommon/src/compose/parser.c b/src/3rdparty/xkbcommon/src/compose/parser.c deleted file mode 100644 index 439d404f06..0000000000 --- a/src/3rdparty/xkbcommon/src/compose/parser.c +++ /dev/null @@ -1,737 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/****************************************************************** - - Copyright 1992 by Oki Technosystems Laboratory, Inc. - Copyright 1992 by Fuji Xerox Co., Ltd. - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of Oki Technosystems -Laboratory and Fuji Xerox not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. -Oki Technosystems Laboratory and Fuji Xerox make no representations -about the suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -OKI TECHNOSYSTEMS LABORATORY AND FUJI XEROX DISCLAIM ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OKI TECHNOSYSTEMS -LABORATORY AND FUJI XEROX BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE -OR PERFORMANCE OF THIS SOFTWARE. - - Author: Yasuhiro Kawai Oki Technosystems Laboratory - Author: Kazunori Nishihara Fuji Xerox - -******************************************************************/ - -#include - -#include "utils.h" -#include "scanner-utils.h" -#include "table.h" -#include "paths.h" -#include "utf8.h" -#include "parser.h" - -#define MAX_LHS_LEN 10 -#define MAX_INCLUDE_DEPTH 5 - -/* - * Grammar adapted from libX11/modules/im/ximcp/imLcPrs.c. - * See also the XCompose(5) manpage. - * - * FILE ::= { [PRODUCTION] [COMMENT] "\n" | INCLUDE } - * INCLUDE ::= "include" '"' INCLUDE_STRING '"' - * PRODUCTION ::= LHS ":" RHS [ COMMENT ] - * COMMENT ::= "#" {} - * LHS ::= EVENT { EVENT } - * EVENT ::= [MODIFIER_LIST] "<" keysym ">" - * MODIFIER_LIST ::= (["!"] {MODIFIER} ) | "None" - * MODIFIER ::= ["~"] MODIFIER_NAME - * MODIFIER_NAME ::= ("Ctrl"|"Lock"|"Caps"|"Shift"|"Alt"|"Meta") - * RHS ::= ( STRING | keysym | STRING keysym ) - * STRING ::= '"' { CHAR } '"' - * CHAR ::= GRAPHIC_CHAR | ESCAPED_CHAR - * GRAPHIC_CHAR ::= locale (codeset) dependent code - * ESCAPED_CHAR ::= ('\\' | '\"' | OCTAL | HEX ) - * OCTAL ::= '\' OCTAL_CHAR [OCTAL_CHAR [OCTAL_CHAR]] - * OCTAL_CHAR ::= (0|1|2|3|4|5|6|7) - * HEX ::= '\' (x|X) HEX_CHAR [HEX_CHAR]] - * HEX_CHAR ::= (0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|a|b|c|d|e|f) - * - * INCLUDE_STRING is a filesystem path, with the following %-expansions: - * %% - '%'. - * %H - The user's home directory (the $HOME environment variable). - * %L - The name of the locale specific Compose file (e.g., - * "/usr/share/X11/locale//Compose"). - * %S - The name of the system directory for Compose files (e.g., - * "/usr/share/X11/locale"). - */ - -enum rules_token { - TOK_END_OF_FILE = 0, - TOK_END_OF_LINE, - TOK_INCLUDE, - TOK_INCLUDE_STRING, - TOK_LHS_KEYSYM, - TOK_COLON, - TOK_BANG, - TOK_TILDE, - TOK_STRING, - TOK_IDENT, - TOK_ERROR -}; - -/* Values returned with some tokens, like yylval. */ -union lvalue { - struct { - /* Still \0-terminated. */ - const char *str; - size_t len; - } string; -}; - -static enum rules_token -lex(struct scanner *s, union lvalue *val) -{ -skip_more_whitespace_and_comments: - /* Skip spaces. */ - while (is_space(peek(s))) - if (next(s) == '\n') - return TOK_END_OF_LINE; - - /* Skip comments. */ - if (chr(s, '#')) { - skip_to_eol(s); - goto skip_more_whitespace_and_comments; - } - - /* See if we're done. */ - if (eof(s)) return TOK_END_OF_FILE; - - /* New token. */ - s->token_line = s->line; - s->token_column = s->column; - s->buf_pos = 0; - - /* LHS Keysym. */ - if (chr(s, '<')) { - while (peek(s) != '>' && !eol(s) && !eof(s)) - buf_append(s, next(s)); - if (!chr(s, '>')) { - scanner_err(s, "unterminated keysym literal"); - return TOK_ERROR; - } - if (!buf_append(s, '\0')) { - scanner_err(s, "keysym literal is too long"); - return TOK_ERROR; - } - val->string.str = s->buf; - val->string.len = s->buf_pos; - return TOK_LHS_KEYSYM; - } - - /* Colon. */ - if (chr(s, ':')) - return TOK_COLON; - if (chr(s, '!')) - return TOK_BANG; - if (chr(s, '~')) - return TOK_TILDE; - - /* String literal. */ - if (chr(s, '\"')) { - while (!eof(s) && !eol(s) && peek(s) != '\"') { - if (chr(s, '\\')) { - uint8_t o; - if (chr(s, '\\')) { - buf_append(s, '\\'); - } - else if (chr(s, '"')) { - buf_append(s, '"'); - } - else if (chr(s, 'x') || chr(s, 'X')) { - if (hex(s, &o)) - buf_append(s, (char) o); - else - scanner_warn(s, "illegal hexadecimal escape sequence in string literal"); - } - else if (oct(s, &o)) { - buf_append(s, (char) o); - } - else { - scanner_warn(s, "unknown escape sequence (%c) in string literal", peek(s)); - /* Ignore. */ - } - } else { - buf_append(s, next(s)); - } - } - if (!chr(s, '\"')) { - scanner_err(s, "unterminated string literal"); - return TOK_ERROR; - } - if (!buf_append(s, '\0')) { - scanner_err(s, "string literal is too long"); - return TOK_ERROR; - } - if (!is_valid_utf8(s->buf, s->buf_pos - 1)) { - scanner_err(s, "string literal is not a valid UTF-8 string"); - return TOK_ERROR; - } - val->string.str = s->buf; - val->string.len = s->buf_pos; - return TOK_STRING; - } - - /* Identifier or include. */ - if (is_alpha(peek(s)) || peek(s) == '_') { - s->buf_pos = 0; - while (is_alnum(peek(s)) || peek(s) == '_') - buf_append(s, next(s)); - if (!buf_append(s, '\0')) { - scanner_err(s, "identifier is too long"); - return TOK_ERROR; - } - - if (streq(s->buf, "include")) - return TOK_INCLUDE; - - val->string.str = s->buf; - val->string.len = s->buf_pos; - return TOK_IDENT; - } - - /* Discard rest of line. */ - skip_to_eol(s); - - scanner_err(s, "unrecognized token"); - return TOK_ERROR; -} - -static enum rules_token -lex_include_string(struct scanner *s, struct xkb_compose_table *table, - union lvalue *val_out) -{ - while (is_space(peek(s))) - if (next(s) == '\n') - return TOK_END_OF_LINE; - - s->token_line = s->line; - s->token_column = s->column; - s->buf_pos = 0; - - if (!chr(s, '\"')) { - scanner_err(s, "include statement must be followed by a path"); - return TOK_ERROR; - } - - while (!eof(s) && !eol(s) && peek(s) != '\"') { - if (chr(s, '%')) { - if (chr(s, '%')) { - buf_append(s, '%'); - } - else if (chr(s, 'H')) { - const char *home = secure_getenv("HOME"); - if (!home) { - scanner_err(s, "%%H was used in an include statement, but the HOME environment variable is not set"); - return TOK_ERROR; - } - if (!buf_appends(s, home)) { - scanner_err(s, "include path after expanding %%H is too long"); - return TOK_ERROR; - } - } - else if (chr(s, 'L')) { - char *path = get_locale_compose_file_path(table->locale); - if (!path) { - scanner_err(s, "failed to expand %%L to the locale Compose file"); - return TOK_ERROR; - } - if (!buf_appends(s, path)) { - free(path); - scanner_err(s, "include path after expanding %%L is too long"); - return TOK_ERROR; - } - free(path); - } - else if (chr(s, 'S')) { - const char *xlocaledir = get_xlocaledir_path(); - if (!buf_appends(s, xlocaledir)) { - scanner_err(s, "include path after expanding %%S is too long"); - return TOK_ERROR; - } - } - else { - scanner_err(s, "unknown %% format (%c) in include statement", peek(s)); - return TOK_ERROR; - } - } else { - buf_append(s, next(s)); - } - } - if (!chr(s, '\"')) { - scanner_err(s, "unterminated include statement"); - return TOK_ERROR; - } - if (!buf_append(s, '\0')) { - scanner_err(s, "include path is too long"); - return TOK_ERROR; - } - val_out->string.str = s->buf; - val_out->string.len = s->buf_pos; - return TOK_INCLUDE_STRING; -} - -struct production { - xkb_keysym_t lhs[MAX_LHS_LEN]; - unsigned int len; - xkb_keysym_t keysym; - char string[256]; - /* At least one of these is true. */ - bool has_keysym; - bool has_string; - - /* The matching is as follows: (active_mods & modmask) == mods. */ - xkb_mod_mask_t modmask; - xkb_mod_mask_t mods; -}; - -static uint32_t -add_node(struct xkb_compose_table *table, xkb_keysym_t keysym) -{ - struct compose_node new = { - .keysym = keysym, - .next = 0, - .is_leaf = true, - }; - darray_append(table->nodes, new); - return darray_size(table->nodes) - 1; -} - -static void -add_production(struct xkb_compose_table *table, struct scanner *s, - const struct production *production) -{ - unsigned lhs_pos; - uint32_t curr; - struct compose_node *node; - - curr = 0; - node = &darray_item(table->nodes, curr); - - /* - * Insert the sequence to the trie, creating new nodes as needed. - * - * TODO: This can be sped up a bit by first trying the path that the - * previous production took, and only then doing the linear search - * through the trie levels. This will work because sequences in the - * Compose files are often clustered by a common prefix; especially - * in the 1st and 2nd keysyms, which is where the largest variation - * (thus, longest search) is. - */ - for (lhs_pos = 0; lhs_pos < production->len; lhs_pos++) { - while (production->lhs[lhs_pos] != node->keysym) { - if (node->next == 0) { - uint32_t next = add_node(table, production->lhs[lhs_pos]); - /* Refetch since add_node could have realloc()ed. */ - node = &darray_item(table->nodes, curr); - node->next = next; - } - - curr = node->next; - node = &darray_item(table->nodes, curr); - } - - if (lhs_pos + 1 == production->len) - break; - - if (node->is_leaf) { - if (node->u.leaf.utf8 != 0 || - node->u.leaf.keysym != XKB_KEY_NoSymbol) { - scanner_warn(s, "a sequence already exists which is a prefix of this sequence; overriding"); - node->u.leaf.utf8 = 0; - node->u.leaf.keysym = XKB_KEY_NoSymbol; - } - - { - uint32_t successor = add_node(table, production->lhs[lhs_pos + 1]); - /* Refetch since add_node could have realloc()ed. */ - node = &darray_item(table->nodes, curr); - node->is_leaf = false; - node->u.successor = successor; - } - } - - curr = node->u.successor; - node = &darray_item(table->nodes, curr); - } - - if (!node->is_leaf) { - scanner_warn(s, "this compose sequence is a prefix of another; skipping line"); - return; - } - - if (node->u.leaf.utf8 != 0 || node->u.leaf.keysym != XKB_KEY_NoSymbol) { - bool same_string = - (node->u.leaf.utf8 == 0 && !production->has_string) || - ( - node->u.leaf.utf8 != 0 && production->has_string && - streq(&darray_item(table->utf8, node->u.leaf.utf8), - production->string) - ); - bool same_keysym = - (node->u.leaf.keysym == XKB_KEY_NoSymbol && !production->has_keysym) || - ( - node->u.leaf.keysym != XKB_KEY_NoSymbol && production->has_keysym && - node->u.leaf.keysym == production->keysym - ); - if (same_string && same_keysym) { - scanner_warn(s, "this compose sequence is a duplicate of another; skipping line"); - return; - } - scanner_warn(s, "this compose sequence already exists; overriding"); - } - - if (production->has_string) { - node->u.leaf.utf8 = darray_size(table->utf8); - darray_append_items(table->utf8, production->string, - strlen(production->string) + 1); - } - if (production->has_keysym) { - node->u.leaf.keysym = production->keysym; - } -} - -/* Should match resolve_modifier(). */ -#define ALL_MODS_MASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)) - -static xkb_mod_index_t -resolve_modifier(const char *name) -{ - static const struct { - const char *name; - xkb_mod_index_t mod; - } mods[] = { - { "Shift", 0 }, - { "Ctrl", 2 }, - { "Alt", 3 }, - { "Meta", 3 }, - { "Lock", 1 }, - { "Caps", 1 }, - }; - - for (unsigned i = 0; i < ARRAY_SIZE(mods); i++) - if (streq(name, mods[i].name)) - return mods[i].mod; - - return XKB_MOD_INVALID; -} - -static bool -parse(struct xkb_compose_table *table, struct scanner *s, - unsigned include_depth); - -static bool -do_include(struct xkb_compose_table *table, struct scanner *s, - const char *path, unsigned include_depth) -{ - FILE *file; - bool ok; - char *string; - size_t size; - struct scanner new_s; - - if (include_depth >= MAX_INCLUDE_DEPTH) { - scanner_err(s, "maximum include depth (%d) exceeded; maybe there is an include loop?", - MAX_INCLUDE_DEPTH); - return false; - } - - file = fopen(path, "r"); - if (!file) { - scanner_err(s, "failed to open included Compose file \"%s\": %s", - path, strerror(errno)); - return false; - } - - ok = map_file(file, &string, &size); - if (!ok) { - scanner_err(s, "failed to read included Compose file \"%s\": %s", - path, strerror(errno)); - goto err_file; - } - - scanner_init(&new_s, table->ctx, string, size, path, s->priv); - - ok = parse(table, &new_s, include_depth + 1); - if (!ok) - goto err_unmap; - -err_unmap: - unmap_file(string, size); -err_file: - fclose(file); - return ok; -} - -static bool -parse(struct xkb_compose_table *table, struct scanner *s, - unsigned include_depth) -{ - enum rules_token tok; - union lvalue val; - xkb_keysym_t keysym; - struct production production; - enum { MAX_ERRORS = 10 }; - int num_errors = 0; - -initial: - production.len = 0; - production.has_keysym = false; - production.has_string = false; - production.mods = 0; - production.modmask = 0; - - /* fallthrough */ - -initial_eol: - switch (tok = lex(s, &val)) { - case TOK_END_OF_LINE: - goto initial_eol; - case TOK_END_OF_FILE: - goto finished; - case TOK_INCLUDE: - goto include; - default: - goto lhs_tok; - } - -include: - switch (tok = lex_include_string(s, table, &val)) { - case TOK_INCLUDE_STRING: - goto include_eol; - default: - goto unexpected; - } - -include_eol: - switch (tok = lex(s, &val)) { - case TOK_END_OF_LINE: - if (!do_include(table, s, val.string.str, include_depth)) - goto fail; - goto initial; - default: - goto unexpected; - } - -lhs: - tok = lex(s, &val); -lhs_tok: - switch (tok) { - case TOK_COLON: - if (production.len <= 0) { - scanner_warn(s, "expected at least one keysym on left-hand side; skipping line"); - goto skip; - } - goto rhs; - case TOK_IDENT: - if (streq(val.string.str, "None")) { - production.mods = 0; - production.modmask = ALL_MODS_MASK; - goto lhs_keysym; - } - goto lhs_mod_list_tok; - case TOK_TILDE: - goto lhs_mod_list_tok; - case TOK_BANG: - production.modmask = ALL_MODS_MASK; - goto lhs_mod_list; - default: - goto lhs_keysym_tok; - } - -lhs_keysym: - tok = lex(s, &val); -lhs_keysym_tok: - switch (tok) { - case TOK_LHS_KEYSYM: - keysym = xkb_keysym_from_name(val.string.str, XKB_KEYSYM_NO_FLAGS); - if (keysym == XKB_KEY_NoSymbol) { - scanner_err(s, "unrecognized keysym \"%s\" on left-hand side", - val.string.str); - goto error; - } - if (production.len + 1 > MAX_LHS_LEN) { - scanner_warn(s, "too many keysyms (%d) on left-hand side; skipping line", - MAX_LHS_LEN + 1); - goto skip; - } - production.lhs[production.len++] = keysym; - production.mods = 0; - production.modmask = 0; - goto lhs; - default: - goto unexpected; - } - -lhs_mod_list: - tok = lex(s, &val); -lhs_mod_list_tok: { - bool tilde = false; - xkb_mod_index_t mod; - - if (tok != TOK_TILDE && tok != TOK_IDENT) - goto lhs_keysym_tok; - - if (tok == TOK_TILDE) { - tilde = true; - tok = lex(s, &val); - } - - if (tok != TOK_IDENT) - goto unexpected; - - mod = resolve_modifier(val.string.str); - if (mod == XKB_MOD_INVALID) { - scanner_err(s, "unrecognized modifier \"%s\"", - val.string.str); - goto error; - } - - production.modmask |= 1 << mod; - if (tilde) - production.mods &= ~(1 << mod); - else - production.mods |= 1 << mod; - - goto lhs_mod_list; - } - -rhs: - switch (tok = lex(s, &val)) { - case TOK_STRING: - if (production.has_string) { - scanner_warn(s, "right-hand side can have at most one string; skipping line"); - goto skip; - } - if (val.string.len <= 0) { - scanner_warn(s, "right-hand side string must not be empty; skipping line"); - goto skip; - } - if (val.string.len >= sizeof(production.string)) { - scanner_warn(s, "right-hand side string is too long; skipping line"); - goto skip; - } - strcpy(production.string, val.string.str); - production.has_string = true; - goto rhs; - case TOK_IDENT: - keysym = xkb_keysym_from_name(val.string.str, XKB_KEYSYM_NO_FLAGS); - if (keysym == XKB_KEY_NoSymbol) { - scanner_err(s, "unrecognized keysym \"%s\" on right-hand side", - val.string.str); - goto error; - } - if (production.has_keysym) { - scanner_warn(s, "right-hand side can have at most one keysym; skipping line"); - goto skip; - } - production.keysym = keysym; - production.has_keysym = true; - /* fallthrough */ - case TOK_END_OF_LINE: - if (!production.has_string && !production.has_keysym) { - scanner_warn(s, "right-hand side must have at least one of string or keysym; skipping line"); - goto skip; - } - add_production(table, s, &production); - goto initial; - default: - goto unexpected; - } - -unexpected: - if (tok != TOK_ERROR) - scanner_err(s, "unexpected token"); -error: - num_errors++; - if (num_errors <= MAX_ERRORS) - goto skip; - - scanner_err(s, "too many errors"); - goto fail; - -fail: - scanner_err(s, "failed to parse file"); - return false; - -skip: - while (tok != TOK_END_OF_LINE && tok != TOK_END_OF_FILE) - tok = lex(s, &val); - goto initial; - -finished: - return true; -} - -bool -parse_string(struct xkb_compose_table *table, const char *string, size_t len, - const char *file_name) -{ - struct scanner s; - scanner_init(&s, table->ctx, string, len, file_name, NULL); - if (!parse(table, &s, 0)) - return false; - /* Maybe the allocator can use the excess space. */ - darray_shrink(table->nodes); - darray_shrink(table->utf8); - return true; -} - -bool -parse_file(struct xkb_compose_table *table, FILE *file, const char *file_name) -{ - bool ok; - char *string; - size_t size; - - ok = map_file(file, &string, &size); - if (!ok) { - log_err(table->ctx, "Couldn't read Compose file %s: %s\n", - file_name, strerror(errno)); - return false; - } - - ok = parse_string(table, string, size, file_name); - unmap_file(string, size); - return ok; -} diff --git a/src/3rdparty/xkbcommon/src/compose/parser.h b/src/3rdparty/xkbcommon/src/compose/parser.h deleted file mode 100644 index 3f64a07402..0000000000 --- a/src/3rdparty/xkbcommon/src/compose/parser.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef COMPOSE_PARSER_H -#define COMPOSE_PARSER_H - -bool -parse_string(struct xkb_compose_table *table, - const char *string, size_t len, - const char *file_name); - -bool -parse_file(struct xkb_compose_table *table, - FILE *file, const char *file_name); - -#endif diff --git a/src/3rdparty/xkbcommon/src/compose/paths.c b/src/3rdparty/xkbcommon/src/compose/paths.c deleted file mode 100644 index e9d43d7e44..0000000000 --- a/src/3rdparty/xkbcommon/src/compose/paths.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright © 2014 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "utils.h" -#include "paths.h" - -enum resolve_name_direction { - LEFT_TO_RIGHT, - RIGHT_TO_LEFT, -}; - -const char * -get_xlocaledir_path(void) -{ - const char *dir = secure_getenv("XLOCALEDIR"); - if (!dir) - dir = XLOCALEDIR; - return dir; -} - -/* - * Files like compose.dir have the format LEFT: RIGHT. Lookup @name in - * such a file and return its matching value, according to @direction. - * @filename is relative to the xlocaledir. - */ -static char * -resolve_name(const char *filename, enum resolve_name_direction direction, - const char *name) -{ - int ret; - bool ok; - const char *xlocaledir; - char path[512]; - FILE *file; - char *string; - size_t string_size; - const char *end; - const char *s, *left, *right; - char *match; - size_t left_len, right_len, name_len; - - xlocaledir = get_xlocaledir_path(); - - ret = snprintf(path, sizeof(path), "%s/%s", xlocaledir, filename); - if (ret < 0 || (size_t) ret >= sizeof(path)) - return false; - - file = fopen(path, "r"); - if (!file) - return false; - - ok = map_file(file, &string, &string_size); - fclose(file); - if (!ok) - return false; - - s = string; - end = string + string_size; - name_len = strlen(name); - match = NULL; - - while (s < end) { - /* Skip spaces. */ - while (s < end && is_space(*s)) - s++; - - /* Skip comments. */ - if (s < end && *s == '#') { - while (s < end && *s != '\n') - s++; - continue; - } - - /* Get the left value. */ - left = s; - while (s < end && !is_space(*s) && *s != ':') - s++; - left_len = s - left; - - /* There's an optional colon between left and right. */ - if (s < end && *s == ':') - s++; - - /* Skip spaces. */ - while (s < end && is_space(*s)) - s++; - - /* Get the right value. */ - right = s; - while (s < end && !is_space(*s)) - s++; - right_len = s - right; - - /* Discard rest of line. */ - while (s < end && *s != '\n') - s++; - - if (direction == LEFT_TO_RIGHT) { - if (left_len == name_len && memcmp(left, name, left_len) == 0) { - match = strndup(right, right_len); - break; - } - } - else if (direction == RIGHT_TO_LEFT) { - if (right_len == name_len && memcmp(right, name, right_len) == 0) { - match = strndup(left, left_len); - break; - } - } - } - - unmap_file(string, string_size); - return match; -} - -char * -resolve_locale(const char *locale) -{ - char *alias = resolve_name("locale.alias", LEFT_TO_RIGHT, locale); - return alias ? alias : strdup(locale); -} - -const char * -get_xcomposefile_path(void) -{ - return secure_getenv("XCOMPOSEFILE"); -} - -char * -get_home_xcompose_file_path(void) -{ - int ret; - const char *home; - char *path; - - home = secure_getenv("HOME"); - if (!home) - return NULL; - - ret = asprintf(&path, "%s/.XCompose", home); - if (ret <0) - return NULL; - - return path; -} - -char * -get_locale_compose_file_path(const char *locale) -{ - char *resolved; - char *path; - - /* - * WARNING: Random workaround ahead. - * - * We currently do not support non-UTF-8 Compose files. The C/POSIX - * locale is specified to be the default fallback locale with an - * ASCII charset. But for some reason the compose.dir points the C - * locale to the iso8859-1/Compose file, which is not ASCII but - * ISO8859-1. Since this is bound to happen a lot, and since our API - * is UTF-8 based, and since 99% of the time a C locale is really just - * a misconfiguration for UTF-8, let's do the most helpful thing. - */ - if (streq(locale, "C")) - locale = "en_US.UTF-8"; - - resolved = resolve_name("compose.dir", RIGHT_TO_LEFT, locale); - if (!resolved) - return NULL; - - if (resolved[0] == '/') { - path = resolved; - } - else { - const char *xlocaledir = get_xlocaledir_path(); - int ret = asprintf(&path, "%s/%s", xlocaledir, resolved); - free(resolved); - if (ret < 0) - return NULL; - } - - return path; -} diff --git a/src/3rdparty/xkbcommon/src/compose/paths.h b/src/3rdparty/xkbcommon/src/compose/paths.h deleted file mode 100644 index 1d719af1b9..0000000000 --- a/src/3rdparty/xkbcommon/src/compose/paths.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright © 2014 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef COMPOSE_RESOLVE_H -#define COMPOSE_RESOLVE_H - -char * -resolve_locale(const char *locale); - -const char * -get_xlocaledir_path(void); - -const char * -get_xcomposefile_path(void); - -char * -get_home_xcompose_file_path(void); - -char * -get_locale_compose_file_path(const char *locale); - -#endif diff --git a/src/3rdparty/xkbcommon/src/compose/table.c b/src/3rdparty/xkbcommon/src/compose/table.c deleted file mode 100644 index 5cd8415850..0000000000 --- a/src/3rdparty/xkbcommon/src/compose/table.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "utils.h" -#include "table.h" -#include "parser.h" -#include "paths.h" - -static struct xkb_compose_table * -xkb_compose_table_new(struct xkb_context *ctx, - const char *locale, - enum xkb_compose_format format, - enum xkb_compose_compile_flags flags) -{ - char *resolved_locale; - struct xkb_compose_table *table; - struct compose_node root; - - resolved_locale = resolve_locale(locale); - if (!resolved_locale) - return NULL; - - table = calloc(1, sizeof(*table)); - if (!table) { - free(resolved_locale); - return NULL; - } - - table->refcnt = 1; - table->ctx = xkb_context_ref(ctx); - - table->locale = resolved_locale; - table->format = format; - table->flags = flags; - - darray_init(table->nodes); - darray_init(table->utf8); - - root.keysym = XKB_KEY_NoSymbol; - root.next = 0; - root.is_leaf = true; - root.u.leaf.utf8 = 0; - root.u.leaf.keysym = XKB_KEY_NoSymbol; - darray_append(table->nodes, root); - - darray_append(table->utf8, '\0'); - - return table; -} - -XKB_EXPORT struct xkb_compose_table * -xkb_compose_table_ref(struct xkb_compose_table *table) -{ - table->refcnt++; - return table; -} - -XKB_EXPORT void -xkb_compose_table_unref(struct xkb_compose_table *table) -{ - if (!table || --table->refcnt > 0) - return; - free(table->locale); - darray_free(table->nodes); - darray_free(table->utf8); - xkb_context_unref(table->ctx); - free(table); -} - -XKB_EXPORT struct xkb_compose_table * -xkb_compose_table_new_from_file(struct xkb_context *ctx, - FILE *file, - const char *locale, - enum xkb_compose_format format, - enum xkb_compose_compile_flags flags) -{ - struct xkb_compose_table *table; - bool ok; - - if (flags & ~(XKB_COMPOSE_COMPILE_NO_FLAGS)) { - log_err_func(ctx, "unrecognized flags: %#x\n", flags); - return NULL; - } - - if (format != XKB_COMPOSE_FORMAT_TEXT_V1) { - log_err_func(ctx, "unsupported compose format: %d\n", format); - return NULL; - } - - table = xkb_compose_table_new(ctx, locale, format, flags); - if (!table) - return NULL; - - ok = parse_file(table, file, "(unknown file)"); - if (!ok) { - xkb_compose_table_unref(table); - return NULL; - } - - return table; -} - -XKB_EXPORT struct xkb_compose_table * -xkb_compose_table_new_from_buffer(struct xkb_context *ctx, - const char *buffer, size_t length, - const char *locale, - enum xkb_compose_format format, - enum xkb_compose_compile_flags flags) -{ - struct xkb_compose_table *table; - bool ok; - - if (flags & ~(XKB_COMPOSE_COMPILE_NO_FLAGS)) { - log_err_func(ctx, "unrecognized flags: %#x\n", flags); - return NULL; - } - - if (format != XKB_COMPOSE_FORMAT_TEXT_V1) { - log_err_func(ctx, "unsupported compose format: %d\n", format); - return NULL; - } - - table = xkb_compose_table_new(ctx, locale, format, flags); - if (!table) - return NULL; - - ok = parse_string(table, buffer, length, "(input string)"); - if (!ok) { - xkb_compose_table_unref(table); - return NULL; - } - - return table; -} - -XKB_EXPORT struct xkb_compose_table * -xkb_compose_table_new_from_locale(struct xkb_context *ctx, - const char *locale, - enum xkb_compose_compile_flags flags) -{ - struct xkb_compose_table *table; - char *path = NULL; - const char *cpath; - FILE *file; - bool ok; - - if (flags & ~(XKB_COMPOSE_COMPILE_NO_FLAGS)) { - log_err_func(ctx, "unrecognized flags: %#x\n", flags); - return NULL; - } - - table = xkb_compose_table_new(ctx, locale, XKB_COMPOSE_FORMAT_TEXT_V1, - flags); - if (!table) - return NULL; - - cpath = get_xcomposefile_path(); - if (cpath) { - file = fopen(cpath, "r"); - if (file) - goto found_path; - } - - cpath = path = get_home_xcompose_file_path(); - if (path) { - file = fopen(path, "r"); - if (file) - goto found_path; - } - free(path); - path = NULL; - - cpath = path = get_locale_compose_file_path(table->locale); - if (path) { - file = fopen(path, "r"); - if (file) - goto found_path; - } - free(path); - path = NULL; - - log_err(ctx, "couldn't find a Compose file for locale \"%s\"\n", locale); - xkb_compose_table_unref(table); - return NULL; - -found_path: - ok = parse_file(table, file, cpath); - fclose(file); - if (!ok) { - xkb_compose_table_unref(table); - return NULL; - } - - log_dbg(ctx, "created compose table from locale %s with path %s\n", - table->locale, path); - - free(path); - return table; -} diff --git a/src/3rdparty/xkbcommon/src/compose/table.h b/src/3rdparty/xkbcommon/src/compose/table.h deleted file mode 100644 index 05a415ffa3..0000000000 --- a/src/3rdparty/xkbcommon/src/compose/table.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef COMPOSE_COMPOSE_H -#define COMPOSE_COMPOSE_H - -#include "xkbcommon/xkbcommon-compose.h" -#include "utils.h" -#include "context.h" - -/* - * The compose table data structure is a simple trie. An example will - * help. Given these sequences: - * - * : "first" dead_a - * : "second" dead_b - * : "third" dead_c - * - * the trie would look like: - * - * [root] ---> [] -----------------> [] -# - * | | | - * # v v - * [] ---> [] -# [] -# - * | | - - * # v # - * [] -# - * | - * # - * where: - * - [root] is a special empty root node. - * - [] is a node for a sequence keysym . - * - right arrows are `next` pointers. - * - down arrows are `successor` pointers. - * - # is a nil pointer. - * - * The nodes are all kept in a contiguous array. Pointers are represented - * as integer offsets into this array. A nil pointer is represented as 0 - * (which, helpfully, is the offset of the empty root node). - * - * Nodes without a successor are leaf nodes. Since a sequence cannot be a - * prefix of another, these are exactly the nodes which terminate the - * sequences (in a bijective manner). - * - * A leaf contains the result data of its sequence. The result keysym is - * contained in the node struct itself; the result UTF-8 string is a byte - * offset into an array of the form "\0first\0second\0third" (the initial - * \0 is so offset 0 points to an empty string). - */ - -struct compose_node { - xkb_keysym_t keysym; - /* Offset into xkb_compose_table::nodes. */ - unsigned int next:31; - bool is_leaf:1; - - union { - /* Offset into xkb_compose_table::nodes. */ - uint32_t successor; - struct { - /* Offset into xkb_compose_table::utf8. */ - uint32_t utf8; - xkb_keysym_t keysym; - } leaf; - } u; -}; - -struct xkb_compose_table { - int refcnt; - enum xkb_compose_format format; - enum xkb_compose_compile_flags flags; - struct xkb_context *ctx; - - char *locale; - - darray_char utf8; - darray(struct compose_node) nodes; -}; - -#endif diff --git a/src/3rdparty/xkbcommon/src/context-priv.c b/src/3rdparty/xkbcommon/src/context-priv.c deleted file mode 100644 index c934201685..0000000000 --- a/src/3rdparty/xkbcommon/src/context-priv.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#include -#include -#include -#include - -#include "xkbcommon/xkbcommon.h" -#include "utils.h" -#include "context.h" - -unsigned int -xkb_context_num_failed_include_paths(struct xkb_context *ctx) -{ - return darray_size(ctx->failed_includes); -} - -const char * -xkb_context_failed_include_path_get(struct xkb_context *ctx, - unsigned int idx) -{ - if (idx >= xkb_context_num_failed_include_paths(ctx)) - return NULL; - - return darray_item(ctx->failed_includes, idx); -} - -xkb_atom_t -xkb_atom_lookup(struct xkb_context *ctx, const char *string) -{ - return atom_lookup(ctx->atom_table, string, strlen(string)); -} - -xkb_atom_t -xkb_atom_intern(struct xkb_context *ctx, const char *string, size_t len) -{ - return atom_intern(ctx->atom_table, string, len, false); -} - -xkb_atom_t -xkb_atom_steal(struct xkb_context *ctx, char *string) -{ - return atom_intern(ctx->atom_table, string, strlen(string), true); -} - -const char * -xkb_atom_text(struct xkb_context *ctx, xkb_atom_t atom) -{ - return atom_text(ctx->atom_table, atom); -} - -void -xkb_log(struct xkb_context *ctx, enum xkb_log_level level, int verbosity, - const char *fmt, ...) -{ - va_list args; - - if (ctx->log_level < level || ctx->log_verbosity < verbosity) - return; - - va_start(args, fmt); - ctx->log_fn(ctx, level, fmt, args); - va_end(args); -} - -char * -xkb_context_get_buffer(struct xkb_context *ctx, size_t size) -{ - char *rtrn; - - if (size >= sizeof(ctx->text_buffer)) - return NULL; - - if (sizeof(ctx->text_buffer) - ctx->text_next <= size) - ctx->text_next = 0; - - rtrn = &ctx->text_buffer[ctx->text_next]; - ctx->text_next += size; - - return rtrn; -} - -#ifndef DEFAULT_XKB_VARIANT -#define DEFAULT_XKB_VARIANT NULL -#endif - -#ifndef DEFAULT_XKB_OPTIONS -#define DEFAULT_XKB_OPTIONS NULL -#endif - -static const char * -xkb_context_get_default_rules(struct xkb_context *ctx) -{ - const char *env = NULL; - - if (ctx->use_environment_names) - env = secure_getenv("XKB_DEFAULT_RULES"); - - return env ? env : DEFAULT_XKB_RULES; -} - -static const char * -xkb_context_get_default_model(struct xkb_context *ctx) -{ - const char *env = NULL; - - if (ctx->use_environment_names) - env = secure_getenv("XKB_DEFAULT_MODEL"); - - return env ? env : DEFAULT_XKB_MODEL; -} - -static const char * -xkb_context_get_default_layout(struct xkb_context *ctx) -{ - const char *env = NULL; - - if (ctx->use_environment_names) - env = secure_getenv("XKB_DEFAULT_LAYOUT"); - - return env ? env : DEFAULT_XKB_LAYOUT; -} - -static const char * -xkb_context_get_default_variant(struct xkb_context *ctx) -{ - const char *env = NULL; - const char *layout = secure_getenv("XKB_DEFAULT_LAYOUT"); - - /* We don't want to inherit the variant if they haven't also set a - * layout, since they're so closely paired. */ - if (layout && ctx->use_environment_names) - env = secure_getenv("XKB_DEFAULT_VARIANT"); - - return env ? env : DEFAULT_XKB_VARIANT; -} - -static const char * -xkb_context_get_default_options(struct xkb_context *ctx) -{ - const char *env = NULL; - - if (ctx->use_environment_names) - env = secure_getenv("XKB_DEFAULT_OPTIONS"); - - return env ? env : DEFAULT_XKB_OPTIONS; -} - -void -xkb_context_sanitize_rule_names(struct xkb_context *ctx, - struct xkb_rule_names *rmlvo) -{ - if (isempty(rmlvo->rules)) - rmlvo->rules = xkb_context_get_default_rules(ctx); - if (isempty(rmlvo->model)) - rmlvo->model = xkb_context_get_default_model(ctx); - /* Layout and variant are tied together, so don't try to use one from - * the caller and one from the environment. */ - if (isempty(rmlvo->layout)) { - rmlvo->layout = xkb_context_get_default_layout(ctx); - rmlvo->variant = xkb_context_get_default_variant(ctx); - } - /* Options can be empty, so respect that if passed in. */ - if (rmlvo->options == NULL) - rmlvo->options = xkb_context_get_default_options(ctx); -} diff --git a/src/3rdparty/xkbcommon/src/context.c b/src/3rdparty/xkbcommon/src/context.c deleted file mode 100644 index 50993e108a..0000000000 --- a/src/3rdparty/xkbcommon/src/context.c +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#include -#include -#include -#include - -#include "xkbcommon/xkbcommon.h" -#include "utils.h" -#include "context.h" - -/** - * Append one directory to the context's include path. - */ -XKB_EXPORT int -xkb_context_include_path_append(struct xkb_context *ctx, const char *path) -{ - struct stat stat_buf; - int err; - char *tmp; - - tmp = strdup(path); - if (!tmp) - goto err; - - err = stat(path, &stat_buf); - if (err != 0) - goto err; - if (!S_ISDIR(stat_buf.st_mode)) - goto err; - -#if defined(HAVE_EACCESS) - if (eaccess(path, R_OK | X_OK) != 0) - goto err; -#elif defined(HAVE_EUIDACCESS) - if (euidaccess(path, R_OK | X_OK) != 0) - goto err; -#endif - - darray_append(ctx->includes, tmp); - return 1; - -err: - darray_append(ctx->failed_includes, tmp); - return 0; -} - -/** - * Append the default include directories to the context. - */ -XKB_EXPORT int -xkb_context_include_path_append_default(struct xkb_context *ctx) -{ - const char *home, *root; - char *user_path; - int err; - int ret = 0; - - root = secure_getenv("XKB_CONFIG_ROOT"); - if (root != NULL) - ret |= xkb_context_include_path_append(ctx, root); - else - ret |= xkb_context_include_path_append(ctx, DFLT_XKB_CONFIG_ROOT); - - home = secure_getenv("HOME"); - if (!home) - return ret; - err = asprintf(&user_path, "%s/.xkb", home); - if (err <= 0) - return ret; - ret |= xkb_context_include_path_append(ctx, user_path); - free(user_path); - - return ret; -} - -/** - * Remove all entries in the context's include path. - */ -XKB_EXPORT void -xkb_context_include_path_clear(struct xkb_context *ctx) -{ - char **path; - - darray_foreach(path, ctx->includes) - free(*path); - darray_free(ctx->includes); - - darray_foreach(path, ctx->failed_includes) - free(*path); - darray_free(ctx->failed_includes); -} - -/** - * xkb_context_include_path_clear() + xkb_context_include_path_append_default() - */ -XKB_EXPORT int -xkb_context_include_path_reset_defaults(struct xkb_context *ctx) -{ - xkb_context_include_path_clear(ctx); - return xkb_context_include_path_append_default(ctx); -} - -/** - * Returns the number of entries in the context's include path. - */ -XKB_EXPORT unsigned int -xkb_context_num_include_paths(struct xkb_context *ctx) -{ - return darray_size(ctx->includes); -} - -/** - * Returns the given entry in the context's include path, or NULL if an - * invalid index is passed. - */ -XKB_EXPORT const char * -xkb_context_include_path_get(struct xkb_context *ctx, unsigned int idx) -{ - if (idx >= xkb_context_num_include_paths(ctx)) - return NULL; - - return darray_item(ctx->includes, idx); -} - -/** - * Take a new reference on the context. - */ -XKB_EXPORT struct xkb_context * -xkb_context_ref(struct xkb_context *ctx) -{ - ctx->refcnt++; - return ctx; -} - -/** - * Drop an existing reference on the context, and free it if the refcnt is - * now 0. - */ -XKB_EXPORT void -xkb_context_unref(struct xkb_context *ctx) -{ - if (!ctx || --ctx->refcnt > 0) - return; - - xkb_context_include_path_clear(ctx); - atom_table_free(ctx->atom_table); - free(ctx); -} - -static const char * -log_level_to_prefix(enum xkb_log_level level) -{ - switch (level) { - case XKB_LOG_LEVEL_DEBUG: - return "xkbcommon: DEBUG: "; - case XKB_LOG_LEVEL_INFO: - return "xkbcommon: INFO: "; - case XKB_LOG_LEVEL_WARNING: - return "xkbcommon: WARNING: "; - case XKB_LOG_LEVEL_ERROR: - return "xkbcommon: ERROR: "; - case XKB_LOG_LEVEL_CRITICAL: - return "xkbcommon: CRITICAL: "; - default: - return NULL; - } -} - -ATTR_PRINTF(3, 0) static void -default_log_fn(struct xkb_context *ctx, enum xkb_log_level level, - const char *fmt, va_list args) -{ - const char *prefix = log_level_to_prefix(level); - - if (prefix) - fprintf(stderr, "%s", prefix); - vfprintf(stderr, fmt, args); -} - -static enum xkb_log_level -log_level(const char *level) { - char *endptr; - enum xkb_log_level lvl; - - errno = 0; - lvl = strtol(level, &endptr, 10); - if (errno == 0 && (endptr[0] == '\0' || is_space(endptr[0]))) - return lvl; - if (istreq_prefix("crit", level)) - return XKB_LOG_LEVEL_CRITICAL; - if (istreq_prefix("err", level)) - return XKB_LOG_LEVEL_ERROR; - if (istreq_prefix("warn", level)) - return XKB_LOG_LEVEL_WARNING; - if (istreq_prefix("info", level)) - return XKB_LOG_LEVEL_INFO; - if (istreq_prefix("debug", level) || istreq_prefix("dbg", level)) - return XKB_LOG_LEVEL_DEBUG; - - return XKB_LOG_LEVEL_ERROR; -} - -static int -log_verbosity(const char *verbosity) { - char *endptr; - int v; - - errno = 0; - v = strtol(verbosity, &endptr, 10); - if (errno == 0) - return v; - - return 0; -} - -/** - * Create a new context. - */ -XKB_EXPORT struct xkb_context * -xkb_context_new(enum xkb_context_flags flags) -{ - const char *env; - struct xkb_context *ctx = calloc(1, sizeof(*ctx)); - - if (!ctx) - return NULL; - - ctx->refcnt = 1; - ctx->log_fn = default_log_fn; - ctx->log_level = XKB_LOG_LEVEL_ERROR; - ctx->log_verbosity = 0; - - /* Environment overwrites defaults. */ - env = secure_getenv("XKB_LOG_LEVEL"); - if (env) - xkb_context_set_log_level(ctx, log_level(env)); - - env = secure_getenv("XKB_LOG_VERBOSITY"); - if (env) - xkb_context_set_log_verbosity(ctx, log_verbosity(env)); - - if (!(flags & XKB_CONTEXT_NO_DEFAULT_INCLUDES) && - !xkb_context_include_path_append_default(ctx)) { - log_err(ctx, "failed to add default include path %s\n", - DFLT_XKB_CONFIG_ROOT); - xkb_context_unref(ctx); - return NULL; - } - - ctx->use_environment_names = !(flags & XKB_CONTEXT_NO_ENVIRONMENT_NAMES); - - ctx->atom_table = atom_table_new(); - if (!ctx->atom_table) { - xkb_context_unref(ctx); - return NULL; - } - - return ctx; -} - -XKB_EXPORT void -xkb_context_set_log_fn(struct xkb_context *ctx, - void (*log_fn)(struct xkb_context *ctx, - enum xkb_log_level level, - const char *fmt, va_list args)) -{ - ctx->log_fn = (log_fn ? log_fn : default_log_fn); -} - -XKB_EXPORT enum xkb_log_level -xkb_context_get_log_level(struct xkb_context *ctx) -{ - return ctx->log_level; -} - -XKB_EXPORT void -xkb_context_set_log_level(struct xkb_context *ctx, enum xkb_log_level level) -{ - ctx->log_level = level; -} - -XKB_EXPORT int -xkb_context_get_log_verbosity(struct xkb_context *ctx) -{ - return ctx->log_verbosity; -} - -XKB_EXPORT void -xkb_context_set_log_verbosity(struct xkb_context *ctx, int verbosity) -{ - ctx->log_verbosity = verbosity; -} - -XKB_EXPORT void * -xkb_context_get_user_data(struct xkb_context *ctx) -{ - if (ctx) - return ctx->user_data; - return NULL; -} - -XKB_EXPORT void -xkb_context_set_user_data(struct xkb_context *ctx, void *user_data) -{ - ctx->user_data = user_data; -} diff --git a/src/3rdparty/xkbcommon/src/context.h b/src/3rdparty/xkbcommon/src/context.h deleted file mode 100644 index 03e6d50abb..0000000000 --- a/src/3rdparty/xkbcommon/src/context.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#ifndef CONTEXT_H -#define CONTEXT_H - -#include "atom.h" - -struct xkb_context { - int refcnt; - - ATTR_PRINTF(3, 0) void (*log_fn)(struct xkb_context *ctx, - enum xkb_log_level level, - const char *fmt, va_list args); - enum xkb_log_level log_level; - int log_verbosity; - void *user_data; - - struct xkb_rule_names names_dflt; - - darray(char *) includes; - darray(char *) failed_includes; - - struct atom_table *atom_table; - - /* Buffer for the *Text() functions. */ - char text_buffer[2048]; - size_t text_next; - - unsigned int use_environment_names : 1; -}; - -unsigned int -xkb_context_num_failed_include_paths(struct xkb_context *ctx); - -const char * -xkb_context_failed_include_path_get(struct xkb_context *ctx, - unsigned int idx); - -/* - * Returns XKB_ATOM_NONE if @string was not previously interned, - * otherwise returns the atom. - */ -xkb_atom_t -xkb_atom_lookup(struct xkb_context *ctx, const char *string); - -xkb_atom_t -xkb_atom_intern(struct xkb_context *ctx, const char *string, size_t len); - -#define xkb_atom_intern_literal(ctx, literal) \ - xkb_atom_intern((ctx), (literal), sizeof(literal) - 1) - -/** - * If @string is dynamically allocated, NUL-terminated, free'd immediately - * after being interned, and not used afterwards, use this function - * instead of xkb_atom_intern to avoid some unnecessary allocations. - * The caller should not use or free the passed in string afterwards. - */ -xkb_atom_t -xkb_atom_steal(struct xkb_context *ctx, char *string); - -const char * -xkb_atom_text(struct xkb_context *ctx, xkb_atom_t atom); - -char * -xkb_context_get_buffer(struct xkb_context *ctx, size_t size); - -ATTR_PRINTF(4, 5) void -xkb_log(struct xkb_context *ctx, enum xkb_log_level level, int verbosity, - const char *fmt, ...); - -void -xkb_context_sanitize_rule_names(struct xkb_context *ctx, - struct xkb_rule_names *rmlvo); - -/* - * The format is not part of the argument list in order to avoid the - * "ISO C99 requires rest arguments to be used" warning when only the - * format is supplied without arguments. Not supplying it would still - * result in an error, though. - */ -#define log_dbg(ctx, ...) \ - xkb_log((ctx), XKB_LOG_LEVEL_DEBUG, 0, __VA_ARGS__) -#define log_info(ctx, ...) \ - xkb_log((ctx), XKB_LOG_LEVEL_INFO, 0, __VA_ARGS__) -#define log_warn(ctx, ...) \ - xkb_log((ctx), XKB_LOG_LEVEL_WARNING, 0, __VA_ARGS__) -#define log_err(ctx, ...) \ - xkb_log((ctx), XKB_LOG_LEVEL_ERROR, 0, __VA_ARGS__) -#define log_wsgo(ctx, ...) \ - xkb_log((ctx), XKB_LOG_LEVEL_CRITICAL, 0, __VA_ARGS__) -#define log_vrb(ctx, vrb, ...) \ - xkb_log((ctx), XKB_LOG_LEVEL_WARNING, (vrb), __VA_ARGS__) - -/* - * Variants which are prefixed by the name of the function they're - * called from. - * Here we must have the silly 1 variant. - */ -#define log_err_func(ctx, fmt, ...) \ - log_err(ctx, "%s: " fmt, __func__, __VA_ARGS__) -#define log_err_func1(ctx, fmt) \ - log_err(ctx, "%s: " fmt, __func__) - -#endif diff --git a/src/3rdparty/xkbcommon/src/darray.h b/src/3rdparty/xkbcommon/src/darray.h deleted file mode 100644 index 8e87c942ee..0000000000 --- a/src/3rdparty/xkbcommon/src/darray.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (C) 2011 Joseph Adams - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef CCAN_DARRAY_H -#define CCAN_DARRAY_H - -/* Originally taken from: https://ccodearchive.net/info/darray.html - * But modified for libxkbcommon. */ - -#include -#include -#include -#include - -#define darray(type) struct { type *item; unsigned size; unsigned alloc; } - -#define darray_new() { 0, 0, 0 } - -#define darray_init(arr) do { \ - (arr).item = 0; (arr).size = 0; (arr).alloc = 0; \ -} while (0) - -#define darray_free(arr) do { \ - free((arr).item); \ - darray_init(arr); \ -} while (0) - -#define darray_steal(arr, to, to_size) do { \ - *(to) = (arr).item; \ - if (to_size) \ - *(unsigned int *) (to_size) = (arr).size; \ - darray_init(arr); \ -} while (0) - -/* - * Typedefs for darrays of common types. These are useful - * when you want to pass a pointer to an darray(T) around. - * - * The following will produce an incompatible pointer warning: - * - * void foo(darray(int) *arr); - * darray(int) arr = darray_new(); - * foo(&arr); - * - * The workaround: - * - * void foo(darray_int *arr); - * darray_int arr = darray_new(); - * foo(&arr); - */ - -typedef darray (char) darray_char; -typedef darray (signed char) darray_schar; -typedef darray (unsigned char) darray_uchar; - -typedef darray (short) darray_short; -typedef darray (int) darray_int; -typedef darray (long) darray_long; - -typedef darray (unsigned short) darray_ushort; -typedef darray (unsigned int) darray_uint; -typedef darray (unsigned long) darray_ulong; - -/*** Access ***/ - -#define darray_item(arr, i) ((arr).item[i]) -#define darray_size(arr) ((arr).size) -#define darray_empty(arr) ((arr).size == 0) - -/*** Insertion (single item) ***/ - -#define darray_append(arr, ...) do { \ - darray_resize(arr, (arr).size + 1); \ - (arr).item[(arr).size - 1] = (__VA_ARGS__); \ -} while (0) - -/*** Insertion (multiple items) ***/ - -#define darray_append_items(arr, items, count) do { \ - unsigned __count = (count), __oldSize = (arr).size; \ - darray_resize(arr, __oldSize + __count); \ - memcpy((arr).item + __oldSize, items, __count * sizeof(*(arr).item)); \ -} while (0) - -#define darray_from_items(arr, items, count) do { \ - unsigned __count = (count); \ - darray_resize(arr, __count); \ - if (__count != 0) \ - memcpy((arr).item, items, __count * sizeof(*(arr).item)); \ -} while (0) - -#define darray_copy(arr_to, arr_from) \ - darray_from_items((arr_to), (arr_from).item, (arr_from).size) - -#define darray_concat(arr_to, arr_from) \ - darray_append_items((arr_to), (arr_from).item, (arr_from).size) - -/*** String buffer ***/ - -#define darray_append_string(arr, str) do { \ - const char *__str = (str); \ - darray_append_items(arr, __str, strlen(__str) + 1); \ - (arr).size--; \ -} while (0) - -#define darray_append_lit(arr, stringLiteral) do { \ - darray_append_items(arr, stringLiteral, sizeof(stringLiteral)); \ - (arr).size--; \ -} while (0) - -#define darray_appends_nullterminate(arr, items, count) do { \ - unsigned __count = (count), __oldSize = (arr).size; \ - darray_resize(arr, __oldSize + __count + 1); \ - memcpy((arr).item + __oldSize, items, __count * sizeof(*(arr).item)); \ - (arr).item[--(arr).size] = 0; \ -} while (0) - -#define darray_prepends_nullterminate(arr, items, count) do { \ - unsigned __count = (count), __oldSize = (arr).size; \ - darray_resize(arr, __count + __oldSize + 1); \ - memmove((arr).item + __count, (arr).item, \ - __oldSize * sizeof(*(arr).item)); \ - memcpy((arr).item, items, __count * sizeof(*(arr).item)); \ - (arr).item[--(arr).size] = 0; \ -} while (0) - -/*** Size management ***/ - -#define darray_resize(arr, newSize) \ - darray_growalloc(arr, (arr).size = (newSize)) - -#define darray_resize0(arr, newSize) do { \ - unsigned __oldSize = (arr).size, __newSize = (newSize); \ - (arr).size = __newSize; \ - if (__newSize > __oldSize) { \ - darray_growalloc(arr, __newSize); \ - memset(&(arr).item[__oldSize], 0, \ - (__newSize - __oldSize) * sizeof(*(arr).item)); \ - } \ -} while (0) - -#define darray_realloc(arr, newAlloc) do { \ - (arr).item = realloc((arr).item, \ - ((arr).alloc = (newAlloc)) * sizeof(*(arr).item)); \ -} while (0) - -#define darray_growalloc(arr, need) do { \ - unsigned __need = (need); \ - if (__need > (arr).alloc) \ - darray_realloc(arr, darray_next_alloc((arr).alloc, __need, \ - sizeof(*(arr).item))); \ -} while (0) - -#define darray_shrink(arr) do { \ - if ((arr).size > 0) \ - (arr).item = realloc((arr).item, \ - ((arr).alloc = (arr).size) * sizeof(*(arr).item)); \ -} while (0) - -static inline unsigned -darray_next_alloc(unsigned alloc, unsigned need, unsigned itemSize) -{ - assert(need < UINT_MAX / itemSize / 2); /* Overflow. */ - if (alloc == 0) - alloc = 4; - while (alloc < need) - alloc *= 2; - return alloc; -} - -/*** Traversal ***/ - -#define darray_foreach(i, arr) \ - for ((i) = &(arr).item[0]; (i) < &(arr).item[(arr).size]; (i)++) - -#define darray_foreach_from(i, arr, from) \ - for ((i) = &(arr).item[from]; (i) < &(arr).item[(arr).size]; (i)++) - -/* Iterate on index and value at the same time, like Python's enumerate. */ -#define darray_enumerate(idx, val, arr) \ - for ((idx) = 0, (val) = &(arr).item[0]; \ - (idx) < (arr).size; \ - (idx)++, (val)++) - -#define darray_enumerate_from(idx, val, arr, from) \ - for ((idx) = (from), (val) = &(arr).item[0]; \ - (idx) < (arr).size; \ - (idx)++, (val)++) - -#endif /* CCAN_DARRAY_H */ diff --git a/src/3rdparty/xkbcommon/src/keymap-priv.c b/src/3rdparty/xkbcommon/src/keymap-priv.c deleted file mode 100644 index fffb2fd30d..0000000000 --- a/src/3rdparty/xkbcommon/src/keymap-priv.c +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#include "keymap.h" - -static void -update_builtin_keymap_fields(struct xkb_keymap *keymap) -{ - /* Predefined (AKA real, core, X11) modifiers. The order is important! */ - static const char *const builtin_mods[] = { - [0] = "Shift", - [1] = "Lock", - [2] = "Control", - [3] = "Mod1", - [4] = "Mod2", - [5] = "Mod3", - [6] = "Mod4", - [7] = "Mod5" - }; - - for (unsigned i = 0; i < ARRAY_SIZE(builtin_mods); i++) { - keymap->mods.mods[i].name = xkb_atom_intern(keymap->ctx, - builtin_mods[i], - strlen(builtin_mods[i])); - keymap->mods.mods[i].type = MOD_REAL; - } - keymap->mods.num_mods = ARRAY_SIZE(builtin_mods); -} - -struct xkb_keymap * -xkb_keymap_new(struct xkb_context *ctx, - enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags) -{ - struct xkb_keymap *keymap; - - keymap = calloc(1, sizeof(*keymap)); - if (!keymap) - return NULL; - - keymap->refcnt = 1; - keymap->ctx = xkb_context_ref(ctx); - - keymap->format = format; - keymap->flags = flags; - - update_builtin_keymap_fields(keymap); - - return keymap; -} - -struct xkb_key * -XkbKeyByName(struct xkb_keymap *keymap, xkb_atom_t name, bool use_aliases) -{ - struct xkb_key *key; - - xkb_keys_foreach(key, keymap) - if (key->name == name) - return key; - - if (use_aliases) { - xkb_atom_t new_name = XkbResolveKeyAlias(keymap, name); - if (new_name != XKB_ATOM_NONE) - return XkbKeyByName(keymap, new_name, false); - } - - return NULL; -} - -xkb_atom_t -XkbResolveKeyAlias(const struct xkb_keymap *keymap, xkb_atom_t name) -{ - for (unsigned i = 0; i < keymap->num_key_aliases; i++) - if (keymap->key_aliases[i].alias == name) - return keymap->key_aliases[i].real; - - return XKB_ATOM_NONE; -} - -void -XkbEscapeMapName(char *name) -{ - /* - * All latin-1 alphanumerics, plus parens, slash, minus, underscore and - * wildcards. - */ - static const unsigned char legal[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xff, 0x83, - 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff - }; - - if (!name) - return; - - while (*name) { - unsigned char c = *name; - if (!(legal[c / 8] & (1 << (c % 8)))) - *name = '_'; - name++; - } -} - -xkb_mod_index_t -XkbModNameToIndex(const struct xkb_mod_set *mods, xkb_atom_t name, - enum mod_type type) -{ - xkb_mod_index_t i; - const struct xkb_mod *mod; - - xkb_mods_enumerate(i, mod, mods) - if ((mod->type & type) && name == mod->name) - return i; - - return XKB_MOD_INVALID; -} - -bool -XkbLevelsSameSyms(const struct xkb_level *a, const struct xkb_level *b) -{ - if (a->num_syms != b->num_syms) - return false; - if (a->num_syms <= 1) - return a->u.sym == b->u.sym; - return memcmp(a->u.syms, b->u.syms, sizeof(*a->u.syms) * a->num_syms) == 0; -} diff --git a/src/3rdparty/xkbcommon/src/keymap.c b/src/3rdparty/xkbcommon/src/keymap.c deleted file mode 100644 index 859c64a556..0000000000 --- a/src/3rdparty/xkbcommon/src/keymap.c +++ /dev/null @@ -1,519 +0,0 @@ -/** - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -/************************************************************ - * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * ********************************************************/ - -#include "keymap.h" -#include "text.h" - -XKB_EXPORT struct xkb_keymap * -xkb_keymap_ref(struct xkb_keymap *keymap) -{ - keymap->refcnt++; - return keymap; -} - -XKB_EXPORT void -xkb_keymap_unref(struct xkb_keymap *keymap) -{ - if (!keymap || --keymap->refcnt > 0) - return; - - if (keymap->keys) { - struct xkb_key *key; - xkb_keys_foreach(key, keymap) { - if (key->groups) { - for (unsigned i = 0; i < key->num_groups; i++) { - if (key->groups[i].levels) { - for (unsigned j = 0; j < XkbKeyNumLevels(key, i); j++) - if (key->groups[i].levels[j].num_syms > 1) - free(key->groups[i].levels[j].u.syms); - free(key->groups[i].levels); - } - } - free(key->groups); - } - } - free(keymap->keys); - } - if (keymap->types) { - for (unsigned i = 0; i < keymap->num_types; i++) { - free(keymap->types[i].entries); - free(keymap->types[i].level_names); - } - free(keymap->types); - } - free(keymap->sym_interprets); - free(keymap->key_aliases); - free(keymap->group_names); - free(keymap->keycodes_section_name); - free(keymap->symbols_section_name); - free(keymap->types_section_name); - free(keymap->compat_section_name); - xkb_context_unref(keymap->ctx); - free(keymap); -} - -static const struct xkb_keymap_format_ops * -get_keymap_format_ops(enum xkb_keymap_format format) -{ - static const struct xkb_keymap_format_ops *keymap_format_ops[] = { - [XKB_KEYMAP_FORMAT_TEXT_V1] = &text_v1_keymap_format_ops, - }; - - if ((int) format < 0 || (int) format >= (int) ARRAY_SIZE(keymap_format_ops)) - return NULL; - - return keymap_format_ops[(int) format]; -} - -XKB_EXPORT struct xkb_keymap * -xkb_keymap_new_from_names(struct xkb_context *ctx, - const struct xkb_rule_names *rmlvo_in, - enum xkb_keymap_compile_flags flags) -{ - struct xkb_keymap *keymap; - struct xkb_rule_names rmlvo; - const enum xkb_keymap_format format = XKB_KEYMAP_FORMAT_TEXT_V1; - const struct xkb_keymap_format_ops *ops; - - ops = get_keymap_format_ops(format); - if (!ops || !ops->keymap_new_from_names) { - log_err_func(ctx, "unsupported keymap format: %d\n", format); - return NULL; - } - - if (flags & ~(XKB_KEYMAP_COMPILE_NO_FLAGS)) { - log_err_func(ctx, "unrecognized flags: %#x\n", flags); - return NULL; - } - - keymap = xkb_keymap_new(ctx, format, flags); - if (!keymap) - return NULL; - - if (rmlvo_in) - rmlvo = *rmlvo_in; - else - memset(&rmlvo, 0, sizeof(rmlvo)); - xkb_context_sanitize_rule_names(ctx, &rmlvo); - - if (!ops->keymap_new_from_names(keymap, &rmlvo)) { - xkb_keymap_unref(keymap); - return NULL; - } - - return keymap; -} - -XKB_EXPORT struct xkb_keymap * -xkb_keymap_new_from_string(struct xkb_context *ctx, - const char *string, - enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags) -{ - return xkb_keymap_new_from_buffer(ctx, string, strlen(string), - format, flags); -} - -XKB_EXPORT struct xkb_keymap * -xkb_keymap_new_from_buffer(struct xkb_context *ctx, - const char *buffer, size_t length, - enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags) -{ - struct xkb_keymap *keymap; - const struct xkb_keymap_format_ops *ops; - - ops = get_keymap_format_ops(format); - if (!ops || !ops->keymap_new_from_string) { - log_err_func(ctx, "unsupported keymap format: %d\n", format); - return NULL; - } - - if (flags & ~(XKB_KEYMAP_COMPILE_NO_FLAGS)) { - log_err_func(ctx, "unrecognized flags: %#x\n", flags); - return NULL; - } - - if (!buffer) { - log_err_func1(ctx, "no buffer specified\n"); - return NULL; - } - - keymap = xkb_keymap_new(ctx, format, flags); - if (!keymap) - return NULL; - - if (!ops->keymap_new_from_string(keymap, buffer, length)) { - xkb_keymap_unref(keymap); - return NULL; - } - - return keymap; -} - -XKB_EXPORT struct xkb_keymap * -xkb_keymap_new_from_file(struct xkb_context *ctx, - FILE *file, - enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags) -{ - struct xkb_keymap *keymap; - const struct xkb_keymap_format_ops *ops; - - ops = get_keymap_format_ops(format); - if (!ops || !ops->keymap_new_from_file) { - log_err_func(ctx, "unsupported keymap format: %d\n", format); - return NULL; - } - - if (flags & ~(XKB_KEYMAP_COMPILE_NO_FLAGS)) { - log_err_func(ctx, "unrecognized flags: %#x\n", flags); - return NULL; - } - - if (!file) { - log_err_func1(ctx, "no file specified\n"); - return NULL; - } - - keymap = xkb_keymap_new(ctx, format, flags); - if (!keymap) - return NULL; - - if (!ops->keymap_new_from_file(keymap, file)) { - xkb_keymap_unref(keymap); - return NULL; - } - - return keymap; -} - -XKB_EXPORT char * -xkb_keymap_get_as_string(struct xkb_keymap *keymap, - enum xkb_keymap_format format) -{ - const struct xkb_keymap_format_ops *ops; - - if (format == XKB_KEYMAP_USE_ORIGINAL_FORMAT) - format = keymap->format; - - ops = get_keymap_format_ops(format); - if (!ops || !ops->keymap_get_as_string) { - log_err_func(keymap->ctx, "unsupported keymap format: %d\n", format); - return NULL; - } - - return ops->keymap_get_as_string(keymap); -} - -/** - * Returns the total number of modifiers active in the keymap. - */ -XKB_EXPORT xkb_mod_index_t -xkb_keymap_num_mods(struct xkb_keymap *keymap) -{ - return keymap->mods.num_mods; -} - -/** - * Return the name for a given modifier. - */ -XKB_EXPORT const char * -xkb_keymap_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx) -{ - if (idx >= keymap->mods.num_mods) - return NULL; - - return xkb_atom_text(keymap->ctx, keymap->mods.mods[idx].name); -} - -/** - * Returns the index for a named modifier. - */ -XKB_EXPORT xkb_mod_index_t -xkb_keymap_mod_get_index(struct xkb_keymap *keymap, const char *name) -{ - xkb_atom_t atom; - - atom = xkb_atom_lookup(keymap->ctx, name); - if (atom == XKB_ATOM_NONE) - return XKB_MOD_INVALID; - - return XkbModNameToIndex(&keymap->mods, atom, MOD_BOTH); -} - -/** - * Return the total number of active groups in the keymap. - */ -XKB_EXPORT xkb_layout_index_t -xkb_keymap_num_layouts(struct xkb_keymap *keymap) -{ - return keymap->num_groups; -} - -/** - * Returns the name for a given group. - */ -XKB_EXPORT const char * -xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx) -{ - if (idx >= keymap->num_group_names) - return NULL; - - return xkb_atom_text(keymap->ctx, keymap->group_names[idx]); -} - -/** - * Returns the index for a named layout. - */ -XKB_EXPORT xkb_layout_index_t -xkb_keymap_layout_get_index(struct xkb_keymap *keymap, const char *name) -{ - xkb_atom_t atom = xkb_atom_lookup(keymap->ctx, name); - xkb_layout_index_t i; - - if (atom == XKB_ATOM_NONE) - return XKB_LAYOUT_INVALID; - - for (i = 0; i < keymap->num_group_names; i++) - if (keymap->group_names[i] == atom) - return i; - - return XKB_LAYOUT_INVALID; -} - -/** - * Returns the number of layouts active for a particular key. - */ -XKB_EXPORT xkb_layout_index_t -xkb_keymap_num_layouts_for_key(struct xkb_keymap *keymap, xkb_keycode_t kc) -{ - const struct xkb_key *key = XkbKey(keymap, kc); - - if (!key) - return 0; - - return key->num_groups; -} - -/** - * Returns the number of levels active for a particular key and layout. - */ -XKB_EXPORT xkb_level_index_t -xkb_keymap_num_levels_for_key(struct xkb_keymap *keymap, xkb_keycode_t kc, - xkb_layout_index_t layout) -{ - const struct xkb_key *key = XkbKey(keymap, kc); - - if (!key) - return 0; - - layout = XkbWrapGroupIntoRange(layout, key->num_groups, - key->out_of_range_group_action, - key->out_of_range_group_number); - if (layout == XKB_LAYOUT_INVALID) - return 0; - - return XkbKeyNumLevels(key, layout); -} - -/** - * Return the total number of LEDs in the keymap. - */ -XKB_EXPORT xkb_led_index_t -xkb_keymap_num_leds(struct xkb_keymap *keymap) -{ - return keymap->num_leds; -} - -/** - * Returns the name for a given LED. - */ -XKB_EXPORT const char * -xkb_keymap_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx) -{ - if (idx >= keymap->num_leds) - return NULL; - - return xkb_atom_text(keymap->ctx, keymap->leds[idx].name); -} - -/** - * Returns the index for a named LED. - */ -XKB_EXPORT xkb_led_index_t -xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name) -{ - xkb_atom_t atom = xkb_atom_lookup(keymap->ctx, name); - xkb_led_index_t i; - const struct xkb_led *led; - - if (atom == XKB_ATOM_NONE) - return XKB_LED_INVALID; - - xkb_leds_enumerate(i, led, keymap) - if (led->name == atom) - return i; - - return XKB_LED_INVALID; -} - -/** - * As below, but takes an explicit layout/level rather than state. - */ -XKB_EXPORT int -xkb_keymap_key_get_syms_by_level(struct xkb_keymap *keymap, - xkb_keycode_t kc, - xkb_layout_index_t layout, - xkb_level_index_t level, - const xkb_keysym_t **syms_out) -{ - const struct xkb_key *key = XkbKey(keymap, kc); - int num_syms; - - if (!key) - goto err; - - layout = XkbWrapGroupIntoRange(layout, key->num_groups, - key->out_of_range_group_action, - key->out_of_range_group_number); - if (layout == XKB_LAYOUT_INVALID) - goto err; - - if (level >= XkbKeyNumLevels(key, layout)) - goto err; - - num_syms = key->groups[layout].levels[level].num_syms; - if (num_syms == 0) - goto err; - - if (num_syms == 1) - *syms_out = &key->groups[layout].levels[level].u.sym; - else - *syms_out = key->groups[layout].levels[level].u.syms; - - return num_syms; - -err: - *syms_out = NULL; - return 0; -} - -XKB_EXPORT xkb_keycode_t -xkb_keymap_min_keycode(struct xkb_keymap *keymap) -{ - return keymap->min_key_code; -} - -XKB_EXPORT xkb_keycode_t -xkb_keymap_max_keycode(struct xkb_keymap *keymap) -{ - return keymap->max_key_code; -} - -XKB_EXPORT void -xkb_keymap_key_for_each(struct xkb_keymap *keymap, xkb_keymap_key_iter_t iter, - void *data) -{ - struct xkb_key *key; - - xkb_keys_foreach(key, keymap) - iter(keymap, key->keycode, data); -} - -XKB_EXPORT const char * -xkb_keymap_key_get_name(struct xkb_keymap *keymap, xkb_keycode_t kc) -{ - const struct xkb_key *key = XkbKey(keymap, kc); - - if (!key) - return NULL; - - return xkb_atom_text(keymap->ctx, key->name); -} - -XKB_EXPORT xkb_keycode_t -xkb_keymap_key_by_name(struct xkb_keymap *keymap, const char *name) -{ - struct xkb_key *key; - xkb_atom_t atom; - - atom = xkb_atom_lookup(keymap->ctx, name); - if (atom) { - xkb_atom_t ratom = XkbResolveKeyAlias(keymap, atom); - if (ratom) - atom = ratom; - } - if (!atom) - return XKB_KEYCODE_INVALID; - - xkb_keys_foreach(key, keymap) { - if (key->name == atom) - return key->keycode; - } - - return XKB_KEYCODE_INVALID; -} - -/** - * Simple boolean specifying whether or not the key should repeat. - */ -XKB_EXPORT int -xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc) -{ - const struct xkb_key *key = XkbKey(keymap, kc); - - if (!key) - return 0; - - return key->repeats; -} diff --git a/src/3rdparty/xkbcommon/src/keymap.h b/src/3rdparty/xkbcommon/src/keymap.h deleted file mode 100644 index c15052bc7f..0000000000 --- a/src/3rdparty/xkbcommon/src/keymap.h +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Copyright 1985, 1987, 1990, 1998 The Open Group - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the names of the authors or their - * institutions shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization from the authors. - */ - -/************************************************************ - * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2009 Dan Nicholson - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - * Dan Nicholson - */ - -#ifndef KEYMAP_H -#define KEYMAP_H - - /* Don't use compat names in internal code. */ -#define _XKBCOMMON_COMPAT_H -#include "xkbcommon/xkbcommon.h" - -#include "utils.h" -#include "context.h" - -/* This limit is artificially enforced, we do not depend on it any where. - * The reason it's still here is that the rules file format does not - * support multiple groups very well, and the rules shipped with - * xkeyboard-config (see rules/evdev) depend on this limit extensively. - * So just lifting this limit would cause problems for people who will use - * more than 4 layouts. - * TODO: Fix the group index syntax in the rules format, preferably in a - * backwards compatible way. - * See e.g. https://bugs.freedesktop.org/show_bug.cgi?id=14372 - * Note: A limit on the number of groups we *do* depend on is imposed by - * the size of the xkb_layout_mask_t type (32). This is more than enough - * though. - */ -#define XKB_MAX_GROUPS 4 - -/* Don't allow more modifiers than we can hold in xkb_mod_mask_t. */ -#define XKB_MAX_MODS ((xkb_mod_index_t) (sizeof(xkb_mod_mask_t) * 8)) - -/* Don't allow more leds than we can hold in xkb_led_mask_t. */ -#define XKB_MAX_LEDS ((xkb_led_index_t) (sizeof(xkb_led_mask_t) * 8)) - -/* These should all go away. */ -enum mod_type { - MOD_REAL = (1 << 0), - MOD_VIRT = (1 << 1), - MOD_BOTH = (MOD_REAL | MOD_VIRT), -}; -#define MOD_REAL_MASK_ALL ((xkb_mod_mask_t) 0x000000ff) - -enum xkb_action_type { - ACTION_TYPE_NONE = 0, - ACTION_TYPE_MOD_SET, - ACTION_TYPE_MOD_LATCH, - ACTION_TYPE_MOD_LOCK, - ACTION_TYPE_GROUP_SET, - ACTION_TYPE_GROUP_LATCH, - ACTION_TYPE_GROUP_LOCK, - ACTION_TYPE_PTR_MOVE, - ACTION_TYPE_PTR_BUTTON, - ACTION_TYPE_PTR_LOCK, - ACTION_TYPE_PTR_DEFAULT, - ACTION_TYPE_TERMINATE, - ACTION_TYPE_SWITCH_VT, - ACTION_TYPE_CTRL_SET, - ACTION_TYPE_CTRL_LOCK, - ACTION_TYPE_PRIVATE, - _ACTION_TYPE_NUM_ENTRIES -}; - -enum xkb_action_flags { - ACTION_LOCK_CLEAR = (1 << 0), - ACTION_LATCH_TO_LOCK = (1 << 1), - ACTION_LOCK_NO_LOCK = (1 << 2), - ACTION_LOCK_NO_UNLOCK = (1 << 3), - ACTION_MODS_LOOKUP_MODMAP = (1 << 4), - ACTION_ABSOLUTE_SWITCH = (1 << 5), - ACTION_ABSOLUTE_X = (1 << 6), - ACTION_ABSOLUTE_Y = (1 << 7), - ACTION_ACCEL = (1 << 8), - ACTION_SAME_SCREEN = (1 << 9), -}; - -enum xkb_action_controls { - CONTROL_REPEAT = (1 << 0), - CONTROL_SLOW = (1 << 1), - CONTROL_DEBOUNCE = (1 << 2), - CONTROL_STICKY = (1 << 3), - CONTROL_MOUSEKEYS = (1 << 4), - CONTROL_MOUSEKEYS_ACCEL = (1 << 5), - CONTROL_AX = (1 << 6), - CONTROL_AX_TIMEOUT = (1 << 7), - CONTROL_AX_FEEDBACK = (1 << 8), - CONTROL_BELL = (1 << 9), - CONTROL_IGNORE_GROUP_LOCK = (1 << 10), - CONTROL_ALL = \ - (CONTROL_REPEAT | CONTROL_SLOW | CONTROL_DEBOUNCE | CONTROL_STICKY | \ - CONTROL_MOUSEKEYS | CONTROL_MOUSEKEYS_ACCEL | CONTROL_AX | \ - CONTROL_AX_TIMEOUT | CONTROL_AX_FEEDBACK | CONTROL_BELL | \ - CONTROL_IGNORE_GROUP_LOCK) -}; - -enum xkb_match_operation { - MATCH_NONE, - MATCH_ANY_OR_NONE, - MATCH_ANY, - MATCH_ALL, - MATCH_EXACTLY, -}; - -struct xkb_mods { - xkb_mod_mask_t mods; /* original real+virtual mods in definition */ - xkb_mod_mask_t mask; /* computed effective mask */ -}; - -struct xkb_mod_action { - enum xkb_action_type type; - enum xkb_action_flags flags; - struct xkb_mods mods; -}; - -struct xkb_group_action { - enum xkb_action_type type; - enum xkb_action_flags flags; - int32_t group; -}; - -struct xkb_controls_action { - enum xkb_action_type type; - enum xkb_action_flags flags; - enum xkb_action_controls ctrls; -}; - -struct xkb_pointer_default_action { - enum xkb_action_type type; - enum xkb_action_flags flags; - int8_t value; -}; - -struct xkb_switch_screen_action { - enum xkb_action_type type; - enum xkb_action_flags flags; - int8_t screen; -}; - -struct xkb_pointer_action { - enum xkb_action_type type; - enum xkb_action_flags flags; - int16_t x; - int16_t y; -}; - -struct xkb_pointer_button_action { - enum xkb_action_type type; - enum xkb_action_flags flags; - uint8_t count; - uint8_t button; -}; - -struct xkb_private_action { - enum xkb_action_type type; - uint8_t data[7]; -}; - -union xkb_action { - enum xkb_action_type type; - struct xkb_mod_action mods; - struct xkb_group_action group; - struct xkb_controls_action ctrls; - struct xkb_pointer_default_action dflt; - struct xkb_switch_screen_action screen; - struct xkb_pointer_action ptr; - struct xkb_pointer_button_action btn; - struct xkb_private_action priv; -}; - -struct xkb_key_type_entry { - xkb_level_index_t level; - struct xkb_mods mods; - struct xkb_mods preserve; -}; - -struct xkb_key_type { - xkb_atom_t name; - struct xkb_mods mods; - xkb_level_index_t num_levels; - unsigned int num_level_names; - xkb_atom_t *level_names; - unsigned int num_entries; - struct xkb_key_type_entry *entries; -}; - -struct xkb_sym_interpret { - xkb_keysym_t sym; - enum xkb_match_operation match; - xkb_mod_mask_t mods; - xkb_mod_index_t virtual_mod; - union xkb_action action; - bool level_one_only; - bool repeat; -}; - -struct xkb_led { - xkb_atom_t name; - enum xkb_state_component which_groups; - xkb_layout_mask_t groups; - enum xkb_state_component which_mods; - struct xkb_mods mods; - enum xkb_action_controls ctrls; -}; - -struct xkb_key_alias { - xkb_atom_t real; - xkb_atom_t alias; -}; - -struct xkb_controls { - unsigned char groups_wrap; - struct xkb_mods internal; - struct xkb_mods ignore_lock; - unsigned short repeat_delay; - unsigned short repeat_interval; - unsigned short slow_keys_delay; - unsigned short debounce_delay; - unsigned short ax_options; - unsigned short ax_timeout; - unsigned short axt_opts_mask; - unsigned short axt_opts_values; - unsigned int axt_ctrls_mask; - unsigned int axt_ctrls_values; -}; - -/* Such an awkward name. Oh well. */ -enum xkb_range_exceed_type { - RANGE_WRAP = 0, - RANGE_SATURATE, - RANGE_REDIRECT, -}; - -enum xkb_explicit_components { - EXPLICIT_INTERP = (1 << 0), - EXPLICIT_VMODMAP = (1 << 1), - EXPLICIT_REPEAT = (1 << 2), -}; - -struct xkb_level { - union xkb_action action; - unsigned int num_syms; - union { - xkb_keysym_t sym; /* num_syms == 1 */ - xkb_keysym_t *syms; /* num_syms > 1 */ - } u; -}; - -struct xkb_group { - bool explicit_type; - /* Points to a type in keymap->types. */ - const struct xkb_key_type *type; - /* Use XkbKeyNumLevels for the number of levels. */ - struct xkb_level *levels; -}; - -struct xkb_key { - xkb_keycode_t keycode; - xkb_atom_t name; - - enum xkb_explicit_components explicit; - - xkb_mod_mask_t modmap; - xkb_mod_mask_t vmodmap; - - bool repeats; - - enum xkb_range_exceed_type out_of_range_group_action; - xkb_layout_index_t out_of_range_group_number; - - xkb_layout_index_t num_groups; - struct xkb_group *groups; -}; - -struct xkb_mod { - xkb_atom_t name; - enum mod_type type; - xkb_mod_mask_t mapping; /* vmod -> real mod mapping */ -}; - -struct xkb_mod_set { - struct xkb_mod mods[XKB_MAX_MODS]; - unsigned int num_mods; -}; - -/* Common keyboard description structure */ -struct xkb_keymap { - struct xkb_context *ctx; - - int refcnt; - enum xkb_keymap_compile_flags flags; - enum xkb_keymap_format format; - - enum xkb_action_controls enabled_ctrls; - - xkb_keycode_t min_key_code; - xkb_keycode_t max_key_code; - struct xkb_key *keys; - - /* aliases in no particular order */ - unsigned int num_key_aliases; - struct xkb_key_alias *key_aliases; - - struct xkb_key_type *types; - unsigned int num_types; - - unsigned int num_sym_interprets; - struct xkb_sym_interpret *sym_interprets; - - struct xkb_mod_set mods; - - /* Number of groups in the key with the most groups. */ - xkb_layout_index_t num_groups; - /* Not all groups must have names. */ - xkb_layout_index_t num_group_names; - xkb_atom_t *group_names; - - struct xkb_led leds[XKB_MAX_LEDS]; - unsigned int num_leds; - - char *keycodes_section_name; - char *symbols_section_name; - char *types_section_name; - char *compat_section_name; -}; - -#define xkb_keys_foreach(iter, keymap) \ - for ((iter) = (keymap)->keys + (keymap)->min_key_code; \ - (iter) <= (keymap)->keys + (keymap)->max_key_code; \ - (iter)++) - -#define xkb_mods_foreach(iter, mods_) \ - for ((iter) = (mods_)->mods; \ - (iter) < (mods_)->mods + (mods_)->num_mods; \ - (iter)++) - -#define xkb_mods_enumerate(idx, iter, mods_) \ - for ((idx) = 0, (iter) = (mods_)->mods; \ - (idx) < (mods_)->num_mods; \ - (idx)++, (iter)++) - -#define xkb_leds_foreach(iter, keymap) \ - for ((iter) = (keymap)->leds; \ - (iter) < (keymap)->leds + (keymap)->num_leds; \ - (iter)++) - -#define xkb_leds_enumerate(idx, iter, keymap) \ - for ((idx) = 0, (iter) = (keymap)->leds; \ - (idx) < (keymap)->num_leds; \ - (idx)++, (iter)++) - -static inline const struct xkb_key * -XkbKey(struct xkb_keymap *keymap, xkb_keycode_t kc) -{ - if (kc < keymap->min_key_code || kc > keymap->max_key_code) - return NULL; - return &keymap->keys[kc]; -} - -static inline xkb_level_index_t -XkbKeyNumLevels(const struct xkb_key *key, xkb_layout_index_t layout) -{ - return key->groups[layout].type->num_levels; -} - -struct xkb_keymap * -xkb_keymap_new(struct xkb_context *ctx, - enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags); - -struct xkb_key * -XkbKeyByName(struct xkb_keymap *keymap, xkb_atom_t name, bool use_aliases); - -xkb_atom_t -XkbResolveKeyAlias(const struct xkb_keymap *keymap, xkb_atom_t name); - -void -XkbEscapeMapName(char *name); - -xkb_mod_index_t -XkbModNameToIndex(const struct xkb_mod_set *mods, xkb_atom_t name, - enum mod_type type); - -bool -XkbLevelsSameSyms(const struct xkb_level *a, const struct xkb_level *b); - -xkb_layout_index_t -XkbWrapGroupIntoRange(int32_t group, - xkb_layout_index_t num_groups, - enum xkb_range_exceed_type out_of_range_group_action, - xkb_layout_index_t out_of_range_group_number); - -xkb_mod_mask_t -mod_mask_get_effective(struct xkb_keymap *keymap, xkb_mod_mask_t mods); - -struct xkb_keymap_format_ops { - bool (*keymap_new_from_names)(struct xkb_keymap *keymap, - const struct xkb_rule_names *names); - bool (*keymap_new_from_string)(struct xkb_keymap *keymap, - const char *string, size_t length); - bool (*keymap_new_from_file)(struct xkb_keymap *keymap, FILE *file); - char *(*keymap_get_as_string)(struct xkb_keymap *keymap); -}; - -extern const struct xkb_keymap_format_ops text_v1_keymap_format_ops; - -#endif diff --git a/src/3rdparty/xkbcommon/src/keysym-utf.c b/src/3rdparty/xkbcommon/src/keysym-utf.c deleted file mode 100644 index c0e76f54da..0000000000 --- a/src/3rdparty/xkbcommon/src/keysym-utf.c +++ /dev/null @@ -1,937 +0,0 @@ -/* The table and comments below along with the function xkb_keysym_to_ucs4 - * are under the public domain and are derived as described below. - */ -/* This module converts keysym values into the corresponding ISO 10646 - * (UCS, Unicode) values. - * - * The array keysymtab[] contains pairs of X11 keysym values for graphical - * characters and the corresponding Unicode value. The function - * keysym2ucs() maps a keysym onto a Unicode value using a binary search, - * therefore keysymtab[] must remain SORTED by keysym value. - * - * The keysym -> UTF-8 conversion will hopefully one day be provided - * by Xlib via XmbLookupString() and should ideally not have to be - * done in X applications. But we are not there yet. - * - * We allow to represent any UCS character in the range U-00000000 to - * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. - * This admittedly does not cover the entire 31-bit space of UCS, but - * it does cover all of the characters up to U-10FFFF, which can be - * represented by UTF-16, and more, and it is very unlikely that higher - * UCS codes will ever be assigned by ISO. So to get Unicode character - * U+ABCD you can directly use keysym 0x0100abcd. - * - * NOTE: The comments in the table below contain the actual character - * encoded in UTF-8, so for viewing and editing best use an editor in - * UTF-8 mode. - * - * Author: Markus G. Kuhn , - * University of Cambridge, April 2001 - * - * Special thanks to Richard Verhoeven for preparing - * an initial draft of the mapping table. - * - * This software is in the public domain. Share and enjoy! - * - */ - -#include "xkbcommon/xkbcommon.h" -#include "utils.h" -#include "utf8.h" - -/* We don't use the uint32_t types here, to save some space. */ -struct codepair { - uint16_t keysym; - uint16_t ucs; -}; - -static const struct codepair keysymtab[] = { - { 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */ - { 0x01a2, 0x02d8 }, /* breve ˘ BREVE */ - { 0x01a3, 0x0141 }, /* Lstroke Ł LATIN CAPITAL LETTER L WITH STROKE */ - { 0x01a5, 0x013d }, /* Lcaron Ľ LATIN CAPITAL LETTER L WITH CARON */ - { 0x01a6, 0x015a }, /* Sacute Ś LATIN CAPITAL LETTER S WITH ACUTE */ - { 0x01a9, 0x0160 }, /* Scaron Š LATIN CAPITAL LETTER S WITH CARON */ - { 0x01aa, 0x015e }, /* Scedilla Ş LATIN CAPITAL LETTER S WITH CEDILLA */ - { 0x01ab, 0x0164 }, /* Tcaron Ť LATIN CAPITAL LETTER T WITH CARON */ - { 0x01ac, 0x0179 }, /* Zacute Ź LATIN CAPITAL LETTER Z WITH ACUTE */ - { 0x01ae, 0x017d }, /* Zcaron Ž LATIN CAPITAL LETTER Z WITH CARON */ - { 0x01af, 0x017b }, /* Zabovedot Ż LATIN CAPITAL LETTER Z WITH DOT ABOVE */ - { 0x01b1, 0x0105 }, /* aogonek ą LATIN SMALL LETTER A WITH OGONEK */ - { 0x01b2, 0x02db }, /* ogonek ˛ OGONEK */ - { 0x01b3, 0x0142 }, /* lstroke ł LATIN SMALL LETTER L WITH STROKE */ - { 0x01b5, 0x013e }, /* lcaron ľ LATIN SMALL LETTER L WITH CARON */ - { 0x01b6, 0x015b }, /* sacute ś LATIN SMALL LETTER S WITH ACUTE */ - { 0x01b7, 0x02c7 }, /* caron ˇ CARON */ - { 0x01b9, 0x0161 }, /* scaron š LATIN SMALL LETTER S WITH CARON */ - { 0x01ba, 0x015f }, /* scedilla ş LATIN SMALL LETTER S WITH CEDILLA */ - { 0x01bb, 0x0165 }, /* tcaron ť LATIN SMALL LETTER T WITH CARON */ - { 0x01bc, 0x017a }, /* zacute ź LATIN SMALL LETTER Z WITH ACUTE */ - { 0x01bd, 0x02dd }, /* doubleacute ˝ DOUBLE ACUTE ACCENT */ - { 0x01be, 0x017e }, /* zcaron ž LATIN SMALL LETTER Z WITH CARON */ - { 0x01bf, 0x017c }, /* zabovedot ż LATIN SMALL LETTER Z WITH DOT ABOVE */ - { 0x01c0, 0x0154 }, /* Racute Ŕ LATIN CAPITAL LETTER R WITH ACUTE */ - { 0x01c3, 0x0102 }, /* Abreve Ă LATIN CAPITAL LETTER A WITH BREVE */ - { 0x01c5, 0x0139 }, /* Lacute Ĺ LATIN CAPITAL LETTER L WITH ACUTE */ - { 0x01c6, 0x0106 }, /* Cacute Ć LATIN CAPITAL LETTER C WITH ACUTE */ - { 0x01c8, 0x010c }, /* Ccaron Č LATIN CAPITAL LETTER C WITH CARON */ - { 0x01ca, 0x0118 }, /* Eogonek Ę LATIN CAPITAL LETTER E WITH OGONEK */ - { 0x01cc, 0x011a }, /* Ecaron Ě LATIN CAPITAL LETTER E WITH CARON */ - { 0x01cf, 0x010e }, /* Dcaron Ď LATIN CAPITAL LETTER D WITH CARON */ - { 0x01d0, 0x0110 }, /* Dstroke Đ LATIN CAPITAL LETTER D WITH STROKE */ - { 0x01d1, 0x0143 }, /* Nacute Ń LATIN CAPITAL LETTER N WITH ACUTE */ - { 0x01d2, 0x0147 }, /* Ncaron Ň LATIN CAPITAL LETTER N WITH CARON */ - { 0x01d5, 0x0150 }, /* Odoubleacute Ő LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ - { 0x01d8, 0x0158 }, /* Rcaron Ř LATIN CAPITAL LETTER R WITH CARON */ - { 0x01d9, 0x016e }, /* Uring Ů LATIN CAPITAL LETTER U WITH RING ABOVE */ - { 0x01db, 0x0170 }, /* Udoubleacute Ű LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ - { 0x01de, 0x0162 }, /* Tcedilla Ţ LATIN CAPITAL LETTER T WITH CEDILLA */ - { 0x01e0, 0x0155 }, /* racute ŕ LATIN SMALL LETTER R WITH ACUTE */ - { 0x01e3, 0x0103 }, /* abreve ă LATIN SMALL LETTER A WITH BREVE */ - { 0x01e5, 0x013a }, /* lacute ĺ LATIN SMALL LETTER L WITH ACUTE */ - { 0x01e6, 0x0107 }, /* cacute ć LATIN SMALL LETTER C WITH ACUTE */ - { 0x01e8, 0x010d }, /* ccaron č LATIN SMALL LETTER C WITH CARON */ - { 0x01ea, 0x0119 }, /* eogonek ę LATIN SMALL LETTER E WITH OGONEK */ - { 0x01ec, 0x011b }, /* ecaron ě LATIN SMALL LETTER E WITH CARON */ - { 0x01ef, 0x010f }, /* dcaron ď LATIN SMALL LETTER D WITH CARON */ - { 0x01f0, 0x0111 }, /* dstroke đ LATIN SMALL LETTER D WITH STROKE */ - { 0x01f1, 0x0144 }, /* nacute ń LATIN SMALL LETTER N WITH ACUTE */ - { 0x01f2, 0x0148 }, /* ncaron ň LATIN SMALL LETTER N WITH CARON */ - { 0x01f5, 0x0151 }, /* odoubleacute ő LATIN SMALL LETTER O WITH DOUBLE ACUTE */ - { 0x01f8, 0x0159 }, /* rcaron ř LATIN SMALL LETTER R WITH CARON */ - { 0x01f9, 0x016f }, /* uring ů LATIN SMALL LETTER U WITH RING ABOVE */ - { 0x01fb, 0x0171 }, /* udoubleacute ű LATIN SMALL LETTER U WITH DOUBLE ACUTE */ - { 0x01fe, 0x0163 }, /* tcedilla ţ LATIN SMALL LETTER T WITH CEDILLA */ - { 0x01ff, 0x02d9 }, /* abovedot ˙ DOT ABOVE */ - { 0x02a1, 0x0126 }, /* Hstroke Ħ LATIN CAPITAL LETTER H WITH STROKE */ - { 0x02a6, 0x0124 }, /* Hcircumflex Ĥ LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ - { 0x02a9, 0x0130 }, /* Iabovedot İ LATIN CAPITAL LETTER I WITH DOT ABOVE */ - { 0x02ab, 0x011e }, /* Gbreve Ğ LATIN CAPITAL LETTER G WITH BREVE */ - { 0x02ac, 0x0134 }, /* Jcircumflex Ĵ LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ - { 0x02b1, 0x0127 }, /* hstroke ħ LATIN SMALL LETTER H WITH STROKE */ - { 0x02b6, 0x0125 }, /* hcircumflex ĥ LATIN SMALL LETTER H WITH CIRCUMFLEX */ - { 0x02b9, 0x0131 }, /* idotless ı LATIN SMALL LETTER DOTLESS I */ - { 0x02bb, 0x011f }, /* gbreve ğ LATIN SMALL LETTER G WITH BREVE */ - { 0x02bc, 0x0135 }, /* jcircumflex ĵ LATIN SMALL LETTER J WITH CIRCUMFLEX */ - { 0x02c5, 0x010a }, /* Cabovedot Ċ LATIN CAPITAL LETTER C WITH DOT ABOVE */ - { 0x02c6, 0x0108 }, /* Ccircumflex Ĉ LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ - { 0x02d5, 0x0120 }, /* Gabovedot Ġ LATIN CAPITAL LETTER G WITH DOT ABOVE */ - { 0x02d8, 0x011c }, /* Gcircumflex Ĝ LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ - { 0x02dd, 0x016c }, /* Ubreve Ŭ LATIN CAPITAL LETTER U WITH BREVE */ - { 0x02de, 0x015c }, /* Scircumflex Ŝ LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ - { 0x02e5, 0x010b }, /* cabovedot ċ LATIN SMALL LETTER C WITH DOT ABOVE */ - { 0x02e6, 0x0109 }, /* ccircumflex ĉ LATIN SMALL LETTER C WITH CIRCUMFLEX */ - { 0x02f5, 0x0121 }, /* gabovedot ġ LATIN SMALL LETTER G WITH DOT ABOVE */ - { 0x02f8, 0x011d }, /* gcircumflex ĝ LATIN SMALL LETTER G WITH CIRCUMFLEX */ - { 0x02fd, 0x016d }, /* ubreve ŭ LATIN SMALL LETTER U WITH BREVE */ - { 0x02fe, 0x015d }, /* scircumflex ŝ LATIN SMALL LETTER S WITH CIRCUMFLEX */ - { 0x03a2, 0x0138 }, /* kra ĸ LATIN SMALL LETTER KRA */ - { 0x03a3, 0x0156 }, /* Rcedilla Ŗ LATIN CAPITAL LETTER R WITH CEDILLA */ - { 0x03a5, 0x0128 }, /* Itilde Ĩ LATIN CAPITAL LETTER I WITH TILDE */ - { 0x03a6, 0x013b }, /* Lcedilla Ļ LATIN CAPITAL LETTER L WITH CEDILLA */ - { 0x03aa, 0x0112 }, /* Emacron Ē LATIN CAPITAL LETTER E WITH MACRON */ - { 0x03ab, 0x0122 }, /* Gcedilla Ģ LATIN CAPITAL LETTER G WITH CEDILLA */ - { 0x03ac, 0x0166 }, /* Tslash Ŧ LATIN CAPITAL LETTER T WITH STROKE */ - { 0x03b3, 0x0157 }, /* rcedilla ŗ LATIN SMALL LETTER R WITH CEDILLA */ - { 0x03b5, 0x0129 }, /* itilde ĩ LATIN SMALL LETTER I WITH TILDE */ - { 0x03b6, 0x013c }, /* lcedilla ļ LATIN SMALL LETTER L WITH CEDILLA */ - { 0x03ba, 0x0113 }, /* emacron ē LATIN SMALL LETTER E WITH MACRON */ - { 0x03bb, 0x0123 }, /* gcedilla ģ LATIN SMALL LETTER G WITH CEDILLA */ - { 0x03bc, 0x0167 }, /* tslash ŧ LATIN SMALL LETTER T WITH STROKE */ - { 0x03bd, 0x014a }, /* ENG Ŋ LATIN CAPITAL LETTER ENG */ - { 0x03bf, 0x014b }, /* eng ŋ LATIN SMALL LETTER ENG */ - { 0x03c0, 0x0100 }, /* Amacron Ā LATIN CAPITAL LETTER A WITH MACRON */ - { 0x03c7, 0x012e }, /* Iogonek Į LATIN CAPITAL LETTER I WITH OGONEK */ - { 0x03cc, 0x0116 }, /* Eabovedot Ė LATIN CAPITAL LETTER E WITH DOT ABOVE */ - { 0x03cf, 0x012a }, /* Imacron Ī LATIN CAPITAL LETTER I WITH MACRON */ - { 0x03d1, 0x0145 }, /* Ncedilla Ņ LATIN CAPITAL LETTER N WITH CEDILLA */ - { 0x03d2, 0x014c }, /* Omacron Ō LATIN CAPITAL LETTER O WITH MACRON */ - { 0x03d3, 0x0136 }, /* Kcedilla Ķ LATIN CAPITAL LETTER K WITH CEDILLA */ - { 0x03d9, 0x0172 }, /* Uogonek Ų LATIN CAPITAL LETTER U WITH OGONEK */ - { 0x03dd, 0x0168 }, /* Utilde Ũ LATIN CAPITAL LETTER U WITH TILDE */ - { 0x03de, 0x016a }, /* Umacron Ū LATIN CAPITAL LETTER U WITH MACRON */ - { 0x03e0, 0x0101 }, /* amacron ā LATIN SMALL LETTER A WITH MACRON */ - { 0x03e7, 0x012f }, /* iogonek į LATIN SMALL LETTER I WITH OGONEK */ - { 0x03ec, 0x0117 }, /* eabovedot ė LATIN SMALL LETTER E WITH DOT ABOVE */ - { 0x03ef, 0x012b }, /* imacron ī LATIN SMALL LETTER I WITH MACRON */ - { 0x03f1, 0x0146 }, /* ncedilla ņ LATIN SMALL LETTER N WITH CEDILLA */ - { 0x03f2, 0x014d }, /* omacron ō LATIN SMALL LETTER O WITH MACRON */ - { 0x03f3, 0x0137 }, /* kcedilla ķ LATIN SMALL LETTER K WITH CEDILLA */ - { 0x03f9, 0x0173 }, /* uogonek ų LATIN SMALL LETTER U WITH OGONEK */ - { 0x03fd, 0x0169 }, /* utilde ũ LATIN SMALL LETTER U WITH TILDE */ - { 0x03fe, 0x016b }, /* umacron ū LATIN SMALL LETTER U WITH MACRON */ - { 0x047e, 0x203e }, /* overline ‾ OVERLINE */ - { 0x04a1, 0x3002 }, /* kana_fullstop 。 IDEOGRAPHIC FULL STOP */ - { 0x04a2, 0x300c }, /* kana_openingbracket 「 LEFT CORNER BRACKET */ - { 0x04a3, 0x300d }, /* kana_closingbracket 」 RIGHT CORNER BRACKET */ - { 0x04a4, 0x3001 }, /* kana_comma 、 IDEOGRAPHIC COMMA */ - { 0x04a5, 0x30fb }, /* kana_conjunctive ・ KATAKANA MIDDLE DOT */ - { 0x04a6, 0x30f2 }, /* kana_WO ヲ KATAKANA LETTER WO */ - { 0x04a7, 0x30a1 }, /* kana_a ァ KATAKANA LETTER SMALL A */ - { 0x04a8, 0x30a3 }, /* kana_i ィ KATAKANA LETTER SMALL I */ - { 0x04a9, 0x30a5 }, /* kana_u ゥ KATAKANA LETTER SMALL U */ - { 0x04aa, 0x30a7 }, /* kana_e ェ KATAKANA LETTER SMALL E */ - { 0x04ab, 0x30a9 }, /* kana_o ォ KATAKANA LETTER SMALL O */ - { 0x04ac, 0x30e3 }, /* kana_ya ャ KATAKANA LETTER SMALL YA */ - { 0x04ad, 0x30e5 }, /* kana_yu ュ KATAKANA LETTER SMALL YU */ - { 0x04ae, 0x30e7 }, /* kana_yo ョ KATAKANA LETTER SMALL YO */ - { 0x04af, 0x30c3 }, /* kana_tsu ッ KATAKANA LETTER SMALL TU */ - { 0x04b0, 0x30fc }, /* prolongedsound ー KATAKANA-HIRAGANA PROLONGED SOUND MARK */ - { 0x04b1, 0x30a2 }, /* kana_A ア KATAKANA LETTER A */ - { 0x04b2, 0x30a4 }, /* kana_I イ KATAKANA LETTER I */ - { 0x04b3, 0x30a6 }, /* kana_U ウ KATAKANA LETTER U */ - { 0x04b4, 0x30a8 }, /* kana_E エ KATAKANA LETTER E */ - { 0x04b5, 0x30aa }, /* kana_O オ KATAKANA LETTER O */ - { 0x04b6, 0x30ab }, /* kana_KA カ KATAKANA LETTER KA */ - { 0x04b7, 0x30ad }, /* kana_KI キ KATAKANA LETTER KI */ - { 0x04b8, 0x30af }, /* kana_KU ク KATAKANA LETTER KU */ - { 0x04b9, 0x30b1 }, /* kana_KE ケ KATAKANA LETTER KE */ - { 0x04ba, 0x30b3 }, /* kana_KO コ KATAKANA LETTER KO */ - { 0x04bb, 0x30b5 }, /* kana_SA サ KATAKANA LETTER SA */ - { 0x04bc, 0x30b7 }, /* kana_SHI シ KATAKANA LETTER SI */ - { 0x04bd, 0x30b9 }, /* kana_SU ス KATAKANA LETTER SU */ - { 0x04be, 0x30bb }, /* kana_SE セ KATAKANA LETTER SE */ - { 0x04bf, 0x30bd }, /* kana_SO ソ KATAKANA LETTER SO */ - { 0x04c0, 0x30bf }, /* kana_TA タ KATAKANA LETTER TA */ - { 0x04c1, 0x30c1 }, /* kana_CHI チ KATAKANA LETTER TI */ - { 0x04c2, 0x30c4 }, /* kana_TSU ツ KATAKANA LETTER TU */ - { 0x04c3, 0x30c6 }, /* kana_TE テ KATAKANA LETTER TE */ - { 0x04c4, 0x30c8 }, /* kana_TO ト KATAKANA LETTER TO */ - { 0x04c5, 0x30ca }, /* kana_NA ナ KATAKANA LETTER NA */ - { 0x04c6, 0x30cb }, /* kana_NI ニ KATAKANA LETTER NI */ - { 0x04c7, 0x30cc }, /* kana_NU ヌ KATAKANA LETTER NU */ - { 0x04c8, 0x30cd }, /* kana_NE ネ KATAKANA LETTER NE */ - { 0x04c9, 0x30ce }, /* kana_NO ノ KATAKANA LETTER NO */ - { 0x04ca, 0x30cf }, /* kana_HA ハ KATAKANA LETTER HA */ - { 0x04cb, 0x30d2 }, /* kana_HI ヒ KATAKANA LETTER HI */ - { 0x04cc, 0x30d5 }, /* kana_FU フ KATAKANA LETTER HU */ - { 0x04cd, 0x30d8 }, /* kana_HE ヘ KATAKANA LETTER HE */ - { 0x04ce, 0x30db }, /* kana_HO ホ KATAKANA LETTER HO */ - { 0x04cf, 0x30de }, /* kana_MA マ KATAKANA LETTER MA */ - { 0x04d0, 0x30df }, /* kana_MI ミ KATAKANA LETTER MI */ - { 0x04d1, 0x30e0 }, /* kana_MU ム KATAKANA LETTER MU */ - { 0x04d2, 0x30e1 }, /* kana_ME メ KATAKANA LETTER ME */ - { 0x04d3, 0x30e2 }, /* kana_MO モ KATAKANA LETTER MO */ - { 0x04d4, 0x30e4 }, /* kana_YA ヤ KATAKANA LETTER YA */ - { 0x04d5, 0x30e6 }, /* kana_YU ユ KATAKANA LETTER YU */ - { 0x04d6, 0x30e8 }, /* kana_YO ヨ KATAKANA LETTER YO */ - { 0x04d7, 0x30e9 }, /* kana_RA ラ KATAKANA LETTER RA */ - { 0x04d8, 0x30ea }, /* kana_RI リ KATAKANA LETTER RI */ - { 0x04d9, 0x30eb }, /* kana_RU ル KATAKANA LETTER RU */ - { 0x04da, 0x30ec }, /* kana_RE レ KATAKANA LETTER RE */ - { 0x04db, 0x30ed }, /* kana_RO ロ KATAKANA LETTER RO */ - { 0x04dc, 0x30ef }, /* kana_WA ワ KATAKANA LETTER WA */ - { 0x04dd, 0x30f3 }, /* kana_N ン KATAKANA LETTER N */ - { 0x04de, 0x309b }, /* voicedsound ゛ KATAKANA-HIRAGANA VOICED SOUND MARK */ - { 0x04df, 0x309c }, /* semivoicedsound ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */ - { 0x05ac, 0x060c }, /* Arabic_comma ، ARABIC COMMA */ - { 0x05bb, 0x061b }, /* Arabic_semicolon ؛ ARABIC SEMICOLON */ - { 0x05bf, 0x061f }, /* Arabic_question_mark ؟ ARABIC QUESTION MARK */ - { 0x05c1, 0x0621 }, /* Arabic_hamza ء ARABIC LETTER HAMZA */ - { 0x05c2, 0x0622 }, /* Arabic_maddaonalef آ ARABIC LETTER ALEF WITH MADDA ABOVE */ - { 0x05c3, 0x0623 }, /* Arabic_hamzaonalef أ ARABIC LETTER ALEF WITH HAMZA ABOVE */ - { 0x05c4, 0x0624 }, /* Arabic_hamzaonwaw ؤ ARABIC LETTER WAW WITH HAMZA ABOVE */ - { 0x05c5, 0x0625 }, /* Arabic_hamzaunderalef إ ARABIC LETTER ALEF WITH HAMZA BELOW */ - { 0x05c6, 0x0626 }, /* Arabic_hamzaonyeh ئ ARABIC LETTER YEH WITH HAMZA ABOVE */ - { 0x05c7, 0x0627 }, /* Arabic_alef ا ARABIC LETTER ALEF */ - { 0x05c8, 0x0628 }, /* Arabic_beh ب ARABIC LETTER BEH */ - { 0x05c9, 0x0629 }, /* Arabic_tehmarbuta ة ARABIC LETTER TEH MARBUTA */ - { 0x05ca, 0x062a }, /* Arabic_teh ت ARABIC LETTER TEH */ - { 0x05cb, 0x062b }, /* Arabic_theh ث ARABIC LETTER THEH */ - { 0x05cc, 0x062c }, /* Arabic_jeem ج ARABIC LETTER JEEM */ - { 0x05cd, 0x062d }, /* Arabic_hah ح ARABIC LETTER HAH */ - { 0x05ce, 0x062e }, /* Arabic_khah خ ARABIC LETTER KHAH */ - { 0x05cf, 0x062f }, /* Arabic_dal د ARABIC LETTER DAL */ - { 0x05d0, 0x0630 }, /* Arabic_thal ذ ARABIC LETTER THAL */ - { 0x05d1, 0x0631 }, /* Arabic_ra ر ARABIC LETTER REH */ - { 0x05d2, 0x0632 }, /* Arabic_zain ز ARABIC LETTER ZAIN */ - { 0x05d3, 0x0633 }, /* Arabic_seen س ARABIC LETTER SEEN */ - { 0x05d4, 0x0634 }, /* Arabic_sheen ش ARABIC LETTER SHEEN */ - { 0x05d5, 0x0635 }, /* Arabic_sad ص ARABIC LETTER SAD */ - { 0x05d6, 0x0636 }, /* Arabic_dad ض ARABIC LETTER DAD */ - { 0x05d7, 0x0637 }, /* Arabic_tah ط ARABIC LETTER TAH */ - { 0x05d8, 0x0638 }, /* Arabic_zah ظ ARABIC LETTER ZAH */ - { 0x05d9, 0x0639 }, /* Arabic_ain ع ARABIC LETTER AIN */ - { 0x05da, 0x063a }, /* Arabic_ghain غ ARABIC LETTER GHAIN */ - { 0x05e0, 0x0640 }, /* Arabic_tatweel ـ ARABIC TATWEEL */ - { 0x05e1, 0x0641 }, /* Arabic_feh ف ARABIC LETTER FEH */ - { 0x05e2, 0x0642 }, /* Arabic_qaf ق ARABIC LETTER QAF */ - { 0x05e3, 0x0643 }, /* Arabic_kaf ك ARABIC LETTER KAF */ - { 0x05e4, 0x0644 }, /* Arabic_lam ل ARABIC LETTER LAM */ - { 0x05e5, 0x0645 }, /* Arabic_meem م ARABIC LETTER MEEM */ - { 0x05e6, 0x0646 }, /* Arabic_noon ن ARABIC LETTER NOON */ - { 0x05e7, 0x0647 }, /* Arabic_ha ه ARABIC LETTER HEH */ - { 0x05e8, 0x0648 }, /* Arabic_waw و ARABIC LETTER WAW */ - { 0x05e9, 0x0649 }, /* Arabic_alefmaksura ى ARABIC LETTER ALEF MAKSURA */ - { 0x05ea, 0x064a }, /* Arabic_yeh ي ARABIC LETTER YEH */ - { 0x05eb, 0x064b }, /* Arabic_fathatan ً ARABIC FATHATAN */ - { 0x05ec, 0x064c }, /* Arabic_dammatan ٌ ARABIC DAMMATAN */ - { 0x05ed, 0x064d }, /* Arabic_kasratan ٍ ARABIC KASRATAN */ - { 0x05ee, 0x064e }, /* Arabic_fatha َ ARABIC FATHA */ - { 0x05ef, 0x064f }, /* Arabic_damma ُ ARABIC DAMMA */ - { 0x05f0, 0x0650 }, /* Arabic_kasra ِ ARABIC KASRA */ - { 0x05f1, 0x0651 }, /* Arabic_shadda ّ ARABIC SHADDA */ - { 0x05f2, 0x0652 }, /* Arabic_sukun ْ ARABIC SUKUN */ - { 0x06a1, 0x0452 }, /* Serbian_dje ђ CYRILLIC SMALL LETTER DJE */ - { 0x06a2, 0x0453 }, /* Macedonia_gje ѓ CYRILLIC SMALL LETTER GJE */ - { 0x06a3, 0x0451 }, /* Cyrillic_io ё CYRILLIC SMALL LETTER IO */ - { 0x06a4, 0x0454 }, /* Ukrainian_ie є CYRILLIC SMALL LETTER UKRAINIAN IE */ - { 0x06a5, 0x0455 }, /* Macedonia_dse ѕ CYRILLIC SMALL LETTER DZE */ - { 0x06a6, 0x0456 }, /* Ukrainian_i і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ - { 0x06a7, 0x0457 }, /* Ukrainian_yi ї CYRILLIC SMALL LETTER YI */ - { 0x06a8, 0x0458 }, /* Cyrillic_je ј CYRILLIC SMALL LETTER JE */ - { 0x06a9, 0x0459 }, /* Cyrillic_lje љ CYRILLIC SMALL LETTER LJE */ - { 0x06aa, 0x045a }, /* Cyrillic_nje њ CYRILLIC SMALL LETTER NJE */ - { 0x06ab, 0x045b }, /* Serbian_tshe ћ CYRILLIC SMALL LETTER TSHE */ - { 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */ - { 0x06ad, 0x0491 }, /* Ukrainian_ghe_with_upturn ґ CYRILLIC SMALL LETTER GHE WITH UPTURN */ - { 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */ - { 0x06af, 0x045f }, /* Cyrillic_dzhe џ CYRILLIC SMALL LETTER DZHE */ - { 0x06b0, 0x2116 }, /* numerosign № NUMERO SIGN */ - { 0x06b1, 0x0402 }, /* Serbian_DJE Ђ CYRILLIC CAPITAL LETTER DJE */ - { 0x06b2, 0x0403 }, /* Macedonia_GJE Ѓ CYRILLIC CAPITAL LETTER GJE */ - { 0x06b3, 0x0401 }, /* Cyrillic_IO Ё CYRILLIC CAPITAL LETTER IO */ - { 0x06b4, 0x0404 }, /* Ukrainian_IE Є CYRILLIC CAPITAL LETTER UKRAINIAN IE */ - { 0x06b5, 0x0405 }, /* Macedonia_DSE Ѕ CYRILLIC CAPITAL LETTER DZE */ - { 0x06b6, 0x0406 }, /* Ukrainian_I І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ - { 0x06b7, 0x0407 }, /* Ukrainian_YI Ї CYRILLIC CAPITAL LETTER YI */ - { 0x06b8, 0x0408 }, /* Cyrillic_JE Ј CYRILLIC CAPITAL LETTER JE */ - { 0x06b9, 0x0409 }, /* Cyrillic_LJE Љ CYRILLIC CAPITAL LETTER LJE */ - { 0x06ba, 0x040a }, /* Cyrillic_NJE Њ CYRILLIC CAPITAL LETTER NJE */ - { 0x06bb, 0x040b }, /* Serbian_TSHE Ћ CYRILLIC CAPITAL LETTER TSHE */ - { 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */ - { 0x06bd, 0x0490 }, /* Ukrainian_GHE_WITH_UPTURN Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ - { 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */ - { 0x06bf, 0x040f }, /* Cyrillic_DZHE Џ CYRILLIC CAPITAL LETTER DZHE */ - { 0x06c0, 0x044e }, /* Cyrillic_yu ю CYRILLIC SMALL LETTER YU */ - { 0x06c1, 0x0430 }, /* Cyrillic_a а CYRILLIC SMALL LETTER A */ - { 0x06c2, 0x0431 }, /* Cyrillic_be б CYRILLIC SMALL LETTER BE */ - { 0x06c3, 0x0446 }, /* Cyrillic_tse ц CYRILLIC SMALL LETTER TSE */ - { 0x06c4, 0x0434 }, /* Cyrillic_de д CYRILLIC SMALL LETTER DE */ - { 0x06c5, 0x0435 }, /* Cyrillic_ie е CYRILLIC SMALL LETTER IE */ - { 0x06c6, 0x0444 }, /* Cyrillic_ef ф CYRILLIC SMALL LETTER EF */ - { 0x06c7, 0x0433 }, /* Cyrillic_ghe г CYRILLIC SMALL LETTER GHE */ - { 0x06c8, 0x0445 }, /* Cyrillic_ha х CYRILLIC SMALL LETTER HA */ - { 0x06c9, 0x0438 }, /* Cyrillic_i и CYRILLIC SMALL LETTER I */ - { 0x06ca, 0x0439 }, /* Cyrillic_shorti й CYRILLIC SMALL LETTER SHORT I */ - { 0x06cb, 0x043a }, /* Cyrillic_ka к CYRILLIC SMALL LETTER KA */ - { 0x06cc, 0x043b }, /* Cyrillic_el л CYRILLIC SMALL LETTER EL */ - { 0x06cd, 0x043c }, /* Cyrillic_em м CYRILLIC SMALL LETTER EM */ - { 0x06ce, 0x043d }, /* Cyrillic_en н CYRILLIC SMALL LETTER EN */ - { 0x06cf, 0x043e }, /* Cyrillic_o о CYRILLIC SMALL LETTER O */ - { 0x06d0, 0x043f }, /* Cyrillic_pe п CYRILLIC SMALL LETTER PE */ - { 0x06d1, 0x044f }, /* Cyrillic_ya я CYRILLIC SMALL LETTER YA */ - { 0x06d2, 0x0440 }, /* Cyrillic_er р CYRILLIC SMALL LETTER ER */ - { 0x06d3, 0x0441 }, /* Cyrillic_es с CYRILLIC SMALL LETTER ES */ - { 0x06d4, 0x0442 }, /* Cyrillic_te т CYRILLIC SMALL LETTER TE */ - { 0x06d5, 0x0443 }, /* Cyrillic_u у CYRILLIC SMALL LETTER U */ - { 0x06d6, 0x0436 }, /* Cyrillic_zhe ж CYRILLIC SMALL LETTER ZHE */ - { 0x06d7, 0x0432 }, /* Cyrillic_ve в CYRILLIC SMALL LETTER VE */ - { 0x06d8, 0x044c }, /* Cyrillic_softsign ь CYRILLIC SMALL LETTER SOFT SIGN */ - { 0x06d9, 0x044b }, /* Cyrillic_yeru ы CYRILLIC SMALL LETTER YERU */ - { 0x06da, 0x0437 }, /* Cyrillic_ze з CYRILLIC SMALL LETTER ZE */ - { 0x06db, 0x0448 }, /* Cyrillic_sha ш CYRILLIC SMALL LETTER SHA */ - { 0x06dc, 0x044d }, /* Cyrillic_e э CYRILLIC SMALL LETTER E */ - { 0x06dd, 0x0449 }, /* Cyrillic_shcha щ CYRILLIC SMALL LETTER SHCHA */ - { 0x06de, 0x0447 }, /* Cyrillic_che ч CYRILLIC SMALL LETTER CHE */ - { 0x06df, 0x044a }, /* Cyrillic_hardsign ъ CYRILLIC SMALL LETTER HARD SIGN */ - { 0x06e0, 0x042e }, /* Cyrillic_YU Ю CYRILLIC CAPITAL LETTER YU */ - { 0x06e1, 0x0410 }, /* Cyrillic_A А CYRILLIC CAPITAL LETTER A */ - { 0x06e2, 0x0411 }, /* Cyrillic_BE Б CYRILLIC CAPITAL LETTER BE */ - { 0x06e3, 0x0426 }, /* Cyrillic_TSE Ц CYRILLIC CAPITAL LETTER TSE */ - { 0x06e4, 0x0414 }, /* Cyrillic_DE Д CYRILLIC CAPITAL LETTER DE */ - { 0x06e5, 0x0415 }, /* Cyrillic_IE Е CYRILLIC CAPITAL LETTER IE */ - { 0x06e6, 0x0424 }, /* Cyrillic_EF Ф CYRILLIC CAPITAL LETTER EF */ - { 0x06e7, 0x0413 }, /* Cyrillic_GHE Г CYRILLIC CAPITAL LETTER GHE */ - { 0x06e8, 0x0425 }, /* Cyrillic_HA Х CYRILLIC CAPITAL LETTER HA */ - { 0x06e9, 0x0418 }, /* Cyrillic_I И CYRILLIC CAPITAL LETTER I */ - { 0x06ea, 0x0419 }, /* Cyrillic_SHORTI Й CYRILLIC CAPITAL LETTER SHORT I */ - { 0x06eb, 0x041a }, /* Cyrillic_KA К CYRILLIC CAPITAL LETTER KA */ - { 0x06ec, 0x041b }, /* Cyrillic_EL Л CYRILLIC CAPITAL LETTER EL */ - { 0x06ed, 0x041c }, /* Cyrillic_EM М CYRILLIC CAPITAL LETTER EM */ - { 0x06ee, 0x041d }, /* Cyrillic_EN Н CYRILLIC CAPITAL LETTER EN */ - { 0x06ef, 0x041e }, /* Cyrillic_O О CYRILLIC CAPITAL LETTER O */ - { 0x06f0, 0x041f }, /* Cyrillic_PE П CYRILLIC CAPITAL LETTER PE */ - { 0x06f1, 0x042f }, /* Cyrillic_YA Я CYRILLIC CAPITAL LETTER YA */ - { 0x06f2, 0x0420 }, /* Cyrillic_ER Р CYRILLIC CAPITAL LETTER ER */ - { 0x06f3, 0x0421 }, /* Cyrillic_ES С CYRILLIC CAPITAL LETTER ES */ - { 0x06f4, 0x0422 }, /* Cyrillic_TE Т CYRILLIC CAPITAL LETTER TE */ - { 0x06f5, 0x0423 }, /* Cyrillic_U У CYRILLIC CAPITAL LETTER U */ - { 0x06f6, 0x0416 }, /* Cyrillic_ZHE Ж CYRILLIC CAPITAL LETTER ZHE */ - { 0x06f7, 0x0412 }, /* Cyrillic_VE В CYRILLIC CAPITAL LETTER VE */ - { 0x06f8, 0x042c }, /* Cyrillic_SOFTSIGN Ь CYRILLIC CAPITAL LETTER SOFT SIGN */ - { 0x06f9, 0x042b }, /* Cyrillic_YERU Ы CYRILLIC CAPITAL LETTER YERU */ - { 0x06fa, 0x0417 }, /* Cyrillic_ZE З CYRILLIC CAPITAL LETTER ZE */ - { 0x06fb, 0x0428 }, /* Cyrillic_SHA Ш CYRILLIC CAPITAL LETTER SHA */ - { 0x06fc, 0x042d }, /* Cyrillic_E Э CYRILLIC CAPITAL LETTER E */ - { 0x06fd, 0x0429 }, /* Cyrillic_SHCHA Щ CYRILLIC CAPITAL LETTER SHCHA */ - { 0x06fe, 0x0427 }, /* Cyrillic_CHE Ч CYRILLIC CAPITAL LETTER CHE */ - { 0x06ff, 0x042a }, /* Cyrillic_HARDSIGN Ъ CYRILLIC CAPITAL LETTER HARD SIGN */ - { 0x07a1, 0x0386 }, /* Greek_ALPHAaccent Ά GREEK CAPITAL LETTER ALPHA WITH TONOS */ - { 0x07a2, 0x0388 }, /* Greek_EPSILONaccent Έ GREEK CAPITAL LETTER EPSILON WITH TONOS */ - { 0x07a3, 0x0389 }, /* Greek_ETAaccent Ή GREEK CAPITAL LETTER ETA WITH TONOS */ - { 0x07a4, 0x038a }, /* Greek_IOTAaccent Ί GREEK CAPITAL LETTER IOTA WITH TONOS */ - { 0x07a5, 0x03aa }, /* Greek_IOTAdiaeresis Ϊ GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ - { 0x07a7, 0x038c }, /* Greek_OMICRONaccent Ό GREEK CAPITAL LETTER OMICRON WITH TONOS */ - { 0x07a8, 0x038e }, /* Greek_UPSILONaccent Ύ GREEK CAPITAL LETTER UPSILON WITH TONOS */ - { 0x07a9, 0x03ab }, /* Greek_UPSILONdieresis Ϋ GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ - { 0x07ab, 0x038f }, /* Greek_OMEGAaccent Ώ GREEK CAPITAL LETTER OMEGA WITH TONOS */ - { 0x07ae, 0x0385 }, /* Greek_accentdieresis ΅ GREEK DIALYTIKA TONOS */ - { 0x07af, 0x2015 }, /* Greek_horizbar ― HORIZONTAL BAR */ - { 0x07b1, 0x03ac }, /* Greek_alphaaccent ά GREEK SMALL LETTER ALPHA WITH TONOS */ - { 0x07b2, 0x03ad }, /* Greek_epsilonaccent έ GREEK SMALL LETTER EPSILON WITH TONOS */ - { 0x07b3, 0x03ae }, /* Greek_etaaccent ή GREEK SMALL LETTER ETA WITH TONOS */ - { 0x07b4, 0x03af }, /* Greek_iotaaccent ί GREEK SMALL LETTER IOTA WITH TONOS */ - { 0x07b5, 0x03ca }, /* Greek_iotadieresis ϊ GREEK SMALL LETTER IOTA WITH DIALYTIKA */ - { 0x07b6, 0x0390 }, /* Greek_iotaaccentdieresis ΐ GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ - { 0x07b7, 0x03cc }, /* Greek_omicronaccent ό GREEK SMALL LETTER OMICRON WITH TONOS */ - { 0x07b8, 0x03cd }, /* Greek_upsilonaccent ύ GREEK SMALL LETTER UPSILON WITH TONOS */ - { 0x07b9, 0x03cb }, /* Greek_upsilondieresis ϋ GREEK SMALL LETTER UPSILON WITH DIALYTIKA */ - { 0x07ba, 0x03b0 }, /* Greek_upsilonaccentdieresis ΰ GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ - { 0x07bb, 0x03ce }, /* Greek_omegaaccent ώ GREEK SMALL LETTER OMEGA WITH TONOS */ - { 0x07c1, 0x0391 }, /* Greek_ALPHA Α GREEK CAPITAL LETTER ALPHA */ - { 0x07c2, 0x0392 }, /* Greek_BETA Β GREEK CAPITAL LETTER BETA */ - { 0x07c3, 0x0393 }, /* Greek_GAMMA Γ GREEK CAPITAL LETTER GAMMA */ - { 0x07c4, 0x0394 }, /* Greek_DELTA Δ GREEK CAPITAL LETTER DELTA */ - { 0x07c5, 0x0395 }, /* Greek_EPSILON Ε GREEK CAPITAL LETTER EPSILON */ - { 0x07c6, 0x0396 }, /* Greek_ZETA Ζ GREEK CAPITAL LETTER ZETA */ - { 0x07c7, 0x0397 }, /* Greek_ETA Η GREEK CAPITAL LETTER ETA */ - { 0x07c8, 0x0398 }, /* Greek_THETA Θ GREEK CAPITAL LETTER THETA */ - { 0x07c9, 0x0399 }, /* Greek_IOTA Ι GREEK CAPITAL LETTER IOTA */ - { 0x07ca, 0x039a }, /* Greek_KAPPA Κ GREEK CAPITAL LETTER KAPPA */ - { 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMDA */ - { 0x07cc, 0x039c }, /* Greek_MU Μ GREEK CAPITAL LETTER MU */ - { 0x07cd, 0x039d }, /* Greek_NU Ν GREEK CAPITAL LETTER NU */ - { 0x07ce, 0x039e }, /* Greek_XI Ξ GREEK CAPITAL LETTER XI */ - { 0x07cf, 0x039f }, /* Greek_OMICRON Ο GREEK CAPITAL LETTER OMICRON */ - { 0x07d0, 0x03a0 }, /* Greek_PI Π GREEK CAPITAL LETTER PI */ - { 0x07d1, 0x03a1 }, /* Greek_RHO Ρ GREEK CAPITAL LETTER RHO */ - { 0x07d2, 0x03a3 }, /* Greek_SIGMA Σ GREEK CAPITAL LETTER SIGMA */ - { 0x07d4, 0x03a4 }, /* Greek_TAU Τ GREEK CAPITAL LETTER TAU */ - { 0x07d5, 0x03a5 }, /* Greek_UPSILON Υ GREEK CAPITAL LETTER UPSILON */ - { 0x07d6, 0x03a6 }, /* Greek_PHI Φ GREEK CAPITAL LETTER PHI */ - { 0x07d7, 0x03a7 }, /* Greek_CHI Χ GREEK CAPITAL LETTER CHI */ - { 0x07d8, 0x03a8 }, /* Greek_PSI Ψ GREEK CAPITAL LETTER PSI */ - { 0x07d9, 0x03a9 }, /* Greek_OMEGA Ω GREEK CAPITAL LETTER OMEGA */ - { 0x07e1, 0x03b1 }, /* Greek_alpha α GREEK SMALL LETTER ALPHA */ - { 0x07e2, 0x03b2 }, /* Greek_beta β GREEK SMALL LETTER BETA */ - { 0x07e3, 0x03b3 }, /* Greek_gamma γ GREEK SMALL LETTER GAMMA */ - { 0x07e4, 0x03b4 }, /* Greek_delta δ GREEK SMALL LETTER DELTA */ - { 0x07e5, 0x03b5 }, /* Greek_epsilon ε GREEK SMALL LETTER EPSILON */ - { 0x07e6, 0x03b6 }, /* Greek_zeta ζ GREEK SMALL LETTER ZETA */ - { 0x07e7, 0x03b7 }, /* Greek_eta η GREEK SMALL LETTER ETA */ - { 0x07e8, 0x03b8 }, /* Greek_theta θ GREEK SMALL LETTER THETA */ - { 0x07e9, 0x03b9 }, /* Greek_iota ι GREEK SMALL LETTER IOTA */ - { 0x07ea, 0x03ba }, /* Greek_kappa κ GREEK SMALL LETTER KAPPA */ - { 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMDA */ - { 0x07ec, 0x03bc }, /* Greek_mu μ GREEK SMALL LETTER MU */ - { 0x07ed, 0x03bd }, /* Greek_nu ν GREEK SMALL LETTER NU */ - { 0x07ee, 0x03be }, /* Greek_xi ξ GREEK SMALL LETTER XI */ - { 0x07ef, 0x03bf }, /* Greek_omicron ο GREEK SMALL LETTER OMICRON */ - { 0x07f0, 0x03c0 }, /* Greek_pi π GREEK SMALL LETTER PI */ - { 0x07f1, 0x03c1 }, /* Greek_rho ρ GREEK SMALL LETTER RHO */ - { 0x07f2, 0x03c3 }, /* Greek_sigma σ GREEK SMALL LETTER SIGMA */ - { 0x07f3, 0x03c2 }, /* Greek_finalsmallsigma ς GREEK SMALL LETTER FINAL SIGMA */ - { 0x07f4, 0x03c4 }, /* Greek_tau τ GREEK SMALL LETTER TAU */ - { 0x07f5, 0x03c5 }, /* Greek_upsilon υ GREEK SMALL LETTER UPSILON */ - { 0x07f6, 0x03c6 }, /* Greek_phi φ GREEK SMALL LETTER PHI */ - { 0x07f7, 0x03c7 }, /* Greek_chi χ GREEK SMALL LETTER CHI */ - { 0x07f8, 0x03c8 }, /* Greek_psi ψ GREEK SMALL LETTER PSI */ - { 0x07f9, 0x03c9 }, /* Greek_omega ω GREEK SMALL LETTER OMEGA */ - { 0x08a1, 0x23b7 }, /* leftradical ⎷ ??? */ - { 0x08a2, 0x250c }, /* topleftradical ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */ - { 0x08a3, 0x2500 }, /* horizconnector ─ BOX DRAWINGS LIGHT HORIZONTAL */ - { 0x08a4, 0x2320 }, /* topintegral ⌠ TOP HALF INTEGRAL */ - { 0x08a5, 0x2321 }, /* botintegral ⌡ BOTTOM HALF INTEGRAL */ - { 0x08a6, 0x2502 }, /* vertconnector │ BOX DRAWINGS LIGHT VERTICAL */ - { 0x08a7, 0x23a1 }, /* topleftsqbracket ⎡ ??? */ - { 0x08a8, 0x23a3 }, /* botleftsqbracket ⎣ ??? */ - { 0x08a9, 0x23a4 }, /* toprightsqbracket ⎤ ??? */ - { 0x08aa, 0x23a6 }, /* botrightsqbracket ⎦ ??? */ - { 0x08ab, 0x239b }, /* topleftparens ⎛ ??? */ - { 0x08ac, 0x239d }, /* botleftparens ⎝ ??? */ - { 0x08ad, 0x239e }, /* toprightparens ⎞ ??? */ - { 0x08ae, 0x23a0 }, /* botrightparens ⎠ ??? */ - { 0x08af, 0x23a8 }, /* leftmiddlecurlybrace ⎨ ??? */ - { 0x08b0, 0x23ac }, /* rightmiddlecurlybrace ⎬ ??? */ - /* 0x08b1 topleftsummation ? ??? */ - /* 0x08b2 botleftsummation ? ??? */ - /* 0x08b3 topvertsummationconnector ? ??? */ - /* 0x08b4 botvertsummationconnector ? ??? */ - /* 0x08b5 toprightsummation ? ??? */ - /* 0x08b6 botrightsummation ? ??? */ - /* 0x08b7 rightmiddlesummation ? ??? */ - { 0x08bc, 0x2264 }, /* lessthanequal ≤ LESS-THAN OR EQUAL TO */ - { 0x08bd, 0x2260 }, /* notequal ≠ NOT EQUAL TO */ - { 0x08be, 0x2265 }, /* greaterthanequal ≥ GREATER-THAN OR EQUAL TO */ - { 0x08bf, 0x222b }, /* integral ∫ INTEGRAL */ - { 0x08c0, 0x2234 }, /* therefore ∴ THEREFORE */ - { 0x08c1, 0x221d }, /* variation ∝ PROPORTIONAL TO */ - { 0x08c2, 0x221e }, /* infinity ∞ INFINITY */ - { 0x08c5, 0x2207 }, /* nabla ∇ NABLA */ - { 0x08c8, 0x223c }, /* approximate ∼ TILDE OPERATOR */ - { 0x08c9, 0x2243 }, /* similarequal ≃ ASYMPTOTICALLY EQUAL TO */ - { 0x08cd, 0x21d4 }, /* ifonlyif ⇔ LEFT RIGHT DOUBLE ARROW */ - { 0x08ce, 0x21d2 }, /* implies ⇒ RIGHTWARDS DOUBLE ARROW */ - { 0x08cf, 0x2261 }, /* identical ≡ IDENTICAL TO */ - { 0x08d6, 0x221a }, /* radical √ SQUARE ROOT */ - { 0x08da, 0x2282 }, /* includedin ⊂ SUBSET OF */ - { 0x08db, 0x2283 }, /* includes ⊃ SUPERSET OF */ - { 0x08dc, 0x2229 }, /* intersection ∩ INTERSECTION */ - { 0x08dd, 0x222a }, /* union ∪ UNION */ - { 0x08de, 0x2227 }, /* logicaland ∧ LOGICAL AND */ - { 0x08df, 0x2228 }, /* logicalor ∨ LOGICAL OR */ - { 0x08ef, 0x2202 }, /* partialderivative ∂ PARTIAL DIFFERENTIAL */ - { 0x08f6, 0x0192 }, /* function ƒ LATIN SMALL LETTER F WITH HOOK */ - { 0x08fb, 0x2190 }, /* leftarrow ← LEFTWARDS ARROW */ - { 0x08fc, 0x2191 }, /* uparrow ↑ UPWARDS ARROW */ - { 0x08fd, 0x2192 }, /* rightarrow → RIGHTWARDS ARROW */ - { 0x08fe, 0x2193 }, /* downarrow ↓ DOWNWARDS ARROW */ -/* 0x09df blank ? ??? */ - { 0x09e0, 0x25c6 }, /* soliddiamond ◆ BLACK DIAMOND */ - { 0x09e1, 0x2592 }, /* checkerboard ▒ MEDIUM SHADE */ - { 0x09e2, 0x2409 }, /* ht ␉ SYMBOL FOR HORIZONTAL TABULATION */ - { 0x09e3, 0x240c }, /* ff ␌ SYMBOL FOR FORM FEED */ - { 0x09e4, 0x240d }, /* cr ␍ SYMBOL FOR CARRIAGE RETURN */ - { 0x09e5, 0x240a }, /* lf ␊ SYMBOL FOR LINE FEED */ - { 0x09e8, 0x2424 }, /* nl ␤ SYMBOL FOR NEWLINE */ - { 0x09e9, 0x240b }, /* vt ␋ SYMBOL FOR VERTICAL TABULATION */ - { 0x09ea, 0x2518 }, /* lowrightcorner ┘ BOX DRAWINGS LIGHT UP AND LEFT */ - { 0x09eb, 0x2510 }, /* uprightcorner ┐ BOX DRAWINGS LIGHT DOWN AND LEFT */ - { 0x09ec, 0x250c }, /* upleftcorner ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */ - { 0x09ed, 0x2514 }, /* lowleftcorner └ BOX DRAWINGS LIGHT UP AND RIGHT */ - { 0x09ee, 0x253c }, /* crossinglines ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ - { 0x09ef, 0x23ba }, /* horizlinescan1 ⎺ HORIZONTAL SCAN LINE-1 (Unicode 3.2 draft) */ - { 0x09f0, 0x23bb }, /* horizlinescan3 ⎻ HORIZONTAL SCAN LINE-3 (Unicode 3.2 draft) */ - { 0x09f1, 0x2500 }, /* horizlinescan5 ─ BOX DRAWINGS LIGHT HORIZONTAL */ - { 0x09f2, 0x23bc }, /* horizlinescan7 ⎼ HORIZONTAL SCAN LINE-7 (Unicode 3.2 draft) */ - { 0x09f3, 0x23bd }, /* horizlinescan9 ⎽ HORIZONTAL SCAN LINE-9 (Unicode 3.2 draft) */ - { 0x09f4, 0x251c }, /* leftt ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ - { 0x09f5, 0x2524 }, /* rightt ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT */ - { 0x09f6, 0x2534 }, /* bott ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL */ - { 0x09f7, 0x252c }, /* topt ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ - { 0x09f8, 0x2502 }, /* vertbar │ BOX DRAWINGS LIGHT VERTICAL */ - { 0x0aa1, 0x2003 }, /* emspace   EM SPACE */ - { 0x0aa2, 0x2002 }, /* enspace   EN SPACE */ - { 0x0aa3, 0x2004 }, /* em3space   THREE-PER-EM SPACE */ - { 0x0aa4, 0x2005 }, /* em4space   FOUR-PER-EM SPACE */ - { 0x0aa5, 0x2007 }, /* digitspace   FIGURE SPACE */ - { 0x0aa6, 0x2008 }, /* punctspace   PUNCTUATION SPACE */ - { 0x0aa7, 0x2009 }, /* thinspace   THIN SPACE */ - { 0x0aa8, 0x200a }, /* hairspace   HAIR SPACE */ - { 0x0aa9, 0x2014 }, /* emdash — EM DASH */ - { 0x0aaa, 0x2013 }, /* endash – EN DASH */ - { 0x0aac, 0x2423 }, /* signifblank ␣ OPEN BOX */ - { 0x0aae, 0x2026 }, /* ellipsis … HORIZONTAL ELLIPSIS */ - { 0x0aaf, 0x2025 }, /* doubbaselinedot ‥ TWO DOT LEADER */ - { 0x0ab0, 0x2153 }, /* onethird ⅓ VULGAR FRACTION ONE THIRD */ - { 0x0ab1, 0x2154 }, /* twothirds ⅔ VULGAR FRACTION TWO THIRDS */ - { 0x0ab2, 0x2155 }, /* onefifth ⅕ VULGAR FRACTION ONE FIFTH */ - { 0x0ab3, 0x2156 }, /* twofifths ⅖ VULGAR FRACTION TWO FIFTHS */ - { 0x0ab4, 0x2157 }, /* threefifths ⅗ VULGAR FRACTION THREE FIFTHS */ - { 0x0ab5, 0x2158 }, /* fourfifths ⅘ VULGAR FRACTION FOUR FIFTHS */ - { 0x0ab6, 0x2159 }, /* onesixth ⅙ VULGAR FRACTION ONE SIXTH */ - { 0x0ab7, 0x215a }, /* fivesixths ⅚ VULGAR FRACTION FIVE SIXTHS */ - { 0x0ab8, 0x2105 }, /* careof ℅ CARE OF */ - { 0x0abb, 0x2012 }, /* figdash ‒ FIGURE DASH */ - { 0x0abc, 0x27e8 }, /* leftanglebracket ⟨ MATHEMATICAL LEFT ANGLE BRACKET */ - { 0x0abd, 0x002e }, /* decimalpoint . FULL STOP */ - { 0x0abe, 0x27e9 }, /* rightanglebracket ⟩ MATHEMATICAL RIGHT ANGLE BRACKET */ - /* 0x0abf marker ? ??? */ - { 0x0ac3, 0x215b }, /* oneeighth ⅛ VULGAR FRACTION ONE EIGHTH */ - { 0x0ac4, 0x215c }, /* threeeighths ⅜ VULGAR FRACTION THREE EIGHTHS */ - { 0x0ac5, 0x215d }, /* fiveeighths ⅝ VULGAR FRACTION FIVE EIGHTHS */ - { 0x0ac6, 0x215e }, /* seveneighths ⅞ VULGAR FRACTION SEVEN EIGHTHS */ - { 0x0ac9, 0x2122 }, /* trademark ™ TRADE MARK SIGN */ - { 0x0aca, 0x2613 }, /* signaturemark ☓ SALTIRE */ - /* 0x0acb trademarkincircle ? ??? */ - { 0x0acc, 0x25c1 }, /* leftopentriangle ◁ WHITE LEFT-POINTING TRIANGLE */ - { 0x0acd, 0x25b7 }, /* rightopentriangle ▷ WHITE RIGHT-POINTING TRIANGLE */ - { 0x0ace, 0x25cb }, /* emopencircle ○ WHITE CIRCLE */ - { 0x0acf, 0x25af }, /* emopenrectangle ▯ WHITE VERTICAL RECTANGLE */ - { 0x0ad0, 0x2018 }, /* leftsinglequotemark ‘ LEFT SINGLE QUOTATION MARK */ - { 0x0ad1, 0x2019 }, /* rightsinglequotemark ’ RIGHT SINGLE QUOTATION MARK */ - { 0x0ad2, 0x201c }, /* leftdoublequotemark “ LEFT DOUBLE QUOTATION MARK */ - { 0x0ad3, 0x201d }, /* rightdoublequotemark ” RIGHT DOUBLE QUOTATION MARK */ - { 0x0ad4, 0x211e }, /* prescription ℞ PRESCRIPTION TAKE */ - { 0x0ad5, 0x2030 }, /* permille ‰ PER MILLE SIGN */ - { 0x0ad6, 0x2032 }, /* minutes ′ PRIME */ - { 0x0ad7, 0x2033 }, /* seconds ″ DOUBLE PRIME */ - { 0x0ad9, 0x271d }, /* latincross ✝ LATIN CROSS */ - /* 0x0ada hexagram ? ??? */ - { 0x0adb, 0x25ac }, /* filledrectbullet ▬ BLACK RECTANGLE */ - { 0x0adc, 0x25c0 }, /* filledlefttribullet ◀ BLACK LEFT-POINTING TRIANGLE */ - { 0x0add, 0x25b6 }, /* filledrighttribullet ▶ BLACK RIGHT-POINTING TRIANGLE */ - { 0x0ade, 0x25cf }, /* emfilledcircle ● BLACK CIRCLE */ - { 0x0adf, 0x25ae }, /* emfilledrect ▮ BLACK VERTICAL RECTANGLE */ - { 0x0ae0, 0x25e6 }, /* enopencircbullet ◦ WHITE BULLET */ - { 0x0ae1, 0x25ab }, /* enopensquarebullet ▫ WHITE SMALL SQUARE */ - { 0x0ae2, 0x25ad }, /* openrectbullet ▭ WHITE RECTANGLE */ - { 0x0ae3, 0x25b3 }, /* opentribulletup △ WHITE UP-POINTING TRIANGLE */ - { 0x0ae4, 0x25bd }, /* opentribulletdown ▽ WHITE DOWN-POINTING TRIANGLE */ - { 0x0ae5, 0x2606 }, /* openstar ☆ WHITE STAR */ - { 0x0ae6, 0x2022 }, /* enfilledcircbullet • BULLET */ - { 0x0ae7, 0x25aa }, /* enfilledsqbullet ▪ BLACK SMALL SQUARE */ - { 0x0ae8, 0x25b2 }, /* filledtribulletup ▲ BLACK UP-POINTING TRIANGLE */ - { 0x0ae9, 0x25bc }, /* filledtribulletdown ▼ BLACK DOWN-POINTING TRIANGLE */ - { 0x0aea, 0x261c }, /* leftpointer ☜ WHITE LEFT POINTING INDEX */ - { 0x0aeb, 0x261e }, /* rightpointer ☞ WHITE RIGHT POINTING INDEX */ - { 0x0aec, 0x2663 }, /* club ♣ BLACK CLUB SUIT */ - { 0x0aed, 0x2666 }, /* diamond ♦ BLACK DIAMOND SUIT */ - { 0x0aee, 0x2665 }, /* heart ♥ BLACK HEART SUIT */ - { 0x0af0, 0x2720 }, /* maltesecross ✠ MALTESE CROSS */ - { 0x0af1, 0x2020 }, /* dagger † DAGGER */ - { 0x0af2, 0x2021 }, /* doubledagger ‡ DOUBLE DAGGER */ - { 0x0af3, 0x2713 }, /* checkmark ✓ CHECK MARK */ - { 0x0af4, 0x2717 }, /* ballotcross ✗ BALLOT X */ - { 0x0af5, 0x266f }, /* musicalsharp ♯ MUSIC SHARP SIGN */ - { 0x0af6, 0x266d }, /* musicalflat ♭ MUSIC FLAT SIGN */ - { 0x0af7, 0x2642 }, /* malesymbol ♂ MALE SIGN */ - { 0x0af8, 0x2640 }, /* femalesymbol ♀ FEMALE SIGN */ - { 0x0af9, 0x260e }, /* telephone ☎ BLACK TELEPHONE */ - { 0x0afa, 0x2315 }, /* telephonerecorder ⌕ TELEPHONE RECORDER */ - { 0x0afb, 0x2117 }, /* phonographcopyright ℗ SOUND RECORDING COPYRIGHT */ - { 0x0afc, 0x2038 }, /* caret ‸ CARET */ - { 0x0afd, 0x201a }, /* singlelowquotemark ‚ SINGLE LOW-9 QUOTATION MARK */ - { 0x0afe, 0x201e }, /* doublelowquotemark „ DOUBLE LOW-9 QUOTATION MARK */ - /* 0x0aff cursor ? ??? */ - { 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */ - { 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */ - { 0x0ba8, 0x2228 }, /* downcaret ∨ LOGICAL OR */ - { 0x0ba9, 0x2227 }, /* upcaret ∧ LOGICAL AND */ - { 0x0bc0, 0x00af }, /* overbar ¯ MACRON */ - { 0x0bc2, 0x22a4 }, /* downtack ⊤ DOWN TACK */ - { 0x0bc3, 0x2229 }, /* upshoe ∩ INTERSECTION */ - { 0x0bc4, 0x230a }, /* downstile ⌊ LEFT FLOOR */ - { 0x0bc6, 0x005f }, /* underbar _ LOW LINE */ - { 0x0bca, 0x2218 }, /* jot ∘ RING OPERATOR */ - { 0x0bcc, 0x2395 }, /* quad ⎕ APL FUNCTIONAL SYMBOL QUAD (Unicode 3.0) */ - { 0x0bce, 0x22a5 }, /* uptack ⊥ UP TACK */ - { 0x0bcf, 0x25cb }, /* circle ○ WHITE CIRCLE */ - { 0x0bd3, 0x2308 }, /* upstile ⌈ LEFT CEILING */ - { 0x0bd6, 0x222a }, /* downshoe ∪ UNION */ - { 0x0bd8, 0x2283 }, /* rightshoe ⊃ SUPERSET OF */ - { 0x0bda, 0x2282 }, /* leftshoe ⊂ SUBSET OF */ - { 0x0bdc, 0x22a2 }, /* lefttack ⊢ RIGHT TACK */ - { 0x0bfc, 0x22a3 }, /* righttack ⊣ LEFT TACK */ - { 0x0cdf, 0x2017 }, /* hebrew_doublelowline ‗ DOUBLE LOW LINE */ - { 0x0ce0, 0x05d0 }, /* hebrew_aleph א HEBREW LETTER ALEF */ - { 0x0ce1, 0x05d1 }, /* hebrew_bet ב HEBREW LETTER BET */ - { 0x0ce2, 0x05d2 }, /* hebrew_gimel ג HEBREW LETTER GIMEL */ - { 0x0ce3, 0x05d3 }, /* hebrew_dalet ד HEBREW LETTER DALET */ - { 0x0ce4, 0x05d4 }, /* hebrew_he ה HEBREW LETTER HE */ - { 0x0ce5, 0x05d5 }, /* hebrew_waw ו HEBREW LETTER VAV */ - { 0x0ce6, 0x05d6 }, /* hebrew_zain ז HEBREW LETTER ZAYIN */ - { 0x0ce7, 0x05d7 }, /* hebrew_chet ח HEBREW LETTER HET */ - { 0x0ce8, 0x05d8 }, /* hebrew_tet ט HEBREW LETTER TET */ - { 0x0ce9, 0x05d9 }, /* hebrew_yod י HEBREW LETTER YOD */ - { 0x0cea, 0x05da }, /* hebrew_finalkaph ך HEBREW LETTER FINAL KAF */ - { 0x0ceb, 0x05db }, /* hebrew_kaph כ HEBREW LETTER KAF */ - { 0x0cec, 0x05dc }, /* hebrew_lamed ל HEBREW LETTER LAMED */ - { 0x0ced, 0x05dd }, /* hebrew_finalmem ם HEBREW LETTER FINAL MEM */ - { 0x0cee, 0x05de }, /* hebrew_mem מ HEBREW LETTER MEM */ - { 0x0cef, 0x05df }, /* hebrew_finalnun ן HEBREW LETTER FINAL NUN */ - { 0x0cf0, 0x05e0 }, /* hebrew_nun נ HEBREW LETTER NUN */ - { 0x0cf1, 0x05e1 }, /* hebrew_samech ס HEBREW LETTER SAMEKH */ - { 0x0cf2, 0x05e2 }, /* hebrew_ayin ע HEBREW LETTER AYIN */ - { 0x0cf3, 0x05e3 }, /* hebrew_finalpe ף HEBREW LETTER FINAL PE */ - { 0x0cf4, 0x05e4 }, /* hebrew_pe פ HEBREW LETTER PE */ - { 0x0cf5, 0x05e5 }, /* hebrew_finalzade ץ HEBREW LETTER FINAL TSADI */ - { 0x0cf6, 0x05e6 }, /* hebrew_zade צ HEBREW LETTER TSADI */ - { 0x0cf7, 0x05e7 }, /* hebrew_qoph ק HEBREW LETTER QOF */ - { 0x0cf8, 0x05e8 }, /* hebrew_resh ר HEBREW LETTER RESH */ - { 0x0cf9, 0x05e9 }, /* hebrew_shin ש HEBREW LETTER SHIN */ - { 0x0cfa, 0x05ea }, /* hebrew_taw ת HEBREW LETTER TAV */ - { 0x0da1, 0x0e01 }, /* Thai_kokai ก THAI CHARACTER KO KAI */ - { 0x0da2, 0x0e02 }, /* Thai_khokhai ข THAI CHARACTER KHO KHAI */ - { 0x0da3, 0x0e03 }, /* Thai_khokhuat ฃ THAI CHARACTER KHO KHUAT */ - { 0x0da4, 0x0e04 }, /* Thai_khokhwai ค THAI CHARACTER KHO KHWAI */ - { 0x0da5, 0x0e05 }, /* Thai_khokhon ฅ THAI CHARACTER KHO KHON */ - { 0x0da6, 0x0e06 }, /* Thai_khorakhang ฆ THAI CHARACTER KHO RAKHANG */ - { 0x0da7, 0x0e07 }, /* Thai_ngongu ง THAI CHARACTER NGO NGU */ - { 0x0da8, 0x0e08 }, /* Thai_chochan จ THAI CHARACTER CHO CHAN */ - { 0x0da9, 0x0e09 }, /* Thai_choching ฉ THAI CHARACTER CHO CHING */ - { 0x0daa, 0x0e0a }, /* Thai_chochang ช THAI CHARACTER CHO CHANG */ - { 0x0dab, 0x0e0b }, /* Thai_soso ซ THAI CHARACTER SO SO */ - { 0x0dac, 0x0e0c }, /* Thai_chochoe ฌ THAI CHARACTER CHO CHOE */ - { 0x0dad, 0x0e0d }, /* Thai_yoying ญ THAI CHARACTER YO YING */ - { 0x0dae, 0x0e0e }, /* Thai_dochada ฎ THAI CHARACTER DO CHADA */ - { 0x0daf, 0x0e0f }, /* Thai_topatak ฏ THAI CHARACTER TO PATAK */ - { 0x0db0, 0x0e10 }, /* Thai_thothan ฐ THAI CHARACTER THO THAN */ - { 0x0db1, 0x0e11 }, /* Thai_thonangmontho ฑ THAI CHARACTER THO NANGMONTHO */ - { 0x0db2, 0x0e12 }, /* Thai_thophuthao ฒ THAI CHARACTER THO PHUTHAO */ - { 0x0db3, 0x0e13 }, /* Thai_nonen ณ THAI CHARACTER NO NEN */ - { 0x0db4, 0x0e14 }, /* Thai_dodek ด THAI CHARACTER DO DEK */ - { 0x0db5, 0x0e15 }, /* Thai_totao ต THAI CHARACTER TO TAO */ - { 0x0db6, 0x0e16 }, /* Thai_thothung ถ THAI CHARACTER THO THUNG */ - { 0x0db7, 0x0e17 }, /* Thai_thothahan ท THAI CHARACTER THO THAHAN */ - { 0x0db8, 0x0e18 }, /* Thai_thothong ธ THAI CHARACTER THO THONG */ - { 0x0db9, 0x0e19 }, /* Thai_nonu น THAI CHARACTER NO NU */ - { 0x0dba, 0x0e1a }, /* Thai_bobaimai บ THAI CHARACTER BO BAIMAI */ - { 0x0dbb, 0x0e1b }, /* Thai_popla ป THAI CHARACTER PO PLA */ - { 0x0dbc, 0x0e1c }, /* Thai_phophung ผ THAI CHARACTER PHO PHUNG */ - { 0x0dbd, 0x0e1d }, /* Thai_fofa ฝ THAI CHARACTER FO FA */ - { 0x0dbe, 0x0e1e }, /* Thai_phophan พ THAI CHARACTER PHO PHAN */ - { 0x0dbf, 0x0e1f }, /* Thai_fofan ฟ THAI CHARACTER FO FAN */ - { 0x0dc0, 0x0e20 }, /* Thai_phosamphao ภ THAI CHARACTER PHO SAMPHAO */ - { 0x0dc1, 0x0e21 }, /* Thai_moma ม THAI CHARACTER MO MA */ - { 0x0dc2, 0x0e22 }, /* Thai_yoyak ย THAI CHARACTER YO YAK */ - { 0x0dc3, 0x0e23 }, /* Thai_rorua ร THAI CHARACTER RO RUA */ - { 0x0dc4, 0x0e24 }, /* Thai_ru ฤ THAI CHARACTER RU */ - { 0x0dc5, 0x0e25 }, /* Thai_loling ล THAI CHARACTER LO LING */ - { 0x0dc6, 0x0e26 }, /* Thai_lu ฦ THAI CHARACTER LU */ - { 0x0dc7, 0x0e27 }, /* Thai_wowaen ว THAI CHARACTER WO WAEN */ - { 0x0dc8, 0x0e28 }, /* Thai_sosala ศ THAI CHARACTER SO SALA */ - { 0x0dc9, 0x0e29 }, /* Thai_sorusi ษ THAI CHARACTER SO RUSI */ - { 0x0dca, 0x0e2a }, /* Thai_sosua ส THAI CHARACTER SO SUA */ - { 0x0dcb, 0x0e2b }, /* Thai_hohip ห THAI CHARACTER HO HIP */ - { 0x0dcc, 0x0e2c }, /* Thai_lochula ฬ THAI CHARACTER LO CHULA */ - { 0x0dcd, 0x0e2d }, /* Thai_oang อ THAI CHARACTER O ANG */ - { 0x0dce, 0x0e2e }, /* Thai_honokhuk ฮ THAI CHARACTER HO NOKHUK */ - { 0x0dcf, 0x0e2f }, /* Thai_paiyannoi ฯ THAI CHARACTER PAIYANNOI */ - { 0x0dd0, 0x0e30 }, /* Thai_saraa ะ THAI CHARACTER SARA A */ - { 0x0dd1, 0x0e31 }, /* Thai_maihanakat ั THAI CHARACTER MAI HAN-AKAT */ - { 0x0dd2, 0x0e32 }, /* Thai_saraaa า THAI CHARACTER SARA AA */ - { 0x0dd3, 0x0e33 }, /* Thai_saraam ำ THAI CHARACTER SARA AM */ - { 0x0dd4, 0x0e34 }, /* Thai_sarai ิ THAI CHARACTER SARA I */ - { 0x0dd5, 0x0e35 }, /* Thai_saraii ี THAI CHARACTER SARA II */ - { 0x0dd6, 0x0e36 }, /* Thai_saraue ึ THAI CHARACTER SARA UE */ - { 0x0dd7, 0x0e37 }, /* Thai_sarauee ื THAI CHARACTER SARA UEE */ - { 0x0dd8, 0x0e38 }, /* Thai_sarau ุ THAI CHARACTER SARA U */ - { 0x0dd9, 0x0e39 }, /* Thai_sarauu ู THAI CHARACTER SARA UU */ - { 0x0dda, 0x0e3a }, /* Thai_phinthu ฺ THAI CHARACTER PHINTHU */ - { 0x0dde, 0x0e3e }, /* Thai_maihanakat_maitho ฾ ??? */ - { 0x0ddf, 0x0e3f }, /* Thai_baht ฿ THAI CURRENCY SYMBOL BAHT */ - { 0x0de0, 0x0e40 }, /* Thai_sarae เ THAI CHARACTER SARA E */ - { 0x0de1, 0x0e41 }, /* Thai_saraae แ THAI CHARACTER SARA AE */ - { 0x0de2, 0x0e42 }, /* Thai_sarao โ THAI CHARACTER SARA O */ - { 0x0de3, 0x0e43 }, /* Thai_saraaimaimuan ใ THAI CHARACTER SARA AI MAIMUAN */ - { 0x0de4, 0x0e44 }, /* Thai_saraaimaimalai ไ THAI CHARACTER SARA AI MAIMALAI */ - { 0x0de5, 0x0e45 }, /* Thai_lakkhangyao ๅ THAI CHARACTER LAKKHANGYAO */ - { 0x0de6, 0x0e46 }, /* Thai_maiyamok ๆ THAI CHARACTER MAIYAMOK */ - { 0x0de7, 0x0e47 }, /* Thai_maitaikhu ็ THAI CHARACTER MAITAIKHU */ - { 0x0de8, 0x0e48 }, /* Thai_maiek ่ THAI CHARACTER MAI EK */ - { 0x0de9, 0x0e49 }, /* Thai_maitho ้ THAI CHARACTER MAI THO */ - { 0x0dea, 0x0e4a }, /* Thai_maitri ๊ THAI CHARACTER MAI TRI */ - { 0x0deb, 0x0e4b }, /* Thai_maichattawa ๋ THAI CHARACTER MAI CHATTAWA */ - { 0x0dec, 0x0e4c }, /* Thai_thanthakhat ์ THAI CHARACTER THANTHAKHAT */ - { 0x0ded, 0x0e4d }, /* Thai_nikhahit ํ THAI CHARACTER NIKHAHIT */ - { 0x0df0, 0x0e50 }, /* Thai_leksun ๐ THAI DIGIT ZERO */ - { 0x0df1, 0x0e51 }, /* Thai_leknung ๑ THAI DIGIT ONE */ - { 0x0df2, 0x0e52 }, /* Thai_leksong ๒ THAI DIGIT TWO */ - { 0x0df3, 0x0e53 }, /* Thai_leksam ๓ THAI DIGIT THREE */ - { 0x0df4, 0x0e54 }, /* Thai_leksi ๔ THAI DIGIT FOUR */ - { 0x0df5, 0x0e55 }, /* Thai_lekha ๕ THAI DIGIT FIVE */ - { 0x0df6, 0x0e56 }, /* Thai_lekhok ๖ THAI DIGIT SIX */ - { 0x0df7, 0x0e57 }, /* Thai_lekchet ๗ THAI DIGIT SEVEN */ - { 0x0df8, 0x0e58 }, /* Thai_lekpaet ๘ THAI DIGIT EIGHT */ - { 0x0df9, 0x0e59 }, /* Thai_lekkao ๙ THAI DIGIT NINE */ - { 0x0ea1, 0x3131 }, /* Hangul_Kiyeog ㄱ HANGUL LETTER KIYEOK */ - { 0x0ea2, 0x3132 }, /* Hangul_SsangKiyeog ㄲ HANGUL LETTER SSANGKIYEOK */ - { 0x0ea3, 0x3133 }, /* Hangul_KiyeogSios ㄳ HANGUL LETTER KIYEOK-SIOS */ - { 0x0ea4, 0x3134 }, /* Hangul_Nieun ㄴ HANGUL LETTER NIEUN */ - { 0x0ea5, 0x3135 }, /* Hangul_NieunJieuj ㄵ HANGUL LETTER NIEUN-CIEUC */ - { 0x0ea6, 0x3136 }, /* Hangul_NieunHieuh ㄶ HANGUL LETTER NIEUN-HIEUH */ - { 0x0ea7, 0x3137 }, /* Hangul_Dikeud ㄷ HANGUL LETTER TIKEUT */ - { 0x0ea8, 0x3138 }, /* Hangul_SsangDikeud ㄸ HANGUL LETTER SSANGTIKEUT */ - { 0x0ea9, 0x3139 }, /* Hangul_Rieul ㄹ HANGUL LETTER RIEUL */ - { 0x0eaa, 0x313a }, /* Hangul_RieulKiyeog ㄺ HANGUL LETTER RIEUL-KIYEOK */ - { 0x0eab, 0x313b }, /* Hangul_RieulMieum ㄻ HANGUL LETTER RIEUL-MIEUM */ - { 0x0eac, 0x313c }, /* Hangul_RieulPieub ㄼ HANGUL LETTER RIEUL-PIEUP */ - { 0x0ead, 0x313d }, /* Hangul_RieulSios ㄽ HANGUL LETTER RIEUL-SIOS */ - { 0x0eae, 0x313e }, /* Hangul_RieulTieut ㄾ HANGUL LETTER RIEUL-THIEUTH */ - { 0x0eaf, 0x313f }, /* Hangul_RieulPhieuf ㄿ HANGUL LETTER RIEUL-PHIEUPH */ - { 0x0eb0, 0x3140 }, /* Hangul_RieulHieuh ㅀ HANGUL LETTER RIEUL-HIEUH */ - { 0x0eb1, 0x3141 }, /* Hangul_Mieum ㅁ HANGUL LETTER MIEUM */ - { 0x0eb2, 0x3142 }, /* Hangul_Pieub ㅂ HANGUL LETTER PIEUP */ - { 0x0eb3, 0x3143 }, /* Hangul_SsangPieub ㅃ HANGUL LETTER SSANGPIEUP */ - { 0x0eb4, 0x3144 }, /* Hangul_PieubSios ㅄ HANGUL LETTER PIEUP-SIOS */ - { 0x0eb5, 0x3145 }, /* Hangul_Sios ㅅ HANGUL LETTER SIOS */ - { 0x0eb6, 0x3146 }, /* Hangul_SsangSios ㅆ HANGUL LETTER SSANGSIOS */ - { 0x0eb7, 0x3147 }, /* Hangul_Ieung ㅇ HANGUL LETTER IEUNG */ - { 0x0eb8, 0x3148 }, /* Hangul_Jieuj ㅈ HANGUL LETTER CIEUC */ - { 0x0eb9, 0x3149 }, /* Hangul_SsangJieuj ㅉ HANGUL LETTER SSANGCIEUC */ - { 0x0eba, 0x314a }, /* Hangul_Cieuc ㅊ HANGUL LETTER CHIEUCH */ - { 0x0ebb, 0x314b }, /* Hangul_Khieuq ㅋ HANGUL LETTER KHIEUKH */ - { 0x0ebc, 0x314c }, /* Hangul_Tieut ㅌ HANGUL LETTER THIEUTH */ - { 0x0ebd, 0x314d }, /* Hangul_Phieuf ㅍ HANGUL LETTER PHIEUPH */ - { 0x0ebe, 0x314e }, /* Hangul_Hieuh ㅎ HANGUL LETTER HIEUH */ - { 0x0ebf, 0x314f }, /* Hangul_A ㅏ HANGUL LETTER A */ - { 0x0ec0, 0x3150 }, /* Hangul_AE ㅐ HANGUL LETTER AE */ - { 0x0ec1, 0x3151 }, /* Hangul_YA ㅑ HANGUL LETTER YA */ - { 0x0ec2, 0x3152 }, /* Hangul_YAE ㅒ HANGUL LETTER YAE */ - { 0x0ec3, 0x3153 }, /* Hangul_EO ㅓ HANGUL LETTER EO */ - { 0x0ec4, 0x3154 }, /* Hangul_E ㅔ HANGUL LETTER E */ - { 0x0ec5, 0x3155 }, /* Hangul_YEO ㅕ HANGUL LETTER YEO */ - { 0x0ec6, 0x3156 }, /* Hangul_YE ㅖ HANGUL LETTER YE */ - { 0x0ec7, 0x3157 }, /* Hangul_O ㅗ HANGUL LETTER O */ - { 0x0ec8, 0x3158 }, /* Hangul_WA ㅘ HANGUL LETTER WA */ - { 0x0ec9, 0x3159 }, /* Hangul_WAE ㅙ HANGUL LETTER WAE */ - { 0x0eca, 0x315a }, /* Hangul_OE ㅚ HANGUL LETTER OE */ - { 0x0ecb, 0x315b }, /* Hangul_YO ㅛ HANGUL LETTER YO */ - { 0x0ecc, 0x315c }, /* Hangul_U ㅜ HANGUL LETTER U */ - { 0x0ecd, 0x315d }, /* Hangul_WEO ㅝ HANGUL LETTER WEO */ - { 0x0ece, 0x315e }, /* Hangul_WE ㅞ HANGUL LETTER WE */ - { 0x0ecf, 0x315f }, /* Hangul_WI ㅟ HANGUL LETTER WI */ - { 0x0ed0, 0x3160 }, /* Hangul_YU ㅠ HANGUL LETTER YU */ - { 0x0ed1, 0x3161 }, /* Hangul_EU ㅡ HANGUL LETTER EU */ - { 0x0ed2, 0x3162 }, /* Hangul_YI ㅢ HANGUL LETTER YI */ - { 0x0ed3, 0x3163 }, /* Hangul_I ㅣ HANGUL LETTER I */ - { 0x0ed4, 0x11a8 }, /* Hangul_J_Kiyeog ᆨ HANGUL JONGSEONG KIYEOK */ - { 0x0ed5, 0x11a9 }, /* Hangul_J_SsangKiyeog ᆩ HANGUL JONGSEONG SSANGKIYEOK */ - { 0x0ed6, 0x11aa }, /* Hangul_J_KiyeogSios ᆪ HANGUL JONGSEONG KIYEOK-SIOS */ - { 0x0ed7, 0x11ab }, /* Hangul_J_Nieun ᆫ HANGUL JONGSEONG NIEUN */ - { 0x0ed8, 0x11ac }, /* Hangul_J_NieunJieuj ᆬ HANGUL JONGSEONG NIEUN-CIEUC */ - { 0x0ed9, 0x11ad }, /* Hangul_J_NieunHieuh ᆭ HANGUL JONGSEONG NIEUN-HIEUH */ - { 0x0eda, 0x11ae }, /* Hangul_J_Dikeud ᆮ HANGUL JONGSEONG TIKEUT */ - { 0x0edb, 0x11af }, /* Hangul_J_Rieul ᆯ HANGUL JONGSEONG RIEUL */ - { 0x0edc, 0x11b0 }, /* Hangul_J_RieulKiyeog ᆰ HANGUL JONGSEONG RIEUL-KIYEOK */ - { 0x0edd, 0x11b1 }, /* Hangul_J_RieulMieum ᆱ HANGUL JONGSEONG RIEUL-MIEUM */ - { 0x0ede, 0x11b2 }, /* Hangul_J_RieulPieub ᆲ HANGUL JONGSEONG RIEUL-PIEUP */ - { 0x0edf, 0x11b3 }, /* Hangul_J_RieulSios ᆳ HANGUL JONGSEONG RIEUL-SIOS */ - { 0x0ee0, 0x11b4 }, /* Hangul_J_RieulTieut ᆴ HANGUL JONGSEONG RIEUL-THIEUTH */ - { 0x0ee1, 0x11b5 }, /* Hangul_J_RieulPhieuf ᆵ HANGUL JONGSEONG RIEUL-PHIEUPH */ - { 0x0ee2, 0x11b6 }, /* Hangul_J_RieulHieuh ᆶ HANGUL JONGSEONG RIEUL-HIEUH */ - { 0x0ee3, 0x11b7 }, /* Hangul_J_Mieum ᆷ HANGUL JONGSEONG MIEUM */ - { 0x0ee4, 0x11b8 }, /* Hangul_J_Pieub ᆸ HANGUL JONGSEONG PIEUP */ - { 0x0ee5, 0x11b9 }, /* Hangul_J_PieubSios ᆹ HANGUL JONGSEONG PIEUP-SIOS */ - { 0x0ee6, 0x11ba }, /* Hangul_J_Sios ᆺ HANGUL JONGSEONG SIOS */ - { 0x0ee7, 0x11bb }, /* Hangul_J_SsangSios ᆻ HANGUL JONGSEONG SSANGSIOS */ - { 0x0ee8, 0x11bc }, /* Hangul_J_Ieung ᆼ HANGUL JONGSEONG IEUNG */ - { 0x0ee9, 0x11bd }, /* Hangul_J_Jieuj ᆽ HANGUL JONGSEONG CIEUC */ - { 0x0eea, 0x11be }, /* Hangul_J_Cieuc ᆾ HANGUL JONGSEONG CHIEUCH */ - { 0x0eeb, 0x11bf }, /* Hangul_J_Khieuq ᆿ HANGUL JONGSEONG KHIEUKH */ - { 0x0eec, 0x11c0 }, /* Hangul_J_Tieut ᇀ HANGUL JONGSEONG THIEUTH */ - { 0x0eed, 0x11c1 }, /* Hangul_J_Phieuf ᇁ HANGUL JONGSEONG PHIEUPH */ - { 0x0eee, 0x11c2 }, /* Hangul_J_Hieuh ᇂ HANGUL JONGSEONG HIEUH */ - { 0x0eef, 0x316d }, /* Hangul_RieulYeorinHieuh ㅭ HANGUL LETTER RIEUL-YEORINHIEUH */ - { 0x0ef0, 0x3171 }, /* Hangul_SunkyeongeumMieum ㅱ HANGUL LETTER KAPYEOUNMIEUM */ - { 0x0ef1, 0x3178 }, /* Hangul_SunkyeongeumPieub ㅸ HANGUL LETTER KAPYEOUNPIEUP */ - { 0x0ef2, 0x317f }, /* Hangul_PanSios ㅿ HANGUL LETTER PANSIOS */ -/* 0x0ef3 Hangul_KkogjiDalrinIeung ? ??? */ - { 0x0ef4, 0x3184 }, /* Hangul_SunkyeongeumPhieuf ㆄ HANGUL LETTER KAPYEOUNPHIEUPH */ - { 0x0ef5, 0x3186 }, /* Hangul_YeorinHieuh ㆆ HANGUL LETTER YEORINHIEUH */ - { 0x0ef6, 0x318d }, /* Hangul_AraeA ㆍ HANGUL LETTER ARAEA */ - { 0x0ef7, 0x318e }, /* Hangul_AraeAE ㆎ HANGUL LETTER ARAEAE */ - { 0x0ef8, 0x11eb }, /* Hangul_J_PanSios ᇫ HANGUL JONGSEONG PANSIOS */ - { 0x0ef9, 0x11f0 }, /* Hangul_J_KkogjiDalrinIeung ᇰ HANGUL JONGSEONG YESIEUNG */ - { 0x0efa, 0x11f9 }, /* Hangul_J_YeorinHieuh ᇹ HANGUL JONGSEONG YEORINHIEUH */ - { 0x0eff, 0x20a9 }, /* Korean_Won ₩ WON SIGN */ - { 0x13a4, 0x20ac }, /* Euro € EURO SIGN */ - { 0x13bc, 0x0152 }, /* OE Œ LATIN CAPITAL LIGATURE OE */ - { 0x13bd, 0x0153 }, /* oe œ LATIN SMALL LIGATURE OE */ - { 0x13be, 0x0178 }, /* Ydiaeresis Ÿ LATIN CAPITAL LETTER Y WITH DIAERESIS */ - { 0x20a0, 0x20a0 }, /* EcuSign ₠ EURO-CURRENCY SIGN */ - { 0x20a1, 0x20a1 }, /* ColonSign ₡ COLON SIGN */ - { 0x20a2, 0x20a2 }, /* CruzeiroSign ₢ CRUZEIRO SIGN */ - { 0x20a3, 0x20a3 }, /* FFrancSign ₣ FRENCH FRANC SIGN */ - { 0x20a4, 0x20a4 }, /* LiraSign ₤ LIRA SIGN */ - { 0x20a5, 0x20a5 }, /* MillSign ₥ MILL SIGN */ - { 0x20a6, 0x20a6 }, /* NairaSign ₦ NAIRA SIGN */ - { 0x20a7, 0x20a7 }, /* PesetaSign ₧ PESETA SIGN */ - { 0x20a8, 0x20a8 }, /* RupeeSign ₨ RUPEE SIGN */ - { 0x20a9, 0x20a9 }, /* WonSign ₩ WON SIGN */ - { 0x20aa, 0x20aa }, /* NewSheqelSign ₪ NEW SHEQEL SIGN */ - { 0x20ab, 0x20ab }, /* DongSign ₫ DONG SIGN */ - { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */ -}; - -/* binary search with range check */ -static uint32_t -bin_search(const struct codepair *table, size_t length, xkb_keysym_t keysym) -{ - size_t first = 0; - size_t last = length; - - if (keysym < table[0].keysym || keysym > table[length].keysym) - return 0; - - /* binary search in table */ - while (last >= first) { - size_t mid = (first + last) / 2; - if (table[mid].keysym < keysym) - first = mid + 1; - else if (table[mid].keysym > keysym) - last = mid - 1; - else /* found it */ - return table[mid].ucs; - } - - /* no matching Unicode value found in table */ - return 0; -} - -XKB_EXPORT uint32_t -xkb_keysym_to_utf32(xkb_keysym_t keysym) -{ - /* first check for Latin-1 characters (1:1 mapping) */ - if ((keysym >= 0x0020 && keysym <= 0x007e) || - (keysym >= 0x00a0 && keysym <= 0x00ff)) - return keysym; - - /* patch encoding botch */ - if (keysym == XKB_KEY_KP_Space) - return XKB_KEY_space & 0x7f; - - /* special keysyms */ - if ((keysym >= XKB_KEY_BackSpace && keysym <= XKB_KEY_Clear) || - (keysym >= XKB_KEY_KP_Multiply && keysym <= XKB_KEY_KP_9) || - keysym == XKB_KEY_Return || keysym == XKB_KEY_Escape || - keysym == XKB_KEY_Delete || keysym == XKB_KEY_KP_Tab || - keysym == XKB_KEY_KP_Enter || keysym == XKB_KEY_KP_Equal) - return keysym & 0x7f; - - /* also check for directly encoded Unicode codepoints */ - /* - * In theory, this is supposed to start from 0x100100, such that the ASCII - * range, which is already covered by 0x00-0xff, can't be encoded in two - * ways. However, changing this after a couple of decades probably won't - * go well, so it stays as it is. - */ - if (0x01000000 <= keysym && keysym <= 0x0110ffff) - return keysym - 0x01000000; - - /* search main table */ - return bin_search(keysymtab, ARRAY_SIZE(keysymtab) - 1, keysym); -} - -/* - * Copyright © 2012 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Rob Bradford - */ - -XKB_EXPORT int -xkb_keysym_to_utf8(xkb_keysym_t keysym, char *buffer, size_t size) -{ - uint32_t codepoint; - - if (size < 7) - return -1; - - codepoint = xkb_keysym_to_utf32(keysym); - - if (codepoint == 0) - return 0; - - return utf32_to_utf8(codepoint, buffer); -} diff --git a/src/3rdparty/xkbcommon/src/keysym.c b/src/3rdparty/xkbcommon/src/keysym.c deleted file mode 100644 index 6d06de0bf0..0000000000 --- a/src/3rdparty/xkbcommon/src/keysym.c +++ /dev/null @@ -1,762 +0,0 @@ -/* - * Copyright 1985, 1987, 1990, 1998 The Open Group - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the names of the authors or their - * institutions shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization from the authors. - */ - -/* - * Copyright © 2009 Dan Nicholson - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include "xkbcommon/xkbcommon.h" -#include "utils.h" -#include "keysym.h" -#include "ks_tables.h" - -static inline const char * -get_name(const struct name_keysym *entry) -{ - return keysym_names + entry->offset; -} - -static int -compare_by_keysym(const void *a, const void *b) -{ - const xkb_keysym_t *key = a; - const struct name_keysym *entry = b; - if (*key < entry->keysym) - return -1; - if (*key > entry->keysym) - return 1; - return 0; -} - -static int -compare_by_name(const void *a, const void *b) -{ - const char *key = a; - const struct name_keysym *entry = b; - return istrcmp(key, get_name(entry)); -} - -XKB_EXPORT int -xkb_keysym_get_name(xkb_keysym_t ks, char *buffer, size_t size) -{ - const struct name_keysym *entry; - - if ((ks & ((unsigned long) ~0x1fffffff)) != 0) { - snprintf(buffer, size, "Invalid"); - return -1; - } - - entry = bsearch(&ks, keysym_to_name, - ARRAY_SIZE(keysym_to_name), - sizeof(*keysym_to_name), - compare_by_keysym); - if (entry) - return snprintf(buffer, size, "%s", get_name(entry)); - - /* Unnamed Unicode codepoint. */ - if (ks >= 0x01000100 && ks <= 0x0110ffff) { - const int width = (ks & 0xff0000UL) ? 8 : 4; - return snprintf(buffer, size, "U%0*lX", width, ks & 0xffffffUL); - } - - /* Unnamed, non-Unicode, symbol (shouldn't generally happen). */ - return snprintf(buffer, size, "0x%08x", ks); -} - -/* - * Find the correct keysym if one case-insensitive match is given. - * - * The name_to_keysym table is sorted by istrcmp(). So bsearch() may return - * _any_ of all possible case-insensitive duplicates. This function searches the - * returned entry @entry, all previous and all next entries that match by - * case-insensitive comparison and returns the exact match to @name. If @icase - * is true, then this returns the best case-insensitive match instead of a - * correct match. - * The "best" case-insensitive match is the lower-case keysym which we find with - * the help of xkb_keysym_is_lower(). - * The only keysyms that only differ by letter-case are keysyms that are - * available as lower-case and upper-case variant (like KEY_a and KEY_A). So - * returning the first lower-case match is enough in this case. - */ -static const struct name_keysym * -find_sym(const struct name_keysym *entry, const char *name, bool icase) -{ - const struct name_keysym *iter, *last; - size_t len = ARRAY_SIZE(name_to_keysym); - - if (!entry) - return NULL; - - if (!icase && strcmp(get_name(entry), name) == 0) - return entry; - if (icase && xkb_keysym_is_lower(entry->keysym)) - return entry; - - for (iter = entry - 1; iter >= name_to_keysym; --iter) { - if (!icase && strcmp(get_name(iter), name) == 0) - return iter; - if (istrcmp(get_name(iter), get_name(entry)) != 0) - break; - if (icase && xkb_keysym_is_lower(iter->keysym)) - return iter; - } - - last = name_to_keysym + len; - for (iter = entry + 1; iter < last; ++iter) { - if (!icase && strcmp(get_name(iter), name) == 0) - return iter; - if (istrcmp(get_name(iter), get_name(entry)) != 0) - break; - if (icase && xkb_keysym_is_lower(iter->keysym)) - return iter; - } - - if (icase) - return entry; - return NULL; -} - -XKB_EXPORT xkb_keysym_t -xkb_keysym_from_name(const char *s, enum xkb_keysym_flags flags) -{ - const struct name_keysym *entry; - char *tmp; - xkb_keysym_t val; - bool icase = (flags & XKB_KEYSYM_CASE_INSENSITIVE); - - if (flags & ~XKB_KEYSYM_CASE_INSENSITIVE) - return XKB_KEY_NoSymbol; - - entry = bsearch(s, name_to_keysym, - ARRAY_SIZE(name_to_keysym), - sizeof(*name_to_keysym), - compare_by_name); - entry = find_sym(entry, s, icase); - if (entry) - return entry->keysym; - - if (*s == 'U' || (icase && *s == 'u')) { - val = strtoul(&s[1], &tmp, 16); - if (tmp && *tmp != '\0') - return XKB_KEY_NoSymbol; - - if (val < 0x20 || (val > 0x7e && val < 0xa0)) - return XKB_KEY_NoSymbol; - if (val < 0x100) - return val; - if (val > 0x10ffff) - return XKB_KEY_NoSymbol; - return val | 0x01000000; - } - else if (s[0] == '0' && (s[1] == 'x' || (icase && s[1] == 'X'))) { - val = strtoul(&s[2], &tmp, 16); - if (tmp && *tmp != '\0') - return XKB_KEY_NoSymbol; - - return val; - } - - /* Stupid inconsistency between the headers and XKeysymDB: the former has - * no separating underscore, while some XF86* syms in the latter did. - * As a last ditch effort, try without. */ - if (strncmp(s, "XF86_", 5) == 0 || - (icase && strncasecmp(s, "XF86_", 5) == 0)) { - xkb_keysym_t ret; - tmp = strdup(s); - if (!tmp) - return XKB_KEY_NoSymbol; - memmove(&tmp[4], &tmp[5], strlen(s) - 5 + 1); - ret = xkb_keysym_from_name(tmp, flags); - free(tmp); - return ret; - } - - return XKB_KEY_NoSymbol; -} - -bool -xkb_keysym_is_keypad(xkb_keysym_t keysym) -{ - return keysym >= XKB_KEY_KP_Space && keysym <= XKB_KEY_KP_Equal; -} - - -bool -xkb_keysym_is_modifier(xkb_keysym_t keysym) -{ - return - (keysym >= XKB_KEY_Shift_L && keysym <= XKB_KEY_Hyper_R) || - /* libX11 only goes upto XKB_KEY_ISO_Level5_Lock. */ - (keysym >= XKB_KEY_ISO_Lock && keysym <= XKB_KEY_ISO_Last_Group_Lock) || - keysym == XKB_KEY_Mode_switch || - keysym == XKB_KEY_Num_Lock; -} - -static void -XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper); - -bool -xkb_keysym_is_lower(xkb_keysym_t ks) -{ - xkb_keysym_t lower, upper; - - XConvertCase(ks, &lower, &upper); - - if (lower == upper) - return false; - - return (ks == lower ? true : false); -} - -bool -xkb_keysym_is_upper(xkb_keysym_t ks) -{ - xkb_keysym_t lower, upper; - - XConvertCase(ks, &lower, &upper); - - if (lower == upper) - return false; - - return (ks == upper ? true : false); -} - -XKB_EXPORT xkb_keysym_t -xkb_keysym_to_lower(xkb_keysym_t ks) -{ - xkb_keysym_t lower, upper; - - XConvertCase(ks, &lower, &upper); - - return lower; -} - -XKB_EXPORT xkb_keysym_t -xkb_keysym_to_upper(xkb_keysym_t ks) -{ - xkb_keysym_t lower, upper; - - XConvertCase(ks, &lower, &upper); - - return upper; -} - -/* - * The following is copied verbatim from libX11:src/KeyBind.c, commit - * d45b3fc19fbe95c41afc4e51d768df6d42332010, with the following changes: - * - unsigned -> uint32_t - * - unsigend short -> uint16_t - * - s/XK_/XKB_KEY_ - * - * XXX: If newlocale() and iswlower_l()/iswupper_l() interface ever - * become portable, we should use that in conjunction with - * xkb_keysym_to_utf32(), instead of all this stuff. We should - * be sure to give the same results as libX11, though, and be - * locale independent; this information is used by xkbcomp to - * find the automatic type to assign to key groups. - */ - -static void -UCSConvertCase(uint32_t code, xkb_keysym_t *lower, xkb_keysym_t *upper) -{ - /* Case conversion for UCS, as in Unicode Data version 4.0.0 */ - /* NB: Only converts simple one-to-one mappings. */ - - /* Tables are used where they take less space than */ - /* the code to work out the mappings. Zero values mean */ - /* undefined code points. */ - - static uint16_t const IPAExt_upper_mapping[] = { /* part only */ - 0x0181, 0x0186, 0x0255, 0x0189, 0x018A, - 0x0258, 0x018F, 0x025A, 0x0190, 0x025C, 0x025D, 0x025E, 0x025F, - 0x0193, 0x0261, 0x0262, 0x0194, 0x0264, 0x0265, 0x0266, 0x0267, - 0x0197, 0x0196, 0x026A, 0x026B, 0x026C, 0x026D, 0x026E, 0x019C, - 0x0270, 0x0271, 0x019D, 0x0273, 0x0274, 0x019F, 0x0276, 0x0277, - 0x0278, 0x0279, 0x027A, 0x027B, 0x027C, 0x027D, 0x027E, 0x027F, - 0x01A6, 0x0281, 0x0282, 0x01A9, 0x0284, 0x0285, 0x0286, 0x0287, - 0x01AE, 0x0289, 0x01B1, 0x01B2, 0x028C, 0x028D, 0x028E, 0x028F, - 0x0290, 0x0291, 0x01B7 - }; - - static uint16_t const LatinExtB_upper_mapping[] = { /* first part only */ - 0x0180, 0x0181, 0x0182, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, - 0x0187, 0x0189, 0x018A, 0x018B, 0x018B, 0x018D, 0x018E, 0x018F, - 0x0190, 0x0191, 0x0191, 0x0193, 0x0194, 0x01F6, 0x0196, 0x0197, - 0x0198, 0x0198, 0x019A, 0x019B, 0x019C, 0x019D, 0x0220, 0x019F, - 0x01A0, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, 0x01A6, 0x01A7, - 0x01A7, 0x01A9, 0x01AA, 0x01AB, 0x01AC, 0x01AC, 0x01AE, 0x01AF, - 0x01AF, 0x01B1, 0x01B2, 0x01B3, 0x01B3, 0x01B5, 0x01B5, 0x01B7, - 0x01B8, 0x01B8, 0x01BA, 0x01BB, 0x01BC, 0x01BC, 0x01BE, 0x01F7, - 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C4, 0x01C4, 0x01C4, 0x01C7, - 0x01C7, 0x01C7, 0x01CA, 0x01CA, 0x01CA - }; - - static uint16_t const LatinExtB_lower_mapping[] = { /* first part only */ - 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188, - 0x0188, 0x0256, 0x0257, 0x018C, 0x018C, 0x018D, 0x01DD, 0x0259, - 0x025B, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268, - 0x0199, 0x0199, 0x019A, 0x019B, 0x026F, 0x0272, 0x019E, 0x0275, - 0x01A1, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x0280, 0x01A8, - 0x01A8, 0x0283, 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x0288, 0x01B0, - 0x01B0, 0x028A, 0x028B, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x0292, - 0x01B9, 0x01B9, 0x01BA, 0x01BB, 0x01BD, 0x01BD, 0x01BE, 0x01BF, - 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C6, 0x01C6, 0x01C6, 0x01C9, - 0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CC - }; - - static uint16_t const Greek_upper_mapping[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, - 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x0386, 0x0387, - 0x0388, 0x0389, 0x038A, 0x0000, 0x038C, 0x0000, 0x038E, 0x038F, - 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, - 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, - 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x0386, 0x0388, 0x0389, 0x038A, - 0x03B0, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, - 0x03A0, 0x03A1, 0x03A3, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, - 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x038C, 0x038E, 0x038F, 0x0000, - 0x0392, 0x0398, 0x03D2, 0x03D3, 0x03D4, 0x03A6, 0x03A0, 0x03D7, - 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, - 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, - 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, - 0x039A, 0x03A1, 0x03F9, 0x03F3, 0x03F4, 0x0395, 0x03F6, 0x03F7, - 0x03F7, 0x03F9, 0x03FA, 0x03FA, 0x0000, 0x0000, 0x0000, 0x0000 - }; - - static uint16_t const Greek_lower_mapping[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, - 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x03AC, 0x0387, - 0x03AD, 0x03AE, 0x03AF, 0x0000, 0x03CC, 0x0000, 0x03CD, 0x03CE, - 0x0390, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, - 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, - 0x03C0, 0x03C1, 0x0000, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, - 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, - 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, - 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, - 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, - 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000, - 0x03D0, 0x03D1, 0x03D2, 0x03D3, 0x03D4, 0x03D5, 0x03D6, 0x03D7, - 0x03D9, 0x03D9, 0x03DB, 0x03DB, 0x03DD, 0x03DD, 0x03DF, 0x03DF, - 0x03E1, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7, - 0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03EF, - 0x03F0, 0x03F1, 0x03F2, 0x03F3, 0x03B8, 0x03F5, 0x03F6, 0x03F8, - 0x03F8, 0x03F2, 0x03FB, 0x03FB, 0x0000, 0x0000, 0x0000, 0x0000 - }; - - static uint16_t const GreekExt_lower_mapping[] = { - 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07, - 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07, - 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000, - 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000, - 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, - 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, - 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, - 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, - 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000, - 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000, - 0x1F50, 0x1F51, 0x1F52, 0x1F53, 0x1F54, 0x1F55, 0x1F56, 0x1F57, - 0x0000, 0x1F51, 0x0000, 0x1F53, 0x0000, 0x1F55, 0x0000, 0x1F57, - 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, - 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, - 0x1F70, 0x1F71, 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1F76, 0x1F77, - 0x1F78, 0x1F79, 0x1F7A, 0x1F7B, 0x1F7C, 0x1F7D, 0x0000, 0x0000, - 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, - 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, - 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, - 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, - 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, - 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, - 0x1FB0, 0x1FB1, 0x1FB2, 0x1FB3, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, - 0x1FB0, 0x1FB1, 0x1F70, 0x1F71, 0x1FB3, 0x1FBD, 0x1FBE, 0x1FBF, - 0x1FC0, 0x1FC1, 0x1FC2, 0x1FC3, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, - 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1FC3, 0x1FCD, 0x1FCE, 0x1FCF, - 0x1FD0, 0x1FD1, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, - 0x1FD0, 0x1FD1, 0x1F76, 0x1F77, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, - 0x1FE0, 0x1FE1, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FE5, 0x1FE6, 0x1FE7, - 0x1FE0, 0x1FE1, 0x1F7A, 0x1F7B, 0x1FE5, 0x1FED, 0x1FEE, 0x1FEF, - 0x0000, 0x0000, 0x1FF2, 0x1FF3, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, - 0x1F78, 0x1F79, 0x1F7C, 0x1F7D, 0x1FF3, 0x1FFD, 0x1FFE, 0x0000 - }; - - static uint16_t const GreekExt_upper_mapping[] = { - 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, - 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, - 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000, - 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000, - 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, - 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, - 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, - 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, - 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000, - 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000, - 0x1F50, 0x1F59, 0x1F52, 0x1F5B, 0x1F54, 0x1F5D, 0x1F56, 0x1F5F, - 0x0000, 0x1F59, 0x0000, 0x1F5B, 0x0000, 0x1F5D, 0x0000, 0x1F5F, - 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, - 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, - 0x1FBA, 0x1FBB, 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FDA, 0x1FDB, - 0x1FF8, 0x1FF9, 0x1FEA, 0x1FEB, 0x1FFA, 0x1FFB, 0x0000, 0x0000, - 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, - 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, - 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, - 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, - 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, - 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, - 0x1FB8, 0x1FB9, 0x1FB2, 0x1FBC, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, - 0x1FB8, 0x1FB9, 0x1FBA, 0x1FBB, 0x1FBC, 0x1FBD, 0x0399, 0x1FBF, - 0x1FC0, 0x1FC1, 0x1FC2, 0x1FCC, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, - 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FCC, 0x1FCD, 0x1FCE, 0x1FCF, - 0x1FD8, 0x1FD9, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, - 0x1FD8, 0x1FD9, 0x1FDA, 0x1FDB, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, - 0x1FE8, 0x1FE9, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FEC, 0x1FE6, 0x1FE7, - 0x1FE8, 0x1FE9, 0x1FEA, 0x1FEB, 0x1FEC, 0x1FED, 0x1FEE, 0x1FEF, - 0x0000, 0x0000, 0x1FF2, 0x1FFC, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, - 0x1FF8, 0x1FF9, 0x1FFA, 0x1FFB, 0x1FFC, 0x1FFD, 0x1FFE, 0x0000 - }; - - *lower = code; - *upper = code; - - /* Basic Latin and Latin-1 Supplement, U+0000 to U+00FF */ - if (code <= 0x00ff) { - if (code >= 0x0041 && code <= 0x005a) /* A-Z */ - *lower += 0x20; - else if (code >= 0x0061 && code <= 0x007a) /* a-z */ - *upper -= 0x20; - else if ( (code >= 0x00c0 && code <= 0x00d6) || - (code >= 0x00d8 && code <= 0x00de) ) - *lower += 0x20; - else if ( (code >= 0x00e0 && code <= 0x00f6) || - (code >= 0x00f8 && code <= 0x00fe) ) - *upper -= 0x20; - else if (code == 0x00ff) /* y with diaeresis */ - *upper = 0x0178; - else if (code == 0x00b5) /* micro sign */ - *upper = 0x039c; - return; - } - - /* Latin Extended-A, U+0100 to U+017F */ - if (code >= 0x0100 && code <= 0x017f) { - if ( (code >= 0x0100 && code <= 0x012f) || - (code >= 0x0132 && code <= 0x0137) || - (code >= 0x014a && code <= 0x0177) ) { - *upper = code & ~1; - *lower = code | 1; - } - else if ( (code >= 0x0139 && code <= 0x0148) || - (code >= 0x0179 && code <= 0x017e) ) { - if (code & 1) - *lower += 1; - else - *upper -= 1; - } - else if (code == 0x0130) - *lower = 0x0069; - else if (code == 0x0131) - *upper = 0x0049; - else if (code == 0x0178) - *lower = 0x00ff; - else if (code == 0x017f) - *upper = 0x0053; - return; - } - - /* Latin Extended-B, U+0180 to U+024F */ - if (code >= 0x0180 && code <= 0x024f) { - if (code >= 0x01cd && code <= 0x01dc) { - if (code & 1) - *lower += 1; - else - *upper -= 1; - } - else if ( (code >= 0x01de && code <= 0x01ef) || - (code >= 0x01f4 && code <= 0x01f5) || - (code >= 0x01f8 && code <= 0x021f) || - (code >= 0x0222 && code <= 0x0233) ) { - *lower |= 1; - *upper &= ~1; - } - else if (code >= 0x0180 && code <= 0x01cc) { - *lower = LatinExtB_lower_mapping[code - 0x0180]; - *upper = LatinExtB_upper_mapping[code - 0x0180]; - } - else if (code == 0x01dd) - *upper = 0x018e; - else if (code == 0x01f1 || code == 0x01f2) { - *lower = 0x01f3; - *upper = 0x01f1; - } - else if (code == 0x01f3) - *upper = 0x01f1; - else if (code == 0x01f6) - *lower = 0x0195; - else if (code == 0x01f7) - *lower = 0x01bf; - else if (code == 0x0220) - *lower = 0x019e; - return; - } - - /* IPA Extensions, U+0250 to U+02AF */ - if (code >= 0x0253 && code <= 0x0292) { - *upper = IPAExt_upper_mapping[code - 0x0253]; - } - - /* Combining Diacritical Marks, U+0300 to U+036F */ - if (code == 0x0345) { - *upper = 0x0399; - } - - /* Greek and Coptic, U+0370 to U+03FF */ - if (code >= 0x0370 && code <= 0x03ff) { - *lower = Greek_lower_mapping[code - 0x0370]; - *upper = Greek_upper_mapping[code - 0x0370]; - if (*upper == 0) - *upper = code; - if (*lower == 0) - *lower = code; - } - - /* Cyrillic and Cyrillic Supplementary, U+0400 to U+052F */ - if ( (code >= 0x0400 && code <= 0x04ff) || - (code >= 0x0500 && code <= 0x052f) ) { - if (code >= 0x0400 && code <= 0x040f) - *lower += 0x50; - else if (code >= 0x0410 && code <= 0x042f) - *lower += 0x20; - else if (code >= 0x0430 && code <= 0x044f) - *upper -= 0x20; - else if (code >= 0x0450 && code <= 0x045f) - *upper -= 0x50; - else if ( (code >= 0x0460 && code <= 0x0481) || - (code >= 0x048a && code <= 0x04bf) || - (code >= 0x04d0 && code <= 0x04f5) || - (code >= 0x04f8 && code <= 0x04f9) || - (code >= 0x0500 && code <= 0x050f) ) { - *upper &= ~1; - *lower |= 1; - } - else if (code >= 0x04c1 && code <= 0x04ce) { - if (code & 1) - *lower += 1; - else - *upper -= 1; - } - } - - /* Armenian, U+0530 to U+058F */ - if (code >= 0x0530 && code <= 0x058f) { - if (code >= 0x0531 && code <= 0x0556) - *lower += 0x30; - else if (code >=0x0561 && code <= 0x0586) - *upper -= 0x30; - } - - /* Latin Extended Additional, U+1E00 to U+1EFF */ - if (code >= 0x1e00 && code <= 0x1eff) { - if ( (code >= 0x1e00 && code <= 0x1e95) || - (code >= 0x1ea0 && code <= 0x1ef9) ) { - *upper &= ~1; - *lower |= 1; - } - else if (code == 0x1e9b) - *upper = 0x1e60; - } - - /* Greek Extended, U+1F00 to U+1FFF */ - if (code >= 0x1f00 && code <= 0x1fff) { - *lower = GreekExt_lower_mapping[code - 0x1f00]; - *upper = GreekExt_upper_mapping[code - 0x1f00]; - if (*upper == 0) - *upper = code; - if (*lower == 0) - *lower = code; - } - - /* Letterlike Symbols, U+2100 to U+214F */ - if (code >= 0x2100 && code <= 0x214f) { - switch (code) { - case 0x2126: *lower = 0x03c9; break; - case 0x212a: *lower = 0x006b; break; - case 0x212b: *lower = 0x00e5; break; - } - } - /* Number Forms, U+2150 to U+218F */ - else if (code >= 0x2160 && code <= 0x216f) - *lower += 0x10; - else if (code >= 0x2170 && code <= 0x217f) - *upper -= 0x10; - /* Enclosed Alphanumerics, U+2460 to U+24FF */ - else if (code >= 0x24b6 && code <= 0x24cf) - *lower += 0x1a; - else if (code >= 0x24d0 && code <= 0x24e9) - *upper -= 0x1a; - /* Halfwidth and Fullwidth Forms, U+FF00 to U+FFEF */ - else if (code >= 0xff21 && code <= 0xff3a) - *lower += 0x20; - else if (code >= 0xff41 && code <= 0xff5a) - *upper -= 0x20; - /* Deseret, U+10400 to U+104FF */ - else if (code >= 0x10400 && code <= 0x10427) - *lower += 0x28; - else if (code >= 0x10428 && code <= 0x1044f) - *upper -= 0x28; -} - -static void -XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper) -{ - /* Latin 1 keysym */ - if (sym < 0x100) { - UCSConvertCase(sym, lower, upper); - return; - } - - /* Unicode keysym */ - if ((sym & 0xff000000) == 0x01000000) { - UCSConvertCase((sym & 0x00ffffff), lower, upper); - *upper |= 0x01000000; - *lower |= 0x01000000; - return; - } - - /* Legacy keysym */ - - *lower = sym; - *upper = sym; - - switch(sym >> 8) { - case 1: /* Latin 2 */ - /* Assume the KeySym is a legal value (ignore discontinuities) */ - if (sym == XKB_KEY_Aogonek) - *lower = XKB_KEY_aogonek; - else if (sym >= XKB_KEY_Lstroke && sym <= XKB_KEY_Sacute) - *lower += (XKB_KEY_lstroke - XKB_KEY_Lstroke); - else if (sym >= XKB_KEY_Scaron && sym <= XKB_KEY_Zacute) - *lower += (XKB_KEY_scaron - XKB_KEY_Scaron); - else if (sym >= XKB_KEY_Zcaron && sym <= XKB_KEY_Zabovedot) - *lower += (XKB_KEY_zcaron - XKB_KEY_Zcaron); - else if (sym == XKB_KEY_aogonek) - *upper = XKB_KEY_Aogonek; - else if (sym >= XKB_KEY_lstroke && sym <= XKB_KEY_sacute) - *upper -= (XKB_KEY_lstroke - XKB_KEY_Lstroke); - else if (sym >= XKB_KEY_scaron && sym <= XKB_KEY_zacute) - *upper -= (XKB_KEY_scaron - XKB_KEY_Scaron); - else if (sym >= XKB_KEY_zcaron && sym <= XKB_KEY_zabovedot) - *upper -= (XKB_KEY_zcaron - XKB_KEY_Zcaron); - else if (sym >= XKB_KEY_Racute && sym <= XKB_KEY_Tcedilla) - *lower += (XKB_KEY_racute - XKB_KEY_Racute); - else if (sym >= XKB_KEY_racute && sym <= XKB_KEY_tcedilla) - *upper -= (XKB_KEY_racute - XKB_KEY_Racute); - break; - case 2: /* Latin 3 */ - /* Assume the KeySym is a legal value (ignore discontinuities) */ - if (sym >= XKB_KEY_Hstroke && sym <= XKB_KEY_Hcircumflex) - *lower += (XKB_KEY_hstroke - XKB_KEY_Hstroke); - else if (sym >= XKB_KEY_Gbreve && sym <= XKB_KEY_Jcircumflex) - *lower += (XKB_KEY_gbreve - XKB_KEY_Gbreve); - else if (sym >= XKB_KEY_hstroke && sym <= XKB_KEY_hcircumflex) - *upper -= (XKB_KEY_hstroke - XKB_KEY_Hstroke); - else if (sym >= XKB_KEY_gbreve && sym <= XKB_KEY_jcircumflex) - *upper -= (XKB_KEY_gbreve - XKB_KEY_Gbreve); - else if (sym >= XKB_KEY_Cabovedot && sym <= XKB_KEY_Scircumflex) - *lower += (XKB_KEY_cabovedot - XKB_KEY_Cabovedot); - else if (sym >= XKB_KEY_cabovedot && sym <= XKB_KEY_scircumflex) - *upper -= (XKB_KEY_cabovedot - XKB_KEY_Cabovedot); - break; - case 3: /* Latin 4 */ - /* Assume the KeySym is a legal value (ignore discontinuities) */ - if (sym >= XKB_KEY_Rcedilla && sym <= XKB_KEY_Tslash) - *lower += (XKB_KEY_rcedilla - XKB_KEY_Rcedilla); - else if (sym >= XKB_KEY_rcedilla && sym <= XKB_KEY_tslash) - *upper -= (XKB_KEY_rcedilla - XKB_KEY_Rcedilla); - else if (sym == XKB_KEY_ENG) - *lower = XKB_KEY_eng; - else if (sym == XKB_KEY_eng) - *upper = XKB_KEY_ENG; - else if (sym >= XKB_KEY_Amacron && sym <= XKB_KEY_Umacron) - *lower += (XKB_KEY_amacron - XKB_KEY_Amacron); - else if (sym >= XKB_KEY_amacron && sym <= XKB_KEY_umacron) - *upper -= (XKB_KEY_amacron - XKB_KEY_Amacron); - break; - case 6: /* Cyrillic */ - /* Assume the KeySym is a legal value (ignore discontinuities) */ - if (sym >= XKB_KEY_Serbian_DJE && sym <= XKB_KEY_Serbian_DZE) - *lower -= (XKB_KEY_Serbian_DJE - XKB_KEY_Serbian_dje); - else if (sym >= XKB_KEY_Serbian_dje && sym <= XKB_KEY_Serbian_dze) - *upper += (XKB_KEY_Serbian_DJE - XKB_KEY_Serbian_dje); - else if (sym >= XKB_KEY_Cyrillic_YU && sym <= XKB_KEY_Cyrillic_HARDSIGN) - *lower -= (XKB_KEY_Cyrillic_YU - XKB_KEY_Cyrillic_yu); - else if (sym >= XKB_KEY_Cyrillic_yu && sym <= XKB_KEY_Cyrillic_hardsign) - *upper += (XKB_KEY_Cyrillic_YU - XKB_KEY_Cyrillic_yu); - break; - case 7: /* Greek */ - /* Assume the KeySym is a legal value (ignore discontinuities) */ - if (sym >= XKB_KEY_Greek_ALPHAaccent && sym <= XKB_KEY_Greek_OMEGAaccent) - *lower += (XKB_KEY_Greek_alphaaccent - XKB_KEY_Greek_ALPHAaccent); - else if (sym >= XKB_KEY_Greek_alphaaccent && sym <= XKB_KEY_Greek_omegaaccent && - sym != XKB_KEY_Greek_iotaaccentdieresis && - sym != XKB_KEY_Greek_upsilonaccentdieresis) - *upper -= (XKB_KEY_Greek_alphaaccent - XKB_KEY_Greek_ALPHAaccent); - else if (sym >= XKB_KEY_Greek_ALPHA && sym <= XKB_KEY_Greek_OMEGA) - *lower += (XKB_KEY_Greek_alpha - XKB_KEY_Greek_ALPHA); - else if (sym >= XKB_KEY_Greek_alpha && sym <= XKB_KEY_Greek_omega && - sym != XKB_KEY_Greek_finalsmallsigma) - *upper -= (XKB_KEY_Greek_alpha - XKB_KEY_Greek_ALPHA); - break; - case 0x13: /* Latin 9 */ - if (sym == XKB_KEY_OE) - *lower = XKB_KEY_oe; - else if (sym == XKB_KEY_oe) - *upper = XKB_KEY_OE; - else if (sym == XKB_KEY_Ydiaeresis) - *lower = XKB_KEY_ydiaeresis; - break; - } -} diff --git a/src/3rdparty/xkbcommon/src/keysym.h b/src/3rdparty/xkbcommon/src/keysym.h deleted file mode 100644 index 26339632ee..0000000000 --- a/src/3rdparty/xkbcommon/src/keysym.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 1985, 1987, 1990, 1998 The Open Group - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the names of the authors or their - * institutions shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization from the authors. - */ - -/* - * Copyright © 2009 Dan Nicholson - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef KEYSYM_H -#define KEYSYM_H - -bool -xkb_keysym_is_lower(xkb_keysym_t keysym); - -bool -xkb_keysym_is_upper(xkb_keysym_t keysym); - -bool -xkb_keysym_is_keypad(xkb_keysym_t keysym); - -bool -xkb_keysym_is_modifier(xkb_keysym_t keysym); - -#endif diff --git a/src/3rdparty/xkbcommon/src/ks_tables.h b/src/3rdparty/xkbcommon/src/ks_tables.h deleted file mode 100644 index aa55fc1df0..0000000000 --- a/src/3rdparty/xkbcommon/src/ks_tables.h +++ /dev/null @@ -1,7116 +0,0 @@ - -/** - * This file comes from libxkbcommon and was generated by makekeys.py - * You can always fetch the latest version from: - * https://raw.github.com/xkbcommon/libxkbcommon/master/src/ks_tables.h - */ - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverlength-strings" -static const char *keysym_names = - "0\0" - "1\0" - "2\0" - "3\0" - "3270_AltCursor\0" - "3270_Attn\0" - "3270_BackTab\0" - "3270_ChangeScreen\0" - "3270_Copy\0" - "3270_CursorBlink\0" - "3270_CursorSelect\0" - "3270_DeleteWord\0" - "3270_Duplicate\0" - "3270_Enter\0" - "3270_EraseEOF\0" - "3270_EraseInput\0" - "3270_ExSelect\0" - "3270_FieldMark\0" - "3270_Ident\0" - "3270_Jump\0" - "3270_KeyClick\0" - "3270_Left2\0" - "3270_PA1\0" - "3270_PA2\0" - "3270_PA3\0" - "3270_Play\0" - "3270_PrintScreen\0" - "3270_Quit\0" - "3270_Record\0" - "3270_Reset\0" - "3270_Right2\0" - "3270_Rule\0" - "3270_Setup\0" - "3270_Test\0" - "4\0" - "5\0" - "6\0" - "7\0" - "8\0" - "9\0" - "A\0" - "a\0" - "Aacute\0" - "aacute\0" - "Abelowdot\0" - "abelowdot\0" - "abovedot\0" - "Abreve\0" - "abreve\0" - "Abreveacute\0" - "abreveacute\0" - "Abrevebelowdot\0" - "abrevebelowdot\0" - "Abrevegrave\0" - "abrevegrave\0" - "Abrevehook\0" - "abrevehook\0" - "Abrevetilde\0" - "abrevetilde\0" - "AccessX_Enable\0" - "AccessX_Feedback_Enable\0" - "Acircumflex\0" - "acircumflex\0" - "Acircumflexacute\0" - "acircumflexacute\0" - "Acircumflexbelowdot\0" - "acircumflexbelowdot\0" - "Acircumflexgrave\0" - "acircumflexgrave\0" - "Acircumflexhook\0" - "acircumflexhook\0" - "Acircumflextilde\0" - "acircumflextilde\0" - "acute\0" - "Adiaeresis\0" - "adiaeresis\0" - "AE\0" - "ae\0" - "Agrave\0" - "agrave\0" - "Ahook\0" - "ahook\0" - "Alt_L\0" - "Alt_R\0" - "Amacron\0" - "amacron\0" - "ampersand\0" - "Aogonek\0" - "aogonek\0" - "apostrophe\0" - "approxeq\0" - "approximate\0" - "Arabic_0\0" - "Arabic_1\0" - "Arabic_2\0" - "Arabic_3\0" - "Arabic_4\0" - "Arabic_5\0" - "Arabic_6\0" - "Arabic_7\0" - "Arabic_8\0" - "Arabic_9\0" - "Arabic_ain\0" - "Arabic_alef\0" - "Arabic_alefmaksura\0" - "Arabic_beh\0" - "Arabic_comma\0" - "Arabic_dad\0" - "Arabic_dal\0" - "Arabic_damma\0" - "Arabic_dammatan\0" - "Arabic_ddal\0" - "Arabic_farsi_yeh\0" - "Arabic_fatha\0" - "Arabic_fathatan\0" - "Arabic_feh\0" - "Arabic_fullstop\0" - "Arabic_gaf\0" - "Arabic_ghain\0" - "Arabic_ha\0" - "Arabic_hah\0" - "Arabic_hamza\0" - "Arabic_hamza_above\0" - "Arabic_hamza_below\0" - "Arabic_hamzaonalef\0" - "Arabic_hamzaonwaw\0" - "Arabic_hamzaonyeh\0" - "Arabic_hamzaunderalef\0" - "Arabic_heh\0" - "Arabic_heh_doachashmee\0" - "Arabic_heh_goal\0" - "Arabic_jeem\0" - "Arabic_jeh\0" - "Arabic_kaf\0" - "Arabic_kasra\0" - "Arabic_kasratan\0" - "Arabic_keheh\0" - "Arabic_khah\0" - "Arabic_lam\0" - "Arabic_madda_above\0" - "Arabic_maddaonalef\0" - "Arabic_meem\0" - "Arabic_noon\0" - "Arabic_noon_ghunna\0" - "Arabic_peh\0" - "Arabic_percent\0" - "Arabic_qaf\0" - "Arabic_question_mark\0" - "Arabic_ra\0" - "Arabic_rreh\0" - "Arabic_sad\0" - "Arabic_seen\0" - "Arabic_semicolon\0" - "Arabic_shadda\0" - "Arabic_sheen\0" - "Arabic_sukun\0" - "Arabic_superscript_alef\0" - "Arabic_switch\0" - "Arabic_tah\0" - "Arabic_tatweel\0" - "Arabic_tcheh\0" - "Arabic_teh\0" - "Arabic_tehmarbuta\0" - "Arabic_thal\0" - "Arabic_theh\0" - "Arabic_tteh\0" - "Arabic_veh\0" - "Arabic_waw\0" - "Arabic_yeh\0" - "Arabic_yeh_baree\0" - "Arabic_zah\0" - "Arabic_zain\0" - "Aring\0" - "aring\0" - "Armenian_accent\0" - "Armenian_amanak\0" - "Armenian_apostrophe\0" - "Armenian_AT\0" - "Armenian_at\0" - "Armenian_AYB\0" - "Armenian_ayb\0" - "Armenian_BEN\0" - "Armenian_ben\0" - "Armenian_but\0" - "Armenian_CHA\0" - "Armenian_cha\0" - "Armenian_DA\0" - "Armenian_da\0" - "Armenian_DZA\0" - "Armenian_dza\0" - "Armenian_E\0" - "Armenian_e\0" - "Armenian_exclam\0" - "Armenian_FE\0" - "Armenian_fe\0" - "Armenian_full_stop\0" - "Armenian_GHAT\0" - "Armenian_ghat\0" - "Armenian_GIM\0" - "Armenian_gim\0" - "Armenian_HI\0" - "Armenian_hi\0" - "Armenian_HO\0" - "Armenian_ho\0" - "Armenian_hyphen\0" - "Armenian_INI\0" - "Armenian_ini\0" - "Armenian_JE\0" - "Armenian_je\0" - "Armenian_KE\0" - "Armenian_ke\0" - "Armenian_KEN\0" - "Armenian_ken\0" - "Armenian_KHE\0" - "Armenian_khe\0" - "Armenian_ligature_ew\0" - "Armenian_LYUN\0" - "Armenian_lyun\0" - "Armenian_MEN\0" - "Armenian_men\0" - "Armenian_NU\0" - "Armenian_nu\0" - "Armenian_O\0" - "Armenian_o\0" - "Armenian_paruyk\0" - "Armenian_PE\0" - "Armenian_pe\0" - "Armenian_PYUR\0" - "Armenian_pyur\0" - "Armenian_question\0" - "Armenian_RA\0" - "Armenian_ra\0" - "Armenian_RE\0" - "Armenian_re\0" - "Armenian_SE\0" - "Armenian_se\0" - "Armenian_separation_mark\0" - "Armenian_SHA\0" - "Armenian_sha\0" - "Armenian_shesht\0" - "Armenian_TCHE\0" - "Armenian_tche\0" - "Armenian_TO\0" - "Armenian_to\0" - "Armenian_TSA\0" - "Armenian_tsa\0" - "Armenian_TSO\0" - "Armenian_tso\0" - "Armenian_TYUN\0" - "Armenian_tyun\0" - "Armenian_verjaket\0" - "Armenian_VEV\0" - "Armenian_vev\0" - "Armenian_VO\0" - "Armenian_vo\0" - "Armenian_VYUN\0" - "Armenian_vyun\0" - "Armenian_YECH\0" - "Armenian_yech\0" - "Armenian_yentamna\0" - "Armenian_ZA\0" - "Armenian_za\0" - "Armenian_ZHE\0" - "Armenian_zhe\0" - "asciicircum\0" - "asciitilde\0" - "asterisk\0" - "at\0" - "Atilde\0" - "atilde\0" - "AudibleBell_Enable\0" - "B\0" - "b\0" - "Babovedot\0" - "babovedot\0" - "backslash\0" - "BackSpace\0" - "BackTab\0" - "ballotcross\0" - "bar\0" - "because\0" - "Begin\0" - "blank\0" - "block\0" - "botintegral\0" - "botleftparens\0" - "botleftsqbracket\0" - "botleftsummation\0" - "botrightparens\0" - "botrightsqbracket\0" - "botrightsummation\0" - "bott\0" - "botvertsummationconnector\0" - "BounceKeys_Enable\0" - "braceleft\0" - "braceright\0" - "bracketleft\0" - "bracketright\0" - "braille_blank\0" - "braille_dot_1\0" - "braille_dot_10\0" - "braille_dot_2\0" - "braille_dot_3\0" - "braille_dot_4\0" - "braille_dot_5\0" - "braille_dot_6\0" - "braille_dot_7\0" - "braille_dot_8\0" - "braille_dot_9\0" - "braille_dots_1\0" - "braille_dots_12\0" - "braille_dots_123\0" - "braille_dots_1234\0" - "braille_dots_12345\0" - "braille_dots_123456\0" - "braille_dots_1234567\0" - "braille_dots_12345678\0" - "braille_dots_1234568\0" - "braille_dots_123457\0" - "braille_dots_1234578\0" - "braille_dots_123458\0" - "braille_dots_12346\0" - "braille_dots_123467\0" - "braille_dots_1234678\0" - "braille_dots_123468\0" - "braille_dots_12347\0" - "braille_dots_123478\0" - "braille_dots_12348\0" - "braille_dots_1235\0" - "braille_dots_12356\0" - "braille_dots_123567\0" - "braille_dots_1235678\0" - "braille_dots_123568\0" - "braille_dots_12357\0" - "braille_dots_123578\0" - "braille_dots_12358\0" - "braille_dots_1236\0" - "braille_dots_12367\0" - "braille_dots_123678\0" - "braille_dots_12368\0" - "braille_dots_1237\0" - "braille_dots_12378\0" - "braille_dots_1238\0" - "braille_dots_124\0" - "braille_dots_1245\0" - "braille_dots_12456\0" - "braille_dots_124567\0" - "braille_dots_1245678\0" - "braille_dots_124568\0" - "braille_dots_12457\0" - "braille_dots_124578\0" - "braille_dots_12458\0" - "braille_dots_1246\0" - "braille_dots_12467\0" - "braille_dots_124678\0" - "braille_dots_12468\0" - "braille_dots_1247\0" - "braille_dots_12478\0" - "braille_dots_1248\0" - "braille_dots_125\0" - "braille_dots_1256\0" - "braille_dots_12567\0" - "braille_dots_125678\0" - "braille_dots_12568\0" - "braille_dots_1257\0" - "braille_dots_12578\0" - "braille_dots_1258\0" - "braille_dots_126\0" - "braille_dots_1267\0" - "braille_dots_12678\0" - "braille_dots_1268\0" - "braille_dots_127\0" - "braille_dots_1278\0" - "braille_dots_128\0" - "braille_dots_13\0" - "braille_dots_134\0" - "braille_dots_1345\0" - "braille_dots_13456\0" - "braille_dots_134567\0" - "braille_dots_1345678\0" - "braille_dots_134568\0" - "braille_dots_13457\0" - "braille_dots_134578\0" - "braille_dots_13458\0" - "braille_dots_1346\0" - "braille_dots_13467\0" - "braille_dots_134678\0" - "braille_dots_13468\0" - "braille_dots_1347\0" - "braille_dots_13478\0" - "braille_dots_1348\0" - "braille_dots_135\0" - "braille_dots_1356\0" - "braille_dots_13567\0" - "braille_dots_135678\0" - "braille_dots_13568\0" - "braille_dots_1357\0" - "braille_dots_13578\0" - "braille_dots_1358\0" - "braille_dots_136\0" - "braille_dots_1367\0" - "braille_dots_13678\0" - "braille_dots_1368\0" - "braille_dots_137\0" - "braille_dots_1378\0" - "braille_dots_138\0" - "braille_dots_14\0" - "braille_dots_145\0" - "braille_dots_1456\0" - "braille_dots_14567\0" - "braille_dots_145678\0" - "braille_dots_14568\0" - "braille_dots_1457\0" - "braille_dots_14578\0" - "braille_dots_1458\0" - "braille_dots_146\0" - "braille_dots_1467\0" - "braille_dots_14678\0" - "braille_dots_1468\0" - "braille_dots_147\0" - "braille_dots_1478\0" - "braille_dots_148\0" - "braille_dots_15\0" - "braille_dots_156\0" - "braille_dots_1567\0" - "braille_dots_15678\0" - "braille_dots_1568\0" - "braille_dots_157\0" - "braille_dots_1578\0" - "braille_dots_158\0" - "braille_dots_16\0" - "braille_dots_167\0" - "braille_dots_1678\0" - "braille_dots_168\0" - "braille_dots_17\0" - "braille_dots_178\0" - "braille_dots_18\0" - "braille_dots_2\0" - "braille_dots_23\0" - "braille_dots_234\0" - "braille_dots_2345\0" - "braille_dots_23456\0" - "braille_dots_234567\0" - "braille_dots_2345678\0" - "braille_dots_234568\0" - "braille_dots_23457\0" - "braille_dots_234578\0" - "braille_dots_23458\0" - "braille_dots_2346\0" - "braille_dots_23467\0" - "braille_dots_234678\0" - "braille_dots_23468\0" - "braille_dots_2347\0" - "braille_dots_23478\0" - "braille_dots_2348\0" - "braille_dots_235\0" - "braille_dots_2356\0" - "braille_dots_23567\0" - "braille_dots_235678\0" - "braille_dots_23568\0" - "braille_dots_2357\0" - "braille_dots_23578\0" - "braille_dots_2358\0" - "braille_dots_236\0" - "braille_dots_2367\0" - "braille_dots_23678\0" - "braille_dots_2368\0" - "braille_dots_237\0" - "braille_dots_2378\0" - "braille_dots_238\0" - "braille_dots_24\0" - "braille_dots_245\0" - "braille_dots_2456\0" - "braille_dots_24567\0" - "braille_dots_245678\0" - "braille_dots_24568\0" - "braille_dots_2457\0" - "braille_dots_24578\0" - "braille_dots_2458\0" - "braille_dots_246\0" - "braille_dots_2467\0" - "braille_dots_24678\0" - "braille_dots_2468\0" - "braille_dots_247\0" - "braille_dots_2478\0" - "braille_dots_248\0" - "braille_dots_25\0" - "braille_dots_256\0" - "braille_dots_2567\0" - "braille_dots_25678\0" - "braille_dots_2568\0" - "braille_dots_257\0" - "braille_dots_2578\0" - "braille_dots_258\0" - "braille_dots_26\0" - "braille_dots_267\0" - "braille_dots_2678\0" - "braille_dots_268\0" - "braille_dots_27\0" - "braille_dots_278\0" - "braille_dots_28\0" - "braille_dots_3\0" - "braille_dots_34\0" - "braille_dots_345\0" - "braille_dots_3456\0" - "braille_dots_34567\0" - "braille_dots_345678\0" - "braille_dots_34568\0" - "braille_dots_3457\0" - "braille_dots_34578\0" - "braille_dots_3458\0" - "braille_dots_346\0" - "braille_dots_3467\0" - "braille_dots_34678\0" - "braille_dots_3468\0" - "braille_dots_347\0" - "braille_dots_3478\0" - "braille_dots_348\0" - "braille_dots_35\0" - "braille_dots_356\0" - "braille_dots_3567\0" - "braille_dots_35678\0" - "braille_dots_3568\0" - "braille_dots_357\0" - "braille_dots_3578\0" - "braille_dots_358\0" - "braille_dots_36\0" - "braille_dots_367\0" - "braille_dots_3678\0" - "braille_dots_368\0" - "braille_dots_37\0" - "braille_dots_378\0" - "braille_dots_38\0" - "braille_dots_4\0" - "braille_dots_45\0" - "braille_dots_456\0" - "braille_dots_4567\0" - "braille_dots_45678\0" - "braille_dots_4568\0" - "braille_dots_457\0" - "braille_dots_4578\0" - "braille_dots_458\0" - "braille_dots_46\0" - "braille_dots_467\0" - "braille_dots_4678\0" - "braille_dots_468\0" - "braille_dots_47\0" - "braille_dots_478\0" - "braille_dots_48\0" - "braille_dots_5\0" - "braille_dots_56\0" - "braille_dots_567\0" - "braille_dots_5678\0" - "braille_dots_568\0" - "braille_dots_57\0" - "braille_dots_578\0" - "braille_dots_58\0" - "braille_dots_6\0" - "braille_dots_67\0" - "braille_dots_678\0" - "braille_dots_68\0" - "braille_dots_7\0" - "braille_dots_78\0" - "braille_dots_8\0" - "Break\0" - "breve\0" - "brokenbar\0" - "Byelorussian_shortu\0" - "Byelorussian_SHORTU\0" - "C\0" - "c\0" - "c_h\0" - "C_h\0" - "C_H\0" - "Cabovedot\0" - "cabovedot\0" - "Cacute\0" - "cacute\0" - "Cancel\0" - "Caps_Lock\0" - "careof\0" - "caret\0" - "caron\0" - "Ccaron\0" - "ccaron\0" - "Ccedilla\0" - "ccedilla\0" - "Ccircumflex\0" - "ccircumflex\0" - "cedilla\0" - "cent\0" - "ch\0" - "Ch\0" - "CH\0" - "checkerboard\0" - "checkmark\0" - "circle\0" - "Clear\0" - "ClearLine\0" - "club\0" - "Codeinput\0" - "colon\0" - "ColonSign\0" - "comma\0" - "containsas\0" - "Control_L\0" - "Control_R\0" - "copyright\0" - "cr\0" - "crossinglines\0" - "CruzeiroSign\0" - "cuberoot\0" - "currency\0" - "cursor\0" - "Cyrillic_a\0" - "Cyrillic_A\0" - "Cyrillic_be\0" - "Cyrillic_BE\0" - "Cyrillic_che\0" - "Cyrillic_CHE\0" - "Cyrillic_CHE_descender\0" - "Cyrillic_che_descender\0" - "Cyrillic_CHE_vertstroke\0" - "Cyrillic_che_vertstroke\0" - "Cyrillic_de\0" - "Cyrillic_DE\0" - "Cyrillic_dzhe\0" - "Cyrillic_DZHE\0" - "Cyrillic_e\0" - "Cyrillic_E\0" - "Cyrillic_ef\0" - "Cyrillic_EF\0" - "Cyrillic_el\0" - "Cyrillic_EL\0" - "Cyrillic_em\0" - "Cyrillic_EM\0" - "Cyrillic_en\0" - "Cyrillic_EN\0" - "Cyrillic_EN_descender\0" - "Cyrillic_en_descender\0" - "Cyrillic_er\0" - "Cyrillic_ER\0" - "Cyrillic_es\0" - "Cyrillic_ES\0" - "Cyrillic_ghe\0" - "Cyrillic_GHE\0" - "Cyrillic_GHE_bar\0" - "Cyrillic_ghe_bar\0" - "Cyrillic_ha\0" - "Cyrillic_HA\0" - "Cyrillic_HA_descender\0" - "Cyrillic_ha_descender\0" - "Cyrillic_hardsign\0" - "Cyrillic_HARDSIGN\0" - "Cyrillic_i\0" - "Cyrillic_I\0" - "Cyrillic_I_macron\0" - "Cyrillic_i_macron\0" - "Cyrillic_ie\0" - "Cyrillic_IE\0" - "Cyrillic_io\0" - "Cyrillic_IO\0" - "Cyrillic_je\0" - "Cyrillic_JE\0" - "Cyrillic_ka\0" - "Cyrillic_KA\0" - "Cyrillic_KA_descender\0" - "Cyrillic_ka_descender\0" - "Cyrillic_KA_vertstroke\0" - "Cyrillic_ka_vertstroke\0" - "Cyrillic_lje\0" - "Cyrillic_LJE\0" - "Cyrillic_nje\0" - "Cyrillic_NJE\0" - "Cyrillic_o\0" - "Cyrillic_O\0" - "Cyrillic_O_bar\0" - "Cyrillic_o_bar\0" - "Cyrillic_pe\0" - "Cyrillic_PE\0" - "Cyrillic_SCHWA\0" - "Cyrillic_schwa\0" - "Cyrillic_sha\0" - "Cyrillic_SHA\0" - "Cyrillic_shcha\0" - "Cyrillic_SHCHA\0" - "Cyrillic_SHHA\0" - "Cyrillic_shha\0" - "Cyrillic_shorti\0" - "Cyrillic_SHORTI\0" - "Cyrillic_softsign\0" - "Cyrillic_SOFTSIGN\0" - "Cyrillic_te\0" - "Cyrillic_TE\0" - "Cyrillic_tse\0" - "Cyrillic_TSE\0" - "Cyrillic_u\0" - "Cyrillic_U\0" - "Cyrillic_U_macron\0" - "Cyrillic_u_macron\0" - "Cyrillic_U_straight\0" - "Cyrillic_u_straight\0" - "Cyrillic_U_straight_bar\0" - "Cyrillic_u_straight_bar\0" - "Cyrillic_ve\0" - "Cyrillic_VE\0" - "Cyrillic_ya\0" - "Cyrillic_YA\0" - "Cyrillic_yeru\0" - "Cyrillic_YERU\0" - "Cyrillic_yu\0" - "Cyrillic_YU\0" - "Cyrillic_ze\0" - "Cyrillic_ZE\0" - "Cyrillic_zhe\0" - "Cyrillic_ZHE\0" - "Cyrillic_ZHE_descender\0" - "Cyrillic_zhe_descender\0" - "D\0" - "d\0" - "Dabovedot\0" - "dabovedot\0" - "Dacute_accent\0" - "dagger\0" - "Dcaron\0" - "dcaron\0" - "Dcedilla_accent\0" - "Dcircumflex_accent\0" - "Ddiaeresis\0" - "dead_a\0" - "dead_A\0" - "dead_abovecomma\0" - "dead_abovedot\0" - "dead_abovereversedcomma\0" - "dead_abovering\0" - "dead_aboveverticalline\0" - "dead_acute\0" - "dead_belowbreve\0" - "dead_belowcircumflex\0" - "dead_belowcomma\0" - "dead_belowdiaeresis\0" - "dead_belowdot\0" - "dead_belowmacron\0" - "dead_belowring\0" - "dead_belowtilde\0" - "dead_belowverticalline\0" - "dead_breve\0" - "dead_capital_schwa\0" - "dead_caron\0" - "dead_cedilla\0" - "dead_circumflex\0" - "dead_currency\0" - "dead_dasia\0" - "dead_diaeresis\0" - "dead_doubleacute\0" - "dead_doublegrave\0" - "dead_e\0" - "dead_E\0" - "dead_grave\0" - "dead_greek\0" - "dead_hook\0" - "dead_horn\0" - "dead_i\0" - "dead_I\0" - "dead_invertedbreve\0" - "dead_iota\0" - "dead_longsolidusoverlay\0" - "dead_lowline\0" - "dead_macron\0" - "dead_o\0" - "dead_O\0" - "dead_ogonek\0" - "dead_perispomeni\0" - "dead_psili\0" - "dead_semivoiced_sound\0" - "dead_small_schwa\0" - "dead_stroke\0" - "dead_tilde\0" - "dead_u\0" - "dead_U\0" - "dead_voiced_sound\0" - "decimalpoint\0" - "degree\0" - "Delete\0" - "DeleteChar\0" - "DeleteLine\0" - "Dgrave_accent\0" - "diaeresis\0" - "diamond\0" - "digitspace\0" - "dintegral\0" - "division\0" - "dollar\0" - "DongSign\0" - "doubbaselinedot\0" - "doubleacute\0" - "doubledagger\0" - "doublelowquotemark\0" - "Down\0" - "downarrow\0" - "downcaret\0" - "downshoe\0" - "downstile\0" - "downtack\0" - "DRemove\0" - "Dring_accent\0" - "Dstroke\0" - "dstroke\0" - "Dtilde\0" - "E\0" - "e\0" - "Eabovedot\0" - "eabovedot\0" - "Eacute\0" - "eacute\0" - "Ebelowdot\0" - "ebelowdot\0" - "Ecaron\0" - "ecaron\0" - "Ecircumflex\0" - "ecircumflex\0" - "Ecircumflexacute\0" - "ecircumflexacute\0" - "Ecircumflexbelowdot\0" - "ecircumflexbelowdot\0" - "Ecircumflexgrave\0" - "ecircumflexgrave\0" - "Ecircumflexhook\0" - "ecircumflexhook\0" - "Ecircumflextilde\0" - "ecircumflextilde\0" - "EcuSign\0" - "Ediaeresis\0" - "ediaeresis\0" - "Egrave\0" - "egrave\0" - "Ehook\0" - "ehook\0" - "eightsubscript\0" - "eightsuperior\0" - "Eisu_Shift\0" - "Eisu_toggle\0" - "elementof\0" - "ellipsis\0" - "em3space\0" - "em4space\0" - "Emacron\0" - "emacron\0" - "emdash\0" - "emfilledcircle\0" - "emfilledrect\0" - "emopencircle\0" - "emopenrectangle\0" - "emptyset\0" - "emspace\0" - "End\0" - "endash\0" - "enfilledcircbullet\0" - "enfilledsqbullet\0" - "ENG\0" - "eng\0" - "enopencircbullet\0" - "enopensquarebullet\0" - "enspace\0" - "Eogonek\0" - "eogonek\0" - "equal\0" - "Escape\0" - "ETH\0" - "Eth\0" - "eth\0" - "Etilde\0" - "etilde\0" - "EuroSign\0" - "exclam\0" - "exclamdown\0" - "Execute\0" - "Ext16bit_L\0" - "Ext16bit_R\0" - "EZH\0" - "ezh\0" - "F\0" - "f\0" - "F1\0" - "F10\0" - "F11\0" - "F12\0" - "F13\0" - "F14\0" - "F15\0" - "F16\0" - "F17\0" - "F18\0" - "F19\0" - "F2\0" - "F20\0" - "F21\0" - "F22\0" - "F23\0" - "F24\0" - "F25\0" - "F26\0" - "F27\0" - "F28\0" - "F29\0" - "F3\0" - "F30\0" - "F31\0" - "F32\0" - "F33\0" - "F34\0" - "F35\0" - "F4\0" - "F5\0" - "F6\0" - "F7\0" - "F8\0" - "F9\0" - "Fabovedot\0" - "fabovedot\0" - "Farsi_0\0" - "Farsi_1\0" - "Farsi_2\0" - "Farsi_3\0" - "Farsi_4\0" - "Farsi_5\0" - "Farsi_6\0" - "Farsi_7\0" - "Farsi_8\0" - "Farsi_9\0" - "Farsi_yeh\0" - "femalesymbol\0" - "ff\0" - "FFrancSign\0" - "figdash\0" - "filledlefttribullet\0" - "filledrectbullet\0" - "filledrighttribullet\0" - "filledtribulletdown\0" - "filledtribulletup\0" - "Find\0" - "First_Virtual_Screen\0" - "fiveeighths\0" - "fivesixths\0" - "fivesubscript\0" - "fivesuperior\0" - "fourfifths\0" - "foursubscript\0" - "foursuperior\0" - "fourthroot\0" - "function\0" - "G\0" - "g\0" - "Gabovedot\0" - "gabovedot\0" - "Gbreve\0" - "gbreve\0" - "Gcaron\0" - "gcaron\0" - "Gcedilla\0" - "gcedilla\0" - "Gcircumflex\0" - "gcircumflex\0" - "Georgian_an\0" - "Georgian_ban\0" - "Georgian_can\0" - "Georgian_char\0" - "Georgian_chin\0" - "Georgian_cil\0" - "Georgian_don\0" - "Georgian_en\0" - "Georgian_fi\0" - "Georgian_gan\0" - "Georgian_ghan\0" - "Georgian_hae\0" - "Georgian_har\0" - "Georgian_he\0" - "Georgian_hie\0" - "Georgian_hoe\0" - "Georgian_in\0" - "Georgian_jhan\0" - "Georgian_jil\0" - "Georgian_kan\0" - "Georgian_khar\0" - "Georgian_las\0" - "Georgian_man\0" - "Georgian_nar\0" - "Georgian_on\0" - "Georgian_par\0" - "Georgian_phar\0" - "Georgian_qar\0" - "Georgian_rae\0" - "Georgian_san\0" - "Georgian_shin\0" - "Georgian_tan\0" - "Georgian_tar\0" - "Georgian_un\0" - "Georgian_vin\0" - "Georgian_we\0" - "Georgian_xan\0" - "Georgian_zen\0" - "Georgian_zhar\0" - "grave\0" - "greater\0" - "greaterthanequal\0" - "Greek_accentdieresis\0" - "Greek_ALPHA\0" - "Greek_alpha\0" - "Greek_ALPHAaccent\0" - "Greek_alphaaccent\0" - "Greek_BETA\0" - "Greek_beta\0" - "Greek_CHI\0" - "Greek_chi\0" - "Greek_DELTA\0" - "Greek_delta\0" - "Greek_EPSILON\0" - "Greek_epsilon\0" - "Greek_EPSILONaccent\0" - "Greek_epsilonaccent\0" - "Greek_ETA\0" - "Greek_eta\0" - "Greek_ETAaccent\0" - "Greek_etaaccent\0" - "Greek_finalsmallsigma\0" - "Greek_GAMMA\0" - "Greek_gamma\0" - "Greek_horizbar\0" - "Greek_IOTA\0" - "Greek_iota\0" - "Greek_IOTAaccent\0" - "Greek_iotaaccent\0" - "Greek_iotaaccentdieresis\0" - "Greek_IOTAdiaeresis\0" - "Greek_IOTAdieresis\0" - "Greek_iotadieresis\0" - "Greek_KAPPA\0" - "Greek_kappa\0" - "Greek_LAMBDA\0" - "Greek_lambda\0" - "Greek_LAMDA\0" - "Greek_lamda\0" - "Greek_MU\0" - "Greek_mu\0" - "Greek_NU\0" - "Greek_nu\0" - "Greek_OMEGA\0" - "Greek_omega\0" - "Greek_OMEGAaccent\0" - "Greek_omegaaccent\0" - "Greek_OMICRON\0" - "Greek_omicron\0" - "Greek_OMICRONaccent\0" - "Greek_omicronaccent\0" - "Greek_PHI\0" - "Greek_phi\0" - "Greek_PI\0" - "Greek_pi\0" - "Greek_PSI\0" - "Greek_psi\0" - "Greek_RHO\0" - "Greek_rho\0" - "Greek_SIGMA\0" - "Greek_sigma\0" - "Greek_switch\0" - "Greek_TAU\0" - "Greek_tau\0" - "Greek_THETA\0" - "Greek_theta\0" - "Greek_UPSILON\0" - "Greek_upsilon\0" - "Greek_UPSILONaccent\0" - "Greek_upsilonaccent\0" - "Greek_upsilonaccentdieresis\0" - "Greek_UPSILONdieresis\0" - "Greek_upsilondieresis\0" - "Greek_XI\0" - "Greek_xi\0" - "Greek_ZETA\0" - "Greek_zeta\0" - "guilder\0" - "guillemotleft\0" - "guillemotright\0" - "H\0" - "h\0" - "hairspace\0" - "Hangul\0" - "Hangul_A\0" - "Hangul_AE\0" - "Hangul_AraeA\0" - "Hangul_AraeAE\0" - "Hangul_Banja\0" - "Hangul_Cieuc\0" - "Hangul_Codeinput\0" - "Hangul_Dikeud\0" - "Hangul_E\0" - "Hangul_End\0" - "Hangul_EO\0" - "Hangul_EU\0" - "Hangul_Hanja\0" - "Hangul_Hieuh\0" - "Hangul_I\0" - "Hangul_Ieung\0" - "Hangul_J_Cieuc\0" - "Hangul_J_Dikeud\0" - "Hangul_J_Hieuh\0" - "Hangul_J_Ieung\0" - "Hangul_J_Jieuj\0" - "Hangul_J_Khieuq\0" - "Hangul_J_Kiyeog\0" - "Hangul_J_KiyeogSios\0" - "Hangul_J_KkogjiDalrinIeung\0" - "Hangul_J_Mieum\0" - "Hangul_J_Nieun\0" - "Hangul_J_NieunHieuh\0" - "Hangul_J_NieunJieuj\0" - "Hangul_J_PanSios\0" - "Hangul_J_Phieuf\0" - "Hangul_J_Pieub\0" - "Hangul_J_PieubSios\0" - "Hangul_J_Rieul\0" - "Hangul_J_RieulHieuh\0" - "Hangul_J_RieulKiyeog\0" - "Hangul_J_RieulMieum\0" - "Hangul_J_RieulPhieuf\0" - "Hangul_J_RieulPieub\0" - "Hangul_J_RieulSios\0" - "Hangul_J_RieulTieut\0" - "Hangul_J_Sios\0" - "Hangul_J_SsangKiyeog\0" - "Hangul_J_SsangSios\0" - "Hangul_J_Tieut\0" - "Hangul_J_YeorinHieuh\0" - "Hangul_Jamo\0" - "Hangul_Jeonja\0" - "Hangul_Jieuj\0" - "Hangul_Khieuq\0" - "Hangul_Kiyeog\0" - "Hangul_KiyeogSios\0" - "Hangul_KkogjiDalrinIeung\0" - "Hangul_Mieum\0" - "Hangul_MultipleCandidate\0" - "Hangul_Nieun\0" - "Hangul_NieunHieuh\0" - "Hangul_NieunJieuj\0" - "Hangul_O\0" - "Hangul_OE\0" - "Hangul_PanSios\0" - "Hangul_Phieuf\0" - "Hangul_Pieub\0" - "Hangul_PieubSios\0" - "Hangul_PostHanja\0" - "Hangul_PreHanja\0" - "Hangul_PreviousCandidate\0" - "Hangul_Rieul\0" - "Hangul_RieulHieuh\0" - "Hangul_RieulKiyeog\0" - "Hangul_RieulMieum\0" - "Hangul_RieulPhieuf\0" - "Hangul_RieulPieub\0" - "Hangul_RieulSios\0" - "Hangul_RieulTieut\0" - "Hangul_RieulYeorinHieuh\0" - "Hangul_Romaja\0" - "Hangul_SingleCandidate\0" - "Hangul_Sios\0" - "Hangul_Special\0" - "Hangul_SsangDikeud\0" - "Hangul_SsangJieuj\0" - "Hangul_SsangKiyeog\0" - "Hangul_SsangPieub\0" - "Hangul_SsangSios\0" - "Hangul_Start\0" - "Hangul_SunkyeongeumMieum\0" - "Hangul_SunkyeongeumPhieuf\0" - "Hangul_SunkyeongeumPieub\0" - "Hangul_switch\0" - "Hangul_Tieut\0" - "Hangul_U\0" - "Hangul_WA\0" - "Hangul_WAE\0" - "Hangul_WE\0" - "Hangul_WEO\0" - "Hangul_WI\0" - "Hangul_YA\0" - "Hangul_YAE\0" - "Hangul_YE\0" - "Hangul_YEO\0" - "Hangul_YeorinHieuh\0" - "Hangul_YI\0" - "Hangul_YO\0" - "Hangul_YU\0" - "Hankaku\0" - "Hcircumflex\0" - "hcircumflex\0" - "heart\0" - "hebrew_aleph\0" - "hebrew_ayin\0" - "hebrew_bet\0" - "hebrew_beth\0" - "hebrew_chet\0" - "hebrew_dalet\0" - "hebrew_daleth\0" - "hebrew_doublelowline\0" - "hebrew_finalkaph\0" - "hebrew_finalmem\0" - "hebrew_finalnun\0" - "hebrew_finalpe\0" - "hebrew_finalzade\0" - "hebrew_finalzadi\0" - "hebrew_gimel\0" - "hebrew_gimmel\0" - "hebrew_he\0" - "hebrew_het\0" - "hebrew_kaph\0" - "hebrew_kuf\0" - "hebrew_lamed\0" - "hebrew_mem\0" - "hebrew_nun\0" - "hebrew_pe\0" - "hebrew_qoph\0" - "hebrew_resh\0" - "hebrew_samech\0" - "hebrew_samekh\0" - "hebrew_shin\0" - "Hebrew_switch\0" - "hebrew_taf\0" - "hebrew_taw\0" - "hebrew_tet\0" - "hebrew_teth\0" - "hebrew_waw\0" - "hebrew_yod\0" - "hebrew_zade\0" - "hebrew_zadi\0" - "hebrew_zain\0" - "hebrew_zayin\0" - "Help\0" - "Henkan\0" - "Henkan_Mode\0" - "hexagram\0" - "Hiragana\0" - "Hiragana_Katakana\0" - "Home\0" - "horizconnector\0" - "horizlinescan1\0" - "horizlinescan3\0" - "horizlinescan5\0" - "horizlinescan7\0" - "horizlinescan9\0" - "hpBackTab\0" - "hpblock\0" - "hpClearLine\0" - "hpDeleteChar\0" - "hpDeleteLine\0" - "hpguilder\0" - "hpInsertChar\0" - "hpInsertLine\0" - "hpIO\0" - "hpKP_BackTab\0" - "hplira\0" - "hplongminus\0" - "hpModelock1\0" - "hpModelock2\0" - "hpmute_acute\0" - "hpmute_asciicircum\0" - "hpmute_asciitilde\0" - "hpmute_diaeresis\0" - "hpmute_grave\0" - "hpReset\0" - "hpSystem\0" - "hpUser\0" - "hpYdiaeresis\0" - "Hstroke\0" - "hstroke\0" - "ht\0" - "Hyper_L\0" - "Hyper_R\0" - "hyphen\0" - "I\0" - "i\0" - "Iabovedot\0" - "Iacute\0" - "iacute\0" - "Ibelowdot\0" - "ibelowdot\0" - "Ibreve\0" - "ibreve\0" - "Icircumflex\0" - "icircumflex\0" - "identical\0" - "Idiaeresis\0" - "idiaeresis\0" - "idotless\0" - "ifonlyif\0" - "Igrave\0" - "igrave\0" - "Ihook\0" - "ihook\0" - "Imacron\0" - "imacron\0" - "implies\0" - "includedin\0" - "includes\0" - "infinity\0" - "Insert\0" - "InsertChar\0" - "InsertLine\0" - "integral\0" - "intersection\0" - "IO\0" - "Iogonek\0" - "iogonek\0" - "ISO_Center_Object\0" - "ISO_Continuous_Underline\0" - "ISO_Discontinuous_Underline\0" - "ISO_Emphasize\0" - "ISO_Enter\0" - "ISO_Fast_Cursor_Down\0" - "ISO_Fast_Cursor_Left\0" - "ISO_Fast_Cursor_Right\0" - "ISO_Fast_Cursor_Up\0" - "ISO_First_Group\0" - "ISO_First_Group_Lock\0" - "ISO_Group_Latch\0" - "ISO_Group_Lock\0" - "ISO_Group_Shift\0" - "ISO_Last_Group\0" - "ISO_Last_Group_Lock\0" - "ISO_Left_Tab\0" - "ISO_Level2_Latch\0" - "ISO_Level3_Latch\0" - "ISO_Level3_Lock\0" - "ISO_Level3_Shift\0" - "ISO_Level5_Latch\0" - "ISO_Level5_Lock\0" - "ISO_Level5_Shift\0" - "ISO_Lock\0" - "ISO_Move_Line_Down\0" - "ISO_Move_Line_Up\0" - "ISO_Next_Group\0" - "ISO_Next_Group_Lock\0" - "ISO_Partial_Line_Down\0" - "ISO_Partial_Line_Up\0" - "ISO_Partial_Space_Left\0" - "ISO_Partial_Space_Right\0" - "ISO_Prev_Group\0" - "ISO_Prev_Group_Lock\0" - "ISO_Release_Both_Margins\0" - "ISO_Release_Margin_Left\0" - "ISO_Release_Margin_Right\0" - "ISO_Set_Margin_Left\0" - "ISO_Set_Margin_Right\0" - "Itilde\0" - "itilde\0" - "J\0" - "j\0" - "Jcircumflex\0" - "jcircumflex\0" - "jot\0" - "K\0" - "k\0" - "kana_a\0" - "kana_A\0" - "kana_CHI\0" - "kana_closingbracket\0" - "kana_comma\0" - "kana_conjunctive\0" - "kana_e\0" - "kana_E\0" - "kana_FU\0" - "kana_fullstop\0" - "kana_HA\0" - "kana_HE\0" - "kana_HI\0" - "kana_HO\0" - "kana_HU\0" - "kana_i\0" - "kana_I\0" - "kana_KA\0" - "kana_KE\0" - "kana_KI\0" - "kana_KO\0" - "kana_KU\0" - "Kana_Lock\0" - "kana_MA\0" - "kana_ME\0" - "kana_MI\0" - "kana_middledot\0" - "kana_MO\0" - "kana_MU\0" - "kana_N\0" - "kana_NA\0" - "kana_NE\0" - "kana_NI\0" - "kana_NO\0" - "kana_NU\0" - "kana_o\0" - "kana_O\0" - "kana_openingbracket\0" - "kana_RA\0" - "kana_RE\0" - "kana_RI\0" - "kana_RO\0" - "kana_RU\0" - "kana_SA\0" - "kana_SE\0" - "kana_SHI\0" - "Kana_Shift\0" - "kana_SO\0" - "kana_SU\0" - "kana_switch\0" - "kana_TA\0" - "kana_TE\0" - "kana_TI\0" - "kana_TO\0" - "kana_tsu\0" - "kana_TSU\0" - "kana_tu\0" - "kana_TU\0" - "kana_u\0" - "kana_U\0" - "kana_WA\0" - "kana_WO\0" - "kana_ya\0" - "kana_YA\0" - "kana_yo\0" - "kana_YO\0" - "kana_yu\0" - "kana_YU\0" - "Kanji\0" - "Kanji_Bangou\0" - "kappa\0" - "Katakana\0" - "Kcedilla\0" - "kcedilla\0" - "Korean_Won\0" - "KP_0\0" - "KP_1\0" - "KP_2\0" - "KP_3\0" - "KP_4\0" - "KP_5\0" - "KP_6\0" - "KP_7\0" - "KP_8\0" - "KP_9\0" - "KP_Add\0" - "KP_BackTab\0" - "KP_Begin\0" - "KP_Decimal\0" - "KP_Delete\0" - "KP_Divide\0" - "KP_Down\0" - "KP_End\0" - "KP_Enter\0" - "KP_Equal\0" - "KP_F1\0" - "KP_F2\0" - "KP_F3\0" - "KP_F4\0" - "KP_Home\0" - "KP_Insert\0" - "KP_Left\0" - "KP_Multiply\0" - "KP_Next\0" - "KP_Page_Down\0" - "KP_Page_Up\0" - "KP_Prior\0" - "KP_Right\0" - "KP_Separator\0" - "KP_Space\0" - "KP_Subtract\0" - "KP_Tab\0" - "KP_Up\0" - "kra\0" - "L\0" - "l\0" - "L1\0" - "L10\0" - "L2\0" - "L3\0" - "L4\0" - "L5\0" - "L6\0" - "L7\0" - "L8\0" - "L9\0" - "Lacute\0" - "lacute\0" - "Last_Virtual_Screen\0" - "latincross\0" - "Lbelowdot\0" - "lbelowdot\0" - "Lcaron\0" - "lcaron\0" - "Lcedilla\0" - "lcedilla\0" - "Left\0" - "leftanglebracket\0" - "leftarrow\0" - "leftcaret\0" - "leftdoublequotemark\0" - "leftmiddlecurlybrace\0" - "leftopentriangle\0" - "leftpointer\0" - "leftradical\0" - "leftshoe\0" - "leftsinglequotemark\0" - "leftt\0" - "lefttack\0" - "less\0" - "lessthanequal\0" - "lf\0" - "Linefeed\0" - "lira\0" - "LiraSign\0" - "logicaland\0" - "logicalor\0" - "longminus\0" - "lowleftcorner\0" - "lowrightcorner\0" - "Lstroke\0" - "lstroke\0" - "M\0" - "m\0" - "Mabovedot\0" - "mabovedot\0" - "Macedonia_dse\0" - "Macedonia_DSE\0" - "Macedonia_gje\0" - "Macedonia_GJE\0" - "Macedonia_kje\0" - "Macedonia_KJE\0" - "macron\0" - "Mae_Koho\0" - "malesymbol\0" - "maltesecross\0" - "marker\0" - "masculine\0" - "Massyo\0" - "Menu\0" - "Meta_L\0" - "Meta_R\0" - "MillSign\0" - "minus\0" - "minutes\0" - "Mode_switch\0" - "MouseKeys_Accel_Enable\0" - "MouseKeys_Enable\0" - "mu\0" - "Muhenkan\0" - "Multi_key\0" - "MultipleCandidate\0" - "multiply\0" - "musicalflat\0" - "musicalsharp\0" - "mute_acute\0" - "mute_asciicircum\0" - "mute_asciitilde\0" - "mute_diaeresis\0" - "mute_grave\0" - "N\0" - "n\0" - "nabla\0" - "Nacute\0" - "nacute\0" - "NairaSign\0" - "Ncaron\0" - "ncaron\0" - "Ncedilla\0" - "ncedilla\0" - "NewSheqelSign\0" - "Next\0" - "Next_Virtual_Screen\0" - "ninesubscript\0" - "ninesuperior\0" - "nl\0" - "nobreakspace\0" - "NoSymbol\0" - "notapproxeq\0" - "notelementof\0" - "notequal\0" - "notidentical\0" - "notsign\0" - "Ntilde\0" - "ntilde\0" - "Num_Lock\0" - "numbersign\0" - "numerosign\0" - "O\0" - "o\0" - "Oacute\0" - "oacute\0" - "Obarred\0" - "obarred\0" - "Obelowdot\0" - "obelowdot\0" - "Ocaron\0" - "ocaron\0" - "Ocircumflex\0" - "ocircumflex\0" - "Ocircumflexacute\0" - "ocircumflexacute\0" - "Ocircumflexbelowdot\0" - "ocircumflexbelowdot\0" - "Ocircumflexgrave\0" - "ocircumflexgrave\0" - "Ocircumflexhook\0" - "ocircumflexhook\0" - "Ocircumflextilde\0" - "ocircumflextilde\0" - "Odiaeresis\0" - "odiaeresis\0" - "Odoubleacute\0" - "odoubleacute\0" - "OE\0" - "oe\0" - "ogonek\0" - "Ograve\0" - "ograve\0" - "Ohook\0" - "ohook\0" - "Ohorn\0" - "ohorn\0" - "Ohornacute\0" - "ohornacute\0" - "Ohornbelowdot\0" - "ohornbelowdot\0" - "Ohorngrave\0" - "ohorngrave\0" - "Ohornhook\0" - "ohornhook\0" - "Ohorntilde\0" - "ohorntilde\0" - "Omacron\0" - "omacron\0" - "oneeighth\0" - "onefifth\0" - "onehalf\0" - "onequarter\0" - "onesixth\0" - "onesubscript\0" - "onesuperior\0" - "onethird\0" - "Ooblique\0" - "ooblique\0" - "openrectbullet\0" - "openstar\0" - "opentribulletdown\0" - "opentribulletup\0" - "ordfeminine\0" - "osfActivate\0" - "osfAddMode\0" - "osfBackSpace\0" - "osfBackTab\0" - "osfBeginData\0" - "osfBeginLine\0" - "osfCancel\0" - "osfClear\0" - "osfCopy\0" - "osfCut\0" - "osfDelete\0" - "osfDeselectAll\0" - "osfDown\0" - "osfEndData\0" - "osfEndLine\0" - "osfEscape\0" - "osfExtend\0" - "osfHelp\0" - "osfInsert\0" - "osfLeft\0" - "osfMenu\0" - "osfMenuBar\0" - "osfNextField\0" - "osfNextMenu\0" - "osfPageDown\0" - "osfPageLeft\0" - "osfPageRight\0" - "osfPageUp\0" - "osfPaste\0" - "osfPrevField\0" - "osfPrevMenu\0" - "osfPrimaryPaste\0" - "osfQuickPaste\0" - "osfReselect\0" - "osfRestore\0" - "osfRight\0" - "osfSelect\0" - "osfSelectAll\0" - "osfUndo\0" - "osfUp\0" - "Oslash\0" - "oslash\0" - "Otilde\0" - "otilde\0" - "overbar\0" - "Overlay1_Enable\0" - "Overlay2_Enable\0" - "overline\0" - "P\0" - "p\0" - "Pabovedot\0" - "pabovedot\0" - "Page_Down\0" - "Page_Up\0" - "paragraph\0" - "parenleft\0" - "parenright\0" - "partdifferential\0" - "partialderivative\0" - "Pause\0" - "percent\0" - "period\0" - "periodcentered\0" - "permille\0" - "PesetaSign\0" - "phonographcopyright\0" - "plus\0" - "plusminus\0" - "Pointer_Accelerate\0" - "Pointer_Button1\0" - "Pointer_Button2\0" - "Pointer_Button3\0" - "Pointer_Button4\0" - "Pointer_Button5\0" - "Pointer_Button_Dflt\0" - "Pointer_DblClick1\0" - "Pointer_DblClick2\0" - "Pointer_DblClick3\0" - "Pointer_DblClick4\0" - "Pointer_DblClick5\0" - "Pointer_DblClick_Dflt\0" - "Pointer_DfltBtnNext\0" - "Pointer_DfltBtnPrev\0" - "Pointer_Down\0" - "Pointer_DownLeft\0" - "Pointer_DownRight\0" - "Pointer_Drag1\0" - "Pointer_Drag2\0" - "Pointer_Drag3\0" - "Pointer_Drag4\0" - "Pointer_Drag5\0" - "Pointer_Drag_Dflt\0" - "Pointer_EnableKeys\0" - "Pointer_Left\0" - "Pointer_Right\0" - "Pointer_Up\0" - "Pointer_UpLeft\0" - "Pointer_UpRight\0" - "prescription\0" - "Prev_Virtual_Screen\0" - "PreviousCandidate\0" - "Print\0" - "Prior\0" - "prolongedsound\0" - "punctspace\0" - "Q\0" - "q\0" - "quad\0" - "question\0" - "questiondown\0" - "quotedbl\0" - "quoteleft\0" - "quoteright\0" - "R\0" - "r\0" - "R1\0" - "R10\0" - "R11\0" - "R12\0" - "R13\0" - "R14\0" - "R15\0" - "R2\0" - "R3\0" - "R4\0" - "R5\0" - "R6\0" - "R7\0" - "R8\0" - "R9\0" - "Racute\0" - "racute\0" - "radical\0" - "Rcaron\0" - "rcaron\0" - "Rcedilla\0" - "rcedilla\0" - "Redo\0" - "registered\0" - "RepeatKeys_Enable\0" - "Reset\0" - "Return\0" - "Right\0" - "rightanglebracket\0" - "rightarrow\0" - "rightcaret\0" - "rightdoublequotemark\0" - "rightmiddlecurlybrace\0" - "rightmiddlesummation\0" - "rightopentriangle\0" - "rightpointer\0" - "rightshoe\0" - "rightsinglequotemark\0" - "rightt\0" - "righttack\0" - "Romaji\0" - "RupeeSign\0" - "S\0" - "s\0" - "Sabovedot\0" - "sabovedot\0" - "Sacute\0" - "sacute\0" - "Scaron\0" - "scaron\0" - "Scedilla\0" - "scedilla\0" - "SCHWA\0" - "schwa\0" - "Scircumflex\0" - "scircumflex\0" - "script_switch\0" - "Scroll_Lock\0" - "seconds\0" - "section\0" - "Select\0" - "semicolon\0" - "semivoicedsound\0" - "Serbian_dje\0" - "Serbian_DJE\0" - "Serbian_dze\0" - "Serbian_DZE\0" - "Serbian_je\0" - "Serbian_JE\0" - "Serbian_lje\0" - "Serbian_LJE\0" - "Serbian_nje\0" - "Serbian_NJE\0" - "Serbian_tshe\0" - "Serbian_TSHE\0" - "seveneighths\0" - "sevensubscript\0" - "sevensuperior\0" - "Shift_L\0" - "Shift_Lock\0" - "Shift_R\0" - "signaturemark\0" - "signifblank\0" - "similarequal\0" - "SingleCandidate\0" - "singlelowquotemark\0" - "Sinh_a\0" - "Sinh_aa\0" - "Sinh_aa2\0" - "Sinh_ae\0" - "Sinh_ae2\0" - "Sinh_aee\0" - "Sinh_aee2\0" - "Sinh_ai\0" - "Sinh_ai2\0" - "Sinh_al\0" - "Sinh_au\0" - "Sinh_au2\0" - "Sinh_ba\0" - "Sinh_bha\0" - "Sinh_ca\0" - "Sinh_cha\0" - "Sinh_dda\0" - "Sinh_ddha\0" - "Sinh_dha\0" - "Sinh_dhha\0" - "Sinh_e\0" - "Sinh_e2\0" - "Sinh_ee\0" - "Sinh_ee2\0" - "Sinh_fa\0" - "Sinh_ga\0" - "Sinh_gha\0" - "Sinh_h2\0" - "Sinh_ha\0" - "Sinh_i\0" - "Sinh_i2\0" - "Sinh_ii\0" - "Sinh_ii2\0" - "Sinh_ja\0" - "Sinh_jha\0" - "Sinh_jnya\0" - "Sinh_ka\0" - "Sinh_kha\0" - "Sinh_kunddaliya\0" - "Sinh_la\0" - "Sinh_lla\0" - "Sinh_lu\0" - "Sinh_lu2\0" - "Sinh_luu\0" - "Sinh_luu2\0" - "Sinh_ma\0" - "Sinh_mba\0" - "Sinh_na\0" - "Sinh_ndda\0" - "Sinh_ndha\0" - "Sinh_ng\0" - "Sinh_ng2\0" - "Sinh_nga\0" - "Sinh_nja\0" - "Sinh_nna\0" - "Sinh_nya\0" - "Sinh_o\0" - "Sinh_o2\0" - "Sinh_oo\0" - "Sinh_oo2\0" - "Sinh_pa\0" - "Sinh_pha\0" - "Sinh_ra\0" - "Sinh_ri\0" - "Sinh_rii\0" - "Sinh_ru2\0" - "Sinh_ruu2\0" - "Sinh_sa\0" - "Sinh_sha\0" - "Sinh_ssha\0" - "Sinh_tha\0" - "Sinh_thha\0" - "Sinh_tta\0" - "Sinh_ttha\0" - "Sinh_u\0" - "Sinh_u2\0" - "Sinh_uu\0" - "Sinh_uu2\0" - "Sinh_va\0" - "Sinh_ya\0" - "sixsubscript\0" - "sixsuperior\0" - "slash\0" - "SlowKeys_Enable\0" - "soliddiamond\0" - "space\0" - "squareroot\0" - "ssharp\0" - "sterling\0" - "StickyKeys_Enable\0" - "stricteq\0" - "SunAgain\0" - "SunAltGraph\0" - "SunAudioLowerVolume\0" - "SunAudioMute\0" - "SunAudioRaiseVolume\0" - "SunCompose\0" - "SunCopy\0" - "SunCut\0" - "SunF36\0" - "SunF37\0" - "SunFA_Acute\0" - "SunFA_Cedilla\0" - "SunFA_Circum\0" - "SunFA_Diaeresis\0" - "SunFA_Grave\0" - "SunFA_Tilde\0" - "SunFind\0" - "SunFront\0" - "SunOpen\0" - "SunPageDown\0" - "SunPageUp\0" - "SunPaste\0" - "SunPowerSwitch\0" - "SunPowerSwitchShift\0" - "SunPrint_Screen\0" - "SunProps\0" - "SunStop\0" - "SunSys_Req\0" - "SunUndo\0" - "SunVideoDegauss\0" - "SunVideoLowerBrightness\0" - "SunVideoRaiseBrightness\0" - "Super_L\0" - "Super_R\0" - "Sys_Req\0" - "System\0" - "T\0" - "t\0" - "Tab\0" - "Tabovedot\0" - "tabovedot\0" - "Tcaron\0" - "tcaron\0" - "Tcedilla\0" - "tcedilla\0" - "telephone\0" - "telephonerecorder\0" - "Terminate_Server\0" - "Thai_baht\0" - "Thai_bobaimai\0" - "Thai_chochan\0" - "Thai_chochang\0" - "Thai_choching\0" - "Thai_chochoe\0" - "Thai_dochada\0" - "Thai_dodek\0" - "Thai_fofa\0" - "Thai_fofan\0" - "Thai_hohip\0" - "Thai_honokhuk\0" - "Thai_khokhai\0" - "Thai_khokhon\0" - "Thai_khokhuat\0" - "Thai_khokhwai\0" - "Thai_khorakhang\0" - "Thai_kokai\0" - "Thai_lakkhangyao\0" - "Thai_lekchet\0" - "Thai_lekha\0" - "Thai_lekhok\0" - "Thai_lekkao\0" - "Thai_leknung\0" - "Thai_lekpaet\0" - "Thai_leksam\0" - "Thai_leksi\0" - "Thai_leksong\0" - "Thai_leksun\0" - "Thai_lochula\0" - "Thai_loling\0" - "Thai_lu\0" - "Thai_maichattawa\0" - "Thai_maiek\0" - "Thai_maihanakat\0" - "Thai_maihanakat_maitho\0" - "Thai_maitaikhu\0" - "Thai_maitho\0" - "Thai_maitri\0" - "Thai_maiyamok\0" - "Thai_moma\0" - "Thai_ngongu\0" - "Thai_nikhahit\0" - "Thai_nonen\0" - "Thai_nonu\0" - "Thai_oang\0" - "Thai_paiyannoi\0" - "Thai_phinthu\0" - "Thai_phophan\0" - "Thai_phophung\0" - "Thai_phosamphao\0" - "Thai_popla\0" - "Thai_rorua\0" - "Thai_ru\0" - "Thai_saraa\0" - "Thai_saraaa\0" - "Thai_saraae\0" - "Thai_saraaimaimalai\0" - "Thai_saraaimaimuan\0" - "Thai_saraam\0" - "Thai_sarae\0" - "Thai_sarai\0" - "Thai_saraii\0" - "Thai_sarao\0" - "Thai_sarau\0" - "Thai_saraue\0" - "Thai_sarauee\0" - "Thai_sarauu\0" - "Thai_sorusi\0" - "Thai_sosala\0" - "Thai_soso\0" - "Thai_sosua\0" - "Thai_thanthakhat\0" - "Thai_thonangmontho\0" - "Thai_thophuthao\0" - "Thai_thothahan\0" - "Thai_thothan\0" - "Thai_thothong\0" - "Thai_thothung\0" - "Thai_topatak\0" - "Thai_totao\0" - "Thai_wowaen\0" - "Thai_yoyak\0" - "Thai_yoying\0" - "therefore\0" - "thinspace\0" - "THORN\0" - "Thorn\0" - "thorn\0" - "threeeighths\0" - "threefifths\0" - "threequarters\0" - "threesubscript\0" - "threesuperior\0" - "tintegral\0" - "topintegral\0" - "topleftparens\0" - "topleftradical\0" - "topleftsqbracket\0" - "topleftsummation\0" - "toprightparens\0" - "toprightsqbracket\0" - "toprightsummation\0" - "topt\0" - "topvertsummationconnector\0" - "Touroku\0" - "trademark\0" - "trademarkincircle\0" - "Tslash\0" - "tslash\0" - "twofifths\0" - "twosubscript\0" - "twosuperior\0" - "twothirds\0" - "U\0" - "u\0" - "Uacute\0" - "uacute\0" - "Ubelowdot\0" - "ubelowdot\0" - "Ubreve\0" - "ubreve\0" - "Ucircumflex\0" - "ucircumflex\0" - "Udiaeresis\0" - "udiaeresis\0" - "Udoubleacute\0" - "udoubleacute\0" - "Ugrave\0" - "ugrave\0" - "Uhook\0" - "uhook\0" - "Uhorn\0" - "uhorn\0" - "Uhornacute\0" - "uhornacute\0" - "Uhornbelowdot\0" - "uhornbelowdot\0" - "Uhorngrave\0" - "uhorngrave\0" - "Uhornhook\0" - "uhornhook\0" - "Uhorntilde\0" - "uhorntilde\0" - "Ukrainian_ghe_with_upturn\0" - "Ukrainian_GHE_WITH_UPTURN\0" - "Ukrainian_i\0" - "Ukrainian_I\0" - "Ukrainian_ie\0" - "Ukrainian_IE\0" - "Ukrainian_yi\0" - "Ukrainian_YI\0" - "Ukranian_i\0" - "Ukranian_I\0" - "Ukranian_je\0" - "Ukranian_JE\0" - "Ukranian_yi\0" - "Ukranian_YI\0" - "Umacron\0" - "umacron\0" - "underbar\0" - "underscore\0" - "Undo\0" - "union\0" - "Uogonek\0" - "uogonek\0" - "Up\0" - "uparrow\0" - "upcaret\0" - "upleftcorner\0" - "uprightcorner\0" - "upshoe\0" - "upstile\0" - "uptack\0" - "Uring\0" - "uring\0" - "User\0" - "Utilde\0" - "utilde\0" - "V\0" - "v\0" - "variation\0" - "vertbar\0" - "vertconnector\0" - "voicedsound\0" - "VoidSymbol\0" - "vt\0" - "W\0" - "w\0" - "Wacute\0" - "wacute\0" - "Wcircumflex\0" - "wcircumflex\0" - "Wdiaeresis\0" - "wdiaeresis\0" - "Wgrave\0" - "wgrave\0" - "WonSign\0" - "X\0" - "x\0" - "Xabovedot\0" - "xabovedot\0" - "XF86AddFavorite\0" - "XF86ApplicationLeft\0" - "XF86ApplicationRight\0" - "XF86AudioCycleTrack\0" - "XF86AudioForward\0" - "XF86AudioLowerVolume\0" - "XF86AudioMedia\0" - "XF86AudioMicMute\0" - "XF86AudioMute\0" - "XF86AudioNext\0" - "XF86AudioPause\0" - "XF86AudioPlay\0" - "XF86AudioPreset\0" - "XF86AudioPrev\0" - "XF86AudioRaiseVolume\0" - "XF86AudioRandomPlay\0" - "XF86AudioRecord\0" - "XF86AudioRepeat\0" - "XF86AudioRewind\0" - "XF86AudioStop\0" - "XF86Away\0" - "XF86Back\0" - "XF86BackForward\0" - "XF86Battery\0" - "XF86Blue\0" - "XF86Bluetooth\0" - "XF86Book\0" - "XF86BrightnessAdjust\0" - "XF86Calculater\0" - "XF86Calculator\0" - "XF86Calendar\0" - "XF86CD\0" - "XF86Clear\0" - "XF86ClearGrab\0" - "XF86Close\0" - "XF86Community\0" - "XF86ContrastAdjust\0" - "XF86Copy\0" - "XF86Cut\0" - "XF86CycleAngle\0" - "XF86Display\0" - "XF86Documents\0" - "XF86DOS\0" - "XF86Eject\0" - "XF86Excel\0" - "XF86Explorer\0" - "XF86Favorites\0" - "XF86Finance\0" - "XF86Forward\0" - "XF86FrameBack\0" - "XF86FrameForward\0" - "XF86Game\0" - "XF86Go\0" - "XF86Green\0" - "XF86Hibernate\0" - "XF86History\0" - "XF86HomePage\0" - "XF86HotLinks\0" - "XF86iTouch\0" - "XF86KbdBrightnessDown\0" - "XF86KbdBrightnessUp\0" - "XF86KbdLightOnOff\0" - "XF86Keyboard\0" - "XF86Launch0\0" - "XF86Launch1\0" - "XF86Launch2\0" - "XF86Launch3\0" - "XF86Launch4\0" - "XF86Launch5\0" - "XF86Launch6\0" - "XF86Launch7\0" - "XF86Launch8\0" - "XF86Launch9\0" - "XF86LaunchA\0" - "XF86LaunchB\0" - "XF86LaunchC\0" - "XF86LaunchD\0" - "XF86LaunchE\0" - "XF86LaunchF\0" - "XF86LightBulb\0" - "XF86LogGrabInfo\0" - "XF86LogOff\0" - "XF86LogWindowTree\0" - "XF86Mail\0" - "XF86MailForward\0" - "XF86Market\0" - "XF86Meeting\0" - "XF86Memo\0" - "XF86MenuKB\0" - "XF86MenuPB\0" - "XF86Messenger\0" - "XF86ModeLock\0" - "XF86MonBrightnessDown\0" - "XF86MonBrightnessUp\0" - "XF86Music\0" - "XF86MyComputer\0" - "XF86MySites\0" - "XF86New\0" - "XF86News\0" - "XF86Next_VMode\0" - "XF86OfficeHome\0" - "XF86Open\0" - "XF86OpenURL\0" - "XF86Option\0" - "XF86Paste\0" - "XF86Phone\0" - "XF86Pictures\0" - "XF86PowerDown\0" - "XF86PowerOff\0" - "XF86Prev_VMode\0" - "XF86Q\0" - "XF86Red\0" - "XF86Refresh\0" - "XF86Reload\0" - "XF86Reply\0" - "XF86RFKill\0" - "XF86RockerDown\0" - "XF86RockerEnter\0" - "XF86RockerUp\0" - "XF86RotateWindows\0" - "XF86RotationKB\0" - "XF86RotationPB\0" - "XF86Save\0" - "XF86ScreenSaver\0" - "XF86ScrollClick\0" - "XF86ScrollDown\0" - "XF86ScrollUp\0" - "XF86Search\0" - "XF86Select\0" - "XF86Send\0" - "XF86Shop\0" - "XF86Sleep\0" - "XF86Spell\0" - "XF86SplitScreen\0" - "XF86Standby\0" - "XF86Start\0" - "XF86Stop\0" - "XF86Subtitle\0" - "XF86Support\0" - "XF86Suspend\0" - "XF86Switch_VT_1\0" - "XF86Switch_VT_10\0" - "XF86Switch_VT_11\0" - "XF86Switch_VT_12\0" - "XF86Switch_VT_2\0" - "XF86Switch_VT_3\0" - "XF86Switch_VT_4\0" - "XF86Switch_VT_5\0" - "XF86Switch_VT_6\0" - "XF86Switch_VT_7\0" - "XF86Switch_VT_8\0" - "XF86Switch_VT_9\0" - "XF86TaskPane\0" - "XF86Terminal\0" - "XF86Time\0" - "XF86ToDoList\0" - "XF86Tools\0" - "XF86TopMenu\0" - "XF86TouchpadOff\0" - "XF86TouchpadOn\0" - "XF86TouchpadToggle\0" - "XF86Travel\0" - "XF86Ungrab\0" - "XF86User1KB\0" - "XF86User2KB\0" - "XF86UserPB\0" - "XF86UWB\0" - "XF86VendorHome\0" - "XF86Video\0" - "XF86View\0" - "XF86WakeUp\0" - "XF86WebCam\0" - "XF86WheelButton\0" - "XF86WLAN\0" - "XF86Word\0" - "XF86WWAN\0" - "XF86WWW\0" - "XF86Xfer\0" - "XF86Yellow\0" - "XF86ZoomIn\0" - "XF86ZoomOut\0" - "Y\0" - "y\0" - "Yacute\0" - "yacute\0" - "Ybelowdot\0" - "ybelowdot\0" - "Ycircumflex\0" - "ycircumflex\0" - "ydiaeresis\0" - "Ydiaeresis\0" - "yen\0" - "Ygrave\0" - "ygrave\0" - "Yhook\0" - "yhook\0" - "Ytilde\0" - "ytilde\0" - "Z\0" - "z\0" - "Zabovedot\0" - "zabovedot\0" - "Zacute\0" - "zacute\0" - "Zcaron\0" - "zcaron\0" - "Zen_Koho\0" - "Zenkaku\0" - "Zenkaku_Hankaku\0" - "zerosubscript\0" - "zerosuperior\0" - "Zstroke\0" - "zstroke\0" -; -#pragma GCC diagnostic pop - -struct name_keysym { - xkb_keysym_t keysym; - uint32_t offset; -}; - -static const struct name_keysym name_to_keysym[] = { - { 0x00000030, 0 }, /* 0 */ - { 0x00000031, 2 }, /* 1 */ - { 0x00000032, 4 }, /* 2 */ - { 0x00000033, 6 }, /* 3 */ - { 0x0000fd10, 8 }, /* 3270_AltCursor */ - { 0x0000fd0e, 23 }, /* 3270_Attn */ - { 0x0000fd05, 33 }, /* 3270_BackTab */ - { 0x0000fd19, 46 }, /* 3270_ChangeScreen */ - { 0x0000fd15, 64 }, /* 3270_Copy */ - { 0x0000fd0f, 74 }, /* 3270_CursorBlink */ - { 0x0000fd1c, 91 }, /* 3270_CursorSelect */ - { 0x0000fd1a, 109 }, /* 3270_DeleteWord */ - { 0x0000fd01, 125 }, /* 3270_Duplicate */ - { 0x0000fd1e, 140 }, /* 3270_Enter */ - { 0x0000fd06, 151 }, /* 3270_EraseEOF */ - { 0x0000fd07, 165 }, /* 3270_EraseInput */ - { 0x0000fd1b, 181 }, /* 3270_ExSelect */ - { 0x0000fd02, 195 }, /* 3270_FieldMark */ - { 0x0000fd13, 210 }, /* 3270_Ident */ - { 0x0000fd12, 221 }, /* 3270_Jump */ - { 0x0000fd11, 231 }, /* 3270_KeyClick */ - { 0x0000fd04, 245 }, /* 3270_Left2 */ - { 0x0000fd0a, 256 }, /* 3270_PA1 */ - { 0x0000fd0b, 265 }, /* 3270_PA2 */ - { 0x0000fd0c, 274 }, /* 3270_PA3 */ - { 0x0000fd16, 283 }, /* 3270_Play */ - { 0x0000fd1d, 293 }, /* 3270_PrintScreen */ - { 0x0000fd09, 310 }, /* 3270_Quit */ - { 0x0000fd18, 320 }, /* 3270_Record */ - { 0x0000fd08, 332 }, /* 3270_Reset */ - { 0x0000fd03, 343 }, /* 3270_Right2 */ - { 0x0000fd14, 355 }, /* 3270_Rule */ - { 0x0000fd17, 365 }, /* 3270_Setup */ - { 0x0000fd0d, 376 }, /* 3270_Test */ - { 0x00000034, 386 }, /* 4 */ - { 0x00000035, 388 }, /* 5 */ - { 0x00000036, 390 }, /* 6 */ - { 0x00000037, 392 }, /* 7 */ - { 0x00000038, 394 }, /* 8 */ - { 0x00000039, 396 }, /* 9 */ - { 0x00000041, 398 }, /* A */ - { 0x00000061, 400 }, /* a */ - { 0x000000c1, 402 }, /* Aacute */ - { 0x000000e1, 409 }, /* aacute */ - { 0x01001ea0, 416 }, /* Abelowdot */ - { 0x01001ea1, 426 }, /* abelowdot */ - { 0x000001ff, 436 }, /* abovedot */ - { 0x000001c3, 445 }, /* Abreve */ - { 0x000001e3, 452 }, /* abreve */ - { 0x01001eae, 459 }, /* Abreveacute */ - { 0x01001eaf, 471 }, /* abreveacute */ - { 0x01001eb6, 483 }, /* Abrevebelowdot */ - { 0x01001eb7, 498 }, /* abrevebelowdot */ - { 0x01001eb0, 513 }, /* Abrevegrave */ - { 0x01001eb1, 525 }, /* abrevegrave */ - { 0x01001eb2, 537 }, /* Abrevehook */ - { 0x01001eb3, 548 }, /* abrevehook */ - { 0x01001eb4, 559 }, /* Abrevetilde */ - { 0x01001eb5, 571 }, /* abrevetilde */ - { 0x0000fe70, 583 }, /* AccessX_Enable */ - { 0x0000fe71, 598 }, /* AccessX_Feedback_Enable */ - { 0x000000c2, 622 }, /* Acircumflex */ - { 0x000000e2, 634 }, /* acircumflex */ - { 0x01001ea4, 646 }, /* Acircumflexacute */ - { 0x01001ea5, 663 }, /* acircumflexacute */ - { 0x01001eac, 680 }, /* Acircumflexbelowdot */ - { 0x01001ead, 700 }, /* acircumflexbelowdot */ - { 0x01001ea6, 720 }, /* Acircumflexgrave */ - { 0x01001ea7, 737 }, /* acircumflexgrave */ - { 0x01001ea8, 754 }, /* Acircumflexhook */ - { 0x01001ea9, 770 }, /* acircumflexhook */ - { 0x01001eaa, 786 }, /* Acircumflextilde */ - { 0x01001eab, 803 }, /* acircumflextilde */ - { 0x000000b4, 820 }, /* acute */ - { 0x000000c4, 826 }, /* Adiaeresis */ - { 0x000000e4, 837 }, /* adiaeresis */ - { 0x000000c6, 848 }, /* AE */ - { 0x000000e6, 851 }, /* ae */ - { 0x000000c0, 854 }, /* Agrave */ - { 0x000000e0, 861 }, /* agrave */ - { 0x01001ea2, 868 }, /* Ahook */ - { 0x01001ea3, 874 }, /* ahook */ - { 0x0000ffe9, 880 }, /* Alt_L */ - { 0x0000ffea, 886 }, /* Alt_R */ - { 0x000003c0, 892 }, /* Amacron */ - { 0x000003e0, 900 }, /* amacron */ - { 0x00000026, 908 }, /* ampersand */ - { 0x000001a1, 918 }, /* Aogonek */ - { 0x000001b1, 926 }, /* aogonek */ - { 0x00000027, 934 }, /* apostrophe */ - { 0x01002248, 945 }, /* approxeq */ - { 0x000008c8, 954 }, /* approximate */ - { 0x01000660, 966 }, /* Arabic_0 */ - { 0x01000661, 975 }, /* Arabic_1 */ - { 0x01000662, 984 }, /* Arabic_2 */ - { 0x01000663, 993 }, /* Arabic_3 */ - { 0x01000664, 1002 }, /* Arabic_4 */ - { 0x01000665, 1011 }, /* Arabic_5 */ - { 0x01000666, 1020 }, /* Arabic_6 */ - { 0x01000667, 1029 }, /* Arabic_7 */ - { 0x01000668, 1038 }, /* Arabic_8 */ - { 0x01000669, 1047 }, /* Arabic_9 */ - { 0x000005d9, 1056 }, /* Arabic_ain */ - { 0x000005c7, 1067 }, /* Arabic_alef */ - { 0x000005e9, 1079 }, /* Arabic_alefmaksura */ - { 0x000005c8, 1098 }, /* Arabic_beh */ - { 0x000005ac, 1109 }, /* Arabic_comma */ - { 0x000005d6, 1122 }, /* Arabic_dad */ - { 0x000005cf, 1133 }, /* Arabic_dal */ - { 0x000005ef, 1144 }, /* Arabic_damma */ - { 0x000005ec, 1157 }, /* Arabic_dammatan */ - { 0x01000688, 1173 }, /* Arabic_ddal */ - { 0x010006cc, 1185 }, /* Arabic_farsi_yeh */ - { 0x000005ee, 1202 }, /* Arabic_fatha */ - { 0x000005eb, 1215 }, /* Arabic_fathatan */ - { 0x000005e1, 1231 }, /* Arabic_feh */ - { 0x010006d4, 1242 }, /* Arabic_fullstop */ - { 0x010006af, 1258 }, /* Arabic_gaf */ - { 0x000005da, 1269 }, /* Arabic_ghain */ - { 0x000005e7, 1282 }, /* Arabic_ha */ - { 0x000005cd, 1292 }, /* Arabic_hah */ - { 0x000005c1, 1303 }, /* Arabic_hamza */ - { 0x01000654, 1316 }, /* Arabic_hamza_above */ - { 0x01000655, 1335 }, /* Arabic_hamza_below */ - { 0x000005c3, 1354 }, /* Arabic_hamzaonalef */ - { 0x000005c4, 1373 }, /* Arabic_hamzaonwaw */ - { 0x000005c6, 1391 }, /* Arabic_hamzaonyeh */ - { 0x000005c5, 1409 }, /* Arabic_hamzaunderalef */ - { 0x000005e7, 1431 }, /* Arabic_heh */ - { 0x010006be, 1442 }, /* Arabic_heh_doachashmee */ - { 0x010006c1, 1465 }, /* Arabic_heh_goal */ - { 0x000005cc, 1481 }, /* Arabic_jeem */ - { 0x01000698, 1493 }, /* Arabic_jeh */ - { 0x000005e3, 1504 }, /* Arabic_kaf */ - { 0x000005f0, 1515 }, /* Arabic_kasra */ - { 0x000005ed, 1528 }, /* Arabic_kasratan */ - { 0x010006a9, 1544 }, /* Arabic_keheh */ - { 0x000005ce, 1557 }, /* Arabic_khah */ - { 0x000005e4, 1569 }, /* Arabic_lam */ - { 0x01000653, 1580 }, /* Arabic_madda_above */ - { 0x000005c2, 1599 }, /* Arabic_maddaonalef */ - { 0x000005e5, 1618 }, /* Arabic_meem */ - { 0x000005e6, 1630 }, /* Arabic_noon */ - { 0x010006ba, 1642 }, /* Arabic_noon_ghunna */ - { 0x0100067e, 1661 }, /* Arabic_peh */ - { 0x0100066a, 1672 }, /* Arabic_percent */ - { 0x000005e2, 1687 }, /* Arabic_qaf */ - { 0x000005bf, 1698 }, /* Arabic_question_mark */ - { 0x000005d1, 1719 }, /* Arabic_ra */ - { 0x01000691, 1729 }, /* Arabic_rreh */ - { 0x000005d5, 1741 }, /* Arabic_sad */ - { 0x000005d3, 1752 }, /* Arabic_seen */ - { 0x000005bb, 1764 }, /* Arabic_semicolon */ - { 0x000005f1, 1781 }, /* Arabic_shadda */ - { 0x000005d4, 1795 }, /* Arabic_sheen */ - { 0x000005f2, 1808 }, /* Arabic_sukun */ - { 0x01000670, 1821 }, /* Arabic_superscript_alef */ - { 0x0000ff7e, 1845 }, /* Arabic_switch */ - { 0x000005d7, 1859 }, /* Arabic_tah */ - { 0x000005e0, 1870 }, /* Arabic_tatweel */ - { 0x01000686, 1885 }, /* Arabic_tcheh */ - { 0x000005ca, 1898 }, /* Arabic_teh */ - { 0x000005c9, 1909 }, /* Arabic_tehmarbuta */ - { 0x000005d0, 1927 }, /* Arabic_thal */ - { 0x000005cb, 1939 }, /* Arabic_theh */ - { 0x01000679, 1951 }, /* Arabic_tteh */ - { 0x010006a4, 1963 }, /* Arabic_veh */ - { 0x000005e8, 1974 }, /* Arabic_waw */ - { 0x000005ea, 1985 }, /* Arabic_yeh */ - { 0x010006d2, 1996 }, /* Arabic_yeh_baree */ - { 0x000005d8, 2013 }, /* Arabic_zah */ - { 0x000005d2, 2024 }, /* Arabic_zain */ - { 0x000000c5, 2036 }, /* Aring */ - { 0x000000e5, 2042 }, /* aring */ - { 0x0100055b, 2048 }, /* Armenian_accent */ - { 0x0100055c, 2064 }, /* Armenian_amanak */ - { 0x0100055a, 2080 }, /* Armenian_apostrophe */ - { 0x01000538, 2100 }, /* Armenian_AT */ - { 0x01000568, 2112 }, /* Armenian_at */ - { 0x01000531, 2124 }, /* Armenian_AYB */ - { 0x01000561, 2137 }, /* Armenian_ayb */ - { 0x01000532, 2150 }, /* Armenian_BEN */ - { 0x01000562, 2163 }, /* Armenian_ben */ - { 0x0100055d, 2176 }, /* Armenian_but */ - { 0x01000549, 2189 }, /* Armenian_CHA */ - { 0x01000579, 2202 }, /* Armenian_cha */ - { 0x01000534, 2215 }, /* Armenian_DA */ - { 0x01000564, 2227 }, /* Armenian_da */ - { 0x01000541, 2239 }, /* Armenian_DZA */ - { 0x01000571, 2252 }, /* Armenian_dza */ - { 0x01000537, 2265 }, /* Armenian_E */ - { 0x01000567, 2276 }, /* Armenian_e */ - { 0x0100055c, 2287 }, /* Armenian_exclam */ - { 0x01000556, 2303 }, /* Armenian_FE */ - { 0x01000586, 2315 }, /* Armenian_fe */ - { 0x01000589, 2327 }, /* Armenian_full_stop */ - { 0x01000542, 2346 }, /* Armenian_GHAT */ - { 0x01000572, 2360 }, /* Armenian_ghat */ - { 0x01000533, 2374 }, /* Armenian_GIM */ - { 0x01000563, 2387 }, /* Armenian_gim */ - { 0x01000545, 2400 }, /* Armenian_HI */ - { 0x01000575, 2412 }, /* Armenian_hi */ - { 0x01000540, 2424 }, /* Armenian_HO */ - { 0x01000570, 2436 }, /* Armenian_ho */ - { 0x0100058a, 2448 }, /* Armenian_hyphen */ - { 0x0100053b, 2464 }, /* Armenian_INI */ - { 0x0100056b, 2477 }, /* Armenian_ini */ - { 0x0100054b, 2490 }, /* Armenian_JE */ - { 0x0100057b, 2502 }, /* Armenian_je */ - { 0x01000554, 2514 }, /* Armenian_KE */ - { 0x01000584, 2526 }, /* Armenian_ke */ - { 0x0100053f, 2538 }, /* Armenian_KEN */ - { 0x0100056f, 2551 }, /* Armenian_ken */ - { 0x0100053d, 2564 }, /* Armenian_KHE */ - { 0x0100056d, 2577 }, /* Armenian_khe */ - { 0x01000587, 2590 }, /* Armenian_ligature_ew */ - { 0x0100053c, 2611 }, /* Armenian_LYUN */ - { 0x0100056c, 2625 }, /* Armenian_lyun */ - { 0x01000544, 2639 }, /* Armenian_MEN */ - { 0x01000574, 2652 }, /* Armenian_men */ - { 0x01000546, 2665 }, /* Armenian_NU */ - { 0x01000576, 2677 }, /* Armenian_nu */ - { 0x01000555, 2689 }, /* Armenian_O */ - { 0x01000585, 2700 }, /* Armenian_o */ - { 0x0100055e, 2711 }, /* Armenian_paruyk */ - { 0x0100054a, 2727 }, /* Armenian_PE */ - { 0x0100057a, 2739 }, /* Armenian_pe */ - { 0x01000553, 2751 }, /* Armenian_PYUR */ - { 0x01000583, 2765 }, /* Armenian_pyur */ - { 0x0100055e, 2779 }, /* Armenian_question */ - { 0x0100054c, 2797 }, /* Armenian_RA */ - { 0x0100057c, 2809 }, /* Armenian_ra */ - { 0x01000550, 2821 }, /* Armenian_RE */ - { 0x01000580, 2833 }, /* Armenian_re */ - { 0x0100054d, 2845 }, /* Armenian_SE */ - { 0x0100057d, 2857 }, /* Armenian_se */ - { 0x0100055d, 2869 }, /* Armenian_separation_mark */ - { 0x01000547, 2894 }, /* Armenian_SHA */ - { 0x01000577, 2907 }, /* Armenian_sha */ - { 0x0100055b, 2920 }, /* Armenian_shesht */ - { 0x01000543, 2936 }, /* Armenian_TCHE */ - { 0x01000573, 2950 }, /* Armenian_tche */ - { 0x01000539, 2964 }, /* Armenian_TO */ - { 0x01000569, 2976 }, /* Armenian_to */ - { 0x0100053e, 2988 }, /* Armenian_TSA */ - { 0x0100056e, 3001 }, /* Armenian_tsa */ - { 0x01000551, 3014 }, /* Armenian_TSO */ - { 0x01000581, 3027 }, /* Armenian_tso */ - { 0x0100054f, 3040 }, /* Armenian_TYUN */ - { 0x0100057f, 3054 }, /* Armenian_tyun */ - { 0x01000589, 3068 }, /* Armenian_verjaket */ - { 0x0100054e, 3086 }, /* Armenian_VEV */ - { 0x0100057e, 3099 }, /* Armenian_vev */ - { 0x01000548, 3112 }, /* Armenian_VO */ - { 0x01000578, 3124 }, /* Armenian_vo */ - { 0x01000552, 3136 }, /* Armenian_VYUN */ - { 0x01000582, 3150 }, /* Armenian_vyun */ - { 0x01000535, 3164 }, /* Armenian_YECH */ - { 0x01000565, 3178 }, /* Armenian_yech */ - { 0x0100058a, 3192 }, /* Armenian_yentamna */ - { 0x01000536, 3210 }, /* Armenian_ZA */ - { 0x01000566, 3222 }, /* Armenian_za */ - { 0x0100053a, 3234 }, /* Armenian_ZHE */ - { 0x0100056a, 3247 }, /* Armenian_zhe */ - { 0x0000005e, 3260 }, /* asciicircum */ - { 0x0000007e, 3272 }, /* asciitilde */ - { 0x0000002a, 3283 }, /* asterisk */ - { 0x00000040, 3292 }, /* at */ - { 0x000000c3, 3295 }, /* Atilde */ - { 0x000000e3, 3302 }, /* atilde */ - { 0x0000fe7a, 3309 }, /* AudibleBell_Enable */ - { 0x00000042, 3328 }, /* B */ - { 0x00000062, 3330 }, /* b */ - { 0x01001e02, 3332 }, /* Babovedot */ - { 0x01001e03, 3342 }, /* babovedot */ - { 0x0000005c, 3352 }, /* backslash */ - { 0x0000ff08, 3362 }, /* BackSpace */ - { 0x1000ff74, 3372 }, /* BackTab */ - { 0x00000af4, 3380 }, /* ballotcross */ - { 0x0000007c, 3392 }, /* bar */ - { 0x01002235, 3396 }, /* because */ - { 0x0000ff58, 3404 }, /* Begin */ - { 0x000009df, 3410 }, /* blank */ - { 0x100000fc, 3416 }, /* block */ - { 0x000008a5, 3422 }, /* botintegral */ - { 0x000008ac, 3434 }, /* botleftparens */ - { 0x000008a8, 3448 }, /* botleftsqbracket */ - { 0x000008b2, 3465 }, /* botleftsummation */ - { 0x000008ae, 3482 }, /* botrightparens */ - { 0x000008aa, 3497 }, /* botrightsqbracket */ - { 0x000008b6, 3515 }, /* botrightsummation */ - { 0x000009f6, 3533 }, /* bott */ - { 0x000008b4, 3538 }, /* botvertsummationconnector */ - { 0x0000fe74, 3564 }, /* BounceKeys_Enable */ - { 0x0000007b, 3582 }, /* braceleft */ - { 0x0000007d, 3592 }, /* braceright */ - { 0x0000005b, 3603 }, /* bracketleft */ - { 0x0000005d, 3615 }, /* bracketright */ - { 0x01002800, 3628 }, /* braille_blank */ - { 0x0000fff1, 3642 }, /* braille_dot_1 */ - { 0x0000fffa, 3656 }, /* braille_dot_10 */ - { 0x0000fff2, 3671 }, /* braille_dot_2 */ - { 0x0000fff3, 3685 }, /* braille_dot_3 */ - { 0x0000fff4, 3699 }, /* braille_dot_4 */ - { 0x0000fff5, 3713 }, /* braille_dot_5 */ - { 0x0000fff6, 3727 }, /* braille_dot_6 */ - { 0x0000fff7, 3741 }, /* braille_dot_7 */ - { 0x0000fff8, 3755 }, /* braille_dot_8 */ - { 0x0000fff9, 3769 }, /* braille_dot_9 */ - { 0x01002801, 3783 }, /* braille_dots_1 */ - { 0x01002803, 3798 }, /* braille_dots_12 */ - { 0x01002807, 3814 }, /* braille_dots_123 */ - { 0x0100280f, 3831 }, /* braille_dots_1234 */ - { 0x0100281f, 3849 }, /* braille_dots_12345 */ - { 0x0100283f, 3868 }, /* braille_dots_123456 */ - { 0x0100287f, 3888 }, /* braille_dots_1234567 */ - { 0x010028ff, 3909 }, /* braille_dots_12345678 */ - { 0x010028bf, 3931 }, /* braille_dots_1234568 */ - { 0x0100285f, 3952 }, /* braille_dots_123457 */ - { 0x010028df, 3972 }, /* braille_dots_1234578 */ - { 0x0100289f, 3993 }, /* braille_dots_123458 */ - { 0x0100282f, 4013 }, /* braille_dots_12346 */ - { 0x0100286f, 4032 }, /* braille_dots_123467 */ - { 0x010028ef, 4052 }, /* braille_dots_1234678 */ - { 0x010028af, 4073 }, /* braille_dots_123468 */ - { 0x0100284f, 4093 }, /* braille_dots_12347 */ - { 0x010028cf, 4112 }, /* braille_dots_123478 */ - { 0x0100288f, 4132 }, /* braille_dots_12348 */ - { 0x01002817, 4151 }, /* braille_dots_1235 */ - { 0x01002837, 4169 }, /* braille_dots_12356 */ - { 0x01002877, 4188 }, /* braille_dots_123567 */ - { 0x010028f7, 4208 }, /* braille_dots_1235678 */ - { 0x010028b7, 4229 }, /* braille_dots_123568 */ - { 0x01002857, 4249 }, /* braille_dots_12357 */ - { 0x010028d7, 4268 }, /* braille_dots_123578 */ - { 0x01002897, 4288 }, /* braille_dots_12358 */ - { 0x01002827, 4307 }, /* braille_dots_1236 */ - { 0x01002867, 4325 }, /* braille_dots_12367 */ - { 0x010028e7, 4344 }, /* braille_dots_123678 */ - { 0x010028a7, 4364 }, /* braille_dots_12368 */ - { 0x01002847, 4383 }, /* braille_dots_1237 */ - { 0x010028c7, 4401 }, /* braille_dots_12378 */ - { 0x01002887, 4420 }, /* braille_dots_1238 */ - { 0x0100280b, 4438 }, /* braille_dots_124 */ - { 0x0100281b, 4455 }, /* braille_dots_1245 */ - { 0x0100283b, 4473 }, /* braille_dots_12456 */ - { 0x0100287b, 4492 }, /* braille_dots_124567 */ - { 0x010028fb, 4512 }, /* braille_dots_1245678 */ - { 0x010028bb, 4533 }, /* braille_dots_124568 */ - { 0x0100285b, 4553 }, /* braille_dots_12457 */ - { 0x010028db, 4572 }, /* braille_dots_124578 */ - { 0x0100289b, 4592 }, /* braille_dots_12458 */ - { 0x0100282b, 4611 }, /* braille_dots_1246 */ - { 0x0100286b, 4629 }, /* braille_dots_12467 */ - { 0x010028eb, 4648 }, /* braille_dots_124678 */ - { 0x010028ab, 4668 }, /* braille_dots_12468 */ - { 0x0100284b, 4687 }, /* braille_dots_1247 */ - { 0x010028cb, 4705 }, /* braille_dots_12478 */ - { 0x0100288b, 4724 }, /* braille_dots_1248 */ - { 0x01002813, 4742 }, /* braille_dots_125 */ - { 0x01002833, 4759 }, /* braille_dots_1256 */ - { 0x01002873, 4777 }, /* braille_dots_12567 */ - { 0x010028f3, 4796 }, /* braille_dots_125678 */ - { 0x010028b3, 4816 }, /* braille_dots_12568 */ - { 0x01002853, 4835 }, /* braille_dots_1257 */ - { 0x010028d3, 4853 }, /* braille_dots_12578 */ - { 0x01002893, 4872 }, /* braille_dots_1258 */ - { 0x01002823, 4890 }, /* braille_dots_126 */ - { 0x01002863, 4907 }, /* braille_dots_1267 */ - { 0x010028e3, 4925 }, /* braille_dots_12678 */ - { 0x010028a3, 4944 }, /* braille_dots_1268 */ - { 0x01002843, 4962 }, /* braille_dots_127 */ - { 0x010028c3, 4979 }, /* braille_dots_1278 */ - { 0x01002883, 4997 }, /* braille_dots_128 */ - { 0x01002805, 5014 }, /* braille_dots_13 */ - { 0x0100280d, 5030 }, /* braille_dots_134 */ - { 0x0100281d, 5047 }, /* braille_dots_1345 */ - { 0x0100283d, 5065 }, /* braille_dots_13456 */ - { 0x0100287d, 5084 }, /* braille_dots_134567 */ - { 0x010028fd, 5104 }, /* braille_dots_1345678 */ - { 0x010028bd, 5125 }, /* braille_dots_134568 */ - { 0x0100285d, 5145 }, /* braille_dots_13457 */ - { 0x010028dd, 5164 }, /* braille_dots_134578 */ - { 0x0100289d, 5184 }, /* braille_dots_13458 */ - { 0x0100282d, 5203 }, /* braille_dots_1346 */ - { 0x0100286d, 5221 }, /* braille_dots_13467 */ - { 0x010028ed, 5240 }, /* braille_dots_134678 */ - { 0x010028ad, 5260 }, /* braille_dots_13468 */ - { 0x0100284d, 5279 }, /* braille_dots_1347 */ - { 0x010028cd, 5297 }, /* braille_dots_13478 */ - { 0x0100288d, 5316 }, /* braille_dots_1348 */ - { 0x01002815, 5334 }, /* braille_dots_135 */ - { 0x01002835, 5351 }, /* braille_dots_1356 */ - { 0x01002875, 5369 }, /* braille_dots_13567 */ - { 0x010028f5, 5388 }, /* braille_dots_135678 */ - { 0x010028b5, 5408 }, /* braille_dots_13568 */ - { 0x01002855, 5427 }, /* braille_dots_1357 */ - { 0x010028d5, 5445 }, /* braille_dots_13578 */ - { 0x01002895, 5464 }, /* braille_dots_1358 */ - { 0x01002825, 5482 }, /* braille_dots_136 */ - { 0x01002865, 5499 }, /* braille_dots_1367 */ - { 0x010028e5, 5517 }, /* braille_dots_13678 */ - { 0x010028a5, 5536 }, /* braille_dots_1368 */ - { 0x01002845, 5554 }, /* braille_dots_137 */ - { 0x010028c5, 5571 }, /* braille_dots_1378 */ - { 0x01002885, 5589 }, /* braille_dots_138 */ - { 0x01002809, 5606 }, /* braille_dots_14 */ - { 0x01002819, 5622 }, /* braille_dots_145 */ - { 0x01002839, 5639 }, /* braille_dots_1456 */ - { 0x01002879, 5657 }, /* braille_dots_14567 */ - { 0x010028f9, 5676 }, /* braille_dots_145678 */ - { 0x010028b9, 5696 }, /* braille_dots_14568 */ - { 0x01002859, 5715 }, /* braille_dots_1457 */ - { 0x010028d9, 5733 }, /* braille_dots_14578 */ - { 0x01002899, 5752 }, /* braille_dots_1458 */ - { 0x01002829, 5770 }, /* braille_dots_146 */ - { 0x01002869, 5787 }, /* braille_dots_1467 */ - { 0x010028e9, 5805 }, /* braille_dots_14678 */ - { 0x010028a9, 5824 }, /* braille_dots_1468 */ - { 0x01002849, 5842 }, /* braille_dots_147 */ - { 0x010028c9, 5859 }, /* braille_dots_1478 */ - { 0x01002889, 5877 }, /* braille_dots_148 */ - { 0x01002811, 5894 }, /* braille_dots_15 */ - { 0x01002831, 5910 }, /* braille_dots_156 */ - { 0x01002871, 5927 }, /* braille_dots_1567 */ - { 0x010028f1, 5945 }, /* braille_dots_15678 */ - { 0x010028b1, 5964 }, /* braille_dots_1568 */ - { 0x01002851, 5982 }, /* braille_dots_157 */ - { 0x010028d1, 5999 }, /* braille_dots_1578 */ - { 0x01002891, 6017 }, /* braille_dots_158 */ - { 0x01002821, 6034 }, /* braille_dots_16 */ - { 0x01002861, 6050 }, /* braille_dots_167 */ - { 0x010028e1, 6067 }, /* braille_dots_1678 */ - { 0x010028a1, 6085 }, /* braille_dots_168 */ - { 0x01002841, 6102 }, /* braille_dots_17 */ - { 0x010028c1, 6118 }, /* braille_dots_178 */ - { 0x01002881, 6135 }, /* braille_dots_18 */ - { 0x01002802, 6151 }, /* braille_dots_2 */ - { 0x01002806, 6166 }, /* braille_dots_23 */ - { 0x0100280e, 6182 }, /* braille_dots_234 */ - { 0x0100281e, 6199 }, /* braille_dots_2345 */ - { 0x0100283e, 6217 }, /* braille_dots_23456 */ - { 0x0100287e, 6236 }, /* braille_dots_234567 */ - { 0x010028fe, 6256 }, /* braille_dots_2345678 */ - { 0x010028be, 6277 }, /* braille_dots_234568 */ - { 0x0100285e, 6297 }, /* braille_dots_23457 */ - { 0x010028de, 6316 }, /* braille_dots_234578 */ - { 0x0100289e, 6336 }, /* braille_dots_23458 */ - { 0x0100282e, 6355 }, /* braille_dots_2346 */ - { 0x0100286e, 6373 }, /* braille_dots_23467 */ - { 0x010028ee, 6392 }, /* braille_dots_234678 */ - { 0x010028ae, 6412 }, /* braille_dots_23468 */ - { 0x0100284e, 6431 }, /* braille_dots_2347 */ - { 0x010028ce, 6449 }, /* braille_dots_23478 */ - { 0x0100288e, 6468 }, /* braille_dots_2348 */ - { 0x01002816, 6486 }, /* braille_dots_235 */ - { 0x01002836, 6503 }, /* braille_dots_2356 */ - { 0x01002876, 6521 }, /* braille_dots_23567 */ - { 0x010028f6, 6540 }, /* braille_dots_235678 */ - { 0x010028b6, 6560 }, /* braille_dots_23568 */ - { 0x01002856, 6579 }, /* braille_dots_2357 */ - { 0x010028d6, 6597 }, /* braille_dots_23578 */ - { 0x01002896, 6616 }, /* braille_dots_2358 */ - { 0x01002826, 6634 }, /* braille_dots_236 */ - { 0x01002866, 6651 }, /* braille_dots_2367 */ - { 0x010028e6, 6669 }, /* braille_dots_23678 */ - { 0x010028a6, 6688 }, /* braille_dots_2368 */ - { 0x01002846, 6706 }, /* braille_dots_237 */ - { 0x010028c6, 6723 }, /* braille_dots_2378 */ - { 0x01002886, 6741 }, /* braille_dots_238 */ - { 0x0100280a, 6758 }, /* braille_dots_24 */ - { 0x0100281a, 6774 }, /* braille_dots_245 */ - { 0x0100283a, 6791 }, /* braille_dots_2456 */ - { 0x0100287a, 6809 }, /* braille_dots_24567 */ - { 0x010028fa, 6828 }, /* braille_dots_245678 */ - { 0x010028ba, 6848 }, /* braille_dots_24568 */ - { 0x0100285a, 6867 }, /* braille_dots_2457 */ - { 0x010028da, 6885 }, /* braille_dots_24578 */ - { 0x0100289a, 6904 }, /* braille_dots_2458 */ - { 0x0100282a, 6922 }, /* braille_dots_246 */ - { 0x0100286a, 6939 }, /* braille_dots_2467 */ - { 0x010028ea, 6957 }, /* braille_dots_24678 */ - { 0x010028aa, 6976 }, /* braille_dots_2468 */ - { 0x0100284a, 6994 }, /* braille_dots_247 */ - { 0x010028ca, 7011 }, /* braille_dots_2478 */ - { 0x0100288a, 7029 }, /* braille_dots_248 */ - { 0x01002812, 7046 }, /* braille_dots_25 */ - { 0x01002832, 7062 }, /* braille_dots_256 */ - { 0x01002872, 7079 }, /* braille_dots_2567 */ - { 0x010028f2, 7097 }, /* braille_dots_25678 */ - { 0x010028b2, 7116 }, /* braille_dots_2568 */ - { 0x01002852, 7134 }, /* braille_dots_257 */ - { 0x010028d2, 7151 }, /* braille_dots_2578 */ - { 0x01002892, 7169 }, /* braille_dots_258 */ - { 0x01002822, 7186 }, /* braille_dots_26 */ - { 0x01002862, 7202 }, /* braille_dots_267 */ - { 0x010028e2, 7219 }, /* braille_dots_2678 */ - { 0x010028a2, 7237 }, /* braille_dots_268 */ - { 0x01002842, 7254 }, /* braille_dots_27 */ - { 0x010028c2, 7270 }, /* braille_dots_278 */ - { 0x01002882, 7287 }, /* braille_dots_28 */ - { 0x01002804, 7303 }, /* braille_dots_3 */ - { 0x0100280c, 7318 }, /* braille_dots_34 */ - { 0x0100281c, 7334 }, /* braille_dots_345 */ - { 0x0100283c, 7351 }, /* braille_dots_3456 */ - { 0x0100287c, 7369 }, /* braille_dots_34567 */ - { 0x010028fc, 7388 }, /* braille_dots_345678 */ - { 0x010028bc, 7408 }, /* braille_dots_34568 */ - { 0x0100285c, 7427 }, /* braille_dots_3457 */ - { 0x010028dc, 7445 }, /* braille_dots_34578 */ - { 0x0100289c, 7464 }, /* braille_dots_3458 */ - { 0x0100282c, 7482 }, /* braille_dots_346 */ - { 0x0100286c, 7499 }, /* braille_dots_3467 */ - { 0x010028ec, 7517 }, /* braille_dots_34678 */ - { 0x010028ac, 7536 }, /* braille_dots_3468 */ - { 0x0100284c, 7554 }, /* braille_dots_347 */ - { 0x010028cc, 7571 }, /* braille_dots_3478 */ - { 0x0100288c, 7589 }, /* braille_dots_348 */ - { 0x01002814, 7606 }, /* braille_dots_35 */ - { 0x01002834, 7622 }, /* braille_dots_356 */ - { 0x01002874, 7639 }, /* braille_dots_3567 */ - { 0x010028f4, 7657 }, /* braille_dots_35678 */ - { 0x010028b4, 7676 }, /* braille_dots_3568 */ - { 0x01002854, 7694 }, /* braille_dots_357 */ - { 0x010028d4, 7711 }, /* braille_dots_3578 */ - { 0x01002894, 7729 }, /* braille_dots_358 */ - { 0x01002824, 7746 }, /* braille_dots_36 */ - { 0x01002864, 7762 }, /* braille_dots_367 */ - { 0x010028e4, 7779 }, /* braille_dots_3678 */ - { 0x010028a4, 7797 }, /* braille_dots_368 */ - { 0x01002844, 7814 }, /* braille_dots_37 */ - { 0x010028c4, 7830 }, /* braille_dots_378 */ - { 0x01002884, 7847 }, /* braille_dots_38 */ - { 0x01002808, 7863 }, /* braille_dots_4 */ - { 0x01002818, 7878 }, /* braille_dots_45 */ - { 0x01002838, 7894 }, /* braille_dots_456 */ - { 0x01002878, 7911 }, /* braille_dots_4567 */ - { 0x010028f8, 7929 }, /* braille_dots_45678 */ - { 0x010028b8, 7948 }, /* braille_dots_4568 */ - { 0x01002858, 7966 }, /* braille_dots_457 */ - { 0x010028d8, 7983 }, /* braille_dots_4578 */ - { 0x01002898, 8001 }, /* braille_dots_458 */ - { 0x01002828, 8018 }, /* braille_dots_46 */ - { 0x01002868, 8034 }, /* braille_dots_467 */ - { 0x010028e8, 8051 }, /* braille_dots_4678 */ - { 0x010028a8, 8069 }, /* braille_dots_468 */ - { 0x01002848, 8086 }, /* braille_dots_47 */ - { 0x010028c8, 8102 }, /* braille_dots_478 */ - { 0x01002888, 8119 }, /* braille_dots_48 */ - { 0x01002810, 8135 }, /* braille_dots_5 */ - { 0x01002830, 8150 }, /* braille_dots_56 */ - { 0x01002870, 8166 }, /* braille_dots_567 */ - { 0x010028f0, 8183 }, /* braille_dots_5678 */ - { 0x010028b0, 8201 }, /* braille_dots_568 */ - { 0x01002850, 8218 }, /* braille_dots_57 */ - { 0x010028d0, 8234 }, /* braille_dots_578 */ - { 0x01002890, 8251 }, /* braille_dots_58 */ - { 0x01002820, 8267 }, /* braille_dots_6 */ - { 0x01002860, 8282 }, /* braille_dots_67 */ - { 0x010028e0, 8298 }, /* braille_dots_678 */ - { 0x010028a0, 8315 }, /* braille_dots_68 */ - { 0x01002840, 8331 }, /* braille_dots_7 */ - { 0x010028c0, 8346 }, /* braille_dots_78 */ - { 0x01002880, 8362 }, /* braille_dots_8 */ - { 0x0000ff6b, 8377 }, /* Break */ - { 0x000001a2, 8383 }, /* breve */ - { 0x000000a6, 8389 }, /* brokenbar */ - { 0x000006ae, 8399 }, /* Byelorussian_shortu */ - { 0x000006be, 8419 }, /* Byelorussian_SHORTU */ - { 0x00000043, 8439 }, /* C */ - { 0x00000063, 8441 }, /* c */ - { 0x0000fea3, 8443 }, /* c_h */ - { 0x0000fea4, 8447 }, /* C_h */ - { 0x0000fea5, 8451 }, /* C_H */ - { 0x000002c5, 8455 }, /* Cabovedot */ - { 0x000002e5, 8465 }, /* cabovedot */ - { 0x000001c6, 8475 }, /* Cacute */ - { 0x000001e6, 8482 }, /* cacute */ - { 0x0000ff69, 8489 }, /* Cancel */ - { 0x0000ffe5, 8496 }, /* Caps_Lock */ - { 0x00000ab8, 8506 }, /* careof */ - { 0x00000afc, 8513 }, /* caret */ - { 0x000001b7, 8519 }, /* caron */ - { 0x000001c8, 8525 }, /* Ccaron */ - { 0x000001e8, 8532 }, /* ccaron */ - { 0x000000c7, 8539 }, /* Ccedilla */ - { 0x000000e7, 8548 }, /* ccedilla */ - { 0x000002c6, 8557 }, /* Ccircumflex */ - { 0x000002e6, 8569 }, /* ccircumflex */ - { 0x000000b8, 8581 }, /* cedilla */ - { 0x000000a2, 8589 }, /* cent */ - { 0x0000fea0, 8594 }, /* ch */ - { 0x0000fea1, 8597 }, /* Ch */ - { 0x0000fea2, 8600 }, /* CH */ - { 0x000009e1, 8603 }, /* checkerboard */ - { 0x00000af3, 8616 }, /* checkmark */ - { 0x00000bcf, 8626 }, /* circle */ - { 0x0000ff0b, 8633 }, /* Clear */ - { 0x1000ff6f, 8639 }, /* ClearLine */ - { 0x00000aec, 8649 }, /* club */ - { 0x0000ff37, 8654 }, /* Codeinput */ - { 0x0000003a, 8664 }, /* colon */ - { 0x010020a1, 8670 }, /* ColonSign */ - { 0x0000002c, 8680 }, /* comma */ - { 0x0100220b, 8686 }, /* containsas */ - { 0x0000ffe3, 8697 }, /* Control_L */ - { 0x0000ffe4, 8707 }, /* Control_R */ - { 0x000000a9, 8717 }, /* copyright */ - { 0x000009e4, 8727 }, /* cr */ - { 0x000009ee, 8730 }, /* crossinglines */ - { 0x010020a2, 8744 }, /* CruzeiroSign */ - { 0x0100221b, 8757 }, /* cuberoot */ - { 0x000000a4, 8766 }, /* currency */ - { 0x00000aff, 8775 }, /* cursor */ - { 0x000006c1, 8782 }, /* Cyrillic_a */ - { 0x000006e1, 8793 }, /* Cyrillic_A */ - { 0x000006c2, 8804 }, /* Cyrillic_be */ - { 0x000006e2, 8816 }, /* Cyrillic_BE */ - { 0x000006de, 8828 }, /* Cyrillic_che */ - { 0x000006fe, 8841 }, /* Cyrillic_CHE */ - { 0x010004b6, 8854 }, /* Cyrillic_CHE_descender */ - { 0x010004b7, 8877 }, /* Cyrillic_che_descender */ - { 0x010004b8, 8900 }, /* Cyrillic_CHE_vertstroke */ - { 0x010004b9, 8924 }, /* Cyrillic_che_vertstroke */ - { 0x000006c4, 8948 }, /* Cyrillic_de */ - { 0x000006e4, 8960 }, /* Cyrillic_DE */ - { 0x000006af, 8972 }, /* Cyrillic_dzhe */ - { 0x000006bf, 8986 }, /* Cyrillic_DZHE */ - { 0x000006dc, 9000 }, /* Cyrillic_e */ - { 0x000006fc, 9011 }, /* Cyrillic_E */ - { 0x000006c6, 9022 }, /* Cyrillic_ef */ - { 0x000006e6, 9034 }, /* Cyrillic_EF */ - { 0x000006cc, 9046 }, /* Cyrillic_el */ - { 0x000006ec, 9058 }, /* Cyrillic_EL */ - { 0x000006cd, 9070 }, /* Cyrillic_em */ - { 0x000006ed, 9082 }, /* Cyrillic_EM */ - { 0x000006ce, 9094 }, /* Cyrillic_en */ - { 0x000006ee, 9106 }, /* Cyrillic_EN */ - { 0x010004a2, 9118 }, /* Cyrillic_EN_descender */ - { 0x010004a3, 9140 }, /* Cyrillic_en_descender */ - { 0x000006d2, 9162 }, /* Cyrillic_er */ - { 0x000006f2, 9174 }, /* Cyrillic_ER */ - { 0x000006d3, 9186 }, /* Cyrillic_es */ - { 0x000006f3, 9198 }, /* Cyrillic_ES */ - { 0x000006c7, 9210 }, /* Cyrillic_ghe */ - { 0x000006e7, 9223 }, /* Cyrillic_GHE */ - { 0x01000492, 9236 }, /* Cyrillic_GHE_bar */ - { 0x01000493, 9253 }, /* Cyrillic_ghe_bar */ - { 0x000006c8, 9270 }, /* Cyrillic_ha */ - { 0x000006e8, 9282 }, /* Cyrillic_HA */ - { 0x010004b2, 9294 }, /* Cyrillic_HA_descender */ - { 0x010004b3, 9316 }, /* Cyrillic_ha_descender */ - { 0x000006df, 9338 }, /* Cyrillic_hardsign */ - { 0x000006ff, 9356 }, /* Cyrillic_HARDSIGN */ - { 0x000006c9, 9374 }, /* Cyrillic_i */ - { 0x000006e9, 9385 }, /* Cyrillic_I */ - { 0x010004e2, 9396 }, /* Cyrillic_I_macron */ - { 0x010004e3, 9414 }, /* Cyrillic_i_macron */ - { 0x000006c5, 9432 }, /* Cyrillic_ie */ - { 0x000006e5, 9444 }, /* Cyrillic_IE */ - { 0x000006a3, 9456 }, /* Cyrillic_io */ - { 0x000006b3, 9468 }, /* Cyrillic_IO */ - { 0x000006a8, 9480 }, /* Cyrillic_je */ - { 0x000006b8, 9492 }, /* Cyrillic_JE */ - { 0x000006cb, 9504 }, /* Cyrillic_ka */ - { 0x000006eb, 9516 }, /* Cyrillic_KA */ - { 0x0100049a, 9528 }, /* Cyrillic_KA_descender */ - { 0x0100049b, 9550 }, /* Cyrillic_ka_descender */ - { 0x0100049c, 9572 }, /* Cyrillic_KA_vertstroke */ - { 0x0100049d, 9595 }, /* Cyrillic_ka_vertstroke */ - { 0x000006a9, 9618 }, /* Cyrillic_lje */ - { 0x000006b9, 9631 }, /* Cyrillic_LJE */ - { 0x000006aa, 9644 }, /* Cyrillic_nje */ - { 0x000006ba, 9657 }, /* Cyrillic_NJE */ - { 0x000006cf, 9670 }, /* Cyrillic_o */ - { 0x000006ef, 9681 }, /* Cyrillic_O */ - { 0x010004e8, 9692 }, /* Cyrillic_O_bar */ - { 0x010004e9, 9707 }, /* Cyrillic_o_bar */ - { 0x000006d0, 9722 }, /* Cyrillic_pe */ - { 0x000006f0, 9734 }, /* Cyrillic_PE */ - { 0x010004d8, 9746 }, /* Cyrillic_SCHWA */ - { 0x010004d9, 9761 }, /* Cyrillic_schwa */ - { 0x000006db, 9776 }, /* Cyrillic_sha */ - { 0x000006fb, 9789 }, /* Cyrillic_SHA */ - { 0x000006dd, 9802 }, /* Cyrillic_shcha */ - { 0x000006fd, 9817 }, /* Cyrillic_SHCHA */ - { 0x010004ba, 9832 }, /* Cyrillic_SHHA */ - { 0x010004bb, 9846 }, /* Cyrillic_shha */ - { 0x000006ca, 9860 }, /* Cyrillic_shorti */ - { 0x000006ea, 9876 }, /* Cyrillic_SHORTI */ - { 0x000006d8, 9892 }, /* Cyrillic_softsign */ - { 0x000006f8, 9910 }, /* Cyrillic_SOFTSIGN */ - { 0x000006d4, 9928 }, /* Cyrillic_te */ - { 0x000006f4, 9940 }, /* Cyrillic_TE */ - { 0x000006c3, 9952 }, /* Cyrillic_tse */ - { 0x000006e3, 9965 }, /* Cyrillic_TSE */ - { 0x000006d5, 9978 }, /* Cyrillic_u */ - { 0x000006f5, 9989 }, /* Cyrillic_U */ - { 0x010004ee, 10000 }, /* Cyrillic_U_macron */ - { 0x010004ef, 10018 }, /* Cyrillic_u_macron */ - { 0x010004ae, 10036 }, /* Cyrillic_U_straight */ - { 0x010004af, 10056 }, /* Cyrillic_u_straight */ - { 0x010004b0, 10076 }, /* Cyrillic_U_straight_bar */ - { 0x010004b1, 10100 }, /* Cyrillic_u_straight_bar */ - { 0x000006d7, 10124 }, /* Cyrillic_ve */ - { 0x000006f7, 10136 }, /* Cyrillic_VE */ - { 0x000006d1, 10148 }, /* Cyrillic_ya */ - { 0x000006f1, 10160 }, /* Cyrillic_YA */ - { 0x000006d9, 10172 }, /* Cyrillic_yeru */ - { 0x000006f9, 10186 }, /* Cyrillic_YERU */ - { 0x000006c0, 10200 }, /* Cyrillic_yu */ - { 0x000006e0, 10212 }, /* Cyrillic_YU */ - { 0x000006da, 10224 }, /* Cyrillic_ze */ - { 0x000006fa, 10236 }, /* Cyrillic_ZE */ - { 0x000006d6, 10248 }, /* Cyrillic_zhe */ - { 0x000006f6, 10261 }, /* Cyrillic_ZHE */ - { 0x01000496, 10274 }, /* Cyrillic_ZHE_descender */ - { 0x01000497, 10297 }, /* Cyrillic_zhe_descender */ - { 0x00000044, 10320 }, /* D */ - { 0x00000064, 10322 }, /* d */ - { 0x01001e0a, 10324 }, /* Dabovedot */ - { 0x01001e0b, 10334 }, /* dabovedot */ - { 0x1000fe27, 10344 }, /* Dacute_accent */ - { 0x00000af1, 10358 }, /* dagger */ - { 0x000001cf, 10365 }, /* Dcaron */ - { 0x000001ef, 10372 }, /* dcaron */ - { 0x1000fe2c, 10379 }, /* Dcedilla_accent */ - { 0x1000fe5e, 10395 }, /* Dcircumflex_accent */ - { 0x1000fe22, 10414 }, /* Ddiaeresis */ - { 0x0000fe80, 10425 }, /* dead_a */ - { 0x0000fe81, 10432 }, /* dead_A */ - { 0x0000fe64, 10439 }, /* dead_abovecomma */ - { 0x0000fe56, 10455 }, /* dead_abovedot */ - { 0x0000fe65, 10469 }, /* dead_abovereversedcomma */ - { 0x0000fe58, 10493 }, /* dead_abovering */ - { 0x0000fe91, 10508 }, /* dead_aboveverticalline */ - { 0x0000fe51, 10531 }, /* dead_acute */ - { 0x0000fe6b, 10542 }, /* dead_belowbreve */ - { 0x0000fe69, 10558 }, /* dead_belowcircumflex */ - { 0x0000fe6e, 10579 }, /* dead_belowcomma */ - { 0x0000fe6c, 10595 }, /* dead_belowdiaeresis */ - { 0x0000fe60, 10615 }, /* dead_belowdot */ - { 0x0000fe68, 10629 }, /* dead_belowmacron */ - { 0x0000fe67, 10646 }, /* dead_belowring */ - { 0x0000fe6a, 10661 }, /* dead_belowtilde */ - { 0x0000fe92, 10677 }, /* dead_belowverticalline */ - { 0x0000fe55, 10700 }, /* dead_breve */ - { 0x0000fe8b, 10711 }, /* dead_capital_schwa */ - { 0x0000fe5a, 10730 }, /* dead_caron */ - { 0x0000fe5b, 10741 }, /* dead_cedilla */ - { 0x0000fe52, 10754 }, /* dead_circumflex */ - { 0x0000fe6f, 10770 }, /* dead_currency */ - { 0x0000fe65, 10784 }, /* dead_dasia */ - { 0x0000fe57, 10795 }, /* dead_diaeresis */ - { 0x0000fe59, 10810 }, /* dead_doubleacute */ - { 0x0000fe66, 10827 }, /* dead_doublegrave */ - { 0x0000fe82, 10844 }, /* dead_e */ - { 0x0000fe83, 10851 }, /* dead_E */ - { 0x0000fe50, 10858 }, /* dead_grave */ - { 0x0000fe8c, 10869 }, /* dead_greek */ - { 0x0000fe61, 10880 }, /* dead_hook */ - { 0x0000fe62, 10890 }, /* dead_horn */ - { 0x0000fe84, 10900 }, /* dead_i */ - { 0x0000fe85, 10907 }, /* dead_I */ - { 0x0000fe6d, 10914 }, /* dead_invertedbreve */ - { 0x0000fe5d, 10933 }, /* dead_iota */ - { 0x0000fe93, 10943 }, /* dead_longsolidusoverlay */ - { 0x0000fe90, 10967 }, /* dead_lowline */ - { 0x0000fe54, 10980 }, /* dead_macron */ - { 0x0000fe86, 10992 }, /* dead_o */ - { 0x0000fe87, 10999 }, /* dead_O */ - { 0x0000fe5c, 11006 }, /* dead_ogonek */ - { 0x0000fe53, 11018 }, /* dead_perispomeni */ - { 0x0000fe64, 11035 }, /* dead_psili */ - { 0x0000fe5f, 11046 }, /* dead_semivoiced_sound */ - { 0x0000fe8a, 11068 }, /* dead_small_schwa */ - { 0x0000fe63, 11085 }, /* dead_stroke */ - { 0x0000fe53, 11097 }, /* dead_tilde */ - { 0x0000fe88, 11108 }, /* dead_u */ - { 0x0000fe89, 11115 }, /* dead_U */ - { 0x0000fe5e, 11122 }, /* dead_voiced_sound */ - { 0x00000abd, 11140 }, /* decimalpoint */ - { 0x000000b0, 11153 }, /* degree */ - { 0x0000ffff, 11160 }, /* Delete */ - { 0x1000ff73, 11167 }, /* DeleteChar */ - { 0x1000ff71, 11178 }, /* DeleteLine */ - { 0x1000fe60, 11189 }, /* Dgrave_accent */ - { 0x000000a8, 11203 }, /* diaeresis */ - { 0x00000aed, 11213 }, /* diamond */ - { 0x00000aa5, 11221 }, /* digitspace */ - { 0x0100222c, 11232 }, /* dintegral */ - { 0x000000f7, 11242 }, /* division */ - { 0x00000024, 11251 }, /* dollar */ - { 0x010020ab, 11258 }, /* DongSign */ - { 0x00000aaf, 11267 }, /* doubbaselinedot */ - { 0x000001bd, 11283 }, /* doubleacute */ - { 0x00000af2, 11295 }, /* doubledagger */ - { 0x00000afe, 11308 }, /* doublelowquotemark */ - { 0x0000ff54, 11327 }, /* Down */ - { 0x000008fe, 11332 }, /* downarrow */ - { 0x00000ba8, 11342 }, /* downcaret */ - { 0x00000bd6, 11352 }, /* downshoe */ - { 0x00000bc4, 11361 }, /* downstile */ - { 0x00000bc2, 11371 }, /* downtack */ - { 0x1000ff00, 11380 }, /* DRemove */ - { 0x1000feb0, 11388 }, /* Dring_accent */ - { 0x000001d0, 11401 }, /* Dstroke */ - { 0x000001f0, 11409 }, /* dstroke */ - { 0x1000fe7e, 11417 }, /* Dtilde */ - { 0x00000045, 11424 }, /* E */ - { 0x00000065, 11426 }, /* e */ - { 0x000003cc, 11428 }, /* Eabovedot */ - { 0x000003ec, 11438 }, /* eabovedot */ - { 0x000000c9, 11448 }, /* Eacute */ - { 0x000000e9, 11455 }, /* eacute */ - { 0x01001eb8, 11462 }, /* Ebelowdot */ - { 0x01001eb9, 11472 }, /* ebelowdot */ - { 0x000001cc, 11482 }, /* Ecaron */ - { 0x000001ec, 11489 }, /* ecaron */ - { 0x000000ca, 11496 }, /* Ecircumflex */ - { 0x000000ea, 11508 }, /* ecircumflex */ - { 0x01001ebe, 11520 }, /* Ecircumflexacute */ - { 0x01001ebf, 11537 }, /* ecircumflexacute */ - { 0x01001ec6, 11554 }, /* Ecircumflexbelowdot */ - { 0x01001ec7, 11574 }, /* ecircumflexbelowdot */ - { 0x01001ec0, 11594 }, /* Ecircumflexgrave */ - { 0x01001ec1, 11611 }, /* ecircumflexgrave */ - { 0x01001ec2, 11628 }, /* Ecircumflexhook */ - { 0x01001ec3, 11644 }, /* ecircumflexhook */ - { 0x01001ec4, 11660 }, /* Ecircumflextilde */ - { 0x01001ec5, 11677 }, /* ecircumflextilde */ - { 0x010020a0, 11694 }, /* EcuSign */ - { 0x000000cb, 11702 }, /* Ediaeresis */ - { 0x000000eb, 11713 }, /* ediaeresis */ - { 0x000000c8, 11724 }, /* Egrave */ - { 0x000000e8, 11731 }, /* egrave */ - { 0x01001eba, 11738 }, /* Ehook */ - { 0x01001ebb, 11744 }, /* ehook */ - { 0x01002088, 11750 }, /* eightsubscript */ - { 0x01002078, 11765 }, /* eightsuperior */ - { 0x0000ff2f, 11779 }, /* Eisu_Shift */ - { 0x0000ff30, 11790 }, /* Eisu_toggle */ - { 0x01002208, 11802 }, /* elementof */ - { 0x00000aae, 11812 }, /* ellipsis */ - { 0x00000aa3, 11821 }, /* em3space */ - { 0x00000aa4, 11830 }, /* em4space */ - { 0x000003aa, 11839 }, /* Emacron */ - { 0x000003ba, 11847 }, /* emacron */ - { 0x00000aa9, 11855 }, /* emdash */ - { 0x00000ade, 11862 }, /* emfilledcircle */ - { 0x00000adf, 11877 }, /* emfilledrect */ - { 0x00000ace, 11890 }, /* emopencircle */ - { 0x00000acf, 11903 }, /* emopenrectangle */ - { 0x01002205, 11919 }, /* emptyset */ - { 0x00000aa1, 11928 }, /* emspace */ - { 0x0000ff57, 11936 }, /* End */ - { 0x00000aaa, 11940 }, /* endash */ - { 0x00000ae6, 11947 }, /* enfilledcircbullet */ - { 0x00000ae7, 11966 }, /* enfilledsqbullet */ - { 0x000003bd, 11983 }, /* ENG */ - { 0x000003bf, 11987 }, /* eng */ - { 0x00000ae0, 11991 }, /* enopencircbullet */ - { 0x00000ae1, 12008 }, /* enopensquarebullet */ - { 0x00000aa2, 12027 }, /* enspace */ - { 0x000001ca, 12035 }, /* Eogonek */ - { 0x000001ea, 12043 }, /* eogonek */ - { 0x0000003d, 12051 }, /* equal */ - { 0x0000ff1b, 12057 }, /* Escape */ - { 0x000000d0, 12064 }, /* ETH */ - { 0x000000d0, 12068 }, /* Eth */ - { 0x000000f0, 12072 }, /* eth */ - { 0x01001ebc, 12076 }, /* Etilde */ - { 0x01001ebd, 12083 }, /* etilde */ - { 0x000020ac, 12090 }, /* EuroSign */ - { 0x00000021, 12099 }, /* exclam */ - { 0x000000a1, 12106 }, /* exclamdown */ - { 0x0000ff62, 12117 }, /* Execute */ - { 0x1000ff76, 12125 }, /* Ext16bit_L */ - { 0x1000ff77, 12136 }, /* Ext16bit_R */ - { 0x010001b7, 12147 }, /* EZH */ - { 0x01000292, 12151 }, /* ezh */ - { 0x00000046, 12155 }, /* F */ - { 0x00000066, 12157 }, /* f */ - { 0x0000ffbe, 12159 }, /* F1 */ - { 0x0000ffc7, 12162 }, /* F10 */ - { 0x0000ffc8, 12166 }, /* F11 */ - { 0x0000ffc9, 12170 }, /* F12 */ - { 0x0000ffca, 12174 }, /* F13 */ - { 0x0000ffcb, 12178 }, /* F14 */ - { 0x0000ffcc, 12182 }, /* F15 */ - { 0x0000ffcd, 12186 }, /* F16 */ - { 0x0000ffce, 12190 }, /* F17 */ - { 0x0000ffcf, 12194 }, /* F18 */ - { 0x0000ffd0, 12198 }, /* F19 */ - { 0x0000ffbf, 12202 }, /* F2 */ - { 0x0000ffd1, 12205 }, /* F20 */ - { 0x0000ffd2, 12209 }, /* F21 */ - { 0x0000ffd3, 12213 }, /* F22 */ - { 0x0000ffd4, 12217 }, /* F23 */ - { 0x0000ffd5, 12221 }, /* F24 */ - { 0x0000ffd6, 12225 }, /* F25 */ - { 0x0000ffd7, 12229 }, /* F26 */ - { 0x0000ffd8, 12233 }, /* F27 */ - { 0x0000ffd9, 12237 }, /* F28 */ - { 0x0000ffda, 12241 }, /* F29 */ - { 0x0000ffc0, 12245 }, /* F3 */ - { 0x0000ffdb, 12248 }, /* F30 */ - { 0x0000ffdc, 12252 }, /* F31 */ - { 0x0000ffdd, 12256 }, /* F32 */ - { 0x0000ffde, 12260 }, /* F33 */ - { 0x0000ffdf, 12264 }, /* F34 */ - { 0x0000ffe0, 12268 }, /* F35 */ - { 0x0000ffc1, 12272 }, /* F4 */ - { 0x0000ffc2, 12275 }, /* F5 */ - { 0x0000ffc3, 12278 }, /* F6 */ - { 0x0000ffc4, 12281 }, /* F7 */ - { 0x0000ffc5, 12284 }, /* F8 */ - { 0x0000ffc6, 12287 }, /* F9 */ - { 0x01001e1e, 12290 }, /* Fabovedot */ - { 0x01001e1f, 12300 }, /* fabovedot */ - { 0x010006f0, 12310 }, /* Farsi_0 */ - { 0x010006f1, 12318 }, /* Farsi_1 */ - { 0x010006f2, 12326 }, /* Farsi_2 */ - { 0x010006f3, 12334 }, /* Farsi_3 */ - { 0x010006f4, 12342 }, /* Farsi_4 */ - { 0x010006f5, 12350 }, /* Farsi_5 */ - { 0x010006f6, 12358 }, /* Farsi_6 */ - { 0x010006f7, 12366 }, /* Farsi_7 */ - { 0x010006f8, 12374 }, /* Farsi_8 */ - { 0x010006f9, 12382 }, /* Farsi_9 */ - { 0x010006cc, 12390 }, /* Farsi_yeh */ - { 0x00000af8, 12400 }, /* femalesymbol */ - { 0x000009e3, 12413 }, /* ff */ - { 0x010020a3, 12416 }, /* FFrancSign */ - { 0x00000abb, 12427 }, /* figdash */ - { 0x00000adc, 12435 }, /* filledlefttribullet */ - { 0x00000adb, 12455 }, /* filledrectbullet */ - { 0x00000add, 12472 }, /* filledrighttribullet */ - { 0x00000ae9, 12493 }, /* filledtribulletdown */ - { 0x00000ae8, 12513 }, /* filledtribulletup */ - { 0x0000ff68, 12531 }, /* Find */ - { 0x0000fed0, 12536 }, /* First_Virtual_Screen */ - { 0x00000ac5, 12557 }, /* fiveeighths */ - { 0x00000ab7, 12569 }, /* fivesixths */ - { 0x01002085, 12580 }, /* fivesubscript */ - { 0x01002075, 12594 }, /* fivesuperior */ - { 0x00000ab5, 12607 }, /* fourfifths */ - { 0x01002084, 12618 }, /* foursubscript */ - { 0x01002074, 12632 }, /* foursuperior */ - { 0x0100221c, 12645 }, /* fourthroot */ - { 0x000008f6, 12656 }, /* function */ - { 0x00000047, 12665 }, /* G */ - { 0x00000067, 12667 }, /* g */ - { 0x000002d5, 12669 }, /* Gabovedot */ - { 0x000002f5, 12679 }, /* gabovedot */ - { 0x000002ab, 12689 }, /* Gbreve */ - { 0x000002bb, 12696 }, /* gbreve */ - { 0x010001e6, 12703 }, /* Gcaron */ - { 0x010001e7, 12710 }, /* gcaron */ - { 0x000003ab, 12717 }, /* Gcedilla */ - { 0x000003bb, 12726 }, /* gcedilla */ - { 0x000002d8, 12735 }, /* Gcircumflex */ - { 0x000002f8, 12747 }, /* gcircumflex */ - { 0x010010d0, 12759 }, /* Georgian_an */ - { 0x010010d1, 12771 }, /* Georgian_ban */ - { 0x010010ea, 12784 }, /* Georgian_can */ - { 0x010010ed, 12797 }, /* Georgian_char */ - { 0x010010e9, 12811 }, /* Georgian_chin */ - { 0x010010ec, 12825 }, /* Georgian_cil */ - { 0x010010d3, 12838 }, /* Georgian_don */ - { 0x010010d4, 12851 }, /* Georgian_en */ - { 0x010010f6, 12863 }, /* Georgian_fi */ - { 0x010010d2, 12875 }, /* Georgian_gan */ - { 0x010010e6, 12888 }, /* Georgian_ghan */ - { 0x010010f0, 12902 }, /* Georgian_hae */ - { 0x010010f4, 12915 }, /* Georgian_har */ - { 0x010010f1, 12928 }, /* Georgian_he */ - { 0x010010f2, 12940 }, /* Georgian_hie */ - { 0x010010f5, 12953 }, /* Georgian_hoe */ - { 0x010010d8, 12966 }, /* Georgian_in */ - { 0x010010ef, 12978 }, /* Georgian_jhan */ - { 0x010010eb, 12992 }, /* Georgian_jil */ - { 0x010010d9, 13005 }, /* Georgian_kan */ - { 0x010010e5, 13018 }, /* Georgian_khar */ - { 0x010010da, 13032 }, /* Georgian_las */ - { 0x010010db, 13045 }, /* Georgian_man */ - { 0x010010dc, 13058 }, /* Georgian_nar */ - { 0x010010dd, 13071 }, /* Georgian_on */ - { 0x010010de, 13083 }, /* Georgian_par */ - { 0x010010e4, 13096 }, /* Georgian_phar */ - { 0x010010e7, 13110 }, /* Georgian_qar */ - { 0x010010e0, 13123 }, /* Georgian_rae */ - { 0x010010e1, 13136 }, /* Georgian_san */ - { 0x010010e8, 13149 }, /* Georgian_shin */ - { 0x010010d7, 13163 }, /* Georgian_tan */ - { 0x010010e2, 13176 }, /* Georgian_tar */ - { 0x010010e3, 13189 }, /* Georgian_un */ - { 0x010010d5, 13201 }, /* Georgian_vin */ - { 0x010010f3, 13214 }, /* Georgian_we */ - { 0x010010ee, 13226 }, /* Georgian_xan */ - { 0x010010d6, 13239 }, /* Georgian_zen */ - { 0x010010df, 13252 }, /* Georgian_zhar */ - { 0x00000060, 13266 }, /* grave */ - { 0x0000003e, 13272 }, /* greater */ - { 0x000008be, 13280 }, /* greaterthanequal */ - { 0x000007ae, 13297 }, /* Greek_accentdieresis */ - { 0x000007c1, 13318 }, /* Greek_ALPHA */ - { 0x000007e1, 13330 }, /* Greek_alpha */ - { 0x000007a1, 13342 }, /* Greek_ALPHAaccent */ - { 0x000007b1, 13360 }, /* Greek_alphaaccent */ - { 0x000007c2, 13378 }, /* Greek_BETA */ - { 0x000007e2, 13389 }, /* Greek_beta */ - { 0x000007d7, 13400 }, /* Greek_CHI */ - { 0x000007f7, 13410 }, /* Greek_chi */ - { 0x000007c4, 13420 }, /* Greek_DELTA */ - { 0x000007e4, 13432 }, /* Greek_delta */ - { 0x000007c5, 13444 }, /* Greek_EPSILON */ - { 0x000007e5, 13458 }, /* Greek_epsilon */ - { 0x000007a2, 13472 }, /* Greek_EPSILONaccent */ - { 0x000007b2, 13492 }, /* Greek_epsilonaccent */ - { 0x000007c7, 13512 }, /* Greek_ETA */ - { 0x000007e7, 13522 }, /* Greek_eta */ - { 0x000007a3, 13532 }, /* Greek_ETAaccent */ - { 0x000007b3, 13548 }, /* Greek_etaaccent */ - { 0x000007f3, 13564 }, /* Greek_finalsmallsigma */ - { 0x000007c3, 13586 }, /* Greek_GAMMA */ - { 0x000007e3, 13598 }, /* Greek_gamma */ - { 0x000007af, 13610 }, /* Greek_horizbar */ - { 0x000007c9, 13625 }, /* Greek_IOTA */ - { 0x000007e9, 13636 }, /* Greek_iota */ - { 0x000007a4, 13647 }, /* Greek_IOTAaccent */ - { 0x000007b4, 13664 }, /* Greek_iotaaccent */ - { 0x000007b6, 13681 }, /* Greek_iotaaccentdieresis */ - { 0x000007a5, 13706 }, /* Greek_IOTAdiaeresis */ - { 0x000007a5, 13726 }, /* Greek_IOTAdieresis */ - { 0x000007b5, 13745 }, /* Greek_iotadieresis */ - { 0x000007ca, 13764 }, /* Greek_KAPPA */ - { 0x000007ea, 13776 }, /* Greek_kappa */ - { 0x000007cb, 13788 }, /* Greek_LAMBDA */ - { 0x000007eb, 13801 }, /* Greek_lambda */ - { 0x000007cb, 13814 }, /* Greek_LAMDA */ - { 0x000007eb, 13826 }, /* Greek_lamda */ - { 0x000007cc, 13838 }, /* Greek_MU */ - { 0x000007ec, 13847 }, /* Greek_mu */ - { 0x000007cd, 13856 }, /* Greek_NU */ - { 0x000007ed, 13865 }, /* Greek_nu */ - { 0x000007d9, 13874 }, /* Greek_OMEGA */ - { 0x000007f9, 13886 }, /* Greek_omega */ - { 0x000007ab, 13898 }, /* Greek_OMEGAaccent */ - { 0x000007bb, 13916 }, /* Greek_omegaaccent */ - { 0x000007cf, 13934 }, /* Greek_OMICRON */ - { 0x000007ef, 13948 }, /* Greek_omicron */ - { 0x000007a7, 13962 }, /* Greek_OMICRONaccent */ - { 0x000007b7, 13982 }, /* Greek_omicronaccent */ - { 0x000007d6, 14002 }, /* Greek_PHI */ - { 0x000007f6, 14012 }, /* Greek_phi */ - { 0x000007d0, 14022 }, /* Greek_PI */ - { 0x000007f0, 14031 }, /* Greek_pi */ - { 0x000007d8, 14040 }, /* Greek_PSI */ - { 0x000007f8, 14050 }, /* Greek_psi */ - { 0x000007d1, 14060 }, /* Greek_RHO */ - { 0x000007f1, 14070 }, /* Greek_rho */ - { 0x000007d2, 14080 }, /* Greek_SIGMA */ - { 0x000007f2, 14092 }, /* Greek_sigma */ - { 0x0000ff7e, 14104 }, /* Greek_switch */ - { 0x000007d4, 14117 }, /* Greek_TAU */ - { 0x000007f4, 14127 }, /* Greek_tau */ - { 0x000007c8, 14137 }, /* Greek_THETA */ - { 0x000007e8, 14149 }, /* Greek_theta */ - { 0x000007d5, 14161 }, /* Greek_UPSILON */ - { 0x000007f5, 14175 }, /* Greek_upsilon */ - { 0x000007a8, 14189 }, /* Greek_UPSILONaccent */ - { 0x000007b8, 14209 }, /* Greek_upsilonaccent */ - { 0x000007ba, 14229 }, /* Greek_upsilonaccentdieresis */ - { 0x000007a9, 14257 }, /* Greek_UPSILONdieresis */ - { 0x000007b9, 14279 }, /* Greek_upsilondieresis */ - { 0x000007ce, 14301 }, /* Greek_XI */ - { 0x000007ee, 14310 }, /* Greek_xi */ - { 0x000007c6, 14319 }, /* Greek_ZETA */ - { 0x000007e6, 14330 }, /* Greek_zeta */ - { 0x100000be, 14341 }, /* guilder */ - { 0x000000ab, 14349 }, /* guillemotleft */ - { 0x000000bb, 14363 }, /* guillemotright */ - { 0x00000048, 14378 }, /* H */ - { 0x00000068, 14380 }, /* h */ - { 0x00000aa8, 14382 }, /* hairspace */ - { 0x0000ff31, 14392 }, /* Hangul */ - { 0x00000ebf, 14399 }, /* Hangul_A */ - { 0x00000ec0, 14408 }, /* Hangul_AE */ - { 0x00000ef6, 14418 }, /* Hangul_AraeA */ - { 0x00000ef7, 14431 }, /* Hangul_AraeAE */ - { 0x0000ff39, 14445 }, /* Hangul_Banja */ - { 0x00000eba, 14458 }, /* Hangul_Cieuc */ - { 0x0000ff37, 14471 }, /* Hangul_Codeinput */ - { 0x00000ea7, 14488 }, /* Hangul_Dikeud */ - { 0x00000ec4, 14502 }, /* Hangul_E */ - { 0x0000ff33, 14511 }, /* Hangul_End */ - { 0x00000ec3, 14522 }, /* Hangul_EO */ - { 0x00000ed1, 14532 }, /* Hangul_EU */ - { 0x0000ff34, 14542 }, /* Hangul_Hanja */ - { 0x00000ebe, 14555 }, /* Hangul_Hieuh */ - { 0x00000ed3, 14568 }, /* Hangul_I */ - { 0x00000eb7, 14577 }, /* Hangul_Ieung */ - { 0x00000eea, 14590 }, /* Hangul_J_Cieuc */ - { 0x00000eda, 14605 }, /* Hangul_J_Dikeud */ - { 0x00000eee, 14621 }, /* Hangul_J_Hieuh */ - { 0x00000ee8, 14636 }, /* Hangul_J_Ieung */ - { 0x00000ee9, 14651 }, /* Hangul_J_Jieuj */ - { 0x00000eeb, 14666 }, /* Hangul_J_Khieuq */ - { 0x00000ed4, 14682 }, /* Hangul_J_Kiyeog */ - { 0x00000ed6, 14698 }, /* Hangul_J_KiyeogSios */ - { 0x00000ef9, 14718 }, /* Hangul_J_KkogjiDalrinIeung */ - { 0x00000ee3, 14745 }, /* Hangul_J_Mieum */ - { 0x00000ed7, 14760 }, /* Hangul_J_Nieun */ - { 0x00000ed9, 14775 }, /* Hangul_J_NieunHieuh */ - { 0x00000ed8, 14795 }, /* Hangul_J_NieunJieuj */ - { 0x00000ef8, 14815 }, /* Hangul_J_PanSios */ - { 0x00000eed, 14832 }, /* Hangul_J_Phieuf */ - { 0x00000ee4, 14848 }, /* Hangul_J_Pieub */ - { 0x00000ee5, 14863 }, /* Hangul_J_PieubSios */ - { 0x00000edb, 14882 }, /* Hangul_J_Rieul */ - { 0x00000ee2, 14897 }, /* Hangul_J_RieulHieuh */ - { 0x00000edc, 14917 }, /* Hangul_J_RieulKiyeog */ - { 0x00000edd, 14938 }, /* Hangul_J_RieulMieum */ - { 0x00000ee1, 14958 }, /* Hangul_J_RieulPhieuf */ - { 0x00000ede, 14979 }, /* Hangul_J_RieulPieub */ - { 0x00000edf, 14999 }, /* Hangul_J_RieulSios */ - { 0x00000ee0, 15018 }, /* Hangul_J_RieulTieut */ - { 0x00000ee6, 15038 }, /* Hangul_J_Sios */ - { 0x00000ed5, 15052 }, /* Hangul_J_SsangKiyeog */ - { 0x00000ee7, 15073 }, /* Hangul_J_SsangSios */ - { 0x00000eec, 15092 }, /* Hangul_J_Tieut */ - { 0x00000efa, 15107 }, /* Hangul_J_YeorinHieuh */ - { 0x0000ff35, 15128 }, /* Hangul_Jamo */ - { 0x0000ff38, 15140 }, /* Hangul_Jeonja */ - { 0x00000eb8, 15154 }, /* Hangul_Jieuj */ - { 0x00000ebb, 15167 }, /* Hangul_Khieuq */ - { 0x00000ea1, 15181 }, /* Hangul_Kiyeog */ - { 0x00000ea3, 15195 }, /* Hangul_KiyeogSios */ - { 0x00000ef3, 15213 }, /* Hangul_KkogjiDalrinIeung */ - { 0x00000eb1, 15238 }, /* Hangul_Mieum */ - { 0x0000ff3d, 15251 }, /* Hangul_MultipleCandidate */ - { 0x00000ea4, 15276 }, /* Hangul_Nieun */ - { 0x00000ea6, 15289 }, /* Hangul_NieunHieuh */ - { 0x00000ea5, 15307 }, /* Hangul_NieunJieuj */ - { 0x00000ec7, 15325 }, /* Hangul_O */ - { 0x00000eca, 15334 }, /* Hangul_OE */ - { 0x00000ef2, 15344 }, /* Hangul_PanSios */ - { 0x00000ebd, 15359 }, /* Hangul_Phieuf */ - { 0x00000eb2, 15373 }, /* Hangul_Pieub */ - { 0x00000eb4, 15386 }, /* Hangul_PieubSios */ - { 0x0000ff3b, 15403 }, /* Hangul_PostHanja */ - { 0x0000ff3a, 15420 }, /* Hangul_PreHanja */ - { 0x0000ff3e, 15436 }, /* Hangul_PreviousCandidate */ - { 0x00000ea9, 15461 }, /* Hangul_Rieul */ - { 0x00000eb0, 15474 }, /* Hangul_RieulHieuh */ - { 0x00000eaa, 15492 }, /* Hangul_RieulKiyeog */ - { 0x00000eab, 15511 }, /* Hangul_RieulMieum */ - { 0x00000eaf, 15529 }, /* Hangul_RieulPhieuf */ - { 0x00000eac, 15548 }, /* Hangul_RieulPieub */ - { 0x00000ead, 15566 }, /* Hangul_RieulSios */ - { 0x00000eae, 15583 }, /* Hangul_RieulTieut */ - { 0x00000eef, 15601 }, /* Hangul_RieulYeorinHieuh */ - { 0x0000ff36, 15625 }, /* Hangul_Romaja */ - { 0x0000ff3c, 15639 }, /* Hangul_SingleCandidate */ - { 0x00000eb5, 15662 }, /* Hangul_Sios */ - { 0x0000ff3f, 15674 }, /* Hangul_Special */ - { 0x00000ea8, 15689 }, /* Hangul_SsangDikeud */ - { 0x00000eb9, 15708 }, /* Hangul_SsangJieuj */ - { 0x00000ea2, 15726 }, /* Hangul_SsangKiyeog */ - { 0x00000eb3, 15745 }, /* Hangul_SsangPieub */ - { 0x00000eb6, 15763 }, /* Hangul_SsangSios */ - { 0x0000ff32, 15780 }, /* Hangul_Start */ - { 0x00000ef0, 15793 }, /* Hangul_SunkyeongeumMieum */ - { 0x00000ef4, 15818 }, /* Hangul_SunkyeongeumPhieuf */ - { 0x00000ef1, 15844 }, /* Hangul_SunkyeongeumPieub */ - { 0x0000ff7e, 15869 }, /* Hangul_switch */ - { 0x00000ebc, 15883 }, /* Hangul_Tieut */ - { 0x00000ecc, 15896 }, /* Hangul_U */ - { 0x00000ec8, 15905 }, /* Hangul_WA */ - { 0x00000ec9, 15915 }, /* Hangul_WAE */ - { 0x00000ece, 15926 }, /* Hangul_WE */ - { 0x00000ecd, 15936 }, /* Hangul_WEO */ - { 0x00000ecf, 15947 }, /* Hangul_WI */ - { 0x00000ec1, 15957 }, /* Hangul_YA */ - { 0x00000ec2, 15967 }, /* Hangul_YAE */ - { 0x00000ec6, 15978 }, /* Hangul_YE */ - { 0x00000ec5, 15988 }, /* Hangul_YEO */ - { 0x00000ef5, 15999 }, /* Hangul_YeorinHieuh */ - { 0x00000ed2, 16018 }, /* Hangul_YI */ - { 0x00000ecb, 16028 }, /* Hangul_YO */ - { 0x00000ed0, 16038 }, /* Hangul_YU */ - { 0x0000ff29, 16048 }, /* Hankaku */ - { 0x000002a6, 16056 }, /* Hcircumflex */ - { 0x000002b6, 16068 }, /* hcircumflex */ - { 0x00000aee, 16080 }, /* heart */ - { 0x00000ce0, 16086 }, /* hebrew_aleph */ - { 0x00000cf2, 16099 }, /* hebrew_ayin */ - { 0x00000ce1, 16111 }, /* hebrew_bet */ - { 0x00000ce1, 16122 }, /* hebrew_beth */ - { 0x00000ce7, 16134 }, /* hebrew_chet */ - { 0x00000ce3, 16146 }, /* hebrew_dalet */ - { 0x00000ce3, 16159 }, /* hebrew_daleth */ - { 0x00000cdf, 16173 }, /* hebrew_doublelowline */ - { 0x00000cea, 16194 }, /* hebrew_finalkaph */ - { 0x00000ced, 16211 }, /* hebrew_finalmem */ - { 0x00000cef, 16227 }, /* hebrew_finalnun */ - { 0x00000cf3, 16243 }, /* hebrew_finalpe */ - { 0x00000cf5, 16258 }, /* hebrew_finalzade */ - { 0x00000cf5, 16275 }, /* hebrew_finalzadi */ - { 0x00000ce2, 16292 }, /* hebrew_gimel */ - { 0x00000ce2, 16305 }, /* hebrew_gimmel */ - { 0x00000ce4, 16319 }, /* hebrew_he */ - { 0x00000ce7, 16329 }, /* hebrew_het */ - { 0x00000ceb, 16340 }, /* hebrew_kaph */ - { 0x00000cf7, 16352 }, /* hebrew_kuf */ - { 0x00000cec, 16363 }, /* hebrew_lamed */ - { 0x00000cee, 16376 }, /* hebrew_mem */ - { 0x00000cf0, 16387 }, /* hebrew_nun */ - { 0x00000cf4, 16398 }, /* hebrew_pe */ - { 0x00000cf7, 16408 }, /* hebrew_qoph */ - { 0x00000cf8, 16420 }, /* hebrew_resh */ - { 0x00000cf1, 16432 }, /* hebrew_samech */ - { 0x00000cf1, 16446 }, /* hebrew_samekh */ - { 0x00000cf9, 16460 }, /* hebrew_shin */ - { 0x0000ff7e, 16472 }, /* Hebrew_switch */ - { 0x00000cfa, 16486 }, /* hebrew_taf */ - { 0x00000cfa, 16497 }, /* hebrew_taw */ - { 0x00000ce8, 16508 }, /* hebrew_tet */ - { 0x00000ce8, 16519 }, /* hebrew_teth */ - { 0x00000ce5, 16531 }, /* hebrew_waw */ - { 0x00000ce9, 16542 }, /* hebrew_yod */ - { 0x00000cf6, 16553 }, /* hebrew_zade */ - { 0x00000cf6, 16565 }, /* hebrew_zadi */ - { 0x00000ce6, 16577 }, /* hebrew_zain */ - { 0x00000ce6, 16589 }, /* hebrew_zayin */ - { 0x0000ff6a, 16602 }, /* Help */ - { 0x0000ff23, 16607 }, /* Henkan */ - { 0x0000ff23, 16614 }, /* Henkan_Mode */ - { 0x00000ada, 16626 }, /* hexagram */ - { 0x0000ff25, 16635 }, /* Hiragana */ - { 0x0000ff27, 16644 }, /* Hiragana_Katakana */ - { 0x0000ff50, 16662 }, /* Home */ - { 0x000008a3, 16667 }, /* horizconnector */ - { 0x000009ef, 16682 }, /* horizlinescan1 */ - { 0x000009f0, 16697 }, /* horizlinescan3 */ - { 0x000009f1, 16712 }, /* horizlinescan5 */ - { 0x000009f2, 16727 }, /* horizlinescan7 */ - { 0x000009f3, 16742 }, /* horizlinescan9 */ - { 0x1000ff74, 16757 }, /* hpBackTab */ - { 0x100000fc, 16767 }, /* hpblock */ - { 0x1000ff6f, 16775 }, /* hpClearLine */ - { 0x1000ff73, 16787 }, /* hpDeleteChar */ - { 0x1000ff71, 16800 }, /* hpDeleteLine */ - { 0x100000be, 16813 }, /* hpguilder */ - { 0x1000ff72, 16823 }, /* hpInsertChar */ - { 0x1000ff70, 16836 }, /* hpInsertLine */ - { 0x100000ee, 16849 }, /* hpIO */ - { 0x1000ff75, 16854 }, /* hpKP_BackTab */ - { 0x100000af, 16867 }, /* hplira */ - { 0x100000f6, 16874 }, /* hplongminus */ - { 0x1000ff48, 16886 }, /* hpModelock1 */ - { 0x1000ff49, 16898 }, /* hpModelock2 */ - { 0x100000a8, 16910 }, /* hpmute_acute */ - { 0x100000aa, 16923 }, /* hpmute_asciicircum */ - { 0x100000ac, 16942 }, /* hpmute_asciitilde */ - { 0x100000ab, 16960 }, /* hpmute_diaeresis */ - { 0x100000a9, 16977 }, /* hpmute_grave */ - { 0x1000ff6c, 16990 }, /* hpReset */ - { 0x1000ff6d, 16998 }, /* hpSystem */ - { 0x1000ff6e, 17007 }, /* hpUser */ - { 0x100000ee, 17014 }, /* hpYdiaeresis */ - { 0x000002a1, 17027 }, /* Hstroke */ - { 0x000002b1, 17035 }, /* hstroke */ - { 0x000009e2, 17043 }, /* ht */ - { 0x0000ffed, 17046 }, /* Hyper_L */ - { 0x0000ffee, 17054 }, /* Hyper_R */ - { 0x000000ad, 17062 }, /* hyphen */ - { 0x00000049, 17069 }, /* I */ - { 0x00000069, 17071 }, /* i */ - { 0x000002a9, 17073 }, /* Iabovedot */ - { 0x000000cd, 17083 }, /* Iacute */ - { 0x000000ed, 17090 }, /* iacute */ - { 0x01001eca, 17097 }, /* Ibelowdot */ - { 0x01001ecb, 17107 }, /* ibelowdot */ - { 0x0100012c, 17117 }, /* Ibreve */ - { 0x0100012d, 17124 }, /* ibreve */ - { 0x000000ce, 17131 }, /* Icircumflex */ - { 0x000000ee, 17143 }, /* icircumflex */ - { 0x000008cf, 17155 }, /* identical */ - { 0x000000cf, 17165 }, /* Idiaeresis */ - { 0x000000ef, 17176 }, /* idiaeresis */ - { 0x000002b9, 17187 }, /* idotless */ - { 0x000008cd, 17196 }, /* ifonlyif */ - { 0x000000cc, 17205 }, /* Igrave */ - { 0x000000ec, 17212 }, /* igrave */ - { 0x01001ec8, 17219 }, /* Ihook */ - { 0x01001ec9, 17225 }, /* ihook */ - { 0x000003cf, 17231 }, /* Imacron */ - { 0x000003ef, 17239 }, /* imacron */ - { 0x000008ce, 17247 }, /* implies */ - { 0x000008da, 17255 }, /* includedin */ - { 0x000008db, 17266 }, /* includes */ - { 0x000008c2, 17275 }, /* infinity */ - { 0x0000ff63, 17284 }, /* Insert */ - { 0x1000ff72, 17291 }, /* InsertChar */ - { 0x1000ff70, 17302 }, /* InsertLine */ - { 0x000008bf, 17313 }, /* integral */ - { 0x000008dc, 17322 }, /* intersection */ - { 0x100000ee, 17335 }, /* IO */ - { 0x000003c7, 17338 }, /* Iogonek */ - { 0x000003e7, 17346 }, /* iogonek */ - { 0x0000fe33, 17354 }, /* ISO_Center_Object */ - { 0x0000fe30, 17372 }, /* ISO_Continuous_Underline */ - { 0x0000fe31, 17397 }, /* ISO_Discontinuous_Underline */ - { 0x0000fe32, 17425 }, /* ISO_Emphasize */ - { 0x0000fe34, 17439 }, /* ISO_Enter */ - { 0x0000fe2f, 17449 }, /* ISO_Fast_Cursor_Down */ - { 0x0000fe2c, 17470 }, /* ISO_Fast_Cursor_Left */ - { 0x0000fe2d, 17491 }, /* ISO_Fast_Cursor_Right */ - { 0x0000fe2e, 17513 }, /* ISO_Fast_Cursor_Up */ - { 0x0000fe0c, 17532 }, /* ISO_First_Group */ - { 0x0000fe0d, 17548 }, /* ISO_First_Group_Lock */ - { 0x0000fe06, 17569 }, /* ISO_Group_Latch */ - { 0x0000fe07, 17585 }, /* ISO_Group_Lock */ - { 0x0000ff7e, 17600 }, /* ISO_Group_Shift */ - { 0x0000fe0e, 17616 }, /* ISO_Last_Group */ - { 0x0000fe0f, 17631 }, /* ISO_Last_Group_Lock */ - { 0x0000fe20, 17651 }, /* ISO_Left_Tab */ - { 0x0000fe02, 17664 }, /* ISO_Level2_Latch */ - { 0x0000fe04, 17681 }, /* ISO_Level3_Latch */ - { 0x0000fe05, 17698 }, /* ISO_Level3_Lock */ - { 0x0000fe03, 17714 }, /* ISO_Level3_Shift */ - { 0x0000fe12, 17731 }, /* ISO_Level5_Latch */ - { 0x0000fe13, 17748 }, /* ISO_Level5_Lock */ - { 0x0000fe11, 17764 }, /* ISO_Level5_Shift */ - { 0x0000fe01, 17781 }, /* ISO_Lock */ - { 0x0000fe22, 17790 }, /* ISO_Move_Line_Down */ - { 0x0000fe21, 17809 }, /* ISO_Move_Line_Up */ - { 0x0000fe08, 17826 }, /* ISO_Next_Group */ - { 0x0000fe09, 17841 }, /* ISO_Next_Group_Lock */ - { 0x0000fe24, 17861 }, /* ISO_Partial_Line_Down */ - { 0x0000fe23, 17883 }, /* ISO_Partial_Line_Up */ - { 0x0000fe25, 17903 }, /* ISO_Partial_Space_Left */ - { 0x0000fe26, 17926 }, /* ISO_Partial_Space_Right */ - { 0x0000fe0a, 17950 }, /* ISO_Prev_Group */ - { 0x0000fe0b, 17965 }, /* ISO_Prev_Group_Lock */ - { 0x0000fe2b, 17985 }, /* ISO_Release_Both_Margins */ - { 0x0000fe29, 18010 }, /* ISO_Release_Margin_Left */ - { 0x0000fe2a, 18034 }, /* ISO_Release_Margin_Right */ - { 0x0000fe27, 18059 }, /* ISO_Set_Margin_Left */ - { 0x0000fe28, 18079 }, /* ISO_Set_Margin_Right */ - { 0x000003a5, 18100 }, /* Itilde */ - { 0x000003b5, 18107 }, /* itilde */ - { 0x0000004a, 18114 }, /* J */ - { 0x0000006a, 18116 }, /* j */ - { 0x000002ac, 18118 }, /* Jcircumflex */ - { 0x000002bc, 18130 }, /* jcircumflex */ - { 0x00000bca, 18142 }, /* jot */ - { 0x0000004b, 18146 }, /* K */ - { 0x0000006b, 18148 }, /* k */ - { 0x000004a7, 18150 }, /* kana_a */ - { 0x000004b1, 18157 }, /* kana_A */ - { 0x000004c1, 18164 }, /* kana_CHI */ - { 0x000004a3, 18173 }, /* kana_closingbracket */ - { 0x000004a4, 18193 }, /* kana_comma */ - { 0x000004a5, 18204 }, /* kana_conjunctive */ - { 0x000004aa, 18221 }, /* kana_e */ - { 0x000004b4, 18228 }, /* kana_E */ - { 0x000004cc, 18235 }, /* kana_FU */ - { 0x000004a1, 18243 }, /* kana_fullstop */ - { 0x000004ca, 18257 }, /* kana_HA */ - { 0x000004cd, 18265 }, /* kana_HE */ - { 0x000004cb, 18273 }, /* kana_HI */ - { 0x000004ce, 18281 }, /* kana_HO */ - { 0x000004cc, 18289 }, /* kana_HU */ - { 0x000004a8, 18297 }, /* kana_i */ - { 0x000004b2, 18304 }, /* kana_I */ - { 0x000004b6, 18311 }, /* kana_KA */ - { 0x000004b9, 18319 }, /* kana_KE */ - { 0x000004b7, 18327 }, /* kana_KI */ - { 0x000004ba, 18335 }, /* kana_KO */ - { 0x000004b8, 18343 }, /* kana_KU */ - { 0x0000ff2d, 18351 }, /* Kana_Lock */ - { 0x000004cf, 18361 }, /* kana_MA */ - { 0x000004d2, 18369 }, /* kana_ME */ - { 0x000004d0, 18377 }, /* kana_MI */ - { 0x000004a5, 18385 }, /* kana_middledot */ - { 0x000004d3, 18400 }, /* kana_MO */ - { 0x000004d1, 18408 }, /* kana_MU */ - { 0x000004dd, 18416 }, /* kana_N */ - { 0x000004c5, 18423 }, /* kana_NA */ - { 0x000004c8, 18431 }, /* kana_NE */ - { 0x000004c6, 18439 }, /* kana_NI */ - { 0x000004c9, 18447 }, /* kana_NO */ - { 0x000004c7, 18455 }, /* kana_NU */ - { 0x000004ab, 18463 }, /* kana_o */ - { 0x000004b5, 18470 }, /* kana_O */ - { 0x000004a2, 18477 }, /* kana_openingbracket */ - { 0x000004d7, 18497 }, /* kana_RA */ - { 0x000004da, 18505 }, /* kana_RE */ - { 0x000004d8, 18513 }, /* kana_RI */ - { 0x000004db, 18521 }, /* kana_RO */ - { 0x000004d9, 18529 }, /* kana_RU */ - { 0x000004bb, 18537 }, /* kana_SA */ - { 0x000004be, 18545 }, /* kana_SE */ - { 0x000004bc, 18553 }, /* kana_SHI */ - { 0x0000ff2e, 18562 }, /* Kana_Shift */ - { 0x000004bf, 18573 }, /* kana_SO */ - { 0x000004bd, 18581 }, /* kana_SU */ - { 0x0000ff7e, 18589 }, /* kana_switch */ - { 0x000004c0, 18601 }, /* kana_TA */ - { 0x000004c3, 18609 }, /* kana_TE */ - { 0x000004c1, 18617 }, /* kana_TI */ - { 0x000004c4, 18625 }, /* kana_TO */ - { 0x000004af, 18633 }, /* kana_tsu */ - { 0x000004c2, 18642 }, /* kana_TSU */ - { 0x000004af, 18651 }, /* kana_tu */ - { 0x000004c2, 18659 }, /* kana_TU */ - { 0x000004a9, 18667 }, /* kana_u */ - { 0x000004b3, 18674 }, /* kana_U */ - { 0x000004dc, 18681 }, /* kana_WA */ - { 0x000004a6, 18689 }, /* kana_WO */ - { 0x000004ac, 18697 }, /* kana_ya */ - { 0x000004d4, 18705 }, /* kana_YA */ - { 0x000004ae, 18713 }, /* kana_yo */ - { 0x000004d6, 18721 }, /* kana_YO */ - { 0x000004ad, 18729 }, /* kana_yu */ - { 0x000004d5, 18737 }, /* kana_YU */ - { 0x0000ff21, 18745 }, /* Kanji */ - { 0x0000ff37, 18751 }, /* Kanji_Bangou */ - { 0x000003a2, 18764 }, /* kappa */ - { 0x0000ff26, 18770 }, /* Katakana */ - { 0x000003d3, 18779 }, /* Kcedilla */ - { 0x000003f3, 18788 }, /* kcedilla */ - { 0x00000eff, 18797 }, /* Korean_Won */ - { 0x0000ffb0, 18808 }, /* KP_0 */ - { 0x0000ffb1, 18813 }, /* KP_1 */ - { 0x0000ffb2, 18818 }, /* KP_2 */ - { 0x0000ffb3, 18823 }, /* KP_3 */ - { 0x0000ffb4, 18828 }, /* KP_4 */ - { 0x0000ffb5, 18833 }, /* KP_5 */ - { 0x0000ffb6, 18838 }, /* KP_6 */ - { 0x0000ffb7, 18843 }, /* KP_7 */ - { 0x0000ffb8, 18848 }, /* KP_8 */ - { 0x0000ffb9, 18853 }, /* KP_9 */ - { 0x0000ffab, 18858 }, /* KP_Add */ - { 0x1000ff75, 18865 }, /* KP_BackTab */ - { 0x0000ff9d, 18876 }, /* KP_Begin */ - { 0x0000ffae, 18885 }, /* KP_Decimal */ - { 0x0000ff9f, 18896 }, /* KP_Delete */ - { 0x0000ffaf, 18906 }, /* KP_Divide */ - { 0x0000ff99, 18916 }, /* KP_Down */ - { 0x0000ff9c, 18924 }, /* KP_End */ - { 0x0000ff8d, 18931 }, /* KP_Enter */ - { 0x0000ffbd, 18940 }, /* KP_Equal */ - { 0x0000ff91, 18949 }, /* KP_F1 */ - { 0x0000ff92, 18955 }, /* KP_F2 */ - { 0x0000ff93, 18961 }, /* KP_F3 */ - { 0x0000ff94, 18967 }, /* KP_F4 */ - { 0x0000ff95, 18973 }, /* KP_Home */ - { 0x0000ff9e, 18981 }, /* KP_Insert */ - { 0x0000ff96, 18991 }, /* KP_Left */ - { 0x0000ffaa, 18999 }, /* KP_Multiply */ - { 0x0000ff9b, 19011 }, /* KP_Next */ - { 0x0000ff9b, 19019 }, /* KP_Page_Down */ - { 0x0000ff9a, 19032 }, /* KP_Page_Up */ - { 0x0000ff9a, 19043 }, /* KP_Prior */ - { 0x0000ff98, 19052 }, /* KP_Right */ - { 0x0000ffac, 19061 }, /* KP_Separator */ - { 0x0000ff80, 19074 }, /* KP_Space */ - { 0x0000ffad, 19083 }, /* KP_Subtract */ - { 0x0000ff89, 19095 }, /* KP_Tab */ - { 0x0000ff97, 19102 }, /* KP_Up */ - { 0x000003a2, 19108 }, /* kra */ - { 0x0000004c, 19112 }, /* L */ - { 0x0000006c, 19114 }, /* l */ - { 0x0000ffc8, 19116 }, /* L1 */ - { 0x0000ffd1, 19119 }, /* L10 */ - { 0x0000ffc9, 19123 }, /* L2 */ - { 0x0000ffca, 19126 }, /* L3 */ - { 0x0000ffcb, 19129 }, /* L4 */ - { 0x0000ffcc, 19132 }, /* L5 */ - { 0x0000ffcd, 19135 }, /* L6 */ - { 0x0000ffce, 19138 }, /* L7 */ - { 0x0000ffcf, 19141 }, /* L8 */ - { 0x0000ffd0, 19144 }, /* L9 */ - { 0x000001c5, 19147 }, /* Lacute */ - { 0x000001e5, 19154 }, /* lacute */ - { 0x0000fed4, 19161 }, /* Last_Virtual_Screen */ - { 0x00000ad9, 19181 }, /* latincross */ - { 0x01001e36, 19192 }, /* Lbelowdot */ - { 0x01001e37, 19202 }, /* lbelowdot */ - { 0x000001a5, 19212 }, /* Lcaron */ - { 0x000001b5, 19219 }, /* lcaron */ - { 0x000003a6, 19226 }, /* Lcedilla */ - { 0x000003b6, 19235 }, /* lcedilla */ - { 0x0000ff51, 19244 }, /* Left */ - { 0x00000abc, 19249 }, /* leftanglebracket */ - { 0x000008fb, 19266 }, /* leftarrow */ - { 0x00000ba3, 19276 }, /* leftcaret */ - { 0x00000ad2, 19286 }, /* leftdoublequotemark */ - { 0x000008af, 19306 }, /* leftmiddlecurlybrace */ - { 0x00000acc, 19327 }, /* leftopentriangle */ - { 0x00000aea, 19344 }, /* leftpointer */ - { 0x000008a1, 19356 }, /* leftradical */ - { 0x00000bda, 19368 }, /* leftshoe */ - { 0x00000ad0, 19377 }, /* leftsinglequotemark */ - { 0x000009f4, 19397 }, /* leftt */ - { 0x00000bdc, 19403 }, /* lefttack */ - { 0x0000003c, 19412 }, /* less */ - { 0x000008bc, 19417 }, /* lessthanequal */ - { 0x000009e5, 19431 }, /* lf */ - { 0x0000ff0a, 19434 }, /* Linefeed */ - { 0x100000af, 19443 }, /* lira */ - { 0x010020a4, 19448 }, /* LiraSign */ - { 0x000008de, 19457 }, /* logicaland */ - { 0x000008df, 19468 }, /* logicalor */ - { 0x100000f6, 19478 }, /* longminus */ - { 0x000009ed, 19488 }, /* lowleftcorner */ - { 0x000009ea, 19502 }, /* lowrightcorner */ - { 0x000001a3, 19517 }, /* Lstroke */ - { 0x000001b3, 19525 }, /* lstroke */ - { 0x0000004d, 19533 }, /* M */ - { 0x0000006d, 19535 }, /* m */ - { 0x01001e40, 19537 }, /* Mabovedot */ - { 0x01001e41, 19547 }, /* mabovedot */ - { 0x000006a5, 19557 }, /* Macedonia_dse */ - { 0x000006b5, 19571 }, /* Macedonia_DSE */ - { 0x000006a2, 19585 }, /* Macedonia_gje */ - { 0x000006b2, 19599 }, /* Macedonia_GJE */ - { 0x000006ac, 19613 }, /* Macedonia_kje */ - { 0x000006bc, 19627 }, /* Macedonia_KJE */ - { 0x000000af, 19641 }, /* macron */ - { 0x0000ff3e, 19648 }, /* Mae_Koho */ - { 0x00000af7, 19657 }, /* malesymbol */ - { 0x00000af0, 19668 }, /* maltesecross */ - { 0x00000abf, 19681 }, /* marker */ - { 0x000000ba, 19688 }, /* masculine */ - { 0x0000ff2c, 19698 }, /* Massyo */ - { 0x0000ff67, 19705 }, /* Menu */ - { 0x0000ffe7, 19710 }, /* Meta_L */ - { 0x0000ffe8, 19717 }, /* Meta_R */ - { 0x010020a5, 19724 }, /* MillSign */ - { 0x0000002d, 19733 }, /* minus */ - { 0x00000ad6, 19739 }, /* minutes */ - { 0x0000ff7e, 19747 }, /* Mode_switch */ - { 0x0000fe77, 19759 }, /* MouseKeys_Accel_Enable */ - { 0x0000fe76, 19782 }, /* MouseKeys_Enable */ - { 0x000000b5, 19799 }, /* mu */ - { 0x0000ff22, 19802 }, /* Muhenkan */ - { 0x0000ff20, 19811 }, /* Multi_key */ - { 0x0000ff3d, 19821 }, /* MultipleCandidate */ - { 0x000000d7, 19839 }, /* multiply */ - { 0x00000af6, 19848 }, /* musicalflat */ - { 0x00000af5, 19860 }, /* musicalsharp */ - { 0x100000a8, 19873 }, /* mute_acute */ - { 0x100000aa, 19884 }, /* mute_asciicircum */ - { 0x100000ac, 19901 }, /* mute_asciitilde */ - { 0x100000ab, 19917 }, /* mute_diaeresis */ - { 0x100000a9, 19932 }, /* mute_grave */ - { 0x0000004e, 19943 }, /* N */ - { 0x0000006e, 19945 }, /* n */ - { 0x000008c5, 19947 }, /* nabla */ - { 0x000001d1, 19953 }, /* Nacute */ - { 0x000001f1, 19960 }, /* nacute */ - { 0x010020a6, 19967 }, /* NairaSign */ - { 0x000001d2, 19977 }, /* Ncaron */ - { 0x000001f2, 19984 }, /* ncaron */ - { 0x000003d1, 19991 }, /* Ncedilla */ - { 0x000003f1, 20000 }, /* ncedilla */ - { 0x010020aa, 20009 }, /* NewSheqelSign */ - { 0x0000ff56, 20023 }, /* Next */ - { 0x0000fed2, 20028 }, /* Next_Virtual_Screen */ - { 0x01002089, 20048 }, /* ninesubscript */ - { 0x01002079, 20062 }, /* ninesuperior */ - { 0x000009e8, 20075 }, /* nl */ - { 0x000000a0, 20078 }, /* nobreakspace */ - { 0x00000000, 20091 }, /* NoSymbol */ - { 0x01002247, 20100 }, /* notapproxeq */ - { 0x01002209, 20112 }, /* notelementof */ - { 0x000008bd, 20125 }, /* notequal */ - { 0x01002262, 20134 }, /* notidentical */ - { 0x000000ac, 20147 }, /* notsign */ - { 0x000000d1, 20155 }, /* Ntilde */ - { 0x000000f1, 20162 }, /* ntilde */ - { 0x0000ff7f, 20169 }, /* Num_Lock */ - { 0x00000023, 20178 }, /* numbersign */ - { 0x000006b0, 20189 }, /* numerosign */ - { 0x0000004f, 20200 }, /* O */ - { 0x0000006f, 20202 }, /* o */ - { 0x000000d3, 20204 }, /* Oacute */ - { 0x000000f3, 20211 }, /* oacute */ - { 0x0100019f, 20218 }, /* Obarred */ - { 0x01000275, 20226 }, /* obarred */ - { 0x01001ecc, 20234 }, /* Obelowdot */ - { 0x01001ecd, 20244 }, /* obelowdot */ - { 0x010001d1, 20254 }, /* Ocaron */ - { 0x010001d2, 20261 }, /* ocaron */ - { 0x000000d4, 20268 }, /* Ocircumflex */ - { 0x000000f4, 20280 }, /* ocircumflex */ - { 0x01001ed0, 20292 }, /* Ocircumflexacute */ - { 0x01001ed1, 20309 }, /* ocircumflexacute */ - { 0x01001ed8, 20326 }, /* Ocircumflexbelowdot */ - { 0x01001ed9, 20346 }, /* ocircumflexbelowdot */ - { 0x01001ed2, 20366 }, /* Ocircumflexgrave */ - { 0x01001ed3, 20383 }, /* ocircumflexgrave */ - { 0x01001ed4, 20400 }, /* Ocircumflexhook */ - { 0x01001ed5, 20416 }, /* ocircumflexhook */ - { 0x01001ed6, 20432 }, /* Ocircumflextilde */ - { 0x01001ed7, 20449 }, /* ocircumflextilde */ - { 0x000000d6, 20466 }, /* Odiaeresis */ - { 0x000000f6, 20477 }, /* odiaeresis */ - { 0x000001d5, 20488 }, /* Odoubleacute */ - { 0x000001f5, 20501 }, /* odoubleacute */ - { 0x000013bc, 20514 }, /* OE */ - { 0x000013bd, 20517 }, /* oe */ - { 0x000001b2, 20520 }, /* ogonek */ - { 0x000000d2, 20527 }, /* Ograve */ - { 0x000000f2, 20534 }, /* ograve */ - { 0x01001ece, 20541 }, /* Ohook */ - { 0x01001ecf, 20547 }, /* ohook */ - { 0x010001a0, 20553 }, /* Ohorn */ - { 0x010001a1, 20559 }, /* ohorn */ - { 0x01001eda, 20565 }, /* Ohornacute */ - { 0x01001edb, 20576 }, /* ohornacute */ - { 0x01001ee2, 20587 }, /* Ohornbelowdot */ - { 0x01001ee3, 20601 }, /* ohornbelowdot */ - { 0x01001edc, 20615 }, /* Ohorngrave */ - { 0x01001edd, 20626 }, /* ohorngrave */ - { 0x01001ede, 20637 }, /* Ohornhook */ - { 0x01001edf, 20647 }, /* ohornhook */ - { 0x01001ee0, 20657 }, /* Ohorntilde */ - { 0x01001ee1, 20668 }, /* ohorntilde */ - { 0x000003d2, 20679 }, /* Omacron */ - { 0x000003f2, 20687 }, /* omacron */ - { 0x00000ac3, 20695 }, /* oneeighth */ - { 0x00000ab2, 20705 }, /* onefifth */ - { 0x000000bd, 20714 }, /* onehalf */ - { 0x000000bc, 20722 }, /* onequarter */ - { 0x00000ab6, 20733 }, /* onesixth */ - { 0x01002081, 20742 }, /* onesubscript */ - { 0x000000b9, 20755 }, /* onesuperior */ - { 0x00000ab0, 20767 }, /* onethird */ - { 0x000000d8, 20776 }, /* Ooblique */ - { 0x000000f8, 20785 }, /* ooblique */ - { 0x00000ae2, 20794 }, /* openrectbullet */ - { 0x00000ae5, 20809 }, /* openstar */ - { 0x00000ae4, 20818 }, /* opentribulletdown */ - { 0x00000ae3, 20836 }, /* opentribulletup */ - { 0x000000aa, 20852 }, /* ordfeminine */ - { 0x1004ff44, 20864 }, /* osfActivate */ - { 0x1004ff31, 20876 }, /* osfAddMode */ - { 0x1004ff08, 20887 }, /* osfBackSpace */ - { 0x1004ff07, 20900 }, /* osfBackTab */ - { 0x1004ff5a, 20911 }, /* osfBeginData */ - { 0x1004ff58, 20924 }, /* osfBeginLine */ - { 0x1004ff69, 20937 }, /* osfCancel */ - { 0x1004ff0b, 20947 }, /* osfClear */ - { 0x1004ff02, 20956 }, /* osfCopy */ - { 0x1004ff03, 20964 }, /* osfCut */ - { 0x1004ffff, 20971 }, /* osfDelete */ - { 0x1004ff72, 20981 }, /* osfDeselectAll */ - { 0x1004ff54, 20996 }, /* osfDown */ - { 0x1004ff59, 21004 }, /* osfEndData */ - { 0x1004ff57, 21015 }, /* osfEndLine */ - { 0x1004ff1b, 21026 }, /* osfEscape */ - { 0x1004ff74, 21036 }, /* osfExtend */ - { 0x1004ff6a, 21046 }, /* osfHelp */ - { 0x1004ff63, 21054 }, /* osfInsert */ - { 0x1004ff51, 21064 }, /* osfLeft */ - { 0x1004ff67, 21072 }, /* osfMenu */ - { 0x1004ff45, 21080 }, /* osfMenuBar */ - { 0x1004ff5e, 21091 }, /* osfNextField */ - { 0x1004ff5c, 21104 }, /* osfNextMenu */ - { 0x1004ff42, 21116 }, /* osfPageDown */ - { 0x1004ff40, 21128 }, /* osfPageLeft */ - { 0x1004ff43, 21140 }, /* osfPageRight */ - { 0x1004ff41, 21153 }, /* osfPageUp */ - { 0x1004ff04, 21163 }, /* osfPaste */ - { 0x1004ff5d, 21172 }, /* osfPrevField */ - { 0x1004ff5b, 21185 }, /* osfPrevMenu */ - { 0x1004ff32, 21197 }, /* osfPrimaryPaste */ - { 0x1004ff33, 21213 }, /* osfQuickPaste */ - { 0x1004ff73, 21227 }, /* osfReselect */ - { 0x1004ff78, 21239 }, /* osfRestore */ - { 0x1004ff53, 21250 }, /* osfRight */ - { 0x1004ff60, 21259 }, /* osfSelect */ - { 0x1004ff71, 21269 }, /* osfSelectAll */ - { 0x1004ff65, 21282 }, /* osfUndo */ - { 0x1004ff52, 21290 }, /* osfUp */ - { 0x000000d8, 21296 }, /* Oslash */ - { 0x000000f8, 21303 }, /* oslash */ - { 0x000000d5, 21310 }, /* Otilde */ - { 0x000000f5, 21317 }, /* otilde */ - { 0x00000bc0, 21324 }, /* overbar */ - { 0x0000fe78, 21332 }, /* Overlay1_Enable */ - { 0x0000fe79, 21348 }, /* Overlay2_Enable */ - { 0x0000047e, 21364 }, /* overline */ - { 0x00000050, 21373 }, /* P */ - { 0x00000070, 21375 }, /* p */ - { 0x01001e56, 21377 }, /* Pabovedot */ - { 0x01001e57, 21387 }, /* pabovedot */ - { 0x0000ff56, 21397 }, /* Page_Down */ - { 0x0000ff55, 21407 }, /* Page_Up */ - { 0x000000b6, 21415 }, /* paragraph */ - { 0x00000028, 21425 }, /* parenleft */ - { 0x00000029, 21435 }, /* parenright */ - { 0x01002202, 21446 }, /* partdifferential */ - { 0x000008ef, 21463 }, /* partialderivative */ - { 0x0000ff13, 21481 }, /* Pause */ - { 0x00000025, 21487 }, /* percent */ - { 0x0000002e, 21495 }, /* period */ - { 0x000000b7, 21502 }, /* periodcentered */ - { 0x00000ad5, 21517 }, /* permille */ - { 0x010020a7, 21526 }, /* PesetaSign */ - { 0x00000afb, 21537 }, /* phonographcopyright */ - { 0x0000002b, 21557 }, /* plus */ - { 0x000000b1, 21562 }, /* plusminus */ - { 0x0000fefa, 21572 }, /* Pointer_Accelerate */ - { 0x0000fee9, 21591 }, /* Pointer_Button1 */ - { 0x0000feea, 21607 }, /* Pointer_Button2 */ - { 0x0000feeb, 21623 }, /* Pointer_Button3 */ - { 0x0000feec, 21639 }, /* Pointer_Button4 */ - { 0x0000feed, 21655 }, /* Pointer_Button5 */ - { 0x0000fee8, 21671 }, /* Pointer_Button_Dflt */ - { 0x0000feef, 21691 }, /* Pointer_DblClick1 */ - { 0x0000fef0, 21709 }, /* Pointer_DblClick2 */ - { 0x0000fef1, 21727 }, /* Pointer_DblClick3 */ - { 0x0000fef2, 21745 }, /* Pointer_DblClick4 */ - { 0x0000fef3, 21763 }, /* Pointer_DblClick5 */ - { 0x0000feee, 21781 }, /* Pointer_DblClick_Dflt */ - { 0x0000fefb, 21803 }, /* Pointer_DfltBtnNext */ - { 0x0000fefc, 21823 }, /* Pointer_DfltBtnPrev */ - { 0x0000fee3, 21843 }, /* Pointer_Down */ - { 0x0000fee6, 21856 }, /* Pointer_DownLeft */ - { 0x0000fee7, 21873 }, /* Pointer_DownRight */ - { 0x0000fef5, 21891 }, /* Pointer_Drag1 */ - { 0x0000fef6, 21905 }, /* Pointer_Drag2 */ - { 0x0000fef7, 21919 }, /* Pointer_Drag3 */ - { 0x0000fef8, 21933 }, /* Pointer_Drag4 */ - { 0x0000fefd, 21947 }, /* Pointer_Drag5 */ - { 0x0000fef4, 21961 }, /* Pointer_Drag_Dflt */ - { 0x0000fef9, 21979 }, /* Pointer_EnableKeys */ - { 0x0000fee0, 21998 }, /* Pointer_Left */ - { 0x0000fee1, 22011 }, /* Pointer_Right */ - { 0x0000fee2, 22025 }, /* Pointer_Up */ - { 0x0000fee4, 22036 }, /* Pointer_UpLeft */ - { 0x0000fee5, 22051 }, /* Pointer_UpRight */ - { 0x00000ad4, 22067 }, /* prescription */ - { 0x0000fed1, 22080 }, /* Prev_Virtual_Screen */ - { 0x0000ff3e, 22100 }, /* PreviousCandidate */ - { 0x0000ff61, 22118 }, /* Print */ - { 0x0000ff55, 22124 }, /* Prior */ - { 0x000004b0, 22130 }, /* prolongedsound */ - { 0x00000aa6, 22145 }, /* punctspace */ - { 0x00000051, 22156 }, /* Q */ - { 0x00000071, 22158 }, /* q */ - { 0x00000bcc, 22160 }, /* quad */ - { 0x0000003f, 22165 }, /* question */ - { 0x000000bf, 22174 }, /* questiondown */ - { 0x00000022, 22187 }, /* quotedbl */ - { 0x00000060, 22196 }, /* quoteleft */ - { 0x00000027, 22206 }, /* quoteright */ - { 0x00000052, 22217 }, /* R */ - { 0x00000072, 22219 }, /* r */ - { 0x0000ffd2, 22221 }, /* R1 */ - { 0x0000ffdb, 22224 }, /* R10 */ - { 0x0000ffdc, 22228 }, /* R11 */ - { 0x0000ffdd, 22232 }, /* R12 */ - { 0x0000ffde, 22236 }, /* R13 */ - { 0x0000ffdf, 22240 }, /* R14 */ - { 0x0000ffe0, 22244 }, /* R15 */ - { 0x0000ffd3, 22248 }, /* R2 */ - { 0x0000ffd4, 22251 }, /* R3 */ - { 0x0000ffd5, 22254 }, /* R4 */ - { 0x0000ffd6, 22257 }, /* R5 */ - { 0x0000ffd7, 22260 }, /* R6 */ - { 0x0000ffd8, 22263 }, /* R7 */ - { 0x0000ffd9, 22266 }, /* R8 */ - { 0x0000ffda, 22269 }, /* R9 */ - { 0x000001c0, 22272 }, /* Racute */ - { 0x000001e0, 22279 }, /* racute */ - { 0x000008d6, 22286 }, /* radical */ - { 0x000001d8, 22294 }, /* Rcaron */ - { 0x000001f8, 22301 }, /* rcaron */ - { 0x000003a3, 22308 }, /* Rcedilla */ - { 0x000003b3, 22317 }, /* rcedilla */ - { 0x0000ff66, 22326 }, /* Redo */ - { 0x000000ae, 22331 }, /* registered */ - { 0x0000fe72, 22342 }, /* RepeatKeys_Enable */ - { 0x1000ff6c, 22360 }, /* Reset */ - { 0x0000ff0d, 22366 }, /* Return */ - { 0x0000ff53, 22373 }, /* Right */ - { 0x00000abe, 22379 }, /* rightanglebracket */ - { 0x000008fd, 22397 }, /* rightarrow */ - { 0x00000ba6, 22408 }, /* rightcaret */ - { 0x00000ad3, 22419 }, /* rightdoublequotemark */ - { 0x000008b0, 22440 }, /* rightmiddlecurlybrace */ - { 0x000008b7, 22462 }, /* rightmiddlesummation */ - { 0x00000acd, 22483 }, /* rightopentriangle */ - { 0x00000aeb, 22501 }, /* rightpointer */ - { 0x00000bd8, 22514 }, /* rightshoe */ - { 0x00000ad1, 22524 }, /* rightsinglequotemark */ - { 0x000009f5, 22545 }, /* rightt */ - { 0x00000bfc, 22552 }, /* righttack */ - { 0x0000ff24, 22562 }, /* Romaji */ - { 0x010020a8, 22569 }, /* RupeeSign */ - { 0x00000053, 22579 }, /* S */ - { 0x00000073, 22581 }, /* s */ - { 0x01001e60, 22583 }, /* Sabovedot */ - { 0x01001e61, 22593 }, /* sabovedot */ - { 0x000001a6, 22603 }, /* Sacute */ - { 0x000001b6, 22610 }, /* sacute */ - { 0x000001a9, 22617 }, /* Scaron */ - { 0x000001b9, 22624 }, /* scaron */ - { 0x000001aa, 22631 }, /* Scedilla */ - { 0x000001ba, 22640 }, /* scedilla */ - { 0x0100018f, 22649 }, /* SCHWA */ - { 0x01000259, 22655 }, /* schwa */ - { 0x000002de, 22661 }, /* Scircumflex */ - { 0x000002fe, 22673 }, /* scircumflex */ - { 0x0000ff7e, 22685 }, /* script_switch */ - { 0x0000ff14, 22699 }, /* Scroll_Lock */ - { 0x00000ad7, 22711 }, /* seconds */ - { 0x000000a7, 22719 }, /* section */ - { 0x0000ff60, 22727 }, /* Select */ - { 0x0000003b, 22734 }, /* semicolon */ - { 0x000004df, 22744 }, /* semivoicedsound */ - { 0x000006a1, 22760 }, /* Serbian_dje */ - { 0x000006b1, 22772 }, /* Serbian_DJE */ - { 0x000006af, 22784 }, /* Serbian_dze */ - { 0x000006bf, 22796 }, /* Serbian_DZE */ - { 0x000006a8, 22808 }, /* Serbian_je */ - { 0x000006b8, 22819 }, /* Serbian_JE */ - { 0x000006a9, 22830 }, /* Serbian_lje */ - { 0x000006b9, 22842 }, /* Serbian_LJE */ - { 0x000006aa, 22854 }, /* Serbian_nje */ - { 0x000006ba, 22866 }, /* Serbian_NJE */ - { 0x000006ab, 22878 }, /* Serbian_tshe */ - { 0x000006bb, 22891 }, /* Serbian_TSHE */ - { 0x00000ac6, 22904 }, /* seveneighths */ - { 0x01002087, 22917 }, /* sevensubscript */ - { 0x01002077, 22932 }, /* sevensuperior */ - { 0x0000ffe1, 22946 }, /* Shift_L */ - { 0x0000ffe6, 22954 }, /* Shift_Lock */ - { 0x0000ffe2, 22965 }, /* Shift_R */ - { 0x00000aca, 22973 }, /* signaturemark */ - { 0x00000aac, 22987 }, /* signifblank */ - { 0x000008c9, 22999 }, /* similarequal */ - { 0x0000ff3c, 23012 }, /* SingleCandidate */ - { 0x00000afd, 23028 }, /* singlelowquotemark */ - { 0x01000d85, 23047 }, /* Sinh_a */ - { 0x01000d86, 23054 }, /* Sinh_aa */ - { 0x01000dcf, 23062 }, /* Sinh_aa2 */ - { 0x01000d87, 23071 }, /* Sinh_ae */ - { 0x01000dd0, 23079 }, /* Sinh_ae2 */ - { 0x01000d88, 23088 }, /* Sinh_aee */ - { 0x01000dd1, 23097 }, /* Sinh_aee2 */ - { 0x01000d93, 23107 }, /* Sinh_ai */ - { 0x01000ddb, 23115 }, /* Sinh_ai2 */ - { 0x01000dca, 23124 }, /* Sinh_al */ - { 0x01000d96, 23132 }, /* Sinh_au */ - { 0x01000dde, 23140 }, /* Sinh_au2 */ - { 0x01000db6, 23149 }, /* Sinh_ba */ - { 0x01000db7, 23157 }, /* Sinh_bha */ - { 0x01000da0, 23166 }, /* Sinh_ca */ - { 0x01000da1, 23174 }, /* Sinh_cha */ - { 0x01000da9, 23183 }, /* Sinh_dda */ - { 0x01000daa, 23192 }, /* Sinh_ddha */ - { 0x01000daf, 23202 }, /* Sinh_dha */ - { 0x01000db0, 23211 }, /* Sinh_dhha */ - { 0x01000d91, 23221 }, /* Sinh_e */ - { 0x01000dd9, 23228 }, /* Sinh_e2 */ - { 0x01000d92, 23236 }, /* Sinh_ee */ - { 0x01000dda, 23244 }, /* Sinh_ee2 */ - { 0x01000dc6, 23253 }, /* Sinh_fa */ - { 0x01000d9c, 23261 }, /* Sinh_ga */ - { 0x01000d9d, 23269 }, /* Sinh_gha */ - { 0x01000d83, 23278 }, /* Sinh_h2 */ - { 0x01000dc4, 23286 }, /* Sinh_ha */ - { 0x01000d89, 23294 }, /* Sinh_i */ - { 0x01000dd2, 23301 }, /* Sinh_i2 */ - { 0x01000d8a, 23309 }, /* Sinh_ii */ - { 0x01000dd3, 23317 }, /* Sinh_ii2 */ - { 0x01000da2, 23326 }, /* Sinh_ja */ - { 0x01000da3, 23334 }, /* Sinh_jha */ - { 0x01000da5, 23343 }, /* Sinh_jnya */ - { 0x01000d9a, 23353 }, /* Sinh_ka */ - { 0x01000d9b, 23361 }, /* Sinh_kha */ - { 0x01000df4, 23370 }, /* Sinh_kunddaliya */ - { 0x01000dbd, 23386 }, /* Sinh_la */ - { 0x01000dc5, 23394 }, /* Sinh_lla */ - { 0x01000d8f, 23403 }, /* Sinh_lu */ - { 0x01000ddf, 23411 }, /* Sinh_lu2 */ - { 0x01000d90, 23420 }, /* Sinh_luu */ - { 0x01000df3, 23429 }, /* Sinh_luu2 */ - { 0x01000db8, 23439 }, /* Sinh_ma */ - { 0x01000db9, 23447 }, /* Sinh_mba */ - { 0x01000db1, 23456 }, /* Sinh_na */ - { 0x01000dac, 23464 }, /* Sinh_ndda */ - { 0x01000db3, 23474 }, /* Sinh_ndha */ - { 0x01000d82, 23484 }, /* Sinh_ng */ - { 0x01000d9e, 23492 }, /* Sinh_ng2 */ - { 0x01000d9f, 23501 }, /* Sinh_nga */ - { 0x01000da6, 23510 }, /* Sinh_nja */ - { 0x01000dab, 23519 }, /* Sinh_nna */ - { 0x01000da4, 23528 }, /* Sinh_nya */ - { 0x01000d94, 23537 }, /* Sinh_o */ - { 0x01000ddc, 23544 }, /* Sinh_o2 */ - { 0x01000d95, 23552 }, /* Sinh_oo */ - { 0x01000ddd, 23560 }, /* Sinh_oo2 */ - { 0x01000db4, 23569 }, /* Sinh_pa */ - { 0x01000db5, 23577 }, /* Sinh_pha */ - { 0x01000dbb, 23586 }, /* Sinh_ra */ - { 0x01000d8d, 23594 }, /* Sinh_ri */ - { 0x01000d8e, 23602 }, /* Sinh_rii */ - { 0x01000dd8, 23611 }, /* Sinh_ru2 */ - { 0x01000df2, 23620 }, /* Sinh_ruu2 */ - { 0x01000dc3, 23630 }, /* Sinh_sa */ - { 0x01000dc1, 23638 }, /* Sinh_sha */ - { 0x01000dc2, 23647 }, /* Sinh_ssha */ - { 0x01000dad, 23657 }, /* Sinh_tha */ - { 0x01000dae, 23666 }, /* Sinh_thha */ - { 0x01000da7, 23676 }, /* Sinh_tta */ - { 0x01000da8, 23685 }, /* Sinh_ttha */ - { 0x01000d8b, 23695 }, /* Sinh_u */ - { 0x01000dd4, 23702 }, /* Sinh_u2 */ - { 0x01000d8c, 23710 }, /* Sinh_uu */ - { 0x01000dd6, 23718 }, /* Sinh_uu2 */ - { 0x01000dc0, 23727 }, /* Sinh_va */ - { 0x01000dba, 23735 }, /* Sinh_ya */ - { 0x01002086, 23743 }, /* sixsubscript */ - { 0x01002076, 23756 }, /* sixsuperior */ - { 0x0000002f, 23768 }, /* slash */ - { 0x0000fe73, 23774 }, /* SlowKeys_Enable */ - { 0x000009e0, 23790 }, /* soliddiamond */ - { 0x00000020, 23803 }, /* space */ - { 0x0100221a, 23809 }, /* squareroot */ - { 0x000000df, 23820 }, /* ssharp */ - { 0x000000a3, 23827 }, /* sterling */ - { 0x0000fe75, 23836 }, /* StickyKeys_Enable */ - { 0x01002263, 23854 }, /* stricteq */ - { 0x0000ff66, 23863 }, /* SunAgain */ - { 0x0000ff7e, 23872 }, /* SunAltGraph */ - { 0x1005ff77, 23884 }, /* SunAudioLowerVolume */ - { 0x1005ff78, 23904 }, /* SunAudioMute */ - { 0x1005ff79, 23917 }, /* SunAudioRaiseVolume */ - { 0x0000ff20, 23937 }, /* SunCompose */ - { 0x1005ff72, 23948 }, /* SunCopy */ - { 0x1005ff75, 23956 }, /* SunCut */ - { 0x1005ff10, 23963 }, /* SunF36 */ - { 0x1005ff11, 23970 }, /* SunF37 */ - { 0x1005ff03, 23977 }, /* SunFA_Acute */ - { 0x1005ff05, 23989 }, /* SunFA_Cedilla */ - { 0x1005ff01, 24003 }, /* SunFA_Circum */ - { 0x1005ff04, 24016 }, /* SunFA_Diaeresis */ - { 0x1005ff00, 24032 }, /* SunFA_Grave */ - { 0x1005ff02, 24044 }, /* SunFA_Tilde */ - { 0x0000ff68, 24056 }, /* SunFind */ - { 0x1005ff71, 24064 }, /* SunFront */ - { 0x1005ff73, 24073 }, /* SunOpen */ - { 0x0000ff56, 24081 }, /* SunPageDown */ - { 0x0000ff55, 24093 }, /* SunPageUp */ - { 0x1005ff74, 24103 }, /* SunPaste */ - { 0x1005ff76, 24112 }, /* SunPowerSwitch */ - { 0x1005ff7d, 24127 }, /* SunPowerSwitchShift */ - { 0x0000ff61, 24147 }, /* SunPrint_Screen */ - { 0x1005ff70, 24163 }, /* SunProps */ - { 0x0000ff69, 24172 }, /* SunStop */ - { 0x1005ff60, 24180 }, /* SunSys_Req */ - { 0x0000ff65, 24191 }, /* SunUndo */ - { 0x1005ff7a, 24199 }, /* SunVideoDegauss */ - { 0x1005ff7b, 24215 }, /* SunVideoLowerBrightness */ - { 0x1005ff7c, 24239 }, /* SunVideoRaiseBrightness */ - { 0x0000ffeb, 24263 }, /* Super_L */ - { 0x0000ffec, 24271 }, /* Super_R */ - { 0x0000ff15, 24279 }, /* Sys_Req */ - { 0x1000ff6d, 24287 }, /* System */ - { 0x00000054, 24294 }, /* T */ - { 0x00000074, 24296 }, /* t */ - { 0x0000ff09, 24298 }, /* Tab */ - { 0x01001e6a, 24302 }, /* Tabovedot */ - { 0x01001e6b, 24312 }, /* tabovedot */ - { 0x000001ab, 24322 }, /* Tcaron */ - { 0x000001bb, 24329 }, /* tcaron */ - { 0x000001de, 24336 }, /* Tcedilla */ - { 0x000001fe, 24345 }, /* tcedilla */ - { 0x00000af9, 24354 }, /* telephone */ - { 0x00000afa, 24364 }, /* telephonerecorder */ - { 0x0000fed5, 24382 }, /* Terminate_Server */ - { 0x00000ddf, 24399 }, /* Thai_baht */ - { 0x00000dba, 24409 }, /* Thai_bobaimai */ - { 0x00000da8, 24423 }, /* Thai_chochan */ - { 0x00000daa, 24436 }, /* Thai_chochang */ - { 0x00000da9, 24450 }, /* Thai_choching */ - { 0x00000dac, 24464 }, /* Thai_chochoe */ - { 0x00000dae, 24477 }, /* Thai_dochada */ - { 0x00000db4, 24490 }, /* Thai_dodek */ - { 0x00000dbd, 24501 }, /* Thai_fofa */ - { 0x00000dbf, 24511 }, /* Thai_fofan */ - { 0x00000dcb, 24522 }, /* Thai_hohip */ - { 0x00000dce, 24533 }, /* Thai_honokhuk */ - { 0x00000da2, 24547 }, /* Thai_khokhai */ - { 0x00000da5, 24560 }, /* Thai_khokhon */ - { 0x00000da3, 24573 }, /* Thai_khokhuat */ - { 0x00000da4, 24587 }, /* Thai_khokhwai */ - { 0x00000da6, 24601 }, /* Thai_khorakhang */ - { 0x00000da1, 24617 }, /* Thai_kokai */ - { 0x00000de5, 24628 }, /* Thai_lakkhangyao */ - { 0x00000df7, 24645 }, /* Thai_lekchet */ - { 0x00000df5, 24658 }, /* Thai_lekha */ - { 0x00000df6, 24669 }, /* Thai_lekhok */ - { 0x00000df9, 24681 }, /* Thai_lekkao */ - { 0x00000df1, 24693 }, /* Thai_leknung */ - { 0x00000df8, 24706 }, /* Thai_lekpaet */ - { 0x00000df3, 24719 }, /* Thai_leksam */ - { 0x00000df4, 24731 }, /* Thai_leksi */ - { 0x00000df2, 24742 }, /* Thai_leksong */ - { 0x00000df0, 24755 }, /* Thai_leksun */ - { 0x00000dcc, 24767 }, /* Thai_lochula */ - { 0x00000dc5, 24780 }, /* Thai_loling */ - { 0x00000dc6, 24792 }, /* Thai_lu */ - { 0x00000deb, 24800 }, /* Thai_maichattawa */ - { 0x00000de8, 24817 }, /* Thai_maiek */ - { 0x00000dd1, 24828 }, /* Thai_maihanakat */ - { 0x00000dde, 24844 }, /* Thai_maihanakat_maitho */ - { 0x00000de7, 24867 }, /* Thai_maitaikhu */ - { 0x00000de9, 24882 }, /* Thai_maitho */ - { 0x00000dea, 24894 }, /* Thai_maitri */ - { 0x00000de6, 24906 }, /* Thai_maiyamok */ - { 0x00000dc1, 24920 }, /* Thai_moma */ - { 0x00000da7, 24930 }, /* Thai_ngongu */ - { 0x00000ded, 24942 }, /* Thai_nikhahit */ - { 0x00000db3, 24956 }, /* Thai_nonen */ - { 0x00000db9, 24967 }, /* Thai_nonu */ - { 0x00000dcd, 24977 }, /* Thai_oang */ - { 0x00000dcf, 24987 }, /* Thai_paiyannoi */ - { 0x00000dda, 25002 }, /* Thai_phinthu */ - { 0x00000dbe, 25015 }, /* Thai_phophan */ - { 0x00000dbc, 25028 }, /* Thai_phophung */ - { 0x00000dc0, 25042 }, /* Thai_phosamphao */ - { 0x00000dbb, 25058 }, /* Thai_popla */ - { 0x00000dc3, 25069 }, /* Thai_rorua */ - { 0x00000dc4, 25080 }, /* Thai_ru */ - { 0x00000dd0, 25088 }, /* Thai_saraa */ - { 0x00000dd2, 25099 }, /* Thai_saraaa */ - { 0x00000de1, 25111 }, /* Thai_saraae */ - { 0x00000de4, 25123 }, /* Thai_saraaimaimalai */ - { 0x00000de3, 25143 }, /* Thai_saraaimaimuan */ - { 0x00000dd3, 25162 }, /* Thai_saraam */ - { 0x00000de0, 25174 }, /* Thai_sarae */ - { 0x00000dd4, 25185 }, /* Thai_sarai */ - { 0x00000dd5, 25196 }, /* Thai_saraii */ - { 0x00000de2, 25208 }, /* Thai_sarao */ - { 0x00000dd8, 25219 }, /* Thai_sarau */ - { 0x00000dd6, 25230 }, /* Thai_saraue */ - { 0x00000dd7, 25242 }, /* Thai_sarauee */ - { 0x00000dd9, 25255 }, /* Thai_sarauu */ - { 0x00000dc9, 25267 }, /* Thai_sorusi */ - { 0x00000dc8, 25279 }, /* Thai_sosala */ - { 0x00000dab, 25291 }, /* Thai_soso */ - { 0x00000dca, 25301 }, /* Thai_sosua */ - { 0x00000dec, 25312 }, /* Thai_thanthakhat */ - { 0x00000db1, 25329 }, /* Thai_thonangmontho */ - { 0x00000db2, 25348 }, /* Thai_thophuthao */ - { 0x00000db7, 25364 }, /* Thai_thothahan */ - { 0x00000db0, 25379 }, /* Thai_thothan */ - { 0x00000db8, 25392 }, /* Thai_thothong */ - { 0x00000db6, 25406 }, /* Thai_thothung */ - { 0x00000daf, 25420 }, /* Thai_topatak */ - { 0x00000db5, 25433 }, /* Thai_totao */ - { 0x00000dc7, 25444 }, /* Thai_wowaen */ - { 0x00000dc2, 25456 }, /* Thai_yoyak */ - { 0x00000dad, 25467 }, /* Thai_yoying */ - { 0x000008c0, 25479 }, /* therefore */ - { 0x00000aa7, 25489 }, /* thinspace */ - { 0x000000de, 25499 }, /* THORN */ - { 0x000000de, 25505 }, /* Thorn */ - { 0x000000fe, 25511 }, /* thorn */ - { 0x00000ac4, 25517 }, /* threeeighths */ - { 0x00000ab4, 25530 }, /* threefifths */ - { 0x000000be, 25542 }, /* threequarters */ - { 0x01002083, 25556 }, /* threesubscript */ - { 0x000000b3, 25571 }, /* threesuperior */ - { 0x0100222d, 25585 }, /* tintegral */ - { 0x000008a4, 25595 }, /* topintegral */ - { 0x000008ab, 25607 }, /* topleftparens */ - { 0x000008a2, 25621 }, /* topleftradical */ - { 0x000008a7, 25636 }, /* topleftsqbracket */ - { 0x000008b1, 25653 }, /* topleftsummation */ - { 0x000008ad, 25670 }, /* toprightparens */ - { 0x000008a9, 25685 }, /* toprightsqbracket */ - { 0x000008b5, 25703 }, /* toprightsummation */ - { 0x000009f7, 25721 }, /* topt */ - { 0x000008b3, 25726 }, /* topvertsummationconnector */ - { 0x0000ff2b, 25752 }, /* Touroku */ - { 0x00000ac9, 25760 }, /* trademark */ - { 0x00000acb, 25770 }, /* trademarkincircle */ - { 0x000003ac, 25788 }, /* Tslash */ - { 0x000003bc, 25795 }, /* tslash */ - { 0x00000ab3, 25802 }, /* twofifths */ - { 0x01002082, 25812 }, /* twosubscript */ - { 0x000000b2, 25825 }, /* twosuperior */ - { 0x00000ab1, 25837 }, /* twothirds */ - { 0x00000055, 25847 }, /* U */ - { 0x00000075, 25849 }, /* u */ - { 0x000000da, 25851 }, /* Uacute */ - { 0x000000fa, 25858 }, /* uacute */ - { 0x01001ee4, 25865 }, /* Ubelowdot */ - { 0x01001ee5, 25875 }, /* ubelowdot */ - { 0x000002dd, 25885 }, /* Ubreve */ - { 0x000002fd, 25892 }, /* ubreve */ - { 0x000000db, 25899 }, /* Ucircumflex */ - { 0x000000fb, 25911 }, /* ucircumflex */ - { 0x000000dc, 25923 }, /* Udiaeresis */ - { 0x000000fc, 25934 }, /* udiaeresis */ - { 0x000001db, 25945 }, /* Udoubleacute */ - { 0x000001fb, 25958 }, /* udoubleacute */ - { 0x000000d9, 25971 }, /* Ugrave */ - { 0x000000f9, 25978 }, /* ugrave */ - { 0x01001ee6, 25985 }, /* Uhook */ - { 0x01001ee7, 25991 }, /* uhook */ - { 0x010001af, 25997 }, /* Uhorn */ - { 0x010001b0, 26003 }, /* uhorn */ - { 0x01001ee8, 26009 }, /* Uhornacute */ - { 0x01001ee9, 26020 }, /* uhornacute */ - { 0x01001ef0, 26031 }, /* Uhornbelowdot */ - { 0x01001ef1, 26045 }, /* uhornbelowdot */ - { 0x01001eea, 26059 }, /* Uhorngrave */ - { 0x01001eeb, 26070 }, /* uhorngrave */ - { 0x01001eec, 26081 }, /* Uhornhook */ - { 0x01001eed, 26091 }, /* uhornhook */ - { 0x01001eee, 26101 }, /* Uhorntilde */ - { 0x01001eef, 26112 }, /* uhorntilde */ - { 0x000006ad, 26123 }, /* Ukrainian_ghe_with_upturn */ - { 0x000006bd, 26149 }, /* Ukrainian_GHE_WITH_UPTURN */ - { 0x000006a6, 26175 }, /* Ukrainian_i */ - { 0x000006b6, 26187 }, /* Ukrainian_I */ - { 0x000006a4, 26199 }, /* Ukrainian_ie */ - { 0x000006b4, 26212 }, /* Ukrainian_IE */ - { 0x000006a7, 26225 }, /* Ukrainian_yi */ - { 0x000006b7, 26238 }, /* Ukrainian_YI */ - { 0x000006a6, 26251 }, /* Ukranian_i */ - { 0x000006b6, 26262 }, /* Ukranian_I */ - { 0x000006a4, 26273 }, /* Ukranian_je */ - { 0x000006b4, 26285 }, /* Ukranian_JE */ - { 0x000006a7, 26297 }, /* Ukranian_yi */ - { 0x000006b7, 26309 }, /* Ukranian_YI */ - { 0x000003de, 26321 }, /* Umacron */ - { 0x000003fe, 26329 }, /* umacron */ - { 0x00000bc6, 26337 }, /* underbar */ - { 0x0000005f, 26346 }, /* underscore */ - { 0x0000ff65, 26357 }, /* Undo */ - { 0x000008dd, 26362 }, /* union */ - { 0x000003d9, 26368 }, /* Uogonek */ - { 0x000003f9, 26376 }, /* uogonek */ - { 0x0000ff52, 26384 }, /* Up */ - { 0x000008fc, 26387 }, /* uparrow */ - { 0x00000ba9, 26395 }, /* upcaret */ - { 0x000009ec, 26403 }, /* upleftcorner */ - { 0x000009eb, 26416 }, /* uprightcorner */ - { 0x00000bc3, 26430 }, /* upshoe */ - { 0x00000bd3, 26437 }, /* upstile */ - { 0x00000bce, 26445 }, /* uptack */ - { 0x000001d9, 26452 }, /* Uring */ - { 0x000001f9, 26458 }, /* uring */ - { 0x1000ff6e, 26464 }, /* User */ - { 0x000003dd, 26469 }, /* Utilde */ - { 0x000003fd, 26476 }, /* utilde */ - { 0x00000056, 26483 }, /* V */ - { 0x00000076, 26485 }, /* v */ - { 0x000008c1, 26487 }, /* variation */ - { 0x000009f8, 26497 }, /* vertbar */ - { 0x000008a6, 26505 }, /* vertconnector */ - { 0x000004de, 26519 }, /* voicedsound */ - { 0x00ffffff, 26531 }, /* VoidSymbol */ - { 0x000009e9, 26542 }, /* vt */ - { 0x00000057, 26545 }, /* W */ - { 0x00000077, 26547 }, /* w */ - { 0x01001e82, 26549 }, /* Wacute */ - { 0x01001e83, 26556 }, /* wacute */ - { 0x01000174, 26563 }, /* Wcircumflex */ - { 0x01000175, 26575 }, /* wcircumflex */ - { 0x01001e84, 26587 }, /* Wdiaeresis */ - { 0x01001e85, 26598 }, /* wdiaeresis */ - { 0x01001e80, 26609 }, /* Wgrave */ - { 0x01001e81, 26616 }, /* wgrave */ - { 0x010020a9, 26623 }, /* WonSign */ - { 0x00000058, 26631 }, /* X */ - { 0x00000078, 26633 }, /* x */ - { 0x01001e8a, 26635 }, /* Xabovedot */ - { 0x01001e8b, 26645 }, /* xabovedot */ - { 0x1008ff39, 26655 }, /* XF86AddFavorite */ - { 0x1008ff50, 26671 }, /* XF86ApplicationLeft */ - { 0x1008ff51, 26691 }, /* XF86ApplicationRight */ - { 0x1008ff9b, 26712 }, /* XF86AudioCycleTrack */ - { 0x1008ff97, 26732 }, /* XF86AudioForward */ - { 0x1008ff11, 26749 }, /* XF86AudioLowerVolume */ - { 0x1008ff32, 26770 }, /* XF86AudioMedia */ - { 0x1008ffb2, 26785 }, /* XF86AudioMicMute */ - { 0x1008ff12, 26802 }, /* XF86AudioMute */ - { 0x1008ff17, 26816 }, /* XF86AudioNext */ - { 0x1008ff31, 26830 }, /* XF86AudioPause */ - { 0x1008ff14, 26845 }, /* XF86AudioPlay */ - { 0x1008ffb6, 26859 }, /* XF86AudioPreset */ - { 0x1008ff16, 26875 }, /* XF86AudioPrev */ - { 0x1008ff13, 26889 }, /* XF86AudioRaiseVolume */ - { 0x1008ff99, 26910 }, /* XF86AudioRandomPlay */ - { 0x1008ff1c, 26930 }, /* XF86AudioRecord */ - { 0x1008ff98, 26946 }, /* XF86AudioRepeat */ - { 0x1008ff3e, 26962 }, /* XF86AudioRewind */ - { 0x1008ff15, 26978 }, /* XF86AudioStop */ - { 0x1008ff8d, 26992 }, /* XF86Away */ - { 0x1008ff26, 27001 }, /* XF86Back */ - { 0x1008ff3f, 27010 }, /* XF86BackForward */ - { 0x1008ff93, 27026 }, /* XF86Battery */ - { 0x1008ffa6, 27038 }, /* XF86Blue */ - { 0x1008ff94, 27047 }, /* XF86Bluetooth */ - { 0x1008ff52, 27061 }, /* XF86Book */ - { 0x1008ff3b, 27070 }, /* XF86BrightnessAdjust */ - { 0x1008ff54, 27091 }, /* XF86Calculater */ - { 0x1008ff1d, 27106 }, /* XF86Calculator */ - { 0x1008ff20, 27121 }, /* XF86Calendar */ - { 0x1008ff53, 27134 }, /* XF86CD */ - { 0x1008ff55, 27141 }, /* XF86Clear */ - { 0x1008fe21, 27151 }, /* XF86ClearGrab */ - { 0x1008ff56, 27165 }, /* XF86Close */ - { 0x1008ff3d, 27175 }, /* XF86Community */ - { 0x1008ff22, 27189 }, /* XF86ContrastAdjust */ - { 0x1008ff57, 27208 }, /* XF86Copy */ - { 0x1008ff58, 27217 }, /* XF86Cut */ - { 0x1008ff9c, 27225 }, /* XF86CycleAngle */ - { 0x1008ff59, 27240 }, /* XF86Display */ - { 0x1008ff5b, 27252 }, /* XF86Documents */ - { 0x1008ff5a, 27266 }, /* XF86DOS */ - { 0x1008ff2c, 27274 }, /* XF86Eject */ - { 0x1008ff5c, 27284 }, /* XF86Excel */ - { 0x1008ff5d, 27294 }, /* XF86Explorer */ - { 0x1008ff30, 27307 }, /* XF86Favorites */ - { 0x1008ff3c, 27321 }, /* XF86Finance */ - { 0x1008ff27, 27333 }, /* XF86Forward */ - { 0x1008ff9d, 27345 }, /* XF86FrameBack */ - { 0x1008ff9e, 27359 }, /* XF86FrameForward */ - { 0x1008ff5e, 27376 }, /* XF86Game */ - { 0x1008ff5f, 27385 }, /* XF86Go */ - { 0x1008ffa4, 27392 }, /* XF86Green */ - { 0x1008ffa8, 27402 }, /* XF86Hibernate */ - { 0x1008ff37, 27416 }, /* XF86History */ - { 0x1008ff18, 27428 }, /* XF86HomePage */ - { 0x1008ff3a, 27441 }, /* XF86HotLinks */ - { 0x1008ff60, 27454 }, /* XF86iTouch */ - { 0x1008ff06, 27465 }, /* XF86KbdBrightnessDown */ - { 0x1008ff05, 27487 }, /* XF86KbdBrightnessUp */ - { 0x1008ff04, 27507 }, /* XF86KbdLightOnOff */ - { 0x1008ffb3, 27525 }, /* XF86Keyboard */ - { 0x1008ff40, 27538 }, /* XF86Launch0 */ - { 0x1008ff41, 27550 }, /* XF86Launch1 */ - { 0x1008ff42, 27562 }, /* XF86Launch2 */ - { 0x1008ff43, 27574 }, /* XF86Launch3 */ - { 0x1008ff44, 27586 }, /* XF86Launch4 */ - { 0x1008ff45, 27598 }, /* XF86Launch5 */ - { 0x1008ff46, 27610 }, /* XF86Launch6 */ - { 0x1008ff47, 27622 }, /* XF86Launch7 */ - { 0x1008ff48, 27634 }, /* XF86Launch8 */ - { 0x1008ff49, 27646 }, /* XF86Launch9 */ - { 0x1008ff4a, 27658 }, /* XF86LaunchA */ - { 0x1008ff4b, 27670 }, /* XF86LaunchB */ - { 0x1008ff4c, 27682 }, /* XF86LaunchC */ - { 0x1008ff4d, 27694 }, /* XF86LaunchD */ - { 0x1008ff4e, 27706 }, /* XF86LaunchE */ - { 0x1008ff4f, 27718 }, /* XF86LaunchF */ - { 0x1008ff35, 27730 }, /* XF86LightBulb */ - { 0x1008fe25, 27744 }, /* XF86LogGrabInfo */ - { 0x1008ff61, 27760 }, /* XF86LogOff */ - { 0x1008fe24, 27771 }, /* XF86LogWindowTree */ - { 0x1008ff19, 27789 }, /* XF86Mail */ - { 0x1008ff90, 27798 }, /* XF86MailForward */ - { 0x1008ff62, 27814 }, /* XF86Market */ - { 0x1008ff63, 27825 }, /* XF86Meeting */ - { 0x1008ff1e, 27837 }, /* XF86Memo */ - { 0x1008ff65, 27846 }, /* XF86MenuKB */ - { 0x1008ff66, 27857 }, /* XF86MenuPB */ - { 0x1008ff8e, 27868 }, /* XF86Messenger */ - { 0x1008ff01, 27882 }, /* XF86ModeLock */ - { 0x1008ff03, 27895 }, /* XF86MonBrightnessDown */ - { 0x1008ff02, 27917 }, /* XF86MonBrightnessUp */ - { 0x1008ff92, 27937 }, /* XF86Music */ - { 0x1008ff33, 27947 }, /* XF86MyComputer */ - { 0x1008ff67, 27962 }, /* XF86MySites */ - { 0x1008ff68, 27974 }, /* XF86New */ - { 0x1008ff69, 27982 }, /* XF86News */ - { 0x1008fe22, 27991 }, /* XF86Next_VMode */ - { 0x1008ff6a, 28006 }, /* XF86OfficeHome */ - { 0x1008ff6b, 28021 }, /* XF86Open */ - { 0x1008ff38, 28030 }, /* XF86OpenURL */ - { 0x1008ff6c, 28042 }, /* XF86Option */ - { 0x1008ff6d, 28053 }, /* XF86Paste */ - { 0x1008ff6e, 28063 }, /* XF86Phone */ - { 0x1008ff91, 28073 }, /* XF86Pictures */ - { 0x1008ff21, 28086 }, /* XF86PowerDown */ - { 0x1008ff2a, 28100 }, /* XF86PowerOff */ - { 0x1008fe23, 28113 }, /* XF86Prev_VMode */ - { 0x1008ff70, 28128 }, /* XF86Q */ - { 0x1008ffa3, 28134 }, /* XF86Red */ - { 0x1008ff29, 28142 }, /* XF86Refresh */ - { 0x1008ff73, 28154 }, /* XF86Reload */ - { 0x1008ff72, 28165 }, /* XF86Reply */ - { 0x1008ffb5, 28175 }, /* XF86RFKill */ - { 0x1008ff24, 28186 }, /* XF86RockerDown */ - { 0x1008ff25, 28201 }, /* XF86RockerEnter */ - { 0x1008ff23, 28217 }, /* XF86RockerUp */ - { 0x1008ff74, 28230 }, /* XF86RotateWindows */ - { 0x1008ff76, 28248 }, /* XF86RotationKB */ - { 0x1008ff75, 28263 }, /* XF86RotationPB */ - { 0x1008ff77, 28278 }, /* XF86Save */ - { 0x1008ff2d, 28287 }, /* XF86ScreenSaver */ - { 0x1008ff7a, 28303 }, /* XF86ScrollClick */ - { 0x1008ff79, 28319 }, /* XF86ScrollDown */ - { 0x1008ff78, 28334 }, /* XF86ScrollUp */ - { 0x1008ff1b, 28347 }, /* XF86Search */ - { 0x1008ffa0, 28358 }, /* XF86Select */ - { 0x1008ff7b, 28369 }, /* XF86Send */ - { 0x1008ff36, 28378 }, /* XF86Shop */ - { 0x1008ff2f, 28387 }, /* XF86Sleep */ - { 0x1008ff7c, 28397 }, /* XF86Spell */ - { 0x1008ff7d, 28407 }, /* XF86SplitScreen */ - { 0x1008ff10, 28423 }, /* XF86Standby */ - { 0x1008ff1a, 28435 }, /* XF86Start */ - { 0x1008ff28, 28445 }, /* XF86Stop */ - { 0x1008ff9a, 28454 }, /* XF86Subtitle */ - { 0x1008ff7e, 28467 }, /* XF86Support */ - { 0x1008ffa7, 28479 }, /* XF86Suspend */ - { 0x1008fe01, 28491 }, /* XF86Switch_VT_1 */ - { 0x1008fe0a, 28507 }, /* XF86Switch_VT_10 */ - { 0x1008fe0b, 28524 }, /* XF86Switch_VT_11 */ - { 0x1008fe0c, 28541 }, /* XF86Switch_VT_12 */ - { 0x1008fe02, 28558 }, /* XF86Switch_VT_2 */ - { 0x1008fe03, 28574 }, /* XF86Switch_VT_3 */ - { 0x1008fe04, 28590 }, /* XF86Switch_VT_4 */ - { 0x1008fe05, 28606 }, /* XF86Switch_VT_5 */ - { 0x1008fe06, 28622 }, /* XF86Switch_VT_6 */ - { 0x1008fe07, 28638 }, /* XF86Switch_VT_7 */ - { 0x1008fe08, 28654 }, /* XF86Switch_VT_8 */ - { 0x1008fe09, 28670 }, /* XF86Switch_VT_9 */ - { 0x1008ff7f, 28686 }, /* XF86TaskPane */ - { 0x1008ff80, 28699 }, /* XF86Terminal */ - { 0x1008ff9f, 28712 }, /* XF86Time */ - { 0x1008ff1f, 28721 }, /* XF86ToDoList */ - { 0x1008ff81, 28734 }, /* XF86Tools */ - { 0x1008ffa2, 28744 }, /* XF86TopMenu */ - { 0x1008ffb1, 28756 }, /* XF86TouchpadOff */ - { 0x1008ffb0, 28772 }, /* XF86TouchpadOn */ - { 0x1008ffa9, 28787 }, /* XF86TouchpadToggle */ - { 0x1008ff82, 28806 }, /* XF86Travel */ - { 0x1008fe20, 28817 }, /* XF86Ungrab */ - { 0x1008ff85, 28828 }, /* XF86User1KB */ - { 0x1008ff86, 28840 }, /* XF86User2KB */ - { 0x1008ff84, 28852 }, /* XF86UserPB */ - { 0x1008ff96, 28863 }, /* XF86UWB */ - { 0x1008ff34, 28871 }, /* XF86VendorHome */ - { 0x1008ff87, 28886 }, /* XF86Video */ - { 0x1008ffa1, 28896 }, /* XF86View */ - { 0x1008ff2b, 28905 }, /* XF86WakeUp */ - { 0x1008ff8f, 28916 }, /* XF86WebCam */ - { 0x1008ff88, 28927 }, /* XF86WheelButton */ - { 0x1008ff95, 28943 }, /* XF86WLAN */ - { 0x1008ff89, 28952 }, /* XF86Word */ - { 0x1008ffb4, 28961 }, /* XF86WWAN */ - { 0x1008ff2e, 28970 }, /* XF86WWW */ - { 0x1008ff8a, 28978 }, /* XF86Xfer */ - { 0x1008ffa5, 28987 }, /* XF86Yellow */ - { 0x1008ff8b, 28998 }, /* XF86ZoomIn */ - { 0x1008ff8c, 29009 }, /* XF86ZoomOut */ - { 0x00000059, 29021 }, /* Y */ - { 0x00000079, 29023 }, /* y */ - { 0x000000dd, 29025 }, /* Yacute */ - { 0x000000fd, 29032 }, /* yacute */ - { 0x01001ef4, 29039 }, /* Ybelowdot */ - { 0x01001ef5, 29049 }, /* ybelowdot */ - { 0x01000176, 29059 }, /* Ycircumflex */ - { 0x01000177, 29071 }, /* ycircumflex */ - { 0x000000ff, 29083 }, /* ydiaeresis */ - { 0x000013be, 29094 }, /* Ydiaeresis */ - { 0x000000a5, 29105 }, /* yen */ - { 0x01001ef2, 29109 }, /* Ygrave */ - { 0x01001ef3, 29116 }, /* ygrave */ - { 0x01001ef6, 29123 }, /* Yhook */ - { 0x01001ef7, 29129 }, /* yhook */ - { 0x01001ef8, 29135 }, /* Ytilde */ - { 0x01001ef9, 29142 }, /* ytilde */ - { 0x0000005a, 29149 }, /* Z */ - { 0x0000007a, 29151 }, /* z */ - { 0x000001af, 29153 }, /* Zabovedot */ - { 0x000001bf, 29163 }, /* zabovedot */ - { 0x000001ac, 29173 }, /* Zacute */ - { 0x000001bc, 29180 }, /* zacute */ - { 0x000001ae, 29187 }, /* Zcaron */ - { 0x000001be, 29194 }, /* zcaron */ - { 0x0000ff3d, 29201 }, /* Zen_Koho */ - { 0x0000ff28, 29210 }, /* Zenkaku */ - { 0x0000ff2a, 29218 }, /* Zenkaku_Hankaku */ - { 0x01002080, 29234 }, /* zerosubscript */ - { 0x01002070, 29248 }, /* zerosuperior */ - { 0x010001b5, 29261 }, /* Zstroke */ - { 0x010001b6, 29269 }, /* zstroke */ -}; - -static const struct name_keysym keysym_to_name[] = { - { 0x00000000, 20091 }, /* NoSymbol */ - { 0x00000020, 23803 }, /* space */ - { 0x00000021, 12099 }, /* exclam */ - { 0x00000022, 22187 }, /* quotedbl */ - { 0x00000023, 20178 }, /* numbersign */ - { 0x00000024, 11251 }, /* dollar */ - { 0x00000025, 21487 }, /* percent */ - { 0x00000026, 908 }, /* ampersand */ - { 0x00000027, 934 }, /* apostrophe */ - { 0x00000028, 21425 }, /* parenleft */ - { 0x00000029, 21435 }, /* parenright */ - { 0x0000002a, 3283 }, /* asterisk */ - { 0x0000002b, 21557 }, /* plus */ - { 0x0000002c, 8680 }, /* comma */ - { 0x0000002d, 19733 }, /* minus */ - { 0x0000002e, 21495 }, /* period */ - { 0x0000002f, 23768 }, /* slash */ - { 0x00000030, 0 }, /* 0 */ - { 0x00000031, 2 }, /* 1 */ - { 0x00000032, 4 }, /* 2 */ - { 0x00000033, 6 }, /* 3 */ - { 0x00000034, 386 }, /* 4 */ - { 0x00000035, 388 }, /* 5 */ - { 0x00000036, 390 }, /* 6 */ - { 0x00000037, 392 }, /* 7 */ - { 0x00000038, 394 }, /* 8 */ - { 0x00000039, 396 }, /* 9 */ - { 0x0000003a, 8664 }, /* colon */ - { 0x0000003b, 22734 }, /* semicolon */ - { 0x0000003c, 19412 }, /* less */ - { 0x0000003d, 12051 }, /* equal */ - { 0x0000003e, 13272 }, /* greater */ - { 0x0000003f, 22165 }, /* question */ - { 0x00000040, 3292 }, /* at */ - { 0x00000041, 398 }, /* A */ - { 0x00000042, 3328 }, /* B */ - { 0x00000043, 8439 }, /* C */ - { 0x00000044, 10320 }, /* D */ - { 0x00000045, 11424 }, /* E */ - { 0x00000046, 12155 }, /* F */ - { 0x00000047, 12665 }, /* G */ - { 0x00000048, 14378 }, /* H */ - { 0x00000049, 17069 }, /* I */ - { 0x0000004a, 18114 }, /* J */ - { 0x0000004b, 18146 }, /* K */ - { 0x0000004c, 19112 }, /* L */ - { 0x0000004d, 19533 }, /* M */ - { 0x0000004e, 19943 }, /* N */ - { 0x0000004f, 20200 }, /* O */ - { 0x00000050, 21373 }, /* P */ - { 0x00000051, 22156 }, /* Q */ - { 0x00000052, 22217 }, /* R */ - { 0x00000053, 22579 }, /* S */ - { 0x00000054, 24294 }, /* T */ - { 0x00000055, 25847 }, /* U */ - { 0x00000056, 26483 }, /* V */ - { 0x00000057, 26545 }, /* W */ - { 0x00000058, 26631 }, /* X */ - { 0x00000059, 29021 }, /* Y */ - { 0x0000005a, 29149 }, /* Z */ - { 0x0000005b, 3603 }, /* bracketleft */ - { 0x0000005c, 3352 }, /* backslash */ - { 0x0000005d, 3615 }, /* bracketright */ - { 0x0000005e, 3260 }, /* asciicircum */ - { 0x0000005f, 26346 }, /* underscore */ - { 0x00000060, 13266 }, /* grave */ - { 0x00000061, 400 }, /* a */ - { 0x00000062, 3330 }, /* b */ - { 0x00000063, 8441 }, /* c */ - { 0x00000064, 10322 }, /* d */ - { 0x00000065, 11426 }, /* e */ - { 0x00000066, 12157 }, /* f */ - { 0x00000067, 12667 }, /* g */ - { 0x00000068, 14380 }, /* h */ - { 0x00000069, 17071 }, /* i */ - { 0x0000006a, 18116 }, /* j */ - { 0x0000006b, 18148 }, /* k */ - { 0x0000006c, 19114 }, /* l */ - { 0x0000006d, 19535 }, /* m */ - { 0x0000006e, 19945 }, /* n */ - { 0x0000006f, 20202 }, /* o */ - { 0x00000070, 21375 }, /* p */ - { 0x00000071, 22158 }, /* q */ - { 0x00000072, 22219 }, /* r */ - { 0x00000073, 22581 }, /* s */ - { 0x00000074, 24296 }, /* t */ - { 0x00000075, 25849 }, /* u */ - { 0x00000076, 26485 }, /* v */ - { 0x00000077, 26547 }, /* w */ - { 0x00000078, 26633 }, /* x */ - { 0x00000079, 29023 }, /* y */ - { 0x0000007a, 29151 }, /* z */ - { 0x0000007b, 3582 }, /* braceleft */ - { 0x0000007c, 3392 }, /* bar */ - { 0x0000007d, 3592 }, /* braceright */ - { 0x0000007e, 3272 }, /* asciitilde */ - { 0x000000a0, 20078 }, /* nobreakspace */ - { 0x000000a1, 12106 }, /* exclamdown */ - { 0x000000a2, 8589 }, /* cent */ - { 0x000000a3, 23827 }, /* sterling */ - { 0x000000a4, 8766 }, /* currency */ - { 0x000000a5, 29105 }, /* yen */ - { 0x000000a6, 8389 }, /* brokenbar */ - { 0x000000a7, 22719 }, /* section */ - { 0x000000a8, 11203 }, /* diaeresis */ - { 0x000000a9, 8717 }, /* copyright */ - { 0x000000aa, 20852 }, /* ordfeminine */ - { 0x000000ab, 14349 }, /* guillemotleft */ - { 0x000000ac, 20147 }, /* notsign */ - { 0x000000ad, 17062 }, /* hyphen */ - { 0x000000ae, 22331 }, /* registered */ - { 0x000000af, 19641 }, /* macron */ - { 0x000000b0, 11153 }, /* degree */ - { 0x000000b1, 21562 }, /* plusminus */ - { 0x000000b2, 25825 }, /* twosuperior */ - { 0x000000b3, 25571 }, /* threesuperior */ - { 0x000000b4, 820 }, /* acute */ - { 0x000000b5, 19799 }, /* mu */ - { 0x000000b6, 21415 }, /* paragraph */ - { 0x000000b7, 21502 }, /* periodcentered */ - { 0x000000b8, 8581 }, /* cedilla */ - { 0x000000b9, 20755 }, /* onesuperior */ - { 0x000000ba, 19688 }, /* masculine */ - { 0x000000bb, 14363 }, /* guillemotright */ - { 0x000000bc, 20722 }, /* onequarter */ - { 0x000000bd, 20714 }, /* onehalf */ - { 0x000000be, 25542 }, /* threequarters */ - { 0x000000bf, 22174 }, /* questiondown */ - { 0x000000c0, 854 }, /* Agrave */ - { 0x000000c1, 402 }, /* Aacute */ - { 0x000000c2, 622 }, /* Acircumflex */ - { 0x000000c3, 3295 }, /* Atilde */ - { 0x000000c4, 826 }, /* Adiaeresis */ - { 0x000000c5, 2036 }, /* Aring */ - { 0x000000c6, 848 }, /* AE */ - { 0x000000c7, 8539 }, /* Ccedilla */ - { 0x000000c8, 11724 }, /* Egrave */ - { 0x000000c9, 11448 }, /* Eacute */ - { 0x000000ca, 11496 }, /* Ecircumflex */ - { 0x000000cb, 11702 }, /* Ediaeresis */ - { 0x000000cc, 17205 }, /* Igrave */ - { 0x000000cd, 17083 }, /* Iacute */ - { 0x000000ce, 17131 }, /* Icircumflex */ - { 0x000000cf, 17165 }, /* Idiaeresis */ - { 0x000000d0, 12064 }, /* ETH */ - { 0x000000d1, 20155 }, /* Ntilde */ - { 0x000000d2, 20527 }, /* Ograve */ - { 0x000000d3, 20204 }, /* Oacute */ - { 0x000000d4, 20268 }, /* Ocircumflex */ - { 0x000000d5, 21310 }, /* Otilde */ - { 0x000000d6, 20466 }, /* Odiaeresis */ - { 0x000000d7, 19839 }, /* multiply */ - { 0x000000d8, 21296 }, /* Oslash */ - { 0x000000d9, 25971 }, /* Ugrave */ - { 0x000000da, 25851 }, /* Uacute */ - { 0x000000db, 25899 }, /* Ucircumflex */ - { 0x000000dc, 25923 }, /* Udiaeresis */ - { 0x000000dd, 29025 }, /* Yacute */ - { 0x000000de, 25499 }, /* THORN */ - { 0x000000df, 23820 }, /* ssharp */ - { 0x000000e0, 861 }, /* agrave */ - { 0x000000e1, 409 }, /* aacute */ - { 0x000000e2, 634 }, /* acircumflex */ - { 0x000000e3, 3302 }, /* atilde */ - { 0x000000e4, 837 }, /* adiaeresis */ - { 0x000000e5, 2042 }, /* aring */ - { 0x000000e6, 851 }, /* ae */ - { 0x000000e7, 8548 }, /* ccedilla */ - { 0x000000e8, 11731 }, /* egrave */ - { 0x000000e9, 11455 }, /* eacute */ - { 0x000000ea, 11508 }, /* ecircumflex */ - { 0x000000eb, 11713 }, /* ediaeresis */ - { 0x000000ec, 17212 }, /* igrave */ - { 0x000000ed, 17090 }, /* iacute */ - { 0x000000ee, 17143 }, /* icircumflex */ - { 0x000000ef, 17176 }, /* idiaeresis */ - { 0x000000f0, 12072 }, /* eth */ - { 0x000000f1, 20162 }, /* ntilde */ - { 0x000000f2, 20534 }, /* ograve */ - { 0x000000f3, 20211 }, /* oacute */ - { 0x000000f4, 20280 }, /* ocircumflex */ - { 0x000000f5, 21317 }, /* otilde */ - { 0x000000f6, 20477 }, /* odiaeresis */ - { 0x000000f7, 11242 }, /* division */ - { 0x000000f8, 21303 }, /* oslash */ - { 0x000000f9, 25978 }, /* ugrave */ - { 0x000000fa, 25858 }, /* uacute */ - { 0x000000fb, 25911 }, /* ucircumflex */ - { 0x000000fc, 25934 }, /* udiaeresis */ - { 0x000000fd, 29032 }, /* yacute */ - { 0x000000fe, 25511 }, /* thorn */ - { 0x000000ff, 29083 }, /* ydiaeresis */ - { 0x000001a1, 918 }, /* Aogonek */ - { 0x000001a2, 8383 }, /* breve */ - { 0x000001a3, 19517 }, /* Lstroke */ - { 0x000001a5, 19212 }, /* Lcaron */ - { 0x000001a6, 22603 }, /* Sacute */ - { 0x000001a9, 22617 }, /* Scaron */ - { 0x000001aa, 22631 }, /* Scedilla */ - { 0x000001ab, 24322 }, /* Tcaron */ - { 0x000001ac, 29173 }, /* Zacute */ - { 0x000001ae, 29187 }, /* Zcaron */ - { 0x000001af, 29153 }, /* Zabovedot */ - { 0x000001b1, 926 }, /* aogonek */ - { 0x000001b2, 20520 }, /* ogonek */ - { 0x000001b3, 19525 }, /* lstroke */ - { 0x000001b5, 19219 }, /* lcaron */ - { 0x000001b6, 22610 }, /* sacute */ - { 0x000001b7, 8519 }, /* caron */ - { 0x000001b9, 22624 }, /* scaron */ - { 0x000001ba, 22640 }, /* scedilla */ - { 0x000001bb, 24329 }, /* tcaron */ - { 0x000001bc, 29180 }, /* zacute */ - { 0x000001bd, 11283 }, /* doubleacute */ - { 0x000001be, 29194 }, /* zcaron */ - { 0x000001bf, 29163 }, /* zabovedot */ - { 0x000001c0, 22272 }, /* Racute */ - { 0x000001c3, 445 }, /* Abreve */ - { 0x000001c5, 19147 }, /* Lacute */ - { 0x000001c6, 8475 }, /* Cacute */ - { 0x000001c8, 8525 }, /* Ccaron */ - { 0x000001ca, 12035 }, /* Eogonek */ - { 0x000001cc, 11482 }, /* Ecaron */ - { 0x000001cf, 10365 }, /* Dcaron */ - { 0x000001d0, 11401 }, /* Dstroke */ - { 0x000001d1, 19953 }, /* Nacute */ - { 0x000001d2, 19977 }, /* Ncaron */ - { 0x000001d5, 20488 }, /* Odoubleacute */ - { 0x000001d8, 22294 }, /* Rcaron */ - { 0x000001d9, 26452 }, /* Uring */ - { 0x000001db, 25945 }, /* Udoubleacute */ - { 0x000001de, 24336 }, /* Tcedilla */ - { 0x000001e0, 22279 }, /* racute */ - { 0x000001e3, 452 }, /* abreve */ - { 0x000001e5, 19154 }, /* lacute */ - { 0x000001e6, 8482 }, /* cacute */ - { 0x000001e8, 8532 }, /* ccaron */ - { 0x000001ea, 12043 }, /* eogonek */ - { 0x000001ec, 11489 }, /* ecaron */ - { 0x000001ef, 10372 }, /* dcaron */ - { 0x000001f0, 11409 }, /* dstroke */ - { 0x000001f1, 19960 }, /* nacute */ - { 0x000001f2, 19984 }, /* ncaron */ - { 0x000001f5, 20501 }, /* odoubleacute */ - { 0x000001f8, 22301 }, /* rcaron */ - { 0x000001f9, 26458 }, /* uring */ - { 0x000001fb, 25958 }, /* udoubleacute */ - { 0x000001fe, 24345 }, /* tcedilla */ - { 0x000001ff, 436 }, /* abovedot */ - { 0x000002a1, 17027 }, /* Hstroke */ - { 0x000002a6, 16056 }, /* Hcircumflex */ - { 0x000002a9, 17073 }, /* Iabovedot */ - { 0x000002ab, 12689 }, /* Gbreve */ - { 0x000002ac, 18118 }, /* Jcircumflex */ - { 0x000002b1, 17035 }, /* hstroke */ - { 0x000002b6, 16068 }, /* hcircumflex */ - { 0x000002b9, 17187 }, /* idotless */ - { 0x000002bb, 12696 }, /* gbreve */ - { 0x000002bc, 18130 }, /* jcircumflex */ - { 0x000002c5, 8455 }, /* Cabovedot */ - { 0x000002c6, 8557 }, /* Ccircumflex */ - { 0x000002d5, 12669 }, /* Gabovedot */ - { 0x000002d8, 12735 }, /* Gcircumflex */ - { 0x000002dd, 25885 }, /* Ubreve */ - { 0x000002de, 22661 }, /* Scircumflex */ - { 0x000002e5, 8465 }, /* cabovedot */ - { 0x000002e6, 8569 }, /* ccircumflex */ - { 0x000002f5, 12679 }, /* gabovedot */ - { 0x000002f8, 12747 }, /* gcircumflex */ - { 0x000002fd, 25892 }, /* ubreve */ - { 0x000002fe, 22673 }, /* scircumflex */ - { 0x000003a2, 19108 }, /* kra */ - { 0x000003a3, 22308 }, /* Rcedilla */ - { 0x000003a5, 18100 }, /* Itilde */ - { 0x000003a6, 19226 }, /* Lcedilla */ - { 0x000003aa, 11839 }, /* Emacron */ - { 0x000003ab, 12717 }, /* Gcedilla */ - { 0x000003ac, 25788 }, /* Tslash */ - { 0x000003b3, 22317 }, /* rcedilla */ - { 0x000003b5, 18107 }, /* itilde */ - { 0x000003b6, 19235 }, /* lcedilla */ - { 0x000003ba, 11847 }, /* emacron */ - { 0x000003bb, 12726 }, /* gcedilla */ - { 0x000003bc, 25795 }, /* tslash */ - { 0x000003bd, 11983 }, /* ENG */ - { 0x000003bf, 11987 }, /* eng */ - { 0x000003c0, 892 }, /* Amacron */ - { 0x000003c7, 17338 }, /* Iogonek */ - { 0x000003cc, 11428 }, /* Eabovedot */ - { 0x000003cf, 17231 }, /* Imacron */ - { 0x000003d1, 19991 }, /* Ncedilla */ - { 0x000003d2, 20679 }, /* Omacron */ - { 0x000003d3, 18779 }, /* Kcedilla */ - { 0x000003d9, 26368 }, /* Uogonek */ - { 0x000003dd, 26469 }, /* Utilde */ - { 0x000003de, 26321 }, /* Umacron */ - { 0x000003e0, 900 }, /* amacron */ - { 0x000003e7, 17346 }, /* iogonek */ - { 0x000003ec, 11438 }, /* eabovedot */ - { 0x000003ef, 17239 }, /* imacron */ - { 0x000003f1, 20000 }, /* ncedilla */ - { 0x000003f2, 20687 }, /* omacron */ - { 0x000003f3, 18788 }, /* kcedilla */ - { 0x000003f9, 26376 }, /* uogonek */ - { 0x000003fd, 26476 }, /* utilde */ - { 0x000003fe, 26329 }, /* umacron */ - { 0x0000047e, 21364 }, /* overline */ - { 0x000004a1, 18243 }, /* kana_fullstop */ - { 0x000004a2, 18477 }, /* kana_openingbracket */ - { 0x000004a3, 18173 }, /* kana_closingbracket */ - { 0x000004a4, 18193 }, /* kana_comma */ - { 0x000004a5, 18204 }, /* kana_conjunctive */ - { 0x000004a6, 18689 }, /* kana_WO */ - { 0x000004a7, 18150 }, /* kana_a */ - { 0x000004a8, 18297 }, /* kana_i */ - { 0x000004a9, 18667 }, /* kana_u */ - { 0x000004aa, 18221 }, /* kana_e */ - { 0x000004ab, 18463 }, /* kana_o */ - { 0x000004ac, 18697 }, /* kana_ya */ - { 0x000004ad, 18729 }, /* kana_yu */ - { 0x000004ae, 18713 }, /* kana_yo */ - { 0x000004af, 18633 }, /* kana_tsu */ - { 0x000004b0, 22130 }, /* prolongedsound */ - { 0x000004b1, 18157 }, /* kana_A */ - { 0x000004b2, 18304 }, /* kana_I */ - { 0x000004b3, 18674 }, /* kana_U */ - { 0x000004b4, 18228 }, /* kana_E */ - { 0x000004b5, 18470 }, /* kana_O */ - { 0x000004b6, 18311 }, /* kana_KA */ - { 0x000004b7, 18327 }, /* kana_KI */ - { 0x000004b8, 18343 }, /* kana_KU */ - { 0x000004b9, 18319 }, /* kana_KE */ - { 0x000004ba, 18335 }, /* kana_KO */ - { 0x000004bb, 18537 }, /* kana_SA */ - { 0x000004bc, 18553 }, /* kana_SHI */ - { 0x000004bd, 18581 }, /* kana_SU */ - { 0x000004be, 18545 }, /* kana_SE */ - { 0x000004bf, 18573 }, /* kana_SO */ - { 0x000004c0, 18601 }, /* kana_TA */ - { 0x000004c1, 18164 }, /* kana_CHI */ - { 0x000004c2, 18642 }, /* kana_TSU */ - { 0x000004c3, 18609 }, /* kana_TE */ - { 0x000004c4, 18625 }, /* kana_TO */ - { 0x000004c5, 18423 }, /* kana_NA */ - { 0x000004c6, 18439 }, /* kana_NI */ - { 0x000004c7, 18455 }, /* kana_NU */ - { 0x000004c8, 18431 }, /* kana_NE */ - { 0x000004c9, 18447 }, /* kana_NO */ - { 0x000004ca, 18257 }, /* kana_HA */ - { 0x000004cb, 18273 }, /* kana_HI */ - { 0x000004cc, 18235 }, /* kana_FU */ - { 0x000004cd, 18265 }, /* kana_HE */ - { 0x000004ce, 18281 }, /* kana_HO */ - { 0x000004cf, 18361 }, /* kana_MA */ - { 0x000004d0, 18377 }, /* kana_MI */ - { 0x000004d1, 18408 }, /* kana_MU */ - { 0x000004d2, 18369 }, /* kana_ME */ - { 0x000004d3, 18400 }, /* kana_MO */ - { 0x000004d4, 18705 }, /* kana_YA */ - { 0x000004d5, 18737 }, /* kana_YU */ - { 0x000004d6, 18721 }, /* kana_YO */ - { 0x000004d7, 18497 }, /* kana_RA */ - { 0x000004d8, 18513 }, /* kana_RI */ - { 0x000004d9, 18529 }, /* kana_RU */ - { 0x000004da, 18505 }, /* kana_RE */ - { 0x000004db, 18521 }, /* kana_RO */ - { 0x000004dc, 18681 }, /* kana_WA */ - { 0x000004dd, 18416 }, /* kana_N */ - { 0x000004de, 26519 }, /* voicedsound */ - { 0x000004df, 22744 }, /* semivoicedsound */ - { 0x000005ac, 1109 }, /* Arabic_comma */ - { 0x000005bb, 1764 }, /* Arabic_semicolon */ - { 0x000005bf, 1698 }, /* Arabic_question_mark */ - { 0x000005c1, 1303 }, /* Arabic_hamza */ - { 0x000005c2, 1599 }, /* Arabic_maddaonalef */ - { 0x000005c3, 1354 }, /* Arabic_hamzaonalef */ - { 0x000005c4, 1373 }, /* Arabic_hamzaonwaw */ - { 0x000005c5, 1409 }, /* Arabic_hamzaunderalef */ - { 0x000005c6, 1391 }, /* Arabic_hamzaonyeh */ - { 0x000005c7, 1067 }, /* Arabic_alef */ - { 0x000005c8, 1098 }, /* Arabic_beh */ - { 0x000005c9, 1909 }, /* Arabic_tehmarbuta */ - { 0x000005ca, 1898 }, /* Arabic_teh */ - { 0x000005cb, 1939 }, /* Arabic_theh */ - { 0x000005cc, 1481 }, /* Arabic_jeem */ - { 0x000005cd, 1292 }, /* Arabic_hah */ - { 0x000005ce, 1557 }, /* Arabic_khah */ - { 0x000005cf, 1133 }, /* Arabic_dal */ - { 0x000005d0, 1927 }, /* Arabic_thal */ - { 0x000005d1, 1719 }, /* Arabic_ra */ - { 0x000005d2, 2024 }, /* Arabic_zain */ - { 0x000005d3, 1752 }, /* Arabic_seen */ - { 0x000005d4, 1795 }, /* Arabic_sheen */ - { 0x000005d5, 1741 }, /* Arabic_sad */ - { 0x000005d6, 1122 }, /* Arabic_dad */ - { 0x000005d7, 1859 }, /* Arabic_tah */ - { 0x000005d8, 2013 }, /* Arabic_zah */ - { 0x000005d9, 1056 }, /* Arabic_ain */ - { 0x000005da, 1269 }, /* Arabic_ghain */ - { 0x000005e0, 1870 }, /* Arabic_tatweel */ - { 0x000005e1, 1231 }, /* Arabic_feh */ - { 0x000005e2, 1687 }, /* Arabic_qaf */ - { 0x000005e3, 1504 }, /* Arabic_kaf */ - { 0x000005e4, 1569 }, /* Arabic_lam */ - { 0x000005e5, 1618 }, /* Arabic_meem */ - { 0x000005e6, 1630 }, /* Arabic_noon */ - { 0x000005e7, 1282 }, /* Arabic_ha */ - { 0x000005e8, 1974 }, /* Arabic_waw */ - { 0x000005e9, 1079 }, /* Arabic_alefmaksura */ - { 0x000005ea, 1985 }, /* Arabic_yeh */ - { 0x000005eb, 1215 }, /* Arabic_fathatan */ - { 0x000005ec, 1157 }, /* Arabic_dammatan */ - { 0x000005ed, 1528 }, /* Arabic_kasratan */ - { 0x000005ee, 1202 }, /* Arabic_fatha */ - { 0x000005ef, 1144 }, /* Arabic_damma */ - { 0x000005f0, 1515 }, /* Arabic_kasra */ - { 0x000005f1, 1781 }, /* Arabic_shadda */ - { 0x000005f2, 1808 }, /* Arabic_sukun */ - { 0x000006a1, 22760 }, /* Serbian_dje */ - { 0x000006a2, 19585 }, /* Macedonia_gje */ - { 0x000006a3, 9456 }, /* Cyrillic_io */ - { 0x000006a4, 26199 }, /* Ukrainian_ie */ - { 0x000006a5, 19557 }, /* Macedonia_dse */ - { 0x000006a6, 26175 }, /* Ukrainian_i */ - { 0x000006a7, 26225 }, /* Ukrainian_yi */ - { 0x000006a8, 9480 }, /* Cyrillic_je */ - { 0x000006a9, 9618 }, /* Cyrillic_lje */ - { 0x000006aa, 9644 }, /* Cyrillic_nje */ - { 0x000006ab, 22878 }, /* Serbian_tshe */ - { 0x000006ac, 19613 }, /* Macedonia_kje */ - { 0x000006ad, 26123 }, /* Ukrainian_ghe_with_upturn */ - { 0x000006ae, 8399 }, /* Byelorussian_shortu */ - { 0x000006af, 8972 }, /* Cyrillic_dzhe */ - { 0x000006b0, 20189 }, /* numerosign */ - { 0x000006b1, 22772 }, /* Serbian_DJE */ - { 0x000006b2, 19599 }, /* Macedonia_GJE */ - { 0x000006b3, 9468 }, /* Cyrillic_IO */ - { 0x000006b4, 26212 }, /* Ukrainian_IE */ - { 0x000006b5, 19571 }, /* Macedonia_DSE */ - { 0x000006b6, 26187 }, /* Ukrainian_I */ - { 0x000006b7, 26238 }, /* Ukrainian_YI */ - { 0x000006b8, 9492 }, /* Cyrillic_JE */ - { 0x000006b9, 9631 }, /* Cyrillic_LJE */ - { 0x000006ba, 9657 }, /* Cyrillic_NJE */ - { 0x000006bb, 22891 }, /* Serbian_TSHE */ - { 0x000006bc, 19627 }, /* Macedonia_KJE */ - { 0x000006bd, 26149 }, /* Ukrainian_GHE_WITH_UPTURN */ - { 0x000006be, 8419 }, /* Byelorussian_SHORTU */ - { 0x000006bf, 8986 }, /* Cyrillic_DZHE */ - { 0x000006c0, 10200 }, /* Cyrillic_yu */ - { 0x000006c1, 8782 }, /* Cyrillic_a */ - { 0x000006c2, 8804 }, /* Cyrillic_be */ - { 0x000006c3, 9952 }, /* Cyrillic_tse */ - { 0x000006c4, 8948 }, /* Cyrillic_de */ - { 0x000006c5, 9432 }, /* Cyrillic_ie */ - { 0x000006c6, 9022 }, /* Cyrillic_ef */ - { 0x000006c7, 9210 }, /* Cyrillic_ghe */ - { 0x000006c8, 9270 }, /* Cyrillic_ha */ - { 0x000006c9, 9374 }, /* Cyrillic_i */ - { 0x000006ca, 9860 }, /* Cyrillic_shorti */ - { 0x000006cb, 9504 }, /* Cyrillic_ka */ - { 0x000006cc, 9046 }, /* Cyrillic_el */ - { 0x000006cd, 9070 }, /* Cyrillic_em */ - { 0x000006ce, 9094 }, /* Cyrillic_en */ - { 0x000006cf, 9670 }, /* Cyrillic_o */ - { 0x000006d0, 9722 }, /* Cyrillic_pe */ - { 0x000006d1, 10148 }, /* Cyrillic_ya */ - { 0x000006d2, 9162 }, /* Cyrillic_er */ - { 0x000006d3, 9186 }, /* Cyrillic_es */ - { 0x000006d4, 9928 }, /* Cyrillic_te */ - { 0x000006d5, 9978 }, /* Cyrillic_u */ - { 0x000006d6, 10248 }, /* Cyrillic_zhe */ - { 0x000006d7, 10124 }, /* Cyrillic_ve */ - { 0x000006d8, 9892 }, /* Cyrillic_softsign */ - { 0x000006d9, 10172 }, /* Cyrillic_yeru */ - { 0x000006da, 10224 }, /* Cyrillic_ze */ - { 0x000006db, 9776 }, /* Cyrillic_sha */ - { 0x000006dc, 9000 }, /* Cyrillic_e */ - { 0x000006dd, 9802 }, /* Cyrillic_shcha */ - { 0x000006de, 8828 }, /* Cyrillic_che */ - { 0x000006df, 9338 }, /* Cyrillic_hardsign */ - { 0x000006e0, 10212 }, /* Cyrillic_YU */ - { 0x000006e1, 8793 }, /* Cyrillic_A */ - { 0x000006e2, 8816 }, /* Cyrillic_BE */ - { 0x000006e3, 9965 }, /* Cyrillic_TSE */ - { 0x000006e4, 8960 }, /* Cyrillic_DE */ - { 0x000006e5, 9444 }, /* Cyrillic_IE */ - { 0x000006e6, 9034 }, /* Cyrillic_EF */ - { 0x000006e7, 9223 }, /* Cyrillic_GHE */ - { 0x000006e8, 9282 }, /* Cyrillic_HA */ - { 0x000006e9, 9385 }, /* Cyrillic_I */ - { 0x000006ea, 9876 }, /* Cyrillic_SHORTI */ - { 0x000006eb, 9516 }, /* Cyrillic_KA */ - { 0x000006ec, 9058 }, /* Cyrillic_EL */ - { 0x000006ed, 9082 }, /* Cyrillic_EM */ - { 0x000006ee, 9106 }, /* Cyrillic_EN */ - { 0x000006ef, 9681 }, /* Cyrillic_O */ - { 0x000006f0, 9734 }, /* Cyrillic_PE */ - { 0x000006f1, 10160 }, /* Cyrillic_YA */ - { 0x000006f2, 9174 }, /* Cyrillic_ER */ - { 0x000006f3, 9198 }, /* Cyrillic_ES */ - { 0x000006f4, 9940 }, /* Cyrillic_TE */ - { 0x000006f5, 9989 }, /* Cyrillic_U */ - { 0x000006f6, 10261 }, /* Cyrillic_ZHE */ - { 0x000006f7, 10136 }, /* Cyrillic_VE */ - { 0x000006f8, 9910 }, /* Cyrillic_SOFTSIGN */ - { 0x000006f9, 10186 }, /* Cyrillic_YERU */ - { 0x000006fa, 10236 }, /* Cyrillic_ZE */ - { 0x000006fb, 9789 }, /* Cyrillic_SHA */ - { 0x000006fc, 9011 }, /* Cyrillic_E */ - { 0x000006fd, 9817 }, /* Cyrillic_SHCHA */ - { 0x000006fe, 8841 }, /* Cyrillic_CHE */ - { 0x000006ff, 9356 }, /* Cyrillic_HARDSIGN */ - { 0x000007a1, 13342 }, /* Greek_ALPHAaccent */ - { 0x000007a2, 13472 }, /* Greek_EPSILONaccent */ - { 0x000007a3, 13532 }, /* Greek_ETAaccent */ - { 0x000007a4, 13647 }, /* Greek_IOTAaccent */ - { 0x000007a5, 13726 }, /* Greek_IOTAdieresis */ - { 0x000007a7, 13962 }, /* Greek_OMICRONaccent */ - { 0x000007a8, 14189 }, /* Greek_UPSILONaccent */ - { 0x000007a9, 14257 }, /* Greek_UPSILONdieresis */ - { 0x000007ab, 13898 }, /* Greek_OMEGAaccent */ - { 0x000007ae, 13297 }, /* Greek_accentdieresis */ - { 0x000007af, 13610 }, /* Greek_horizbar */ - { 0x000007b1, 13360 }, /* Greek_alphaaccent */ - { 0x000007b2, 13492 }, /* Greek_epsilonaccent */ - { 0x000007b3, 13548 }, /* Greek_etaaccent */ - { 0x000007b4, 13664 }, /* Greek_iotaaccent */ - { 0x000007b5, 13745 }, /* Greek_iotadieresis */ - { 0x000007b6, 13681 }, /* Greek_iotaaccentdieresis */ - { 0x000007b7, 13982 }, /* Greek_omicronaccent */ - { 0x000007b8, 14209 }, /* Greek_upsilonaccent */ - { 0x000007b9, 14279 }, /* Greek_upsilondieresis */ - { 0x000007ba, 14229 }, /* Greek_upsilonaccentdieresis */ - { 0x000007bb, 13916 }, /* Greek_omegaaccent */ - { 0x000007c1, 13318 }, /* Greek_ALPHA */ - { 0x000007c2, 13378 }, /* Greek_BETA */ - { 0x000007c3, 13586 }, /* Greek_GAMMA */ - { 0x000007c4, 13420 }, /* Greek_DELTA */ - { 0x000007c5, 13444 }, /* Greek_EPSILON */ - { 0x000007c6, 14319 }, /* Greek_ZETA */ - { 0x000007c7, 13512 }, /* Greek_ETA */ - { 0x000007c8, 14137 }, /* Greek_THETA */ - { 0x000007c9, 13625 }, /* Greek_IOTA */ - { 0x000007ca, 13764 }, /* Greek_KAPPA */ - { 0x000007cb, 13814 }, /* Greek_LAMDA */ - { 0x000007cc, 13838 }, /* Greek_MU */ - { 0x000007cd, 13856 }, /* Greek_NU */ - { 0x000007ce, 14301 }, /* Greek_XI */ - { 0x000007cf, 13934 }, /* Greek_OMICRON */ - { 0x000007d0, 14022 }, /* Greek_PI */ - { 0x000007d1, 14060 }, /* Greek_RHO */ - { 0x000007d2, 14080 }, /* Greek_SIGMA */ - { 0x000007d4, 14117 }, /* Greek_TAU */ - { 0x000007d5, 14161 }, /* Greek_UPSILON */ - { 0x000007d6, 14002 }, /* Greek_PHI */ - { 0x000007d7, 13400 }, /* Greek_CHI */ - { 0x000007d8, 14040 }, /* Greek_PSI */ - { 0x000007d9, 13874 }, /* Greek_OMEGA */ - { 0x000007e1, 13330 }, /* Greek_alpha */ - { 0x000007e2, 13389 }, /* Greek_beta */ - { 0x000007e3, 13598 }, /* Greek_gamma */ - { 0x000007e4, 13432 }, /* Greek_delta */ - { 0x000007e5, 13458 }, /* Greek_epsilon */ - { 0x000007e6, 14330 }, /* Greek_zeta */ - { 0x000007e7, 13522 }, /* Greek_eta */ - { 0x000007e8, 14149 }, /* Greek_theta */ - { 0x000007e9, 13636 }, /* Greek_iota */ - { 0x000007ea, 13776 }, /* Greek_kappa */ - { 0x000007eb, 13826 }, /* Greek_lamda */ - { 0x000007ec, 13847 }, /* Greek_mu */ - { 0x000007ed, 13865 }, /* Greek_nu */ - { 0x000007ee, 14310 }, /* Greek_xi */ - { 0x000007ef, 13948 }, /* Greek_omicron */ - { 0x000007f0, 14031 }, /* Greek_pi */ - { 0x000007f1, 14070 }, /* Greek_rho */ - { 0x000007f2, 14092 }, /* Greek_sigma */ - { 0x000007f3, 13564 }, /* Greek_finalsmallsigma */ - { 0x000007f4, 14127 }, /* Greek_tau */ - { 0x000007f5, 14175 }, /* Greek_upsilon */ - { 0x000007f6, 14012 }, /* Greek_phi */ - { 0x000007f7, 13410 }, /* Greek_chi */ - { 0x000007f8, 14050 }, /* Greek_psi */ - { 0x000007f9, 13886 }, /* Greek_omega */ - { 0x000008a1, 19356 }, /* leftradical */ - { 0x000008a2, 25621 }, /* topleftradical */ - { 0x000008a3, 16667 }, /* horizconnector */ - { 0x000008a4, 25595 }, /* topintegral */ - { 0x000008a5, 3422 }, /* botintegral */ - { 0x000008a6, 26505 }, /* vertconnector */ - { 0x000008a7, 25636 }, /* topleftsqbracket */ - { 0x000008a8, 3448 }, /* botleftsqbracket */ - { 0x000008a9, 25685 }, /* toprightsqbracket */ - { 0x000008aa, 3497 }, /* botrightsqbracket */ - { 0x000008ab, 25607 }, /* topleftparens */ - { 0x000008ac, 3434 }, /* botleftparens */ - { 0x000008ad, 25670 }, /* toprightparens */ - { 0x000008ae, 3482 }, /* botrightparens */ - { 0x000008af, 19306 }, /* leftmiddlecurlybrace */ - { 0x000008b0, 22440 }, /* rightmiddlecurlybrace */ - { 0x000008b1, 25653 }, /* topleftsummation */ - { 0x000008b2, 3465 }, /* botleftsummation */ - { 0x000008b3, 25726 }, /* topvertsummationconnector */ - { 0x000008b4, 3538 }, /* botvertsummationconnector */ - { 0x000008b5, 25703 }, /* toprightsummation */ - { 0x000008b6, 3515 }, /* botrightsummation */ - { 0x000008b7, 22462 }, /* rightmiddlesummation */ - { 0x000008bc, 19417 }, /* lessthanequal */ - { 0x000008bd, 20125 }, /* notequal */ - { 0x000008be, 13280 }, /* greaterthanequal */ - { 0x000008bf, 17313 }, /* integral */ - { 0x000008c0, 25479 }, /* therefore */ - { 0x000008c1, 26487 }, /* variation */ - { 0x000008c2, 17275 }, /* infinity */ - { 0x000008c5, 19947 }, /* nabla */ - { 0x000008c8, 954 }, /* approximate */ - { 0x000008c9, 22999 }, /* similarequal */ - { 0x000008cd, 17196 }, /* ifonlyif */ - { 0x000008ce, 17247 }, /* implies */ - { 0x000008cf, 17155 }, /* identical */ - { 0x000008d6, 22286 }, /* radical */ - { 0x000008da, 17255 }, /* includedin */ - { 0x000008db, 17266 }, /* includes */ - { 0x000008dc, 17322 }, /* intersection */ - { 0x000008dd, 26362 }, /* union */ - { 0x000008de, 19457 }, /* logicaland */ - { 0x000008df, 19468 }, /* logicalor */ - { 0x000008ef, 21463 }, /* partialderivative */ - { 0x000008f6, 12656 }, /* function */ - { 0x000008fb, 19266 }, /* leftarrow */ - { 0x000008fc, 26387 }, /* uparrow */ - { 0x000008fd, 22397 }, /* rightarrow */ - { 0x000008fe, 11332 }, /* downarrow */ - { 0x000009df, 3410 }, /* blank */ - { 0x000009e0, 23790 }, /* soliddiamond */ - { 0x000009e1, 8603 }, /* checkerboard */ - { 0x000009e2, 17043 }, /* ht */ - { 0x000009e3, 12413 }, /* ff */ - { 0x000009e4, 8727 }, /* cr */ - { 0x000009e5, 19431 }, /* lf */ - { 0x000009e8, 20075 }, /* nl */ - { 0x000009e9, 26542 }, /* vt */ - { 0x000009ea, 19502 }, /* lowrightcorner */ - { 0x000009eb, 26416 }, /* uprightcorner */ - { 0x000009ec, 26403 }, /* upleftcorner */ - { 0x000009ed, 19488 }, /* lowleftcorner */ - { 0x000009ee, 8730 }, /* crossinglines */ - { 0x000009ef, 16682 }, /* horizlinescan1 */ - { 0x000009f0, 16697 }, /* horizlinescan3 */ - { 0x000009f1, 16712 }, /* horizlinescan5 */ - { 0x000009f2, 16727 }, /* horizlinescan7 */ - { 0x000009f3, 16742 }, /* horizlinescan9 */ - { 0x000009f4, 19397 }, /* leftt */ - { 0x000009f5, 22545 }, /* rightt */ - { 0x000009f6, 3533 }, /* bott */ - { 0x000009f7, 25721 }, /* topt */ - { 0x000009f8, 26497 }, /* vertbar */ - { 0x00000aa1, 11928 }, /* emspace */ - { 0x00000aa2, 12027 }, /* enspace */ - { 0x00000aa3, 11821 }, /* em3space */ - { 0x00000aa4, 11830 }, /* em4space */ - { 0x00000aa5, 11221 }, /* digitspace */ - { 0x00000aa6, 22145 }, /* punctspace */ - { 0x00000aa7, 25489 }, /* thinspace */ - { 0x00000aa8, 14382 }, /* hairspace */ - { 0x00000aa9, 11855 }, /* emdash */ - { 0x00000aaa, 11940 }, /* endash */ - { 0x00000aac, 22987 }, /* signifblank */ - { 0x00000aae, 11812 }, /* ellipsis */ - { 0x00000aaf, 11267 }, /* doubbaselinedot */ - { 0x00000ab0, 20767 }, /* onethird */ - { 0x00000ab1, 25837 }, /* twothirds */ - { 0x00000ab2, 20705 }, /* onefifth */ - { 0x00000ab3, 25802 }, /* twofifths */ - { 0x00000ab4, 25530 }, /* threefifths */ - { 0x00000ab5, 12607 }, /* fourfifths */ - { 0x00000ab6, 20733 }, /* onesixth */ - { 0x00000ab7, 12569 }, /* fivesixths */ - { 0x00000ab8, 8506 }, /* careof */ - { 0x00000abb, 12427 }, /* figdash */ - { 0x00000abc, 19249 }, /* leftanglebracket */ - { 0x00000abd, 11140 }, /* decimalpoint */ - { 0x00000abe, 22379 }, /* rightanglebracket */ - { 0x00000abf, 19681 }, /* marker */ - { 0x00000ac3, 20695 }, /* oneeighth */ - { 0x00000ac4, 25517 }, /* threeeighths */ - { 0x00000ac5, 12557 }, /* fiveeighths */ - { 0x00000ac6, 22904 }, /* seveneighths */ - { 0x00000ac9, 25760 }, /* trademark */ - { 0x00000aca, 22973 }, /* signaturemark */ - { 0x00000acb, 25770 }, /* trademarkincircle */ - { 0x00000acc, 19327 }, /* leftopentriangle */ - { 0x00000acd, 22483 }, /* rightopentriangle */ - { 0x00000ace, 11890 }, /* emopencircle */ - { 0x00000acf, 11903 }, /* emopenrectangle */ - { 0x00000ad0, 19377 }, /* leftsinglequotemark */ - { 0x00000ad1, 22524 }, /* rightsinglequotemark */ - { 0x00000ad2, 19286 }, /* leftdoublequotemark */ - { 0x00000ad3, 22419 }, /* rightdoublequotemark */ - { 0x00000ad4, 22067 }, /* prescription */ - { 0x00000ad5, 21517 }, /* permille */ - { 0x00000ad6, 19739 }, /* minutes */ - { 0x00000ad7, 22711 }, /* seconds */ - { 0x00000ad9, 19181 }, /* latincross */ - { 0x00000ada, 16626 }, /* hexagram */ - { 0x00000adb, 12455 }, /* filledrectbullet */ - { 0x00000adc, 12435 }, /* filledlefttribullet */ - { 0x00000add, 12472 }, /* filledrighttribullet */ - { 0x00000ade, 11862 }, /* emfilledcircle */ - { 0x00000adf, 11877 }, /* emfilledrect */ - { 0x00000ae0, 11991 }, /* enopencircbullet */ - { 0x00000ae1, 12008 }, /* enopensquarebullet */ - { 0x00000ae2, 20794 }, /* openrectbullet */ - { 0x00000ae3, 20836 }, /* opentribulletup */ - { 0x00000ae4, 20818 }, /* opentribulletdown */ - { 0x00000ae5, 20809 }, /* openstar */ - { 0x00000ae6, 11947 }, /* enfilledcircbullet */ - { 0x00000ae7, 11966 }, /* enfilledsqbullet */ - { 0x00000ae8, 12513 }, /* filledtribulletup */ - { 0x00000ae9, 12493 }, /* filledtribulletdown */ - { 0x00000aea, 19344 }, /* leftpointer */ - { 0x00000aeb, 22501 }, /* rightpointer */ - { 0x00000aec, 8649 }, /* club */ - { 0x00000aed, 11213 }, /* diamond */ - { 0x00000aee, 16080 }, /* heart */ - { 0x00000af0, 19668 }, /* maltesecross */ - { 0x00000af1, 10358 }, /* dagger */ - { 0x00000af2, 11295 }, /* doubledagger */ - { 0x00000af3, 8616 }, /* checkmark */ - { 0x00000af4, 3380 }, /* ballotcross */ - { 0x00000af5, 19860 }, /* musicalsharp */ - { 0x00000af6, 19848 }, /* musicalflat */ - { 0x00000af7, 19657 }, /* malesymbol */ - { 0x00000af8, 12400 }, /* femalesymbol */ - { 0x00000af9, 24354 }, /* telephone */ - { 0x00000afa, 24364 }, /* telephonerecorder */ - { 0x00000afb, 21537 }, /* phonographcopyright */ - { 0x00000afc, 8513 }, /* caret */ - { 0x00000afd, 23028 }, /* singlelowquotemark */ - { 0x00000afe, 11308 }, /* doublelowquotemark */ - { 0x00000aff, 8775 }, /* cursor */ - { 0x00000ba3, 19276 }, /* leftcaret */ - { 0x00000ba6, 22408 }, /* rightcaret */ - { 0x00000ba8, 11342 }, /* downcaret */ - { 0x00000ba9, 26395 }, /* upcaret */ - { 0x00000bc0, 21324 }, /* overbar */ - { 0x00000bc2, 11371 }, /* downtack */ - { 0x00000bc3, 26430 }, /* upshoe */ - { 0x00000bc4, 11361 }, /* downstile */ - { 0x00000bc6, 26337 }, /* underbar */ - { 0x00000bca, 18142 }, /* jot */ - { 0x00000bcc, 22160 }, /* quad */ - { 0x00000bce, 26445 }, /* uptack */ - { 0x00000bcf, 8626 }, /* circle */ - { 0x00000bd3, 26437 }, /* upstile */ - { 0x00000bd6, 11352 }, /* downshoe */ - { 0x00000bd8, 22514 }, /* rightshoe */ - { 0x00000bda, 19368 }, /* leftshoe */ - { 0x00000bdc, 19403 }, /* lefttack */ - { 0x00000bfc, 22552 }, /* righttack */ - { 0x00000cdf, 16173 }, /* hebrew_doublelowline */ - { 0x00000ce0, 16086 }, /* hebrew_aleph */ - { 0x00000ce1, 16111 }, /* hebrew_bet */ - { 0x00000ce2, 16292 }, /* hebrew_gimel */ - { 0x00000ce3, 16146 }, /* hebrew_dalet */ - { 0x00000ce4, 16319 }, /* hebrew_he */ - { 0x00000ce5, 16531 }, /* hebrew_waw */ - { 0x00000ce6, 16577 }, /* hebrew_zain */ - { 0x00000ce7, 16134 }, /* hebrew_chet */ - { 0x00000ce8, 16508 }, /* hebrew_tet */ - { 0x00000ce9, 16542 }, /* hebrew_yod */ - { 0x00000cea, 16194 }, /* hebrew_finalkaph */ - { 0x00000ceb, 16340 }, /* hebrew_kaph */ - { 0x00000cec, 16363 }, /* hebrew_lamed */ - { 0x00000ced, 16211 }, /* hebrew_finalmem */ - { 0x00000cee, 16376 }, /* hebrew_mem */ - { 0x00000cef, 16227 }, /* hebrew_finalnun */ - { 0x00000cf0, 16387 }, /* hebrew_nun */ - { 0x00000cf1, 16432 }, /* hebrew_samech */ - { 0x00000cf2, 16099 }, /* hebrew_ayin */ - { 0x00000cf3, 16243 }, /* hebrew_finalpe */ - { 0x00000cf4, 16398 }, /* hebrew_pe */ - { 0x00000cf5, 16258 }, /* hebrew_finalzade */ - { 0x00000cf6, 16553 }, /* hebrew_zade */ - { 0x00000cf7, 16408 }, /* hebrew_qoph */ - { 0x00000cf8, 16420 }, /* hebrew_resh */ - { 0x00000cf9, 16460 }, /* hebrew_shin */ - { 0x00000cfa, 16497 }, /* hebrew_taw */ - { 0x00000da1, 24617 }, /* Thai_kokai */ - { 0x00000da2, 24547 }, /* Thai_khokhai */ - { 0x00000da3, 24573 }, /* Thai_khokhuat */ - { 0x00000da4, 24587 }, /* Thai_khokhwai */ - { 0x00000da5, 24560 }, /* Thai_khokhon */ - { 0x00000da6, 24601 }, /* Thai_khorakhang */ - { 0x00000da7, 24930 }, /* Thai_ngongu */ - { 0x00000da8, 24423 }, /* Thai_chochan */ - { 0x00000da9, 24450 }, /* Thai_choching */ - { 0x00000daa, 24436 }, /* Thai_chochang */ - { 0x00000dab, 25291 }, /* Thai_soso */ - { 0x00000dac, 24464 }, /* Thai_chochoe */ - { 0x00000dad, 25467 }, /* Thai_yoying */ - { 0x00000dae, 24477 }, /* Thai_dochada */ - { 0x00000daf, 25420 }, /* Thai_topatak */ - { 0x00000db0, 25379 }, /* Thai_thothan */ - { 0x00000db1, 25329 }, /* Thai_thonangmontho */ - { 0x00000db2, 25348 }, /* Thai_thophuthao */ - { 0x00000db3, 24956 }, /* Thai_nonen */ - { 0x00000db4, 24490 }, /* Thai_dodek */ - { 0x00000db5, 25433 }, /* Thai_totao */ - { 0x00000db6, 25406 }, /* Thai_thothung */ - { 0x00000db7, 25364 }, /* Thai_thothahan */ - { 0x00000db8, 25392 }, /* Thai_thothong */ - { 0x00000db9, 24967 }, /* Thai_nonu */ - { 0x00000dba, 24409 }, /* Thai_bobaimai */ - { 0x00000dbb, 25058 }, /* Thai_popla */ - { 0x00000dbc, 25028 }, /* Thai_phophung */ - { 0x00000dbd, 24501 }, /* Thai_fofa */ - { 0x00000dbe, 25015 }, /* Thai_phophan */ - { 0x00000dbf, 24511 }, /* Thai_fofan */ - { 0x00000dc0, 25042 }, /* Thai_phosamphao */ - { 0x00000dc1, 24920 }, /* Thai_moma */ - { 0x00000dc2, 25456 }, /* Thai_yoyak */ - { 0x00000dc3, 25069 }, /* Thai_rorua */ - { 0x00000dc4, 25080 }, /* Thai_ru */ - { 0x00000dc5, 24780 }, /* Thai_loling */ - { 0x00000dc6, 24792 }, /* Thai_lu */ - { 0x00000dc7, 25444 }, /* Thai_wowaen */ - { 0x00000dc8, 25279 }, /* Thai_sosala */ - { 0x00000dc9, 25267 }, /* Thai_sorusi */ - { 0x00000dca, 25301 }, /* Thai_sosua */ - { 0x00000dcb, 24522 }, /* Thai_hohip */ - { 0x00000dcc, 24767 }, /* Thai_lochula */ - { 0x00000dcd, 24977 }, /* Thai_oang */ - { 0x00000dce, 24533 }, /* Thai_honokhuk */ - { 0x00000dcf, 24987 }, /* Thai_paiyannoi */ - { 0x00000dd0, 25088 }, /* Thai_saraa */ - { 0x00000dd1, 24828 }, /* Thai_maihanakat */ - { 0x00000dd2, 25099 }, /* Thai_saraaa */ - { 0x00000dd3, 25162 }, /* Thai_saraam */ - { 0x00000dd4, 25185 }, /* Thai_sarai */ - { 0x00000dd5, 25196 }, /* Thai_saraii */ - { 0x00000dd6, 25230 }, /* Thai_saraue */ - { 0x00000dd7, 25242 }, /* Thai_sarauee */ - { 0x00000dd8, 25219 }, /* Thai_sarau */ - { 0x00000dd9, 25255 }, /* Thai_sarauu */ - { 0x00000dda, 25002 }, /* Thai_phinthu */ - { 0x00000dde, 24844 }, /* Thai_maihanakat_maitho */ - { 0x00000ddf, 24399 }, /* Thai_baht */ - { 0x00000de0, 25174 }, /* Thai_sarae */ - { 0x00000de1, 25111 }, /* Thai_saraae */ - { 0x00000de2, 25208 }, /* Thai_sarao */ - { 0x00000de3, 25143 }, /* Thai_saraaimaimuan */ - { 0x00000de4, 25123 }, /* Thai_saraaimaimalai */ - { 0x00000de5, 24628 }, /* Thai_lakkhangyao */ - { 0x00000de6, 24906 }, /* Thai_maiyamok */ - { 0x00000de7, 24867 }, /* Thai_maitaikhu */ - { 0x00000de8, 24817 }, /* Thai_maiek */ - { 0x00000de9, 24882 }, /* Thai_maitho */ - { 0x00000dea, 24894 }, /* Thai_maitri */ - { 0x00000deb, 24800 }, /* Thai_maichattawa */ - { 0x00000dec, 25312 }, /* Thai_thanthakhat */ - { 0x00000ded, 24942 }, /* Thai_nikhahit */ - { 0x00000df0, 24755 }, /* Thai_leksun */ - { 0x00000df1, 24693 }, /* Thai_leknung */ - { 0x00000df2, 24742 }, /* Thai_leksong */ - { 0x00000df3, 24719 }, /* Thai_leksam */ - { 0x00000df4, 24731 }, /* Thai_leksi */ - { 0x00000df5, 24658 }, /* Thai_lekha */ - { 0x00000df6, 24669 }, /* Thai_lekhok */ - { 0x00000df7, 24645 }, /* Thai_lekchet */ - { 0x00000df8, 24706 }, /* Thai_lekpaet */ - { 0x00000df9, 24681 }, /* Thai_lekkao */ - { 0x00000ea1, 15181 }, /* Hangul_Kiyeog */ - { 0x00000ea2, 15726 }, /* Hangul_SsangKiyeog */ - { 0x00000ea3, 15195 }, /* Hangul_KiyeogSios */ - { 0x00000ea4, 15276 }, /* Hangul_Nieun */ - { 0x00000ea5, 15307 }, /* Hangul_NieunJieuj */ - { 0x00000ea6, 15289 }, /* Hangul_NieunHieuh */ - { 0x00000ea7, 14488 }, /* Hangul_Dikeud */ - { 0x00000ea8, 15689 }, /* Hangul_SsangDikeud */ - { 0x00000ea9, 15461 }, /* Hangul_Rieul */ - { 0x00000eaa, 15492 }, /* Hangul_RieulKiyeog */ - { 0x00000eab, 15511 }, /* Hangul_RieulMieum */ - { 0x00000eac, 15548 }, /* Hangul_RieulPieub */ - { 0x00000ead, 15566 }, /* Hangul_RieulSios */ - { 0x00000eae, 15583 }, /* Hangul_RieulTieut */ - { 0x00000eaf, 15529 }, /* Hangul_RieulPhieuf */ - { 0x00000eb0, 15474 }, /* Hangul_RieulHieuh */ - { 0x00000eb1, 15238 }, /* Hangul_Mieum */ - { 0x00000eb2, 15373 }, /* Hangul_Pieub */ - { 0x00000eb3, 15745 }, /* Hangul_SsangPieub */ - { 0x00000eb4, 15386 }, /* Hangul_PieubSios */ - { 0x00000eb5, 15662 }, /* Hangul_Sios */ - { 0x00000eb6, 15763 }, /* Hangul_SsangSios */ - { 0x00000eb7, 14577 }, /* Hangul_Ieung */ - { 0x00000eb8, 15154 }, /* Hangul_Jieuj */ - { 0x00000eb9, 15708 }, /* Hangul_SsangJieuj */ - { 0x00000eba, 14458 }, /* Hangul_Cieuc */ - { 0x00000ebb, 15167 }, /* Hangul_Khieuq */ - { 0x00000ebc, 15883 }, /* Hangul_Tieut */ - { 0x00000ebd, 15359 }, /* Hangul_Phieuf */ - { 0x00000ebe, 14555 }, /* Hangul_Hieuh */ - { 0x00000ebf, 14399 }, /* Hangul_A */ - { 0x00000ec0, 14408 }, /* Hangul_AE */ - { 0x00000ec1, 15957 }, /* Hangul_YA */ - { 0x00000ec2, 15967 }, /* Hangul_YAE */ - { 0x00000ec3, 14522 }, /* Hangul_EO */ - { 0x00000ec4, 14502 }, /* Hangul_E */ - { 0x00000ec5, 15988 }, /* Hangul_YEO */ - { 0x00000ec6, 15978 }, /* Hangul_YE */ - { 0x00000ec7, 15325 }, /* Hangul_O */ - { 0x00000ec8, 15905 }, /* Hangul_WA */ - { 0x00000ec9, 15915 }, /* Hangul_WAE */ - { 0x00000eca, 15334 }, /* Hangul_OE */ - { 0x00000ecb, 16028 }, /* Hangul_YO */ - { 0x00000ecc, 15896 }, /* Hangul_U */ - { 0x00000ecd, 15936 }, /* Hangul_WEO */ - { 0x00000ece, 15926 }, /* Hangul_WE */ - { 0x00000ecf, 15947 }, /* Hangul_WI */ - { 0x00000ed0, 16038 }, /* Hangul_YU */ - { 0x00000ed1, 14532 }, /* Hangul_EU */ - { 0x00000ed2, 16018 }, /* Hangul_YI */ - { 0x00000ed3, 14568 }, /* Hangul_I */ - { 0x00000ed4, 14682 }, /* Hangul_J_Kiyeog */ - { 0x00000ed5, 15052 }, /* Hangul_J_SsangKiyeog */ - { 0x00000ed6, 14698 }, /* Hangul_J_KiyeogSios */ - { 0x00000ed7, 14760 }, /* Hangul_J_Nieun */ - { 0x00000ed8, 14795 }, /* Hangul_J_NieunJieuj */ - { 0x00000ed9, 14775 }, /* Hangul_J_NieunHieuh */ - { 0x00000eda, 14605 }, /* Hangul_J_Dikeud */ - { 0x00000edb, 14882 }, /* Hangul_J_Rieul */ - { 0x00000edc, 14917 }, /* Hangul_J_RieulKiyeog */ - { 0x00000edd, 14938 }, /* Hangul_J_RieulMieum */ - { 0x00000ede, 14979 }, /* Hangul_J_RieulPieub */ - { 0x00000edf, 14999 }, /* Hangul_J_RieulSios */ - { 0x00000ee0, 15018 }, /* Hangul_J_RieulTieut */ - { 0x00000ee1, 14958 }, /* Hangul_J_RieulPhieuf */ - { 0x00000ee2, 14897 }, /* Hangul_J_RieulHieuh */ - { 0x00000ee3, 14745 }, /* Hangul_J_Mieum */ - { 0x00000ee4, 14848 }, /* Hangul_J_Pieub */ - { 0x00000ee5, 14863 }, /* Hangul_J_PieubSios */ - { 0x00000ee6, 15038 }, /* Hangul_J_Sios */ - { 0x00000ee7, 15073 }, /* Hangul_J_SsangSios */ - { 0x00000ee8, 14636 }, /* Hangul_J_Ieung */ - { 0x00000ee9, 14651 }, /* Hangul_J_Jieuj */ - { 0x00000eea, 14590 }, /* Hangul_J_Cieuc */ - { 0x00000eeb, 14666 }, /* Hangul_J_Khieuq */ - { 0x00000eec, 15092 }, /* Hangul_J_Tieut */ - { 0x00000eed, 14832 }, /* Hangul_J_Phieuf */ - { 0x00000eee, 14621 }, /* Hangul_J_Hieuh */ - { 0x00000eef, 15601 }, /* Hangul_RieulYeorinHieuh */ - { 0x00000ef0, 15793 }, /* Hangul_SunkyeongeumMieum */ - { 0x00000ef1, 15844 }, /* Hangul_SunkyeongeumPieub */ - { 0x00000ef2, 15344 }, /* Hangul_PanSios */ - { 0x00000ef3, 15213 }, /* Hangul_KkogjiDalrinIeung */ - { 0x00000ef4, 15818 }, /* Hangul_SunkyeongeumPhieuf */ - { 0x00000ef5, 15999 }, /* Hangul_YeorinHieuh */ - { 0x00000ef6, 14418 }, /* Hangul_AraeA */ - { 0x00000ef7, 14431 }, /* Hangul_AraeAE */ - { 0x00000ef8, 14815 }, /* Hangul_J_PanSios */ - { 0x00000ef9, 14718 }, /* Hangul_J_KkogjiDalrinIeung */ - { 0x00000efa, 15107 }, /* Hangul_J_YeorinHieuh */ - { 0x00000eff, 18797 }, /* Korean_Won */ - { 0x000013bc, 20514 }, /* OE */ - { 0x000013bd, 20517 }, /* oe */ - { 0x000013be, 29094 }, /* Ydiaeresis */ - { 0x000020ac, 12090 }, /* EuroSign */ - { 0x0000fd01, 125 }, /* 3270_Duplicate */ - { 0x0000fd02, 195 }, /* 3270_FieldMark */ - { 0x0000fd03, 343 }, /* 3270_Right2 */ - { 0x0000fd04, 245 }, /* 3270_Left2 */ - { 0x0000fd05, 33 }, /* 3270_BackTab */ - { 0x0000fd06, 151 }, /* 3270_EraseEOF */ - { 0x0000fd07, 165 }, /* 3270_EraseInput */ - { 0x0000fd08, 332 }, /* 3270_Reset */ - { 0x0000fd09, 310 }, /* 3270_Quit */ - { 0x0000fd0a, 256 }, /* 3270_PA1 */ - { 0x0000fd0b, 265 }, /* 3270_PA2 */ - { 0x0000fd0c, 274 }, /* 3270_PA3 */ - { 0x0000fd0d, 376 }, /* 3270_Test */ - { 0x0000fd0e, 23 }, /* 3270_Attn */ - { 0x0000fd0f, 74 }, /* 3270_CursorBlink */ - { 0x0000fd10, 8 }, /* 3270_AltCursor */ - { 0x0000fd11, 231 }, /* 3270_KeyClick */ - { 0x0000fd12, 221 }, /* 3270_Jump */ - { 0x0000fd13, 210 }, /* 3270_Ident */ - { 0x0000fd14, 355 }, /* 3270_Rule */ - { 0x0000fd15, 64 }, /* 3270_Copy */ - { 0x0000fd16, 283 }, /* 3270_Play */ - { 0x0000fd17, 365 }, /* 3270_Setup */ - { 0x0000fd18, 320 }, /* 3270_Record */ - { 0x0000fd19, 46 }, /* 3270_ChangeScreen */ - { 0x0000fd1a, 109 }, /* 3270_DeleteWord */ - { 0x0000fd1b, 181 }, /* 3270_ExSelect */ - { 0x0000fd1c, 91 }, /* 3270_CursorSelect */ - { 0x0000fd1d, 293 }, /* 3270_PrintScreen */ - { 0x0000fd1e, 140 }, /* 3270_Enter */ - { 0x0000fe01, 17781 }, /* ISO_Lock */ - { 0x0000fe02, 17664 }, /* ISO_Level2_Latch */ - { 0x0000fe03, 17714 }, /* ISO_Level3_Shift */ - { 0x0000fe04, 17681 }, /* ISO_Level3_Latch */ - { 0x0000fe05, 17698 }, /* ISO_Level3_Lock */ - { 0x0000fe06, 17569 }, /* ISO_Group_Latch */ - { 0x0000fe07, 17585 }, /* ISO_Group_Lock */ - { 0x0000fe08, 17826 }, /* ISO_Next_Group */ - { 0x0000fe09, 17841 }, /* ISO_Next_Group_Lock */ - { 0x0000fe0a, 17950 }, /* ISO_Prev_Group */ - { 0x0000fe0b, 17965 }, /* ISO_Prev_Group_Lock */ - { 0x0000fe0c, 17532 }, /* ISO_First_Group */ - { 0x0000fe0d, 17548 }, /* ISO_First_Group_Lock */ - { 0x0000fe0e, 17616 }, /* ISO_Last_Group */ - { 0x0000fe0f, 17631 }, /* ISO_Last_Group_Lock */ - { 0x0000fe11, 17764 }, /* ISO_Level5_Shift */ - { 0x0000fe12, 17731 }, /* ISO_Level5_Latch */ - { 0x0000fe13, 17748 }, /* ISO_Level5_Lock */ - { 0x0000fe20, 17651 }, /* ISO_Left_Tab */ - { 0x0000fe21, 17809 }, /* ISO_Move_Line_Up */ - { 0x0000fe22, 17790 }, /* ISO_Move_Line_Down */ - { 0x0000fe23, 17883 }, /* ISO_Partial_Line_Up */ - { 0x0000fe24, 17861 }, /* ISO_Partial_Line_Down */ - { 0x0000fe25, 17903 }, /* ISO_Partial_Space_Left */ - { 0x0000fe26, 17926 }, /* ISO_Partial_Space_Right */ - { 0x0000fe27, 18059 }, /* ISO_Set_Margin_Left */ - { 0x0000fe28, 18079 }, /* ISO_Set_Margin_Right */ - { 0x0000fe29, 18010 }, /* ISO_Release_Margin_Left */ - { 0x0000fe2a, 18034 }, /* ISO_Release_Margin_Right */ - { 0x0000fe2b, 17985 }, /* ISO_Release_Both_Margins */ - { 0x0000fe2c, 17470 }, /* ISO_Fast_Cursor_Left */ - { 0x0000fe2d, 17491 }, /* ISO_Fast_Cursor_Right */ - { 0x0000fe2e, 17513 }, /* ISO_Fast_Cursor_Up */ - { 0x0000fe2f, 17449 }, /* ISO_Fast_Cursor_Down */ - { 0x0000fe30, 17372 }, /* ISO_Continuous_Underline */ - { 0x0000fe31, 17397 }, /* ISO_Discontinuous_Underline */ - { 0x0000fe32, 17425 }, /* ISO_Emphasize */ - { 0x0000fe33, 17354 }, /* ISO_Center_Object */ - { 0x0000fe34, 17439 }, /* ISO_Enter */ - { 0x0000fe50, 10858 }, /* dead_grave */ - { 0x0000fe51, 10531 }, /* dead_acute */ - { 0x0000fe52, 10754 }, /* dead_circumflex */ - { 0x0000fe53, 11097 }, /* dead_tilde */ - { 0x0000fe54, 10980 }, /* dead_macron */ - { 0x0000fe55, 10700 }, /* dead_breve */ - { 0x0000fe56, 10455 }, /* dead_abovedot */ - { 0x0000fe57, 10795 }, /* dead_diaeresis */ - { 0x0000fe58, 10493 }, /* dead_abovering */ - { 0x0000fe59, 10810 }, /* dead_doubleacute */ - { 0x0000fe5a, 10730 }, /* dead_caron */ - { 0x0000fe5b, 10741 }, /* dead_cedilla */ - { 0x0000fe5c, 11006 }, /* dead_ogonek */ - { 0x0000fe5d, 10933 }, /* dead_iota */ - { 0x0000fe5e, 11122 }, /* dead_voiced_sound */ - { 0x0000fe5f, 11046 }, /* dead_semivoiced_sound */ - { 0x0000fe60, 10615 }, /* dead_belowdot */ - { 0x0000fe61, 10880 }, /* dead_hook */ - { 0x0000fe62, 10890 }, /* dead_horn */ - { 0x0000fe63, 11085 }, /* dead_stroke */ - { 0x0000fe64, 10439 }, /* dead_abovecomma */ - { 0x0000fe65, 10469 }, /* dead_abovereversedcomma */ - { 0x0000fe66, 10827 }, /* dead_doublegrave */ - { 0x0000fe67, 10646 }, /* dead_belowring */ - { 0x0000fe68, 10629 }, /* dead_belowmacron */ - { 0x0000fe69, 10558 }, /* dead_belowcircumflex */ - { 0x0000fe6a, 10661 }, /* dead_belowtilde */ - { 0x0000fe6b, 10542 }, /* dead_belowbreve */ - { 0x0000fe6c, 10595 }, /* dead_belowdiaeresis */ - { 0x0000fe6d, 10914 }, /* dead_invertedbreve */ - { 0x0000fe6e, 10579 }, /* dead_belowcomma */ - { 0x0000fe6f, 10770 }, /* dead_currency */ - { 0x0000fe70, 583 }, /* AccessX_Enable */ - { 0x0000fe71, 598 }, /* AccessX_Feedback_Enable */ - { 0x0000fe72, 22342 }, /* RepeatKeys_Enable */ - { 0x0000fe73, 23774 }, /* SlowKeys_Enable */ - { 0x0000fe74, 3564 }, /* BounceKeys_Enable */ - { 0x0000fe75, 23836 }, /* StickyKeys_Enable */ - { 0x0000fe76, 19782 }, /* MouseKeys_Enable */ - { 0x0000fe77, 19759 }, /* MouseKeys_Accel_Enable */ - { 0x0000fe78, 21332 }, /* Overlay1_Enable */ - { 0x0000fe79, 21348 }, /* Overlay2_Enable */ - { 0x0000fe7a, 3309 }, /* AudibleBell_Enable */ - { 0x0000fe80, 10425 }, /* dead_a */ - { 0x0000fe81, 10432 }, /* dead_A */ - { 0x0000fe82, 10844 }, /* dead_e */ - { 0x0000fe83, 10851 }, /* dead_E */ - { 0x0000fe84, 10900 }, /* dead_i */ - { 0x0000fe85, 10907 }, /* dead_I */ - { 0x0000fe86, 10992 }, /* dead_o */ - { 0x0000fe87, 10999 }, /* dead_O */ - { 0x0000fe88, 11108 }, /* dead_u */ - { 0x0000fe89, 11115 }, /* dead_U */ - { 0x0000fe8a, 11068 }, /* dead_small_schwa */ - { 0x0000fe8b, 10711 }, /* dead_capital_schwa */ - { 0x0000fe8c, 10869 }, /* dead_greek */ - { 0x0000fe90, 10967 }, /* dead_lowline */ - { 0x0000fe91, 10508 }, /* dead_aboveverticalline */ - { 0x0000fe92, 10677 }, /* dead_belowverticalline */ - { 0x0000fe93, 10943 }, /* dead_longsolidusoverlay */ - { 0x0000fea0, 8594 }, /* ch */ - { 0x0000fea1, 8597 }, /* Ch */ - { 0x0000fea2, 8600 }, /* CH */ - { 0x0000fea3, 8443 }, /* c_h */ - { 0x0000fea4, 8447 }, /* C_h */ - { 0x0000fea5, 8451 }, /* C_H */ - { 0x0000fed0, 12536 }, /* First_Virtual_Screen */ - { 0x0000fed1, 22080 }, /* Prev_Virtual_Screen */ - { 0x0000fed2, 20028 }, /* Next_Virtual_Screen */ - { 0x0000fed4, 19161 }, /* Last_Virtual_Screen */ - { 0x0000fed5, 24382 }, /* Terminate_Server */ - { 0x0000fee0, 21998 }, /* Pointer_Left */ - { 0x0000fee1, 22011 }, /* Pointer_Right */ - { 0x0000fee2, 22025 }, /* Pointer_Up */ - { 0x0000fee3, 21843 }, /* Pointer_Down */ - { 0x0000fee4, 22036 }, /* Pointer_UpLeft */ - { 0x0000fee5, 22051 }, /* Pointer_UpRight */ - { 0x0000fee6, 21856 }, /* Pointer_DownLeft */ - { 0x0000fee7, 21873 }, /* Pointer_DownRight */ - { 0x0000fee8, 21671 }, /* Pointer_Button_Dflt */ - { 0x0000fee9, 21591 }, /* Pointer_Button1 */ - { 0x0000feea, 21607 }, /* Pointer_Button2 */ - { 0x0000feeb, 21623 }, /* Pointer_Button3 */ - { 0x0000feec, 21639 }, /* Pointer_Button4 */ - { 0x0000feed, 21655 }, /* Pointer_Button5 */ - { 0x0000feee, 21781 }, /* Pointer_DblClick_Dflt */ - { 0x0000feef, 21691 }, /* Pointer_DblClick1 */ - { 0x0000fef0, 21709 }, /* Pointer_DblClick2 */ - { 0x0000fef1, 21727 }, /* Pointer_DblClick3 */ - { 0x0000fef2, 21745 }, /* Pointer_DblClick4 */ - { 0x0000fef3, 21763 }, /* Pointer_DblClick5 */ - { 0x0000fef4, 21961 }, /* Pointer_Drag_Dflt */ - { 0x0000fef5, 21891 }, /* Pointer_Drag1 */ - { 0x0000fef6, 21905 }, /* Pointer_Drag2 */ - { 0x0000fef7, 21919 }, /* Pointer_Drag3 */ - { 0x0000fef8, 21933 }, /* Pointer_Drag4 */ - { 0x0000fef9, 21979 }, /* Pointer_EnableKeys */ - { 0x0000fefa, 21572 }, /* Pointer_Accelerate */ - { 0x0000fefb, 21803 }, /* Pointer_DfltBtnNext */ - { 0x0000fefc, 21823 }, /* Pointer_DfltBtnPrev */ - { 0x0000fefd, 21947 }, /* Pointer_Drag5 */ - { 0x0000ff08, 3362 }, /* BackSpace */ - { 0x0000ff09, 24298 }, /* Tab */ - { 0x0000ff0a, 19434 }, /* Linefeed */ - { 0x0000ff0b, 8633 }, /* Clear */ - { 0x0000ff0d, 22366 }, /* Return */ - { 0x0000ff13, 21481 }, /* Pause */ - { 0x0000ff14, 22699 }, /* Scroll_Lock */ - { 0x0000ff15, 24279 }, /* Sys_Req */ - { 0x0000ff1b, 12057 }, /* Escape */ - { 0x0000ff20, 19811 }, /* Multi_key */ - { 0x0000ff21, 18745 }, /* Kanji */ - { 0x0000ff22, 19802 }, /* Muhenkan */ - { 0x0000ff23, 16614 }, /* Henkan_Mode */ - { 0x0000ff24, 22562 }, /* Romaji */ - { 0x0000ff25, 16635 }, /* Hiragana */ - { 0x0000ff26, 18770 }, /* Katakana */ - { 0x0000ff27, 16644 }, /* Hiragana_Katakana */ - { 0x0000ff28, 29210 }, /* Zenkaku */ - { 0x0000ff29, 16048 }, /* Hankaku */ - { 0x0000ff2a, 29218 }, /* Zenkaku_Hankaku */ - { 0x0000ff2b, 25752 }, /* Touroku */ - { 0x0000ff2c, 19698 }, /* Massyo */ - { 0x0000ff2d, 18351 }, /* Kana_Lock */ - { 0x0000ff2e, 18562 }, /* Kana_Shift */ - { 0x0000ff2f, 11779 }, /* Eisu_Shift */ - { 0x0000ff30, 11790 }, /* Eisu_toggle */ - { 0x0000ff31, 14392 }, /* Hangul */ - { 0x0000ff32, 15780 }, /* Hangul_Start */ - { 0x0000ff33, 14511 }, /* Hangul_End */ - { 0x0000ff34, 14542 }, /* Hangul_Hanja */ - { 0x0000ff35, 15128 }, /* Hangul_Jamo */ - { 0x0000ff36, 15625 }, /* Hangul_Romaja */ - { 0x0000ff37, 8654 }, /* Codeinput */ - { 0x0000ff38, 15140 }, /* Hangul_Jeonja */ - { 0x0000ff39, 14445 }, /* Hangul_Banja */ - { 0x0000ff3a, 15420 }, /* Hangul_PreHanja */ - { 0x0000ff3b, 15403 }, /* Hangul_PostHanja */ - { 0x0000ff3c, 23012 }, /* SingleCandidate */ - { 0x0000ff3d, 19821 }, /* MultipleCandidate */ - { 0x0000ff3e, 22100 }, /* PreviousCandidate */ - { 0x0000ff3f, 15674 }, /* Hangul_Special */ - { 0x0000ff50, 16662 }, /* Home */ - { 0x0000ff51, 19244 }, /* Left */ - { 0x0000ff52, 26384 }, /* Up */ - { 0x0000ff53, 22373 }, /* Right */ - { 0x0000ff54, 11327 }, /* Down */ - { 0x0000ff55, 22124 }, /* Prior */ - { 0x0000ff56, 20023 }, /* Next */ - { 0x0000ff57, 11936 }, /* End */ - { 0x0000ff58, 3404 }, /* Begin */ - { 0x0000ff60, 22727 }, /* Select */ - { 0x0000ff61, 22118 }, /* Print */ - { 0x0000ff62, 12117 }, /* Execute */ - { 0x0000ff63, 17284 }, /* Insert */ - { 0x0000ff65, 26357 }, /* Undo */ - { 0x0000ff66, 22326 }, /* Redo */ - { 0x0000ff67, 19705 }, /* Menu */ - { 0x0000ff68, 12531 }, /* Find */ - { 0x0000ff69, 8489 }, /* Cancel */ - { 0x0000ff6a, 16602 }, /* Help */ - { 0x0000ff6b, 8377 }, /* Break */ - { 0x0000ff7e, 19747 }, /* Mode_switch */ - { 0x0000ff7f, 20169 }, /* Num_Lock */ - { 0x0000ff80, 19074 }, /* KP_Space */ - { 0x0000ff89, 19095 }, /* KP_Tab */ - { 0x0000ff8d, 18931 }, /* KP_Enter */ - { 0x0000ff91, 18949 }, /* KP_F1 */ - { 0x0000ff92, 18955 }, /* KP_F2 */ - { 0x0000ff93, 18961 }, /* KP_F3 */ - { 0x0000ff94, 18967 }, /* KP_F4 */ - { 0x0000ff95, 18973 }, /* KP_Home */ - { 0x0000ff96, 18991 }, /* KP_Left */ - { 0x0000ff97, 19102 }, /* KP_Up */ - { 0x0000ff98, 19052 }, /* KP_Right */ - { 0x0000ff99, 18916 }, /* KP_Down */ - { 0x0000ff9a, 19043 }, /* KP_Prior */ - { 0x0000ff9b, 19011 }, /* KP_Next */ - { 0x0000ff9c, 18924 }, /* KP_End */ - { 0x0000ff9d, 18876 }, /* KP_Begin */ - { 0x0000ff9e, 18981 }, /* KP_Insert */ - { 0x0000ff9f, 18896 }, /* KP_Delete */ - { 0x0000ffaa, 18999 }, /* KP_Multiply */ - { 0x0000ffab, 18858 }, /* KP_Add */ - { 0x0000ffac, 19061 }, /* KP_Separator */ - { 0x0000ffad, 19083 }, /* KP_Subtract */ - { 0x0000ffae, 18885 }, /* KP_Decimal */ - { 0x0000ffaf, 18906 }, /* KP_Divide */ - { 0x0000ffb0, 18808 }, /* KP_0 */ - { 0x0000ffb1, 18813 }, /* KP_1 */ - { 0x0000ffb2, 18818 }, /* KP_2 */ - { 0x0000ffb3, 18823 }, /* KP_3 */ - { 0x0000ffb4, 18828 }, /* KP_4 */ - { 0x0000ffb5, 18833 }, /* KP_5 */ - { 0x0000ffb6, 18838 }, /* KP_6 */ - { 0x0000ffb7, 18843 }, /* KP_7 */ - { 0x0000ffb8, 18848 }, /* KP_8 */ - { 0x0000ffb9, 18853 }, /* KP_9 */ - { 0x0000ffbd, 18940 }, /* KP_Equal */ - { 0x0000ffbe, 12159 }, /* F1 */ - { 0x0000ffbf, 12202 }, /* F2 */ - { 0x0000ffc0, 12245 }, /* F3 */ - { 0x0000ffc1, 12272 }, /* F4 */ - { 0x0000ffc2, 12275 }, /* F5 */ - { 0x0000ffc3, 12278 }, /* F6 */ - { 0x0000ffc4, 12281 }, /* F7 */ - { 0x0000ffc5, 12284 }, /* F8 */ - { 0x0000ffc6, 12287 }, /* F9 */ - { 0x0000ffc7, 12162 }, /* F10 */ - { 0x0000ffc8, 12166 }, /* F11 */ - { 0x0000ffc9, 12170 }, /* F12 */ - { 0x0000ffca, 12174 }, /* F13 */ - { 0x0000ffcb, 12178 }, /* F14 */ - { 0x0000ffcc, 12182 }, /* F15 */ - { 0x0000ffcd, 12186 }, /* F16 */ - { 0x0000ffce, 12190 }, /* F17 */ - { 0x0000ffcf, 12194 }, /* F18 */ - { 0x0000ffd0, 12198 }, /* F19 */ - { 0x0000ffd1, 12205 }, /* F20 */ - { 0x0000ffd2, 12209 }, /* F21 */ - { 0x0000ffd3, 12213 }, /* F22 */ - { 0x0000ffd4, 12217 }, /* F23 */ - { 0x0000ffd5, 12221 }, /* F24 */ - { 0x0000ffd6, 12225 }, /* F25 */ - { 0x0000ffd7, 12229 }, /* F26 */ - { 0x0000ffd8, 12233 }, /* F27 */ - { 0x0000ffd9, 12237 }, /* F28 */ - { 0x0000ffda, 12241 }, /* F29 */ - { 0x0000ffdb, 12248 }, /* F30 */ - { 0x0000ffdc, 12252 }, /* F31 */ - { 0x0000ffdd, 12256 }, /* F32 */ - { 0x0000ffde, 12260 }, /* F33 */ - { 0x0000ffdf, 12264 }, /* F34 */ - { 0x0000ffe0, 12268 }, /* F35 */ - { 0x0000ffe1, 22946 }, /* Shift_L */ - { 0x0000ffe2, 22965 }, /* Shift_R */ - { 0x0000ffe3, 8697 }, /* Control_L */ - { 0x0000ffe4, 8707 }, /* Control_R */ - { 0x0000ffe5, 8496 }, /* Caps_Lock */ - { 0x0000ffe6, 22954 }, /* Shift_Lock */ - { 0x0000ffe7, 19710 }, /* Meta_L */ - { 0x0000ffe8, 19717 }, /* Meta_R */ - { 0x0000ffe9, 880 }, /* Alt_L */ - { 0x0000ffea, 886 }, /* Alt_R */ - { 0x0000ffeb, 24263 }, /* Super_L */ - { 0x0000ffec, 24271 }, /* Super_R */ - { 0x0000ffed, 17046 }, /* Hyper_L */ - { 0x0000ffee, 17054 }, /* Hyper_R */ - { 0x0000fff1, 3642 }, /* braille_dot_1 */ - { 0x0000fff2, 3671 }, /* braille_dot_2 */ - { 0x0000fff3, 3685 }, /* braille_dot_3 */ - { 0x0000fff4, 3699 }, /* braille_dot_4 */ - { 0x0000fff5, 3713 }, /* braille_dot_5 */ - { 0x0000fff6, 3727 }, /* braille_dot_6 */ - { 0x0000fff7, 3741 }, /* braille_dot_7 */ - { 0x0000fff8, 3755 }, /* braille_dot_8 */ - { 0x0000fff9, 3769 }, /* braille_dot_9 */ - { 0x0000fffa, 3656 }, /* braille_dot_10 */ - { 0x0000ffff, 11160 }, /* Delete */ - { 0x00ffffff, 26531 }, /* VoidSymbol */ - { 0x0100012c, 17117 }, /* Ibreve */ - { 0x0100012d, 17124 }, /* ibreve */ - { 0x01000174, 26563 }, /* Wcircumflex */ - { 0x01000175, 26575 }, /* wcircumflex */ - { 0x01000176, 29059 }, /* Ycircumflex */ - { 0x01000177, 29071 }, /* ycircumflex */ - { 0x0100018f, 22649 }, /* SCHWA */ - { 0x0100019f, 20218 }, /* Obarred */ - { 0x010001a0, 20553 }, /* Ohorn */ - { 0x010001a1, 20559 }, /* ohorn */ - { 0x010001af, 25997 }, /* Uhorn */ - { 0x010001b0, 26003 }, /* uhorn */ - { 0x010001b5, 29261 }, /* Zstroke */ - { 0x010001b6, 29269 }, /* zstroke */ - { 0x010001b7, 12147 }, /* EZH */ - { 0x010001d1, 20254 }, /* Ocaron */ - { 0x010001d2, 20261 }, /* ocaron */ - { 0x010001e6, 12703 }, /* Gcaron */ - { 0x010001e7, 12710 }, /* gcaron */ - { 0x01000259, 22655 }, /* schwa */ - { 0x01000275, 20226 }, /* obarred */ - { 0x01000292, 12151 }, /* ezh */ - { 0x01000492, 9236 }, /* Cyrillic_GHE_bar */ - { 0x01000493, 9253 }, /* Cyrillic_ghe_bar */ - { 0x01000496, 10274 }, /* Cyrillic_ZHE_descender */ - { 0x01000497, 10297 }, /* Cyrillic_zhe_descender */ - { 0x0100049a, 9528 }, /* Cyrillic_KA_descender */ - { 0x0100049b, 9550 }, /* Cyrillic_ka_descender */ - { 0x0100049c, 9572 }, /* Cyrillic_KA_vertstroke */ - { 0x0100049d, 9595 }, /* Cyrillic_ka_vertstroke */ - { 0x010004a2, 9118 }, /* Cyrillic_EN_descender */ - { 0x010004a3, 9140 }, /* Cyrillic_en_descender */ - { 0x010004ae, 10036 }, /* Cyrillic_U_straight */ - { 0x010004af, 10056 }, /* Cyrillic_u_straight */ - { 0x010004b0, 10076 }, /* Cyrillic_U_straight_bar */ - { 0x010004b1, 10100 }, /* Cyrillic_u_straight_bar */ - { 0x010004b2, 9294 }, /* Cyrillic_HA_descender */ - { 0x010004b3, 9316 }, /* Cyrillic_ha_descender */ - { 0x010004b6, 8854 }, /* Cyrillic_CHE_descender */ - { 0x010004b7, 8877 }, /* Cyrillic_che_descender */ - { 0x010004b8, 8900 }, /* Cyrillic_CHE_vertstroke */ - { 0x010004b9, 8924 }, /* Cyrillic_che_vertstroke */ - { 0x010004ba, 9832 }, /* Cyrillic_SHHA */ - { 0x010004bb, 9846 }, /* Cyrillic_shha */ - { 0x010004d8, 9746 }, /* Cyrillic_SCHWA */ - { 0x010004d9, 9761 }, /* Cyrillic_schwa */ - { 0x010004e2, 9396 }, /* Cyrillic_I_macron */ - { 0x010004e3, 9414 }, /* Cyrillic_i_macron */ - { 0x010004e8, 9692 }, /* Cyrillic_O_bar */ - { 0x010004e9, 9707 }, /* Cyrillic_o_bar */ - { 0x010004ee, 10000 }, /* Cyrillic_U_macron */ - { 0x010004ef, 10018 }, /* Cyrillic_u_macron */ - { 0x01000531, 2124 }, /* Armenian_AYB */ - { 0x01000532, 2150 }, /* Armenian_BEN */ - { 0x01000533, 2374 }, /* Armenian_GIM */ - { 0x01000534, 2215 }, /* Armenian_DA */ - { 0x01000535, 3164 }, /* Armenian_YECH */ - { 0x01000536, 3210 }, /* Armenian_ZA */ - { 0x01000537, 2265 }, /* Armenian_E */ - { 0x01000538, 2100 }, /* Armenian_AT */ - { 0x01000539, 2964 }, /* Armenian_TO */ - { 0x0100053a, 3234 }, /* Armenian_ZHE */ - { 0x0100053b, 2464 }, /* Armenian_INI */ - { 0x0100053c, 2611 }, /* Armenian_LYUN */ - { 0x0100053d, 2564 }, /* Armenian_KHE */ - { 0x0100053e, 2988 }, /* Armenian_TSA */ - { 0x0100053f, 2538 }, /* Armenian_KEN */ - { 0x01000540, 2424 }, /* Armenian_HO */ - { 0x01000541, 2239 }, /* Armenian_DZA */ - { 0x01000542, 2346 }, /* Armenian_GHAT */ - { 0x01000543, 2936 }, /* Armenian_TCHE */ - { 0x01000544, 2639 }, /* Armenian_MEN */ - { 0x01000545, 2400 }, /* Armenian_HI */ - { 0x01000546, 2665 }, /* Armenian_NU */ - { 0x01000547, 2894 }, /* Armenian_SHA */ - { 0x01000548, 3112 }, /* Armenian_VO */ - { 0x01000549, 2189 }, /* Armenian_CHA */ - { 0x0100054a, 2727 }, /* Armenian_PE */ - { 0x0100054b, 2490 }, /* Armenian_JE */ - { 0x0100054c, 2797 }, /* Armenian_RA */ - { 0x0100054d, 2845 }, /* Armenian_SE */ - { 0x0100054e, 3086 }, /* Armenian_VEV */ - { 0x0100054f, 3040 }, /* Armenian_TYUN */ - { 0x01000550, 2821 }, /* Armenian_RE */ - { 0x01000551, 3014 }, /* Armenian_TSO */ - { 0x01000552, 3136 }, /* Armenian_VYUN */ - { 0x01000553, 2751 }, /* Armenian_PYUR */ - { 0x01000554, 2514 }, /* Armenian_KE */ - { 0x01000555, 2689 }, /* Armenian_O */ - { 0x01000556, 2303 }, /* Armenian_FE */ - { 0x0100055a, 2080 }, /* Armenian_apostrophe */ - { 0x0100055b, 2048 }, /* Armenian_accent */ - { 0x0100055c, 2287 }, /* Armenian_exclam */ - { 0x0100055d, 2869 }, /* Armenian_separation_mark */ - { 0x0100055e, 2779 }, /* Armenian_question */ - { 0x01000561, 2137 }, /* Armenian_ayb */ - { 0x01000562, 2163 }, /* Armenian_ben */ - { 0x01000563, 2387 }, /* Armenian_gim */ - { 0x01000564, 2227 }, /* Armenian_da */ - { 0x01000565, 3178 }, /* Armenian_yech */ - { 0x01000566, 3222 }, /* Armenian_za */ - { 0x01000567, 2276 }, /* Armenian_e */ - { 0x01000568, 2112 }, /* Armenian_at */ - { 0x01000569, 2976 }, /* Armenian_to */ - { 0x0100056a, 3247 }, /* Armenian_zhe */ - { 0x0100056b, 2477 }, /* Armenian_ini */ - { 0x0100056c, 2625 }, /* Armenian_lyun */ - { 0x0100056d, 2577 }, /* Armenian_khe */ - { 0x0100056e, 3001 }, /* Armenian_tsa */ - { 0x0100056f, 2551 }, /* Armenian_ken */ - { 0x01000570, 2436 }, /* Armenian_ho */ - { 0x01000571, 2252 }, /* Armenian_dza */ - { 0x01000572, 2360 }, /* Armenian_ghat */ - { 0x01000573, 2950 }, /* Armenian_tche */ - { 0x01000574, 2652 }, /* Armenian_men */ - { 0x01000575, 2412 }, /* Armenian_hi */ - { 0x01000576, 2677 }, /* Armenian_nu */ - { 0x01000577, 2907 }, /* Armenian_sha */ - { 0x01000578, 3124 }, /* Armenian_vo */ - { 0x01000579, 2202 }, /* Armenian_cha */ - { 0x0100057a, 2739 }, /* Armenian_pe */ - { 0x0100057b, 2502 }, /* Armenian_je */ - { 0x0100057c, 2809 }, /* Armenian_ra */ - { 0x0100057d, 2857 }, /* Armenian_se */ - { 0x0100057e, 3099 }, /* Armenian_vev */ - { 0x0100057f, 3054 }, /* Armenian_tyun */ - { 0x01000580, 2833 }, /* Armenian_re */ - { 0x01000581, 3027 }, /* Armenian_tso */ - { 0x01000582, 3150 }, /* Armenian_vyun */ - { 0x01000583, 2765 }, /* Armenian_pyur */ - { 0x01000584, 2526 }, /* Armenian_ke */ - { 0x01000585, 2700 }, /* Armenian_o */ - { 0x01000586, 2315 }, /* Armenian_fe */ - { 0x01000587, 2590 }, /* Armenian_ligature_ew */ - { 0x01000589, 2327 }, /* Armenian_full_stop */ - { 0x0100058a, 2448 }, /* Armenian_hyphen */ - { 0x01000653, 1580 }, /* Arabic_madda_above */ - { 0x01000654, 1316 }, /* Arabic_hamza_above */ - { 0x01000655, 1335 }, /* Arabic_hamza_below */ - { 0x01000660, 966 }, /* Arabic_0 */ - { 0x01000661, 975 }, /* Arabic_1 */ - { 0x01000662, 984 }, /* Arabic_2 */ - { 0x01000663, 993 }, /* Arabic_3 */ - { 0x01000664, 1002 }, /* Arabic_4 */ - { 0x01000665, 1011 }, /* Arabic_5 */ - { 0x01000666, 1020 }, /* Arabic_6 */ - { 0x01000667, 1029 }, /* Arabic_7 */ - { 0x01000668, 1038 }, /* Arabic_8 */ - { 0x01000669, 1047 }, /* Arabic_9 */ - { 0x0100066a, 1672 }, /* Arabic_percent */ - { 0x01000670, 1821 }, /* Arabic_superscript_alef */ - { 0x01000679, 1951 }, /* Arabic_tteh */ - { 0x0100067e, 1661 }, /* Arabic_peh */ - { 0x01000686, 1885 }, /* Arabic_tcheh */ - { 0x01000688, 1173 }, /* Arabic_ddal */ - { 0x01000691, 1729 }, /* Arabic_rreh */ - { 0x01000698, 1493 }, /* Arabic_jeh */ - { 0x010006a4, 1963 }, /* Arabic_veh */ - { 0x010006a9, 1544 }, /* Arabic_keheh */ - { 0x010006af, 1258 }, /* Arabic_gaf */ - { 0x010006ba, 1642 }, /* Arabic_noon_ghunna */ - { 0x010006be, 1442 }, /* Arabic_heh_doachashmee */ - { 0x010006c1, 1465 }, /* Arabic_heh_goal */ - { 0x010006cc, 12390 }, /* Farsi_yeh */ - { 0x010006d2, 1996 }, /* Arabic_yeh_baree */ - { 0x010006d4, 1242 }, /* Arabic_fullstop */ - { 0x010006f0, 12310 }, /* Farsi_0 */ - { 0x010006f1, 12318 }, /* Farsi_1 */ - { 0x010006f2, 12326 }, /* Farsi_2 */ - { 0x010006f3, 12334 }, /* Farsi_3 */ - { 0x010006f4, 12342 }, /* Farsi_4 */ - { 0x010006f5, 12350 }, /* Farsi_5 */ - { 0x010006f6, 12358 }, /* Farsi_6 */ - { 0x010006f7, 12366 }, /* Farsi_7 */ - { 0x010006f8, 12374 }, /* Farsi_8 */ - { 0x010006f9, 12382 }, /* Farsi_9 */ - { 0x01000d82, 23484 }, /* Sinh_ng */ - { 0x01000d83, 23278 }, /* Sinh_h2 */ - { 0x01000d85, 23047 }, /* Sinh_a */ - { 0x01000d86, 23054 }, /* Sinh_aa */ - { 0x01000d87, 23071 }, /* Sinh_ae */ - { 0x01000d88, 23088 }, /* Sinh_aee */ - { 0x01000d89, 23294 }, /* Sinh_i */ - { 0x01000d8a, 23309 }, /* Sinh_ii */ - { 0x01000d8b, 23695 }, /* Sinh_u */ - { 0x01000d8c, 23710 }, /* Sinh_uu */ - { 0x01000d8d, 23594 }, /* Sinh_ri */ - { 0x01000d8e, 23602 }, /* Sinh_rii */ - { 0x01000d8f, 23403 }, /* Sinh_lu */ - { 0x01000d90, 23420 }, /* Sinh_luu */ - { 0x01000d91, 23221 }, /* Sinh_e */ - { 0x01000d92, 23236 }, /* Sinh_ee */ - { 0x01000d93, 23107 }, /* Sinh_ai */ - { 0x01000d94, 23537 }, /* Sinh_o */ - { 0x01000d95, 23552 }, /* Sinh_oo */ - { 0x01000d96, 23132 }, /* Sinh_au */ - { 0x01000d9a, 23353 }, /* Sinh_ka */ - { 0x01000d9b, 23361 }, /* Sinh_kha */ - { 0x01000d9c, 23261 }, /* Sinh_ga */ - { 0x01000d9d, 23269 }, /* Sinh_gha */ - { 0x01000d9e, 23492 }, /* Sinh_ng2 */ - { 0x01000d9f, 23501 }, /* Sinh_nga */ - { 0x01000da0, 23166 }, /* Sinh_ca */ - { 0x01000da1, 23174 }, /* Sinh_cha */ - { 0x01000da2, 23326 }, /* Sinh_ja */ - { 0x01000da3, 23334 }, /* Sinh_jha */ - { 0x01000da4, 23528 }, /* Sinh_nya */ - { 0x01000da5, 23343 }, /* Sinh_jnya */ - { 0x01000da6, 23510 }, /* Sinh_nja */ - { 0x01000da7, 23676 }, /* Sinh_tta */ - { 0x01000da8, 23685 }, /* Sinh_ttha */ - { 0x01000da9, 23183 }, /* Sinh_dda */ - { 0x01000daa, 23192 }, /* Sinh_ddha */ - { 0x01000dab, 23519 }, /* Sinh_nna */ - { 0x01000dac, 23464 }, /* Sinh_ndda */ - { 0x01000dad, 23657 }, /* Sinh_tha */ - { 0x01000dae, 23666 }, /* Sinh_thha */ - { 0x01000daf, 23202 }, /* Sinh_dha */ - { 0x01000db0, 23211 }, /* Sinh_dhha */ - { 0x01000db1, 23456 }, /* Sinh_na */ - { 0x01000db3, 23474 }, /* Sinh_ndha */ - { 0x01000db4, 23569 }, /* Sinh_pa */ - { 0x01000db5, 23577 }, /* Sinh_pha */ - { 0x01000db6, 23149 }, /* Sinh_ba */ - { 0x01000db7, 23157 }, /* Sinh_bha */ - { 0x01000db8, 23439 }, /* Sinh_ma */ - { 0x01000db9, 23447 }, /* Sinh_mba */ - { 0x01000dba, 23735 }, /* Sinh_ya */ - { 0x01000dbb, 23586 }, /* Sinh_ra */ - { 0x01000dbd, 23386 }, /* Sinh_la */ - { 0x01000dc0, 23727 }, /* Sinh_va */ - { 0x01000dc1, 23638 }, /* Sinh_sha */ - { 0x01000dc2, 23647 }, /* Sinh_ssha */ - { 0x01000dc3, 23630 }, /* Sinh_sa */ - { 0x01000dc4, 23286 }, /* Sinh_ha */ - { 0x01000dc5, 23394 }, /* Sinh_lla */ - { 0x01000dc6, 23253 }, /* Sinh_fa */ - { 0x01000dca, 23124 }, /* Sinh_al */ - { 0x01000dcf, 23062 }, /* Sinh_aa2 */ - { 0x01000dd0, 23079 }, /* Sinh_ae2 */ - { 0x01000dd1, 23097 }, /* Sinh_aee2 */ - { 0x01000dd2, 23301 }, /* Sinh_i2 */ - { 0x01000dd3, 23317 }, /* Sinh_ii2 */ - { 0x01000dd4, 23702 }, /* Sinh_u2 */ - { 0x01000dd6, 23718 }, /* Sinh_uu2 */ - { 0x01000dd8, 23611 }, /* Sinh_ru2 */ - { 0x01000dd9, 23228 }, /* Sinh_e2 */ - { 0x01000dda, 23244 }, /* Sinh_ee2 */ - { 0x01000ddb, 23115 }, /* Sinh_ai2 */ - { 0x01000ddc, 23544 }, /* Sinh_o2 */ - { 0x01000ddd, 23560 }, /* Sinh_oo2 */ - { 0x01000dde, 23140 }, /* Sinh_au2 */ - { 0x01000ddf, 23411 }, /* Sinh_lu2 */ - { 0x01000df2, 23620 }, /* Sinh_ruu2 */ - { 0x01000df3, 23429 }, /* Sinh_luu2 */ - { 0x01000df4, 23370 }, /* Sinh_kunddaliya */ - { 0x010010d0, 12759 }, /* Georgian_an */ - { 0x010010d1, 12771 }, /* Georgian_ban */ - { 0x010010d2, 12875 }, /* Georgian_gan */ - { 0x010010d3, 12838 }, /* Georgian_don */ - { 0x010010d4, 12851 }, /* Georgian_en */ - { 0x010010d5, 13201 }, /* Georgian_vin */ - { 0x010010d6, 13239 }, /* Georgian_zen */ - { 0x010010d7, 13163 }, /* Georgian_tan */ - { 0x010010d8, 12966 }, /* Georgian_in */ - { 0x010010d9, 13005 }, /* Georgian_kan */ - { 0x010010da, 13032 }, /* Georgian_las */ - { 0x010010db, 13045 }, /* Georgian_man */ - { 0x010010dc, 13058 }, /* Georgian_nar */ - { 0x010010dd, 13071 }, /* Georgian_on */ - { 0x010010de, 13083 }, /* Georgian_par */ - { 0x010010df, 13252 }, /* Georgian_zhar */ - { 0x010010e0, 13123 }, /* Georgian_rae */ - { 0x010010e1, 13136 }, /* Georgian_san */ - { 0x010010e2, 13176 }, /* Georgian_tar */ - { 0x010010e3, 13189 }, /* Georgian_un */ - { 0x010010e4, 13096 }, /* Georgian_phar */ - { 0x010010e5, 13018 }, /* Georgian_khar */ - { 0x010010e6, 12888 }, /* Georgian_ghan */ - { 0x010010e7, 13110 }, /* Georgian_qar */ - { 0x010010e8, 13149 }, /* Georgian_shin */ - { 0x010010e9, 12811 }, /* Georgian_chin */ - { 0x010010ea, 12784 }, /* Georgian_can */ - { 0x010010eb, 12992 }, /* Georgian_jil */ - { 0x010010ec, 12825 }, /* Georgian_cil */ - { 0x010010ed, 12797 }, /* Georgian_char */ - { 0x010010ee, 13226 }, /* Georgian_xan */ - { 0x010010ef, 12978 }, /* Georgian_jhan */ - { 0x010010f0, 12902 }, /* Georgian_hae */ - { 0x010010f1, 12928 }, /* Georgian_he */ - { 0x010010f2, 12940 }, /* Georgian_hie */ - { 0x010010f3, 13214 }, /* Georgian_we */ - { 0x010010f4, 12915 }, /* Georgian_har */ - { 0x010010f5, 12953 }, /* Georgian_hoe */ - { 0x010010f6, 12863 }, /* Georgian_fi */ - { 0x01001e02, 3332 }, /* Babovedot */ - { 0x01001e03, 3342 }, /* babovedot */ - { 0x01001e0a, 10324 }, /* Dabovedot */ - { 0x01001e0b, 10334 }, /* dabovedot */ - { 0x01001e1e, 12290 }, /* Fabovedot */ - { 0x01001e1f, 12300 }, /* fabovedot */ - { 0x01001e36, 19192 }, /* Lbelowdot */ - { 0x01001e37, 19202 }, /* lbelowdot */ - { 0x01001e40, 19537 }, /* Mabovedot */ - { 0x01001e41, 19547 }, /* mabovedot */ - { 0x01001e56, 21377 }, /* Pabovedot */ - { 0x01001e57, 21387 }, /* pabovedot */ - { 0x01001e60, 22583 }, /* Sabovedot */ - { 0x01001e61, 22593 }, /* sabovedot */ - { 0x01001e6a, 24302 }, /* Tabovedot */ - { 0x01001e6b, 24312 }, /* tabovedot */ - { 0x01001e80, 26609 }, /* Wgrave */ - { 0x01001e81, 26616 }, /* wgrave */ - { 0x01001e82, 26549 }, /* Wacute */ - { 0x01001e83, 26556 }, /* wacute */ - { 0x01001e84, 26587 }, /* Wdiaeresis */ - { 0x01001e85, 26598 }, /* wdiaeresis */ - { 0x01001e8a, 26635 }, /* Xabovedot */ - { 0x01001e8b, 26645 }, /* xabovedot */ - { 0x01001ea0, 416 }, /* Abelowdot */ - { 0x01001ea1, 426 }, /* abelowdot */ - { 0x01001ea2, 868 }, /* Ahook */ - { 0x01001ea3, 874 }, /* ahook */ - { 0x01001ea4, 646 }, /* Acircumflexacute */ - { 0x01001ea5, 663 }, /* acircumflexacute */ - { 0x01001ea6, 720 }, /* Acircumflexgrave */ - { 0x01001ea7, 737 }, /* acircumflexgrave */ - { 0x01001ea8, 754 }, /* Acircumflexhook */ - { 0x01001ea9, 770 }, /* acircumflexhook */ - { 0x01001eaa, 786 }, /* Acircumflextilde */ - { 0x01001eab, 803 }, /* acircumflextilde */ - { 0x01001eac, 680 }, /* Acircumflexbelowdot */ - { 0x01001ead, 700 }, /* acircumflexbelowdot */ - { 0x01001eae, 459 }, /* Abreveacute */ - { 0x01001eaf, 471 }, /* abreveacute */ - { 0x01001eb0, 513 }, /* Abrevegrave */ - { 0x01001eb1, 525 }, /* abrevegrave */ - { 0x01001eb2, 537 }, /* Abrevehook */ - { 0x01001eb3, 548 }, /* abrevehook */ - { 0x01001eb4, 559 }, /* Abrevetilde */ - { 0x01001eb5, 571 }, /* abrevetilde */ - { 0x01001eb6, 483 }, /* Abrevebelowdot */ - { 0x01001eb7, 498 }, /* abrevebelowdot */ - { 0x01001eb8, 11462 }, /* Ebelowdot */ - { 0x01001eb9, 11472 }, /* ebelowdot */ - { 0x01001eba, 11738 }, /* Ehook */ - { 0x01001ebb, 11744 }, /* ehook */ - { 0x01001ebc, 12076 }, /* Etilde */ - { 0x01001ebd, 12083 }, /* etilde */ - { 0x01001ebe, 11520 }, /* Ecircumflexacute */ - { 0x01001ebf, 11537 }, /* ecircumflexacute */ - { 0x01001ec0, 11594 }, /* Ecircumflexgrave */ - { 0x01001ec1, 11611 }, /* ecircumflexgrave */ - { 0x01001ec2, 11628 }, /* Ecircumflexhook */ - { 0x01001ec3, 11644 }, /* ecircumflexhook */ - { 0x01001ec4, 11660 }, /* Ecircumflextilde */ - { 0x01001ec5, 11677 }, /* ecircumflextilde */ - { 0x01001ec6, 11554 }, /* Ecircumflexbelowdot */ - { 0x01001ec7, 11574 }, /* ecircumflexbelowdot */ - { 0x01001ec8, 17219 }, /* Ihook */ - { 0x01001ec9, 17225 }, /* ihook */ - { 0x01001eca, 17097 }, /* Ibelowdot */ - { 0x01001ecb, 17107 }, /* ibelowdot */ - { 0x01001ecc, 20234 }, /* Obelowdot */ - { 0x01001ecd, 20244 }, /* obelowdot */ - { 0x01001ece, 20541 }, /* Ohook */ - { 0x01001ecf, 20547 }, /* ohook */ - { 0x01001ed0, 20292 }, /* Ocircumflexacute */ - { 0x01001ed1, 20309 }, /* ocircumflexacute */ - { 0x01001ed2, 20366 }, /* Ocircumflexgrave */ - { 0x01001ed3, 20383 }, /* ocircumflexgrave */ - { 0x01001ed4, 20400 }, /* Ocircumflexhook */ - { 0x01001ed5, 20416 }, /* ocircumflexhook */ - { 0x01001ed6, 20432 }, /* Ocircumflextilde */ - { 0x01001ed7, 20449 }, /* ocircumflextilde */ - { 0x01001ed8, 20326 }, /* Ocircumflexbelowdot */ - { 0x01001ed9, 20346 }, /* ocircumflexbelowdot */ - { 0x01001eda, 20565 }, /* Ohornacute */ - { 0x01001edb, 20576 }, /* ohornacute */ - { 0x01001edc, 20615 }, /* Ohorngrave */ - { 0x01001edd, 20626 }, /* ohorngrave */ - { 0x01001ede, 20637 }, /* Ohornhook */ - { 0x01001edf, 20647 }, /* ohornhook */ - { 0x01001ee0, 20657 }, /* Ohorntilde */ - { 0x01001ee1, 20668 }, /* ohorntilde */ - { 0x01001ee2, 20587 }, /* Ohornbelowdot */ - { 0x01001ee3, 20601 }, /* ohornbelowdot */ - { 0x01001ee4, 25865 }, /* Ubelowdot */ - { 0x01001ee5, 25875 }, /* ubelowdot */ - { 0x01001ee6, 25985 }, /* Uhook */ - { 0x01001ee7, 25991 }, /* uhook */ - { 0x01001ee8, 26009 }, /* Uhornacute */ - { 0x01001ee9, 26020 }, /* uhornacute */ - { 0x01001eea, 26059 }, /* Uhorngrave */ - { 0x01001eeb, 26070 }, /* uhorngrave */ - { 0x01001eec, 26081 }, /* Uhornhook */ - { 0x01001eed, 26091 }, /* uhornhook */ - { 0x01001eee, 26101 }, /* Uhorntilde */ - { 0x01001eef, 26112 }, /* uhorntilde */ - { 0x01001ef0, 26031 }, /* Uhornbelowdot */ - { 0x01001ef1, 26045 }, /* uhornbelowdot */ - { 0x01001ef2, 29109 }, /* Ygrave */ - { 0x01001ef3, 29116 }, /* ygrave */ - { 0x01001ef4, 29039 }, /* Ybelowdot */ - { 0x01001ef5, 29049 }, /* ybelowdot */ - { 0x01001ef6, 29123 }, /* Yhook */ - { 0x01001ef7, 29129 }, /* yhook */ - { 0x01001ef8, 29135 }, /* Ytilde */ - { 0x01001ef9, 29142 }, /* ytilde */ - { 0x01002070, 29248 }, /* zerosuperior */ - { 0x01002074, 12632 }, /* foursuperior */ - { 0x01002075, 12594 }, /* fivesuperior */ - { 0x01002076, 23756 }, /* sixsuperior */ - { 0x01002077, 22932 }, /* sevensuperior */ - { 0x01002078, 11765 }, /* eightsuperior */ - { 0x01002079, 20062 }, /* ninesuperior */ - { 0x01002080, 29234 }, /* zerosubscript */ - { 0x01002081, 20742 }, /* onesubscript */ - { 0x01002082, 25812 }, /* twosubscript */ - { 0x01002083, 25556 }, /* threesubscript */ - { 0x01002084, 12618 }, /* foursubscript */ - { 0x01002085, 12580 }, /* fivesubscript */ - { 0x01002086, 23743 }, /* sixsubscript */ - { 0x01002087, 22917 }, /* sevensubscript */ - { 0x01002088, 11750 }, /* eightsubscript */ - { 0x01002089, 20048 }, /* ninesubscript */ - { 0x010020a0, 11694 }, /* EcuSign */ - { 0x010020a1, 8670 }, /* ColonSign */ - { 0x010020a2, 8744 }, /* CruzeiroSign */ - { 0x010020a3, 12416 }, /* FFrancSign */ - { 0x010020a4, 19448 }, /* LiraSign */ - { 0x010020a5, 19724 }, /* MillSign */ - { 0x010020a6, 19967 }, /* NairaSign */ - { 0x010020a7, 21526 }, /* PesetaSign */ - { 0x010020a8, 22569 }, /* RupeeSign */ - { 0x010020a9, 26623 }, /* WonSign */ - { 0x010020aa, 20009 }, /* NewSheqelSign */ - { 0x010020ab, 11258 }, /* DongSign */ - { 0x01002202, 21446 }, /* partdifferential */ - { 0x01002205, 11919 }, /* emptyset */ - { 0x01002208, 11802 }, /* elementof */ - { 0x01002209, 20112 }, /* notelementof */ - { 0x0100220b, 8686 }, /* containsas */ - { 0x0100221a, 23809 }, /* squareroot */ - { 0x0100221b, 8757 }, /* cuberoot */ - { 0x0100221c, 12645 }, /* fourthroot */ - { 0x0100222c, 11232 }, /* dintegral */ - { 0x0100222d, 25585 }, /* tintegral */ - { 0x01002235, 3396 }, /* because */ - { 0x01002247, 20100 }, /* notapproxeq */ - { 0x01002248, 945 }, /* approxeq */ - { 0x01002262, 20134 }, /* notidentical */ - { 0x01002263, 23854 }, /* stricteq */ - { 0x01002800, 3628 }, /* braille_blank */ - { 0x01002801, 3783 }, /* braille_dots_1 */ - { 0x01002802, 6151 }, /* braille_dots_2 */ - { 0x01002803, 3798 }, /* braille_dots_12 */ - { 0x01002804, 7303 }, /* braille_dots_3 */ - { 0x01002805, 5014 }, /* braille_dots_13 */ - { 0x01002806, 6166 }, /* braille_dots_23 */ - { 0x01002807, 3814 }, /* braille_dots_123 */ - { 0x01002808, 7863 }, /* braille_dots_4 */ - { 0x01002809, 5606 }, /* braille_dots_14 */ - { 0x0100280a, 6758 }, /* braille_dots_24 */ - { 0x0100280b, 4438 }, /* braille_dots_124 */ - { 0x0100280c, 7318 }, /* braille_dots_34 */ - { 0x0100280d, 5030 }, /* braille_dots_134 */ - { 0x0100280e, 6182 }, /* braille_dots_234 */ - { 0x0100280f, 3831 }, /* braille_dots_1234 */ - { 0x01002810, 8135 }, /* braille_dots_5 */ - { 0x01002811, 5894 }, /* braille_dots_15 */ - { 0x01002812, 7046 }, /* braille_dots_25 */ - { 0x01002813, 4742 }, /* braille_dots_125 */ - { 0x01002814, 7606 }, /* braille_dots_35 */ - { 0x01002815, 5334 }, /* braille_dots_135 */ - { 0x01002816, 6486 }, /* braille_dots_235 */ - { 0x01002817, 4151 }, /* braille_dots_1235 */ - { 0x01002818, 7878 }, /* braille_dots_45 */ - { 0x01002819, 5622 }, /* braille_dots_145 */ - { 0x0100281a, 6774 }, /* braille_dots_245 */ - { 0x0100281b, 4455 }, /* braille_dots_1245 */ - { 0x0100281c, 7334 }, /* braille_dots_345 */ - { 0x0100281d, 5047 }, /* braille_dots_1345 */ - { 0x0100281e, 6199 }, /* braille_dots_2345 */ - { 0x0100281f, 3849 }, /* braille_dots_12345 */ - { 0x01002820, 8267 }, /* braille_dots_6 */ - { 0x01002821, 6034 }, /* braille_dots_16 */ - { 0x01002822, 7186 }, /* braille_dots_26 */ - { 0x01002823, 4890 }, /* braille_dots_126 */ - { 0x01002824, 7746 }, /* braille_dots_36 */ - { 0x01002825, 5482 }, /* braille_dots_136 */ - { 0x01002826, 6634 }, /* braille_dots_236 */ - { 0x01002827, 4307 }, /* braille_dots_1236 */ - { 0x01002828, 8018 }, /* braille_dots_46 */ - { 0x01002829, 5770 }, /* braille_dots_146 */ - { 0x0100282a, 6922 }, /* braille_dots_246 */ - { 0x0100282b, 4611 }, /* braille_dots_1246 */ - { 0x0100282c, 7482 }, /* braille_dots_346 */ - { 0x0100282d, 5203 }, /* braille_dots_1346 */ - { 0x0100282e, 6355 }, /* braille_dots_2346 */ - { 0x0100282f, 4013 }, /* braille_dots_12346 */ - { 0x01002830, 8150 }, /* braille_dots_56 */ - { 0x01002831, 5910 }, /* braille_dots_156 */ - { 0x01002832, 7062 }, /* braille_dots_256 */ - { 0x01002833, 4759 }, /* braille_dots_1256 */ - { 0x01002834, 7622 }, /* braille_dots_356 */ - { 0x01002835, 5351 }, /* braille_dots_1356 */ - { 0x01002836, 6503 }, /* braille_dots_2356 */ - { 0x01002837, 4169 }, /* braille_dots_12356 */ - { 0x01002838, 7894 }, /* braille_dots_456 */ - { 0x01002839, 5639 }, /* braille_dots_1456 */ - { 0x0100283a, 6791 }, /* braille_dots_2456 */ - { 0x0100283b, 4473 }, /* braille_dots_12456 */ - { 0x0100283c, 7351 }, /* braille_dots_3456 */ - { 0x0100283d, 5065 }, /* braille_dots_13456 */ - { 0x0100283e, 6217 }, /* braille_dots_23456 */ - { 0x0100283f, 3868 }, /* braille_dots_123456 */ - { 0x01002840, 8331 }, /* braille_dots_7 */ - { 0x01002841, 6102 }, /* braille_dots_17 */ - { 0x01002842, 7254 }, /* braille_dots_27 */ - { 0x01002843, 4962 }, /* braille_dots_127 */ - { 0x01002844, 7814 }, /* braille_dots_37 */ - { 0x01002845, 5554 }, /* braille_dots_137 */ - { 0x01002846, 6706 }, /* braille_dots_237 */ - { 0x01002847, 4383 }, /* braille_dots_1237 */ - { 0x01002848, 8086 }, /* braille_dots_47 */ - { 0x01002849, 5842 }, /* braille_dots_147 */ - { 0x0100284a, 6994 }, /* braille_dots_247 */ - { 0x0100284b, 4687 }, /* braille_dots_1247 */ - { 0x0100284c, 7554 }, /* braille_dots_347 */ - { 0x0100284d, 5279 }, /* braille_dots_1347 */ - { 0x0100284e, 6431 }, /* braille_dots_2347 */ - { 0x0100284f, 4093 }, /* braille_dots_12347 */ - { 0x01002850, 8218 }, /* braille_dots_57 */ - { 0x01002851, 5982 }, /* braille_dots_157 */ - { 0x01002852, 7134 }, /* braille_dots_257 */ - { 0x01002853, 4835 }, /* braille_dots_1257 */ - { 0x01002854, 7694 }, /* braille_dots_357 */ - { 0x01002855, 5427 }, /* braille_dots_1357 */ - { 0x01002856, 6579 }, /* braille_dots_2357 */ - { 0x01002857, 4249 }, /* braille_dots_12357 */ - { 0x01002858, 7966 }, /* braille_dots_457 */ - { 0x01002859, 5715 }, /* braille_dots_1457 */ - { 0x0100285a, 6867 }, /* braille_dots_2457 */ - { 0x0100285b, 4553 }, /* braille_dots_12457 */ - { 0x0100285c, 7427 }, /* braille_dots_3457 */ - { 0x0100285d, 5145 }, /* braille_dots_13457 */ - { 0x0100285e, 6297 }, /* braille_dots_23457 */ - { 0x0100285f, 3952 }, /* braille_dots_123457 */ - { 0x01002860, 8282 }, /* braille_dots_67 */ - { 0x01002861, 6050 }, /* braille_dots_167 */ - { 0x01002862, 7202 }, /* braille_dots_267 */ - { 0x01002863, 4907 }, /* braille_dots_1267 */ - { 0x01002864, 7762 }, /* braille_dots_367 */ - { 0x01002865, 5499 }, /* braille_dots_1367 */ - { 0x01002866, 6651 }, /* braille_dots_2367 */ - { 0x01002867, 4325 }, /* braille_dots_12367 */ - { 0x01002868, 8034 }, /* braille_dots_467 */ - { 0x01002869, 5787 }, /* braille_dots_1467 */ - { 0x0100286a, 6939 }, /* braille_dots_2467 */ - { 0x0100286b, 4629 }, /* braille_dots_12467 */ - { 0x0100286c, 7499 }, /* braille_dots_3467 */ - { 0x0100286d, 5221 }, /* braille_dots_13467 */ - { 0x0100286e, 6373 }, /* braille_dots_23467 */ - { 0x0100286f, 4032 }, /* braille_dots_123467 */ - { 0x01002870, 8166 }, /* braille_dots_567 */ - { 0x01002871, 5927 }, /* braille_dots_1567 */ - { 0x01002872, 7079 }, /* braille_dots_2567 */ - { 0x01002873, 4777 }, /* braille_dots_12567 */ - { 0x01002874, 7639 }, /* braille_dots_3567 */ - { 0x01002875, 5369 }, /* braille_dots_13567 */ - { 0x01002876, 6521 }, /* braille_dots_23567 */ - { 0x01002877, 4188 }, /* braille_dots_123567 */ - { 0x01002878, 7911 }, /* braille_dots_4567 */ - { 0x01002879, 5657 }, /* braille_dots_14567 */ - { 0x0100287a, 6809 }, /* braille_dots_24567 */ - { 0x0100287b, 4492 }, /* braille_dots_124567 */ - { 0x0100287c, 7369 }, /* braille_dots_34567 */ - { 0x0100287d, 5084 }, /* braille_dots_134567 */ - { 0x0100287e, 6236 }, /* braille_dots_234567 */ - { 0x0100287f, 3888 }, /* braille_dots_1234567 */ - { 0x01002880, 8362 }, /* braille_dots_8 */ - { 0x01002881, 6135 }, /* braille_dots_18 */ - { 0x01002882, 7287 }, /* braille_dots_28 */ - { 0x01002883, 4997 }, /* braille_dots_128 */ - { 0x01002884, 7847 }, /* braille_dots_38 */ - { 0x01002885, 5589 }, /* braille_dots_138 */ - { 0x01002886, 6741 }, /* braille_dots_238 */ - { 0x01002887, 4420 }, /* braille_dots_1238 */ - { 0x01002888, 8119 }, /* braille_dots_48 */ - { 0x01002889, 5877 }, /* braille_dots_148 */ - { 0x0100288a, 7029 }, /* braille_dots_248 */ - { 0x0100288b, 4724 }, /* braille_dots_1248 */ - { 0x0100288c, 7589 }, /* braille_dots_348 */ - { 0x0100288d, 5316 }, /* braille_dots_1348 */ - { 0x0100288e, 6468 }, /* braille_dots_2348 */ - { 0x0100288f, 4132 }, /* braille_dots_12348 */ - { 0x01002890, 8251 }, /* braille_dots_58 */ - { 0x01002891, 6017 }, /* braille_dots_158 */ - { 0x01002892, 7169 }, /* braille_dots_258 */ - { 0x01002893, 4872 }, /* braille_dots_1258 */ - { 0x01002894, 7729 }, /* braille_dots_358 */ - { 0x01002895, 5464 }, /* braille_dots_1358 */ - { 0x01002896, 6616 }, /* braille_dots_2358 */ - { 0x01002897, 4288 }, /* braille_dots_12358 */ - { 0x01002898, 8001 }, /* braille_dots_458 */ - { 0x01002899, 5752 }, /* braille_dots_1458 */ - { 0x0100289a, 6904 }, /* braille_dots_2458 */ - { 0x0100289b, 4592 }, /* braille_dots_12458 */ - { 0x0100289c, 7464 }, /* braille_dots_3458 */ - { 0x0100289d, 5184 }, /* braille_dots_13458 */ - { 0x0100289e, 6336 }, /* braille_dots_23458 */ - { 0x0100289f, 3993 }, /* braille_dots_123458 */ - { 0x010028a0, 8315 }, /* braille_dots_68 */ - { 0x010028a1, 6085 }, /* braille_dots_168 */ - { 0x010028a2, 7237 }, /* braille_dots_268 */ - { 0x010028a3, 4944 }, /* braille_dots_1268 */ - { 0x010028a4, 7797 }, /* braille_dots_368 */ - { 0x010028a5, 5536 }, /* braille_dots_1368 */ - { 0x010028a6, 6688 }, /* braille_dots_2368 */ - { 0x010028a7, 4364 }, /* braille_dots_12368 */ - { 0x010028a8, 8069 }, /* braille_dots_468 */ - { 0x010028a9, 5824 }, /* braille_dots_1468 */ - { 0x010028aa, 6976 }, /* braille_dots_2468 */ - { 0x010028ab, 4668 }, /* braille_dots_12468 */ - { 0x010028ac, 7536 }, /* braille_dots_3468 */ - { 0x010028ad, 5260 }, /* braille_dots_13468 */ - { 0x010028ae, 6412 }, /* braille_dots_23468 */ - { 0x010028af, 4073 }, /* braille_dots_123468 */ - { 0x010028b0, 8201 }, /* braille_dots_568 */ - { 0x010028b1, 5964 }, /* braille_dots_1568 */ - { 0x010028b2, 7116 }, /* braille_dots_2568 */ - { 0x010028b3, 4816 }, /* braille_dots_12568 */ - { 0x010028b4, 7676 }, /* braille_dots_3568 */ - { 0x010028b5, 5408 }, /* braille_dots_13568 */ - { 0x010028b6, 6560 }, /* braille_dots_23568 */ - { 0x010028b7, 4229 }, /* braille_dots_123568 */ - { 0x010028b8, 7948 }, /* braille_dots_4568 */ - { 0x010028b9, 5696 }, /* braille_dots_14568 */ - { 0x010028ba, 6848 }, /* braille_dots_24568 */ - { 0x010028bb, 4533 }, /* braille_dots_124568 */ - { 0x010028bc, 7408 }, /* braille_dots_34568 */ - { 0x010028bd, 5125 }, /* braille_dots_134568 */ - { 0x010028be, 6277 }, /* braille_dots_234568 */ - { 0x010028bf, 3931 }, /* braille_dots_1234568 */ - { 0x010028c0, 8346 }, /* braille_dots_78 */ - { 0x010028c1, 6118 }, /* braille_dots_178 */ - { 0x010028c2, 7270 }, /* braille_dots_278 */ - { 0x010028c3, 4979 }, /* braille_dots_1278 */ - { 0x010028c4, 7830 }, /* braille_dots_378 */ - { 0x010028c5, 5571 }, /* braille_dots_1378 */ - { 0x010028c6, 6723 }, /* braille_dots_2378 */ - { 0x010028c7, 4401 }, /* braille_dots_12378 */ - { 0x010028c8, 8102 }, /* braille_dots_478 */ - { 0x010028c9, 5859 }, /* braille_dots_1478 */ - { 0x010028ca, 7011 }, /* braille_dots_2478 */ - { 0x010028cb, 4705 }, /* braille_dots_12478 */ - { 0x010028cc, 7571 }, /* braille_dots_3478 */ - { 0x010028cd, 5297 }, /* braille_dots_13478 */ - { 0x010028ce, 6449 }, /* braille_dots_23478 */ - { 0x010028cf, 4112 }, /* braille_dots_123478 */ - { 0x010028d0, 8234 }, /* braille_dots_578 */ - { 0x010028d1, 5999 }, /* braille_dots_1578 */ - { 0x010028d2, 7151 }, /* braille_dots_2578 */ - { 0x010028d3, 4853 }, /* braille_dots_12578 */ - { 0x010028d4, 7711 }, /* braille_dots_3578 */ - { 0x010028d5, 5445 }, /* braille_dots_13578 */ - { 0x010028d6, 6597 }, /* braille_dots_23578 */ - { 0x010028d7, 4268 }, /* braille_dots_123578 */ - { 0x010028d8, 7983 }, /* braille_dots_4578 */ - { 0x010028d9, 5733 }, /* braille_dots_14578 */ - { 0x010028da, 6885 }, /* braille_dots_24578 */ - { 0x010028db, 4572 }, /* braille_dots_124578 */ - { 0x010028dc, 7445 }, /* braille_dots_34578 */ - { 0x010028dd, 5164 }, /* braille_dots_134578 */ - { 0x010028de, 6316 }, /* braille_dots_234578 */ - { 0x010028df, 3972 }, /* braille_dots_1234578 */ - { 0x010028e0, 8298 }, /* braille_dots_678 */ - { 0x010028e1, 6067 }, /* braille_dots_1678 */ - { 0x010028e2, 7219 }, /* braille_dots_2678 */ - { 0x010028e3, 4925 }, /* braille_dots_12678 */ - { 0x010028e4, 7779 }, /* braille_dots_3678 */ - { 0x010028e5, 5517 }, /* braille_dots_13678 */ - { 0x010028e6, 6669 }, /* braille_dots_23678 */ - { 0x010028e7, 4344 }, /* braille_dots_123678 */ - { 0x010028e8, 8051 }, /* braille_dots_4678 */ - { 0x010028e9, 5805 }, /* braille_dots_14678 */ - { 0x010028ea, 6957 }, /* braille_dots_24678 */ - { 0x010028eb, 4648 }, /* braille_dots_124678 */ - { 0x010028ec, 7517 }, /* braille_dots_34678 */ - { 0x010028ed, 5240 }, /* braille_dots_134678 */ - { 0x010028ee, 6392 }, /* braille_dots_234678 */ - { 0x010028ef, 4052 }, /* braille_dots_1234678 */ - { 0x010028f0, 8183 }, /* braille_dots_5678 */ - { 0x010028f1, 5945 }, /* braille_dots_15678 */ - { 0x010028f2, 7097 }, /* braille_dots_25678 */ - { 0x010028f3, 4796 }, /* braille_dots_125678 */ - { 0x010028f4, 7657 }, /* braille_dots_35678 */ - { 0x010028f5, 5388 }, /* braille_dots_135678 */ - { 0x010028f6, 6540 }, /* braille_dots_235678 */ - { 0x010028f7, 4208 }, /* braille_dots_1235678 */ - { 0x010028f8, 7929 }, /* braille_dots_45678 */ - { 0x010028f9, 5676 }, /* braille_dots_145678 */ - { 0x010028fa, 6828 }, /* braille_dots_245678 */ - { 0x010028fb, 4512 }, /* braille_dots_1245678 */ - { 0x010028fc, 7388 }, /* braille_dots_345678 */ - { 0x010028fd, 5104 }, /* braille_dots_1345678 */ - { 0x010028fe, 6256 }, /* braille_dots_2345678 */ - { 0x010028ff, 3909 }, /* braille_dots_12345678 */ - { 0x100000a8, 16910 }, /* hpmute_acute */ - { 0x100000a9, 16977 }, /* hpmute_grave */ - { 0x100000aa, 16923 }, /* hpmute_asciicircum */ - { 0x100000ab, 16960 }, /* hpmute_diaeresis */ - { 0x100000ac, 16942 }, /* hpmute_asciitilde */ - { 0x100000af, 16867 }, /* hplira */ - { 0x100000be, 16813 }, /* hpguilder */ - { 0x100000ee, 17014 }, /* hpYdiaeresis */ - { 0x100000f6, 16874 }, /* hplongminus */ - { 0x100000fc, 16767 }, /* hpblock */ - { 0x1000fe22, 10414 }, /* Ddiaeresis */ - { 0x1000fe27, 10344 }, /* Dacute_accent */ - { 0x1000fe2c, 10379 }, /* Dcedilla_accent */ - { 0x1000fe5e, 10395 }, /* Dcircumflex_accent */ - { 0x1000fe60, 11189 }, /* Dgrave_accent */ - { 0x1000fe7e, 11417 }, /* Dtilde */ - { 0x1000feb0, 11388 }, /* Dring_accent */ - { 0x1000ff00, 11380 }, /* DRemove */ - { 0x1000ff48, 16886 }, /* hpModelock1 */ - { 0x1000ff49, 16898 }, /* hpModelock2 */ - { 0x1000ff6c, 16990 }, /* hpReset */ - { 0x1000ff6d, 16998 }, /* hpSystem */ - { 0x1000ff6e, 17007 }, /* hpUser */ - { 0x1000ff6f, 16775 }, /* hpClearLine */ - { 0x1000ff70, 16836 }, /* hpInsertLine */ - { 0x1000ff71, 16800 }, /* hpDeleteLine */ - { 0x1000ff72, 16823 }, /* hpInsertChar */ - { 0x1000ff73, 16787 }, /* hpDeleteChar */ - { 0x1000ff74, 16757 }, /* hpBackTab */ - { 0x1000ff75, 16854 }, /* hpKP_BackTab */ - { 0x1000ff76, 12125 }, /* Ext16bit_L */ - { 0x1000ff77, 12136 }, /* Ext16bit_R */ - { 0x1004ff02, 20956 }, /* osfCopy */ - { 0x1004ff03, 20964 }, /* osfCut */ - { 0x1004ff04, 21163 }, /* osfPaste */ - { 0x1004ff07, 20900 }, /* osfBackTab */ - { 0x1004ff08, 20887 }, /* osfBackSpace */ - { 0x1004ff0b, 20947 }, /* osfClear */ - { 0x1004ff1b, 21026 }, /* osfEscape */ - { 0x1004ff31, 20876 }, /* osfAddMode */ - { 0x1004ff32, 21197 }, /* osfPrimaryPaste */ - { 0x1004ff33, 21213 }, /* osfQuickPaste */ - { 0x1004ff40, 21128 }, /* osfPageLeft */ - { 0x1004ff41, 21153 }, /* osfPageUp */ - { 0x1004ff42, 21116 }, /* osfPageDown */ - { 0x1004ff43, 21140 }, /* osfPageRight */ - { 0x1004ff44, 20864 }, /* osfActivate */ - { 0x1004ff45, 21080 }, /* osfMenuBar */ - { 0x1004ff51, 21064 }, /* osfLeft */ - { 0x1004ff52, 21290 }, /* osfUp */ - { 0x1004ff53, 21250 }, /* osfRight */ - { 0x1004ff54, 20996 }, /* osfDown */ - { 0x1004ff57, 21015 }, /* osfEndLine */ - { 0x1004ff58, 20924 }, /* osfBeginLine */ - { 0x1004ff59, 21004 }, /* osfEndData */ - { 0x1004ff5a, 20911 }, /* osfBeginData */ - { 0x1004ff5b, 21185 }, /* osfPrevMenu */ - { 0x1004ff5c, 21104 }, /* osfNextMenu */ - { 0x1004ff5d, 21172 }, /* osfPrevField */ - { 0x1004ff5e, 21091 }, /* osfNextField */ - { 0x1004ff60, 21259 }, /* osfSelect */ - { 0x1004ff63, 21054 }, /* osfInsert */ - { 0x1004ff65, 21282 }, /* osfUndo */ - { 0x1004ff67, 21072 }, /* osfMenu */ - { 0x1004ff69, 20937 }, /* osfCancel */ - { 0x1004ff6a, 21046 }, /* osfHelp */ - { 0x1004ff71, 21269 }, /* osfSelectAll */ - { 0x1004ff72, 20981 }, /* osfDeselectAll */ - { 0x1004ff73, 21227 }, /* osfReselect */ - { 0x1004ff74, 21036 }, /* osfExtend */ - { 0x1004ff78, 21239 }, /* osfRestore */ - { 0x1004ffff, 20971 }, /* osfDelete */ - { 0x1005ff00, 24032 }, /* SunFA_Grave */ - { 0x1005ff01, 24003 }, /* SunFA_Circum */ - { 0x1005ff02, 24044 }, /* SunFA_Tilde */ - { 0x1005ff03, 23977 }, /* SunFA_Acute */ - { 0x1005ff04, 24016 }, /* SunFA_Diaeresis */ - { 0x1005ff05, 23989 }, /* SunFA_Cedilla */ - { 0x1005ff10, 23963 }, /* SunF36 */ - { 0x1005ff11, 23970 }, /* SunF37 */ - { 0x1005ff60, 24180 }, /* SunSys_Req */ - { 0x1005ff70, 24163 }, /* SunProps */ - { 0x1005ff71, 24064 }, /* SunFront */ - { 0x1005ff72, 23948 }, /* SunCopy */ - { 0x1005ff73, 24073 }, /* SunOpen */ - { 0x1005ff74, 24103 }, /* SunPaste */ - { 0x1005ff75, 23956 }, /* SunCut */ - { 0x1005ff76, 24112 }, /* SunPowerSwitch */ - { 0x1005ff77, 23884 }, /* SunAudioLowerVolume */ - { 0x1005ff78, 23904 }, /* SunAudioMute */ - { 0x1005ff79, 23917 }, /* SunAudioRaiseVolume */ - { 0x1005ff7a, 24199 }, /* SunVideoDegauss */ - { 0x1005ff7b, 24215 }, /* SunVideoLowerBrightness */ - { 0x1005ff7c, 24239 }, /* SunVideoRaiseBrightness */ - { 0x1005ff7d, 24127 }, /* SunPowerSwitchShift */ - { 0x1008fe01, 28491 }, /* XF86Switch_VT_1 */ - { 0x1008fe02, 28558 }, /* XF86Switch_VT_2 */ - { 0x1008fe03, 28574 }, /* XF86Switch_VT_3 */ - { 0x1008fe04, 28590 }, /* XF86Switch_VT_4 */ - { 0x1008fe05, 28606 }, /* XF86Switch_VT_5 */ - { 0x1008fe06, 28622 }, /* XF86Switch_VT_6 */ - { 0x1008fe07, 28638 }, /* XF86Switch_VT_7 */ - { 0x1008fe08, 28654 }, /* XF86Switch_VT_8 */ - { 0x1008fe09, 28670 }, /* XF86Switch_VT_9 */ - { 0x1008fe0a, 28507 }, /* XF86Switch_VT_10 */ - { 0x1008fe0b, 28524 }, /* XF86Switch_VT_11 */ - { 0x1008fe0c, 28541 }, /* XF86Switch_VT_12 */ - { 0x1008fe20, 28817 }, /* XF86Ungrab */ - { 0x1008fe21, 27151 }, /* XF86ClearGrab */ - { 0x1008fe22, 27991 }, /* XF86Next_VMode */ - { 0x1008fe23, 28113 }, /* XF86Prev_VMode */ - { 0x1008fe24, 27771 }, /* XF86LogWindowTree */ - { 0x1008fe25, 27744 }, /* XF86LogGrabInfo */ - { 0x1008ff01, 27882 }, /* XF86ModeLock */ - { 0x1008ff02, 27917 }, /* XF86MonBrightnessUp */ - { 0x1008ff03, 27895 }, /* XF86MonBrightnessDown */ - { 0x1008ff04, 27507 }, /* XF86KbdLightOnOff */ - { 0x1008ff05, 27487 }, /* XF86KbdBrightnessUp */ - { 0x1008ff06, 27465 }, /* XF86KbdBrightnessDown */ - { 0x1008ff10, 28423 }, /* XF86Standby */ - { 0x1008ff11, 26749 }, /* XF86AudioLowerVolume */ - { 0x1008ff12, 26802 }, /* XF86AudioMute */ - { 0x1008ff13, 26889 }, /* XF86AudioRaiseVolume */ - { 0x1008ff14, 26845 }, /* XF86AudioPlay */ - { 0x1008ff15, 26978 }, /* XF86AudioStop */ - { 0x1008ff16, 26875 }, /* XF86AudioPrev */ - { 0x1008ff17, 26816 }, /* XF86AudioNext */ - { 0x1008ff18, 27428 }, /* XF86HomePage */ - { 0x1008ff19, 27789 }, /* XF86Mail */ - { 0x1008ff1a, 28435 }, /* XF86Start */ - { 0x1008ff1b, 28347 }, /* XF86Search */ - { 0x1008ff1c, 26930 }, /* XF86AudioRecord */ - { 0x1008ff1d, 27106 }, /* XF86Calculator */ - { 0x1008ff1e, 27837 }, /* XF86Memo */ - { 0x1008ff1f, 28721 }, /* XF86ToDoList */ - { 0x1008ff20, 27121 }, /* XF86Calendar */ - { 0x1008ff21, 28086 }, /* XF86PowerDown */ - { 0x1008ff22, 27189 }, /* XF86ContrastAdjust */ - { 0x1008ff23, 28217 }, /* XF86RockerUp */ - { 0x1008ff24, 28186 }, /* XF86RockerDown */ - { 0x1008ff25, 28201 }, /* XF86RockerEnter */ - { 0x1008ff26, 27001 }, /* XF86Back */ - { 0x1008ff27, 27333 }, /* XF86Forward */ - { 0x1008ff28, 28445 }, /* XF86Stop */ - { 0x1008ff29, 28142 }, /* XF86Refresh */ - { 0x1008ff2a, 28100 }, /* XF86PowerOff */ - { 0x1008ff2b, 28905 }, /* XF86WakeUp */ - { 0x1008ff2c, 27274 }, /* XF86Eject */ - { 0x1008ff2d, 28287 }, /* XF86ScreenSaver */ - { 0x1008ff2e, 28970 }, /* XF86WWW */ - { 0x1008ff2f, 28387 }, /* XF86Sleep */ - { 0x1008ff30, 27307 }, /* XF86Favorites */ - { 0x1008ff31, 26830 }, /* XF86AudioPause */ - { 0x1008ff32, 26770 }, /* XF86AudioMedia */ - { 0x1008ff33, 27947 }, /* XF86MyComputer */ - { 0x1008ff34, 28871 }, /* XF86VendorHome */ - { 0x1008ff35, 27730 }, /* XF86LightBulb */ - { 0x1008ff36, 28378 }, /* XF86Shop */ - { 0x1008ff37, 27416 }, /* XF86History */ - { 0x1008ff38, 28030 }, /* XF86OpenURL */ - { 0x1008ff39, 26655 }, /* XF86AddFavorite */ - { 0x1008ff3a, 27441 }, /* XF86HotLinks */ - { 0x1008ff3b, 27070 }, /* XF86BrightnessAdjust */ - { 0x1008ff3c, 27321 }, /* XF86Finance */ - { 0x1008ff3d, 27175 }, /* XF86Community */ - { 0x1008ff3e, 26962 }, /* XF86AudioRewind */ - { 0x1008ff3f, 27010 }, /* XF86BackForward */ - { 0x1008ff40, 27538 }, /* XF86Launch0 */ - { 0x1008ff41, 27550 }, /* XF86Launch1 */ - { 0x1008ff42, 27562 }, /* XF86Launch2 */ - { 0x1008ff43, 27574 }, /* XF86Launch3 */ - { 0x1008ff44, 27586 }, /* XF86Launch4 */ - { 0x1008ff45, 27598 }, /* XF86Launch5 */ - { 0x1008ff46, 27610 }, /* XF86Launch6 */ - { 0x1008ff47, 27622 }, /* XF86Launch7 */ - { 0x1008ff48, 27634 }, /* XF86Launch8 */ - { 0x1008ff49, 27646 }, /* XF86Launch9 */ - { 0x1008ff4a, 27658 }, /* XF86LaunchA */ - { 0x1008ff4b, 27670 }, /* XF86LaunchB */ - { 0x1008ff4c, 27682 }, /* XF86LaunchC */ - { 0x1008ff4d, 27694 }, /* XF86LaunchD */ - { 0x1008ff4e, 27706 }, /* XF86LaunchE */ - { 0x1008ff4f, 27718 }, /* XF86LaunchF */ - { 0x1008ff50, 26671 }, /* XF86ApplicationLeft */ - { 0x1008ff51, 26691 }, /* XF86ApplicationRight */ - { 0x1008ff52, 27061 }, /* XF86Book */ - { 0x1008ff53, 27134 }, /* XF86CD */ - { 0x1008ff54, 27091 }, /* XF86Calculater */ - { 0x1008ff55, 27141 }, /* XF86Clear */ - { 0x1008ff56, 27165 }, /* XF86Close */ - { 0x1008ff57, 27208 }, /* XF86Copy */ - { 0x1008ff58, 27217 }, /* XF86Cut */ - { 0x1008ff59, 27240 }, /* XF86Display */ - { 0x1008ff5a, 27266 }, /* XF86DOS */ - { 0x1008ff5b, 27252 }, /* XF86Documents */ - { 0x1008ff5c, 27284 }, /* XF86Excel */ - { 0x1008ff5d, 27294 }, /* XF86Explorer */ - { 0x1008ff5e, 27376 }, /* XF86Game */ - { 0x1008ff5f, 27385 }, /* XF86Go */ - { 0x1008ff60, 27454 }, /* XF86iTouch */ - { 0x1008ff61, 27760 }, /* XF86LogOff */ - { 0x1008ff62, 27814 }, /* XF86Market */ - { 0x1008ff63, 27825 }, /* XF86Meeting */ - { 0x1008ff65, 27846 }, /* XF86MenuKB */ - { 0x1008ff66, 27857 }, /* XF86MenuPB */ - { 0x1008ff67, 27962 }, /* XF86MySites */ - { 0x1008ff68, 27974 }, /* XF86New */ - { 0x1008ff69, 27982 }, /* XF86News */ - { 0x1008ff6a, 28006 }, /* XF86OfficeHome */ - { 0x1008ff6b, 28021 }, /* XF86Open */ - { 0x1008ff6c, 28042 }, /* XF86Option */ - { 0x1008ff6d, 28053 }, /* XF86Paste */ - { 0x1008ff6e, 28063 }, /* XF86Phone */ - { 0x1008ff70, 28128 }, /* XF86Q */ - { 0x1008ff72, 28165 }, /* XF86Reply */ - { 0x1008ff73, 28154 }, /* XF86Reload */ - { 0x1008ff74, 28230 }, /* XF86RotateWindows */ - { 0x1008ff75, 28263 }, /* XF86RotationPB */ - { 0x1008ff76, 28248 }, /* XF86RotationKB */ - { 0x1008ff77, 28278 }, /* XF86Save */ - { 0x1008ff78, 28334 }, /* XF86ScrollUp */ - { 0x1008ff79, 28319 }, /* XF86ScrollDown */ - { 0x1008ff7a, 28303 }, /* XF86ScrollClick */ - { 0x1008ff7b, 28369 }, /* XF86Send */ - { 0x1008ff7c, 28397 }, /* XF86Spell */ - { 0x1008ff7d, 28407 }, /* XF86SplitScreen */ - { 0x1008ff7e, 28467 }, /* XF86Support */ - { 0x1008ff7f, 28686 }, /* XF86TaskPane */ - { 0x1008ff80, 28699 }, /* XF86Terminal */ - { 0x1008ff81, 28734 }, /* XF86Tools */ - { 0x1008ff82, 28806 }, /* XF86Travel */ - { 0x1008ff84, 28852 }, /* XF86UserPB */ - { 0x1008ff85, 28828 }, /* XF86User1KB */ - { 0x1008ff86, 28840 }, /* XF86User2KB */ - { 0x1008ff87, 28886 }, /* XF86Video */ - { 0x1008ff88, 28927 }, /* XF86WheelButton */ - { 0x1008ff89, 28952 }, /* XF86Word */ - { 0x1008ff8a, 28978 }, /* XF86Xfer */ - { 0x1008ff8b, 28998 }, /* XF86ZoomIn */ - { 0x1008ff8c, 29009 }, /* XF86ZoomOut */ - { 0x1008ff8d, 26992 }, /* XF86Away */ - { 0x1008ff8e, 27868 }, /* XF86Messenger */ - { 0x1008ff8f, 28916 }, /* XF86WebCam */ - { 0x1008ff90, 27798 }, /* XF86MailForward */ - { 0x1008ff91, 28073 }, /* XF86Pictures */ - { 0x1008ff92, 27937 }, /* XF86Music */ - { 0x1008ff93, 27026 }, /* XF86Battery */ - { 0x1008ff94, 27047 }, /* XF86Bluetooth */ - { 0x1008ff95, 28943 }, /* XF86WLAN */ - { 0x1008ff96, 28863 }, /* XF86UWB */ - { 0x1008ff97, 26732 }, /* XF86AudioForward */ - { 0x1008ff98, 26946 }, /* XF86AudioRepeat */ - { 0x1008ff99, 26910 }, /* XF86AudioRandomPlay */ - { 0x1008ff9a, 28454 }, /* XF86Subtitle */ - { 0x1008ff9b, 26712 }, /* XF86AudioCycleTrack */ - { 0x1008ff9c, 27225 }, /* XF86CycleAngle */ - { 0x1008ff9d, 27345 }, /* XF86FrameBack */ - { 0x1008ff9e, 27359 }, /* XF86FrameForward */ - { 0x1008ff9f, 28712 }, /* XF86Time */ - { 0x1008ffa0, 28358 }, /* XF86Select */ - { 0x1008ffa1, 28896 }, /* XF86View */ - { 0x1008ffa2, 28744 }, /* XF86TopMenu */ - { 0x1008ffa3, 28134 }, /* XF86Red */ - { 0x1008ffa4, 27392 }, /* XF86Green */ - { 0x1008ffa5, 28987 }, /* XF86Yellow */ - { 0x1008ffa6, 27038 }, /* XF86Blue */ - { 0x1008ffa7, 28479 }, /* XF86Suspend */ - { 0x1008ffa8, 27402 }, /* XF86Hibernate */ - { 0x1008ffa9, 28787 }, /* XF86TouchpadToggle */ - { 0x1008ffb0, 28772 }, /* XF86TouchpadOn */ - { 0x1008ffb1, 28756 }, /* XF86TouchpadOff */ - { 0x1008ffb2, 26785 }, /* XF86AudioMicMute */ - { 0x1008ffb3, 27525 }, /* XF86Keyboard */ - { 0x1008ffb4, 28961 }, /* XF86WWAN */ - { 0x1008ffb5, 28175 }, /* XF86RFKill */ - { 0x1008ffb6, 26859 }, /* XF86AudioPreset */ -}; diff --git a/src/3rdparty/xkbcommon/src/scanner-utils.h b/src/3rdparty/xkbcommon/src/scanner-utils.h deleted file mode 100644 index 5fdb22ae9a..0000000000 --- a/src/3rdparty/xkbcommon/src/scanner-utils.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef XKBCOMP_SCANNER_UTILS_H -#define XKBCOMP_SCANNER_UTILS_H - -/* Point to some substring in the file; used to avoid copying. */ -struct sval { - const char *start; - unsigned int len; -}; -typedef darray(struct sval) darray_sval; - -static inline bool -svaleq(struct sval s1, struct sval s2) -{ - return s1.len == s2.len && memcmp(s1.start, s2.start, s1.len) == 0; -} - -static inline bool -svaleq_prefix(struct sval s1, struct sval s2) -{ - return s1.len <= s2.len && memcmp(s1.start, s2.start, s1.len) == 0; -} - -struct scanner { - const char *s; - size_t pos; - size_t len; - char buf[1024]; - size_t buf_pos; - unsigned line, column; - /* The line/column of the start of the current token. */ - unsigned token_line, token_column; - const char *file_name; - struct xkb_context *ctx; - void *priv; -}; - -#define scanner_log(scanner, level, fmt, ...) \ - xkb_log((scanner)->ctx, (level), 0, \ - "%s:%u:%u: " fmt "\n", \ - (scanner)->file_name, \ - (scanner)->token_line, (scanner)->token_column, ##__VA_ARGS__) - -#define scanner_err(scanner, fmt, ...) \ - scanner_log(scanner, XKB_LOG_LEVEL_ERROR, fmt, ##__VA_ARGS__) - -#define scanner_warn(scanner, fmt, ...) \ - scanner_log(scanner, XKB_LOG_LEVEL_WARNING, fmt, ##__VA_ARGS__) - -static inline void -scanner_init(struct scanner *s, struct xkb_context *ctx, - const char *string, size_t len, const char *file_name, - void *priv) -{ - s->s = string; - s->len = len; - s->pos = 0; - s->line = s->column = 1; - s->token_line = s->token_column = 1; - s->file_name = file_name; - s->ctx = ctx; - s->priv = priv; -} - -static inline char -peek(struct scanner *s) -{ - if (unlikely(s->pos >= s->len)) - return '\0'; - return s->s[s->pos]; -} - -static inline bool -eof(struct scanner *s) -{ - return s->pos >= s->len; -} - -static inline bool -eol(struct scanner *s) -{ - return peek(s) == '\n'; -} - -static inline void -skip_to_eol(struct scanner *s) -{ - const char *nl = memchr(s->s + s->pos, '\n', s->len - s->pos); - const size_t new_pos = nl ? (size_t) (nl - s->s) : s->len; - s->column += new_pos - s->pos; - s->pos = new_pos; -} - -static inline char -next(struct scanner *s) -{ - if (unlikely(eof(s))) - return '\0'; - if (unlikely(eol(s))) { - s->line++; - s->column = 1; - } - else { - s->column++; - } - return s->s[s->pos++]; -} - -static inline bool -chr(struct scanner *s, char ch) -{ - if (likely(peek(s) != ch)) - return false; - s->pos++; s->column++; - return true; -} - -static inline bool -str(struct scanner *s, const char *string, size_t len) -{ - if (s->len - s->pos < len) - return false; - if (memcmp(s->s + s->pos, string, len) != 0) - return false; - s->pos += len; s->column += len; - return true; -} - -#define lit(s, literal) str(s, literal, sizeof(literal) - 1) - -static inline bool -buf_append(struct scanner *s, char ch) -{ - if (s->buf_pos + 1 >= sizeof(s->buf)) - return false; - s->buf[s->buf_pos++] = ch; - return true; -} - -static inline bool -buf_appends(struct scanner *s, const char *str) -{ - int ret; - ret = snprintf(s->buf + s->buf_pos, sizeof(s->buf) - s->buf_pos, "%s", str); - if (ret < 0 || (size_t) ret >= sizeof(s->buf) - s->buf_pos) - return false; - s->buf_pos += ret; - return true; -} - -static inline bool -oct(struct scanner *s, uint8_t *out) -{ - int i; - for (i = 0, *out = 0; peek(s) >= '0' && peek(s) <= '7' && i < 3; i++) - *out = *out * 8 + next(s) - '0'; - return i > 0; -} - -static inline bool -hex(struct scanner *s, uint8_t *out) -{ - int i; - for (i = 0, *out = 0; is_xdigit(peek(s)) && i < 2; i++) { - const char c = next(s); - const char offset = (c >= '0' && c <= '9' ? '0' : - c >= 'a' && c <= 'f' ? 'a' - 10 : 'A' - 10); - *out = *out * 16 + c - offset; - } - return i > 0; -} - -#endif diff --git a/src/3rdparty/xkbcommon/src/state.c b/src/3rdparty/xkbcommon/src/state.c deleted file mode 100644 index 16a4caa23d..0000000000 --- a/src/3rdparty/xkbcommon/src/state.c +++ /dev/null @@ -1,1446 +0,0 @@ -/************************************************************ - * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -/* - * This is a bastardised version of xkbActions.c from the X server which - * does not support, for the moment: - * - AccessX sticky/debounce/etc (will come later) - * - pointer keys (may come later) - * - key redirects (unlikely) - * - messages (very unlikely) - */ - -#include "keymap.h" -#include "keysym.h" -#include "utf8.h" - -struct xkb_filter { - union xkb_action action; - const struct xkb_key *key; - uint32_t priv; - bool (*func)(struct xkb_state *state, - struct xkb_filter *filter, - const struct xkb_key *key, - enum xkb_key_direction direction); - int refcnt; -}; - -struct state_components { - /* These may be negative, because of -1 group actions. */ - int32_t base_group; /**< depressed */ - int32_t latched_group; - int32_t locked_group; - xkb_layout_index_t group; /**< effective */ - - xkb_mod_mask_t base_mods; /**< depressed */ - xkb_mod_mask_t latched_mods; - xkb_mod_mask_t locked_mods; - xkb_mod_mask_t mods; /**< effective */ - - xkb_led_mask_t leds; -}; - -struct xkb_state { - /* - * Before updating the state, we keep a copy of just this struct. This - * allows us to report which components of the state have changed. - */ - struct state_components components; - - /* - * At each event, we accumulate all the needed modifications to the base - * modifiers, and apply them at the end. These keep track of this state. - */ - xkb_mod_mask_t set_mods; - xkb_mod_mask_t clear_mods; - - /* - * We mustn't clear a base modifier if there's another depressed key - * which affects it, e.g. given this sequence - * < Left Shift down, Right Shift down, Left Shift Up > - * the modifier should still be set. This keeps the count. - */ - int16_t mod_key_count[XKB_MAX_MODS]; - - int refcnt; - darray(struct xkb_filter) filters; - struct xkb_keymap *keymap; -}; - -/* - * If the virtual modifiers are not bound to anything, the entry - * is not active and should be skipped. xserver does this with - * cached entry->active field. - */ -static bool -entry_is_active(const struct xkb_key_type_entry *entry) -{ - return entry->mods.mods == 0 || entry->mods.mask != 0; -} - -static const struct xkb_key_type_entry * -get_entry_for_mods(const struct xkb_key_type *type, xkb_mod_mask_t mods) -{ - for (unsigned i = 0; i < type->num_entries; i++) - if (entry_is_active(&type->entries[i]) && - type->entries[i].mods.mask == mods) - return &type->entries[i]; - return NULL; -} - -static const struct xkb_key_type_entry * -get_entry_for_key_state(struct xkb_state *state, const struct xkb_key *key, - xkb_layout_index_t group) -{ - const struct xkb_key_type *type = key->groups[group].type; - xkb_mod_mask_t active_mods = state->components.mods & type->mods.mask; - return get_entry_for_mods(type, active_mods); -} - -/** - * Returns the level to use for the given key and state, or - * XKB_LEVEL_INVALID. - */ -XKB_EXPORT xkb_level_index_t -xkb_state_key_get_level(struct xkb_state *state, xkb_keycode_t kc, - xkb_layout_index_t layout) -{ - const struct xkb_key *key = XkbKey(state->keymap, kc); - const struct xkb_key_type_entry *entry; - - if (!key || layout >= key->num_groups) - return XKB_LEVEL_INVALID; - - /* If we don't find an explicit match the default is 0. */ - entry = get_entry_for_key_state(state, key, layout); - if (!entry) - return 0; - - return entry->level; -} - -xkb_layout_index_t -XkbWrapGroupIntoRange(int32_t group, - xkb_layout_index_t num_groups, - enum xkb_range_exceed_type out_of_range_group_action, - xkb_layout_index_t out_of_range_group_number) -{ - if (num_groups == 0) - return XKB_LAYOUT_INVALID; - - if (group >= 0 && (xkb_layout_index_t) group < num_groups) - return group; - - switch (out_of_range_group_action) { - case RANGE_REDIRECT: - if (out_of_range_group_number >= num_groups) - return 0; - return out_of_range_group_number; - - case RANGE_SATURATE: - if (group < 0) - return 0; - else - return num_groups - 1; - - case RANGE_WRAP: - default: - /* - * C99 says a negative dividend in a modulo operation always - * gives a negative result. - */ - if (group < 0) - return ((int) num_groups + (group % (int) num_groups)); - else - return group % num_groups; - } -} - -/** - * Returns the layout to use for the given key and state, taking - * wrapping/clamping/etc into account, or XKB_LAYOUT_INVALID. - */ -XKB_EXPORT xkb_layout_index_t -xkb_state_key_get_layout(struct xkb_state *state, xkb_keycode_t kc) -{ - const struct xkb_key *key = XkbKey(state->keymap, kc); - - if (!key) - return XKB_LAYOUT_INVALID; - - return XkbWrapGroupIntoRange(state->components.group, key->num_groups, - key->out_of_range_group_action, - key->out_of_range_group_number); -} - -static const union xkb_action * -xkb_key_get_action(struct xkb_state *state, const struct xkb_key *key) -{ - static const union xkb_action dummy = { .type = ACTION_TYPE_NONE }; - - xkb_layout_index_t layout; - xkb_level_index_t level; - - layout = xkb_state_key_get_layout(state, key->keycode); - if (layout == XKB_LAYOUT_INVALID) - return &dummy; - - level = xkb_state_key_get_level(state, key->keycode, layout); - if (level == XKB_LEVEL_INVALID) - return &dummy; - - return &key->groups[layout].levels[level].action; -} - -static struct xkb_filter * -xkb_filter_new(struct xkb_state *state) -{ - struct xkb_filter *filter = NULL, *iter; - - darray_foreach(iter, state->filters) { - if (iter->func) - continue; - filter = iter; - break; - } - - if (!filter) { - darray_resize0(state->filters, darray_size(state->filters) + 1); - filter = &darray_item(state->filters, darray_size(state->filters) -1); - } - - filter->refcnt = 1; - return filter; -} - -/***====================================================================***/ - -enum xkb_filter_result { - /* - * The event is consumed by the filters. - * - * An event is always processed by all filters, but any filter can - * prevent it from being processed further by consuming it. - */ - XKB_FILTER_CONSUME, - /* - * The event may continue to be processed as far as this filter is - * concerned. - */ - XKB_FILTER_CONTINUE, -}; - -static void -xkb_filter_group_set_new(struct xkb_state *state, struct xkb_filter *filter) -{ - filter->priv = state->components.base_group; - if (filter->action.group.flags & ACTION_ABSOLUTE_SWITCH) - state->components.base_group = filter->action.group.group; - else - state->components.base_group += filter->action.group.group; -} - -static bool -xkb_filter_group_set_func(struct xkb_state *state, - struct xkb_filter *filter, - const struct xkb_key *key, - enum xkb_key_direction direction) -{ - if (key != filter->key) { - filter->action.group.flags &= ~ACTION_LOCK_CLEAR; - return XKB_FILTER_CONTINUE; - } - - if (direction == XKB_KEY_DOWN) { - filter->refcnt++; - return XKB_FILTER_CONSUME; - } - else if (--filter->refcnt > 0) { - return XKB_FILTER_CONSUME; - } - - state->components.base_group = filter->priv; - - if (filter->action.group.flags & ACTION_LOCK_CLEAR) - state->components.locked_group = 0; - - filter->func = NULL; - return XKB_FILTER_CONTINUE; -} - -static void -xkb_filter_group_lock_new(struct xkb_state *state, struct xkb_filter *filter) -{ - if (filter->action.group.flags & ACTION_ABSOLUTE_SWITCH) - state->components.locked_group = filter->action.group.group; - else - state->components.locked_group += filter->action.group.group; -} - -static bool -xkb_filter_group_lock_func(struct xkb_state *state, - struct xkb_filter *filter, - const struct xkb_key *key, - enum xkb_key_direction direction) -{ - if (key != filter->key) - return XKB_FILTER_CONTINUE; - - if (direction == XKB_KEY_DOWN) { - filter->refcnt++; - return XKB_FILTER_CONSUME; - } - if (--filter->refcnt > 0) - return XKB_FILTER_CONSUME; - - filter->func = NULL; - return XKB_FILTER_CONTINUE; -} - -static void -xkb_filter_mod_set_new(struct xkb_state *state, struct xkb_filter *filter) -{ - state->set_mods = filter->action.mods.mods.mask; -} - -static bool -xkb_filter_mod_set_func(struct xkb_state *state, - struct xkb_filter *filter, - const struct xkb_key *key, - enum xkb_key_direction direction) -{ - if (key != filter->key) { - filter->action.mods.flags &= ~ACTION_LOCK_CLEAR; - return XKB_FILTER_CONTINUE; - } - - if (direction == XKB_KEY_DOWN) { - filter->refcnt++; - return XKB_FILTER_CONSUME; - } - else if (--filter->refcnt > 0) { - return XKB_FILTER_CONSUME; - } - - state->clear_mods = filter->action.mods.mods.mask; - if (filter->action.mods.flags & ACTION_LOCK_CLEAR) - state->components.locked_mods &= ~filter->action.mods.mods.mask; - - filter->func = NULL; - return XKB_FILTER_CONTINUE; -} - -static void -xkb_filter_mod_lock_new(struct xkb_state *state, struct xkb_filter *filter) -{ - filter->priv = (state->components.locked_mods & - filter->action.mods.mods.mask); - state->set_mods |= filter->action.mods.mods.mask; - if (!(filter->action.mods.flags & ACTION_LOCK_NO_LOCK)) - state->components.locked_mods |= filter->action.mods.mods.mask; -} - -static bool -xkb_filter_mod_lock_func(struct xkb_state *state, - struct xkb_filter *filter, - const struct xkb_key *key, - enum xkb_key_direction direction) -{ - if (key != filter->key) - return XKB_FILTER_CONTINUE; - - if (direction == XKB_KEY_DOWN) { - filter->refcnt++; - return XKB_FILTER_CONSUME; - } - if (--filter->refcnt > 0) - return XKB_FILTER_CONSUME; - - state->clear_mods |= filter->action.mods.mods.mask; - if (!(filter->action.mods.flags & ACTION_LOCK_NO_UNLOCK)) - state->components.locked_mods &= ~filter->priv; - - filter->func = NULL; - return XKB_FILTER_CONTINUE; -} - -enum xkb_key_latch_state { - NO_LATCH, - LATCH_KEY_DOWN, - LATCH_PENDING, -}; - -static bool -xkb_action_breaks_latch(const union xkb_action *action) -{ - switch (action->type) { - case ACTION_TYPE_NONE: - case ACTION_TYPE_PTR_BUTTON: - case ACTION_TYPE_PTR_LOCK: - case ACTION_TYPE_CTRL_SET: - case ACTION_TYPE_CTRL_LOCK: - case ACTION_TYPE_SWITCH_VT: - case ACTION_TYPE_TERMINATE: - return true; - default: - return false; - } -} - -static void -xkb_filter_mod_latch_new(struct xkb_state *state, struct xkb_filter *filter) -{ - filter->priv = LATCH_KEY_DOWN; - state->set_mods = filter->action.mods.mods.mask; -} - -static bool -xkb_filter_mod_latch_func(struct xkb_state *state, - struct xkb_filter *filter, - const struct xkb_key *key, - enum xkb_key_direction direction) -{ - enum xkb_key_latch_state latch = filter->priv; - - if (direction == XKB_KEY_DOWN && latch == LATCH_PENDING) { - /* If this is a new keypress and we're awaiting our single latched - * keypress, then either break the latch if any random key is pressed, - * or promote it to a lock or plain base set if it's the same - * modifier. */ - const union xkb_action *action = xkb_key_get_action(state, key); - if (action->type == ACTION_TYPE_MOD_LATCH && - action->mods.flags == filter->action.mods.flags && - action->mods.mods.mask == filter->action.mods.mods.mask) { - filter->action = *action; - if (filter->action.mods.flags & ACTION_LATCH_TO_LOCK) { - filter->action.type = ACTION_TYPE_MOD_LOCK; - filter->func = xkb_filter_mod_lock_func; - state->components.locked_mods |= filter->action.mods.mods.mask; - } - else { - filter->action.type = ACTION_TYPE_MOD_SET; - filter->func = xkb_filter_mod_set_func; - state->set_mods = filter->action.mods.mods.mask; - } - filter->key = key; - state->components.latched_mods &= ~filter->action.mods.mods.mask; - /* XXX beep beep! */ - return XKB_FILTER_CONSUME; - } - else if (xkb_action_breaks_latch(action)) { - /* XXX: This may be totally broken, we might need to break the - * latch in the next run after this press? */ - state->components.latched_mods &= ~filter->action.mods.mods.mask; - filter->func = NULL; - return XKB_FILTER_CONTINUE; - } - } - else if (direction == XKB_KEY_UP && key == filter->key) { - /* Our key got released. If we've set it to clear locks, and we - * currently have the same modifiers locked, then release them and - * don't actually latch. Else we've actually hit the latching - * stage, so set PENDING and move our modifier from base to - * latched. */ - if (latch == NO_LATCH || - ((filter->action.mods.flags & ACTION_LOCK_CLEAR) && - (state->components.locked_mods & filter->action.mods.mods.mask) == - filter->action.mods.mods.mask)) { - /* XXX: We might be a bit overenthusiastic about clearing - * mods other filters have set here? */ - if (latch == LATCH_PENDING) - state->components.latched_mods &= - ~filter->action.mods.mods.mask; - else - state->clear_mods = filter->action.mods.mods.mask; - state->components.locked_mods &= ~filter->action.mods.mods.mask; - filter->func = NULL; - } - else { - latch = LATCH_PENDING; - state->clear_mods = filter->action.mods.mods.mask; - state->components.latched_mods |= filter->action.mods.mods.mask; - /* XXX beep beep! */ - } - } - else if (direction == XKB_KEY_DOWN && latch == LATCH_KEY_DOWN) { - /* Someone's pressed another key while we've still got the latching - * key held down, so keep the base modifier state active (from - * xkb_filter_mod_latch_new), but don't trip the latch, just clear - * it as soon as the modifier gets released. */ - latch = NO_LATCH; - } - - filter->priv = latch; - - return XKB_FILTER_CONTINUE; -} - -static const struct { - void (*new)(struct xkb_state *state, struct xkb_filter *filter); - bool (*func)(struct xkb_state *state, struct xkb_filter *filter, - const struct xkb_key *key, enum xkb_key_direction direction); -} filter_action_funcs[_ACTION_TYPE_NUM_ENTRIES] = { - [ACTION_TYPE_MOD_SET] = { xkb_filter_mod_set_new, - xkb_filter_mod_set_func }, - [ACTION_TYPE_MOD_LATCH] = { xkb_filter_mod_latch_new, - xkb_filter_mod_latch_func }, - [ACTION_TYPE_MOD_LOCK] = { xkb_filter_mod_lock_new, - xkb_filter_mod_lock_func }, - [ACTION_TYPE_GROUP_SET] = { xkb_filter_group_set_new, - xkb_filter_group_set_func }, - [ACTION_TYPE_GROUP_LOCK] = { xkb_filter_group_lock_new, - xkb_filter_group_lock_func }, -}; - -/** - * Applies any relevant filters to the key, first from the list of filters - * that are currently active, then if no filter has claimed the key, possibly - * apply a new filter from the key action. - */ -static void -xkb_filter_apply_all(struct xkb_state *state, - const struct xkb_key *key, - enum xkb_key_direction direction) -{ - struct xkb_filter *filter; - const union xkb_action *action; - bool consumed; - - /* First run through all the currently active filters and see if any of - * them have consumed this event. */ - consumed = false; - darray_foreach(filter, state->filters) { - if (!filter->func) - continue; - - if (filter->func(state, filter, key, direction) == XKB_FILTER_CONSUME) - consumed = true; - } - if (consumed || direction == XKB_KEY_UP) - return; - - action = xkb_key_get_action(state, key); - - /* - * It's possible for the keymap to set action->type explicitly, like so: - * interpret XF86_Next_VMode { - * action = Private(type=0x86, data="+VMode"); - * }; - * We don't handle those. - */ - if (action->type >= _ACTION_TYPE_NUM_ENTRIES) - return; - - if (!filter_action_funcs[action->type].new) - return; - - filter = xkb_filter_new(state); - filter->key = key; - filter->func = filter_action_funcs[action->type].func; - filter->action = *action; - filter_action_funcs[action->type].new(state, filter); -} - -XKB_EXPORT struct xkb_state * -xkb_state_new(struct xkb_keymap *keymap) -{ - struct xkb_state *ret; - - ret = calloc(sizeof(*ret), 1); - if (!ret) - return NULL; - - ret->refcnt = 1; - ret->keymap = xkb_keymap_ref(keymap); - - return ret; -} - -XKB_EXPORT struct xkb_state * -xkb_state_ref(struct xkb_state *state) -{ - state->refcnt++; - return state; -} - -XKB_EXPORT void -xkb_state_unref(struct xkb_state *state) -{ - if (!state || --state->refcnt > 0) - return; - - xkb_keymap_unref(state->keymap); - darray_free(state->filters); - free(state); -} - -XKB_EXPORT struct xkb_keymap * -xkb_state_get_keymap(struct xkb_state *state) -{ - return state->keymap; -} - -/** - * Update the LED state to match the rest of the xkb_state. - */ -static void -xkb_state_led_update_all(struct xkb_state *state) -{ - xkb_led_index_t idx; - const struct xkb_led *led; - - state->components.leds = 0; - - xkb_leds_enumerate(idx, led, state->keymap) { - xkb_mod_mask_t mod_mask = 0; - xkb_layout_mask_t group_mask = 0; - - if (led->which_mods != 0 && led->mods.mask != 0) { - if (led->which_mods & XKB_STATE_MODS_EFFECTIVE) - mod_mask |= state->components.mods; - if (led->which_mods & XKB_STATE_MODS_DEPRESSED) - mod_mask |= state->components.base_mods; - if (led->which_mods & XKB_STATE_MODS_LATCHED) - mod_mask |= state->components.latched_mods; - if (led->which_mods & XKB_STATE_MODS_LOCKED) - mod_mask |= state->components.locked_mods; - - if (led->mods.mask & mod_mask) { - state->components.leds |= (1u << idx); - continue; - } - } - - if (led->which_groups != 0 && led->groups != 0) { - if (led->which_groups & XKB_STATE_LAYOUT_EFFECTIVE) - group_mask |= (1u << state->components.group); - if (led->which_groups & XKB_STATE_LAYOUT_DEPRESSED) - group_mask |= (1u << state->components.base_group); - if (led->which_groups & XKB_STATE_LAYOUT_LATCHED) - group_mask |= (1u << state->components.latched_group); - if (led->which_groups & XKB_STATE_LAYOUT_LOCKED) - group_mask |= (1u << state->components.locked_group); - - if (led->groups & group_mask) { - state->components.leds |= (1u << idx); - continue; - } - } - - if (led->ctrls & state->keymap->enabled_ctrls) { - state->components.leds |= (1u << idx); - continue; - } - } -} - -/** - * Calculates the derived state (effective mods/group and LEDs) from an - * up-to-date xkb_state. - */ -static void -xkb_state_update_derived(struct xkb_state *state) -{ - xkb_layout_index_t wrapped; - - state->components.mods = (state->components.base_mods | - state->components.latched_mods | - state->components.locked_mods); - - /* TODO: Use groups_wrap control instead of always RANGE_WRAP. */ - - wrapped = XkbWrapGroupIntoRange(state->components.locked_group, - state->keymap->num_groups, - RANGE_WRAP, 0); - state->components.locked_group = - (wrapped == XKB_LAYOUT_INVALID ? 0 : wrapped); - - wrapped = XkbWrapGroupIntoRange(state->components.base_group + - state->components.latched_group + - state->components.locked_group, - state->keymap->num_groups, - RANGE_WRAP, 0); - state->components.group = - (wrapped == XKB_LAYOUT_INVALID ? 0 : wrapped); - - xkb_state_led_update_all(state); -} - -static enum xkb_state_component -get_state_component_changes(const struct state_components *a, - const struct state_components *b) -{ - xkb_mod_mask_t mask = 0; - - if (a->group != b->group) - mask |= XKB_STATE_LAYOUT_EFFECTIVE; - if (a->base_group != b->base_group) - mask |= XKB_STATE_LAYOUT_DEPRESSED; - if (a->latched_group != b->latched_group) - mask |= XKB_STATE_LAYOUT_LATCHED; - if (a->locked_group != b->locked_group) - mask |= XKB_STATE_LAYOUT_LOCKED; - if (a->mods != b->mods) - mask |= XKB_STATE_MODS_EFFECTIVE; - if (a->base_mods != b->base_mods) - mask |= XKB_STATE_MODS_DEPRESSED; - if (a->latched_mods != b->latched_mods) - mask |= XKB_STATE_MODS_LATCHED; - if (a->locked_mods != b->locked_mods) - mask |= XKB_STATE_MODS_LOCKED; - if (a->leds != b->leds) - mask |= XKB_STATE_LEDS; - - return mask; -} - -/** - * Given a particular key event, updates the state structure to reflect the - * new modifiers. - */ -XKB_EXPORT enum xkb_state_component -xkb_state_update_key(struct xkb_state *state, xkb_keycode_t kc, - enum xkb_key_direction direction) -{ - xkb_mod_index_t i; - xkb_mod_mask_t bit; - struct state_components prev_components; - const struct xkb_key *key = XkbKey(state->keymap, kc); - - if (!key) - return 0; - - prev_components = state->components; - - state->set_mods = 0; - state->clear_mods = 0; - - xkb_filter_apply_all(state, key, direction); - - for (i = 0, bit = 1; state->set_mods; i++, bit <<= 1) { - if (state->set_mods & bit) { - state->mod_key_count[i]++; - state->components.base_mods |= bit; - state->set_mods &= ~bit; - } - } - - for (i = 0, bit = 1; state->clear_mods; i++, bit <<= 1) { - if (state->clear_mods & bit) { - state->mod_key_count[i]--; - if (state->mod_key_count[i] <= 0) { - state->components.base_mods &= ~bit; - state->mod_key_count[i] = 0; - } - state->clear_mods &= ~bit; - } - } - - xkb_state_update_derived(state); - - return get_state_component_changes(&prev_components, &state->components); -} - -/** - * Updates the state from a set of explicit masks as gained from - * xkb_state_serialize_mods and xkb_state_serialize_groups. As noted in the - * documentation for these functions in xkbcommon.h, this round-trip is - * lossy, and should only be used to update a slave state mirroring the - * master, e.g. in a client/server window system. - */ -XKB_EXPORT enum xkb_state_component -xkb_state_update_mask(struct xkb_state *state, - xkb_mod_mask_t base_mods, - xkb_mod_mask_t latched_mods, - xkb_mod_mask_t locked_mods, - xkb_layout_index_t base_group, - xkb_layout_index_t latched_group, - xkb_layout_index_t locked_group) -{ - struct state_components prev_components; - xkb_mod_mask_t mask; - - prev_components = state->components; - - /* Only include modifiers which exist in the keymap. */ - mask = (xkb_mod_mask_t) ((1ull << xkb_keymap_num_mods(state->keymap)) - 1u); - - state->components.base_mods = base_mods & mask; - state->components.latched_mods = latched_mods & mask; - state->components.locked_mods = locked_mods & mask; - - /* Make sure the mods are fully resolved - since we get arbitrary - * input, they might not be. - * - * It might seem more reasonable to do this only for components.mods - * in xkb_state_update_derived(), rather than for each component - * seperately. That would allow to distinguish between "really" - * depressed mods (would be in MODS_DEPRESSED) and indirectly - * depressed to to a mapping (would only be in MODS_EFFECTIVE). - * However, the traditional behavior of xkb_state_update_key() is that - * if a vmod is depressed, its mappings are depressed with it; so we're - * expected to do the same here. Also, LEDs (usually) look if a real - * mod is locked, not just effective; otherwise it won't be lit. - * - * We OR here because mod_mask_get_effective() drops vmods. */ - state->components.base_mods |= - mod_mask_get_effective(state->keymap, state->components.base_mods); - state->components.latched_mods |= - mod_mask_get_effective(state->keymap, state->components.latched_mods); - state->components.locked_mods |= - mod_mask_get_effective(state->keymap, state->components.locked_mods); - - state->components.base_group = base_group; - state->components.latched_group = latched_group; - state->components.locked_group = locked_group; - - xkb_state_update_derived(state); - - return get_state_component_changes(&prev_components, &state->components); -} - -/** - * Provides the symbols to use for the given key and state. Returns the - * number of symbols pointed to in syms_out. - */ -XKB_EXPORT int -xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t kc, - const xkb_keysym_t **syms_out) -{ - xkb_layout_index_t layout; - xkb_level_index_t level; - - layout = xkb_state_key_get_layout(state, kc); - if (layout == XKB_LAYOUT_INVALID) - goto err; - - level = xkb_state_key_get_level(state, kc, layout); - if (level == XKB_LEVEL_INVALID) - goto err; - - return xkb_keymap_key_get_syms_by_level(state->keymap, kc, layout, level, - syms_out); - -err: - *syms_out = NULL; - return 0; -} - -/* - * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Lock_Modifier - */ -static bool -should_do_caps_transformation(struct xkb_state *state, xkb_keycode_t kc) -{ - xkb_mod_index_t caps = - xkb_keymap_mod_get_index(state->keymap, XKB_MOD_NAME_CAPS); - - return - xkb_state_mod_index_is_active(state, caps, XKB_STATE_MODS_EFFECTIVE) > 0 && - xkb_state_mod_index_is_consumed(state, kc, caps) == 0; -} - -/* - * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Control_Modifier - */ -static bool -should_do_ctrl_transformation(struct xkb_state *state, xkb_keycode_t kc) -{ - xkb_mod_index_t ctrl = - xkb_keymap_mod_get_index(state->keymap, XKB_MOD_NAME_CTRL); - - return - xkb_state_mod_index_is_active(state, ctrl, XKB_STATE_MODS_EFFECTIVE) > 0 && - xkb_state_mod_index_is_consumed(state, kc, ctrl) == 0; -} - -/* Verbatim from libX11:src/xkb/XKBBind.c */ -static char -XkbToControl(char ch) -{ - char c = ch; - - if ((c >= '@' && c < '\177') || c == ' ') - c &= 0x1F; - else if (c == '2') - c = '\000'; - else if (c >= '3' && c <= '7') - c -= ('3' - '\033'); - else if (c == '8') - c = '\177'; - else if (c == '/') - c = '_' & 0x1F; - return c; -} - -/** - * Provides either exactly one symbol, or XKB_KEY_NoSymbol. - */ -XKB_EXPORT xkb_keysym_t -xkb_state_key_get_one_sym(struct xkb_state *state, xkb_keycode_t kc) -{ - const xkb_keysym_t *syms; - xkb_keysym_t sym; - int num_syms; - - num_syms = xkb_state_key_get_syms(state, kc, &syms); - if (num_syms != 1) - return XKB_KEY_NoSymbol; - - sym = syms[0]; - - if (should_do_caps_transformation(state, kc)) - sym = xkb_keysym_to_upper(sym); - - return sym; -} - -/* - * The caps and ctrl transformations require some special handling, - * so we cannot simply use xkb_state_get_one_sym() for them. - * In particular, if Control is set, we must try very hard to find - * some layout in which the keysym is ASCII and thus can be (maybe) - * converted to a control character. libX11 allows to disable this - * behavior with the XkbLC_ControlFallback (see XkbSetXlibControls(3)), - * but it is enabled by default, yippee. - */ -static xkb_keysym_t -get_one_sym_for_string(struct xkb_state *state, xkb_keycode_t kc) -{ - xkb_level_index_t level; - xkb_layout_index_t layout, num_layouts; - const xkb_keysym_t *syms; - int nsyms; - xkb_keysym_t sym; - - layout = xkb_state_key_get_layout(state, kc); - num_layouts = xkb_keymap_num_layouts_for_key(state->keymap, kc); - level = xkb_state_key_get_level(state, kc, layout); - if (layout == XKB_LAYOUT_INVALID || num_layouts == 0 || - level == XKB_LEVEL_INVALID) - return XKB_KEY_NoSymbol; - - nsyms = xkb_keymap_key_get_syms_by_level(state->keymap, kc, - layout, level, &syms); - if (nsyms != 1) - return XKB_KEY_NoSymbol; - sym = syms[0]; - - if (should_do_ctrl_transformation(state, kc) && sym > 127u) { - for (xkb_layout_index_t i = 0; i < num_layouts; i++) { - level = xkb_state_key_get_level(state, kc, i); - if (level == XKB_LEVEL_INVALID) - continue; - - nsyms = xkb_keymap_key_get_syms_by_level(state->keymap, kc, - i, level, &syms); - if (nsyms == 1 && syms[0] <= 127u) { - sym = syms[0]; - break; - } - } - } - - if (should_do_caps_transformation(state, kc)) { - sym = xkb_keysym_to_upper(sym); - } - - return sym; -} - -XKB_EXPORT int -xkb_state_key_get_utf8(struct xkb_state *state, xkb_keycode_t kc, - char *buffer, size_t size) -{ - xkb_keysym_t sym; - const xkb_keysym_t *syms; - int nsyms; - int offset; - char tmp[7]; - - sym = get_one_sym_for_string(state, kc); - if (sym != XKB_KEY_NoSymbol) { - nsyms = 1; syms = &sym; - } - else { - nsyms = xkb_state_key_get_syms(state, kc, &syms); - } - - /* Make sure not to truncate in the middle of a UTF-8 sequence. */ - offset = 0; - for (int i = 0; i < nsyms; i++) { - int ret = xkb_keysym_to_utf8(syms[i], tmp, sizeof(tmp)); - if (ret <= 0) - goto err_bad; - - ret--; - if ((size_t) (offset + ret) <= size) - memcpy(buffer + offset, tmp, ret); - offset += ret; - } - - if ((size_t) offset >= size) - goto err_trunc; - buffer[offset] = '\0'; - - if (!is_valid_utf8(buffer, offset)) - goto err_bad; - - if (offset == 1 && (unsigned int) buffer[0] <= 127u && - should_do_ctrl_transformation(state, kc)) - buffer[0] = XkbToControl(buffer[0]); - - return offset; - -err_trunc: - if (size > 0) - buffer[size - 1] = '\0'; - return offset; - -err_bad: - if (size > 0) - buffer[0] = '\0'; - return 0; -} - -XKB_EXPORT uint32_t -xkb_state_key_get_utf32(struct xkb_state *state, xkb_keycode_t kc) -{ - xkb_keysym_t sym; - uint32_t cp; - - sym = get_one_sym_for_string(state, kc); - cp = xkb_keysym_to_utf32(sym); - - if (cp <= 127u && should_do_ctrl_transformation(state, kc)) - cp = (uint32_t) XkbToControl((char) cp); - - return cp; -} - -/** - * Serialises the requested modifier state into an xkb_mod_mask_t, with all - * the same disclaimers as in xkb_state_update_mask. - */ -XKB_EXPORT xkb_mod_mask_t -xkb_state_serialize_mods(struct xkb_state *state, - enum xkb_state_component type) -{ - xkb_mod_mask_t ret = 0; - - if (type & XKB_STATE_MODS_EFFECTIVE) - return state->components.mods; - - if (type & XKB_STATE_MODS_DEPRESSED) - ret |= state->components.base_mods; - if (type & XKB_STATE_MODS_LATCHED) - ret |= state->components.latched_mods; - if (type & XKB_STATE_MODS_LOCKED) - ret |= state->components.locked_mods; - - return ret; -} - -/** - * Serialises the requested group state, with all the same disclaimers as - * in xkb_state_update_mask. - */ -XKB_EXPORT xkb_layout_index_t -xkb_state_serialize_layout(struct xkb_state *state, - enum xkb_state_component type) -{ - xkb_layout_index_t ret = 0; - - if (type & XKB_STATE_LAYOUT_EFFECTIVE) - return state->components.group; - - if (type & XKB_STATE_LAYOUT_DEPRESSED) - ret += state->components.base_group; - if (type & XKB_STATE_LAYOUT_LATCHED) - ret += state->components.latched_group; - if (type & XKB_STATE_LAYOUT_LOCKED) - ret += state->components.locked_group; - - return ret; -} - -/** - * Gets a modifier mask and returns the resolved effective mask; this - * is needed because some modifiers can also map to other modifiers, e.g. - * the "NumLock" modifier usually also sets the "Mod2" modifier. - */ -xkb_mod_mask_t -mod_mask_get_effective(struct xkb_keymap *keymap, xkb_mod_mask_t mods) -{ - const struct xkb_mod *mod; - xkb_mod_index_t i; - xkb_mod_mask_t mask; - - /* The effective mask is only real mods for now. */ - mask = mods & MOD_REAL_MASK_ALL; - - xkb_mods_enumerate(i, mod, &keymap->mods) - if (mods & (1u << i)) - mask |= mod->mapping; - - return mask; -} - -/** - * Returns 1 if the given modifier is active with the specified type(s), 0 if - * not, or -1 if the modifier is invalid. - */ -XKB_EXPORT int -xkb_state_mod_index_is_active(struct xkb_state *state, - xkb_mod_index_t idx, - enum xkb_state_component type) -{ - if (idx >= xkb_keymap_num_mods(state->keymap)) - return -1; - - return !!(xkb_state_serialize_mods(state, type) & (1u << idx)); -} - -/** - * Helper function for xkb_state_mod_indices_are_active and - * xkb_state_mod_names_are_active. - */ -static bool -match_mod_masks(struct xkb_state *state, - enum xkb_state_component type, - enum xkb_state_match match, - xkb_mod_mask_t wanted) -{ - xkb_mod_mask_t active = xkb_state_serialize_mods(state, type); - - if (!(match & XKB_STATE_MATCH_NON_EXCLUSIVE) && (active & ~wanted)) - return false; - - if (match & XKB_STATE_MATCH_ANY) - return active & wanted; - - return (active & wanted) == wanted; -} - -/** - * Returns 1 if the modifiers are active with the specified type(s), 0 if - * not, or -1 if any of the modifiers are invalid. - */ -XKB_EXPORT int -xkb_state_mod_indices_are_active(struct xkb_state *state, - enum xkb_state_component type, - enum xkb_state_match match, - ...) -{ - va_list ap; - xkb_mod_mask_t wanted = 0; - int ret = 0; - xkb_mod_index_t num_mods = xkb_keymap_num_mods(state->keymap); - - va_start(ap, match); - while (1) { - xkb_mod_index_t idx = va_arg(ap, xkb_mod_index_t); - if (idx == XKB_MOD_INVALID) - break; - if (idx >= num_mods) { - ret = -1; - break; - } - wanted |= (1u << idx); - } - va_end(ap); - - if (ret == -1) - return ret; - - return match_mod_masks(state, type, match, wanted); -} - -/** - * Returns 1 if the given modifier is active with the specified type(s), 0 if - * not, or -1 if the modifier is invalid. - */ -XKB_EXPORT int -xkb_state_mod_name_is_active(struct xkb_state *state, const char *name, - enum xkb_state_component type) -{ - xkb_mod_index_t idx = xkb_keymap_mod_get_index(state->keymap, name); - - if (idx == XKB_MOD_INVALID) - return -1; - - return xkb_state_mod_index_is_active(state, idx, type); -} - -/** - * Returns 1 if the modifiers are active with the specified type(s), 0 if - * not, or -1 if any of the modifiers are invalid. - */ -XKB_EXPORT ATTR_NULL_SENTINEL int -xkb_state_mod_names_are_active(struct xkb_state *state, - enum xkb_state_component type, - enum xkb_state_match match, - ...) -{ - va_list ap; - xkb_mod_mask_t wanted = 0; - int ret = 0; - - va_start(ap, match); - while (1) { - xkb_mod_index_t idx; - const char *str = va_arg(ap, const char *); - if (str == NULL) - break; - idx = xkb_keymap_mod_get_index(state->keymap, str); - if (idx == XKB_MOD_INVALID) { - ret = -1; - break; - } - wanted |= (1u << idx); - } - va_end(ap); - - if (ret == -1) - return ret; - - return match_mod_masks(state, type, match, wanted); -} - -/** - * Returns 1 if the given group is active with the specified type(s), 0 if - * not, or -1 if the group is invalid. - */ -XKB_EXPORT int -xkb_state_layout_index_is_active(struct xkb_state *state, - xkb_layout_index_t idx, - enum xkb_state_component type) -{ - int ret = 0; - - if (idx >= state->keymap->num_groups) - return -1; - - if (type & XKB_STATE_LAYOUT_EFFECTIVE) - ret |= (state->components.group == idx); - if (type & XKB_STATE_LAYOUT_DEPRESSED) - ret |= (state->components.base_group == (int32_t) idx); - if (type & XKB_STATE_LAYOUT_LATCHED) - ret |= (state->components.latched_group == (int32_t) idx); - if (type & XKB_STATE_LAYOUT_LOCKED) - ret |= (state->components.locked_group == (int32_t) idx); - - return ret; -} - -/** - * Returns 1 if the given modifier is active with the specified type(s), 0 if - * not, or -1 if the modifier is invalid. - */ -XKB_EXPORT int -xkb_state_layout_name_is_active(struct xkb_state *state, const char *name, - enum xkb_state_component type) -{ - xkb_layout_index_t idx = xkb_keymap_layout_get_index(state->keymap, name); - - if (idx == XKB_LAYOUT_INVALID) - return -1; - - return xkb_state_layout_index_is_active(state, idx, type); -} - -/** - * Returns 1 if the given LED is active, 0 if not, or -1 if the LED is invalid. - */ -XKB_EXPORT int -xkb_state_led_index_is_active(struct xkb_state *state, xkb_led_index_t idx) -{ - if (idx >= state->keymap->num_leds || - state->keymap->leds[idx].name == XKB_ATOM_NONE) - return -1; - - return !!(state->components.leds & (1u << idx)); -} - -/** - * Returns 1 if the given LED is active, 0 if not, or -1 if the LED is invalid. - */ -XKB_EXPORT int -xkb_state_led_name_is_active(struct xkb_state *state, const char *name) -{ - xkb_led_index_t idx = xkb_keymap_led_get_index(state->keymap, name); - - if (idx == XKB_LED_INVALID) - return -1; - - return xkb_state_led_index_is_active(state, idx); -} - -/** - * See: - * - XkbTranslateKeyCode(3), mod_rtrn return value, from libX11. - * - MyEnhancedXkbTranslateKeyCode(), a modification of the above, from GTK+. - */ -static xkb_mod_mask_t -key_get_consumed(struct xkb_state *state, const struct xkb_key *key, - enum xkb_consumed_mode mode) -{ - const struct xkb_key_type *type; - const struct xkb_key_type_entry *matching_entry; - xkb_mod_mask_t preserve = 0; - xkb_layout_index_t group; - xkb_mod_mask_t consumed = 0; - - group = xkb_state_key_get_layout(state, key->keycode); - if (group == XKB_LAYOUT_INVALID) - return 0; - - type = key->groups[group].type; - - matching_entry = get_entry_for_key_state(state, key, group); - if (matching_entry) - preserve = matching_entry->preserve.mask; - - switch (mode) { - case XKB_CONSUMED_MODE_XKB: - consumed = type->mods.mask; - break; - - case XKB_CONSUMED_MODE_GTK: { - const struct xkb_key_type_entry *no_mods_entry; - xkb_level_index_t no_mods_leveli; - const struct xkb_level *no_mods_level, *level; - - no_mods_entry = get_entry_for_mods(type, 0); - no_mods_leveli = no_mods_entry ? no_mods_entry->level : 0; - no_mods_level = &key->groups[group].levels[no_mods_leveli]; - - for (unsigned i = 0; i < type->num_entries; i++) { - const struct xkb_key_type_entry *entry = &type->entries[i]; - if (!entry_is_active(entry)) - continue; - - level = &key->groups[group].levels[entry->level]; - if (XkbLevelsSameSyms(level, no_mods_level)) - continue; - - if (entry == matching_entry || my_popcount(entry->mods.mask) == 1) - consumed |= entry->mods.mask & ~entry->preserve.mask; - } - break; - } - } - - return consumed & ~preserve; -} - -XKB_EXPORT int -xkb_state_mod_index_is_consumed2(struct xkb_state *state, xkb_keycode_t kc, - xkb_mod_index_t idx, - enum xkb_consumed_mode mode) -{ - const struct xkb_key *key = XkbKey(state->keymap, kc); - - if (!key || idx >= xkb_keymap_num_mods(state->keymap)) - return -1; - - return !!((1u << idx) & key_get_consumed(state, key, mode)); -} - -XKB_EXPORT int -xkb_state_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t kc, - xkb_mod_index_t idx) -{ - return xkb_state_mod_index_is_consumed2(state, kc, idx, - XKB_CONSUMED_MODE_XKB); -} - -XKB_EXPORT xkb_mod_mask_t -xkb_state_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t kc, - xkb_mod_mask_t mask) -{ - const struct xkb_key *key = XkbKey(state->keymap, kc); - - if (!key) - return 0; - - return mask & ~key_get_consumed(state, key, XKB_CONSUMED_MODE_XKB); -} - -XKB_EXPORT xkb_mod_mask_t -xkb_state_key_get_consumed_mods2(struct xkb_state *state, xkb_keycode_t kc, - enum xkb_consumed_mode mode) -{ - const struct xkb_key *key; - - switch (mode) { - case XKB_CONSUMED_MODE_XKB: - case XKB_CONSUMED_MODE_GTK: - break; - default: - log_err_func(state->keymap->ctx, - "unrecognized consumed modifiers mode: %d\n", mode); - return 0; - } - - key = XkbKey(state->keymap, kc); - if (!key) - return 0; - - return key_get_consumed(state, key, mode); -} - -XKB_EXPORT xkb_mod_mask_t -xkb_state_key_get_consumed_mods(struct xkb_state *state, xkb_keycode_t kc) -{ - return xkb_state_key_get_consumed_mods2(state, kc, XKB_CONSUMED_MODE_XKB); -} diff --git a/src/3rdparty/xkbcommon/src/text.c b/src/3rdparty/xkbcommon/src/text.c deleted file mode 100644 index 1a44de47b4..0000000000 --- a/src/3rdparty/xkbcommon/src/text.c +++ /dev/null @@ -1,346 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#include "keymap.h" -#include "text.h" - -bool -LookupString(const LookupEntry tab[], const char *string, - unsigned int *value_rtrn) -{ - if (!string) - return false; - - for (const LookupEntry *entry = tab; entry->name; entry++) { - if (istreq(entry->name, string)) { - *value_rtrn = entry->value; - return true; - } - } - - return false; -} - -const char * -LookupValue(const LookupEntry tab[], unsigned int value) -{ - for (const LookupEntry *entry = tab; entry->name; entry++) - if (entry->value == value) - return entry->name; - - return NULL; -} - -const LookupEntry ctrlMaskNames[] = { - { "RepeatKeys", CONTROL_REPEAT }, - { "Repeat", CONTROL_REPEAT }, - { "AutoRepeat", CONTROL_REPEAT }, - { "SlowKeys", CONTROL_SLOW }, - { "BounceKeys", CONTROL_DEBOUNCE }, - { "StickyKeys", CONTROL_STICKY }, - { "MouseKeys", CONTROL_MOUSEKEYS }, - { "MouseKeysAccel", CONTROL_MOUSEKEYS_ACCEL }, - { "AccessXKeys", CONTROL_AX }, - { "AccessXTimeout", CONTROL_AX_TIMEOUT }, - { "AccessXFeedback", CONTROL_AX_FEEDBACK }, - { "AudibleBell", CONTROL_BELL }, - { "IgnoreGroupLock", CONTROL_IGNORE_GROUP_LOCK }, - { "all", CONTROL_ALL }, - { "none", 0 }, - { "Overlay1", 0 }, - { "Overlay2", 0 }, - { NULL, 0 } -}; - -const LookupEntry modComponentMaskNames[] = { - { "base", XKB_STATE_MODS_DEPRESSED }, - { "latched", XKB_STATE_MODS_LATCHED }, - { "locked", XKB_STATE_MODS_LOCKED }, - { "effective", XKB_STATE_MODS_EFFECTIVE }, - { "compat", XKB_STATE_MODS_EFFECTIVE }, - { "any", XKB_STATE_MODS_EFFECTIVE }, - { "none", 0 }, - { NULL, 0 } -}; - -const LookupEntry groupComponentMaskNames[] = { - { "base", XKB_STATE_LAYOUT_DEPRESSED }, - { "latched", XKB_STATE_LAYOUT_LATCHED }, - { "locked", XKB_STATE_LAYOUT_LOCKED }, - { "effective", XKB_STATE_LAYOUT_EFFECTIVE }, - { "any", XKB_STATE_LAYOUT_EFFECTIVE }, - { "none", 0 }, - { NULL, 0 } -}; - -const LookupEntry groupMaskNames[] = { - { "Group1", 0x01 }, - { "Group2", 0x02 }, - { "Group3", 0x04 }, - { "Group4", 0x08 }, - { "Group5", 0x10 }, - { "Group6", 0x20 }, - { "Group7", 0x40 }, - { "Group8", 0x80 }, - { "none", 0x00 }, - { "all", 0xff }, - { NULL, 0 } -}; - -const LookupEntry groupNames[] = { - { "Group1", 1 }, - { "Group2", 2 }, - { "Group3", 3 }, - { "Group4", 4 }, - { "Group5", 5 }, - { "Group6", 6 }, - { "Group7", 7 }, - { "Group8", 8 }, - { NULL, 0 } -}; - -const LookupEntry levelNames[] = { - { "Level1", 1 }, - { "Level2", 2 }, - { "Level3", 3 }, - { "Level4", 4 }, - { "Level5", 5 }, - { "Level6", 6 }, - { "Level7", 7 }, - { "Level8", 8 }, - { NULL, 0 } -}; - -const LookupEntry buttonNames[] = { - { "Button1", 1 }, - { "Button2", 2 }, - { "Button3", 3 }, - { "Button4", 4 }, - { "Button5", 5 }, - { "default", 0 }, - { NULL, 0 } -}; - -const LookupEntry useModMapValueNames[] = { - { "LevelOne", 1 }, - { "Level1", 1 }, - { "AnyLevel", 0 }, - { "any", 0 }, - { NULL, 0 } -}; - -const LookupEntry actionTypeNames[] = { - { "NoAction", ACTION_TYPE_NONE }, - { "SetMods", ACTION_TYPE_MOD_SET }, - { "LatchMods", ACTION_TYPE_MOD_LATCH }, - { "LockMods", ACTION_TYPE_MOD_LOCK }, - { "SetGroup", ACTION_TYPE_GROUP_SET }, - { "LatchGroup", ACTION_TYPE_GROUP_LATCH }, - { "LockGroup", ACTION_TYPE_GROUP_LOCK }, - { "MovePtr", ACTION_TYPE_PTR_MOVE }, - { "MovePointer", ACTION_TYPE_PTR_MOVE }, - { "PtrBtn", ACTION_TYPE_PTR_BUTTON }, - { "PointerButton", ACTION_TYPE_PTR_BUTTON }, - { "LockPtrBtn", ACTION_TYPE_PTR_LOCK }, - { "LockPtrButton", ACTION_TYPE_PTR_LOCK }, - { "LockPointerButton", ACTION_TYPE_PTR_LOCK }, - { "LockPointerBtn", ACTION_TYPE_PTR_LOCK }, - { "SetPtrDflt", ACTION_TYPE_PTR_DEFAULT }, - { "SetPointerDefault", ACTION_TYPE_PTR_DEFAULT }, - { "Terminate", ACTION_TYPE_TERMINATE }, - { "TerminateServer", ACTION_TYPE_TERMINATE }, - { "SwitchScreen", ACTION_TYPE_SWITCH_VT }, - { "SetControls", ACTION_TYPE_CTRL_SET }, - { "LockControls", ACTION_TYPE_CTRL_LOCK }, - { "Private", ACTION_TYPE_PRIVATE }, - /* deprecated actions below here - unused */ - { "RedirectKey", ACTION_TYPE_NONE }, - { "Redirect", ACTION_TYPE_NONE }, - { "ISOLock", ACTION_TYPE_NONE }, - { "ActionMessage", ACTION_TYPE_NONE }, - { "MessageAction", ACTION_TYPE_NONE }, - { "Message", ACTION_TYPE_NONE }, - { "DeviceBtn", ACTION_TYPE_NONE }, - { "DevBtn", ACTION_TYPE_NONE }, - { "DevButton", ACTION_TYPE_NONE }, - { "DeviceButton", ACTION_TYPE_NONE }, - { "LockDeviceBtn", ACTION_TYPE_NONE }, - { "LockDevBtn", ACTION_TYPE_NONE }, - { "LockDevButton", ACTION_TYPE_NONE }, - { "LockDeviceButton", ACTION_TYPE_NONE }, - { "DeviceValuator", ACTION_TYPE_NONE }, - { "DevVal", ACTION_TYPE_NONE }, - { "DeviceVal", ACTION_TYPE_NONE }, - { "DevValuator", ACTION_TYPE_NONE }, - { NULL, 0 }, -}; - -const LookupEntry symInterpretMatchMaskNames[] = { - { "NoneOf", MATCH_NONE }, - { "AnyOfOrNone", MATCH_ANY_OR_NONE }, - { "AnyOf", MATCH_ANY }, - { "AllOf", MATCH_ALL }, - { "Exactly", MATCH_EXACTLY }, - { NULL, 0 }, -}; - -const char * -ModIndexText(struct xkb_context *ctx, const struct xkb_mod_set *mods, - xkb_mod_index_t ndx) -{ - if (ndx == XKB_MOD_INVALID) - return "none"; - - if (ndx >= mods->num_mods) - return NULL; - - return xkb_atom_text(ctx, mods->mods[ndx].name); -} - -const char * -ActionTypeText(enum xkb_action_type type) -{ - const char *name = LookupValue(actionTypeNames, type); - return name ? name : "Private"; -} - -const char * -KeysymText(struct xkb_context *ctx, xkb_keysym_t sym) -{ - char *buffer = xkb_context_get_buffer(ctx, 64); - xkb_keysym_get_name(sym, buffer, 64); - return buffer; -} - -const char * -KeyNameText(struct xkb_context *ctx, xkb_atom_t name) -{ - const char *sname = xkb_atom_text(ctx, name); - size_t len = strlen_safe(sname) + 3; - char *buf = xkb_context_get_buffer(ctx, len); - snprintf(buf, len, "<%s>", strempty(sname)); - return buf; -} - -const char * -SIMatchText(enum xkb_match_operation type) -{ - return LookupValue(symInterpretMatchMaskNames, type); -} - -const char * -ModMaskText(struct xkb_context *ctx, const struct xkb_mod_set *mods, - xkb_mod_mask_t mask) -{ - char buf[1024] = {0}; - size_t pos = 0; - xkb_mod_index_t i; - const struct xkb_mod *mod; - - if (mask == 0) - return "none"; - - if (mask == MOD_REAL_MASK_ALL) - return "all"; - - xkb_mods_enumerate(i, mod, mods) { - int ret; - - if (!(mask & (1u << i))) - continue; - - ret = snprintf(buf + pos, sizeof(buf) - pos, "%s%s", - pos == 0 ? "" : "+", - xkb_atom_text(ctx, mod->name)); - if (ret <= 0 || pos + ret >= sizeof(buf)) - break; - else - pos += ret; - } - - return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf); -} - -const char * -LedStateMaskText(struct xkb_context *ctx, enum xkb_state_component mask) -{ - char buf[1024]; - size_t pos = 0; - - if (mask == 0) - return "0"; - - for (unsigned i = 0; mask; i++) { - int ret; - - if (!(mask & (1u << i))) - continue; - - mask &= ~(1u << i); - - ret = snprintf(buf + pos, sizeof(buf) - pos, "%s%s", - pos == 0 ? "" : "+", - LookupValue(modComponentMaskNames, 1u << i)); - if (ret <= 0 || pos + ret >= sizeof(buf)) - break; - else - pos += ret; - } - - return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf); -} - -const char * -ControlMaskText(struct xkb_context *ctx, enum xkb_action_controls mask) -{ - char buf[1024]; - size_t pos = 0; - - if (mask == 0) - return "none"; - - if (mask == CONTROL_ALL) - return "all"; - - for (unsigned i = 0; mask; i++) { - int ret; - - if (!(mask & (1u << i))) - continue; - - mask &= ~(1u << i); - - ret = snprintf(buf + pos, sizeof(buf) - pos, "%s%s", - pos == 0 ? "" : "+", - LookupValue(ctrlMaskNames, 1u << i)); - if (ret <= 0 || pos + ret >= sizeof(buf)) - break; - else - pos += ret; - } - - return strcpy(xkb_context_get_buffer(ctx, pos + 1), buf); -} diff --git a/src/3rdparty/xkbcommon/src/text.h b/src/3rdparty/xkbcommon/src/text.h deleted file mode 100644 index 584dea62d7..0000000000 --- a/src/3rdparty/xkbcommon/src/text.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright © 2009 Dan Nicholson - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef TEXT_H -#define TEXT_H - -typedef struct { - const char *name; - unsigned int value; -} LookupEntry; - -bool -LookupString(const LookupEntry tab[], const char *string, - unsigned int *value_rtrn); - -const char * -LookupValue(const LookupEntry tab[], unsigned int value); - -extern const LookupEntry ctrlMaskNames[]; -extern const LookupEntry modComponentMaskNames[]; -extern const LookupEntry groupComponentMaskNames[]; -extern const LookupEntry groupMaskNames[]; -extern const LookupEntry groupNames[]; -extern const LookupEntry levelNames[]; -extern const LookupEntry buttonNames[]; -extern const LookupEntry useModMapValueNames[]; -extern const LookupEntry actionTypeNames[]; -extern const LookupEntry symInterpretMatchMaskNames[]; - -const char * -ModMaskText(struct xkb_context *ctx, const struct xkb_mod_set *mods, - xkb_mod_mask_t mask); - -const char * -ModIndexText(struct xkb_context *ctx, const struct xkb_mod_set *mods, - xkb_mod_index_t ndx); - -const char * -ActionTypeText(enum xkb_action_type type); - -const char * -KeysymText(struct xkb_context *ctx, xkb_keysym_t sym); - -const char * -KeyNameText(struct xkb_context *ctx, xkb_atom_t name); - -const char * -SIMatchText(enum xkb_match_operation type); - -const char * -LedStateMaskText(struct xkb_context *ctx, enum xkb_state_component mask); - -const char * -ControlMaskText(struct xkb_context *ctx, enum xkb_action_controls mask); - -#endif /* TEXT_H */ diff --git a/src/3rdparty/xkbcommon/src/utf8.c b/src/3rdparty/xkbcommon/src/utf8.c deleted file mode 100644 index a76b001bab..0000000000 --- a/src/3rdparty/xkbcommon/src/utf8.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2014 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Rob Bradford - */ - -#include -#include -#include - -#include "utf8.h" - -int -utf32_to_utf8(uint32_t unichar, char *buffer) -{ - int count, shift, length; - uint8_t head; - - if (unichar <= 0x007f) { - buffer[0] = unichar; - buffer[1] = '\0'; - return 2; - } - else if (unichar <= 0x07FF) { - length = 2; - head = 0xc0; - } - else if (unichar <= 0xffff) { - length = 3; - head = 0xe0; - } - else if (unichar <= 0x10ffff) { - length = 4; - head = 0xf0; - } - else { - buffer[0] = '\0'; - return 0; - } - - for (count = length - 1, shift = 0; count > 0; count--, shift += 6) - buffer[count] = 0x80 | ((unichar >> shift) & 0x3f); - - buffer[0] = head | ((unichar >> shift) & 0x3f); - buffer[length] = '\0'; - - return length + 1; -} - -bool -is_valid_utf8(const char *ss, size_t len) -{ - size_t i = 0; - size_t tail_bytes = 0; - const uint8_t *s = (const uint8_t *) ss; - - /* This beauty is from: - * The Unicode Standard Version 6.2 - Core Specification, Table 3.7 - * https://www.unicode.org/versions/Unicode6.2.0/ch03.pdf#G7404 - * We can optimize if needed. */ - while (i < len) - { - if (s[i] <= 0x7F) { - tail_bytes = 0; - } - else if (s[i] >= 0xC2 && s[i] <= 0xDF) { - tail_bytes = 1; - } - else if (s[i] == 0xE0) { - i++; - if (i >= len || !(s[i] >= 0xA0 && s[i] <= 0xBF)) - return false; - tail_bytes = 1; - } - else if (s[i] >= 0xE1 && s[i] <= 0xEC) { - tail_bytes = 2; - } - else if (s[i] == 0xED) { - i++; - if (i >= len || !(s[i] >= 0x80 && s[i] <= 0x9F)) - return false; - tail_bytes = 1; - } - else if (s[i] >= 0xEE && s[i] <= 0xEF) { - tail_bytes = 2; - } - else if (s[i] == 0xF0) { - i++; - if (i >= len || !(s[i] >= 0x90 && s[i] <= 0xBF)) - return false; - tail_bytes = 2; - } - else if (s[i] >= 0xF1 && s[i] <= 0xF3) { - tail_bytes = 3; - } - else if (s[i] == 0xF4) { - i++; - if (i >= len || !(s[i] >= 0x80 && s[i] <= 0x8F)) - return false; - tail_bytes = 2; - } - else { - return false; - } - - i++; - - while (i < len && tail_bytes > 0 && s[i] >= 0x80 && s[i] <= 0xBF) { - i++; - tail_bytes--; - } - - if (tail_bytes != 0) - return false; - } - - return true; -} diff --git a/src/3rdparty/xkbcommon/src/utf8.h b/src/3rdparty/xkbcommon/src/utf8.h deleted file mode 100644 index 6371cb5596..0000000000 --- a/src/3rdparty/xkbcommon/src/utf8.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2014 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Rob Bradford - */ - -#ifndef XKBCOMMON_UTF8_H -#define XKBCOMMON_UTF8_H - -int -utf32_to_utf8(uint32_t unichar, char *buffer); - -bool -is_valid_utf8(const char *ss, size_t len); - -#endif diff --git a/src/3rdparty/xkbcommon/src/utils.c b/src/3rdparty/xkbcommon/src/utils.c deleted file mode 100644 index a71b570b34..0000000000 --- a/src/3rdparty/xkbcommon/src/utils.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "utils.h" - -#ifdef HAVE_MMAP - -#include -#include -#include -#include -#include - -bool -map_file(FILE *file, char **string_out, size_t *size_out) -{ - struct stat stat_buf; - int fd; - char *string; - - /* Make sure to keep the errno on failure! */ - fd = fileno(file); - if (fd < 0) - return false; - - if (fstat(fd, &stat_buf) != 0) - return false; - - string = mmap(NULL, stat_buf.st_size, PROT_READ, MAP_SHARED, fd, 0); - if (string == MAP_FAILED) - return false; - - *string_out = string; - *size_out = stat_buf.st_size; - return true; -} - -void -unmap_file(char *str, size_t size) -{ - munmap(str, size); -} - -#else - -bool -map_file(FILE *file, char **string_out, size_t *size_out) -{ - long ret; - size_t ret_s; - char *string; - size_t size; - - /* Make sure to keep the errno on failure! */ - - ret = fseek(file, 0, SEEK_END); - if (ret != 0) - return false; - - ret = ftell(file); - if (ret < 0) - return false; - size = (size_t) ret; - - ret = fseek(file, 0, SEEK_SET); - if (ret < 0) - return false; - - string = malloc(size); - if (!string) - return false; - - ret_s = fread(string, 1, size, file); - if (ret_s < size) { - free(string); - return false; - } - - *string_out = string; - *size_out = size; - return true; -} - -void -unmap_file(char *str, size_t size) -{ - free(str); -} - -#endif - -// ASCII lower-case map. -static const unsigned char lower_map[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 -}; - -// ASCII tolower (to avoid locale issues). -char -to_lower(char c) -{ - return (char) lower_map[(unsigned char) c]; -} - -// ASCII strcasecmp (to avoid locale issues). -int -istrcmp(const char *a, const char *b) -{ - for (size_t i = 0; ; i++) { - if (to_lower(a[i]) != to_lower(b[i])) - return (int) to_lower(a[i]) - (int) to_lower(b[i]); - if (!a[i]) - break; - } - return 0; -} - -// ASCII strncasecmp (to avoid locale issues). -int -istrncmp(const char *a, const char *b, size_t n) -{ - for (size_t i = 0; i < n; i++) { - if (to_lower(a[i]) != to_lower(b[i])) - return (int) to_lower(a[i]) - (int) to_lower(b[i]); - if (!a[i]) - break; - } - return 0; -} diff --git a/src/3rdparty/xkbcommon/src/utils.h b/src/3rdparty/xkbcommon/src/utils.h deleted file mode 100644 index cb98e8e11a..0000000000 --- a/src/3rdparty/xkbcommon/src/utils.h +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef UTILS_H -#define UTILS_H 1 - -#include -#include -#include -#include -#include - -#include "darray.h" - -/* - * We sometimes malloc strings and then expose them as const char*'s. This - * macro is used when we free these strings in order to avoid -Wcast-qual - * errors. - */ -#define UNCONSTIFY(const_ptr) ((void *) (uintptr_t) (const_ptr)) - -#define STATIC_ASSERT(expr, message) do { \ - switch (0) { case 0: case (expr): ; } \ -} while (0) - -char -to_lower(char c); - -int -istrcmp(const char *a, const char *b); - -int -istrncmp(const char *a, const char *b, size_t n); - -static inline bool -streq(const char *s1, const char *s2) -{ - return strcmp(s1, s2) == 0; -} - -static inline bool -streq_not_null(const char *s1, const char *s2) -{ - if (!s1 || !s2) - return false; - return streq(s1, s2); -} - -static inline bool -istreq(const char *s1, const char *s2) -{ - return istrcmp(s1, s2) == 0; -} - -static inline bool -istreq_prefix(const char *s1, const char *s2) -{ - return istrncmp(s1, s2, strlen(s1)) == 0; -} - -static inline char * -strdup_safe(const char *s) -{ - return s ? strdup(s) : NULL; -} - -static inline size_t -strlen_safe(const char *s) -{ - return s ? strlen(s) : 0; -} - -static inline bool -isempty(const char *s) -{ - return s == NULL || s[0] == '\0'; -} - -static inline const char * -strnull(const char *s) -{ - return s ? s : "(null)"; -} - -static inline const char * -strempty(const char *s) -{ - return s ? s : ""; -} - -static inline void * -memdup(const void *mem, size_t nmemb, size_t size) -{ - void *p = calloc(nmemb, size); - if (p) - memcpy(p, mem, nmemb * size); - return p; -} - -static inline int -min(int misc, int other) -{ - return (misc < other) ? misc : other; -} - -static inline int -max(int misc, int other) -{ - return (misc > other) ? misc : other; -} - -/* ctype.h is locale-dependent and has other oddities. */ -static inline bool -is_space(char ch) -{ - return ch == ' ' || (ch >= '\t' && ch <= '\r'); -} - -static inline bool -is_alpha(char ch) -{ - return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); -} - -static inline bool -is_digit(char ch) -{ - return ch >= '0' && ch <= '9'; -} - -static inline bool -is_alnum(char ch) -{ - return is_alpha(ch) || is_digit(ch); -} - -static inline bool -is_xdigit(char ch) -{ - return - (ch >= '0' && ch <= '9') || - (ch >= 'a' && ch <= 'f') || - (ch >= 'A' && ch <= 'F'); -} - -static inline bool -is_graph(char ch) -{ - /* See table in ascii(7). */ - return ch >= '!' && ch <= '~'; -} - -/* - * Return the bit position of the most significant bit. - * Note: this is 1-based! It's more useful this way, and returns 0 when - * mask is all 0s. - */ -static inline unsigned -msb_pos(uint32_t mask) -{ - unsigned pos = 0; - while (mask) { - pos++; - mask >>= 1u; - } - return pos; -} - -// Avoid conflict with other popcount()s. -static inline int -my_popcount(uint32_t x) -{ - int count; -#if defined(HAVE___BUILTIN_POPCOUNT) - count = __builtin_popcount(x); -#else - for (count = 0; x; count++) - x &= x - 1; -#endif - return count; -} - -bool -map_file(FILE *file, char **string_out, size_t *size_out); - -void -unmap_file(char *string, size_t size); - -#define ARRAY_SIZE(arr) ((sizeof(arr) / sizeof(*(arr)))) - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MIN3(a, b, c) MIN(MIN((a), (b)), (c)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) -#define MAX3(a, b, c) MAX(MAX((a), (b)), (c)) - -/* Round up @a so it's divisible by @b. */ -#define ROUNDUP(a, b) (((a) + (b) - 1) / (b) * (b)) - -#if defined(HAVE_SECURE_GETENV) -# define secure_getenv secure_getenv -#elif defined(HAVE___SECURE_GETENV) -# define secure_getenv __secure_getenv -#else -# define secure_getenv getenv -#endif - -#if defined(HAVE___BUILTIN_EXPECT) -# define likely(x) __builtin_expect(!!(x), 1) -# define unlikely(x) __builtin_expect(!!(x), 0) -#else -# define likely(x) (x) -# define unlikely(x) (x) -#endif - -/* Compiler Attributes */ - -#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) -# define XKB_EXPORT __attribute__((visibility("default"))) -#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) -# define XKB_EXPORT __global -#else /* not gcc >= 4 and not Sun Studio >= 8 */ -# define XKB_EXPORT -#endif - -#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203) -# define ATTR_PRINTF(x,y) __attribute__((__format__(__printf__, x, y))) -#else /* not gcc >= 2.3 */ -# define ATTR_PRINTF(x,y) -#endif - -#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ - || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define ATTR_NORETURN __attribute__((__noreturn__)) -#else -# define ATTR_NORETURN -#endif /* GNUC */ - -#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 296) -#define ATTR_MALLOC __attribute__((__malloc__)) -#else -#define ATTR_MALLOC -#endif - -#if defined(__GNUC__) && (__GNUC__ >= 4) -# define ATTR_NULL_SENTINEL __attribute__((__sentinel__)) -#else -# define ATTR_NULL_SENTINEL -#endif /* GNUC >= 4 */ - -#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 295) -#define ATTR_PACKED __attribute__((__packed__)) -#else -#define ATTR_PACKED -#endif - -#endif /* UTILS_H */ diff --git a/src/3rdparty/xkbcommon/src/x11/util.c b/src/3rdparty/xkbcommon/src/x11/util.c deleted file mode 100644 index c41f1d6cd9..0000000000 --- a/src/3rdparty/xkbcommon/src/x11/util.c +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "x11-priv.h" - -XKB_EXPORT int -xkb_x11_setup_xkb_extension(xcb_connection_t *conn, - uint16_t major_xkb_version, - uint16_t minor_xkb_version, - enum xkb_x11_setup_xkb_extension_flags flags, - uint16_t *major_xkb_version_out, - uint16_t *minor_xkb_version_out, - uint8_t *base_event_out, - uint8_t *base_error_out) -{ - uint8_t base_event, base_error; - uint16_t server_major, server_minor; - - if (flags & ~(XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS)) { - /* log_err_func(ctx, "unrecognized flags: %#x\n", flags); */ - return 0; - } - - { - const xcb_query_extension_reply_t *reply = - xcb_get_extension_data(conn, &xcb_xkb_id); - if (!reply) { - /* log_err_func(ctx, "failed to query for XKB extension\n"); */ - return 0; - } - - if (!reply->present) { - /* log_err_func(ctx, "failed to start using XKB extension: not available in server\n"); */ - return 0; - } - - base_event = reply->first_event; - base_error = reply->first_error; - } - - { - xcb_generic_error_t *error = NULL; - xcb_xkb_use_extension_cookie_t cookie = - xcb_xkb_use_extension(conn, major_xkb_version, minor_xkb_version); - xcb_xkb_use_extension_reply_t *reply = - xcb_xkb_use_extension_reply(conn, cookie, &error); - - if (!reply) { - /* log_err_func(ctx, */ - /* "failed to start using XKB extension: error code %d\n", */ - /* error ? error->error_code : -1); */ - free(error); - return 0; - } - - if (!reply->supported) { - /* log_err_func(ctx, */ - /* "failed to start using XKB extension: server doesn't support version %d.%d\n", */ - /* major_xkb_version, minor_xkb_version); */ - free(reply); - return 0; - } - - server_major = reply->serverMajor; - server_minor = reply->serverMinor; - - free(reply); - } - - /* - * The XkbUseExtension() in libX11 has a *bunch* of legacy stuff, but - * it doesn't seem like any of it is useful to us. - */ - - if (major_xkb_version_out) - *major_xkb_version_out = server_major; - if (minor_xkb_version_out) - *minor_xkb_version_out = server_minor; - if (base_event_out) - *base_event_out = base_event; - if (base_error_out) - *base_error_out = base_error; - - return 1; -} - -XKB_EXPORT int32_t -xkb_x11_get_core_keyboard_device_id(xcb_connection_t *conn) -{ - int32_t device_id; - xcb_xkb_get_device_info_cookie_t cookie = - xcb_xkb_get_device_info(conn, XCB_XKB_ID_USE_CORE_KBD, - 0, 0, 0, 0, 0, 0); - xcb_xkb_get_device_info_reply_t *reply = - xcb_xkb_get_device_info_reply(conn, cookie, NULL); - - if (!reply) - return -1; - - device_id = reply->deviceID; - free(reply); - return device_id; -} - -bool -get_atom_name(xcb_connection_t *conn, xcb_atom_t atom, char **out) -{ - xcb_get_atom_name_cookie_t cookie; - xcb_get_atom_name_reply_t *reply; - int length; - char *name; - - if (atom == 0) { - *out = NULL; - return true; - } - - cookie = xcb_get_atom_name(conn, atom); - reply = xcb_get_atom_name_reply(conn, cookie, NULL); - if (!reply) - return false; - - length = xcb_get_atom_name_name_length(reply); - name = xcb_get_atom_name_name(reply); - - *out = strndup(name, length); - if (!*out) { - free(reply); - return false; - } - - free(reply); - return true; -} - -bool -adopt_atoms(struct xkb_context *ctx, xcb_connection_t *conn, - const xcb_atom_t *from, xkb_atom_t *to, const size_t count) -{ - enum { SIZE = 128 }; - xcb_get_atom_name_cookie_t cookies[SIZE]; - const size_t num_batches = ROUNDUP(count, SIZE) / SIZE; - - /* Send and collect the atoms in batches of reasonable SIZE. */ - for (size_t batch = 0; batch < num_batches; batch++) { - const size_t start = batch * SIZE; - const size_t stop = min((batch + 1) * SIZE, count); - - /* Send. */ - for (size_t i = start; i < stop; i++) - if (from[i] != XCB_ATOM_NONE) - cookies[i % SIZE] = xcb_get_atom_name(conn, from[i]); - - /* Collect. */ - for (size_t i = start; i < stop; i++) { - xcb_get_atom_name_reply_t *reply; - - if (from[i] == XCB_ATOM_NONE) { - to[i] = XKB_ATOM_NONE; - continue; - } - - reply = xcb_get_atom_name_reply(conn, cookies[i % SIZE], NULL); - if (!reply) - goto err_discard; - - to[i] = xkb_atom_intern(ctx, - xcb_get_atom_name_name(reply), - xcb_get_atom_name_name_length(reply)); - free(reply); - - if (to[i] == XKB_ATOM_NONE) - goto err_discard; - - continue; - - /* - * If we don't discard the uncollected replies, they just - * sit in the XCB queue waiting forever. Sad. - */ -err_discard: - for (size_t j = i + 1; j < stop; j++) - if (from[j] != XCB_ATOM_NONE) - xcb_discard_reply(conn, cookies[j % SIZE].sequence); - return false; - } - } - - return true; -} - -bool -adopt_atom(struct xkb_context *ctx, xcb_connection_t *conn, xcb_atom_t atom, - xkb_atom_t *out) -{ - return adopt_atoms(ctx, conn, &atom, out, 1); -} diff --git a/src/3rdparty/xkbcommon/src/x11/x11-keymap.c b/src/3rdparty/xkbcommon/src/x11/x11-keymap.c deleted file mode 100644 index 701b614b2f..0000000000 --- a/src/3rdparty/xkbcommon/src/x11/x11-keymap.c +++ /dev/null @@ -1,1177 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "x11-priv.h" - -/* - * References for the lonesome traveler: - * Xkb protocol specification: - * https://www.x.org/releases/current/doc/kbproto/xkbproto.html - * The XCB xkb XML protocol file: - * /user/share/xcb/xkb.xml - * The XCB xkb header file: - * /usr/include/xcb/xkb.h - * The old kbproto header files: - * /usr/include/X11/extensions/XKB{,proto,str}.h - * Xlib XKB source code: - * /src/xkb/XKBGetMap.c (and friends) - * X server XKB protocol handling: - * /xkb/xkb.c - * Man pages: - * XkbGetMap(3), XkbGetCompatMap(3), etc. - */ - -/* Constants from /usr/include/X11/extensions/XKB.h */ -/* XkbNumModifiers. */ -#define NUM_REAL_MODS 8u -/* XkbNumVirtualMods. */ -#define NUM_VMODS 16u -/* XkbNoModifier. */ -#define NO_MODIFIER 0xff -/* XkbNumIndicators. */ -#define NUM_INDICATORS 32u -/* XkbAllIndicatorsMask. */ -#define ALL_INDICATORS_MASK 0xffffffff - -/* Some macros. Not very nice but it'd be worse without them. */ - -/* - * We try not to trust the server too much and be paranoid. If we get - * something which we definitely shouldn't, we fail. - */ -#define STRINGIFY(expr) #expr -#define FAIL_UNLESS(expr) do { \ - if (!(expr)) { \ - log_err(keymap->ctx, \ - "x11: failed to get keymap from X server: unmet condition in %s(): %s\n", \ - __func__, STRINGIFY(expr)); \ - goto fail; \ - } \ -} while (0) - -#define FAIL_IF_BAD_REPLY(reply, request_name) do { \ - if (!reply) { \ - log_err(keymap->ctx, \ - "x11: failed to get keymap from X server: %s request failed\n", \ - (request_name)); \ - goto fail; \ - } \ -} while (0) - -#define ALLOC_OR_FAIL(arr, nmemb) do { \ - if ((nmemb) > 0) { \ - (arr) = calloc((nmemb), sizeof(*(arr))); \ - if (!(arr)) \ - goto fail; \ - } \ -} while (0) - - -static xkb_mod_mask_t -translate_mods(uint8_t rmods, uint16_t vmods_low, uint16_t vmods_high) -{ - /* We represent mod masks in a single uint32_t value, with real mods - * first and vmods after (though we don't make these distinctions). */ - return - ((xkb_mod_mask_t) rmods) | - ((xkb_mod_mask_t) vmods_low << 8) | - ((xkb_mod_mask_t) vmods_high << 16); -} - -static enum xkb_action_controls -translate_controls_mask(uint32_t wire) -{ - enum xkb_action_controls ret = 0; - if (wire & XCB_XKB_BOOL_CTRL_REPEAT_KEYS) - ret |= CONTROL_REPEAT; - if (wire & XCB_XKB_BOOL_CTRL_SLOW_KEYS) - ret |= CONTROL_SLOW; - if (wire & XCB_XKB_BOOL_CTRL_BOUNCE_KEYS) - ret |= CONTROL_DEBOUNCE; - if (wire & XCB_XKB_BOOL_CTRL_STICKY_KEYS) - ret |= CONTROL_STICKY; - if (wire & XCB_XKB_BOOL_CTRL_MOUSE_KEYS) - ret |= CONTROL_MOUSEKEYS; - if (wire & XCB_XKB_BOOL_CTRL_MOUSE_KEYS_ACCEL) - ret |= CONTROL_MOUSEKEYS_ACCEL; - if (wire & XCB_XKB_BOOL_CTRL_ACCESS_X_KEYS) - ret |= CONTROL_AX; - if (wire & XCB_XKB_BOOL_CTRL_ACCESS_X_TIMEOUT_MASK) - ret |= CONTROL_AX_TIMEOUT; - if (wire & XCB_XKB_BOOL_CTRL_ACCESS_X_FEEDBACK_MASK) - ret |= CONTROL_AX_FEEDBACK; - if (wire & XCB_XKB_BOOL_CTRL_AUDIBLE_BELL_MASK) - ret |= CONTROL_BELL; - if (wire & XCB_XKB_BOOL_CTRL_IGNORE_GROUP_LOCK_MASK) - ret |= CONTROL_IGNORE_GROUP_LOCK; - /* Some controls are not supported and don't appear here. */ - return ret; -} - -static void -translate_action(union xkb_action *action, const xcb_xkb_action_t *wire) -{ - switch (wire->type) { - case XCB_XKB_SA_TYPE_SET_MODS: - action->type = ACTION_TYPE_MOD_SET; - - action->mods.mods.mods = translate_mods(wire->setmods.realMods, - wire->setmods.vmodsLow, - wire->setmods.vmodsHigh); - action->mods.mods.mask = translate_mods(wire->setmods.mask, 0, 0); - - if (wire->setmods.flags & XCB_XKB_SA_CLEAR_LOCKS) - action->mods.flags |= ACTION_LOCK_CLEAR; - if (wire->setmods.flags & XCB_XKB_SA_LATCH_TO_LOCK) - action->mods.flags |= ACTION_LATCH_TO_LOCK; - if (wire->setmods.flags & XCB_XKB_SA_USE_MOD_MAP_MODS) - action->mods.flags |= ACTION_MODS_LOOKUP_MODMAP; - - break; - case XCB_XKB_SA_TYPE_LATCH_MODS: - action->type = ACTION_TYPE_MOD_LATCH; - - action->mods.mods.mods = translate_mods(wire->latchmods.realMods, - wire->latchmods.vmodsLow, - wire->latchmods.vmodsHigh); - action->mods.mods.mask = translate_mods(wire->latchmods.mask, 0, 0); - - if (wire->latchmods.flags & XCB_XKB_SA_CLEAR_LOCKS) - action->mods.flags |= ACTION_LOCK_CLEAR; - if (wire->latchmods.flags & XCB_XKB_SA_LATCH_TO_LOCK) - action->mods.flags |= ACTION_LATCH_TO_LOCK; - if (wire->latchmods.flags & XCB_XKB_SA_USE_MOD_MAP_MODS) - action->mods.flags |= ACTION_MODS_LOOKUP_MODMAP; - - break; - case XCB_XKB_SA_TYPE_LOCK_MODS: - action->type = ACTION_TYPE_MOD_LOCK; - - action->mods.mods.mods = translate_mods(wire->lockmods.realMods, - wire->lockmods.vmodsLow, - wire->lockmods.vmodsHigh); - action->mods.mods.mask = translate_mods(wire->lockmods.mask, 0, 0); - - if (wire->lockmods.flags & XCB_XKB_SA_ISO_LOCK_FLAG_NO_LOCK) - action->mods.flags |= ACTION_LOCK_NO_LOCK; - if (wire->lockmods.flags & XCB_XKB_SA_ISO_LOCK_FLAG_NO_UNLOCK) - action->mods.flags |= ACTION_LOCK_NO_UNLOCK; - if (wire->lockmods.flags & XCB_XKB_SA_USE_MOD_MAP_MODS) - action->mods.flags |= ACTION_MODS_LOOKUP_MODMAP; - - break; - case XCB_XKB_SA_TYPE_SET_GROUP: - action->type = ACTION_TYPE_GROUP_SET; - - action->group.group = wire->setgroup.group; - - if (wire->setmods.flags & XCB_XKB_SA_CLEAR_LOCKS) - action->group.flags |= ACTION_LOCK_CLEAR; - if (wire->setmods.flags & XCB_XKB_SA_LATCH_TO_LOCK) - action->group.flags |= ACTION_LATCH_TO_LOCK; - if (wire->setmods.flags & XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE) - action->group.flags |= ACTION_ABSOLUTE_SWITCH; - - break; - case XCB_XKB_SA_TYPE_LATCH_GROUP: - action->type = ACTION_TYPE_GROUP_LATCH; - - action->group.group = wire->latchgroup.group; - - if (wire->latchmods.flags & XCB_XKB_SA_CLEAR_LOCKS) - action->group.flags |= ACTION_LOCK_CLEAR; - if (wire->latchmods.flags & XCB_XKB_SA_LATCH_TO_LOCK) - action->group.flags |= ACTION_LATCH_TO_LOCK; - if (wire->latchmods.flags & XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE) - action->group.flags |= ACTION_ABSOLUTE_SWITCH; - - break; - case XCB_XKB_SA_TYPE_LOCK_GROUP: - action->type = ACTION_TYPE_GROUP_LOCK; - - action->group.group = wire->lockgroup.group; - - if (wire->lockgroup.flags & XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE) - action->group.flags |= ACTION_ABSOLUTE_SWITCH; - - break; - case XCB_XKB_SA_TYPE_MOVE_PTR: - action->type = ACTION_TYPE_PTR_MOVE; - - action->ptr.x = (int16_t) (wire->moveptr.xLow | ((uint16_t) wire->moveptr.xHigh << 8)); - action->ptr.y = (int16_t) (wire->moveptr.yLow | ((uint16_t) wire->moveptr.yHigh << 8)); - - if (!(wire->moveptr.flags & XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION)) - action->ptr.flags |= ACTION_ACCEL; - if (wire->moveptr.flags & XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_X) - action->ptr.flags |= ACTION_ABSOLUTE_X; - if (wire->moveptr.flags & XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_Y) - action->ptr.flags |= ACTION_ABSOLUTE_Y; - - break; - case XCB_XKB_SA_TYPE_PTR_BTN: - action->type = ACTION_TYPE_PTR_BUTTON; - - action->btn.count = wire->ptrbtn.count; - action->btn.button = wire->ptrbtn.button; - action->btn.flags = 0; - - break; - case XCB_XKB_SA_TYPE_LOCK_PTR_BTN: - action->type = ACTION_TYPE_PTR_LOCK; - - action->btn.button = wire->lockptrbtn.button; - - if (wire->lockptrbtn.flags & XCB_XKB_SA_ISO_LOCK_FLAG_NO_LOCK) - action->btn.flags |= ACTION_LOCK_NO_LOCK; - if (wire->lockptrbtn.flags & XCB_XKB_SA_ISO_LOCK_FLAG_NO_UNLOCK) - action->btn.flags |= ACTION_LOCK_NO_UNLOCK; - - break; - case XCB_XKB_SA_TYPE_SET_PTR_DFLT: - action->type = ACTION_TYPE_PTR_DEFAULT; - - action->dflt.value = wire->setptrdflt.value; - - if (wire->setptrdflt.flags & XCB_XKB_SA_SET_PTR_DFLT_FLAG_DFLT_BTN_ABSOLUTE) - action->dflt.flags |= ACTION_ABSOLUTE_SWITCH; - - break; - case XCB_XKB_SA_TYPE_TERMINATE: - action->type = ACTION_TYPE_TERMINATE; - - break; - case XCB_XKB_SA_TYPE_SWITCH_SCREEN: - action->type = ACTION_TYPE_SWITCH_VT; - - action->screen.screen = wire->switchscreen.newScreen; - - if (!(wire->switchscreen.flags & XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION)) - action->screen.flags |= ACTION_SAME_SCREEN; - if (wire->switchscreen.flags & XCB_XKB_SWITCH_SCREEN_FLAG_ABSOLUTE) - action->screen.flags |= ACTION_ABSOLUTE_SWITCH; - - break; - case XCB_XKB_SA_TYPE_SET_CONTROLS: - action->type = ACTION_TYPE_CTRL_SET; - { - const uint16_t mask = (wire->setcontrols.boolCtrlsLow | - (wire->setcontrols.boolCtrlsHigh << 8)); - action->ctrls.ctrls = translate_controls_mask(mask); - } - break; - case XCB_XKB_SA_TYPE_LOCK_CONTROLS: - action->type = ACTION_TYPE_CTRL_LOCK; - { - const uint16_t mask = (wire->lockcontrols.boolCtrlsLow | - (wire->lockcontrols.boolCtrlsHigh << 8)); - action->ctrls.ctrls = translate_controls_mask(mask); - } - break; - - case XCB_XKB_SA_TYPE_NO_ACTION: - /* We don't support these. */ - case XCB_XKB_SA_TYPE_ISO_LOCK: - case XCB_XKB_SA_TYPE_REDIRECT_KEY: - case XCB_XKB_SA_TYPE_ACTION_MESSAGE: - case XCB_XKB_SA_TYPE_DEVICE_BTN: - case XCB_XKB_SA_TYPE_LOCK_DEVICE_BTN: - case XCB_XKB_SA_TYPE_DEVICE_VALUATOR: - action->type = ACTION_TYPE_NONE; - break; - - default: - if (wire->type < ACTION_TYPE_PRIVATE) { - action->type = ACTION_TYPE_NONE; - break; - } - - /* Treat high unknown actions as Private actions. */ - action->priv.type = wire->noaction.type; - STATIC_ASSERT(sizeof(action->priv.data) == 7 && - sizeof(wire->noaction.pad0) == 7, - "The private action data must be 7 bytes long!"); - memcpy(action->priv.data, wire->noaction.pad0, 7); - break; - } -} - -static bool -get_types(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_map_reply_t *reply, xcb_xkb_get_map_map_t *map) -{ - int types_length = xcb_xkb_get_map_map_types_rtrn_length(reply, map); - xcb_xkb_key_type_iterator_t types_iter = - xcb_xkb_get_map_map_types_rtrn_iterator(reply, map); - - FAIL_UNLESS(reply->firstType == 0); - - keymap->num_types = reply->nTypes; - ALLOC_OR_FAIL(keymap->types, keymap->num_types); - - for (int i = 0; i < types_length; i++) { - xcb_xkb_key_type_t *wire_type = types_iter.data; - struct xkb_key_type *type = &keymap->types[i]; - - FAIL_UNLESS(wire_type->numLevels > 0); - - type->mods.mods = translate_mods(wire_type->mods_mods, - wire_type->mods_vmods, 0); - type->mods.mask = translate_mods(wire_type->mods_mask, 0, 0); - type->num_levels = wire_type->numLevels; - - { - int entries_length = xcb_xkb_key_type_map_length(wire_type); - xcb_xkb_kt_map_entry_iterator_t entries_iter = - xcb_xkb_key_type_map_iterator(wire_type); - - type->num_entries = wire_type->nMapEntries; - ALLOC_OR_FAIL(type->entries, type->num_entries); - - for (int j = 0; j < entries_length; j++) { - xcb_xkb_kt_map_entry_t *wire_entry = entries_iter.data; - struct xkb_key_type_entry *entry = &type->entries[j]; - - FAIL_UNLESS(wire_entry->level < type->num_levels); - - entry->level = wire_entry->level; - entry->mods.mods = translate_mods(wire_entry->mods_mods, - wire_entry->mods_vmods, 0); - entry->mods.mask = translate_mods(wire_entry->mods_mask, 0, 0); - - xcb_xkb_kt_map_entry_next(&entries_iter); - } - } - - { - int preserves_length = xcb_xkb_key_type_preserve_length(wire_type); - xcb_xkb_mod_def_iterator_t preserves_iter = - xcb_xkb_key_type_preserve_iterator(wire_type); - - FAIL_UNLESS((unsigned) preserves_length <= type->num_entries); - - for (int j = 0; j < preserves_length; j++) { - xcb_xkb_mod_def_t *wire_preserve = preserves_iter.data; - struct xkb_key_type_entry *entry = &type->entries[j]; - - entry->preserve.mods = translate_mods(wire_preserve->realMods, - wire_preserve->vmods, 0); - entry->preserve.mask = translate_mods(wire_preserve->mask, 0, 0); - - xcb_xkb_mod_def_next(&preserves_iter); - } - } - - xcb_xkb_key_type_next(&types_iter); - } - - return true; - -fail: - return false; -} - -static bool -get_sym_maps(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_map_reply_t *reply, xcb_xkb_get_map_map_t *map) -{ - int sym_maps_length = xcb_xkb_get_map_map_syms_rtrn_length(reply, map); - xcb_xkb_key_sym_map_iterator_t sym_maps_iter = - xcb_xkb_get_map_map_syms_rtrn_iterator(reply, map); - - FAIL_UNLESS(reply->minKeyCode <= reply->maxKeyCode); - FAIL_UNLESS(reply->firstKeySym >= reply->minKeyCode); - FAIL_UNLESS(reply->firstKeySym + reply->nKeySyms <= reply->maxKeyCode + 1); - - keymap->min_key_code = reply->minKeyCode; - keymap->max_key_code = reply->maxKeyCode; - - ALLOC_OR_FAIL(keymap->keys, keymap->max_key_code + 1); - - for (xkb_keycode_t kc = keymap->min_key_code; kc <= keymap->max_key_code; kc++) - keymap->keys[kc].keycode = kc; - - for (int i = 0; i < sym_maps_length; i++) { - xcb_xkb_key_sym_map_t *wire_sym_map = sym_maps_iter.data; - struct xkb_key *key = &keymap->keys[reply->firstKeySym + i]; - - key->num_groups = wire_sym_map->groupInfo & 0x0f; - FAIL_UNLESS(key->num_groups <= ARRAY_SIZE(wire_sym_map->kt_index)); - ALLOC_OR_FAIL(key->groups, key->num_groups); - - for (unsigned j = 0; j < key->num_groups; j++) { - FAIL_UNLESS(wire_sym_map->kt_index[j] < keymap->num_types); - key->groups[j].type = &keymap->types[wire_sym_map->kt_index[j]]; - - ALLOC_OR_FAIL(key->groups[j].levels, key->groups[j].type->num_levels); - } - - key->out_of_range_group_number = (wire_sym_map->groupInfo & 0x30) >> 4; - - FAIL_UNLESS(key->out_of_range_group_number <= key->num_groups); - - if (wire_sym_map->groupInfo & XCB_XKB_GROUPS_WRAP_CLAMP_INTO_RANGE) - key->out_of_range_group_action = RANGE_SATURATE; - else if (wire_sym_map->groupInfo & XCB_XKB_GROUPS_WRAP_REDIRECT_INTO_RANGE) - key->out_of_range_group_action = RANGE_REDIRECT; - else - key->out_of_range_group_action = RANGE_WRAP; - - { - int syms_length = xcb_xkb_key_sym_map_syms_length(wire_sym_map); - xcb_keysym_t *syms_iter = xcb_xkb_key_sym_map_syms(wire_sym_map); - - FAIL_UNLESS((unsigned) syms_length == wire_sym_map->width * key->num_groups); - - for (int j = 0; j < syms_length; j++) { - xcb_keysym_t wire_keysym = *syms_iter; - const xkb_layout_index_t group = j / wire_sym_map->width; - const xkb_level_index_t level = j % wire_sym_map->width; - - assert(key->groups[group].type != NULL); - if (level < key->groups[group].type->num_levels && - wire_keysym != XKB_KEY_NoSymbol) { - key->groups[group].levels[level].num_syms = 1; - key->groups[group].levels[level].u.sym = wire_keysym; - } - - syms_iter++; - } - } - - xcb_xkb_key_sym_map_next(&sym_maps_iter); - } - - return true; - -fail: - return false; -} - -static bool -get_actions(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_map_reply_t *reply, xcb_xkb_get_map_map_t *map) -{ - int acts_count_length = - xcb_xkb_get_map_map_acts_rtrn_count_length(reply, map); - uint8_t *acts_count_iter = xcb_xkb_get_map_map_acts_rtrn_count(map); - xcb_xkb_action_iterator_t acts_iter = - xcb_xkb_get_map_map_acts_rtrn_acts_iterator(reply, map); - xcb_xkb_key_sym_map_iterator_t sym_maps_iter = - xcb_xkb_get_map_map_syms_rtrn_iterator(reply, map); - - FAIL_UNLESS(reply->firstKeyAction == keymap->min_key_code); - FAIL_UNLESS(reply->firstKeyAction + reply->nKeyActions == - keymap->max_key_code + 1); - - for (int i = 0; i < acts_count_length; i++) { - xcb_xkb_key_sym_map_t *wire_sym_map = sym_maps_iter.data; - int syms_length = xcb_xkb_key_sym_map_syms_length(wire_sym_map); - uint8_t wire_count = *acts_count_iter; - struct xkb_key *key = &keymap->keys[reply->firstKeyAction + i]; - - FAIL_UNLESS(wire_count == 0 || wire_count == syms_length); - - for (int j = 0; j < wire_count; j++) { - xcb_xkb_action_t *wire_action = acts_iter.data; - const xkb_layout_index_t group = j / wire_sym_map->width; - const xkb_level_index_t level = j % wire_sym_map->width; - - if (level < key->groups[group].type->num_levels) { - union xkb_action *action = - &key->groups[group].levels[level].action; - - translate_action(action, wire_action); - } - - xcb_xkb_action_next(&acts_iter); - } - - acts_count_iter++; - xcb_xkb_key_sym_map_next(&sym_maps_iter); - } - - return true; - -fail: - return false; -} - -static bool -get_vmods(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_map_reply_t *reply, xcb_xkb_get_map_map_t *map) -{ - uint8_t *iter = xcb_xkb_get_map_map_vmods_rtrn(map); - - keymap->mods.num_mods = - NUM_REAL_MODS + MIN(msb_pos(reply->virtualMods), NUM_VMODS); - - for (unsigned i = 0; i < NUM_VMODS; i++) { - if (reply->virtualMods & (1u << i)) { - uint8_t wire = *iter; - struct xkb_mod *mod = &keymap->mods.mods[NUM_REAL_MODS + i]; - - mod->type = MOD_VIRT; - mod->mapping = translate_mods(wire, 0, 0); - - iter++; - } - } - - return true; -} - -static bool -get_explicits(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_map_reply_t *reply, xcb_xkb_get_map_map_t *map) -{ - int length = xcb_xkb_get_map_map_explicit_rtrn_length(reply, map); - xcb_xkb_set_explicit_iterator_t iter = - xcb_xkb_get_map_map_explicit_rtrn_iterator(reply, map); - - for (int i = 0; i < length; i++) { - xcb_xkb_set_explicit_t *wire = iter.data; - struct xkb_key *key; - - FAIL_UNLESS(wire->keycode >= keymap->min_key_code && - wire->keycode <= keymap->max_key_code); - - key = &keymap->keys[wire->keycode]; - - if ((wire->explicit & XCB_XKB_EXPLICIT_KEY_TYPE_1) && - key->num_groups > 0) - key->groups[0].explicit_type = true; - if ((wire->explicit & XCB_XKB_EXPLICIT_KEY_TYPE_2) && - key->num_groups > 1) - key->groups[1].explicit_type = true; - if ((wire->explicit & XCB_XKB_EXPLICIT_KEY_TYPE_3) && - key->num_groups > 2) - key->groups[2].explicit_type = true; - if ((wire->explicit & XCB_XKB_EXPLICIT_KEY_TYPE_4) && - key->num_groups > 3) - key->groups[3].explicit_type = true; - if (wire->explicit & XCB_XKB_EXPLICIT_INTERPRET) - key->explicit |= EXPLICIT_INTERP; - if (wire->explicit & XCB_XKB_EXPLICIT_AUTO_REPEAT) - key->explicit |= EXPLICIT_REPEAT; - if (wire->explicit & XCB_XKB_EXPLICIT_V_MOD_MAP) - key->explicit |= EXPLICIT_VMODMAP; - - xcb_xkb_set_explicit_next(&iter); - } - - return true; - -fail: - return false; -} - -static bool -get_modmaps(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_map_reply_t *reply, xcb_xkb_get_map_map_t *map) -{ - int length = xcb_xkb_get_map_map_modmap_rtrn_length(reply, map); - xcb_xkb_key_mod_map_iterator_t iter = - xcb_xkb_get_map_map_modmap_rtrn_iterator(reply, map); - - for (int i = 0; i < length; i++) { - xcb_xkb_key_mod_map_t *wire = iter.data; - struct xkb_key *key; - - FAIL_UNLESS(wire->keycode >= keymap->min_key_code && - wire->keycode <= keymap->max_key_code); - - key = &keymap->keys[wire->keycode]; - key->modmap = wire->mods; - - xcb_xkb_key_mod_map_next(&iter); - } - - return true; - -fail: - return false; -} - -static bool -get_vmodmaps(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_map_reply_t *reply, xcb_xkb_get_map_map_t *map) -{ - int length = xcb_xkb_get_map_map_vmodmap_rtrn_length(reply, map); - xcb_xkb_key_v_mod_map_iterator_t iter = - xcb_xkb_get_map_map_vmodmap_rtrn_iterator(reply, map); - - for (int i = 0; i < length; i++) { - xcb_xkb_key_v_mod_map_t *wire = iter.data; - struct xkb_key *key; - - FAIL_UNLESS(wire->keycode >= keymap->min_key_code && - wire->keycode <= keymap->max_key_code); - - key = &keymap->keys[wire->keycode]; - key->vmodmap = translate_mods(0, wire->vmods, 0); - - xcb_xkb_key_v_mod_map_next(&iter); - } - - return true; - -fail: - return false; -} - -static bool -get_map(struct xkb_keymap *keymap, xcb_connection_t *conn, uint16_t device_id) -{ - static const xcb_xkb_map_part_t required_components = - (XCB_XKB_MAP_PART_KEY_TYPES | - XCB_XKB_MAP_PART_KEY_SYMS | - XCB_XKB_MAP_PART_MODIFIER_MAP | - XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS | - XCB_XKB_MAP_PART_KEY_ACTIONS | - XCB_XKB_MAP_PART_VIRTUAL_MODS | - XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP); - - xcb_xkb_get_map_cookie_t cookie = - xcb_xkb_get_map(conn, device_id, required_components, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - xcb_xkb_get_map_reply_t *reply = xcb_xkb_get_map_reply(conn, cookie, NULL); - xcb_xkb_get_map_map_t map; - - FAIL_IF_BAD_REPLY(reply, "XkbGetMap"); - - if ((reply->present & required_components) != required_components) - goto fail; - - xcb_xkb_get_map_map_unpack(xcb_xkb_get_map_map(reply), - reply->nTypes, - reply->nKeySyms, - reply->nKeyActions, - reply->totalActions, - reply->totalKeyBehaviors, - reply->virtualMods, - reply->totalKeyExplicit, - reply->totalModMapKeys, - reply->totalVModMapKeys, - reply->present, - &map); - - if (!get_types(keymap, conn, reply, &map) || - !get_sym_maps(keymap, conn, reply, &map) || - !get_actions(keymap, conn, reply, &map) || - !get_vmods(keymap, conn, reply, &map) || - !get_explicits(keymap, conn, reply, &map) || - !get_modmaps(keymap, conn, reply, &map) || - !get_vmodmaps(keymap, conn, reply, &map)) - goto fail; - - free(reply); - return true; - -fail: - free(reply); - return false; -} - -static bool -get_indicators(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_indicator_map_reply_t *reply) -{ - xcb_xkb_indicator_map_iterator_t iter = - xcb_xkb_get_indicator_map_maps_iterator(reply); - - keymap->num_leds = msb_pos(reply->which); - - for (unsigned i = 0; i < NUM_INDICATORS; i++) { - if (reply->which & (1u << i)) { - xcb_xkb_indicator_map_t *wire = iter.data; - struct xkb_led *led = &keymap->leds[i]; - - if (wire->whichGroups & XCB_XKB_IM_GROUPS_WHICH_USE_BASE) - led->which_groups |= XKB_STATE_LAYOUT_DEPRESSED; - if (wire->whichGroups & XCB_XKB_IM_GROUPS_WHICH_USE_LATCHED) - led->which_groups |= XKB_STATE_LAYOUT_LATCHED; - if (wire->whichGroups & XCB_XKB_IM_GROUPS_WHICH_USE_LOCKED) - led->which_groups |= XKB_STATE_LAYOUT_LOCKED; - if (wire->whichGroups & XCB_XKB_IM_GROUPS_WHICH_USE_EFFECTIVE) - led->which_groups |= XKB_STATE_LAYOUT_EFFECTIVE; - if (wire->whichGroups & XCB_XKB_IM_GROUPS_WHICH_USE_COMPAT) - led->which_groups |= XKB_STATE_LAYOUT_EFFECTIVE; - - led->groups = wire->groups; - - if (wire->whichMods & XCB_XKB_IM_MODS_WHICH_USE_BASE) - led->which_mods |= XKB_STATE_MODS_DEPRESSED; - if (wire->whichMods & XCB_XKB_IM_MODS_WHICH_USE_LATCHED) - led->which_mods |= XKB_STATE_MODS_LATCHED; - if (wire->whichMods & XCB_XKB_IM_MODS_WHICH_USE_LOCKED) - led->which_mods |= XKB_STATE_MODS_LOCKED; - if (wire->whichMods & XCB_XKB_IM_MODS_WHICH_USE_EFFECTIVE) - led->which_mods |= XKB_STATE_MODS_EFFECTIVE; - if (wire->whichMods & XCB_XKB_IM_MODS_WHICH_USE_COMPAT) - led->which_mods |= XKB_STATE_MODS_EFFECTIVE; - - led->mods.mods = translate_mods(wire->realMods, wire->vmods, 0); - led->mods.mask = translate_mods(wire->mods, 0, 0); - - led->ctrls = translate_controls_mask(wire->ctrls); - - xcb_xkb_indicator_map_next(&iter); - } - } - - return true; -} - -static bool -get_indicator_map(struct xkb_keymap *keymap, xcb_connection_t *conn, - uint16_t device_id) -{ - xcb_xkb_get_indicator_map_cookie_t cookie = - xcb_xkb_get_indicator_map(conn, device_id, ALL_INDICATORS_MASK); - xcb_xkb_get_indicator_map_reply_t *reply = - xcb_xkb_get_indicator_map_reply(conn, cookie, NULL); - - FAIL_IF_BAD_REPLY(reply, "XkbGetIndicatorMap"); - - if (!get_indicators(keymap, conn, reply)) - goto fail; - - free(reply); - return true; - -fail: - free(reply); - return false; -} - -static bool -get_sym_interprets(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_compat_map_reply_t *reply) -{ - int length = xcb_xkb_get_compat_map_si_rtrn_length(reply); - xcb_xkb_sym_interpret_iterator_t iter = - xcb_xkb_get_compat_map_si_rtrn_iterator(reply); - - FAIL_UNLESS(reply->firstSIRtrn == 0); - FAIL_UNLESS(reply->nSIRtrn == reply->nTotalSI); - - keymap->num_sym_interprets = reply->nSIRtrn; - ALLOC_OR_FAIL(keymap->sym_interprets, keymap->num_sym_interprets); - - for (int i = 0; i < length; i++) { - xcb_xkb_sym_interpret_t *wire = iter.data; - struct xkb_sym_interpret *sym_interpret = &keymap->sym_interprets[i]; - - sym_interpret->sym = wire->sym; - - switch (wire->match & XCB_XKB_SYM_INTERP_MATCH_OP_MASK) { - case XCB_XKB_SYM_INTERPRET_MATCH_NONE_OF: - sym_interpret->match = MATCH_NONE; - break; - case XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF_OR_NONE: - sym_interpret->match = MATCH_ANY_OR_NONE; - break; - case XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF: - sym_interpret->match = MATCH_ANY; - break; - case XCB_XKB_SYM_INTERPRET_MATCH_ALL_OF: - sym_interpret->match = MATCH_ALL; - break; - case XCB_XKB_SYM_INTERPRET_MATCH_EXACTLY: - sym_interpret->match = MATCH_EXACTLY; - break; - } - - sym_interpret->level_one_only = - (wire->match & XCB_XKB_SYM_INTERP_MATCH_LEVEL_ONE_ONLY); - sym_interpret->mods = wire->mods; - - if (wire->virtualMod == NO_MODIFIER) - sym_interpret->virtual_mod = XKB_MOD_INVALID; - else - sym_interpret->virtual_mod = NUM_REAL_MODS + wire->virtualMod; - - sym_interpret->repeat = (wire->flags & 0x01); - translate_action(&sym_interpret->action, - (xcb_xkb_action_t *) &wire->action); - - xcb_xkb_sym_interpret_next(&iter); - } - - return true; - -fail: - return false; -} - -static bool -get_compat_map(struct xkb_keymap *keymap, xcb_connection_t *conn, - uint16_t device_id) -{ - xcb_xkb_get_compat_map_cookie_t cookie = - xcb_xkb_get_compat_map(conn, device_id, 0, true, 0, 0); - xcb_xkb_get_compat_map_reply_t *reply = - xcb_xkb_get_compat_map_reply(conn, cookie, NULL); - - FAIL_IF_BAD_REPLY(reply, "XkbGetCompatMap"); - - if (!get_sym_interprets(keymap, conn, reply)) - goto fail; - - free(reply); - return true; - -fail: - free(reply); - return false; -} - -static bool -get_type_names(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_names_reply_t *reply, - xcb_xkb_get_names_value_list_t *list) -{ - int key_type_names_length = - xcb_xkb_get_names_value_list_type_names_length(reply, list); - xcb_atom_t *key_type_names_iter = - xcb_xkb_get_names_value_list_type_names(list); - int n_levels_per_type_length = - xcb_xkb_get_names_value_list_n_levels_per_type_length(reply, list); - uint8_t *n_levels_per_type_iter = - xcb_xkb_get_names_value_list_n_levels_per_type(list); - xcb_atom_t *kt_level_names_iter = - xcb_xkb_get_names_value_list_kt_level_names(list); - - FAIL_UNLESS(reply->nTypes == keymap->num_types); - FAIL_UNLESS(key_type_names_length == n_levels_per_type_length); - - for (int i = 0; i < key_type_names_length; i++) { - xcb_atom_t wire_type_name = *key_type_names_iter; - uint8_t wire_num_levels = *n_levels_per_type_iter; - struct xkb_key_type *type = &keymap->types[i]; - - /* Levels must have names. */ - FAIL_UNLESS(type->num_levels == wire_num_levels); - - ALLOC_OR_FAIL(type->level_names, type->num_levels); - - if (!adopt_atom(keymap->ctx, conn, wire_type_name, &type->name)) - goto fail; - - if (!adopt_atoms(keymap->ctx, conn, - kt_level_names_iter, type->level_names, - wire_num_levels)) - goto fail; - - kt_level_names_iter += wire_num_levels; - key_type_names_iter++; - n_levels_per_type_iter++; - } - - return true; - -fail: - return false; -} - -static bool -get_indicator_names(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_names_reply_t *reply, - xcb_xkb_get_names_value_list_t *list) -{ - xcb_atom_t *iter = xcb_xkb_get_names_value_list_indicator_names(list); - - FAIL_UNLESS(msb_pos(reply->indicators) <= keymap->num_leds); - - for (unsigned i = 0; i < NUM_INDICATORS; i++) { - if (reply->indicators & (1u << i)) { - xcb_atom_t wire = *iter; - struct xkb_led *led = &keymap->leds[i]; - - if (!adopt_atom(keymap->ctx, conn, wire, &led->name)) - return false; - - iter++; - } - } - - return true; - -fail: - return false; -} - -static bool -get_vmod_names(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_names_reply_t *reply, - xcb_xkb_get_names_value_list_t *list) -{ - xcb_atom_t *iter = xcb_xkb_get_names_value_list_virtual_mod_names(list); - - /* - * GetMap's reply->virtualMods is always 0xffff. This one really - * tells us which vmods exist (a vmod must have a name), so we fix - * up the size here. - */ - keymap->mods.num_mods = - NUM_REAL_MODS + MIN(msb_pos(reply->virtualMods), NUM_VMODS); - - for (unsigned i = 0; i < NUM_VMODS; i++) { - if (reply->virtualMods & (1u << i)) { - xcb_atom_t wire = *iter; - struct xkb_mod *mod = &keymap->mods.mods[NUM_REAL_MODS + i]; - - if (!adopt_atom(keymap->ctx, conn, wire, &mod->name)) - return false; - - iter++; - } - } - - return true; -} - -static bool -get_group_names(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_names_reply_t *reply, - xcb_xkb_get_names_value_list_t *list) -{ - int length = xcb_xkb_get_names_value_list_groups_length(reply, list); - xcb_atom_t *iter = xcb_xkb_get_names_value_list_groups(list); - - keymap->num_group_names = msb_pos(reply->groupNames); - ALLOC_OR_FAIL(keymap->group_names, keymap->num_group_names); - - if (!adopt_atoms(keymap->ctx, conn, - iter, keymap->group_names, length)) - goto fail; - - return true; - -fail: - return false; -} - -static bool -get_key_names(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_names_reply_t *reply, - xcb_xkb_get_names_value_list_t *list) -{ - int length = xcb_xkb_get_names_value_list_key_names_length(reply, list); - xcb_xkb_key_name_iterator_t iter = - xcb_xkb_get_names_value_list_key_names_iterator(reply, list); - - FAIL_UNLESS(reply->minKeyCode == keymap->min_key_code); - FAIL_UNLESS(reply->maxKeyCode == keymap->max_key_code); - FAIL_UNLESS(reply->firstKey == keymap->min_key_code); - FAIL_UNLESS(reply->firstKey + reply->nKeys - 1U == keymap->max_key_code); - - for (int i = 0; i < length; i++) { - xcb_xkb_key_name_t *wire = iter.data; - xkb_atom_t *key_name = &keymap->keys[reply->firstKey + i].name; - - if (wire->name[0] == '\0') { - *key_name = XKB_ATOM_NONE; - } - else { - *key_name = xkb_atom_intern(keymap->ctx, wire->name, - strnlen(wire->name, - XCB_XKB_CONST_KEY_NAME_LENGTH)); - if (!*key_name) - return false; - } - - xcb_xkb_key_name_next(&iter); - } - - return true; - -fail: - return false; -} - -static bool -get_aliases(struct xkb_keymap *keymap, xcb_connection_t *conn, - xcb_xkb_get_names_reply_t *reply, - xcb_xkb_get_names_value_list_t *list) -{ - int length = xcb_xkb_get_names_value_list_key_aliases_length(reply, list); - xcb_xkb_key_alias_iterator_t iter = - xcb_xkb_get_names_value_list_key_aliases_iterator(reply, list); - - keymap->num_key_aliases = reply->nKeyAliases; - ALLOC_OR_FAIL(keymap->key_aliases, keymap->num_key_aliases); - - for (int i = 0; i < length; i++) { - xcb_xkb_key_alias_t *wire = iter.data; - struct xkb_key_alias *alias = &keymap->key_aliases[i]; - - alias->real = - xkb_atom_intern(keymap->ctx, wire->real, - strnlen(wire->real, XCB_XKB_CONST_KEY_NAME_LENGTH)); - alias->alias = - xkb_atom_intern(keymap->ctx, wire->alias, - strnlen(wire->alias, XCB_XKB_CONST_KEY_NAME_LENGTH)); - if (!alias->real || !alias->alias) - goto fail; - - xcb_xkb_key_alias_next(&iter); - } - - return true; - -fail: - return false; -} - -static bool -get_names(struct xkb_keymap *keymap, xcb_connection_t *conn, - uint16_t device_id) -{ - static const xcb_xkb_name_detail_t wanted = - (XCB_XKB_NAME_DETAIL_KEYCODES | - XCB_XKB_NAME_DETAIL_SYMBOLS | - XCB_XKB_NAME_DETAIL_TYPES | - XCB_XKB_NAME_DETAIL_COMPAT | - XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES | - XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES | - XCB_XKB_NAME_DETAIL_INDICATOR_NAMES | - XCB_XKB_NAME_DETAIL_KEY_NAMES | - XCB_XKB_NAME_DETAIL_KEY_ALIASES | - XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES | - XCB_XKB_NAME_DETAIL_GROUP_NAMES); - static const xcb_xkb_name_detail_t required = - (XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES | - XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES | - XCB_XKB_NAME_DETAIL_KEY_NAMES | - XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES); - - xcb_xkb_get_names_cookie_t cookie = - xcb_xkb_get_names(conn, device_id, wanted); - xcb_xkb_get_names_reply_t *reply = - xcb_xkb_get_names_reply(conn, cookie, NULL); - xcb_xkb_get_names_value_list_t list; - - FAIL_IF_BAD_REPLY(reply, "XkbGetNames"); - - FAIL_UNLESS((reply->which & required) == required); - - xcb_xkb_get_names_value_list_unpack(xcb_xkb_get_names_value_list(reply), - reply->nTypes, - reply->indicators, - reply->virtualMods, - reply->groupNames, - reply->nKeys, - reply->nKeyAliases, - reply->nRadioGroups, - reply->which, - &list); - - if (!get_atom_name(conn, list.keycodesName, &keymap->keycodes_section_name) || - !get_atom_name(conn, list.symbolsName, &keymap->symbols_section_name) || - !get_atom_name(conn, list.typesName, &keymap->types_section_name) || - !get_atom_name(conn, list.compatName, &keymap->compat_section_name) || - !get_type_names(keymap, conn, reply, &list) || - !get_indicator_names(keymap, conn, reply, &list) || - !get_vmod_names(keymap, conn, reply, &list) || - !get_group_names(keymap, conn, reply, &list) || - !get_key_names(keymap, conn, reply, &list) || - !get_aliases(keymap, conn, reply, &list)) - goto fail; - - XkbEscapeMapName(keymap->keycodes_section_name); - XkbEscapeMapName(keymap->symbols_section_name); - XkbEscapeMapName(keymap->types_section_name); - XkbEscapeMapName(keymap->compat_section_name); - - free(reply); - return true; - -fail: - free(reply); - return false; -} - -static bool -get_controls(struct xkb_keymap *keymap, xcb_connection_t *conn, - uint16_t device_id) -{ - xcb_xkb_get_controls_cookie_t cookie = - xcb_xkb_get_controls(conn, device_id); - xcb_xkb_get_controls_reply_t *reply = - xcb_xkb_get_controls_reply(conn, cookie, NULL); - - FAIL_IF_BAD_REPLY(reply, "XkbGetControls"); - FAIL_UNLESS(reply->numGroups > 0 && reply->numGroups <= 4); - - keymap->enabled_ctrls = translate_controls_mask(reply->enabledControls); - keymap->num_groups = reply->numGroups; - - FAIL_UNLESS(keymap->max_key_code < XCB_XKB_CONST_PER_KEY_BIT_ARRAY_SIZE * 8); - - for (xkb_keycode_t i = keymap->min_key_code; i <= keymap->max_key_code; i++) - keymap->keys[i].repeats = (reply->perKeyRepeat[i / 8] & (1 << (i % 8))); - - free(reply); - return true; - -fail: - free(reply); - return false; -} - -XKB_EXPORT struct xkb_keymap * -xkb_x11_keymap_new_from_device(struct xkb_context *ctx, - xcb_connection_t *conn, - int32_t device_id, - enum xkb_keymap_compile_flags flags) -{ - struct xkb_keymap *keymap; - const enum xkb_keymap_format format = XKB_KEYMAP_FORMAT_TEXT_V1; - - if (flags & ~(XKB_KEYMAP_COMPILE_NO_FLAGS)) { - log_err_func(ctx, "unrecognized flags: %#x\n", flags); - return NULL; - } - - if (device_id < 0 || device_id > 127) { - log_err_func(ctx, "illegal device ID: %d\n", device_id); - return NULL; - } - - keymap = xkb_keymap_new(ctx, format, flags); - if (!keymap) - return NULL; - - if (!get_map(keymap, conn, device_id) || - !get_indicator_map(keymap, conn, device_id) || - !get_compat_map(keymap, conn, device_id) || - !get_names(keymap, conn, device_id) || - !get_controls(keymap, conn, device_id)) { - xkb_keymap_unref(keymap); - return NULL; - } - - return keymap; -} diff --git a/src/3rdparty/xkbcommon/src/x11/x11-priv.h b/src/3rdparty/xkbcommon/src/x11/x11-priv.h deleted file mode 100644 index 3a19e99c04..0000000000 --- a/src/3rdparty/xkbcommon/src/x11/x11-priv.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef _XKBCOMMON_X11_PRIV_H -#define _XKBCOMMON_X11_PRIV_H - -#include - -#include "keymap.h" -#include "xkbcommon/xkbcommon-x11.h" - -/* Get a strdup'd name of an X atom. */ -bool -get_atom_name(xcb_connection_t *conn, xcb_atom_t atom, char **out); - -/* - * Make a xkb_atom_t's from X atoms (prefer to send as many as possible - * at once, to avoid many roundtrips). - * - * TODO: We can make this more flexible, such that @to doesn't have to - * be sequential. Then we can convert most adopt_atom() calls to - * adopt_atoms(). - * Atom caching would also likely be useful for avoiding quite a - * few requests. - */ -bool -adopt_atoms(struct xkb_context *ctx, xcb_connection_t *conn, - const xcb_atom_t *from, xkb_atom_t *to, size_t count); - -bool -adopt_atom(struct xkb_context *ctx, xcb_connection_t *conn, xcb_atom_t atom, - xkb_atom_t *out); - -#endif diff --git a/src/3rdparty/xkbcommon/src/x11/x11-state.c b/src/3rdparty/xkbcommon/src/x11/x11-state.c deleted file mode 100644 index da7dcc23c2..0000000000 --- a/src/3rdparty/xkbcommon/src/x11/x11-state.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "x11-priv.h" - -static bool -update_initial_state(struct xkb_state *state, xcb_connection_t *conn, - uint16_t device_id) -{ - xcb_xkb_get_state_cookie_t cookie = - xcb_xkb_get_state(conn, device_id); - xcb_xkb_get_state_reply_t *reply = - xcb_xkb_get_state_reply(conn, cookie, NULL); - - if (!reply) - return false; - - xkb_state_update_mask(state, - reply->baseMods, - reply->latchedMods, - reply->lockedMods, - reply->baseGroup, - reply->latchedGroup, - reply->lockedGroup); - - free(reply); - return true; -} - -XKB_EXPORT struct xkb_state * -xkb_x11_state_new_from_device(struct xkb_keymap *keymap, - xcb_connection_t *conn, int32_t device_id) -{ - struct xkb_state *state; - - if (device_id < 0 || device_id > 255) { - log_err_func(keymap->ctx, "illegal device ID: %d", device_id); - return NULL; - } - - state = xkb_state_new(keymap); - if (!state) - return NULL; - - if (!update_initial_state(state, conn, device_id)) { - xkb_state_unref(state); - return NULL; - } - - return state; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/action.c b/src/3rdparty/xkbcommon/src/xkbcomp/action.c deleted file mode 100644 index f99a850083..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/action.c +++ /dev/null @@ -1,871 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - * Ran Benita - */ - -#include "xkbcomp-priv.h" -#include "text.h" -#include "expr.h" -#include "action.h" - -static const ExprBoolean constTrue = { - .expr = { - .common = { .type = STMT_EXPR, .next = NULL }, - .op = EXPR_VALUE, - .value_type = EXPR_TYPE_BOOLEAN, - }, - .set = true, -}; - -static const ExprBoolean constFalse = { - .expr = { - .common = { .type = STMT_EXPR, .next = NULL }, - .op = EXPR_VALUE, - .value_type = EXPR_TYPE_BOOLEAN, - }, - .set = false, -}; - -enum action_field { - ACTION_FIELD_CLEAR_LOCKS, - ACTION_FIELD_LATCH_TO_LOCK, - ACTION_FIELD_GEN_KEY_EVENT, - ACTION_FIELD_REPORT, - ACTION_FIELD_DEFAULT, - ACTION_FIELD_AFFECT, - ACTION_FIELD_INCREMENT, - ACTION_FIELD_MODIFIERS, - ACTION_FIELD_GROUP, - ACTION_FIELD_X, - ACTION_FIELD_Y, - ACTION_FIELD_ACCEL, - ACTION_FIELD_BUTTON, - ACTION_FIELD_VALUE, - ACTION_FIELD_CONTROLS, - ACTION_FIELD_TYPE, - ACTION_FIELD_COUNT, - ACTION_FIELD_SCREEN, - ACTION_FIELD_SAME, - ACTION_FIELD_DATA, - ACTION_FIELD_DEVICE, - ACTION_FIELD_KEYCODE, - ACTION_FIELD_MODS_TO_CLEAR, -}; - -ActionsInfo * -NewActionsInfo(void) -{ - enum xkb_action_type type; - ActionsInfo *info; - - info = calloc(1, sizeof(*info)); - if (!info) - return NULL; - - for (type = 0; type < _ACTION_TYPE_NUM_ENTRIES; type++) - info->actions[type].type = type; - - /* Apply some "factory defaults". */ - - /* Increment default button. */ - info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.flags = 0; - info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.value = 1; - info->actions[ACTION_TYPE_PTR_MOVE].ptr.flags = ACTION_ACCEL; - info->actions[ACTION_TYPE_SWITCH_VT].screen.flags = ACTION_SAME_SCREEN; - - return info; -} - -void -FreeActionsInfo(ActionsInfo *info) -{ - free(info); -} - -static const LookupEntry fieldStrings[] = { - { "clearLocks", ACTION_FIELD_CLEAR_LOCKS }, - { "latchToLock", ACTION_FIELD_LATCH_TO_LOCK }, - { "genKeyEvent", ACTION_FIELD_GEN_KEY_EVENT }, - { "generateKeyEvent", ACTION_FIELD_GEN_KEY_EVENT }, - { "report", ACTION_FIELD_REPORT }, - { "default", ACTION_FIELD_DEFAULT }, - { "affect", ACTION_FIELD_AFFECT }, - { "increment", ACTION_FIELD_INCREMENT }, - { "modifiers", ACTION_FIELD_MODIFIERS }, - { "mods", ACTION_FIELD_MODIFIERS }, - { "group", ACTION_FIELD_GROUP }, - { "x", ACTION_FIELD_X }, - { "y", ACTION_FIELD_Y }, - { "accel", ACTION_FIELD_ACCEL }, - { "accelerate", ACTION_FIELD_ACCEL }, - { "repeat", ACTION_FIELD_ACCEL }, - { "button", ACTION_FIELD_BUTTON }, - { "value", ACTION_FIELD_VALUE }, - { "controls", ACTION_FIELD_CONTROLS }, - { "ctrls", ACTION_FIELD_CONTROLS }, - { "type", ACTION_FIELD_TYPE }, - { "count", ACTION_FIELD_COUNT }, - { "screen", ACTION_FIELD_SCREEN }, - { "same", ACTION_FIELD_SAME }, - { "sameServer", ACTION_FIELD_SAME }, - { "data", ACTION_FIELD_DATA }, - { "device", ACTION_FIELD_DEVICE }, - { "dev", ACTION_FIELD_DEVICE }, - { "key", ACTION_FIELD_KEYCODE }, - { "keycode", ACTION_FIELD_KEYCODE }, - { "kc", ACTION_FIELD_KEYCODE }, - { "clearmods", ACTION_FIELD_MODS_TO_CLEAR }, - { "clearmodifiers", ACTION_FIELD_MODS_TO_CLEAR }, - { NULL, 0 } -}; - -static bool -stringToAction(const char *str, enum xkb_action_type *type_rtrn) -{ - return LookupString(actionTypeNames, str, type_rtrn); -} - -static bool -stringToField(const char *str, enum action_field *field_rtrn) -{ - return LookupString(fieldStrings, str, field_rtrn); -} - -static const char * -fieldText(enum action_field field) -{ - return LookupValue(fieldStrings, field); -} - -/***====================================================================***/ - -static inline bool -ReportMismatch(struct xkb_context *ctx, enum xkb_action_type action, - enum action_field field, const char *type) -{ - log_err(ctx, - "Value of %s field must be of type %s; " - "Action %s definition ignored\n", - fieldText(field), type, ActionTypeText(action)); - return false; -} - -static inline bool -ReportIllegal(struct xkb_context *ctx, enum xkb_action_type action, - enum action_field field) -{ - log_err(ctx, - "Field %s is not defined for an action of type %s; " - "Action definition ignored\n", - fieldText(field), ActionTypeText(action)); - return false; -} - -static inline bool -ReportActionNotArray(struct xkb_context *ctx, enum xkb_action_type action, - enum action_field field) -{ - log_err(ctx, - "The %s field in the %s action is not an array; " - "Action definition ignored\n", - fieldText(field), ActionTypeText(action)); - return false; -} - -static bool -HandleNoAction(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) - -{ - return true; -} - -static bool -CheckBooleanFlag(struct xkb_context *ctx, enum xkb_action_type action, - enum action_field field, enum xkb_action_flags flag, - const ExprDef *array_ndx, const ExprDef *value, - enum xkb_action_flags *flags_inout) -{ - bool set; - - if (array_ndx) - return ReportActionNotArray(ctx, action, field); - - if (!ExprResolveBoolean(ctx, value, &set)) - return ReportMismatch(ctx, action, field, "boolean"); - - if (set) - *flags_inout |= flag; - else - *flags_inout &= ~flag; - - return true; -} - -static bool -CheckModifierField(struct xkb_context *ctx, const struct xkb_mod_set *mods, - enum xkb_action_type action, const ExprDef *array_ndx, - const ExprDef *value, enum xkb_action_flags *flags_inout, - xkb_mod_mask_t *mods_rtrn) -{ - if (array_ndx) - return ReportActionNotArray(ctx, action, ACTION_FIELD_MODIFIERS); - - if (value->expr.op == EXPR_IDENT) { - const char *valStr; - valStr = xkb_atom_text(ctx, value->ident.ident); - if (valStr && (istreq(valStr, "usemodmapmods") || - istreq(valStr, "modmapmods"))) { - *mods_rtrn = 0; - *flags_inout |= ACTION_MODS_LOOKUP_MODMAP; - return true; - } - } - - if (!ExprResolveModMask(ctx, value, MOD_BOTH, mods, mods_rtrn)) - return ReportMismatch(ctx, action, - ACTION_FIELD_MODIFIERS, "modifier mask"); - - *flags_inout &= ~ACTION_MODS_LOOKUP_MODMAP; - return true; -} - -static const LookupEntry lockWhich[] = { - { "both", 0 }, - { "lock", ACTION_LOCK_NO_UNLOCK }, - { "neither", (ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK) }, - { "unlock", ACTION_LOCK_NO_LOCK }, - { NULL, 0 } -}; - -static bool -CheckAffectField(struct xkb_context *ctx, enum xkb_action_type action, - const ExprDef *array_ndx, const ExprDef *value, - enum xkb_action_flags *flags_inout) -{ - enum xkb_action_flags flags; - - if (array_ndx) - return ReportActionNotArray(ctx, action, ACTION_FIELD_AFFECT); - - if (!ExprResolveEnum(ctx, value, &flags, lockWhich)) - return ReportMismatch(ctx, action, ACTION_FIELD_AFFECT, - "lock, unlock, both, neither"); - - *flags_inout &= ~(ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK); - *flags_inout |= flags; - return true; -} - -static bool -HandleSetLatchLockMods(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_mod_action *act = &action->mods; - const enum xkb_action_type type = action->type; - - if (field == ACTION_FIELD_MODIFIERS) - return CheckModifierField(ctx, mods, action->type, array_ndx, value, - &act->flags, &act->mods.mods); - if ((type == ACTION_TYPE_MOD_SET || type == ACTION_TYPE_MOD_LATCH) && - field == ACTION_FIELD_CLEAR_LOCKS) - return CheckBooleanFlag(ctx, action->type, field, - ACTION_LOCK_CLEAR, array_ndx, value, - &act->flags); - if (type == ACTION_TYPE_MOD_LATCH && - field == ACTION_FIELD_LATCH_TO_LOCK) - return CheckBooleanFlag(ctx, action->type, field, - ACTION_LATCH_TO_LOCK, array_ndx, value, - &act->flags); - if (type == ACTION_TYPE_MOD_LOCK && - field == ACTION_FIELD_AFFECT) - return CheckAffectField(ctx, action->type, array_ndx, value, - &act->flags); - - return ReportIllegal(ctx, action->type, field); -} - -static bool -CheckGroupField(struct xkb_context *ctx, enum xkb_action_type action, - const ExprDef *array_ndx, const ExprDef *value, - enum xkb_action_flags *flags_inout, int32_t *group_rtrn) -{ - const ExprDef *spec; - xkb_layout_index_t idx; - enum xkb_action_flags flags = *flags_inout; - - if (array_ndx) - return ReportActionNotArray(ctx, action, ACTION_FIELD_GROUP); - - if (value->expr.op == EXPR_NEGATE || value->expr.op == EXPR_UNARY_PLUS) { - flags &= ~ACTION_ABSOLUTE_SWITCH; - spec = value->unary.child; - } - else { - flags |= ACTION_ABSOLUTE_SWITCH; - spec = value; - } - - if (!ExprResolveGroup(ctx, spec, &idx)) - return ReportMismatch(ctx, action, ACTION_FIELD_GROUP, - "integer (range 1..8)"); - - /* +n, -n are relative, n is absolute. */ - if (value->expr.op == EXPR_NEGATE || value->expr.op == EXPR_UNARY_PLUS) { - *group_rtrn = (int32_t) idx; - if (value->expr.op == EXPR_NEGATE) - *group_rtrn = -*group_rtrn; - } - else { - *group_rtrn = (int32_t) (idx - 1); - } - *flags_inout = flags; - return true; -} - -static bool -HandleSetLatchLockGroup(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_group_action *act = &action->group; - const enum xkb_action_type type = action->type; - - if (field == ACTION_FIELD_GROUP) - return CheckGroupField(ctx, action->type, array_ndx, value, - &act->flags, &act->group); - if ((type == ACTION_TYPE_GROUP_SET || type == ACTION_TYPE_GROUP_LATCH) && - field == ACTION_FIELD_CLEAR_LOCKS) - return CheckBooleanFlag(ctx, action->type, field, - ACTION_LOCK_CLEAR, array_ndx, value, - &act->flags); - if (type == ACTION_TYPE_GROUP_LATCH && - field == ACTION_FIELD_LATCH_TO_LOCK) - return CheckBooleanFlag(ctx, action->type, field, - ACTION_LATCH_TO_LOCK, array_ndx, value, - &act->flags); - - return ReportIllegal(ctx, action->type, field); -} - -static bool -HandleMovePtr(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_pointer_action *act = &action->ptr; - - if (field == ACTION_FIELD_X || field == ACTION_FIELD_Y) { - int val; - const bool absolute = (value->expr.op != EXPR_NEGATE && - value->expr.op != EXPR_UNARY_PLUS); - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (!ExprResolveInteger(ctx, value, &val)) - return ReportMismatch(ctx, action->type, field, "integer"); - - if (val < INT16_MIN || val > INT16_MAX) { - log_err(ctx, - "The %s field in the %s action must be in range %d..%d; " - "Action definition ignored\n", - fieldText(field), ActionTypeText(action->type), - INT16_MIN, INT16_MAX); - return false; - } - - if (field == ACTION_FIELD_X) { - if (absolute) - act->flags |= ACTION_ABSOLUTE_X; - act->x = (int16_t) val; - } - else { - if (absolute) - act->flags |= ACTION_ABSOLUTE_Y; - act->y = (int16_t) val; - } - - return true; - } - else if (field == ACTION_FIELD_ACCEL) { - return CheckBooleanFlag(ctx, action->type, field, - ACTION_ACCEL, array_ndx, value, &act->flags); - } - - return ReportIllegal(ctx, action->type, field); -} - -static bool -HandlePtrBtn(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_pointer_button_action *act = &action->btn; - - if (field == ACTION_FIELD_BUTTON) { - int btn; - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (!ExprResolveButton(ctx, value, &btn)) - return ReportMismatch(ctx, action->type, field, - "integer (range 1..5)"); - - if (btn < 0 || btn > 5) { - log_err(ctx, - "Button must specify default or be in the range 1..5; " - "Illegal button value %d ignored\n", btn); - return false; - } - - act->button = btn; - return true; - } - else if (action->type == ACTION_TYPE_PTR_LOCK && - field == ACTION_FIELD_AFFECT) { - return CheckAffectField(ctx, action->type, array_ndx, value, - &act->flags); - } - else if (field == ACTION_FIELD_COUNT) { - int val; - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (!ExprResolveInteger(ctx, value, &val)) - return ReportMismatch(ctx, action->type, field, "integer"); - - if (val < 0 || val > 255) { - log_err(ctx, - "The count field must have a value in the range 0..255; " - "Illegal count %d ignored\n", val); - return false; - } - - act->count = (uint8_t) val; - return true; - } - - return ReportIllegal(ctx, action->type, field); -} - -static const LookupEntry ptrDflts[] = { - { "dfltbtn", 1 }, - { "defaultbutton", 1 }, - { "button", 1 }, - { NULL, 0 } -}; - -static bool -HandleSetPtrDflt(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_pointer_default_action *act = &action->dflt; - - if (field == ACTION_FIELD_AFFECT) { - unsigned int val; - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (!ExprResolveEnum(ctx, value, &val, ptrDflts)) - return ReportMismatch(ctx, action->type, field, - "pointer component"); - return true; - } - else if (field == ACTION_FIELD_BUTTON || field == ACTION_FIELD_VALUE) { - const ExprDef *button; - int btn; - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (value->expr.op == EXPR_NEGATE || - value->expr.op == EXPR_UNARY_PLUS) { - act->flags &= ~ACTION_ABSOLUTE_SWITCH; - button = value->unary.child; - } - else { - act->flags |= ACTION_ABSOLUTE_SWITCH; - button = value; - } - - if (!ExprResolveButton(ctx, button, &btn)) - return ReportMismatch(ctx, action->type, field, - "integer (range 1..5)"); - - if (btn < 0 || btn > 5) { - log_err(ctx, - "New default button value must be in the range 1..5; " - "Illegal default button value %d ignored\n", btn); - return false; - } - if (btn == 0) { - log_err(ctx, - "Cannot set default pointer button to \"default\"; " - "Illegal default button setting ignored\n"); - return false; - } - - act->value = (value->expr.op == EXPR_NEGATE ? -btn: btn); - return true; - } - - return ReportIllegal(ctx, action->type, field); -} - -static bool -HandleSwitchScreen(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_switch_screen_action *act = &action->screen; - - if (field == ACTION_FIELD_SCREEN) { - const ExprDef *scrn; - int val; - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (value->expr.op == EXPR_NEGATE || - value->expr.op == EXPR_UNARY_PLUS) { - act->flags &= ~ACTION_ABSOLUTE_SWITCH; - scrn = value->unary.child; - } - else { - act->flags |= ACTION_ABSOLUTE_SWITCH; - scrn = value; - } - - if (!ExprResolveInteger(ctx, scrn, &val)) - return ReportMismatch(ctx, action->type, field, - "integer (0..255)"); - - if (val < 0 || val > 255) { - log_err(ctx, - "Screen index must be in the range 1..255; " - "Illegal screen value %d ignored\n", val); - return false; - } - - act->screen = (value->expr.op == EXPR_NEGATE ? -val : val); - return true; - } - else if (field == ACTION_FIELD_SAME) { - return CheckBooleanFlag(ctx, action->type, field, - ACTION_SAME_SCREEN, array_ndx, value, - &act->flags); - } - - return ReportIllegal(ctx, action->type, field); -} - -static bool -HandleSetLockControls(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_controls_action *act = &action->ctrls; - - if (field == ACTION_FIELD_CONTROLS) { - enum xkb_action_controls mask; - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (!ExprResolveMask(ctx, value, &mask, ctrlMaskNames)) - return ReportMismatch(ctx, action->type, field, - "controls mask"); - - act->ctrls = mask; - return true; - } - else if (field == ACTION_FIELD_AFFECT) { - return CheckAffectField(ctx, action->type, array_ndx, value, - &act->flags); - } - - return ReportIllegal(ctx, action->type, field); -} - -static bool -HandlePrivate(struct xkb_context *ctx, const struct xkb_mod_set *mods, - union xkb_action *action, enum action_field field, - const ExprDef *array_ndx, const ExprDef *value) -{ - struct xkb_private_action *act = &action->priv; - - if (field == ACTION_FIELD_TYPE) { - int type; - - if (array_ndx) - return ReportActionNotArray(ctx, action->type, field); - - if (!ExprResolveInteger(ctx, value, &type)) - return ReportMismatch(ctx, ACTION_TYPE_PRIVATE, field, "integer"); - - if (type < 0 || type > 255) { - log_err(ctx, - "Private action type must be in the range 0..255; " - "Illegal type %d ignored\n", type); - return false; - } - - /* - * It's possible for someone to write something like this: - * actions = [ Private(type=3,data[0]=1,data[1]=3,data[2]=3) ] - * where the type refers to some existing action type, e.g. LockMods. - * This assumes that this action's struct is laid out in memory - * exactly as described in the XKB specification and libraries. - * We, however, have changed these structs in various ways, so this - * assumption is no longer true. Since this is a lousy "feature", we - * make actions like these no-ops for now. - */ - if (type < ACTION_TYPE_PRIVATE) { - log_info(ctx, - "Private actions of type %s are not supported; Ignored\n", - ActionTypeText(type)); - act->type = ACTION_TYPE_NONE; - } - else { - act->type = (enum xkb_action_type) type; - } - - return true; - } - else if (field == ACTION_FIELD_DATA) { - if (array_ndx == NULL) { - xkb_atom_t val; - const char *str; - size_t len; - - if (!ExprResolveString(ctx, value, &val)) - return ReportMismatch(ctx, action->type, field, "string"); - - str = xkb_atom_text(ctx, val); - len = strlen(str); - if (len < 1 || len > 7) { - log_warn(ctx, - "A private action has 7 data bytes; " - "Illegal data ignored\n"); - return false; - } - - /* act->data may not be null-terminated, this is intentional */ - strncpy((char *) act->data, str, sizeof(act->data)); - return true; - } - else { - int ndx, datum; - - if (!ExprResolveInteger(ctx, array_ndx, &ndx)) { - log_err(ctx, - "Array subscript must be integer; " - "Illegal subscript ignored\n"); - return false; - } - - if (ndx < 0 || (size_t) ndx >= sizeof(act->data)) { - log_err(ctx, - "The data for a private action is %lu bytes long; " - "Attempt to use data[%d] ignored\n", - (unsigned long) sizeof(act->data), ndx); - return false; - } - - if (!ExprResolveInteger(ctx, value, &datum)) - return ReportMismatch(ctx, act->type, field, "integer"); - - if (datum < 0 || datum > 255) { - log_err(ctx, - "All data for a private action must be 0..255; " - "Illegal datum %d ignored\n", datum); - return false; - } - - act->data[ndx] = (uint8_t) datum; - return true; - } - } - - return ReportIllegal(ctx, ACTION_TYPE_NONE, field); -} - -typedef bool (*actionHandler)(struct xkb_context *ctx, - const struct xkb_mod_set *mods, - union xkb_action *action, - enum action_field field, - const ExprDef *array_ndx, - const ExprDef *value); - -static const actionHandler handleAction[_ACTION_TYPE_NUM_ENTRIES] = { - [ACTION_TYPE_NONE] = HandleNoAction, - [ACTION_TYPE_MOD_SET] = HandleSetLatchLockMods, - [ACTION_TYPE_MOD_LATCH] = HandleSetLatchLockMods, - [ACTION_TYPE_MOD_LOCK] = HandleSetLatchLockMods, - [ACTION_TYPE_GROUP_SET] = HandleSetLatchLockGroup, - [ACTION_TYPE_GROUP_LATCH] = HandleSetLatchLockGroup, - [ACTION_TYPE_GROUP_LOCK] = HandleSetLatchLockGroup, - [ACTION_TYPE_PTR_MOVE] = HandleMovePtr, - [ACTION_TYPE_PTR_BUTTON] = HandlePtrBtn, - [ACTION_TYPE_PTR_LOCK] = HandlePtrBtn, - [ACTION_TYPE_PTR_DEFAULT] = HandleSetPtrDflt, - [ACTION_TYPE_TERMINATE] = HandleNoAction, - [ACTION_TYPE_SWITCH_VT] = HandleSwitchScreen, - [ACTION_TYPE_CTRL_SET] = HandleSetLockControls, - [ACTION_TYPE_CTRL_LOCK] = HandleSetLockControls, - [ACTION_TYPE_PRIVATE] = HandlePrivate, -}; - -/***====================================================================***/ - -bool -HandleActionDef(struct xkb_context *ctx, ActionsInfo *info, - const struct xkb_mod_set *mods, ExprDef *def, - union xkb_action *action) -{ - ExprDef *arg; - const char *str; - enum xkb_action_type handler_type; - - if (def->expr.op != EXPR_ACTION_DECL) { - log_err(ctx, "Expected an action definition, found %s\n", - expr_op_type_to_string(def->expr.op)); - return false; - } - - str = xkb_atom_text(ctx, def->action.name); - if (!stringToAction(str, &handler_type)) { - log_err(ctx, "Unknown action %s\n", str); - return false; - } - - /* - * Get the default values for this action type, as modified by - * statements such as: - * latchMods.clearLocks = True; - */ - *action = info->actions[handler_type]; - - /* - * Now change the action properties as specified for this - * particular instance, e.g. "modifiers" and "clearLocks" in: - * SetMods(modifiers=Alt,clearLocks); - */ - for (arg = def->action.args; arg != NULL; - arg = (ExprDef *) arg->common.next) { - const ExprDef *value; - ExprDef *field, *arrayRtrn; - const char *elemRtrn, *fieldRtrn; - enum action_field fieldNdx; - - if (arg->expr.op == EXPR_ASSIGN) { - field = arg->binary.left; - value = arg->binary.right; - } - else if (arg->expr.op == EXPR_NOT || arg->expr.op == EXPR_INVERT) { - field = arg->unary.child; - value = (const ExprDef *) &constFalse; - } - else { - field = arg; - value = (const ExprDef *) &constTrue; - } - - if (!ExprResolveLhs(ctx, field, &elemRtrn, &fieldRtrn, &arrayRtrn)) - return false; - - if (elemRtrn) { - log_err(ctx, - "Cannot change defaults in an action definition; " - "Ignoring attempt to change %s.%s\n", - elemRtrn, fieldRtrn); - return false; - } - - if (!stringToField(fieldRtrn, &fieldNdx)) { - log_err(ctx, "Unknown field name %s\n", fieldRtrn); - return false; - } - - if (!handleAction[handler_type](ctx, mods, action, fieldNdx, - arrayRtrn, value)) - return false; - } - - return true; -} - -bool -SetActionField(struct xkb_context *ctx, ActionsInfo *info, - struct xkb_mod_set *mods, const char *elem, - const char *field, ExprDef *array_ndx, ExprDef *value) -{ - enum xkb_action_type action; - enum action_field action_field; - - if (!stringToAction(elem, &action)) - return false; - - if (!stringToField(field, &action_field)) { - log_err(ctx, "\"%s\" is not a legal field name\n", field); - return false; - } - - return handleAction[action](ctx, mods, &info->actions[action], - action_field, array_ndx, value); -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/action.h b/src/3rdparty/xkbcommon/src/xkbcomp/action.h deleted file mode 100644 index 1f92e7b38e..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/action.h +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#ifndef XKBCOMP_ACTION_H -#define XKBCOMP_ACTION_H - -/* - * This struct contains the default values which every new action - * (e.g. in an interpret statement) starts off with. It can be - * modified within the files (see calls to SetActionField). - */ -typedef struct { - union xkb_action actions[_ACTION_TYPE_NUM_ENTRIES]; -} ActionsInfo; - -ActionsInfo * -NewActionsInfo(void); - -void -FreeActionsInfo(ActionsInfo *info); - -bool -HandleActionDef(struct xkb_context *ctx, ActionsInfo *info, - const struct xkb_mod_set *mods, ExprDef *def, - union xkb_action *action); - -bool -SetActionField(struct xkb_context *ctx, ActionsInfo *info, - struct xkb_mod_set *mods, const char *elem, - const char *field, ExprDef *array_ndx, ExprDef *value); - - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c b/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c deleted file mode 100644 index 365ff51c5f..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.c +++ /dev/null @@ -1,806 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - * Ran Benita - */ - -#include "xkbcomp-priv.h" -#include "ast-build.h" -#include "include.h" - -ParseCommon * -AppendStmt(ParseCommon *to, ParseCommon *append) -{ - ParseCommon *iter; - - if (!to) - return append; - - for (iter = to; iter->next; iter = iter->next); - - iter->next = append; - return to; -} - -static ExprDef * -ExprCreate(enum expr_op_type op, enum expr_value_type type, size_t size) -{ - ExprDef *expr = malloc(size); - if (!expr) - return NULL; - - expr->common.type = STMT_EXPR; - expr->common.next = NULL; - expr->expr.op = op; - expr->expr.value_type = type; - - return expr; -} - -#define EXPR_CREATE(type_, name_, op_, value_type_) \ - ExprDef *name_ = ExprCreate(op_, value_type_, sizeof(type_)); \ - if (!name_) \ - return NULL; - -ExprDef * -ExprCreateString(xkb_atom_t str) -{ - EXPR_CREATE(ExprString, expr, EXPR_VALUE, EXPR_TYPE_STRING); - expr->string.str = str; - return expr; -} - -ExprDef * -ExprCreateInteger(int ival) -{ - EXPR_CREATE(ExprInteger, expr, EXPR_VALUE, EXPR_TYPE_INT); - expr->integer.ival = ival; - return expr; -} - -ExprDef * -ExprCreateFloat(void) -{ - EXPR_CREATE(ExprFloat, expr, EXPR_VALUE, EXPR_TYPE_FLOAT); - return expr; -} - -ExprDef * -ExprCreateBoolean(bool set) -{ - EXPR_CREATE(ExprBoolean, expr, EXPR_VALUE, EXPR_TYPE_BOOLEAN); - expr->boolean.set = set; - return expr; -} - -ExprDef * -ExprCreateKeyName(xkb_atom_t key_name) -{ - EXPR_CREATE(ExprKeyName, expr, EXPR_VALUE, EXPR_TYPE_KEYNAME); - expr->key_name.key_name = key_name; - return expr; -} - -ExprDef * -ExprCreateIdent(xkb_atom_t ident) -{ - EXPR_CREATE(ExprIdent, expr, EXPR_IDENT, EXPR_TYPE_UNKNOWN); - expr->ident.ident = ident; - return expr; -} - -ExprDef * -ExprCreateUnary(enum expr_op_type op, enum expr_value_type type, - ExprDef *child) -{ - EXPR_CREATE(ExprUnary, expr, op, type); - expr->unary.child = child; - return expr; -} - -ExprDef * -ExprCreateBinary(enum expr_op_type op, ExprDef *left, ExprDef *right) -{ - EXPR_CREATE(ExprBinary, expr, op, EXPR_TYPE_UNKNOWN); - - if (op == EXPR_ASSIGN || left->expr.value_type == EXPR_TYPE_UNKNOWN) - expr->expr.value_type = right->expr.value_type; - else if (left->expr.value_type == right->expr.value_type || - right->expr.value_type == EXPR_TYPE_UNKNOWN) - expr->expr.value_type = left->expr.value_type; - expr->binary.left = left; - expr->binary.right = right; - - return expr; -} - -ExprDef * -ExprCreateFieldRef(xkb_atom_t element, xkb_atom_t field) -{ - EXPR_CREATE(ExprFieldRef, expr, EXPR_FIELD_REF, EXPR_TYPE_UNKNOWN); - expr->field_ref.element = element; - expr->field_ref.field = field; - return expr; -} - -ExprDef * -ExprCreateArrayRef(xkb_atom_t element, xkb_atom_t field, ExprDef *entry) -{ - EXPR_CREATE(ExprArrayRef, expr, EXPR_ARRAY_REF, EXPR_TYPE_UNKNOWN); - expr->array_ref.element = element; - expr->array_ref.field = field; - expr->array_ref.entry = entry; - return expr; -} - -ExprDef * -ExprCreateAction(xkb_atom_t name, ExprDef *args) -{ - EXPR_CREATE(ExprAction, expr, EXPR_ACTION_DECL, EXPR_TYPE_UNKNOWN); - expr->action.name = name; - expr->action.args = args; - return expr; -} - -ExprDef * -ExprCreateKeysymList(xkb_keysym_t sym) -{ - EXPR_CREATE(ExprKeysymList, expr, EXPR_KEYSYM_LIST, EXPR_TYPE_SYMBOLS); - - darray_init(expr->keysym_list.syms); - darray_init(expr->keysym_list.symsMapIndex); - darray_init(expr->keysym_list.symsNumEntries); - - darray_append(expr->keysym_list.syms, sym); - darray_append(expr->keysym_list.symsMapIndex, 0); - darray_append(expr->keysym_list.symsNumEntries, 1); - - return expr; -} - -ExprDef * -ExprCreateMultiKeysymList(ExprDef *expr) -{ - unsigned nLevels = darray_size(expr->keysym_list.symsMapIndex); - - darray_resize(expr->keysym_list.symsMapIndex, 1); - darray_resize(expr->keysym_list.symsNumEntries, 1); - darray_item(expr->keysym_list.symsMapIndex, 0) = 0; - darray_item(expr->keysym_list.symsNumEntries, 0) = nLevels; - - return expr; -} - -ExprDef * -ExprAppendKeysymList(ExprDef *expr, xkb_keysym_t sym) -{ - unsigned nSyms = darray_size(expr->keysym_list.syms); - - darray_append(expr->keysym_list.symsMapIndex, nSyms); - darray_append(expr->keysym_list.symsNumEntries, 1); - darray_append(expr->keysym_list.syms, sym); - - return expr; -} - -ExprDef * -ExprAppendMultiKeysymList(ExprDef *expr, ExprDef *append) -{ - unsigned nSyms = darray_size(expr->keysym_list.syms); - unsigned numEntries = darray_size(append->keysym_list.syms); - - darray_append(expr->keysym_list.symsMapIndex, nSyms); - darray_append(expr->keysym_list.symsNumEntries, numEntries); - darray_concat(expr->keysym_list.syms, append->keysym_list.syms); - - FreeStmt((ParseCommon *) append); - - return expr; -} - -KeycodeDef * -KeycodeCreate(xkb_atom_t name, int64_t value) -{ - KeycodeDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_KEYCODE; - def->common.next = NULL; - def->name = name; - def->value = value; - - return def; -} - -KeyAliasDef * -KeyAliasCreate(xkb_atom_t alias, xkb_atom_t real) -{ - KeyAliasDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_ALIAS; - def->common.next = NULL; - def->alias = alias; - def->real = real; - - return def; -} - -VModDef * -VModCreate(xkb_atom_t name, ExprDef *value) -{ - VModDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_VMOD; - def->common.next = NULL; - def->name = name; - def->value = value; - - return def; -} - -VarDef * -VarCreate(ExprDef *name, ExprDef *value) -{ - VarDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_VAR; - def->common.next = NULL; - def->name = name; - def->value = value; - - return def; -} - -VarDef * -BoolVarCreate(xkb_atom_t ident, bool set) -{ - ExprDef *name, *value; - VarDef *def; - if (!(name = ExprCreateIdent(ident))) { - return NULL; - } - if (!(value = ExprCreateBoolean(set))) { - FreeStmt((ParseCommon *) name); - return NULL; - } - if (!(def = VarCreate(name, value))) { - FreeStmt((ParseCommon *) name); - FreeStmt((ParseCommon *) value); - return NULL; - } - return def; -} - -InterpDef * -InterpCreate(xkb_keysym_t sym, ExprDef *match) -{ - InterpDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_INTERP; - def->common.next = NULL; - def->sym = sym; - def->match = match; - def->def = NULL; - - return def; -} - -KeyTypeDef * -KeyTypeCreate(xkb_atom_t name, VarDef *body) -{ - KeyTypeDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_TYPE; - def->common.next = NULL; - def->merge = MERGE_DEFAULT; - def->name = name; - def->body = body; - - return def; -} - -SymbolsDef * -SymbolsCreate(xkb_atom_t keyName, VarDef *symbols) -{ - SymbolsDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_SYMBOLS; - def->common.next = NULL; - def->merge = MERGE_DEFAULT; - def->keyName = keyName; - def->symbols = symbols; - - return def; -} - -GroupCompatDef * -GroupCompatCreate(unsigned group, ExprDef *val) -{ - GroupCompatDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_GROUP_COMPAT; - def->common.next = NULL; - def->merge = MERGE_DEFAULT; - def->group = group; - def->def = val; - - return def; -} - -ModMapDef * -ModMapCreate(xkb_atom_t modifier, ExprDef *keys) -{ - ModMapDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_MODMAP; - def->common.next = NULL; - def->merge = MERGE_DEFAULT; - def->modifier = modifier; - def->keys = keys; - - return def; -} - -LedMapDef * -LedMapCreate(xkb_atom_t name, VarDef *body) -{ - LedMapDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_LED_MAP; - def->common.next = NULL; - def->merge = MERGE_DEFAULT; - def->name = name; - def->body = body; - - return def; -} - -LedNameDef * -LedNameCreate(unsigned ndx, ExprDef *name, bool virtual) -{ - LedNameDef *def = malloc(sizeof(*def)); - if (!def) - return NULL; - - def->common.type = STMT_LED_NAME; - def->common.next = NULL; - def->merge = MERGE_DEFAULT; - def->ndx = ndx; - def->name = name; - def->virtual = virtual; - - return def; -} - -static void -FreeInclude(IncludeStmt *incl); - -IncludeStmt * -IncludeCreate(struct xkb_context *ctx, char *str, enum merge_mode merge) -{ - IncludeStmt *incl, *first; - char *file, *map, *stmt, *tmp, *extra_data; - char nextop; - - incl = first = NULL; - file = map = NULL; - tmp = str; - stmt = strdup_safe(str); - while (tmp && *tmp) - { - if (!ParseIncludeMap(&tmp, &file, &map, &nextop, &extra_data)) - goto err; - - /* - * Given an RMLVO (here layout) like 'us,,fr', the rules parser - * will give out something like 'pc+us+:2+fr:3+inet(evdev)'. - * We should just skip the ':2' in this case and leave it to the - * appropriate section to deal with the empty group. - */ - if (isempty(file)) { - free(file); - free(map); - free(extra_data); - continue; - } - - if (first == NULL) { - first = incl = malloc(sizeof(*first)); - } else { - incl->next_incl = malloc(sizeof(*first)); - incl = incl->next_incl; - } - - if (!incl) - break; - - incl->common.type = STMT_INCLUDE; - incl->common.next = NULL; - incl->merge = merge; - incl->stmt = NULL; - incl->file = file; - incl->map = map; - incl->modifier = extra_data; - incl->next_incl = NULL; - - if (nextop == '|') - merge = MERGE_AUGMENT; - else - merge = MERGE_OVERRIDE; - } - - if (first) - first->stmt = stmt; - else - free(stmt); - - return first; - -err: - log_err(ctx, "Illegal include statement \"%s\"; Ignored\n", stmt); - FreeInclude(first); - free(stmt); - return NULL; -} - -XkbFile * -XkbFileCreate(enum xkb_file_type type, char *name, ParseCommon *defs, - enum xkb_map_flags flags) -{ - XkbFile *file; - - file = calloc(1, sizeof(*file)); - if (!file) - return NULL; - - XkbEscapeMapName(name); - file->file_type = type; - file->name = name ? name : strdup("(unnamed)"); - file->defs = defs; - file->flags = flags; - - return file; -} - -XkbFile * -XkbFileFromComponents(struct xkb_context *ctx, - const struct xkb_component_names *kkctgs) -{ - char *const components[] = { - kkctgs->keycodes, kkctgs->types, - kkctgs->compat, kkctgs->symbols, - }; - enum xkb_file_type type; - IncludeStmt *include = NULL; - XkbFile *file = NULL; - ParseCommon *defs = NULL; - - for (type = FIRST_KEYMAP_FILE_TYPE; type <= LAST_KEYMAP_FILE_TYPE; type++) { - include = IncludeCreate(ctx, components[type], MERGE_DEFAULT); - if (!include) - goto err; - - file = XkbFileCreate(type, NULL, (ParseCommon *) include, 0); - if (!file) { - FreeInclude(include); - goto err; - } - - defs = AppendStmt(defs, &file->common); - } - - file = XkbFileCreate(FILE_TYPE_KEYMAP, NULL, defs, 0); - if (!file) - goto err; - - return file; - -err: - FreeXkbFile((XkbFile *) defs); - return NULL; -} - -static void -FreeExpr(ExprDef *expr) -{ - if (!expr) - return; - - switch (expr->expr.op) { - case EXPR_ACTION_LIST: - case EXPR_NEGATE: - case EXPR_UNARY_PLUS: - case EXPR_NOT: - case EXPR_INVERT: - FreeStmt((ParseCommon *) expr->unary.child); - break; - - case EXPR_DIVIDE: - case EXPR_ADD: - case EXPR_SUBTRACT: - case EXPR_MULTIPLY: - case EXPR_ASSIGN: - FreeStmt((ParseCommon *) expr->binary.left); - FreeStmt((ParseCommon *) expr->binary.right); - break; - - case EXPR_ACTION_DECL: - FreeStmt((ParseCommon *) expr->action.args); - break; - - case EXPR_ARRAY_REF: - FreeStmt((ParseCommon *) expr->array_ref.entry); - break; - - case EXPR_KEYSYM_LIST: - darray_free(expr->keysym_list.syms); - darray_free(expr->keysym_list.symsMapIndex); - darray_free(expr->keysym_list.symsNumEntries); - break; - - default: - break; - } -} - -static void -FreeInclude(IncludeStmt *incl) -{ - IncludeStmt *next; - - while (incl) - { - next = incl->next_incl; - - free(incl->file); - free(incl->map); - free(incl->modifier); - free(incl->stmt); - - free(incl); - incl = next; - } -} - -void -FreeStmt(ParseCommon *stmt) -{ - ParseCommon *next; - - while (stmt) - { - next = stmt->next; - - switch (stmt->type) { - case STMT_INCLUDE: - FreeInclude((IncludeStmt *) stmt); - /* stmt is already free'd here. */ - stmt = NULL; - break; - case STMT_EXPR: - FreeExpr((ExprDef *) stmt); - break; - case STMT_VAR: - FreeStmt((ParseCommon *) ((VarDef *) stmt)->name); - FreeStmt((ParseCommon *) ((VarDef *) stmt)->value); - break; - case STMT_TYPE: - FreeStmt((ParseCommon *) ((KeyTypeDef *) stmt)->body); - break; - case STMT_INTERP: - FreeStmt((ParseCommon *) ((InterpDef *) stmt)->match); - FreeStmt((ParseCommon *) ((InterpDef *) stmt)->def); - break; - case STMT_VMOD: - FreeStmt((ParseCommon *) ((VModDef *) stmt)->value); - break; - case STMT_SYMBOLS: - FreeStmt((ParseCommon *) ((SymbolsDef *) stmt)->symbols); - break; - case STMT_MODMAP: - FreeStmt((ParseCommon *) ((ModMapDef *) stmt)->keys); - break; - case STMT_GROUP_COMPAT: - FreeStmt((ParseCommon *) ((GroupCompatDef *) stmt)->def); - break; - case STMT_LED_MAP: - FreeStmt((ParseCommon *) ((LedMapDef *) stmt)->body); - break; - case STMT_LED_NAME: - FreeStmt((ParseCommon *) ((LedNameDef *) stmt)->name); - break; - default: - break; - } - - free(stmt); - stmt = next; - } -} - -void -FreeXkbFile(XkbFile *file) -{ - XkbFile *next; - - while (file) - { - next = (XkbFile *) file->common.next; - - switch (file->file_type) { - case FILE_TYPE_KEYMAP: - FreeXkbFile((XkbFile *) file->defs); - break; - - case FILE_TYPE_TYPES: - case FILE_TYPE_COMPAT: - case FILE_TYPE_SYMBOLS: - case FILE_TYPE_KEYCODES: - case FILE_TYPE_GEOMETRY: - FreeStmt(file->defs); - break; - - default: - break; - } - - free(file->name); - free(file); - file = next; - } -} - -static const char *xkb_file_type_strings[_FILE_TYPE_NUM_ENTRIES] = { - [FILE_TYPE_KEYCODES] = "xkb_keycodes", - [FILE_TYPE_TYPES] = "xkb_types", - [FILE_TYPE_COMPAT] = "xkb_compatibility", - [FILE_TYPE_SYMBOLS] = "xkb_symbols", - [FILE_TYPE_GEOMETRY] = "xkb_geometry", - [FILE_TYPE_KEYMAP] = "xkb_keymap", - [FILE_TYPE_RULES] = "rules", -}; - -const char * -xkb_file_type_to_string(enum xkb_file_type type) -{ - if (type >= _FILE_TYPE_NUM_ENTRIES) - return "unknown"; - return xkb_file_type_strings[type]; -} - -static const char *stmt_type_strings[_STMT_NUM_VALUES] = { - [STMT_UNKNOWN] = "unknown statement", - [STMT_INCLUDE] = "include statement", - [STMT_KEYCODE] = "key name definition", - [STMT_ALIAS] = "key alias definition", - [STMT_EXPR] = "expression", - [STMT_VAR] = "variable definition", - [STMT_TYPE] = "key type definition", - [STMT_INTERP] = "symbol interpretation definition", - [STMT_VMOD] = "virtual modifiers definition", - [STMT_SYMBOLS] = "key symbols definition", - [STMT_MODMAP] = "modifier map declaration", - [STMT_GROUP_COMPAT] = "group declaration", - [STMT_LED_MAP] = "indicator map declaration", - [STMT_LED_NAME] = "indicator name declaration", -}; - -const char * -stmt_type_to_string(enum stmt_type type) -{ - if (type >= _STMT_NUM_VALUES) - return NULL; - return stmt_type_strings[type]; -} - -static const char *expr_op_type_strings[_EXPR_NUM_VALUES] = { - [EXPR_VALUE] = "literal", - [EXPR_IDENT] = "identifier", - [EXPR_ACTION_DECL] = "action declaration", - [EXPR_FIELD_REF] = "field reference", - [EXPR_ARRAY_REF] = "array reference", - [EXPR_KEYSYM_LIST] = "list of keysyms", - [EXPR_ACTION_LIST] = "list of actions", - [EXPR_ADD] = "addition", - [EXPR_SUBTRACT] = "subtraction", - [EXPR_MULTIPLY] = "multiplication", - [EXPR_DIVIDE] = "division", - [EXPR_ASSIGN] = "assignment", - [EXPR_NOT] = "logical negation", - [EXPR_NEGATE] = "arithmetic negation", - [EXPR_INVERT] = "bitwise inversion", - [EXPR_UNARY_PLUS] = "unary plus", -}; - -const char * -expr_op_type_to_string(enum expr_op_type type) -{ - if (type >= _EXPR_NUM_VALUES) - return NULL; - return expr_op_type_strings[type]; -} - -static const char *expr_value_type_strings[_EXPR_TYPE_NUM_VALUES] = { - [EXPR_TYPE_UNKNOWN] = "unknown", - [EXPR_TYPE_BOOLEAN] = "boolean", - [EXPR_TYPE_INT] = "int", - [EXPR_TYPE_FLOAT] = "float", - [EXPR_TYPE_STRING] = "string", - [EXPR_TYPE_ACTION] = "action", - [EXPR_TYPE_KEYNAME] = "keyname", - [EXPR_TYPE_SYMBOLS] = "symbols", -}; - -const char * -expr_value_type_to_string(enum expr_value_type type) -{ - if (type >= _EXPR_TYPE_NUM_VALUES) - return NULL; - return expr_value_type_strings[type]; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h b/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h deleted file mode 100644 index 6c76f381ac..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/ast-build.h +++ /dev/null @@ -1,125 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#ifndef XKBCOMP_AST_BUILD_H -#define XKBCOMP_AST_BUILD_H - -ParseCommon * -AppendStmt(ParseCommon *to, ParseCommon *append); - -ExprDef * -ExprCreateString(xkb_atom_t str); - -ExprDef * -ExprCreateInteger(int ival); - -ExprDef * -ExprCreateFloat(void); - -ExprDef * -ExprCreateBoolean(bool set); - -ExprDef * -ExprCreateKeyName(xkb_atom_t key_name); - -ExprDef * -ExprCreateIdent(xkb_atom_t ident); - -ExprDef * -ExprCreateUnary(enum expr_op_type op, enum expr_value_type type, - ExprDef *child); - -ExprDef * -ExprCreateBinary(enum expr_op_type op, ExprDef *left, ExprDef *right); - -ExprDef * -ExprCreateFieldRef(xkb_atom_t element, xkb_atom_t field); - -ExprDef * -ExprCreateArrayRef(xkb_atom_t element, xkb_atom_t field, ExprDef *entry); - -ExprDef * -ExprCreateAction(xkb_atom_t name, ExprDef *args); - -ExprDef * -ExprCreateMultiKeysymList(ExprDef *list); - -ExprDef * -ExprCreateKeysymList(xkb_keysym_t sym); - -ExprDef * -ExprAppendMultiKeysymList(ExprDef *list, ExprDef *append); - -ExprDef * -ExprAppendKeysymList(ExprDef *list, xkb_keysym_t sym); - -KeycodeDef * -KeycodeCreate(xkb_atom_t name, int64_t value); - -KeyAliasDef * -KeyAliasCreate(xkb_atom_t alias, xkb_atom_t real); - -VModDef * -VModCreate(xkb_atom_t name, ExprDef *value); - -VarDef * -VarCreate(ExprDef *name, ExprDef *value); - -VarDef * -BoolVarCreate(xkb_atom_t ident, bool set); - -InterpDef * -InterpCreate(xkb_keysym_t sym, ExprDef *match); - -KeyTypeDef * -KeyTypeCreate(xkb_atom_t name, VarDef *body); - -SymbolsDef * -SymbolsCreate(xkb_atom_t keyName, VarDef *symbols); - -GroupCompatDef * -GroupCompatCreate(unsigned group, ExprDef *def); - -ModMapDef * -ModMapCreate(xkb_atom_t modifier, ExprDef *keys); - -LedMapDef * -LedMapCreate(xkb_atom_t name, VarDef *body); - -LedNameDef * -LedNameCreate(unsigned ndx, ExprDef *name, bool virtual); - -IncludeStmt * -IncludeCreate(struct xkb_context *ctx, char *str, enum merge_mode merge); - -XkbFile * -XkbFileCreate(enum xkb_file_type type, char *name, ParseCommon *defs, - enum xkb_map_flags flags); - -void -FreeStmt(ParseCommon *stmt); - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/ast.h b/src/3rdparty/xkbcommon/src/xkbcomp/ast.h deleted file mode 100644 index 49c5ada457..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/ast.h +++ /dev/null @@ -1,353 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef XKBCOMP_AST_H -#define XKBCOMP_AST_H - -enum xkb_file_type { - /* Component files, by order of compilation. */ - FILE_TYPE_KEYCODES = 0, - FILE_TYPE_TYPES = 1, - FILE_TYPE_COMPAT = 2, - FILE_TYPE_SYMBOLS = 3, - /* Geometry is not compiled any more. */ - FILE_TYPE_GEOMETRY = 4, - - /* A top level file which includes the above files. */ - FILE_TYPE_KEYMAP, - -/* File types which must be found in a keymap file. */ -#define FIRST_KEYMAP_FILE_TYPE FILE_TYPE_KEYCODES -#define LAST_KEYMAP_FILE_TYPE FILE_TYPE_SYMBOLS - - /* This one doesn't mix with the others, but useful here as well. */ - FILE_TYPE_RULES, - - _FILE_TYPE_NUM_ENTRIES -}; - -enum stmt_type { - STMT_UNKNOWN = 0, - STMT_INCLUDE, - STMT_KEYCODE, - STMT_ALIAS, - STMT_EXPR, - STMT_VAR, - STMT_TYPE, - STMT_INTERP, - STMT_VMOD, - STMT_SYMBOLS, - STMT_MODMAP, - STMT_GROUP_COMPAT, - STMT_LED_MAP, - STMT_LED_NAME, - - _STMT_NUM_VALUES -}; - -enum expr_value_type { - EXPR_TYPE_UNKNOWN = 0, - EXPR_TYPE_BOOLEAN, - EXPR_TYPE_INT, - EXPR_TYPE_FLOAT, - EXPR_TYPE_STRING, - EXPR_TYPE_ACTION, - EXPR_TYPE_KEYNAME, - EXPR_TYPE_SYMBOLS, - - _EXPR_TYPE_NUM_VALUES -}; - -enum expr_op_type { - EXPR_VALUE, - EXPR_IDENT, - EXPR_ACTION_DECL, - EXPR_FIELD_REF, - EXPR_ARRAY_REF, - EXPR_KEYSYM_LIST, - EXPR_ACTION_LIST, - EXPR_ADD, - EXPR_SUBTRACT, - EXPR_MULTIPLY, - EXPR_DIVIDE, - EXPR_ASSIGN, - EXPR_NOT, - EXPR_NEGATE, - EXPR_INVERT, - EXPR_UNARY_PLUS, - - _EXPR_NUM_VALUES -}; - -enum merge_mode { - MERGE_DEFAULT, - MERGE_AUGMENT, - MERGE_OVERRIDE, - MERGE_REPLACE, -}; - -const char * -xkb_file_type_to_string(enum xkb_file_type type); - -const char * -stmt_type_to_string(enum stmt_type type); - -const char * -expr_op_type_to_string(enum expr_op_type type); - -const char * -expr_value_type_to_string(enum expr_value_type type); - -typedef struct _ParseCommon { - struct _ParseCommon *next; - enum stmt_type type; -} ParseCommon; - -typedef struct _IncludeStmt { - ParseCommon common; - enum merge_mode merge; - char *stmt; - char *file; - char *map; - char *modifier; - struct _IncludeStmt *next_incl; -} IncludeStmt; - -typedef struct { - ParseCommon common; - enum expr_op_type op; - enum expr_value_type value_type; -} ExprCommon; - -typedef union ExprDef ExprDef; - -typedef struct { - ExprCommon expr; - xkb_atom_t ident; -} ExprIdent; - -typedef struct { - ExprCommon expr; - xkb_atom_t str; -} ExprString; - -typedef struct { - ExprCommon expr; - bool set; -} ExprBoolean; - -typedef struct { - ExprCommon expr; - int ival; -} ExprInteger; - -typedef struct { - ExprCommon expr; - /* We don't support floats, but we still represnt them in the AST, in - * order to provide proper error messages. */ -} ExprFloat; - -typedef struct { - ExprCommon expr; - xkb_atom_t key_name; -} ExprKeyName; - -typedef struct { - ExprCommon expr; - ExprDef *left; - ExprDef *right; -} ExprBinary; - -typedef struct { - ExprCommon expr; - ExprDef *child; -} ExprUnary; - -typedef struct { - ExprCommon expr; - xkb_atom_t element; - xkb_atom_t field; -} ExprFieldRef; - -typedef struct { - ExprCommon expr; - xkb_atom_t element; - xkb_atom_t field; - ExprDef *entry; -} ExprArrayRef; - -typedef struct { - ExprCommon expr; - xkb_atom_t name; - ExprDef *args; -} ExprAction; - -typedef struct { - ExprCommon expr; - darray(xkb_keysym_t) syms; - darray(unsigned int) symsMapIndex; - darray(unsigned int) symsNumEntries; -} ExprKeysymList; - -union ExprDef { - ParseCommon common; - /* Maybe someday we can use C11 anonymous struct for ExprCommon here. */ - ExprCommon expr; - ExprIdent ident; - ExprString string; - ExprBoolean boolean; - ExprInteger integer; - ExprKeyName key_name; - ExprBinary binary; - ExprUnary unary; - ExprFieldRef field_ref; - ExprArrayRef array_ref; - ExprAction action; - ExprKeysymList keysym_list; -}; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - ExprDef *name; - ExprDef *value; -} VarDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_atom_t name; - ExprDef *value; -} VModDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_atom_t name; - int64_t value; -} KeycodeDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_atom_t alias; - xkb_atom_t real; -} KeyAliasDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_atom_t name; - VarDef *body; -} KeyTypeDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_atom_t keyName; - VarDef *symbols; -} SymbolsDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_atom_t modifier; - ExprDef *keys; -} ModMapDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - unsigned group; - ExprDef *def; -} GroupCompatDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_keysym_t sym; - ExprDef *match; - VarDef *def; -} InterpDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - unsigned ndx; - ExprDef *name; - bool virtual; -} LedNameDef; - -typedef struct { - ParseCommon common; - enum merge_mode merge; - xkb_atom_t name; - VarDef *body; -} LedMapDef; - -enum xkb_map_flags { - MAP_IS_DEFAULT = (1 << 0), - MAP_IS_PARTIAL = (1 << 1), - MAP_IS_HIDDEN = (1 << 2), - MAP_HAS_ALPHANUMERIC = (1 << 3), - MAP_HAS_MODIFIER = (1 << 4), - MAP_HAS_KEYPAD = (1 << 5), - MAP_HAS_FN = (1 << 6), - MAP_IS_ALTGR = (1 << 7), -}; - -typedef struct { - ParseCommon common; - enum xkb_file_type file_type; - char *name; - ParseCommon *defs; - enum xkb_map_flags flags; -} XkbFile; - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/compat.c b/src/3rdparty/xkbcommon/src/xkbcomp/compat.c deleted file mode 100644 index bd587c8db9..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/compat.c +++ /dev/null @@ -1,932 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "xkbcomp-priv.h" -#include "text.h" -#include "expr.h" -#include "action.h" -#include "vmod.h" -#include "include.h" - -enum si_field { - SI_FIELD_VIRTUAL_MOD = (1 << 0), - SI_FIELD_ACTION = (1 << 1), - SI_FIELD_AUTO_REPEAT = (1 << 2), - SI_FIELD_LEVEL_ONE_ONLY = (1 << 3), -}; - -typedef struct { - enum si_field defined; - enum merge_mode merge; - - struct xkb_sym_interpret interp; -} SymInterpInfo; - -enum led_field { - LED_FIELD_MODS = (1 << 0), - LED_FIELD_GROUPS = (1 << 1), - LED_FIELD_CTRLS = (1 << 2), -}; - -typedef struct { - enum led_field defined; - enum merge_mode merge; - - struct xkb_led led; -} LedInfo; - -typedef struct { - char *name; - int errorCount; - SymInterpInfo default_interp; - darray(SymInterpInfo) interps; - LedInfo default_led; - LedInfo leds[XKB_MAX_LEDS]; - unsigned int num_leds; - ActionsInfo *actions; - struct xkb_mod_set mods; - - struct xkb_context *ctx; -} CompatInfo; - -static const char * -siText(SymInterpInfo *si, CompatInfo *info) -{ - char *buf = xkb_context_get_buffer(info->ctx, 128); - - if (si == &info->default_interp) - return "default"; - - snprintf(buf, 128, "%s+%s(%s)", - KeysymText(info->ctx, si->interp.sym), - SIMatchText(si->interp.match), - ModMaskText(info->ctx, &info->mods, si->interp.mods)); - - return buf; -} - -static inline bool -ReportSINotArray(CompatInfo *info, SymInterpInfo *si, const char *field) -{ - return ReportNotArray(info->ctx, "symbol interpretation", field, - siText(si, info)); -} - -static inline bool -ReportSIBadType(CompatInfo *info, SymInterpInfo *si, const char *field, - const char *wanted) -{ - return ReportBadType(info->ctx, "symbol interpretation", field, - siText(si, info), wanted); -} - -static inline bool -ReportLedBadType(CompatInfo *info, LedInfo *ledi, const char *field, - const char *wanted) -{ - return ReportBadType(info->ctx, "indicator map", field, - xkb_atom_text(info->ctx, ledi->led.name), - wanted); -} - -static inline bool -ReportLedNotArray(CompatInfo *info, LedInfo *ledi, const char *field) -{ - return ReportNotArray(info->ctx, "indicator map", field, - xkb_atom_text(info->ctx, ledi->led.name)); -} - -static void -InitCompatInfo(CompatInfo *info, struct xkb_context *ctx, - ActionsInfo *actions, const struct xkb_mod_set *mods) -{ - memset(info, 0, sizeof(*info)); - info->ctx = ctx; - info->actions = actions; - info->mods = *mods; - info->default_interp.merge = MERGE_OVERRIDE; - info->default_interp.interp.virtual_mod = XKB_MOD_INVALID; - info->default_led.merge = MERGE_OVERRIDE; -} - -static void -ClearCompatInfo(CompatInfo *info) -{ - free(info->name); - darray_free(info->interps); -} - -static SymInterpInfo * -FindMatchingInterp(CompatInfo *info, SymInterpInfo *new) -{ - SymInterpInfo *old; - - darray_foreach(old, info->interps) - if (old->interp.sym == new->interp.sym && - old->interp.mods == new->interp.mods && - old->interp.match == new->interp.match) - return old; - - return NULL; -} - -static bool -UseNewInterpField(enum si_field field, SymInterpInfo *old, SymInterpInfo *new, - bool report, enum si_field *collide) -{ - if (!(old->defined & field)) - return true; - - if (new->defined & field) { - if (report) - *collide |= field; - - if (new->merge != MERGE_AUGMENT) - return true; - } - - return false; -} - -static bool -AddInterp(CompatInfo *info, SymInterpInfo *new, bool same_file) -{ - SymInterpInfo *old = FindMatchingInterp(info, new); - if (old) { - const int verbosity = xkb_context_get_log_verbosity(info->ctx); - const bool report = (same_file && verbosity > 0) || verbosity > 9; - enum si_field collide = 0; - - if (new->merge == MERGE_REPLACE) { - if (report) - log_warn(info->ctx, - "Multiple definitions for \"%s\"; " - "Earlier interpretation ignored\n", - siText(new, info)); - *old = *new; - return true; - } - - if (UseNewInterpField(SI_FIELD_VIRTUAL_MOD, old, new, report, - &collide)) { - old->interp.virtual_mod = new->interp.virtual_mod; - old->defined |= SI_FIELD_VIRTUAL_MOD; - } - if (UseNewInterpField(SI_FIELD_ACTION, old, new, report, - &collide)) { - old->interp.action = new->interp.action; - old->defined |= SI_FIELD_ACTION; - } - if (UseNewInterpField(SI_FIELD_AUTO_REPEAT, old, new, report, - &collide)) { - old->interp.repeat = new->interp.repeat; - old->defined |= SI_FIELD_AUTO_REPEAT; - } - if (UseNewInterpField(SI_FIELD_LEVEL_ONE_ONLY, old, new, report, - &collide)) { - old->interp.level_one_only = new->interp.level_one_only; - old->defined |= SI_FIELD_LEVEL_ONE_ONLY; - } - - if (collide) { - log_warn(info->ctx, - "Multiple interpretations of \"%s\"; " - "Using %s definition for duplicate fields\n", - siText(new, info), - (new->merge != MERGE_AUGMENT ? "last" : "first")); - } - - return true; - } - - darray_append(info->interps, *new); - return true; -} - -/***====================================================================***/ - -static bool -ResolveStateAndPredicate(ExprDef *expr, enum xkb_match_operation *pred_rtrn, - xkb_mod_mask_t *mods_rtrn, CompatInfo *info) -{ - if (expr == NULL) { - *pred_rtrn = MATCH_ANY_OR_NONE; - *mods_rtrn = MOD_REAL_MASK_ALL; - return true; - } - - *pred_rtrn = MATCH_EXACTLY; - if (expr->expr.op == EXPR_ACTION_DECL) { - const char *pred_txt = xkb_atom_text(info->ctx, expr->action.name); - if (!LookupString(symInterpretMatchMaskNames, pred_txt, pred_rtrn) || - !expr->action.args) { - log_err(info->ctx, - "Illegal modifier predicate \"%s\"; Ignored\n", pred_txt); - return false; - } - expr = expr->action.args; - } - else if (expr->expr.op == EXPR_IDENT) { - const char *pred_txt = xkb_atom_text(info->ctx, expr->ident.ident); - if (pred_txt && istreq(pred_txt, "any")) { - *pred_rtrn = MATCH_ANY; - *mods_rtrn = MOD_REAL_MASK_ALL; - return true; - } - } - - return ExprResolveModMask(info->ctx, expr, MOD_REAL, &info->mods, - mods_rtrn); -} - -/***====================================================================***/ - -static bool -UseNewLEDField(enum led_field field, LedInfo *old, LedInfo *new, - bool report, enum led_field *collide) -{ - if (!(old->defined & field)) - return true; - - if (new->defined & field) { - if (report) - *collide |= field; - - if (new->merge != MERGE_AUGMENT) - return true; - } - - return false; -} - -static bool -AddLedMap(CompatInfo *info, LedInfo *new, bool same_file) -{ - enum led_field collide; - const int verbosity = xkb_context_get_log_verbosity(info->ctx); - const bool report = (same_file && verbosity > 0) || verbosity > 9; - - for (xkb_led_index_t i = 0; i < info->num_leds; i++) { - LedInfo *old = &info->leds[i]; - - if (old->led.name != new->led.name) - continue; - - if (old->led.mods.mods == new->led.mods.mods && - old->led.groups == new->led.groups && - old->led.ctrls == new->led.ctrls && - old->led.which_mods == new->led.which_mods && - old->led.which_groups == new->led.which_groups) { - old->defined |= new->defined; - return true; - } - - if (new->merge == MERGE_REPLACE) { - if (report) - log_warn(info->ctx, - "Map for indicator %s redefined; " - "Earlier definition ignored\n", - xkb_atom_text(info->ctx, old->led.name)); - *old = *new; - return true; - } - - collide = 0; - if (UseNewLEDField(LED_FIELD_MODS, old, new, report, &collide)) { - old->led.which_mods = new->led.which_mods; - old->led.mods = new->led.mods; - old->defined |= LED_FIELD_MODS; - } - if (UseNewLEDField(LED_FIELD_GROUPS, old, new, report, &collide)) { - old->led.which_groups = new->led.which_groups; - old->led.groups = new->led.groups; - old->defined |= LED_FIELD_GROUPS; - } - if (UseNewLEDField(LED_FIELD_CTRLS, old, new, report, &collide)) { - old->led.ctrls = new->led.ctrls; - old->defined |= LED_FIELD_CTRLS; - } - - if (collide) { - log_warn(info->ctx, - "Map for indicator %s redefined; " - "Using %s definition for duplicate fields\n", - xkb_atom_text(info->ctx, old->led.name), - (new->merge == MERGE_AUGMENT ? "first" : "last")); - } - - return true; - } - - if (info->num_leds >= XKB_MAX_LEDS) { - log_err(info->ctx, - "Too many LEDs defined (maximum %d)\n", - XKB_MAX_LEDS); - return false; - } - info->leds[info->num_leds++] = *new; - return true; -} - -static void -MergeIncludedCompatMaps(CompatInfo *into, CompatInfo *from, - enum merge_mode merge) -{ - if (from->errorCount > 0) { - into->errorCount += from->errorCount; - return; - } - - into->mods = from->mods; - - if (into->name == NULL) { - into->name = from->name; - from->name = NULL; - } - - if (darray_empty(into->interps)) { - into->interps = from->interps; - darray_init(from->interps); - } - else { - SymInterpInfo *si; - darray_foreach(si, from->interps) { - si->merge = (merge == MERGE_DEFAULT ? si->merge : merge); - if (!AddInterp(into, si, false)) - into->errorCount++; - } - } - - if (into->num_leds == 0) { - memcpy(into->leds, from->leds, sizeof(*from->leds) * from->num_leds); - into->num_leds = from->num_leds; - from->num_leds = 0; - } - else { - for (xkb_led_index_t i = 0; i < from->num_leds; i++) { - LedInfo *ledi = &from->leds[i]; - ledi->merge = (merge == MERGE_DEFAULT ? ledi->merge : merge); - if (!AddLedMap(into, ledi, false)) - into->errorCount++; - } - } -} - -static void -HandleCompatMapFile(CompatInfo *info, XkbFile *file, enum merge_mode merge); - -static bool -HandleIncludeCompatMap(CompatInfo *info, IncludeStmt *include) -{ - CompatInfo included; - - InitCompatInfo(&included, info->ctx, info->actions, &info->mods); - included.name = include->stmt; - include->stmt = NULL; - - for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) { - CompatInfo next_incl; - XkbFile *file; - - file = ProcessIncludeFile(info->ctx, stmt, FILE_TYPE_COMPAT); - if (!file) { - info->errorCount += 10; - ClearCompatInfo(&included); - return false; - } - - InitCompatInfo(&next_incl, info->ctx, info->actions, &included.mods); - next_incl.default_interp = info->default_interp; - next_incl.default_interp.merge = stmt->merge; - next_incl.default_led = info->default_led; - next_incl.default_led.merge = stmt->merge; - - HandleCompatMapFile(&next_incl, file, MERGE_OVERRIDE); - - MergeIncludedCompatMaps(&included, &next_incl, stmt->merge); - - ClearCompatInfo(&next_incl); - FreeXkbFile(file); - } - - MergeIncludedCompatMaps(info, &included, include->merge); - ClearCompatInfo(&included); - - return (info->errorCount == 0); -} - -static bool -SetInterpField(CompatInfo *info, SymInterpInfo *si, const char *field, - ExprDef *arrayNdx, ExprDef *value) -{ - xkb_mod_index_t ndx; - - if (istreq(field, "action")) { - if (arrayNdx) - return ReportSINotArray(info, si, field); - - if (!HandleActionDef(info->ctx, info->actions, &info->mods, - value, &si->interp.action)) - return false; - - si->defined |= SI_FIELD_ACTION; - } - else if (istreq(field, "virtualmodifier") || - istreq(field, "virtualmod")) { - if (arrayNdx) - return ReportSINotArray(info, si, field); - - if (!ExprResolveMod(info->ctx, value, MOD_VIRT, &info->mods, &ndx)) - return ReportSIBadType(info, si, field, "virtual modifier"); - - si->interp.virtual_mod = ndx; - si->defined |= SI_FIELD_VIRTUAL_MOD; - } - else if (istreq(field, "repeat")) { - bool set; - - if (arrayNdx) - return ReportSINotArray(info, si, field); - - if (!ExprResolveBoolean(info->ctx, value, &set)) - return ReportSIBadType(info, si, field, "boolean"); - - si->interp.repeat = set; - - si->defined |= SI_FIELD_AUTO_REPEAT; - } - else if (istreq(field, "locking")) { - log_dbg(info->ctx, - "The \"locking\" field in symbol interpretation is unsupported; " - "Ignored\n"); - } - else if (istreq(field, "usemodmap") || - istreq(field, "usemodmapmods")) { - unsigned int val; - - if (arrayNdx) - return ReportSINotArray(info, si, field); - - if (!ExprResolveEnum(info->ctx, value, &val, useModMapValueNames)) - return ReportSIBadType(info, si, field, "level specification"); - - si->interp.level_one_only = val; - si->defined |= SI_FIELD_LEVEL_ONE_ONLY; - } - else { - return ReportBadField(info->ctx, "symbol interpretation", field, - siText(si, info)); - } - - return true; -} - -static bool -SetLedMapField(CompatInfo *info, LedInfo *ledi, const char *field, - ExprDef *arrayNdx, ExprDef *value) -{ - bool ok = true; - - if (istreq(field, "modifiers") || istreq(field, "mods")) { - if (arrayNdx) - return ReportLedNotArray(info, ledi, field); - - if (!ExprResolveModMask(info->ctx, value, MOD_BOTH, - &info->mods, &ledi->led.mods.mods)) - return ReportLedBadType(info, ledi, field, "modifier mask"); - - ledi->defined |= LED_FIELD_MODS; - } - else if (istreq(field, "groups")) { - unsigned int mask; - - if (arrayNdx) - return ReportLedNotArray(info, ledi, field); - - if (!ExprResolveMask(info->ctx, value, &mask, groupMaskNames)) - return ReportLedBadType(info, ledi, field, "group mask"); - - ledi->led.groups = mask; - ledi->defined |= LED_FIELD_GROUPS; - } - else if (istreq(field, "controls") || istreq(field, "ctrls")) { - unsigned int mask; - - if (arrayNdx) - return ReportLedNotArray(info, ledi, field); - - if (!ExprResolveMask(info->ctx, value, &mask, ctrlMaskNames)) - return ReportLedBadType(info, ledi, field, "controls mask"); - - ledi->led.ctrls = mask; - ledi->defined |= LED_FIELD_CTRLS; - } - else if (istreq(field, "allowexplicit")) { - log_dbg(info->ctx, - "The \"allowExplicit\" field in indicator statements is unsupported; " - "Ignored\n"); - } - else if (istreq(field, "whichmodstate") || - istreq(field, "whichmodifierstate")) { - unsigned int mask; - - if (arrayNdx) - return ReportLedNotArray(info, ledi, field); - - if (!ExprResolveMask(info->ctx, value, &mask, - modComponentMaskNames)) - return ReportLedBadType(info, ledi, field, - "mask of modifier state components"); - - ledi->led.which_mods = mask; - } - else if (istreq(field, "whichgroupstate")) { - unsigned mask; - - if (arrayNdx) - return ReportLedNotArray(info, ledi, field); - - if (!ExprResolveMask(info->ctx, value, &mask, - groupComponentMaskNames)) - return ReportLedBadType(info, ledi, field, - "mask of group state components"); - - ledi->led.which_groups = mask; - } - else if (istreq(field, "driveskbd") || - istreq(field, "driveskeyboard") || - istreq(field, "leddriveskbd") || - istreq(field, "leddriveskeyboard") || - istreq(field, "indicatordriveskbd") || - istreq(field, "indicatordriveskeyboard")) { - log_dbg(info->ctx, - "The \"%s\" field in indicator statements is unsupported; " - "Ignored\n", field); - } - else if (istreq(field, "index")) { - /* Users should see this, it might cause unexpected behavior. */ - log_err(info->ctx, - "The \"index\" field in indicator statements is unsupported; " - "Ignored\n"); - } - else { - log_err(info->ctx, - "Unknown field %s in map for %s indicator; " - "Definition ignored\n", - field, xkb_atom_text(info->ctx, ledi->led.name)); - ok = false; - } - - return ok; -} - -static bool -HandleGlobalVar(CompatInfo *info, VarDef *stmt) -{ - const char *elem, *field; - ExprDef *ndx; - bool ret; - - if (!ExprResolveLhs(info->ctx, stmt->name, &elem, &field, &ndx)) - ret = false; - else if (elem && istreq(elem, "interpret")) - ret = SetInterpField(info, &info->default_interp, field, ndx, - stmt->value); - else if (elem && istreq(elem, "indicator")) - ret = SetLedMapField(info, &info->default_led, field, ndx, - stmt->value); - else - ret = SetActionField(info->ctx, info->actions, &info->mods, - elem, field, ndx, stmt->value); - return ret; -} - -static bool -HandleInterpBody(CompatInfo *info, VarDef *def, SymInterpInfo *si) -{ - bool ok = true; - const char *elem, *field; - ExprDef *arrayNdx; - - for (; def; def = (VarDef *) def->common.next) { - if (def->name && def->name->expr.op == EXPR_FIELD_REF) { - log_err(info->ctx, - "Cannot set a global default value from within an interpret statement; " - "Move statements to the global file scope\n"); - ok = false; - continue; - } - - ok = ExprResolveLhs(info->ctx, def->name, &elem, &field, &arrayNdx); - if (!ok) - continue; - - ok = SetInterpField(info, si, field, arrayNdx, def->value); - } - - return ok; -} - -static bool -HandleInterpDef(CompatInfo *info, InterpDef *def, enum merge_mode merge) -{ - enum xkb_match_operation pred; - xkb_mod_mask_t mods; - SymInterpInfo si; - - if (!ResolveStateAndPredicate(def->match, &pred, &mods, info)) { - log_err(info->ctx, - "Couldn't determine matching modifiers; " - "Symbol interpretation ignored\n"); - return false; - } - - si = info->default_interp; - si.merge = merge = (def->merge == MERGE_DEFAULT ? merge : def->merge); - si.interp.sym = def->sym; - si.interp.match = pred; - si.interp.mods = mods; - - if (!HandleInterpBody(info, def->def, &si)) { - info->errorCount++; - return false; - } - - if (!AddInterp(info, &si, true)) { - info->errorCount++; - return false; - } - - return true; -} - -static bool -HandleLedMapDef(CompatInfo *info, LedMapDef *def, enum merge_mode merge) -{ - LedInfo ledi; - VarDef *var; - bool ok; - - if (def->merge != MERGE_DEFAULT) - merge = def->merge; - - ledi = info->default_led; - ledi.merge = merge; - ledi.led.name = def->name; - - ok = true; - for (var = def->body; var != NULL; var = (VarDef *) var->common.next) { - const char *elem, *field; - ExprDef *arrayNdx; - if (!ExprResolveLhs(info->ctx, var->name, &elem, &field, &arrayNdx)) { - ok = false; - continue; - } - - if (elem) { - log_err(info->ctx, - "Cannot set defaults for \"%s\" element in indicator map; " - "Assignment to %s.%s ignored\n", elem, elem, field); - ok = false; - } - else { - ok = SetLedMapField(info, &ledi, field, arrayNdx, var->value) && ok; - } - } - - if (ok) - return AddLedMap(info, &ledi, true); - - return false; -} - -static void -HandleCompatMapFile(CompatInfo *info, XkbFile *file, enum merge_mode merge) -{ - bool ok; - - merge = (merge == MERGE_DEFAULT ? MERGE_AUGMENT : merge); - - free(info->name); - info->name = strdup_safe(file->name); - - for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) { - switch (stmt->type) { - case STMT_INCLUDE: - ok = HandleIncludeCompatMap(info, (IncludeStmt *) stmt); - break; - case STMT_INTERP: - ok = HandleInterpDef(info, (InterpDef *) stmt, merge); - break; - case STMT_GROUP_COMPAT: - log_dbg(info->ctx, - "The \"group\" statement in compat is unsupported; " - "Ignored\n"); - ok = true; - break; - case STMT_LED_MAP: - ok = HandleLedMapDef(info, (LedMapDef *) stmt, merge); - break; - case STMT_VAR: - ok = HandleGlobalVar(info, (VarDef *) stmt); - break; - case STMT_VMOD: - ok = HandleVModDef(info->ctx, &info->mods, (VModDef *) stmt, merge); - break; - default: - log_err(info->ctx, - "Compat files may not include other types; " - "Ignoring %s\n", stmt_type_to_string(stmt->type)); - ok = false; - break; - } - - if (!ok) - info->errorCount++; - - if (info->errorCount > 10) { - log_err(info->ctx, - "Abandoning compatibility map \"%s\"\n", file->name); - break; - } - } -} - -/* Temporary struct for CopyInterps. */ -struct collect { - darray(struct xkb_sym_interpret) sym_interprets; -}; - -static void -CopyInterps(CompatInfo *info, bool needSymbol, enum xkb_match_operation pred, - struct collect *collect) -{ - SymInterpInfo *si; - - darray_foreach(si, info->interps) - if (si->interp.match == pred && - (si->interp.sym != XKB_KEY_NoSymbol) == needSymbol) - darray_append(collect->sym_interprets, si->interp); -} - -static void -CopyLedMapDefsToKeymap(struct xkb_keymap *keymap, CompatInfo *info) -{ - for (xkb_led_index_t idx = 0; idx < info->num_leds; idx++) { - LedInfo *ledi = &info->leds[idx]; - xkb_led_index_t i; - struct xkb_led *led; - - /* - * Find the LED with the given name, if it was already declared - * in keycodes. - */ - xkb_leds_enumerate(i, led, keymap) - if (led->name == ledi->led.name) - break; - - /* Not previously declared; create it with next free index. */ - if (i >= keymap->num_leds) { - log_dbg(keymap->ctx, - "Indicator name \"%s\" was not declared in the keycodes section; " - "Adding new indicator\n", - xkb_atom_text(keymap->ctx, ledi->led.name)); - - xkb_leds_enumerate(i, led, keymap) - if (led->name == XKB_ATOM_NONE) - break; - - if (i >= keymap->num_leds) { - /* Not place to put it; ignore. */ - if (i >= XKB_MAX_LEDS) { - log_err(keymap->ctx, - "Too many indicators (maximum is %d); " - "Indicator name \"%s\" ignored\n", - XKB_MAX_LEDS, - xkb_atom_text(keymap->ctx, ledi->led.name)); - continue; - } - - /* Add a new LED. */ - led = &keymap->leds[keymap->num_leds++]; - } - } - - *led = ledi->led; - if (led->groups != 0 && led->which_groups == 0) - led->which_groups = XKB_STATE_LAYOUT_EFFECTIVE; - if (led->mods.mods != 0 && led->which_mods == 0) - led->which_mods = XKB_STATE_MODS_EFFECTIVE; - } -} - -static bool -CopyCompatToKeymap(struct xkb_keymap *keymap, CompatInfo *info) -{ - keymap->compat_section_name = strdup_safe(info->name); - XkbEscapeMapName(keymap->compat_section_name); - - keymap->mods = info->mods; - - if (!darray_empty(info->interps)) { - struct collect collect; - darray_init(collect.sym_interprets); - - /* Most specific to least specific. */ - CopyInterps(info, true, MATCH_EXACTLY, &collect); - CopyInterps(info, true, MATCH_ALL, &collect); - CopyInterps(info, true, MATCH_NONE, &collect); - CopyInterps(info, true, MATCH_ANY, &collect); - CopyInterps(info, true, MATCH_ANY_OR_NONE, &collect); - CopyInterps(info, false, MATCH_EXACTLY, &collect); - CopyInterps(info, false, MATCH_ALL, &collect); - CopyInterps(info, false, MATCH_NONE, &collect); - CopyInterps(info, false, MATCH_ANY, &collect); - CopyInterps(info, false, MATCH_ANY_OR_NONE, &collect); - - darray_steal(collect.sym_interprets, - &keymap->sym_interprets, &keymap->num_sym_interprets); - } - - CopyLedMapDefsToKeymap(keymap, info); - - return true; -} - -bool -CompileCompatMap(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge) -{ - CompatInfo info; - ActionsInfo *actions; - - actions = NewActionsInfo(); - if (!actions) - return false; - - InitCompatInfo(&info, keymap->ctx, actions, &keymap->mods); - info.default_interp.merge = merge; - info.default_led.merge = merge; - - HandleCompatMapFile(&info, file, merge); - if (info.errorCount != 0) - goto err_info; - - if (!CopyCompatToKeymap(keymap, &info)) - goto err_info; - - ClearCompatInfo(&info); - FreeActionsInfo(actions); - return true; - -err_info: - ClearCompatInfo(&info); - FreeActionsInfo(actions); - return false; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/expr.c b/src/3rdparty/xkbcommon/src/xkbcomp/expr.c deleted file mode 100644 index b2567de3eb..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/expr.c +++ /dev/null @@ -1,686 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#include "xkbcomp-priv.h" -#include "text.h" -#include "expr.h" - -typedef bool (*IdentLookupFunc)(struct xkb_context *ctx, const void *priv, - xkb_atom_t field, enum expr_value_type type, - unsigned int *val_rtrn); - -bool -ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr, - const char **elem_rtrn, const char **field_rtrn, - ExprDef **index_rtrn) -{ - switch (expr->expr.op) { - case EXPR_IDENT: - *elem_rtrn = NULL; - *field_rtrn = xkb_atom_text(ctx, expr->ident.ident); - *index_rtrn = NULL; - return (*field_rtrn != NULL); - case EXPR_FIELD_REF: - *elem_rtrn = xkb_atom_text(ctx, expr->field_ref.element); - *field_rtrn = xkb_atom_text(ctx, expr->field_ref.field); - *index_rtrn = NULL; - return (*elem_rtrn != NULL && *field_rtrn != NULL); - case EXPR_ARRAY_REF: - *elem_rtrn = xkb_atom_text(ctx, expr->array_ref.element); - *field_rtrn = xkb_atom_text(ctx, expr->array_ref.field); - *index_rtrn = expr->array_ref.entry; - if (expr->array_ref.element != XKB_ATOM_NONE && *elem_rtrn == NULL) - return false; - if (*field_rtrn == NULL) - return false; - return true; - default: - break; - } - log_wsgo(ctx, "Unexpected operator %d in ResolveLhs\n", expr->expr.op); - return false; -} - -static bool -SimpleLookup(struct xkb_context *ctx, const void *priv, xkb_atom_t field, - enum expr_value_type type, unsigned int *val_rtrn) -{ - const LookupEntry *entry; - const char *str; - - if (!priv || field == XKB_ATOM_NONE || type != EXPR_TYPE_INT) - return false; - - str = xkb_atom_text(ctx, field); - for (entry = priv; entry && entry->name; entry++) { - if (istreq(str, entry->name)) { - *val_rtrn = entry->value; - return true; - } - } - - return false; -} - -/* Data passed in the *priv argument for LookupModMask. */ -typedef struct { - const struct xkb_mod_set *mods; - enum mod_type mod_type; -} LookupModMaskPriv; - -static bool -LookupModMask(struct xkb_context *ctx, const void *priv, xkb_atom_t field, - enum expr_value_type type, xkb_mod_mask_t *val_rtrn) -{ - const char *str; - xkb_mod_index_t ndx; - const LookupModMaskPriv *arg = priv; - const struct xkb_mod_set *mods = arg->mods; - enum mod_type mod_type = arg->mod_type; - - if (type != EXPR_TYPE_INT) - return false; - - str = xkb_atom_text(ctx, field); - if (!str) - return false; - - if (istreq(str, "all")) { - *val_rtrn = MOD_REAL_MASK_ALL; - return true; - } - - if (istreq(str, "none")) { - *val_rtrn = 0; - return true; - } - - ndx = XkbModNameToIndex(mods, field, mod_type); - if (ndx == XKB_MOD_INVALID) - return false; - - *val_rtrn = (1u << ndx); - return true; -} - -bool -ExprResolveBoolean(struct xkb_context *ctx, const ExprDef *expr, - bool *set_rtrn) -{ - bool ok = false; - const char *ident; - - switch (expr->expr.op) { - case EXPR_VALUE: - if (expr->expr.value_type != EXPR_TYPE_BOOLEAN) { - log_err(ctx, - "Found constant of type %s where boolean was expected\n", - expr_value_type_to_string(expr->expr.value_type)); - return false; - } - *set_rtrn = expr->boolean.set; - return true; - - case EXPR_IDENT: - ident = xkb_atom_text(ctx, expr->ident.ident); - if (ident) { - if (istreq(ident, "true") || - istreq(ident, "yes") || - istreq(ident, "on")) { - *set_rtrn = true; - return true; - } - else if (istreq(ident, "false") || - istreq(ident, "no") || - istreq(ident, "off")) { - *set_rtrn = false; - return true; - } - } - log_err(ctx, "Identifier \"%s\" of type boolean is unknown\n", ident); - return false; - - case EXPR_FIELD_REF: - log_err(ctx, "Default \"%s.%s\" of type boolean is unknown\n", - xkb_atom_text(ctx, expr->field_ref.element), - xkb_atom_text(ctx, expr->field_ref.field)); - return false; - - case EXPR_INVERT: - case EXPR_NOT: - ok = ExprResolveBoolean(ctx, expr->unary.child, set_rtrn); - if (ok) - *set_rtrn = !*set_rtrn; - return ok; - case EXPR_ADD: - case EXPR_SUBTRACT: - case EXPR_MULTIPLY: - case EXPR_DIVIDE: - case EXPR_ASSIGN: - case EXPR_NEGATE: - case EXPR_UNARY_PLUS: - log_err(ctx, "%s of boolean values not permitted\n", - expr_op_type_to_string(expr->expr.op)); - break; - - default: - log_wsgo(ctx, "Unknown operator %d in ResolveBoolean\n", - expr->expr.op); - break; - } - - return false; -} - -bool -ExprResolveKeyCode(struct xkb_context *ctx, const ExprDef *expr, - xkb_keycode_t *kc) -{ - xkb_keycode_t leftRtrn, rightRtrn; - - switch (expr->expr.op) { - case EXPR_VALUE: - if (expr->expr.value_type != EXPR_TYPE_INT) { - log_err(ctx, - "Found constant of type %s where an int was expected\n", - expr_value_type_to_string(expr->expr.value_type)); - return false; - } - - *kc = (xkb_keycode_t) expr->integer.ival; - return true; - - case EXPR_ADD: - case EXPR_SUBTRACT: - case EXPR_MULTIPLY: - case EXPR_DIVIDE: - if (!ExprResolveKeyCode(ctx, expr->binary.left, &leftRtrn) || - !ExprResolveKeyCode(ctx, expr->binary.right, &rightRtrn)) - return false; - - switch (expr->expr.op) { - case EXPR_ADD: - *kc = leftRtrn + rightRtrn; - break; - case EXPR_SUBTRACT: - *kc = leftRtrn - rightRtrn; - break; - case EXPR_MULTIPLY: - *kc = leftRtrn * rightRtrn; - break; - case EXPR_DIVIDE: - if (rightRtrn == 0) { - log_err(ctx, "Cannot divide by zero: %d / %d\n", - leftRtrn, rightRtrn); - return false; - } - - *kc = leftRtrn / rightRtrn; - break; - default: - break; - } - - return true; - - case EXPR_NEGATE: - if (!ExprResolveKeyCode(ctx, expr->unary.child, &leftRtrn)) - return false; - - *kc = ~leftRtrn; - return true; - - case EXPR_UNARY_PLUS: - return ExprResolveKeyCode(ctx, expr->unary.child, kc); - - default: - log_wsgo(ctx, "Unknown operator %d in ResolveKeyCode\n", - expr->expr.op); - break; - } - - return false; -} - -/** - * This function returns ... something. It's a bit of a guess, really. - * - * If an integer is given in value ctx, it will be returned in ival. - * If an ident or field reference is given, the lookup function (if given) - * will be called. At the moment, only SimpleLookup use this, and they both - * return the results in uval. And don't support field references. - * - * Cool. - */ -static bool -ExprResolveIntegerLookup(struct xkb_context *ctx, const ExprDef *expr, - int *val_rtrn, IdentLookupFunc lookup, - const void *lookupPriv) -{ - bool ok = false; - int l, r; - unsigned u; - ExprDef *left, *right; - - switch (expr->expr.op) { - case EXPR_VALUE: - if (expr->expr.value_type != EXPR_TYPE_INT) { - log_err(ctx, - "Found constant of type %s where an int was expected\n", - expr_value_type_to_string(expr->expr.value_type)); - return false; - } - - *val_rtrn = expr->integer.ival; - return true; - - case EXPR_IDENT: - if (lookup) - ok = lookup(ctx, lookupPriv, expr->ident.ident, EXPR_TYPE_INT, &u); - - if (!ok) - log_err(ctx, "Identifier \"%s\" of type int is unknown\n", - xkb_atom_text(ctx, expr->ident.ident)); - else - *val_rtrn = (int) u; - - return ok; - - case EXPR_FIELD_REF: - log_err(ctx, "Default \"%s.%s\" of type int is unknown\n", - xkb_atom_text(ctx, expr->field_ref.element), - xkb_atom_text(ctx, expr->field_ref.field)); - return false; - - case EXPR_ADD: - case EXPR_SUBTRACT: - case EXPR_MULTIPLY: - case EXPR_DIVIDE: - left = expr->binary.left; - right = expr->binary.right; - if (!ExprResolveIntegerLookup(ctx, left, &l, lookup, lookupPriv) || - !ExprResolveIntegerLookup(ctx, right, &r, lookup, lookupPriv)) - return false; - - switch (expr->expr.op) { - case EXPR_ADD: - *val_rtrn = l + r; - break; - case EXPR_SUBTRACT: - *val_rtrn = l - r; - break; - case EXPR_MULTIPLY: - *val_rtrn = l * r; - break; - case EXPR_DIVIDE: - if (r == 0) { - log_err(ctx, "Cannot divide by zero: %d / %d\n", l, r); - return false; - } - *val_rtrn = l / r; - break; - default: - log_err(ctx, "%s of integers not permitted\n", - expr_op_type_to_string(expr->expr.op)); - return false; - } - - return true; - - case EXPR_ASSIGN: - log_wsgo(ctx, "Assignment operator not implemented yet\n"); - break; - - case EXPR_NOT: - log_err(ctx, "The ! operator cannot be applied to an integer\n"); - return false; - - case EXPR_INVERT: - case EXPR_NEGATE: - left = expr->unary.child; - if (!ExprResolveIntegerLookup(ctx, left, &l, lookup, lookupPriv)) - return false; - - *val_rtrn = (expr->expr.op == EXPR_NEGATE ? -l : ~l); - return true; - - case EXPR_UNARY_PLUS: - left = expr->unary.child; - return ExprResolveIntegerLookup(ctx, left, val_rtrn, lookup, - lookupPriv); - - default: - log_wsgo(ctx, "Unknown operator %d in ResolveInteger\n", - expr->expr.op); - break; - } - - return false; -} - -bool -ExprResolveInteger(struct xkb_context *ctx, const ExprDef *expr, - int *val_rtrn) -{ - return ExprResolveIntegerLookup(ctx, expr, val_rtrn, NULL, NULL); -} - -bool -ExprResolveGroup(struct xkb_context *ctx, const ExprDef *expr, - xkb_layout_index_t *group_rtrn) -{ - bool ok; - int result; - - ok = ExprResolveIntegerLookup(ctx, expr, &result, SimpleLookup, - groupNames); - if (!ok) - return false; - - if (result <= 0 || result > XKB_MAX_GROUPS) { - log_err(ctx, "Group index %u is out of range (1..%d)\n", - result, XKB_MAX_GROUPS); - return false; - } - - *group_rtrn = (xkb_layout_index_t) result; - return true; -} - -bool -ExprResolveLevel(struct xkb_context *ctx, const ExprDef *expr, - xkb_level_index_t *level_rtrn) -{ - bool ok; - int result; - - ok = ExprResolveIntegerLookup(ctx, expr, &result, SimpleLookup, - levelNames); - if (!ok) - return false; - - if (result < 1) { - log_err(ctx, "Shift level %d is out of range\n", result); - return false; - } - - /* Level is zero-indexed from now on. */ - *level_rtrn = (unsigned int) (result - 1); - return true; -} - -bool -ExprResolveButton(struct xkb_context *ctx, const ExprDef *expr, int *btn_rtrn) -{ - return ExprResolveIntegerLookup(ctx, expr, btn_rtrn, SimpleLookup, - buttonNames); -} - -bool -ExprResolveString(struct xkb_context *ctx, const ExprDef *expr, - xkb_atom_t *val_rtrn) -{ - switch (expr->expr.op) { - case EXPR_VALUE: - if (expr->expr.value_type != EXPR_TYPE_STRING) { - log_err(ctx, "Found constant of type %s, expected a string\n", - expr_value_type_to_string(expr->expr.value_type)); - return false; - } - - *val_rtrn = expr->string.str; - return true; - - case EXPR_IDENT: - log_err(ctx, "Identifier \"%s\" of type string not found\n", - xkb_atom_text(ctx, expr->ident.ident)); - return false; - - case EXPR_FIELD_REF: - log_err(ctx, "Default \"%s.%s\" of type string not found\n", - xkb_atom_text(ctx, expr->field_ref.element), - xkb_atom_text(ctx, expr->field_ref.field)); - return false; - - case EXPR_ADD: - case EXPR_SUBTRACT: - case EXPR_MULTIPLY: - case EXPR_DIVIDE: - case EXPR_ASSIGN: - case EXPR_NEGATE: - case EXPR_INVERT: - case EXPR_NOT: - case EXPR_UNARY_PLUS: - log_err(ctx, "%s of strings not permitted\n", - expr_op_type_to_string(expr->expr.op)); - return false; - - default: - log_wsgo(ctx, "Unknown operator %d in ResolveString\n", - expr->expr.op); - break; - } - return false; -} - -bool -ExprResolveEnum(struct xkb_context *ctx, const ExprDef *expr, - unsigned int *val_rtrn, const LookupEntry *values) -{ - if (expr->expr.op != EXPR_IDENT) { - log_err(ctx, "Found a %s where an enumerated value was expected\n", - expr_op_type_to_string(expr->expr.op)); - return false; - } - - if (!SimpleLookup(ctx, values, expr->ident.ident, EXPR_TYPE_INT, - val_rtrn)) { - log_err(ctx, "Illegal identifier %s; expected one of:\n", - xkb_atom_text(ctx, expr->ident.ident)); - while (values && values->name) - { - log_err(ctx, "\t%s\n", values->name); - values++; - } - return false; - } - - return true; -} - -static bool -ExprResolveMaskLookup(struct xkb_context *ctx, const ExprDef *expr, - unsigned int *val_rtrn, IdentLookupFunc lookup, - const void *lookupPriv) -{ - bool ok = false; - unsigned int l = 0, r = 0; - int v; - ExprDef *left, *right; - const char *bogus = NULL; - - switch (expr->expr.op) { - case EXPR_VALUE: - if (expr->expr.value_type != EXPR_TYPE_INT) { - log_err(ctx, - "Found constant of type %s where a mask was expected\n", - expr_value_type_to_string(expr->expr.value_type)); - return false; - } - *val_rtrn = (unsigned int) expr->integer.ival; - return true; - - case EXPR_IDENT: - ok = lookup(ctx, lookupPriv, expr->ident.ident, EXPR_TYPE_INT, - val_rtrn); - if (!ok) - log_err(ctx, "Identifier \"%s\" of type int is unknown\n", - xkb_atom_text(ctx, expr->ident.ident)); - return ok; - - case EXPR_FIELD_REF: - log_err(ctx, "Default \"%s.%s\" of type int is unknown\n", - xkb_atom_text(ctx, expr->field_ref.element), - xkb_atom_text(ctx, expr->field_ref.field)); - return false; - - case EXPR_ARRAY_REF: - bogus = "array reference"; - /* fallthrough */ - case EXPR_ACTION_DECL: - if (bogus == NULL) - bogus = "function use"; - log_err(ctx, - "Unexpected %s in mask expression; Expression Ignored\n", - bogus); - return false; - - case EXPR_ADD: - case EXPR_SUBTRACT: - case EXPR_MULTIPLY: - case EXPR_DIVIDE: - left = expr->binary.left; - right = expr->binary.right; - if (!ExprResolveMaskLookup(ctx, left, &l, lookup, lookupPriv) || - !ExprResolveMaskLookup(ctx, right, &r, lookup, lookupPriv)) - return false; - - switch (expr->expr.op) { - case EXPR_ADD: - *val_rtrn = l | r; - break; - case EXPR_SUBTRACT: - *val_rtrn = l & (~r); - break; - case EXPR_MULTIPLY: - case EXPR_DIVIDE: - log_err(ctx, "Cannot %s masks; Illegal operation ignored\n", - (expr->expr.op == EXPR_DIVIDE ? "divide" : "multiply")); - return false; - default: - break; - } - - return true; - - case EXPR_ASSIGN: - log_wsgo(ctx, "Assignment operator not implemented yet\n"); - break; - - case EXPR_INVERT: - left = expr->unary.child; - if (!ExprResolveIntegerLookup(ctx, left, &v, lookup, lookupPriv)) - return false; - - *val_rtrn = ~v; - return true; - - case EXPR_UNARY_PLUS: - case EXPR_NEGATE: - case EXPR_NOT: - left = expr->unary.child; - if (!ExprResolveIntegerLookup(ctx, left, &v, lookup, lookupPriv)) - log_err(ctx, "The %s operator cannot be used with a mask\n", - (expr->expr.op == EXPR_NEGATE ? "-" : "!")); - return false; - - default: - log_wsgo(ctx, "Unknown operator %d in ResolveMask\n", - expr->expr.op); - break; - } - - return false; -} - -bool -ExprResolveMask(struct xkb_context *ctx, const ExprDef *expr, - unsigned int *mask_rtrn, const LookupEntry *values) -{ - return ExprResolveMaskLookup(ctx, expr, mask_rtrn, SimpleLookup, values); -} - -bool -ExprResolveModMask(struct xkb_context *ctx, const ExprDef *expr, - enum mod_type mod_type, const struct xkb_mod_set *mods, - xkb_mod_mask_t *mask_rtrn) -{ - LookupModMaskPriv priv = { .mods = mods, .mod_type = mod_type }; - return ExprResolveMaskLookup(ctx, expr, mask_rtrn, LookupModMask, &priv); -} - -bool -ExprResolveKeySym(struct xkb_context *ctx, const ExprDef *expr, - xkb_keysym_t *sym_rtrn) -{ - int val; - - if (expr->expr.op == EXPR_IDENT) { - const char *str = xkb_atom_text(ctx, expr->ident.ident); - *sym_rtrn = xkb_keysym_from_name(str, 0); - if (*sym_rtrn != XKB_KEY_NoSymbol) - return true; - } - - if (!ExprResolveInteger(ctx, expr, &val)) - return false; - - if (val < 0 || val >= 10) - return false; - - *sym_rtrn = XKB_KEY_0 + (xkb_keysym_t) val; - return true; -} - -bool -ExprResolveMod(struct xkb_context *ctx, const ExprDef *def, - enum mod_type mod_type, const struct xkb_mod_set *mods, - xkb_mod_index_t *ndx_rtrn) -{ - xkb_mod_index_t ndx; - xkb_atom_t name; - - if (def->expr.op != EXPR_IDENT) { - log_err(ctx, - "Cannot resolve virtual modifier: " - "found %s where a virtual modifier name was expected\n", - expr_op_type_to_string(def->expr.op)); - return false; - } - - name = def->ident.ident; - ndx = XkbModNameToIndex(mods, name, mod_type); - if (ndx == XKB_MOD_INVALID) { - log_err(ctx, - "Cannot resolve virtual modifier: " - "\"%s\" was not previously declared\n", - xkb_atom_text(ctx, name)); - return false; - } - - *ndx_rtrn = ndx; - return true; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/expr.h b/src/3rdparty/xkbcommon/src/xkbcomp/expr.h deleted file mode 100644 index 9882b8cce5..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/expr.h +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#ifndef XKBCOMP_EXPR_H -#define XKBCOMP_EXPR_H - -bool -ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr, - const char **elem_rtrn, const char **field_rtrn, - ExprDef **index_rtrn); - -bool -ExprResolveModMask(struct xkb_context *ctx, const ExprDef *expr, - enum mod_type mod_type, const struct xkb_mod_set *mods, - xkb_mod_mask_t *mask_rtrn); - -bool -ExprResolveMod(struct xkb_context *ctx, const ExprDef *def, - enum mod_type mod_type, const struct xkb_mod_set *mods, - xkb_mod_index_t *ndx_rtrn); - -bool -ExprResolveBoolean(struct xkb_context *ctx, const ExprDef *expr, - bool *set_rtrn); - -bool -ExprResolveKeyCode(struct xkb_context *ctx, const ExprDef *expr, - xkb_keycode_t *kc); - -bool -ExprResolveInteger(struct xkb_context *ctx, const ExprDef *expr, - int *val_rtrn); - -bool -ExprResolveLevel(struct xkb_context *ctx, const ExprDef *expr, - xkb_level_index_t *level_rtrn); - -bool -ExprResolveGroup(struct xkb_context *ctx, const ExprDef *expr, - xkb_layout_index_t *group_rtrn); - -bool -ExprResolveButton(struct xkb_context *ctx, const ExprDef *expr, - int *btn_rtrn); - -bool -ExprResolveString(struct xkb_context *ctx, const ExprDef *expr, - xkb_atom_t *val_rtrn); - -bool -ExprResolveEnum(struct xkb_context *ctx, const ExprDef *expr, - unsigned int *val_rtrn, const LookupEntry *values); - -bool -ExprResolveMask(struct xkb_context *ctx, const ExprDef *expr, - unsigned int *mask_rtrn, const LookupEntry *values); - -bool -ExprResolveKeySym(struct xkb_context *ctx, const ExprDef *expr, - xkb_keysym_t *sym_rtrn); - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/include.c b/src/3rdparty/xkbcommon/src/xkbcomp/include.c deleted file mode 100644 index dc3f1e49bd..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/include.c +++ /dev/null @@ -1,309 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include - -#include "xkbcomp-priv.h" -#include "include.h" - -/** - * Parse an include statement. Each call returns a file name, along with - * (possibly) a specific map in the file, an explicit group designator, and - * the separator from the next file, used to determine the merge mode. - * - * @param str_inout Input statement, modified in-place. Should be passed in - * repeatedly. If str_inout is NULL, the parsing has completed. - * - * @param file_rtrn Set to the name of the include file to be used. Combined - * with an enum xkb_file_type, this determines which file to look for in the - * include path. - * - * @param map_rtrn Set to the string between '(' and ')', if any. This will - * result in the compilation of a specific named map within the file (e.g. - * xkb_symbols "basic" { ... }) , as opposed to the default map of the file. - * - * @param nextop_rtrn Set to the next operation in the complete statement, - * which is '\0' if it's the last file or '+' or '|' if there are more. - * Separating the files with '+' sets the merge mode to MERGE_MODE_OVERRIDE, - * while '|' sets the merge mode to MERGE_MODE_AUGMENT. - * - * @param extra_data Set to the string after ':', if any. Currently the - * extra data is only used for setting an explicit group index for a symbols - * file. - * - * @return true if parsing was successful, false for an illegal string. - * - * Example: "evdev+aliases(qwerty):2" - * str_inout = "aliases(qwerty):2" - * file_rtrn = "evdev" - * map_rtrn = NULL - * nextop_retrn = "+" - * extra_data = NULL - * - * 2nd run with "aliases(qwerty):2" - * str_inout = NULL - * file_rtrn = "aliases" - * map_rtrn = "qwerty" - * nextop_retrn = "" - * extra_data = "2" - * - */ -bool -ParseIncludeMap(char **str_inout, char **file_rtrn, char **map_rtrn, - char *nextop_rtrn, char **extra_data) -{ - char *tmp, *str, *next; - - str = *str_inout; - - /* - * Find the position in the string where the next file is included, - * if there is more than one left in the statement. - */ - next = strpbrk(str, "|+"); - if (next) { - /* Got more files, this function will be called again. */ - *nextop_rtrn = *next; - /* Separate the string, for strchr etc. to work on this file only. */ - *next++ = '\0'; - } - else { - /* This is the last file in this statement, won't be called again. */ - *nextop_rtrn = '\0'; - next = NULL; - } - - /* - * Search for the explicit group designator, if any. If it's there, - * it goes after the file name and map. - */ - tmp = strchr(str, ':'); - if (tmp != NULL) { - *tmp++ = '\0'; - *extra_data = strdup(tmp); - } - else { - *extra_data = NULL; - } - - /* Look for a map, if any. */ - tmp = strchr(str, '('); - if (tmp == NULL) { - /* No map. */ - *file_rtrn = strdup(str); - *map_rtrn = NULL; - } - else if (str[0] == '(') { - /* Map without file - invalid. */ - free(*extra_data); - return false; - } - else { - /* Got a map; separate the file and the map for the strdup's. */ - *tmp++ = '\0'; - *file_rtrn = strdup(str); - str = tmp; - tmp = strchr(str, ')'); - if (tmp == NULL || tmp[1] != '\0') { - free(*file_rtrn); - free(*extra_data); - return false; - } - *tmp++ = '\0'; - *map_rtrn = strdup(str); - } - - /* Set up the next file for the next call, if any. */ - if (*nextop_rtrn == '\0') - *str_inout = NULL; - else if (*nextop_rtrn == '|' || *nextop_rtrn == '+') - *str_inout = next; - else - return false; - - return true; -} - -static const char *xkb_file_type_include_dirs[_FILE_TYPE_NUM_ENTRIES] = { - [FILE_TYPE_KEYCODES] = "keycodes", - [FILE_TYPE_TYPES] = "types", - [FILE_TYPE_COMPAT] = "compat", - [FILE_TYPE_SYMBOLS] = "symbols", - [FILE_TYPE_GEOMETRY] = "geometry", - [FILE_TYPE_KEYMAP] = "keymap", - [FILE_TYPE_RULES] = "rules", -}; - -/** - * Return the xkb directory based on the type. - */ -static const char * -DirectoryForInclude(enum xkb_file_type type) -{ - if (type >= _FILE_TYPE_NUM_ENTRIES) - return ""; - return xkb_file_type_include_dirs[type]; -} - -FILE * -FindFileInXkbPath(struct xkb_context *ctx, const char *name, - enum xkb_file_type type, char **pathRtrn) -{ - unsigned int i; - FILE *file = NULL; - char *buf = NULL; - const char *typeDir; - size_t buf_size = 0, typeDirLen, name_len; - - typeDir = DirectoryForInclude(type); - typeDirLen = strlen(typeDir); - name_len = strlen(name); - - for (i = 0; i < xkb_context_num_include_paths(ctx); i++) { - size_t new_buf_size = strlen(xkb_context_include_path_get(ctx, i)) + - typeDirLen + name_len + 3; - int ret; - if (new_buf_size > buf_size) { - void *buf_new = realloc(buf, new_buf_size); - if (buf_new) { - buf_size = new_buf_size; - buf = buf_new; - } else { - log_err(ctx, "Cannot realloc for name (%s/%s/%s)\n", - xkb_context_include_path_get(ctx, i), typeDir, name); - continue; - } - } - ret = snprintf(buf, buf_size, "%s/%s/%s", - xkb_context_include_path_get(ctx, i), - typeDir, name); - if (ret < 0) { - log_err(ctx, "snprintf error (%s/%s/%s)\n", - xkb_context_include_path_get(ctx, i), typeDir, name); - continue; - } - - file = fopen(buf, "r"); - if (file) - break; - } - - if (!file) { - log_err(ctx, "Couldn't find file \"%s/%s\" in include paths\n", - typeDir, name); - - if (xkb_context_num_include_paths(ctx) > 0) { - log_err(ctx, "%d include paths searched:\n", - xkb_context_num_include_paths(ctx)); - for (i = 0; i < xkb_context_num_include_paths(ctx); i++) - log_err(ctx, "\t%s\n", - xkb_context_include_path_get(ctx, i)); - } - else { - log_err(ctx, "There are no include paths to search\n"); - } - - if (xkb_context_num_failed_include_paths(ctx) > 0) { - log_err(ctx, "%d include paths could not be added:\n", - xkb_context_num_failed_include_paths(ctx)); - for (i = 0; i < xkb_context_num_failed_include_paths(ctx); i++) - log_err(ctx, "\t%s\n", - xkb_context_failed_include_path_get(ctx, i)); - } - - free(buf); - return NULL; - } - - if (pathRtrn) - *pathRtrn = buf; - else - free(buf); - return file; -} - -XkbFile * -ProcessIncludeFile(struct xkb_context *ctx, IncludeStmt *stmt, - enum xkb_file_type file_type) -{ - FILE *file; - XkbFile *xkb_file; - - file = FindFileInXkbPath(ctx, stmt->file, file_type, NULL); - if (!file) - return false; - - xkb_file = XkbParseFile(ctx, file, stmt->file, stmt->map); - fclose(file); - if (!xkb_file) { - if (stmt->map) - log_err(ctx, "Couldn't process include statement for '%s(%s)'\n", - stmt->file, stmt->map); - else - log_err(ctx, "Couldn't process include statement for '%s'\n", - stmt->file); - return NULL; - } - - if (xkb_file->file_type != file_type) { - log_err(ctx, - "Include file of wrong type (expected %s, got %s); " - "Include file \"%s\" ignored\n", - xkb_file_type_to_string(file_type), - xkb_file_type_to_string(xkb_file->file_type), stmt->file); - FreeXkbFile(xkb_file); - return NULL; - } - - /* FIXME: we have to check recursive includes here (or somewhere) */ - - return xkb_file; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/include.h b/src/3rdparty/xkbcommon/src/xkbcomp/include.h deleted file mode 100644 index 03e76ed5ce..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/include.h +++ /dev/null @@ -1,42 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#ifndef XKBCOMP_INCLUDE_H -#define XKBCOMP_INCLUDE_H - -bool -ParseIncludeMap(char **str_inout, char **file_rtrn, char **map_rtrn, - char *nextop_rtrn, char **extra_data); - -FILE * -FindFileInXkbPath(struct xkb_context *ctx, const char *name, - enum xkb_file_type type, char **pathRtrn); - -XkbFile * -ProcessIncludeFile(struct xkb_context *ctx, IncludeStmt *stmt, - enum xkb_file_type file_type); - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c b/src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c deleted file mode 100644 index 491da51067..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/keycodes.c +++ /dev/null @@ -1,668 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#include "xkbcomp-priv.h" -#include "text.h" -#include "expr.h" -#include "include.h" - -typedef struct { - enum merge_mode merge; - - xkb_atom_t alias; - xkb_atom_t real; -} AliasInfo; - -typedef struct { - enum merge_mode merge; - - xkb_atom_t name; -} LedNameInfo; - -typedef struct { - char *name; - int errorCount; - - xkb_keycode_t min_key_code; - xkb_keycode_t max_key_code; - darray(xkb_atom_t) key_names; - LedNameInfo led_names[XKB_MAX_LEDS]; - unsigned int num_led_names; - darray(AliasInfo) aliases; - - struct xkb_context *ctx; -} KeyNamesInfo; - -/***====================================================================***/ - -static void -InitAliasInfo(AliasInfo *info, enum merge_mode merge, - xkb_atom_t alias, xkb_atom_t real) -{ - memset(info, 0, sizeof(*info)); - info->merge = merge; - info->alias = alias; - info->real = real; -} - -static LedNameInfo * -FindLedByName(KeyNamesInfo *info, xkb_atom_t name, - xkb_led_index_t *idx_out) -{ - for (xkb_led_index_t idx = 0; idx < info->num_led_names; idx++) { - LedNameInfo *ledi = &info->led_names[idx]; - if (ledi->name == name) { - *idx_out = idx; - return ledi; - } - } - - return NULL; -} - -static bool -AddLedName(KeyNamesInfo *info, enum merge_mode merge, bool same_file, - LedNameInfo *new, xkb_led_index_t new_idx) -{ - xkb_led_index_t old_idx; - LedNameInfo *old; - const int verbosity = xkb_context_get_log_verbosity(info->ctx); - const bool report = (same_file && verbosity > 0) || verbosity > 9; - const bool replace = (merge == MERGE_REPLACE || merge == MERGE_OVERRIDE); - - /* LED with the same name already exists. */ - old = FindLedByName(info, new->name, &old_idx); - if (old) { - if (old_idx == new_idx) { - log_warn(info->ctx, - "Multiple indicators named \"%s\"; " - "Identical definitions ignored\n", - xkb_atom_text(info->ctx, new->name)); - return true; - } - - if (report) { - xkb_led_index_t use = (replace ? new_idx + 1 : old_idx + 1); - xkb_led_index_t ignore = (replace ? old_idx + 1 : new_idx + 1); - log_warn(info->ctx, - "Multiple indicators named %s; Using %d, ignoring %d\n", - xkb_atom_text(info->ctx, new->name), use, ignore); - } - - if (replace) - *old = *new; - - return true; - } - - if (new_idx >= info->num_led_names) - info->num_led_names = new_idx + 1; - - /* LED with the same index already exists. */ - old = &info->led_names[new_idx]; - if (old->name != XKB_ATOM_NONE) { - if (report) { - const xkb_atom_t use = (replace ? new->name : old->name); - const xkb_atom_t ignore = (replace ? old->name : new->name); - log_warn(info->ctx, "Multiple names for indicator %d; " - "Using %s, ignoring %s\n", new_idx + 1, - xkb_atom_text(info->ctx, use), - xkb_atom_text(info->ctx, ignore)); - } - - if (replace) - *old = *new; - - return true; - } - - *old = *new; - return true; -} - -static void -ClearKeyNamesInfo(KeyNamesInfo *info) -{ - free(info->name); - darray_free(info->key_names); - darray_free(info->aliases); -} - -static void -InitKeyNamesInfo(KeyNamesInfo *info, struct xkb_context *ctx) -{ - memset(info, 0, sizeof(*info)); - info->ctx = ctx; - info->min_key_code = XKB_KEYCODE_INVALID; -#if XKB_KEYCODE_INVALID < XKB_KEYCODE_MAX -#error "Hey, you can't be changing stuff like that." -#endif -} - -static xkb_keycode_t -FindKeyByName(KeyNamesInfo *info, xkb_atom_t name) -{ - xkb_keycode_t i; - - for (i = info->min_key_code; i <= info->max_key_code; i++) - if (darray_item(info->key_names, i) == name) - return i; - - return XKB_KEYCODE_INVALID; -} - -static bool -AddKeyName(KeyNamesInfo *info, xkb_keycode_t kc, xkb_atom_t name, - enum merge_mode merge, bool same_file, bool report) -{ - xkb_atom_t old_name; - xkb_keycode_t old_kc; - const int verbosity = xkb_context_get_log_verbosity(info->ctx); - - report = report && ((same_file && verbosity > 0) || verbosity > 7); - - if (kc >= darray_size(info->key_names)) - darray_resize0(info->key_names, kc + 1); - - info->min_key_code = MIN(info->min_key_code, kc); - info->max_key_code = MAX(info->max_key_code, kc); - - /* There's already a key with this keycode. */ - old_name = darray_item(info->key_names, kc); - if (old_name != XKB_ATOM_NONE) { - const char *lname = KeyNameText(info->ctx, old_name); - const char *kname = KeyNameText(info->ctx, name); - - if (old_name == name) { - if (report) - log_warn(info->ctx, - "Multiple identical key name definitions; " - "Later occurrences of \"%s = %d\" ignored\n", - lname, kc); - return true; - } - else if (merge == MERGE_AUGMENT) { - if (report) - log_warn(info->ctx, - "Multiple names for keycode %d; " - "Using %s, ignoring %s\n", kc, lname, kname); - return true; - } - else { - if (report) - log_warn(info->ctx, - "Multiple names for keycode %d; " - "Using %s, ignoring %s\n", kc, kname, lname); - darray_item(info->key_names, kc) = XKB_ATOM_NONE; - } - } - - /* There's already a key with this name. */ - old_kc = FindKeyByName(info, name); - if (old_kc != XKB_KEYCODE_INVALID && old_kc != kc) { - const char *kname = KeyNameText(info->ctx, name); - - if (merge == MERGE_OVERRIDE) { - darray_item(info->key_names, old_kc) = XKB_ATOM_NONE; - if (report) - log_warn(info->ctx, - "Key name %s assigned to multiple keys; " - "Using %d, ignoring %d\n", kname, kc, old_kc); - } - else { - if (report) - log_vrb(info->ctx, 3, - "Key name %s assigned to multiple keys; " - "Using %d, ignoring %d\n", kname, old_kc, kc); - return true; - } - } - - darray_item(info->key_names, kc) = name; - return true; -} - -/***====================================================================***/ - -static bool -HandleAliasDef(KeyNamesInfo *info, KeyAliasDef *def, enum merge_mode merge); - -static void -MergeIncludedKeycodes(KeyNamesInfo *into, KeyNamesInfo *from, - enum merge_mode merge) -{ - if (from->errorCount > 0) { - into->errorCount += from->errorCount; - return; - } - - if (into->name == NULL) { - into->name = from->name; - from->name = NULL; - } - - /* Merge key names. */ - if (darray_empty(into->key_names)) { - into->key_names = from->key_names; - darray_init(from->key_names); - into->min_key_code = from->min_key_code; - into->max_key_code = from->max_key_code; - } - else { - if (darray_size(into->key_names) < darray_size(from->key_names)) - darray_resize0(into->key_names, darray_size(from->key_names)); - - for (unsigned i = from->min_key_code; i <= from->max_key_code; i++) { - xkb_atom_t name = darray_item(from->key_names, i); - if (name == XKB_ATOM_NONE) - continue; - - if (!AddKeyName(into, i, name, merge, true, false)) - into->errorCount++; - } - } - - /* Merge key aliases. */ - if (darray_empty(into->aliases)) { - into->aliases = from->aliases; - darray_init(from->aliases); - } - else { - AliasInfo *alias; - - darray_foreach(alias, from->aliases) { - KeyAliasDef def; - - def.merge = (merge == MERGE_DEFAULT ? alias->merge : merge); - def.alias = alias->alias; - def.real = alias->real; - - if (!HandleAliasDef(into, &def, def.merge)) - into->errorCount++; - } - } - - /* Merge LED names. */ - if (into->num_led_names == 0) { - memcpy(into->led_names, from->led_names, - sizeof(*from->led_names) * from->num_led_names); - into->num_led_names = from->num_led_names; - from->num_led_names = 0; - } - else { - for (xkb_led_index_t idx = 0; idx < from->num_led_names; idx++) { - LedNameInfo *ledi = &from->led_names[idx]; - - if (ledi->name == XKB_ATOM_NONE) - continue; - - ledi->merge = (merge == MERGE_DEFAULT ? ledi->merge : merge); - if (!AddLedName(into, ledi->merge, false, ledi, idx)) - into->errorCount++; - } - } -} - -static void -HandleKeycodesFile(KeyNamesInfo *info, XkbFile *file, enum merge_mode merge); - -static bool -HandleIncludeKeycodes(KeyNamesInfo *info, IncludeStmt *include) -{ - KeyNamesInfo included; - - InitKeyNamesInfo(&included, info->ctx); - included.name = include->stmt; - include->stmt = NULL; - - for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) { - KeyNamesInfo next_incl; - XkbFile *file; - - file = ProcessIncludeFile(info->ctx, stmt, FILE_TYPE_KEYCODES); - if (!file) { - info->errorCount += 10; - ClearKeyNamesInfo(&included); - return false; - } - - InitKeyNamesInfo(&next_incl, info->ctx); - - HandleKeycodesFile(&next_incl, file, MERGE_OVERRIDE); - - MergeIncludedKeycodes(&included, &next_incl, stmt->merge); - - ClearKeyNamesInfo(&next_incl); - FreeXkbFile(file); - } - - MergeIncludedKeycodes(info, &included, include->merge); - ClearKeyNamesInfo(&included); - - return (info->errorCount == 0); -} - -static bool -HandleKeycodeDef(KeyNamesInfo *info, KeycodeDef *stmt, enum merge_mode merge) -{ - if (stmt->merge != MERGE_DEFAULT) { - if (stmt->merge == MERGE_REPLACE) - merge = MERGE_OVERRIDE; - else - merge = stmt->merge; - } - - if (stmt->value < 0 || stmt->value > XKB_KEYCODE_MAX) { - log_err(info->ctx, - "Illegal keycode %lld: must be between 0..%u; " - "Key ignored\n", (long long) stmt->value, XKB_KEYCODE_MAX); - return false; - } - - return AddKeyName(info, stmt->value, stmt->name, merge, false, true); -} - -static bool -HandleAliasDef(KeyNamesInfo *info, KeyAliasDef *def, enum merge_mode merge) -{ - AliasInfo *old, new; - - darray_foreach(old, info->aliases) { - if (old->alias == def->alias) { - if (def->real == old->real) { - log_vrb(info->ctx, 1, - "Alias of %s for %s declared more than once; " - "First definition ignored\n", - KeyNameText(info->ctx, def->alias), - KeyNameText(info->ctx, def->real)); - } - else { - xkb_atom_t use, ignore; - - use = (merge == MERGE_AUGMENT ? old->real : def->real); - ignore = (merge == MERGE_AUGMENT ? def->real : old->real); - - log_warn(info->ctx, - "Multiple definitions for alias %s; " - "Using %s, ignoring %s\n", - KeyNameText(info->ctx, old->alias), - KeyNameText(info->ctx, use), - KeyNameText(info->ctx, ignore)); - - old->real = use; - } - - old->merge = merge; - return true; - } - } - - InitAliasInfo(&new, merge, def->alias, def->real); - darray_append(info->aliases, new); - return true; -} - -static bool -HandleKeyNameVar(KeyNamesInfo *info, VarDef *stmt) -{ - const char *elem, *field; - ExprDef *arrayNdx; - - if (!ExprResolveLhs(info->ctx, stmt->name, &elem, &field, &arrayNdx)) - return false; - - if (elem) { - log_err(info->ctx, "Unknown element %s encountered; " - "Default for field %s ignored\n", elem, field); - return false; - } - - if (!istreq(field, "minimum") && !istreq(field, "maximum")) { - log_err(info->ctx, "Unknown field encountered; " - "Assignment to field %s ignored\n", field); - return false; - } - - /* We ignore explicit min/max statements, we always use computed. */ - return true; -} - -static bool -HandleLedNameDef(KeyNamesInfo *info, LedNameDef *def, - enum merge_mode merge) -{ - LedNameInfo ledi; - xkb_atom_t name; - - if (def->ndx < 1 || def->ndx > XKB_MAX_LEDS) { - info->errorCount++; - log_err(info->ctx, - "Illegal indicator index (%d) specified; must be between 1 .. %d; " - "Ignored\n", def->ndx, XKB_MAX_LEDS); - return false; - } - - if (!ExprResolveString(info->ctx, def->name, &name)) { - char buf[20]; - snprintf(buf, sizeof(buf), "%u", def->ndx); - info->errorCount++; - return ReportBadType(info->ctx, "indicator", "name", buf, "string"); - } - - ledi.merge = merge; - ledi.name = name; - return AddLedName(info, merge, true, &ledi, def->ndx - 1); -} - -static void -HandleKeycodesFile(KeyNamesInfo *info, XkbFile *file, enum merge_mode merge) -{ - bool ok; - - free(info->name); - info->name = strdup_safe(file->name); - - for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) { - switch (stmt->type) { - case STMT_INCLUDE: - ok = HandleIncludeKeycodes(info, (IncludeStmt *) stmt); - break; - case STMT_KEYCODE: - ok = HandleKeycodeDef(info, (KeycodeDef *) stmt, merge); - break; - case STMT_ALIAS: - ok = HandleAliasDef(info, (KeyAliasDef *) stmt, merge); - break; - case STMT_VAR: - ok = HandleKeyNameVar(info, (VarDef *) stmt); - break; - case STMT_LED_NAME: - ok = HandleLedNameDef(info, (LedNameDef *) stmt, merge); - break; - default: - log_err(info->ctx, - "Keycode files may define key and indicator names only; " - "Ignoring %s\n", stmt_type_to_string(stmt->type)); - ok = false; - break; - } - - if (!ok) - info->errorCount++; - - if (info->errorCount > 10) { - log_err(info->ctx, "Abandoning keycodes file \"%s\"\n", - file->name); - break; - } - } -} - -/***====================================================================***/ - -static bool -CopyKeyNamesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info) -{ - struct xkb_key *keys; - xkb_keycode_t min_key_code, max_key_code, kc; - - min_key_code = info->min_key_code; - max_key_code = info->max_key_code; - /* If the keymap has no keys, let's just use the safest pair we know. */ - if (min_key_code == XKB_KEYCODE_INVALID) { - min_key_code = 8; - max_key_code = 255; - } - - keys = calloc(max_key_code + 1, sizeof(*keys)); - if (!keys) - return false; - - for (kc = min_key_code; kc <= max_key_code; kc++) - keys[kc].keycode = kc; - - for (kc = info->min_key_code; kc <= info->max_key_code; kc++) - keys[kc].name = darray_item(info->key_names, kc); - - keymap->min_key_code = min_key_code; - keymap->max_key_code = max_key_code; - keymap->keys = keys; - return true; -} - -static bool -CopyKeyAliasesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info) -{ - AliasInfo *alias; - unsigned i, num_key_aliases; - struct xkb_key_alias *key_aliases; - - /* - * Do some sanity checking on the aliases. We can't do it before - * because keys and their aliases may be added out-of-order. - */ - num_key_aliases = 0; - darray_foreach(alias, info->aliases) { - /* Check that ->real is a key. */ - if (!XkbKeyByName(keymap, alias->real, false)) { - log_vrb(info->ctx, 5, - "Attempt to alias %s to non-existent key %s; Ignored\n", - KeyNameText(info->ctx, alias->alias), - KeyNameText(info->ctx, alias->real)); - alias->real = XKB_ATOM_NONE; - continue; - } - - /* Check that ->alias is not a key. */ - if (XkbKeyByName(keymap, alias->alias, false)) { - log_vrb(info->ctx, 5, - "Attempt to create alias with the name of a real key; " - "Alias \"%s = %s\" ignored\n", - KeyNameText(info->ctx, alias->alias), - KeyNameText(info->ctx, alias->real)); - alias->real = XKB_ATOM_NONE; - continue; - } - - num_key_aliases++; - } - - /* Copy key aliases. */ - key_aliases = NULL; - if (num_key_aliases > 0) { - key_aliases = calloc(num_key_aliases, sizeof(*key_aliases)); - if (!key_aliases) - return false; - - i = 0; - darray_foreach(alias, info->aliases) { - if (alias->real != XKB_ATOM_NONE) { - key_aliases[i].alias = alias->alias; - key_aliases[i].real = alias->real; - i++; - } - } - } - - keymap->num_key_aliases = num_key_aliases; - keymap->key_aliases = key_aliases; - return true; -} - -static bool -CopyLedNamesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info) -{ - keymap->num_leds = info->num_led_names; - for (xkb_led_index_t idx = 0; idx < info->num_led_names; idx++) { - LedNameInfo *ledi = &info->led_names[idx]; - - if (ledi->name == XKB_ATOM_NONE) - continue; - - keymap->leds[idx].name = ledi->name; - } - - return true; -} - -static bool -CopyKeyNamesInfoToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info) -{ - /* This function trashes keymap on error, but that's OK. */ - if (!CopyKeyNamesToKeymap(keymap, info) || - !CopyKeyAliasesToKeymap(keymap, info) || - !CopyLedNamesToKeymap(keymap, info)) - return false; - - keymap->keycodes_section_name = strdup_safe(info->name); - XkbEscapeMapName(keymap->keycodes_section_name); - return true; -} - -/***====================================================================***/ - -bool -CompileKeycodes(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge) -{ - KeyNamesInfo info; - - InitKeyNamesInfo(&info, keymap->ctx); - - HandleKeycodesFile(&info, file, merge); - if (info.errorCount != 0) - goto err_info; - - if (!CopyKeyNamesInfoToKeymap(keymap, &info)) - goto err_info; - - ClearKeyNamesInfo(&info); - return true; - -err_info: - ClearKeyNamesInfo(&info); - return false; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c b/src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c deleted file mode 100644 index 2ed591c661..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/keymap-dump.c +++ /dev/null @@ -1,664 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#include "xkbcomp-priv.h" -#include "text.h" - -#define BUF_CHUNK_SIZE 4096 - -struct buf { - char *buf; - size_t size; - size_t alloc; -}; - -static bool -do_realloc(struct buf *buf, size_t at_least) -{ - char *new; - - buf->alloc += BUF_CHUNK_SIZE; - if (at_least >= BUF_CHUNK_SIZE) - buf->alloc += at_least; - - new = realloc(buf->buf, buf->alloc); - if (!new) - return false; - - buf->buf = new; - return true; -} - -ATTR_PRINTF(2, 3) static bool -check_write_buf(struct buf *buf, const char *fmt, ...) -{ - va_list args; - int printed; - size_t available; - - available = buf->alloc - buf->size; - va_start(args, fmt); - printed = vsnprintf(buf->buf + buf->size, available, fmt, args); - va_end(args); - - if (printed < 0) - goto err; - - if ((size_t) printed >= available) - if (!do_realloc(buf, printed)) - goto err; - - /* The buffer has enough space now. */ - - available = buf->alloc - buf->size; - va_start(args, fmt); - printed = vsnprintf(buf->buf + buf->size, available, fmt, args); - va_end(args); - - if (printed < 0 || (size_t) printed >= available) - goto err; - - buf->size += printed; - return true; - -err: - free(buf->buf); - buf->buf = NULL; - return false; -} - -#define write_buf(buf, ...) do { \ - if (!check_write_buf(buf, __VA_ARGS__)) \ - return false; \ -} while (0) - -static bool -write_vmods(struct xkb_keymap *keymap, struct buf *buf) -{ - const struct xkb_mod *mod; - xkb_mod_index_t num_vmods = 0; - - xkb_mods_foreach(mod, &keymap->mods) { - if (mod->type != MOD_VIRT) - continue; - - if (num_vmods == 0) - write_buf(buf, "\tvirtual_modifiers "); - else - write_buf(buf, ","); - write_buf(buf, "%s", xkb_atom_text(keymap->ctx, mod->name)); - num_vmods++; - } - - if (num_vmods > 0) - write_buf(buf, ";\n\n"); - - return true; -} - -static bool -write_keycodes(struct xkb_keymap *keymap, struct buf *buf) -{ - const struct xkb_key *key; - xkb_led_index_t idx; - const struct xkb_led *led; - - if (keymap->keycodes_section_name) - write_buf(buf, "xkb_keycodes \"%s\" {\n", - keymap->keycodes_section_name); - else - write_buf(buf, "xkb_keycodes {\n"); - - /* xkbcomp and X11 really want to see keymaps with a minimum of 8, and - * a maximum of at least 255, else XWayland really starts hating life. - * If this is a problem and people really need strictly bounded keymaps, - * we should probably control this with a flag. */ - write_buf(buf, "\tminimum = %u;\n", min(keymap->min_key_code, 8)); - write_buf(buf, "\tmaximum = %u;\n", max(keymap->max_key_code, 255)); - - xkb_keys_foreach(key, keymap) { - if (key->name == XKB_ATOM_NONE) - continue; - - write_buf(buf, "\t%-20s = %u;\n", - KeyNameText(keymap->ctx, key->name), key->keycode); - } - - xkb_leds_enumerate(idx, led, keymap) - if (led->name != XKB_ATOM_NONE) - write_buf(buf, "\tindicator %u = \"%s\";\n", - idx + 1, xkb_atom_text(keymap->ctx, led->name)); - - - for (unsigned i = 0; i < keymap->num_key_aliases; i++) - write_buf(buf, "\talias %-14s = %s;\n", - KeyNameText(keymap->ctx, keymap->key_aliases[i].alias), - KeyNameText(keymap->ctx, keymap->key_aliases[i].real)); - - write_buf(buf, "};\n\n"); - return true; -} - -static bool -write_types(struct xkb_keymap *keymap, struct buf *buf) -{ - if (keymap->types_section_name) - write_buf(buf, "xkb_types \"%s\" {\n", - keymap->types_section_name); - else - write_buf(buf, "xkb_types {\n"); - - write_vmods(keymap, buf); - - for (unsigned i = 0; i < keymap->num_types; i++) { - const struct xkb_key_type *type = &keymap->types[i]; - - write_buf(buf, "\ttype \"%s\" {\n", - xkb_atom_text(keymap->ctx, type->name)); - - write_buf(buf, "\t\tmodifiers= %s;\n", - ModMaskText(keymap->ctx, &keymap->mods, type->mods.mods)); - - for (unsigned j = 0; j < type->num_entries; j++) { - const char *str; - const struct xkb_key_type_entry *entry = &type->entries[j]; - - /* - * Printing level 1 entries is redundant, it's the default, - * unless there's preserve info. - */ - if (entry->level == 0 && entry->preserve.mods == 0) - continue; - - str = ModMaskText(keymap->ctx, &keymap->mods, entry->mods.mods); - write_buf(buf, "\t\tmap[%s]= Level%u;\n", - str, entry->level + 1); - - if (entry->preserve.mods) - write_buf(buf, "\t\tpreserve[%s]= %s;\n", - str, ModMaskText(keymap->ctx, &keymap->mods, - entry->preserve.mods)); - } - - for (xkb_level_index_t n = 0; n < type->num_level_names; n++) - if (type->level_names[n]) - write_buf(buf, "\t\tlevel_name[Level%u]= \"%s\";\n", n + 1, - xkb_atom_text(keymap->ctx, type->level_names[n])); - - write_buf(buf, "\t};\n"); - } - - write_buf(buf, "};\n\n"); - return true; -} - -static bool -write_led_map(struct xkb_keymap *keymap, struct buf *buf, - const struct xkb_led *led) -{ - write_buf(buf, "\tindicator \"%s\" {\n", - xkb_atom_text(keymap->ctx, led->name)); - - if (led->which_groups) { - if (led->which_groups != XKB_STATE_LAYOUT_EFFECTIVE) { - write_buf(buf, "\t\twhichGroupState= %s;\n", - LedStateMaskText(keymap->ctx, led->which_groups)); - } - write_buf(buf, "\t\tgroups= 0x%02x;\n", - led->groups); - } - - if (led->which_mods) { - if (led->which_mods != XKB_STATE_MODS_EFFECTIVE) { - write_buf(buf, "\t\twhichModState= %s;\n", - LedStateMaskText(keymap->ctx, led->which_mods)); - } - write_buf(buf, "\t\tmodifiers= %s;\n", - ModMaskText(keymap->ctx, &keymap->mods, led->mods.mods)); - } - - if (led->ctrls) { - write_buf(buf, "\t\tcontrols= %s;\n", - ControlMaskText(keymap->ctx, led->ctrls)); - } - - write_buf(buf, "\t};\n"); - return true; -} - -static const char * -affect_lock_text(enum xkb_action_flags flags) -{ - switch (flags & (ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK)) { - case ACTION_LOCK_NO_UNLOCK: - return ",affect=lock"; - case ACTION_LOCK_NO_LOCK: - return ",affect=unlock"; - case ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK: - return ",affect=neither"; - } - return ""; -} - -static bool -write_action(struct xkb_keymap *keymap, struct buf *buf, - const union xkb_action *action, - const char *prefix, const char *suffix) -{ - const char *type; - const char *args = NULL; - - if (!prefix) - prefix = ""; - if (!suffix) - suffix = ""; - - type = ActionTypeText(action->type); - - switch (action->type) { - case ACTION_TYPE_MOD_SET: - case ACTION_TYPE_MOD_LATCH: - case ACTION_TYPE_MOD_LOCK: - if (action->mods.flags & ACTION_MODS_LOOKUP_MODMAP) - args = "modMapMods"; - else - args = ModMaskText(keymap->ctx, &keymap->mods, - action->mods.mods.mods); - write_buf(buf, "%s%s(modifiers=%s%s%s%s)%s", prefix, type, args, - (action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LOCK_CLEAR)) ? ",clearLocks" : "", - (action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LATCH_TO_LOCK)) ? ",latchToLock" : "", - (action->type == ACTION_TYPE_MOD_LOCK) ? affect_lock_text(action->mods.flags) : "", - suffix); - break; - - case ACTION_TYPE_GROUP_SET: - case ACTION_TYPE_GROUP_LATCH: - case ACTION_TYPE_GROUP_LOCK: - write_buf(buf, "%s%s(group=%s%d%s%s)%s", prefix, type, - (!(action->group.flags & ACTION_ABSOLUTE_SWITCH) && action->group.group > 0) ? "+" : "", - (action->group.flags & ACTION_ABSOLUTE_SWITCH) ? action->group.group + 1 : action->group.group, - (action->type != ACTION_TYPE_GROUP_LOCK && (action->group.flags & ACTION_LOCK_CLEAR)) ? ",clearLocks" : "", - (action->type != ACTION_TYPE_GROUP_LOCK && (action->group.flags & ACTION_LATCH_TO_LOCK)) ? ",latchToLock" : "", - suffix); - break; - - case ACTION_TYPE_TERMINATE: - write_buf(buf, "%s%s()%s", prefix, type, suffix); - break; - - case ACTION_TYPE_PTR_MOVE: - write_buf(buf, "%s%s(x=%s%d,y=%s%d%s)%s", prefix, type, - (!(action->ptr.flags & ACTION_ABSOLUTE_X) && action->ptr.x >= 0) ? "+" : "", - action->ptr.x, - (!(action->ptr.flags & ACTION_ABSOLUTE_Y) && action->ptr.y >= 0) ? "+" : "", - action->ptr.y, - (action->ptr.flags & ACTION_ACCEL) ? "" : ",!accel", - suffix); - break; - - case ACTION_TYPE_PTR_LOCK: - args = affect_lock_text(action->btn.flags); - /* fallthrough */ - case ACTION_TYPE_PTR_BUTTON: - write_buf(buf, "%s%s(button=", prefix, type); - if (action->btn.button > 0 && action->btn.button <= 5) - write_buf(buf, "%d", action->btn.button); - else - write_buf(buf, "default"); - if (action->btn.count) - write_buf(buf, ",count=%d", action->btn.count); - if (args) - write_buf(buf, "%s", args); - write_buf(buf, ")%s", suffix); - break; - - case ACTION_TYPE_PTR_DEFAULT: - write_buf(buf, "%s%s(", prefix, type); - write_buf(buf, "affect=button,button=%s%d", - (!(action->dflt.flags & ACTION_ABSOLUTE_SWITCH) && action->dflt.value >= 0) ? "+" : "", - action->dflt.value); - write_buf(buf, ")%s", suffix); - break; - - case ACTION_TYPE_SWITCH_VT: - write_buf(buf, "%s%s(screen=%s%d,%ssame)%s", prefix, type, - (!(action->screen.flags & ACTION_ABSOLUTE_SWITCH) && action->screen.screen >= 0) ? "+" : "", - action->screen.screen, - (action->screen.flags & ACTION_SAME_SCREEN) ? "" : "!", - suffix); - break; - - case ACTION_TYPE_CTRL_SET: - case ACTION_TYPE_CTRL_LOCK: - write_buf(buf, "%s%s(controls=%s%s)%s", prefix, type, - ControlMaskText(keymap->ctx, action->ctrls.ctrls), - (action->type == ACTION_TYPE_CTRL_LOCK) ? affect_lock_text(action->ctrls.flags) : "", - suffix); - break; - - case ACTION_TYPE_NONE: - write_buf(buf, "%sNoAction()%s", prefix, suffix); - break; - - default: - write_buf(buf, - "%s%s(type=0x%02x,data[0]=0x%02x,data[1]=0x%02x,data[2]=0x%02x,data[3]=0x%02x,data[4]=0x%02x,data[5]=0x%02x,data[6]=0x%02x)%s", - prefix, type, action->type, action->priv.data[0], - action->priv.data[1], action->priv.data[2], - action->priv.data[3], action->priv.data[4], - action->priv.data[5], action->priv.data[6], - suffix); - break; - } - - return true; -} - -static bool -write_compat(struct xkb_keymap *keymap, struct buf *buf) -{ - const struct xkb_led *led; - - if (keymap->compat_section_name) - write_buf(buf, "xkb_compatibility \"%s\" {\n", - keymap->compat_section_name); - else - write_buf(buf, "xkb_compatibility {\n"); - - write_vmods(keymap, buf); - - write_buf(buf, "\tinterpret.useModMapMods= AnyLevel;\n"); - write_buf(buf, "\tinterpret.repeat= False;\n"); - - for (unsigned i = 0; i < keymap->num_sym_interprets; i++) { - const struct xkb_sym_interpret *si = &keymap->sym_interprets[i]; - - write_buf(buf, "\tinterpret %s+%s(%s) {\n", - si->sym ? KeysymText(keymap->ctx, si->sym) : "Any", - SIMatchText(si->match), - ModMaskText(keymap->ctx, &keymap->mods, si->mods)); - - if (si->virtual_mod != XKB_MOD_INVALID) - write_buf(buf, "\t\tvirtualModifier= %s;\n", - ModIndexText(keymap->ctx, &keymap->mods, - si->virtual_mod)); - - if (si->level_one_only) - write_buf(buf, "\t\tuseModMapMods=level1;\n"); - - if (si->repeat) - write_buf(buf, "\t\trepeat= True;\n"); - - write_action(keymap, buf, &si->action, "\t\taction= ", ";\n"); - write_buf(buf, "\t};\n"); - } - - xkb_leds_foreach(led, keymap) - if (led->which_groups || led->groups || led->which_mods || - led->mods.mods || led->ctrls) - write_led_map(keymap, buf, led); - - write_buf(buf, "};\n\n"); - - return true; -} - -static bool -write_keysyms(struct xkb_keymap *keymap, struct buf *buf, - const struct xkb_key *key, xkb_layout_index_t group) -{ - for (xkb_level_index_t level = 0; level < XkbKeyNumLevels(key, group); - level++) { - const xkb_keysym_t *syms; - int num_syms; - - if (level != 0) - write_buf(buf, ", "); - - num_syms = xkb_keymap_key_get_syms_by_level(keymap, key->keycode, - group, level, &syms); - if (num_syms == 0) { - write_buf(buf, "%15s", "NoSymbol"); - } - else if (num_syms == 1) { - write_buf(buf, "%15s", KeysymText(keymap->ctx, syms[0])); - } - else { - write_buf(buf, "{ "); - for (int s = 0; s < num_syms; s++) { - if (s != 0) - write_buf(buf, ", "); - write_buf(buf, "%s", KeysymText(keymap->ctx, syms[s])); - } - write_buf(buf, " }"); - } - } - - return true; -} - -static bool -write_key(struct xkb_keymap *keymap, struct buf *buf, - const struct xkb_key *key) -{ - xkb_layout_index_t group; - bool simple = true; - bool explicit_types = false; - bool multi_type = false; - bool show_actions; - - write_buf(buf, "\tkey %-20s {", KeyNameText(keymap->ctx, key->name)); - - for (group = 0; group < key->num_groups; group++) { - if (key->groups[group].explicit_type) - explicit_types = true; - - if (group != 0 && key->groups[group].type != key->groups[0].type) - multi_type = true; - } - - if (explicit_types) { - const struct xkb_key_type *type; - simple = false; - - if (multi_type) { - for (group = 0; group < key->num_groups; group++) { - if (!key->groups[group].explicit_type) - continue; - - type = key->groups[group].type; - write_buf(buf, "\n\t\ttype[group%u]= \"%s\",", - group + 1, - xkb_atom_text(keymap->ctx, type->name)); - } - } - else { - type = key->groups[0].type; - write_buf(buf, "\n\t\ttype= \"%s\",", - xkb_atom_text(keymap->ctx, type->name)); - } - } - - if (key->explicit & EXPLICIT_REPEAT) { - if (key->repeats) - write_buf(buf, "\n\t\trepeat= Yes,"); - else - write_buf(buf, "\n\t\trepeat= No,"); - simple = false; - } - - if (key->vmodmap && (key->explicit & EXPLICIT_VMODMAP)) - write_buf(buf, "\n\t\tvirtualMods= %s,", - ModMaskText(keymap->ctx, &keymap->mods, key->vmodmap)); - - switch (key->out_of_range_group_action) { - case RANGE_SATURATE: - write_buf(buf, "\n\t\tgroupsClamp,"); - break; - - case RANGE_REDIRECT: - write_buf(buf, "\n\t\tgroupsRedirect= Group%u,", - key->out_of_range_group_number + 1); - break; - - default: - break; - } - - show_actions = (key->explicit & EXPLICIT_INTERP); - - if (key->num_groups > 1 || show_actions) - simple = false; - - if (simple) { - write_buf(buf, "\t[ "); - if (!write_keysyms(keymap, buf, key, 0)) - return false; - write_buf(buf, " ] };\n"); - } - else { - xkb_level_index_t level; - - for (group = 0; group < key->num_groups; group++) { - if (group != 0) - write_buf(buf, ","); - write_buf(buf, "\n\t\tsymbols[Group%u]= [ ", group + 1); - if (!write_keysyms(keymap, buf, key, group)) - return false; - write_buf(buf, " ]"); - if (show_actions) { - write_buf(buf, ",\n\t\tactions[Group%u]= [ ", group + 1); - for (level = 0; level < XkbKeyNumLevels(key, group); level++) { - if (level != 0) - write_buf(buf, ", "); - write_action(keymap, buf, - &key->groups[group].levels[level].action, - NULL, NULL); - } - write_buf(buf, " ]"); - } - } - write_buf(buf, "\n\t};\n"); - } - - return true; -} - -static bool -write_symbols(struct xkb_keymap *keymap, struct buf *buf) -{ - const struct xkb_key *key; - xkb_layout_index_t group; - xkb_mod_index_t i; - const struct xkb_mod *mod; - - if (keymap->symbols_section_name) - write_buf(buf, "xkb_symbols \"%s\" {\n", - keymap->symbols_section_name); - else - write_buf(buf, "xkb_symbols {\n"); - - for (group = 0; group < keymap->num_group_names; group++) - if (keymap->group_names[group]) - write_buf(buf, - "\tname[group%u]=\"%s\";\n", group + 1, - xkb_atom_text(keymap->ctx, keymap->group_names[group])); - if (group > 0) - write_buf(buf, "\n"); - - xkb_keys_foreach(key, keymap) - if (key->num_groups > 0) - write_key(keymap, buf, key); - - xkb_mods_enumerate(i, mod, &keymap->mods) { - bool had_any = false; - xkb_keys_foreach(key, keymap) { - if (key->modmap & (1u << i)) { - if (!had_any) - write_buf(buf, "\tmodifier_map %s { ", - xkb_atom_text(keymap->ctx, mod->name)); - write_buf(buf, "%s%s", - had_any ? ", " : "", - KeyNameText(keymap->ctx, key->name)); - had_any = true; - } - } - if (had_any) - write_buf(buf, " };\n"); - } - - write_buf(buf, "};\n\n"); - return true; -} - -static bool -write_keymap(struct xkb_keymap *keymap, struct buf *buf) -{ - return (check_write_buf(buf, "xkb_keymap {\n") && - write_keycodes(keymap, buf) && - write_types(keymap, buf) && - write_compat(keymap, buf) && - write_symbols(keymap, buf) && - check_write_buf(buf, "};\n")); -} - -char * -text_v1_keymap_get_as_string(struct xkb_keymap *keymap) -{ - struct buf buf = { NULL, 0, 0 }; - - if (!write_keymap(keymap, &buf)) { - free(buf.buf); - return NULL; - } - - return buf.buf; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/keywords.c b/src/3rdparty/xkbcommon/src/xkbcomp/keywords.c deleted file mode 100644 index abab7fe266..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/keywords.c +++ /dev/null @@ -1,348 +0,0 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf */ -/* Computed positions: -k'1-2,5' */ - -#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -/* The character set is not based on ISO-646. */ -#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -#endif - - -#include "xkbcomp-priv.h" -#include "parser-priv.h" - -static unsigned int -keyword_gperf_hash(const char *str, unsigned int len); - -static const struct keyword_tok * -keyword_gperf_lookup(const char *str, unsigned int len); -struct keyword_tok { int name; int tok; }; -#include -/* maximum key range = 70, duplicates = 0 */ - -#ifndef GPERF_DOWNCASE -#define GPERF_DOWNCASE 1 -static unsigned char gperf_downcase[256] = - { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, - 255 - }; -#endif - -#ifndef GPERF_CASE_STRCMP -#define GPERF_CASE_STRCMP 1 -static int -gperf_case_strcmp (register const char *s1, register const char *s2) -{ - for (;;) - { - unsigned char c1 = gperf_downcase[(unsigned char)*s1++]; - unsigned char c2 = gperf_downcase[(unsigned char)*s2++]; - if (c1 != 0 && c1 == c2) - continue; - return (int)c1 - (int)c2; - } -} -#endif - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static unsigned int -keyword_gperf_hash (register const char *str, register unsigned int len) -{ - static const unsigned char asso_values[] = - { - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 0, 73, 5, 36, 0, - 10, 1, 15, 15, 73, 0, 10, 20, 35, 20, - 50, 73, 10, 10, 5, 0, 15, 73, 0, 15, - 73, 73, 73, 73, 73, 73, 73, 0, 73, 5, - 36, 0, 10, 1, 15, 15, 73, 0, 10, 20, - 35, 20, 50, 73, 10, 10, 5, 0, 15, 73, - 0, 15, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73 - }; - register int hval = len; - - switch (hval) - { - default: - hval += asso_values[(unsigned char)str[4]]; - /*FALLTHROUGH*/ - case 4: - case 3: - case 2: - hval += asso_values[(unsigned char)str[1]]; - /*FALLTHROUGH*/ - case 1: - hval += asso_values[(unsigned char)str[0]]; - break; - } - return hval; -} - -struct stringpool_t - { - char stringpool_str3[sizeof("key")]; - char stringpool_str4[sizeof("keys")]; - char stringpool_str7[sizeof("augment")]; - char stringpool_str9[sizeof("text")]; - char stringpool_str10[sizeof("xkb_keymap")]; - char stringpool_str11[sizeof("keypad_keys")]; - char stringpool_str12[sizeof("xkb_keycodes")]; - char stringpool_str13[sizeof("xkb_geometry")]; - char stringpool_str14[sizeof("xkb_types")]; - char stringpool_str15[sizeof("xkb_compat")]; - char stringpool_str17[sizeof("replace")]; - char stringpool_str19[sizeof("xkb_compat_map")]; - char stringpool_str20[sizeof("xkb_layout")]; - char stringpool_str21[sizeof("xkb_symbols")]; - char stringpool_str22[sizeof("xkb_compatibility")]; - char stringpool_str23[sizeof("xkb_semantics")]; - char stringpool_str24[sizeof("type")]; - char stringpool_str25[sizeof("alias")]; - char stringpool_str26[sizeof("xkb_compatibility_map")]; - char stringpool_str27[sizeof("alphanumeric_keys")]; - char stringpool_str28[sizeof("function_keys")]; - char stringpool_str29[sizeof("alternate")]; - char stringpool_str30[sizeof("shape")]; - char stringpool_str31[sizeof("action")]; - char stringpool_str32[sizeof("section")]; - char stringpool_str33[sizeof("row")]; - char stringpool_str34[sizeof("logo")]; - char stringpool_str35[sizeof("alternate_group")]; - char stringpool_str36[sizeof("hidden")]; - char stringpool_str37[sizeof("virtual")]; - char stringpool_str42[sizeof("outline")]; - char stringpool_str43[sizeof("default")]; - char stringpool_str46[sizeof("modmap")]; - char stringpool_str47[sizeof("virtual_modifiers")]; - char stringpool_str52[sizeof("overlay")]; - char stringpool_str53[sizeof("override")]; - char stringpool_str57[sizeof("include")]; - char stringpool_str62[sizeof("modifier_map")]; - char stringpool_str63[sizeof("modifier_keys")]; - char stringpool_str64[sizeof("indicator")]; - char stringpool_str66[sizeof("group")]; - char stringpool_str67[sizeof("mod_map")]; - char stringpool_str69[sizeof("interpret")]; - char stringpool_str71[sizeof("solid")]; - char stringpool_str72[sizeof("partial")]; - }; -static const struct stringpool_t stringpool_contents = - { - "key", - "keys", - "augment", - "text", - "xkb_keymap", - "keypad_keys", - "xkb_keycodes", - "xkb_geometry", - "xkb_types", - "xkb_compat", - "replace", - "xkb_compat_map", - "xkb_layout", - "xkb_symbols", - "xkb_compatibility", - "xkb_semantics", - "type", - "alias", - "xkb_compatibility_map", - "alphanumeric_keys", - "function_keys", - "alternate", - "shape", - "action", - "section", - "row", - "logo", - "alternate_group", - "hidden", - "virtual", - "outline", - "default", - "modmap", - "virtual_modifiers", - "overlay", - "override", - "include", - "modifier_map", - "modifier_keys", - "indicator", - "group", - "mod_map", - "interpret", - "solid", - "partial" - }; -#define stringpool ((const char *) &stringpool_contents) -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif -const struct keyword_tok * -keyword_gperf_lookup (register const char *str, register unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 45, - MIN_WORD_LENGTH = 3, - MAX_WORD_LENGTH = 21, - MIN_HASH_VALUE = 3, - MAX_HASH_VALUE = 72 - }; - - static const struct keyword_tok wordlist[] = - { - {-1}, {-1}, {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str3, KEY}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str4, KEYS}, - {-1}, {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str7, AUGMENT}, - {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str9, TEXT}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str10, XKB_KEYMAP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str11, KEYPAD_KEYS}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str12, XKB_KEYCODES}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str13, XKB_GEOMETRY}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str14, XKB_TYPES}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str15, XKB_COMPATMAP}, - {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str17, REPLACE}, - {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str19, XKB_COMPATMAP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str20, XKB_LAYOUT}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str21, XKB_SYMBOLS}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str22, XKB_COMPATMAP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str23, XKB_SEMANTICS}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str24, TYPE}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str25, ALIAS}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str26, XKB_COMPATMAP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str27, ALPHANUMERIC_KEYS}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str28, FUNCTION_KEYS}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str29, ALTERNATE}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str30, SHAPE}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str31, ACTION_TOK}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str32, SECTION}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str33, ROW}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str34, LOGO}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str35, ALTERNATE_GROUP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str36, HIDDEN}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str37, VIRTUAL}, - {-1}, {-1}, {-1}, {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str42, OUTLINE}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str43, DEFAULT}, - {-1}, {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str46, MODIFIER_MAP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str47, VIRTUAL_MODS}, - {-1}, {-1}, {-1}, {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str52, OVERLAY}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str53, OVERRIDE}, - {-1}, {-1}, {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str57, INCLUDE}, - {-1}, {-1}, {-1}, {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str62, MODIFIER_MAP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str63, MODIFIER_KEYS}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str64, INDICATOR}, - {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str66, GROUP}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str67, MODIFIER_MAP}, - {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str69, INTERPRET}, - {-1}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str71, SOLID}, - {(int)(long)&((struct stringpool_t *)0)->stringpool_str72, PARTIAL} - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = keyword_gperf_hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - { - register int o = wordlist[key].name; - if (o >= 0) - { - register const char *s = o + stringpool; - - if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strcmp (str, s)) - return &wordlist[key]; - } - } - } - return 0; -} - - -int -keyword_to_token(const char *string, unsigned int len) -{ - const struct keyword_tok *kt = keyword_gperf_lookup(string, len); - if (!kt) - return -1; - return kt->tok; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h b/src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h deleted file mode 100644 index 76b5047eb6..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/parser-priv.h +++ /dev/null @@ -1,44 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#ifndef XKBCOMP_PARSER_PRIV_H -#define XKBCOMP_PARSER_PRIV_H - -struct parser_param; -struct scanner; - -#include "parser.h" - -int -_xkbcommon_lex(YYSTYPE *yylval, struct scanner *scanner); - -XkbFile * -parse(struct xkb_context *ctx, struct scanner *scanner, const char *map); - -int -keyword_to_token(const char *string, unsigned int len); - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/parser.h b/src/3rdparty/xkbcommon/src/xkbcomp/parser.h deleted file mode 100644 index 655eca3133..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/parser.h +++ /dev/null @@ -1,157 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY__XKBCOMMON_XKBCOMMON_INTERNAL_STA_PARSER_H_INCLUDED -# define YY__XKBCOMMON_XKBCOMMON_INTERNAL_STA_PARSER_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int _xkbcommon_debug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - END_OF_FILE = 0, - ERROR_TOK = 255, - XKB_KEYMAP = 1, - XKB_KEYCODES = 2, - XKB_TYPES = 3, - XKB_SYMBOLS = 4, - XKB_COMPATMAP = 5, - XKB_GEOMETRY = 6, - XKB_SEMANTICS = 7, - XKB_LAYOUT = 8, - INCLUDE = 10, - OVERRIDE = 11, - AUGMENT = 12, - REPLACE = 13, - ALTERNATE = 14, - VIRTUAL_MODS = 20, - TYPE = 21, - INTERPRET = 22, - ACTION_TOK = 23, - KEY = 24, - ALIAS = 25, - GROUP = 26, - MODIFIER_MAP = 27, - INDICATOR = 28, - SHAPE = 29, - KEYS = 30, - ROW = 31, - SECTION = 32, - OVERLAY = 33, - TEXT = 34, - OUTLINE = 35, - SOLID = 36, - LOGO = 37, - VIRTUAL = 38, - EQUALS = 40, - PLUS = 41, - MINUS = 42, - DIVIDE = 43, - TIMES = 44, - OBRACE = 45, - CBRACE = 46, - OPAREN = 47, - CPAREN = 48, - OBRACKET = 49, - CBRACKET = 50, - DOT = 51, - COMMA = 52, - SEMI = 53, - EXCLAM = 54, - INVERT = 55, - STRING = 60, - INTEGER = 61, - FLOAT = 62, - IDENT = 63, - KEYNAME = 64, - PARTIAL = 70, - DEFAULT = 71, - HIDDEN = 72, - ALPHANUMERIC_KEYS = 73, - MODIFIER_KEYS = 74, - KEYPAD_KEYS = 75, - FUNCTION_KEYS = 76, - ALTERNATE_GROUP = 77 - }; -#endif - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 162 "../src/xkbcomp/parser.y" /* yacc.c:1909 */ - - int ival; - int64_t num; - enum xkb_file_type file_type; - char *str; - xkb_atom_t atom; - enum merge_mode merge; - enum xkb_map_flags mapFlags; - xkb_keysym_t keysym; - ParseCommon *any; - ExprDef *expr; - VarDef *var; - VModDef *vmod; - InterpDef *interp; - KeyTypeDef *keyType; - SymbolsDef *syms; - ModMapDef *modMask; - GroupCompatDef *groupCompat; - LedMapDef *ledMap; - LedNameDef *ledName; - KeycodeDef *keyCode; - KeyAliasDef *keyAlias; - void *geom; - XkbFile *file; - -#line 146 "xkbcommon-internal@sta/parser.h" /* yacc.c:1909 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -int _xkbcommon_parse (struct parser_param *param); - -#endif /* !YY__XKBCOMMON_XKBCOMMON_INTERNAL_STA_PARSER_H_INCLUDED */ diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/rules.c b/src/3rdparty/xkbcommon/src/xkbcomp/rules.c deleted file mode 100644 index 2a364c8aed..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/rules.c +++ /dev/null @@ -1,1037 +0,0 @@ -/************************************************************ - * Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "xkbcomp-priv.h" -#include "rules.h" -#include "include.h" -#include "scanner-utils.h" - -/* Scanner / Lexer */ - -/* Values returned with some tokens, like yylval. */ -union lvalue { - struct sval string; -}; - -enum rules_token { - TOK_END_OF_FILE = 0, - TOK_END_OF_LINE, - TOK_IDENTIFIER, - TOK_GROUP_NAME, - TOK_BANG, - TOK_EQUALS, - TOK_STAR, - TOK_ERROR -}; - -static inline bool -is_ident(char ch) -{ - return is_graph(ch) && ch != '\\'; -} - -static enum rules_token -lex(struct scanner *s, union lvalue *val) -{ -skip_more_whitespace_and_comments: - /* Skip spaces. */ - while (chr(s, ' ') || chr(s, '\t')); - - /* Skip comments. */ - if (lit(s, "//")) { - skip_to_eol(s); - } - - /* New line. */ - if (eol(s)) { - while (eol(s)) next(s); - return TOK_END_OF_LINE; - } - - /* Escaped line continuation. */ - if (chr(s, '\\')) { - if (!eol(s)) { - scanner_err(s, "illegal new line escape; must appear at end of line"); - return TOK_ERROR; - } - next(s); - goto skip_more_whitespace_and_comments; - } - - /* See if we're done. */ - if (eof(s)) return TOK_END_OF_FILE; - - /* New token. */ - s->token_line = s->line; - s->token_column = s->column; - - /* Operators and punctuation. */ - if (chr(s, '!')) return TOK_BANG; - if (chr(s, '=')) return TOK_EQUALS; - if (chr(s, '*')) return TOK_STAR; - - /* Group name. */ - if (chr(s, '$')) { - val->string.start = s->s + s->pos; - val->string.len = 0; - while (is_ident(peek(s))) { - next(s); - val->string.len++; - } - if (val->string.len == 0) { - scanner_err(s, "unexpected character after \'$\'; expected name"); - return TOK_ERROR; - } - return TOK_GROUP_NAME; - } - - /* Identifier. */ - if (is_ident(peek(s))) { - val->string.start = s->s + s->pos; - val->string.len = 0; - while (is_ident(peek(s))) { - next(s); - val->string.len++; - } - return TOK_IDENTIFIER; - } - - scanner_err(s, "unrecognized token"); - return TOK_ERROR; -} - -/***====================================================================***/ - -enum rules_mlvo { - MLVO_MODEL, - MLVO_LAYOUT, - MLVO_VARIANT, - MLVO_OPTION, - _MLVO_NUM_ENTRIES -}; - -#define SVAL_LIT(literal) { literal, sizeof(literal) - 1 } - -static const struct sval rules_mlvo_svals[_MLVO_NUM_ENTRIES] = { - [MLVO_MODEL] = SVAL_LIT("model"), - [MLVO_LAYOUT] = SVAL_LIT("layout"), - [MLVO_VARIANT] = SVAL_LIT("variant"), - [MLVO_OPTION] = SVAL_LIT("option"), -}; - -enum rules_kccgst { - KCCGST_KEYCODES, - KCCGST_TYPES, - KCCGST_COMPAT, - KCCGST_SYMBOLS, - KCCGST_GEOMETRY, - _KCCGST_NUM_ENTRIES -}; - -static const struct sval rules_kccgst_svals[_KCCGST_NUM_ENTRIES] = { - [KCCGST_KEYCODES] = SVAL_LIT("keycodes"), - [KCCGST_TYPES] = SVAL_LIT("types"), - [KCCGST_COMPAT] = SVAL_LIT("compat"), - [KCCGST_SYMBOLS] = SVAL_LIT("symbols"), - [KCCGST_GEOMETRY] = SVAL_LIT("geometry"), -}; - -/* We use this to keep score whether an mlvo was matched or not; if not, - * we warn the user that his preference was ignored. */ -struct matched_sval { - struct sval sval; - bool matched; -}; -typedef darray(struct matched_sval) darray_matched_sval; - -/* - * A broken-down version of xkb_rule_names (without the rules, - * obviously). - */ -struct rule_names { - struct matched_sval model; - darray_matched_sval layouts; - darray_matched_sval variants; - darray_matched_sval options; -}; - -struct group { - struct sval name; - darray_sval elements; -}; - -struct mapping { - int mlvo_at_pos[_MLVO_NUM_ENTRIES]; - unsigned int num_mlvo; - unsigned int defined_mlvo_mask; - xkb_layout_index_t layout_idx, variant_idx; - int kccgst_at_pos[_KCCGST_NUM_ENTRIES]; - unsigned int num_kccgst; - unsigned int defined_kccgst_mask; - bool skip; -}; - -enum mlvo_match_type { - MLVO_MATCH_NORMAL = 0, - MLVO_MATCH_WILDCARD, - MLVO_MATCH_GROUP, -}; - -struct rule { - struct sval mlvo_value_at_pos[_MLVO_NUM_ENTRIES]; - enum mlvo_match_type match_type_at_pos[_MLVO_NUM_ENTRIES]; - unsigned int num_mlvo_values; - struct sval kccgst_value_at_pos[_KCCGST_NUM_ENTRIES]; - unsigned int num_kccgst_values; - bool skip; -}; - -/* - * This is the main object used to match a given RMLVO against a rules - * file and aggragate the results in a KcCGST. It goes through a simple - * matching state machine, with tokens as transitions (see - * matcher_match()). - */ -struct matcher { - struct xkb_context *ctx; - /* Input.*/ - struct rule_names rmlvo; - union lvalue val; - struct scanner scanner; - darray(struct group) groups; - /* Current mapping. */ - struct mapping mapping; - /* Current rule. */ - struct rule rule; - /* Output. */ - darray_char kccgst[_KCCGST_NUM_ENTRIES]; -}; - -static struct sval -strip_spaces(struct sval v) -{ - while (v.len > 0 && is_space(v.start[0])) { v.len--; v.start++; } - while (v.len > 0 && is_space(v.start[v.len - 1])) v.len--; - return v; -} - -static darray_matched_sval -split_comma_separated_mlvo(const char *s) -{ - darray_matched_sval arr = darray_new(); - - /* - * Make sure the array returned by this function always includes at - * least one value, e.g. "" -> { "" } and "," -> { "", "" }. - */ - - if (!s) { - struct matched_sval val = { .sval = { NULL, 0 } }; - darray_append(arr, val); - return arr; - } - - while (true) { - struct matched_sval val = { .sval = { s, 0 } }; - while (*s != '\0' && *s != ',') { s++; val.sval.len++; } - val.sval = strip_spaces(val.sval); - darray_append(arr, val); - if (*s == '\0') break; - if (*s == ',') s++; - } - - return arr; -} - -static struct matcher * -matcher_new(struct xkb_context *ctx, - const struct xkb_rule_names *rmlvo) -{ - struct matcher *m = calloc(1, sizeof(*m)); - if (!m) - return NULL; - - m->ctx = ctx; - m->rmlvo.model.sval.start = rmlvo->model; - m->rmlvo.model.sval.len = strlen_safe(rmlvo->model); - m->rmlvo.layouts = split_comma_separated_mlvo(rmlvo->layout); - m->rmlvo.variants = split_comma_separated_mlvo(rmlvo->variant); - m->rmlvo.options = split_comma_separated_mlvo(rmlvo->options); - - return m; -} - -static void -matcher_free(struct matcher *m) -{ - struct group *group; - if (!m) - return; - darray_free(m->rmlvo.layouts); - darray_free(m->rmlvo.variants); - darray_free(m->rmlvo.options); - darray_foreach(group, m->groups) - darray_free(group->elements); - for (int i = 0; i < _KCCGST_NUM_ENTRIES; i++) - darray_free(m->kccgst[i]); - darray_free(m->groups); - free(m); -} - -#define matcher_err(matcher, fmt, ...) \ - scanner_err(&(matcher)->scanner, fmt, ## __VA_ARGS__) - -static void -matcher_group_start_new(struct matcher *m, struct sval name) -{ - struct group group = { .name = name, .elements = darray_new() }; - darray_append(m->groups, group); -} - -static void -matcher_group_add_element(struct matcher *m, struct sval element) -{ - darray_append(darray_item(m->groups, darray_size(m->groups) - 1).elements, - element); -} - -static void -matcher_mapping_start_new(struct matcher *m) -{ - for (unsigned i = 0; i < _MLVO_NUM_ENTRIES; i++) - m->mapping.mlvo_at_pos[i] = -1; - for (unsigned i = 0; i < _KCCGST_NUM_ENTRIES; i++) - m->mapping.kccgst_at_pos[i] = -1; - m->mapping.layout_idx = m->mapping.variant_idx = XKB_LAYOUT_INVALID; - m->mapping.num_mlvo = m->mapping.num_kccgst = 0; - m->mapping.defined_mlvo_mask = 0; - m->mapping.defined_kccgst_mask = 0; - m->mapping.skip = false; -} - -static int -extract_layout_index(const char *s, size_t max_len, xkb_layout_index_t *out) -{ - /* This function is pretty stupid, but works for now. */ - *out = XKB_LAYOUT_INVALID; - if (max_len < 3) - return -1; - if (s[0] != '[' || !is_digit(s[1]) || s[2] != ']') - return -1; - if (s[1] - '0' < 1 || s[1] - '0' > XKB_MAX_GROUPS) - return -1; - /* To zero-based index. */ - *out = s[1] - '0' - 1; - return 3; -} - -static void -matcher_mapping_set_mlvo(struct matcher *m, struct sval ident) -{ - enum rules_mlvo mlvo; - struct sval mlvo_sval; - - for (mlvo = 0; mlvo < _MLVO_NUM_ENTRIES; mlvo++) { - mlvo_sval = rules_mlvo_svals[mlvo]; - - if (svaleq_prefix(mlvo_sval, ident)) - break; - } - - /* Not found. */ - if (mlvo >= _MLVO_NUM_ENTRIES) { - matcher_err(m, "invalid mapping: %.*s is not a valid value here; ignoring rule set", - ident.len, ident.start); - m->mapping.skip = true; - return; - } - - if (m->mapping.defined_mlvo_mask & (1u << mlvo)) { - matcher_err(m, "invalid mapping: %.*s appears twice on the same line; ignoring rule set", - mlvo_sval.len, mlvo_sval.start); - m->mapping.skip = true; - return; - } - - /* If there are leftovers still, it must be an index. */ - if (mlvo_sval.len < ident.len) { - xkb_layout_index_t idx; - int consumed = extract_layout_index(ident.start + mlvo_sval.len, - ident.len - mlvo_sval.len, &idx); - if ((int) (ident.len - mlvo_sval.len) != consumed) { - matcher_err(m, "invalid mapping: \"%.*s\" may only be followed by a valid group index; ignoring rule set", - mlvo_sval.len, mlvo_sval.start); - m->mapping.skip = true; - return; - } - - if (mlvo == MLVO_LAYOUT) { - m->mapping.layout_idx = idx; - } - else if (mlvo == MLVO_VARIANT) { - m->mapping.variant_idx = idx; - } - else { - matcher_err(m, "invalid mapping: \"%.*s\" cannot be followed by a group index; ignoring rule set", - mlvo_sval.len, mlvo_sval.start); - m->mapping.skip = true; - return; - } - } - - m->mapping.mlvo_at_pos[m->mapping.num_mlvo] = mlvo; - m->mapping.defined_mlvo_mask |= 1u << mlvo; - m->mapping.num_mlvo++; -} - -static void -matcher_mapping_set_kccgst(struct matcher *m, struct sval ident) -{ - enum rules_kccgst kccgst; - struct sval kccgst_sval; - - for (kccgst = 0; kccgst < _KCCGST_NUM_ENTRIES; kccgst++) { - kccgst_sval = rules_kccgst_svals[kccgst]; - - if (svaleq(rules_kccgst_svals[kccgst], ident)) - break; - } - - /* Not found. */ - if (kccgst >= _KCCGST_NUM_ENTRIES) { - matcher_err(m, "invalid mapping: %.*s is not a valid value here; ignoring rule set", - ident.len, ident.start); - m->mapping.skip = true; - return; - } - - if (m->mapping.defined_kccgst_mask & (1u << kccgst)) { - matcher_err(m, "invalid mapping: %.*s appears twice on the same line; ignoring rule set", - kccgst_sval.len, kccgst_sval.start); - m->mapping.skip = true; - return; - } - - m->mapping.kccgst_at_pos[m->mapping.num_kccgst] = kccgst; - m->mapping.defined_kccgst_mask |= 1u << kccgst; - m->mapping.num_kccgst++; -} - -static void -matcher_mapping_verify(struct matcher *m) -{ - if (m->mapping.num_mlvo == 0) { - matcher_err(m, "invalid mapping: must have at least one value on the left hand side; ignoring rule set"); - goto skip; - } - - if (m->mapping.num_kccgst == 0) { - matcher_err(m, "invalid mapping: must have at least one value on the right hand side; ignoring rule set"); - goto skip; - } - - /* - * This following is very stupid, but this is how it works. - * See the "Notes" section in the overview above. - */ - - if (m->mapping.defined_mlvo_mask & (1u << MLVO_LAYOUT)) { - if (m->mapping.layout_idx == XKB_LAYOUT_INVALID) { - if (darray_size(m->rmlvo.layouts) > 1) - goto skip; - } - else { - if (darray_size(m->rmlvo.layouts) == 1 || - m->mapping.layout_idx >= darray_size(m->rmlvo.layouts)) - goto skip; - } - } - - if (m->mapping.defined_mlvo_mask & (1u << MLVO_VARIANT)) { - if (m->mapping.variant_idx == XKB_LAYOUT_INVALID) { - if (darray_size(m->rmlvo.variants) > 1) - goto skip; - } - else { - if (darray_size(m->rmlvo.variants) == 1 || - m->mapping.variant_idx >= darray_size(m->rmlvo.variants)) - goto skip; - } - } - - return; - -skip: - m->mapping.skip = true; -} - -static void -matcher_rule_start_new(struct matcher *m) -{ - memset(&m->rule, 0, sizeof(m->rule)); - m->rule.skip = m->mapping.skip; -} - -static void -matcher_rule_set_mlvo_common(struct matcher *m, struct sval ident, - enum mlvo_match_type match_type) -{ - if (m->rule.num_mlvo_values + 1 > m->mapping.num_mlvo) { - matcher_err(m, "invalid rule: has more values than the mapping line; ignoring rule"); - m->rule.skip = true; - return; - } - m->rule.match_type_at_pos[m->rule.num_mlvo_values] = match_type; - m->rule.mlvo_value_at_pos[m->rule.num_mlvo_values] = ident; - m->rule.num_mlvo_values++; -} - -static void -matcher_rule_set_mlvo_wildcard(struct matcher *m) -{ - struct sval dummy = { NULL, 0 }; - matcher_rule_set_mlvo_common(m, dummy, MLVO_MATCH_WILDCARD); -} - -static void -matcher_rule_set_mlvo_group(struct matcher *m, struct sval ident) -{ - matcher_rule_set_mlvo_common(m, ident, MLVO_MATCH_GROUP); -} - -static void -matcher_rule_set_mlvo(struct matcher *m, struct sval ident) -{ - matcher_rule_set_mlvo_common(m, ident, MLVO_MATCH_NORMAL); -} - -static void -matcher_rule_set_kccgst(struct matcher *m, struct sval ident) -{ - if (m->rule.num_kccgst_values + 1 > m->mapping.num_kccgst) { - matcher_err(m, "invalid rule: has more values than the mapping line; ignoring rule"); - m->rule.skip = true; - return; - } - m->rule.kccgst_value_at_pos[m->rule.num_kccgst_values] = ident; - m->rule.num_kccgst_values++; -} - -static bool -match_group(struct matcher *m, struct sval group_name, struct sval to) -{ - struct group *group; - struct sval *element; - bool found = false; - - darray_foreach(group, m->groups) { - if (svaleq(group->name, group_name)) { - found = true; - break; - } - } - - if (!found) { - /* - * rules/evdev intentionally uses some undeclared group names - * in rules (e.g. commented group definitions which may be - * uncommented if needed). So we continue silently. - */ - return false; - } - - darray_foreach(element, group->elements) - if (svaleq(to, *element)) - return true; - - return false; -} - -static bool -match_value(struct matcher *m, struct sval val, struct sval to, - enum mlvo_match_type match_type) -{ - if (match_type == MLVO_MATCH_WILDCARD) - return true; - if (match_type == MLVO_MATCH_GROUP) - return match_group(m, val, to); - return svaleq(val, to); -} - -static bool -match_value_and_mark(struct matcher *m, struct sval val, - struct matched_sval *to, enum mlvo_match_type match_type) -{ - bool matched = match_value(m, val, to->sval, match_type); - if (matched) - to->matched = true; - return matched; -} - -/* - * This function performs %-expansion on @value (see overview above), - * and appends the result to @to. - */ -static bool -append_expanded_kccgst_value(struct matcher *m, darray_char *to, - struct sval value) -{ - const char *s = value.start; - darray_char expanded = darray_new(); - char ch; - bool expanded_plus, to_plus; - - /* - * Some ugly hand-lexing here, but going through the scanner is more - * trouble than it's worth, and the format is ugly on its own merit. - */ - for (unsigned i = 0; i < value.len; ) { - enum rules_mlvo mlv; - xkb_layout_index_t idx; - char pfx, sfx; - struct matched_sval *expanded_value; - - /* Check if that's a start of an expansion. */ - if (s[i] != '%') { - /* Just a normal character. */ - darray_appends_nullterminate(expanded, &s[i++], 1); - continue; - } - if (++i >= value.len) goto error; - - pfx = sfx = 0; - - /* Check for prefix. */ - if (s[i] == '(' || s[i] == '+' || s[i] == '|' || - s[i] == '_' || s[i] == '-') { - pfx = s[i]; - if (s[i] == '(') sfx = ')'; - if (++i >= value.len) goto error; - } - - /* Mandatory model/layout/variant specifier. */ - switch (s[i++]) { - case 'm': mlv = MLVO_MODEL; break; - case 'l': mlv = MLVO_LAYOUT; break; - case 'v': mlv = MLVO_VARIANT; break; - default: goto error; - } - - /* Check for index. */ - idx = XKB_LAYOUT_INVALID; - if (i < value.len && s[i] == '[') { - int consumed; - - if (mlv != MLVO_LAYOUT && mlv != MLVO_VARIANT) { - matcher_err(m, "invalid index in %%-expansion; may only index layout or variant"); - goto error; - } - - consumed = extract_layout_index(s + i, value.len - i, &idx); - if (consumed == -1) goto error; - i += consumed; - } - - /* Check for suffix, if there supposed to be one. */ - if (sfx != 0) { - if (i >= value.len) goto error; - if (s[i++] != sfx) goto error; - } - - /* Get the expanded value. */ - expanded_value = NULL; - - if (mlv == MLVO_LAYOUT) { - if (idx != XKB_LAYOUT_INVALID && - idx < darray_size(m->rmlvo.layouts) && - darray_size(m->rmlvo.layouts) > 1) - expanded_value = &darray_item(m->rmlvo.layouts, idx); - else if (idx == XKB_LAYOUT_INVALID && - darray_size(m->rmlvo.layouts) == 1) - expanded_value = &darray_item(m->rmlvo.layouts, 0); - } - else if (mlv == MLVO_VARIANT) { - if (idx != XKB_LAYOUT_INVALID && - idx < darray_size(m->rmlvo.variants) && - darray_size(m->rmlvo.variants) > 1) - expanded_value = &darray_item(m->rmlvo.variants, idx); - else if (idx == XKB_LAYOUT_INVALID && - darray_size(m->rmlvo.variants) == 1) - expanded_value = &darray_item(m->rmlvo.variants, 0); - } - else if (mlv == MLVO_MODEL) { - expanded_value = &m->rmlvo.model; - } - - /* If we didn't get one, skip silently. */ - if (!expanded_value || expanded_value->sval.len == 0) - continue; - - if (pfx != 0) - darray_appends_nullterminate(expanded, &pfx, 1); - darray_appends_nullterminate(expanded, - expanded_value->sval.start, - expanded_value->sval.len); - if (sfx != 0) - darray_appends_nullterminate(expanded, &sfx, 1); - expanded_value->matched = true; - } - - /* - * Appending bar to foo -> foo (not an error if this happens) - * Appending +bar to foo -> foo+bar - * Appending bar to +foo -> bar+foo - * Appending +bar to +foo -> +foo+bar - */ - - ch = (darray_empty(expanded) ? '\0' : darray_item(expanded, 0)); - expanded_plus = (ch == '+' || ch == '|'); - ch = (darray_empty(*to) ? '\0' : darray_item(*to, 0)); - to_plus = (ch == '+' || ch == '|'); - - if (expanded_plus || darray_empty(*to)) - darray_appends_nullterminate(*to, expanded.item, expanded.size); - else if (to_plus) - darray_prepends_nullterminate(*to, expanded.item, expanded.size); - - darray_free(expanded); - return true; - -error: - darray_free(expanded); - matcher_err(m, "invalid %%-expansion in value; not used"); - return false; -} - -static void -matcher_rule_verify(struct matcher *m) -{ - if (m->rule.num_mlvo_values != m->mapping.num_mlvo || - m->rule.num_kccgst_values != m->mapping.num_kccgst) { - matcher_err(m, "invalid rule: must have same number of values as mapping line; ignoring rule"); - m->rule.skip = true; - } -} - -static void -matcher_rule_apply_if_matches(struct matcher *m) -{ - for (unsigned i = 0; i < m->mapping.num_mlvo; i++) { - enum rules_mlvo mlvo = m->mapping.mlvo_at_pos[i]; - struct sval value = m->rule.mlvo_value_at_pos[i]; - enum mlvo_match_type match_type = m->rule.match_type_at_pos[i]; - struct matched_sval *to; - bool matched = false; - - if (mlvo == MLVO_MODEL) { - to = &m->rmlvo.model; - matched = match_value_and_mark(m, value, to, match_type); - } - else if (mlvo == MLVO_LAYOUT) { - xkb_layout_index_t idx = m->mapping.layout_idx; - idx = (idx == XKB_LAYOUT_INVALID ? 0 : idx); - to = &darray_item(m->rmlvo.layouts, idx); - matched = match_value_and_mark(m, value, to, match_type); - } - else if (mlvo == MLVO_VARIANT) { - xkb_layout_index_t idx = m->mapping.layout_idx; - idx = (idx == XKB_LAYOUT_INVALID ? 0 : idx); - to = &darray_item(m->rmlvo.variants, idx); - matched = match_value_and_mark(m, value, to, match_type); - } - else if (mlvo == MLVO_OPTION) { - darray_foreach(to, m->rmlvo.options) { - matched = match_value_and_mark(m, value, to, match_type); - if (matched) - break; - } - } - - if (!matched) - return; - } - - for (unsigned i = 0; i < m->mapping.num_kccgst; i++) { - enum rules_kccgst kccgst = m->mapping.kccgst_at_pos[i]; - struct sval value = m->rule.kccgst_value_at_pos[i]; - append_expanded_kccgst_value(m, &m->kccgst[kccgst], value); - } - - /* - * If a rule matches in a rule set, the rest of the set should be - * skipped. However, rule sets matching against options may contain - * several legitimate rules, so they are processed entirely. - */ - if (!(m->mapping.defined_mlvo_mask & (1 << MLVO_OPTION))) - m->mapping.skip = true; -} - -static enum rules_token -gettok(struct matcher *m) -{ - return lex(&m->scanner, &m->val); -} - -static bool -matcher_match(struct matcher *m, const char *string, size_t len, - const char *file_name, struct xkb_component_names *out) -{ - enum rules_token tok; - struct matched_sval *mval; - - if (!m) - return false; - - scanner_init(&m->scanner, m->ctx, string, len, file_name, NULL); - -initial: - switch (tok = gettok(m)) { - case TOK_BANG: - goto bang; - case TOK_END_OF_LINE: - goto initial; - case TOK_END_OF_FILE: - goto finish; - default: - goto unexpected; - } - -bang: - switch (tok = gettok(m)) { - case TOK_GROUP_NAME: - matcher_group_start_new(m, m->val.string); - goto group_name; - case TOK_IDENTIFIER: - matcher_mapping_start_new(m); - matcher_mapping_set_mlvo(m, m->val.string); - goto mapping_mlvo; - default: - goto unexpected; - } - -group_name: - switch (tok = gettok(m)) { - case TOK_EQUALS: - goto group_element; - default: - goto unexpected; - } - -group_element: - switch (tok = gettok(m)) { - case TOK_IDENTIFIER: - matcher_group_add_element(m, m->val.string); - goto group_element; - case TOK_END_OF_LINE: - goto initial; - default: - goto unexpected; - } - -mapping_mlvo: - switch (tok = gettok(m)) { - case TOK_IDENTIFIER: - if (!m->mapping.skip) - matcher_mapping_set_mlvo(m, m->val.string); - goto mapping_mlvo; - case TOK_EQUALS: - goto mapping_kccgst; - default: - goto unexpected; - } - -mapping_kccgst: - switch (tok = gettok(m)) { - case TOK_IDENTIFIER: - if (!m->mapping.skip) - matcher_mapping_set_kccgst(m, m->val.string); - goto mapping_kccgst; - case TOK_END_OF_LINE: - if (!m->mapping.skip) - matcher_mapping_verify(m); - goto rule_mlvo_first; - default: - goto unexpected; - } - -rule_mlvo_first: - switch (tok = gettok(m)) { - case TOK_BANG: - goto bang; - case TOK_END_OF_LINE: - goto rule_mlvo_first; - case TOK_END_OF_FILE: - goto finish; - default: - matcher_rule_start_new(m); - goto rule_mlvo_no_tok; - } - -rule_mlvo: - tok = gettok(m); -rule_mlvo_no_tok: - switch (tok) { - case TOK_IDENTIFIER: - if (!m->rule.skip) - matcher_rule_set_mlvo(m, m->val.string); - goto rule_mlvo; - case TOK_STAR: - if (!m->rule.skip) - matcher_rule_set_mlvo_wildcard(m); - goto rule_mlvo; - case TOK_GROUP_NAME: - if (!m->rule.skip) - matcher_rule_set_mlvo_group(m, m->val.string); - goto rule_mlvo; - case TOK_EQUALS: - goto rule_kccgst; - default: - goto unexpected; - } - -rule_kccgst: - switch (tok = gettok(m)) { - case TOK_IDENTIFIER: - if (!m->rule.skip) - matcher_rule_set_kccgst(m, m->val.string); - goto rule_kccgst; - case TOK_END_OF_LINE: - if (!m->rule.skip) - matcher_rule_verify(m); - if (!m->rule.skip) - matcher_rule_apply_if_matches(m); - goto rule_mlvo_first; - default: - goto unexpected; - } - -unexpected: - switch (tok) { - case TOK_ERROR: - goto error; - default: - goto state_error; - } - -finish: - if (darray_empty(m->kccgst[KCCGST_KEYCODES]) || - darray_empty(m->kccgst[KCCGST_TYPES]) || - darray_empty(m->kccgst[KCCGST_COMPAT]) || - /* darray_empty(m->kccgst[KCCGST_GEOMETRY]) || */ - darray_empty(m->kccgst[KCCGST_SYMBOLS])) - goto error; - - darray_steal(m->kccgst[KCCGST_KEYCODES], &out->keycodes, NULL); - darray_steal(m->kccgst[KCCGST_TYPES], &out->types, NULL); - darray_steal(m->kccgst[KCCGST_COMPAT], &out->compat, NULL); - darray_steal(m->kccgst[KCCGST_SYMBOLS], &out->symbols, NULL); - darray_free(m->kccgst[KCCGST_GEOMETRY]); - - - mval = &m->rmlvo.model; - if (!mval->matched && mval->sval.len > 0) - log_err(m->ctx, "Unrecognized RMLVO model \"%.*s\" was ignored\n", - mval->sval.len, mval->sval.start); - darray_foreach(mval, m->rmlvo.layouts) - if (!mval->matched && mval->sval.len > 0) - log_err(m->ctx, "Unrecognized RMLVO layout \"%.*s\" was ignored\n", - mval->sval.len, mval->sval.start); - darray_foreach(mval, m->rmlvo.variants) - if (!mval->matched && mval->sval.len > 0) - log_err(m->ctx, "Unrecognized RMLVO variant \"%.*s\" was ignored\n", - mval->sval.len, mval->sval.start); - darray_foreach(mval, m->rmlvo.options) - if (!mval->matched && mval->sval.len > 0) - log_err(m->ctx, "Unrecognized RMLVO option \"%.*s\" was ignored\n", - mval->sval.len, mval->sval.start); - - return true; - -state_error: - matcher_err(m, "unexpected token"); -error: - return false; -} - -bool -xkb_components_from_rules(struct xkb_context *ctx, - const struct xkb_rule_names *rmlvo, - struct xkb_component_names *out) -{ - bool ret = false; - FILE *file; - char *path; - char *string; - size_t size; - struct matcher *matcher; - - file = FindFileInXkbPath(ctx, rmlvo->rules, FILE_TYPE_RULES, &path); - if (!file) - goto err_out; - - ret = map_file(file, &string, &size); - if (!ret) { - log_err(ctx, "Couldn't read rules file \"%s\": %s\n", - path, strerror(errno)); - goto err_file; - } - - matcher = matcher_new(ctx, rmlvo); - ret = matcher_match(matcher, string, size, path, out); - if (!ret) - log_err(ctx, "No components returned from XKB rules \"%s\"\n", path); - matcher_free(matcher); - - unmap_file(string, size); -err_file: - free(path); - fclose(file); -err_out: - return ret; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/rules.h b/src/3rdparty/xkbcommon/src/xkbcomp/rules.h deleted file mode 100644 index 5381b1562f..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/rules.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright © 2009 Dan Nicholson - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef XKBCOMP_RULES_H -#define XKBCOMP_RULES_H - -bool -xkb_components_from_rules(struct xkb_context *ctx, - const struct xkb_rule_names *rmlvo, - struct xkb_component_names *out); - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/scanner.c b/src/3rdparty/xkbcommon/src/xkbcomp/scanner.c deleted file mode 100644 index 1ce6137bf3..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/scanner.c +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "xkbcomp-priv.h" -#include "parser-priv.h" -#include "scanner-utils.h" - -static bool -number(struct scanner *s, int64_t *out, int *out_tok) -{ - bool is_float = false, is_hex = false; - const char *start = s->s + s->pos; - char *end; - - if (lit(s, "0x")) { - while (is_xdigit(peek(s))) next(s); - is_hex = true; - } - else { - while (is_digit(peek(s))) next(s); - is_float = chr(s, '.'); - while (is_digit(peek(s))) next(s); - } - if (s->s + s->pos == start) - return false; - - errno = 0; - if (is_hex) - *out = strtoul(start, &end, 16); - else if (is_float) - *out = strtod(start, &end); - else - *out = strtoul(start, &end, 10); - if (errno != 0 || s->s + s->pos != end) - *out_tok = ERROR_TOK; - else - *out_tok = (is_float ? FLOAT : INTEGER); - return true; -} - -int -_xkbcommon_lex(YYSTYPE *yylval, struct scanner *s) -{ - int tok; - -skip_more_whitespace_and_comments: - /* Skip spaces. */ - while (is_space(peek(s))) next(s); - - /* Skip comments. */ - if (lit(s, "//") || chr(s, '#')) { - skip_to_eol(s); - goto skip_more_whitespace_and_comments; - } - - /* See if we're done. */ - if (eof(s)) return END_OF_FILE; - - /* New token. */ - s->token_line = s->line; - s->token_column = s->column; - s->buf_pos = 0; - - /* String literal. */ - if (chr(s, '\"')) { - while (!eof(s) && !eol(s) && peek(s) != '\"') { - if (chr(s, '\\')) { - uint8_t o; - if (chr(s, '\\')) buf_append(s, '\\'); - else if (chr(s, 'n')) buf_append(s, '\n'); - else if (chr(s, 't')) buf_append(s, '\t'); - else if (chr(s, 'r')) buf_append(s, '\r'); - else if (chr(s, 'b')) buf_append(s, '\b'); - else if (chr(s, 'f')) buf_append(s, '\f'); - else if (chr(s, 'v')) buf_append(s, '\v'); - else if (chr(s, 'e')) buf_append(s, '\033'); - else if (oct(s, &o)) buf_append(s, (char) o); - else { - scanner_warn(s, "unknown escape sequence in string literal"); - /* Ignore. */ - } - } else { - buf_append(s, next(s)); - } - } - if (!buf_append(s, '\0') || !chr(s, '\"')) { - scanner_err(s, "unterminated string literal"); - return ERROR_TOK; - } - yylval->str = strdup(s->buf); - if (!yylval->str) - return ERROR_TOK; - return STRING; - } - - /* Key name literal. */ - if (chr(s, '<')) { - while (is_graph(peek(s)) && peek(s) != '>') - buf_append(s, next(s)); - if (!buf_append(s, '\0') || !chr(s, '>')) { - scanner_err(s, "unterminated key name literal"); - return ERROR_TOK; - } - /* Empty key name literals are allowed. */ - yylval->atom = xkb_atom_intern(s->ctx, s->buf, s->buf_pos - 1); - return KEYNAME; - } - - /* Operators and punctuation. */ - if (chr(s, ';')) return SEMI; - if (chr(s, '{')) return OBRACE; - if (chr(s, '}')) return CBRACE; - if (chr(s, '=')) return EQUALS; - if (chr(s, '[')) return OBRACKET; - if (chr(s, ']')) return CBRACKET; - if (chr(s, '(')) return OPAREN; - if (chr(s, ')')) return CPAREN; - if (chr(s, '.')) return DOT; - if (chr(s, ',')) return COMMA; - if (chr(s, '+')) return PLUS; - if (chr(s, '-')) return MINUS; - if (chr(s, '*')) return TIMES; - if (chr(s, '/')) return DIVIDE; - if (chr(s, '!')) return EXCLAM; - if (chr(s, '~')) return INVERT; - - /* Identifier. */ - if (is_alpha(peek(s)) || peek(s) == '_') { - s->buf_pos = 0; - while (is_alnum(peek(s)) || peek(s) == '_') - buf_append(s, next(s)); - if (!buf_append(s, '\0')) { - scanner_err(s, "identifier too long"); - return ERROR_TOK; - } - - /* Keyword. */ - tok = keyword_to_token(s->buf, s->buf_pos - 1); - if (tok != -1) return tok; - - yylval->str = strdup(s->buf); - if (!yylval->str) - return ERROR_TOK; - return IDENT; - } - - /* Number literal (hexadecimal / decimal / float). */ - if (number(s, &yylval->num, &tok)) { - if (tok == ERROR_TOK) { - scanner_err(s, "malformed number literal"); - return ERROR_TOK; - } - return tok; - } - - scanner_err(s, "unrecognized token"); - return ERROR_TOK; -} - -XkbFile * -XkbParseString(struct xkb_context *ctx, const char *string, size_t len, - const char *file_name, const char *map) -{ - struct scanner scanner; - scanner_init(&scanner, ctx, string, len, file_name, NULL); - return parse(ctx, &scanner, map); -} - -XkbFile * -XkbParseFile(struct xkb_context *ctx, FILE *file, - const char *file_name, const char *map) -{ - bool ok; - XkbFile *xkb_file; - char *string; - size_t size; - - ok = map_file(file, &string, &size); - if (!ok) { - log_err(ctx, "Couldn't read XKB file %s: %s\n", - file_name, strerror(errno)); - return NULL; - } - - xkb_file = XkbParseString(ctx, string, size, file_name, map); - unmap_file(string, size); - return xkb_file; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/symbols.c b/src/3rdparty/xkbcommon/src/xkbcomp/symbols.c deleted file mode 100644 index 9b05ec924f..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/symbols.c +++ /dev/null @@ -1,1595 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - * Ran Benita - */ - -#include "xkbcomp-priv.h" -#include "text.h" -#include "expr.h" -#include "action.h" -#include "vmod.h" -#include "include.h" -#include "keysym.h" - -enum key_repeat { - KEY_REPEAT_UNDEFINED = 0, - KEY_REPEAT_YES = 1, - KEY_REPEAT_NO = 2, -}; - -enum group_field { - GROUP_FIELD_SYMS = (1 << 0), - GROUP_FIELD_ACTS = (1 << 1), - GROUP_FIELD_TYPE = (1 << 2), -}; - -enum key_field { - KEY_FIELD_REPEAT = (1 << 0), - KEY_FIELD_DEFAULT_TYPE = (1 << 1), - KEY_FIELD_GROUPINFO = (1 << 2), - KEY_FIELD_VMODMAP = (1 << 3), -}; - -typedef struct { - enum group_field defined; - darray(struct xkb_level) levels; - xkb_atom_t type; -} GroupInfo; - -typedef struct { - enum key_field defined; - enum merge_mode merge; - - xkb_atom_t name; - - darray(GroupInfo) groups; - - enum key_repeat repeat; - xkb_mod_mask_t vmodmap; - xkb_atom_t default_type; - - enum xkb_range_exceed_type out_of_range_group_action; - xkb_layout_index_t out_of_range_group_number; -} KeyInfo; - -static void -ClearLevelInfo(struct xkb_level *leveli) -{ - if (leveli->num_syms > 1) - free(leveli->u.syms); -} - -static void -InitGroupInfo(GroupInfo *groupi) -{ - memset(groupi, 0, sizeof(*groupi)); -} - -static void -ClearGroupInfo(GroupInfo *groupi) -{ - struct xkb_level *leveli; - darray_foreach(leveli, groupi->levels) - ClearLevelInfo(leveli); - darray_free(groupi->levels); -} - -static void -CopyGroupInfo(GroupInfo *to, const GroupInfo *from) -{ - to->defined = from->defined; - to->type = from->type; - darray_init(to->levels); - darray_copy(to->levels, from->levels); - for (xkb_level_index_t j = 0; j < darray_size(to->levels); j++) - if (darray_item(from->levels, j).num_syms > 1) - darray_item(to->levels, j).u.syms = - memdup(darray_item(from->levels, j).u.syms, - darray_item(from->levels, j).num_syms, - sizeof(xkb_keysym_t)); -} - -static void -InitKeyInfo(struct xkb_context *ctx, KeyInfo *keyi) -{ - memset(keyi, 0, sizeof(*keyi)); - keyi->merge = MERGE_OVERRIDE; - keyi->name = xkb_atom_intern_literal(ctx, "*"); - keyi->out_of_range_group_action = RANGE_WRAP; -} - -static void -ClearKeyInfo(KeyInfo *keyi) -{ - GroupInfo *groupi; - darray_foreach(groupi, keyi->groups) - ClearGroupInfo(groupi); - darray_free(keyi->groups); -} - -/***====================================================================***/ - -typedef struct { - enum merge_mode merge; - bool haveSymbol; - xkb_mod_index_t modifier; - union { - xkb_atom_t keyName; - xkb_keysym_t keySym; - } u; -} ModMapEntry; - -typedef struct { - char *name; /* e.g. pc+us+inet(evdev) */ - int errorCount; - enum merge_mode merge; - xkb_layout_index_t explicit_group; - darray(KeyInfo) keys; - KeyInfo default_key; - ActionsInfo *actions; - darray(xkb_atom_t) group_names; - darray(ModMapEntry) modmaps; - struct xkb_mod_set mods; - - struct xkb_context *ctx; - /* Needed for AddKeySymbols. */ - const struct xkb_keymap *keymap; -} SymbolsInfo; - -static void -InitSymbolsInfo(SymbolsInfo *info, const struct xkb_keymap *keymap, - ActionsInfo *actions, const struct xkb_mod_set *mods) -{ - memset(info, 0, sizeof(*info)); - info->ctx = keymap->ctx; - info->keymap = keymap; - info->merge = MERGE_OVERRIDE; - InitKeyInfo(keymap->ctx, &info->default_key); - info->actions = actions; - info->mods = *mods; - info->explicit_group = XKB_LAYOUT_INVALID; -} - -static void -ClearSymbolsInfo(SymbolsInfo *info) -{ - KeyInfo *keyi; - free(info->name); - darray_foreach(keyi, info->keys) - ClearKeyInfo(keyi); - darray_free(info->keys); - darray_free(info->group_names); - darray_free(info->modmaps); - ClearKeyInfo(&info->default_key); -} - -static const char * -KeyInfoText(SymbolsInfo *info, KeyInfo *keyi) -{ - return KeyNameText(info->ctx, keyi->name); -} - -static bool -MergeGroups(SymbolsInfo *info, GroupInfo *into, GroupInfo *from, bool clobber, - bool report, xkb_layout_index_t group, xkb_atom_t key_name) -{ - xkb_level_index_t i, levels_in_both; - struct xkb_level *level; - - /* First find the type of the merged group. */ - if (into->type != from->type) { - if (from->type == XKB_ATOM_NONE) { - } - else if (into->type == XKB_ATOM_NONE) { - into->type = from->type; - } - else { - xkb_atom_t use = (clobber ? from->type : into->type); - xkb_atom_t ignore = (clobber ? into->type : from->type); - - if (report) - log_warn(info->ctx, - "Multiple definitions for group %d type of key %s; " - "Using %s, ignoring %s\n", - group + 1, KeyNameText(info->ctx, key_name), - xkb_atom_text(info->ctx, use), - xkb_atom_text(info->ctx, ignore)); - - into->type = use; - } - } - into->defined |= (from->defined & GROUP_FIELD_TYPE); - - /* Now look at the levels. */ - - if (darray_empty(from->levels)) { - InitGroupInfo(from); - return true; - } - - if (darray_empty(into->levels)) { - from->type = into->type; - *into = *from; - InitGroupInfo(from); - return true; - } - - /* Merge the actions and syms. */ - levels_in_both = MIN(darray_size(into->levels), darray_size(from->levels)); - for (i = 0; i < levels_in_both; i++) { - struct xkb_level *intoLevel = &darray_item(into->levels, i); - struct xkb_level *fromLevel = &darray_item(from->levels, i); - - if (fromLevel->action.type == ACTION_TYPE_NONE) { - } - else if (intoLevel->action.type == ACTION_TYPE_NONE) { - intoLevel->action = fromLevel->action; - } - else { - union xkb_action *use, *ignore; - use = (clobber ? &fromLevel->action : &intoLevel->action); - ignore = (clobber ? &intoLevel->action : &fromLevel->action); - - if (report) - log_warn(info->ctx, - "Multiple actions for level %d/group %u on key %s; " - "Using %s, ignoring %s\n", - i + 1, group + 1, KeyNameText(info->ctx, key_name), - ActionTypeText(use->type), - ActionTypeText(ignore->type)); - - intoLevel->action = *use; - } - - if (fromLevel->num_syms == 0) { - } - else if (intoLevel->num_syms == 0) { - intoLevel->num_syms = fromLevel->num_syms; - if (fromLevel->num_syms > 1) - intoLevel->u.syms = fromLevel->u.syms; - else - intoLevel->u.sym = fromLevel->u.sym; - fromLevel->num_syms = 0; - } - else if (!XkbLevelsSameSyms(fromLevel, intoLevel)) { - if (report) - log_warn(info->ctx, - "Multiple symbols for level %d/group %u on key %s; " - "Using %s, ignoring %s\n", - i + 1, group + 1, KeyNameText(info->ctx, key_name), - (clobber ? "from" : "to"), - (clobber ? "to" : "from")); - - if (clobber) { - ClearLevelInfo(intoLevel); - intoLevel->num_syms = fromLevel->num_syms; - if (fromLevel->num_syms > 1) - intoLevel->u.syms = fromLevel->u.syms; - else - intoLevel->u.sym = fromLevel->u.sym; - fromLevel->num_syms = 0; - } - } - } - /* If @from has extra levels, get them as well. */ - darray_foreach_from(level, from->levels, levels_in_both) { - darray_append(into->levels, *level); - level->num_syms = 0; - } - into->defined |= (from->defined & GROUP_FIELD_ACTS); - into->defined |= (from->defined & GROUP_FIELD_SYMS); - - return true; -} - -static bool -UseNewKeyField(enum key_field field, enum key_field old, enum key_field new, - bool clobber, bool report, enum key_field *collide) -{ - if (!(old & field)) - return (new & field); - - if (new & field) { - if (report) - *collide |= field; - - if (clobber) - return true; - } - - return false; -} - -static bool -MergeKeys(SymbolsInfo *info, KeyInfo *into, KeyInfo *from, bool same_file) -{ - xkb_layout_index_t i; - xkb_layout_index_t groups_in_both; - enum key_field collide = 0; - const int verbosity = xkb_context_get_log_verbosity(info->ctx); - const bool clobber = (from->merge != MERGE_AUGMENT); - const bool report = (same_file && verbosity > 0) || verbosity > 9; - - if (from->merge == MERGE_REPLACE) { - ClearKeyInfo(into); - *into = *from; - InitKeyInfo(info->ctx, from); - return true; - } - - groups_in_both = MIN(darray_size(into->groups), darray_size(from->groups)); - for (i = 0; i < groups_in_both; i++) - MergeGroups(info, - &darray_item(into->groups, i), - &darray_item(from->groups, i), - clobber, report, i, into->name); - /* If @from has extra groups, just move them to @into. */ - for (i = groups_in_both; i < darray_size(from->groups); i++) { - darray_append(into->groups, darray_item(from->groups, i)); - InitGroupInfo(&darray_item(from->groups, i)); - } - - if (UseNewKeyField(KEY_FIELD_VMODMAP, into->defined, from->defined, - clobber, report, &collide)) { - into->vmodmap = from->vmodmap; - into->defined |= KEY_FIELD_VMODMAP; - } - if (UseNewKeyField(KEY_FIELD_REPEAT, into->defined, from->defined, - clobber, report, &collide)) { - into->repeat = from->repeat; - into->defined |= KEY_FIELD_REPEAT; - } - if (UseNewKeyField(KEY_FIELD_DEFAULT_TYPE, into->defined, from->defined, - clobber, report, &collide)) { - into->default_type = from->default_type; - into->defined |= KEY_FIELD_DEFAULT_TYPE; - } - if (UseNewKeyField(KEY_FIELD_GROUPINFO, into->defined, from->defined, - clobber, report, &collide)) { - into->out_of_range_group_action = from->out_of_range_group_action; - into->out_of_range_group_number = from->out_of_range_group_number; - into->defined |= KEY_FIELD_GROUPINFO; - } - - if (collide) - log_warn(info->ctx, - "Symbol map for key %s redefined; " - "Using %s definition for conflicting fields\n", - KeyNameText(info->ctx, into->name), - (clobber ? "first" : "last")); - - ClearKeyInfo(from); - InitKeyInfo(info->ctx, from); - return true; -} - -/* TODO: Make it so this function doesn't need the entire keymap. */ -static bool -AddKeySymbols(SymbolsInfo *info, KeyInfo *keyi, bool same_file) -{ - xkb_atom_t real_name; - KeyInfo *iter; - - /* - * Don't keep aliases in the keys array; this guarantees that - * searching for keys to merge with by straight comparison (see the - * following loop) is enough, and we won't get multiple KeyInfo's - * for the same key because of aliases. - */ - real_name = XkbResolveKeyAlias(info->keymap, keyi->name); - if (real_name != XKB_ATOM_NONE) - keyi->name = real_name; - - darray_foreach(iter, info->keys) - if (iter->name == keyi->name) - return MergeKeys(info, iter, keyi, same_file); - - darray_append(info->keys, *keyi); - InitKeyInfo(info->ctx, keyi); - return true; -} - -static bool -AddModMapEntry(SymbolsInfo *info, ModMapEntry *new) -{ - ModMapEntry *old; - bool clobber = (new->merge != MERGE_AUGMENT); - - darray_foreach(old, info->modmaps) { - xkb_mod_index_t use, ignore; - - if ((new->haveSymbol != old->haveSymbol) || - (new->haveSymbol && new->u.keySym != old->u.keySym) || - (!new->haveSymbol && new->u.keyName != old->u.keyName)) - continue; - - if (new->modifier == old->modifier) - return true; - - use = (clobber ? new->modifier : old->modifier); - ignore = (clobber ? old->modifier : new->modifier); - - if (new->haveSymbol) - log_err(info->ctx, - "Symbol \"%s\" added to modifier map for multiple modifiers; " - "Using %s, ignoring %s\n", - KeysymText(info->ctx, new->u.keySym), - ModIndexText(info->ctx, &info->mods, use), - ModIndexText(info->ctx, &info->mods, ignore)); - else - log_err(info->ctx, - "Key \"%s\" added to modifier map for multiple modifiers; " - "Using %s, ignoring %s\n", - KeyNameText(info->ctx, new->u.keyName), - ModIndexText(info->ctx, &info->mods, use), - ModIndexText(info->ctx, &info->mods, ignore)); - - old->modifier = use; - return true; - } - - darray_append(info->modmaps, *new); - return true; -} - -/***====================================================================***/ - -static void -MergeIncludedSymbols(SymbolsInfo *into, SymbolsInfo *from, - enum merge_mode merge) -{ - xkb_atom_t *group_name; - xkb_layout_index_t group_names_in_both; - - if (from->errorCount > 0) { - into->errorCount += from->errorCount; - return; - } - - into->mods = from->mods; - - if (into->name == NULL) { - into->name = from->name; - from->name = NULL; - } - - group_names_in_both = MIN(darray_size(into->group_names), - darray_size(from->group_names)); - for (xkb_layout_index_t i = 0; i < group_names_in_both; i++) { - if (!darray_item(from->group_names, i)) - continue; - - if (merge == MERGE_AUGMENT && darray_item(into->group_names, i)) - continue; - - darray_item(into->group_names, i) = darray_item(from->group_names, i); - } - /* If @from has more, get them as well. */ - darray_foreach_from(group_name, from->group_names, group_names_in_both) - darray_append(into->group_names, *group_name); - - if (darray_empty(into->keys)) { - into->keys = from->keys; - darray_init(from->keys); - } - else { - KeyInfo *keyi; - darray_foreach(keyi, from->keys) { - keyi->merge = (merge == MERGE_DEFAULT ? keyi->merge : merge); - if (!AddKeySymbols(into, keyi, false)) - into->errorCount++; - } - } - - if (darray_empty(into->modmaps)) { - into->modmaps = from->modmaps; - darray_init(from->modmaps); - } - else { - ModMapEntry *mm; - darray_foreach(mm, from->modmaps) { - mm->merge = (merge == MERGE_DEFAULT ? mm->merge : merge); - if (!AddModMapEntry(into, mm)) - into->errorCount++; - } - } -} - -static void -HandleSymbolsFile(SymbolsInfo *info, XkbFile *file, enum merge_mode merge); - -static bool -HandleIncludeSymbols(SymbolsInfo *info, IncludeStmt *include) -{ - SymbolsInfo included; - - InitSymbolsInfo(&included, info->keymap, info->actions, &info->mods); - included.name = include->stmt; - include->stmt = NULL; - - for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) { - SymbolsInfo next_incl; - XkbFile *file; - - file = ProcessIncludeFile(info->ctx, stmt, FILE_TYPE_SYMBOLS); - if (!file) { - info->errorCount += 10; - ClearSymbolsInfo(&included); - return false; - } - - InitSymbolsInfo(&next_incl, info->keymap, info->actions, - &included.mods); - if (stmt->modifier) { - next_incl.explicit_group = atoi(stmt->modifier) - 1; - if (next_incl.explicit_group >= XKB_MAX_GROUPS) { - log_err(info->ctx, - "Cannot set explicit group to %d - must be between 1..%d; " - "Ignoring group number\n", - next_incl.explicit_group + 1, XKB_MAX_GROUPS); - next_incl.explicit_group = info->explicit_group; - } - } - else { - next_incl.explicit_group = info->explicit_group; - } - - HandleSymbolsFile(&next_incl, file, MERGE_OVERRIDE); - - MergeIncludedSymbols(&included, &next_incl, stmt->merge); - - ClearSymbolsInfo(&next_incl); - FreeXkbFile(file); - } - - MergeIncludedSymbols(info, &included, include->merge); - ClearSymbolsInfo(&included); - - return (info->errorCount == 0); -} - -#define SYMBOLS 1 -#define ACTIONS 2 - -static bool -GetGroupIndex(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx, - unsigned what, xkb_layout_index_t *ndx_rtrn) -{ - const char *name = (what == SYMBOLS ? "symbols" : "actions"); - - if (arrayNdx == NULL) { - xkb_layout_index_t i; - GroupInfo *groupi; - enum group_field field = (what == SYMBOLS ? - GROUP_FIELD_SYMS : GROUP_FIELD_ACTS); - - darray_enumerate(i, groupi, keyi->groups) { - if (!(groupi->defined & field)) { - *ndx_rtrn = i; - return true; - } - } - - if (i >= XKB_MAX_GROUPS) { - log_err(info->ctx, - "Too many groups of %s for key %s (max %u); " - "Ignoring %s defined for extra groups\n", - name, KeyInfoText(info, keyi), XKB_MAX_GROUPS, name); - return false; - } - - darray_resize0(keyi->groups, darray_size(keyi->groups) + 1); - *ndx_rtrn = darray_size(keyi->groups) - 1; - return true; - } - - if (!ExprResolveGroup(info->ctx, arrayNdx, ndx_rtrn)) { - log_err(info->ctx, - "Illegal group index for %s of key %s\n" - "Definition with non-integer array index ignored\n", - name, KeyInfoText(info, keyi)); - return false; - } - - (*ndx_rtrn)--; - if (*ndx_rtrn >= darray_size(keyi->groups)) - darray_resize0(keyi->groups, *ndx_rtrn + 1); - - return true; -} - -static bool -AddSymbolsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx, - ExprDef *value) -{ - xkb_layout_index_t ndx; - GroupInfo *groupi; - xkb_level_index_t nLevels; - - if (!GetGroupIndex(info, keyi, arrayNdx, SYMBOLS, &ndx)) - return false; - - groupi = &darray_item(keyi->groups, ndx); - - if (value == NULL) { - groupi->defined |= GROUP_FIELD_SYMS; - return true; - } - - if (value->expr.op != EXPR_KEYSYM_LIST) { - log_err(info->ctx, - "Expected a list of symbols, found %s; " - "Ignoring symbols for group %u of %s\n", - expr_op_type_to_string(value->expr.op), ndx + 1, - KeyInfoText(info, keyi)); - return false; - } - - if (groupi->defined & GROUP_FIELD_SYMS) { - log_err(info->ctx, - "Symbols for key %s, group %u already defined; " - "Ignoring duplicate definition\n", - KeyInfoText(info, keyi), ndx + 1); - return false; - } - - nLevels = darray_size(value->keysym_list.symsMapIndex); - if (darray_size(groupi->levels) < nLevels) - darray_resize0(groupi->levels, nLevels); - - groupi->defined |= GROUP_FIELD_SYMS; - - for (xkb_level_index_t i = 0; i < nLevels; i++) { - unsigned int sym_index; - struct xkb_level *leveli = &darray_item(groupi->levels, i); - - sym_index = darray_item(value->keysym_list.symsMapIndex, i); - leveli->num_syms = darray_item(value->keysym_list.symsNumEntries, i); - if (leveli->num_syms > 1) - leveli->u.syms = calloc(leveli->num_syms, sizeof(*leveli->u.syms)); - - for (unsigned j = 0; j < leveli->num_syms; j++) { - xkb_keysym_t keysym = darray_item(value->keysym_list.syms, - sym_index + j); - - if (leveli->num_syms == 1) { - if (keysym == XKB_KEY_NoSymbol) - leveli->num_syms = 0; - else - leveli->u.sym = keysym; - } - else if (leveli->num_syms > 1) { - leveli->u.syms[j] = keysym; - } - } - } - - return true; -} - -static bool -AddActionsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx, - ExprDef *value) -{ - xkb_layout_index_t ndx; - GroupInfo *groupi; - unsigned int nActs; - ExprDef *act; - - if (!GetGroupIndex(info, keyi, arrayNdx, ACTIONS, &ndx)) - return false; - - groupi = &darray_item(keyi->groups, ndx); - - if (value == NULL) { - groupi->defined |= GROUP_FIELD_ACTS; - return true; - } - - if (value->expr.op != EXPR_ACTION_LIST) { - log_wsgo(info->ctx, - "Bad expression type (%d) for action list value; " - "Ignoring actions for group %u of %s\n", - value->expr.op, ndx, KeyInfoText(info, keyi)); - return false; - } - - if (groupi->defined & GROUP_FIELD_ACTS) { - log_wsgo(info->ctx, - "Actions for key %s, group %u already defined\n", - KeyInfoText(info, keyi), ndx); - return false; - } - - nActs = 0; - for (act = value->unary.child; act; act = (ExprDef *) act->common.next) - nActs++; - - if (darray_size(groupi->levels) < nActs) - darray_resize0(groupi->levels, nActs); - - groupi->defined |= GROUP_FIELD_ACTS; - - act = value->unary.child; - for (unsigned i = 0; i < nActs; i++) { - union xkb_action *toAct = &darray_item(groupi->levels, i).action; - - if (!HandleActionDef(info->ctx, info->actions, &info->mods, act, toAct)) - log_err(info->ctx, - "Illegal action definition for %s; " - "Action for group %u/level %u ignored\n", - KeyInfoText(info, keyi), ndx + 1, i + 1); - - act = (ExprDef *) act->common.next; - } - - return true; -} - -static const LookupEntry repeatEntries[] = { - { "true", KEY_REPEAT_YES }, - { "yes", KEY_REPEAT_YES }, - { "on", KEY_REPEAT_YES }, - { "false", KEY_REPEAT_NO }, - { "no", KEY_REPEAT_NO }, - { "off", KEY_REPEAT_NO }, - { "default", KEY_REPEAT_UNDEFINED }, - { NULL, 0 } -}; - -static bool -SetSymbolsField(SymbolsInfo *info, KeyInfo *keyi, const char *field, - ExprDef *arrayNdx, ExprDef *value) -{ - if (istreq(field, "type")) { - xkb_layout_index_t ndx; - xkb_atom_t val; - - if (!ExprResolveString(info->ctx, value, &val)) { - log_err(info->ctx, - "The type field of a key symbol map must be a string; " - "Ignoring illegal type definition\n"); - return false; - } - - if (!arrayNdx) { - keyi->default_type = val; - keyi->defined |= KEY_FIELD_DEFAULT_TYPE; - } - else if (!ExprResolveGroup(info->ctx, arrayNdx, &ndx)) { - log_err(info->ctx, - "Illegal group index for type of key %s; " - "Definition with non-integer array index ignored\n", - KeyInfoText(info, keyi)); - return false; - } - else { - ndx--; - if (ndx >= darray_size(keyi->groups)) - darray_resize0(keyi->groups, ndx + 1); - darray_item(keyi->groups, ndx).type = val; - darray_item(keyi->groups, ndx).defined |= GROUP_FIELD_TYPE; - } - } - else if (istreq(field, "symbols")) { - return AddSymbolsToKey(info, keyi, arrayNdx, value); - } - else if (istreq(field, "actions")) { - return AddActionsToKey(info, keyi, arrayNdx, value); - } - else if (istreq(field, "vmods") || - istreq(field, "virtualmods") || - istreq(field, "virtualmodifiers")) { - xkb_mod_mask_t mask; - - if (!ExprResolveModMask(info->ctx, value, MOD_VIRT, &info->mods, - &mask)) { - log_err(info->ctx, - "Expected a virtual modifier mask, found %s; " - "Ignoring virtual modifiers definition for key %s\n", - expr_op_type_to_string(value->expr.op), - KeyInfoText(info, keyi)); - return false; - } - - keyi->vmodmap = mask; - keyi->defined |= KEY_FIELD_VMODMAP; - } - else if (istreq(field, "locking") || - istreq(field, "lock") || - istreq(field, "locks")) { - log_vrb(info->ctx, 1, - "Key behaviors not supported; " - "Ignoring locking specification for key %s\n", - KeyInfoText(info, keyi)); - } - else if (istreq(field, "radiogroup") || - istreq(field, "permanentradiogroup") || - istreq(field, "allownone")) { - log_vrb(info->ctx, 1, - "Radio groups not supported; " - "Ignoring radio group specification for key %s\n", - KeyInfoText(info, keyi)); - } - else if (istreq_prefix("overlay", field) || - istreq_prefix("permanentoverlay", field)) { - log_vrb(info->ctx, 1, - "Overlays not supported; " - "Ignoring overlay specification for key %s\n", - KeyInfoText(info, keyi)); - } - else if (istreq(field, "repeating") || - istreq(field, "repeats") || - istreq(field, "repeat")) { - unsigned int val; - - if (!ExprResolveEnum(info->ctx, value, &val, repeatEntries)) { - log_err(info->ctx, - "Illegal repeat setting for %s; " - "Non-boolean repeat setting ignored\n", - KeyInfoText(info, keyi)); - return false; - } - - keyi->repeat = val; - keyi->defined |= KEY_FIELD_REPEAT; - } - else if (istreq(field, "groupswrap") || - istreq(field, "wrapgroups")) { - bool set; - - if (!ExprResolveBoolean(info->ctx, value, &set)) { - log_err(info->ctx, - "Illegal groupsWrap setting for %s; " - "Non-boolean value ignored\n", - KeyInfoText(info, keyi)); - return false; - } - - keyi->out_of_range_group_action = (set ? RANGE_WRAP : RANGE_SATURATE); - keyi->defined |= KEY_FIELD_GROUPINFO; - } - else if (istreq(field, "groupsclamp") || - istreq(field, "clampgroups")) { - bool set; - - if (!ExprResolveBoolean(info->ctx, value, &set)) { - log_err(info->ctx, - "Illegal groupsClamp setting for %s; " - "Non-boolean value ignored\n", - KeyInfoText(info, keyi)); - return false; - } - - keyi->out_of_range_group_action = (set ? RANGE_SATURATE : RANGE_WRAP); - keyi->defined |= KEY_FIELD_GROUPINFO; - } - else if (istreq(field, "groupsredirect") || - istreq(field, "redirectgroups")) { - xkb_layout_index_t grp; - - if (!ExprResolveGroup(info->ctx, value, &grp)) { - log_err(info->ctx, - "Illegal group index for redirect of key %s; " - "Definition with non-integer group ignored\n", - KeyInfoText(info, keyi)); - return false; - } - - keyi->out_of_range_group_action = RANGE_REDIRECT; - keyi->out_of_range_group_number = grp - 1; - keyi->defined |= KEY_FIELD_GROUPINFO; - } - else { - log_err(info->ctx, - "Unknown field %s in a symbol interpretation; " - "Definition ignored\n", - field); - return false; - } - - return true; -} - -static bool -SetGroupName(SymbolsInfo *info, ExprDef *arrayNdx, ExprDef *value) -{ - xkb_layout_index_t group, group_to_use; - xkb_atom_t name; - - if (!arrayNdx) { - log_vrb(info->ctx, 1, - "You must specify an index when specifying a group name; " - "Group name definition without array subscript ignored\n"); - return false; - } - - if (!ExprResolveGroup(info->ctx, arrayNdx, &group)) { - log_err(info->ctx, - "Illegal index in group name definition; " - "Definition with non-integer array index ignored\n"); - return false; - } - - if (!ExprResolveString(info->ctx, value, &name)) { - log_err(info->ctx, - "Group name must be a string; " - "Illegal name for group %d ignored\n", group); - return false; - } - - if (info->explicit_group == XKB_LAYOUT_INVALID) { - group_to_use = group - 1; - } - else if (group - 1 == 0) { - group_to_use = info->explicit_group; - } - else { - log_warn(info->ctx, - "An explicit group was specified for the '%s' map, " - "but it provides a name for a group other than Group1 (%d); " - "Ignoring group name '%s'\n", - info->name, group, - xkb_atom_text(info->ctx, name)); - return false; - } - - if (group_to_use >= darray_size(info->group_names)) - darray_resize0(info->group_names, group_to_use + 1); - darray_item(info->group_names, group_to_use) = name; - - return true; -} - -static bool -HandleGlobalVar(SymbolsInfo *info, VarDef *stmt) -{ - const char *elem, *field; - ExprDef *arrayNdx; - bool ret; - - if (!ExprResolveLhs(info->ctx, stmt->name, &elem, &field, &arrayNdx)) - return false; - - if (elem && istreq(elem, "key")) { - ret = SetSymbolsField(info, &info->default_key, field, arrayNdx, - stmt->value); - } - else if (!elem && (istreq(field, "name") || - istreq(field, "groupname"))) { - ret = SetGroupName(info, arrayNdx, stmt->value); - } - else if (!elem && (istreq(field, "groupswrap") || - istreq(field, "wrapgroups"))) { - log_err(info->ctx, - "Global \"groupswrap\" not supported; Ignored\n"); - ret = true; - } - else if (!elem && (istreq(field, "groupsclamp") || - istreq(field, "clampgroups"))) { - log_err(info->ctx, - "Global \"groupsclamp\" not supported; Ignored\n"); - ret = true; - } - else if (!elem && (istreq(field, "groupsredirect") || - istreq(field, "redirectgroups"))) { - log_err(info->ctx, - "Global \"groupsredirect\" not supported; Ignored\n"); - ret = true; - } - else if (!elem && istreq(field, "allownone")) { - log_err(info->ctx, - "Radio groups not supported; " - "Ignoring \"allownone\" specification\n"); - ret = true; - } - else { - ret = SetActionField(info->ctx, info->actions, &info->mods, - elem, field, arrayNdx, stmt->value); - } - - return ret; -} - -static bool -HandleSymbolsBody(SymbolsInfo *info, VarDef *def, KeyInfo *keyi) -{ - bool ok = true; - const char *elem, *field; - ExprDef *arrayNdx; - - for (; def; def = (VarDef *) def->common.next) { - if (def->name && def->name->expr.op == EXPR_FIELD_REF) { - log_err(info->ctx, - "Cannot set a global default value from within a key statement; " - "Move statements to the global file scope\n"); - continue; - } - - if (!def->name) { - if (!def->value || def->value->expr.op == EXPR_KEYSYM_LIST) - field = "symbols"; - else - field = "actions"; - arrayNdx = NULL; - } - else { - ok = ExprResolveLhs(info->ctx, def->name, &elem, &field, - &arrayNdx); - } - - if (ok) - ok = SetSymbolsField(info, keyi, field, arrayNdx, def->value); - } - - return ok; -} - -static bool -SetExplicitGroup(SymbolsInfo *info, KeyInfo *keyi) -{ - xkb_layout_index_t i; - GroupInfo *groupi; - bool warn = false; - - if (info->explicit_group == XKB_LAYOUT_INVALID) - return true; - - darray_enumerate_from(i, groupi, keyi->groups, 1) { - if (groupi->defined) { - warn = true; - ClearGroupInfo(groupi); - InitGroupInfo(groupi); - } - } - - if (warn) - log_warn(info->ctx, - "For the map %s an explicit group specified, " - "but key %s has more than one group defined; " - "All groups except first one will be ignored\n", - info->name, KeyInfoText(info, keyi)); - - darray_resize0(keyi->groups, info->explicit_group + 1); - if (info->explicit_group > 0) { - darray_item(keyi->groups, info->explicit_group) = - darray_item(keyi->groups, 0); - InitGroupInfo(&darray_item(keyi->groups, 0)); - } - - return true; -} - -static bool -HandleSymbolsDef(SymbolsInfo *info, SymbolsDef *stmt) -{ - KeyInfo keyi; - - keyi = info->default_key; - darray_init(keyi.groups); - darray_copy(keyi.groups, info->default_key.groups); - for (xkb_layout_index_t i = 0; i < darray_size(keyi.groups); i++) - CopyGroupInfo(&darray_item(keyi.groups, i), - &darray_item(info->default_key.groups, i)); - keyi.merge = stmt->merge; - keyi.name = stmt->keyName; - - if (!HandleSymbolsBody(info, stmt->symbols, &keyi)) { - info->errorCount++; - return false; - } - - if (!SetExplicitGroup(info, &keyi)) { - info->errorCount++; - return false; - } - - if (!AddKeySymbols(info, &keyi, true)) { - info->errorCount++; - return false; - } - - return true; -} - -static bool -HandleModMapDef(SymbolsInfo *info, ModMapDef *def) -{ - ModMapEntry tmp; - xkb_mod_index_t ndx; - bool ok; - struct xkb_context *ctx = info->ctx; - - ndx = XkbModNameToIndex(&info->mods, def->modifier, MOD_REAL); - if (ndx == XKB_MOD_INVALID) { - log_err(info->ctx, - "Illegal modifier map definition; " - "Ignoring map for non-modifier \"%s\"\n", - xkb_atom_text(ctx, def->modifier)); - return false; - } - - ok = true; - tmp.modifier = ndx; - tmp.merge = def->merge; - - for (ExprDef *key = def->keys; key; key = (ExprDef *) key->common.next) { - xkb_keysym_t sym; - - if (key->expr.op == EXPR_VALUE && - key->expr.value_type == EXPR_TYPE_KEYNAME) { - tmp.haveSymbol = false; - tmp.u.keyName = key->key_name.key_name; - } - else if (ExprResolveKeySym(ctx, key, &sym)) { - tmp.haveSymbol = true; - tmp.u.keySym = sym; - } - else { - log_err(info->ctx, - "Modmap entries may contain only key names or keysyms; " - "Illegal definition for %s modifier ignored\n", - ModIndexText(info->ctx, &info->mods, tmp.modifier)); - continue; - } - - ok = AddModMapEntry(info, &tmp) && ok; - } - return ok; -} - -static void -HandleSymbolsFile(SymbolsInfo *info, XkbFile *file, enum merge_mode merge) -{ - bool ok; - - free(info->name); - info->name = strdup_safe(file->name); - - for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) { - switch (stmt->type) { - case STMT_INCLUDE: - ok = HandleIncludeSymbols(info, (IncludeStmt *) stmt); - break; - case STMT_SYMBOLS: - ok = HandleSymbolsDef(info, (SymbolsDef *) stmt); - break; - case STMT_VAR: - ok = HandleGlobalVar(info, (VarDef *) stmt); - break; - case STMT_VMOD: - ok = HandleVModDef(info->ctx, &info->mods, (VModDef *) stmt, merge); - break; - case STMT_MODMAP: - ok = HandleModMapDef(info, (ModMapDef *) stmt); - break; - default: - log_err(info->ctx, - "Symbols files may not include other types; " - "Ignoring %s\n", stmt_type_to_string(stmt->type)); - ok = false; - break; - } - - if (!ok) - info->errorCount++; - - if (info->errorCount > 10) { - log_err(info->ctx, "Abandoning symbols file \"%s\"\n", - file->name); - break; - } - } -} - -/** - * Given a keysym @sym, return a key which generates it, or NULL. - * This is used for example in a modifier map definition, such as: - * modifier_map Lock { Caps_Lock }; - * where we want to add the Lock modifier to the modmap of the key - * which matches the keysym Caps_Lock. - * Since there can be many keys which generates the keysym, the key - * is chosen first by lowest group in which the keysym appears, than - * by lowest level and than by lowest key code. - */ -static struct xkb_key * -FindKeyForSymbol(struct xkb_keymap *keymap, xkb_keysym_t sym) -{ - struct xkb_key *key; - xkb_layout_index_t group; - bool got_one_group, got_one_level; - - group = 0; - do { - xkb_level_index_t level = 0; - got_one_group = false; - do { - got_one_level = false; - xkb_keys_foreach(key, keymap) { - if (group < key->num_groups && - level < XkbKeyNumLevels(key, group)) { - got_one_group = got_one_level = true; - if (key->groups[group].levels[level].num_syms == 1 && - key->groups[group].levels[level].u.sym == sym) - return key; - } - } - level++; - } while (got_one_level); - group++; - } while (got_one_group); - - return NULL; -} - -/* - * Find an appropriate type for a group and return its name. - * - * Simple recipe: - * - ONE_LEVEL for width 0/1 - * - ALPHABETIC for 2 shift levels, with lower/upercase keysyms - * - KEYPAD for keypad keys. - * - TWO_LEVEL for other 2 shift level keys. - * and the same for four level keys. - * - * FIXME: Decide how to handle multiple-syms-per-level, and do it. - */ -static xkb_atom_t -FindAutomaticType(struct xkb_context *ctx, GroupInfo *groupi) -{ - xkb_keysym_t sym0, sym1; - const xkb_level_index_t width = darray_size(groupi->levels); - -#define GET_SYM(level) \ - (darray_item(groupi->levels, level).num_syms == 0 ? \ - XKB_KEY_NoSymbol : \ - darray_item(groupi->levels, level).num_syms == 1 ? \ - darray_item(groupi->levels, level).u.sym : \ - /* num_syms > 1 */ \ - darray_item(groupi->levels, level).u.syms[0]) - - if (width == 1 || width <= 0) - return xkb_atom_intern_literal(ctx, "ONE_LEVEL"); - - sym0 = GET_SYM(0); - sym1 = GET_SYM(1); - - if (width == 2) { - if (xkb_keysym_is_lower(sym0) && xkb_keysym_is_upper(sym1)) - return xkb_atom_intern_literal(ctx, "ALPHABETIC"); - - if (xkb_keysym_is_keypad(sym0) || xkb_keysym_is_keypad(sym1)) - return xkb_atom_intern_literal(ctx, "KEYPAD"); - - return xkb_atom_intern_literal(ctx, "TWO_LEVEL"); - } - - if (width <= 4) { - if (xkb_keysym_is_lower(sym0) && xkb_keysym_is_upper(sym1)) { - xkb_keysym_t sym2, sym3; - sym2 = GET_SYM(2); - sym3 = (width == 4 ? GET_SYM(3) : XKB_KEY_NoSymbol); - - if (xkb_keysym_is_lower(sym2) && xkb_keysym_is_upper(sym3)) - return xkb_atom_intern_literal(ctx, "FOUR_LEVEL_ALPHABETIC"); - - return xkb_atom_intern_literal(ctx, "FOUR_LEVEL_SEMIALPHABETIC"); - } - - if (xkb_keysym_is_keypad(sym0) || xkb_keysym_is_keypad(sym1)) - return xkb_atom_intern_literal(ctx, "FOUR_LEVEL_KEYPAD"); - - return xkb_atom_intern_literal(ctx, "FOUR_LEVEL"); - } - - return XKB_ATOM_NONE; - -#undef GET_SYM -} - -static const struct xkb_key_type * -FindTypeForGroup(struct xkb_keymap *keymap, KeyInfo *keyi, - xkb_layout_index_t group, bool *explicit_type) -{ - unsigned int i; - GroupInfo *groupi = &darray_item(keyi->groups, group); - xkb_atom_t type_name = groupi->type; - - *explicit_type = true; - - if (type_name == XKB_ATOM_NONE) { - if (keyi->default_type != XKB_ATOM_NONE) { - type_name = keyi->default_type; - } - else { - type_name = FindAutomaticType(keymap->ctx, groupi); - if (type_name != XKB_ATOM_NONE) - *explicit_type = false; - } - } - - if (type_name == XKB_ATOM_NONE) { - log_warn(keymap->ctx, - "Couldn't find an automatic type for key '%s' group %d with %lu levels; " - "Using the default type\n", - KeyNameText(keymap->ctx, keyi->name), group + 1, - (unsigned long) darray_size(groupi->levels)); - goto use_default; - } - - for (i = 0; i < keymap->num_types; i++) - if (keymap->types[i].name == type_name) - break; - - if (i >= keymap->num_types) { - log_warn(keymap->ctx, - "The type \"%s\" for key '%s' group %d was not previously defined; " - "Using the default type\n", - xkb_atom_text(keymap->ctx, type_name), - KeyNameText(keymap->ctx, keyi->name), group + 1); - goto use_default; - } - - return &keymap->types[i]; - -use_default: - /* - * Index 0 is guaranteed to contain something, usually - * ONE_LEVEL or at least some default one-level type. - */ - return &keymap->types[0]; -} - -static bool -CopySymbolsDefToKeymap(struct xkb_keymap *keymap, SymbolsInfo *info, - KeyInfo *keyi) -{ - struct xkb_key *key; - GroupInfo *groupi; - const GroupInfo *group0; - xkb_layout_index_t i; - - /* - * The name is guaranteed to be real and not an alias (see - * AddKeySymbols), so 'false' is safe here. - */ - key = XkbKeyByName(keymap, keyi->name, false); - if (!key) { - log_vrb(info->ctx, 5, - "Key %s not found in keycodes; Symbols ignored\n", - KeyInfoText(info, keyi)); - return false; - } - - /* Find the range of groups we need. */ - key->num_groups = 0; - darray_enumerate(i, groupi, keyi->groups) - if (groupi->defined) - key->num_groups = i + 1; - - if (key->num_groups <= 0) - return false; /* WSGO */ - - darray_resize(keyi->groups, key->num_groups); - - /* - * If there are empty groups between non-empty ones, fill them with data - * from the first group. - * We can make a wrong assumption here. But leaving gaps is worse. - */ - group0 = &darray_item(keyi->groups, 0); - darray_foreach_from(groupi, keyi->groups, 1) { - if (groupi->defined) - continue; - - CopyGroupInfo(groupi, group0); - } - - key->groups = calloc(key->num_groups, sizeof(*key->groups)); - - /* Find and assign the groups' types in the keymap. */ - darray_enumerate(i, groupi, keyi->groups) { - const struct xkb_key_type *type; - bool explicit_type; - - type = FindTypeForGroup(keymap, keyi, i, &explicit_type); - - /* Always have as many levels as the type specifies. */ - if (type->num_levels < darray_size(groupi->levels)) { - struct xkb_level *leveli; - - log_vrb(info->ctx, 1, - "Type \"%s\" has %d levels, but %s has %d levels; " - "Ignoring extra symbols\n", - xkb_atom_text(keymap->ctx, type->name), type->num_levels, - KeyInfoText(info, keyi), - (int) darray_size(groupi->levels)); - - darray_foreach_from(leveli, groupi->levels, type->num_levels) - ClearLevelInfo(leveli); - } - darray_resize0(groupi->levels, type->num_levels); - - key->groups[i].explicit_type = explicit_type; - key->groups[i].type = type; - } - - /* Copy levels. */ - darray_enumerate(i, groupi, keyi->groups) - darray_steal(groupi->levels, &key->groups[i].levels, NULL); - - key->out_of_range_group_number = keyi->out_of_range_group_number; - key->out_of_range_group_action = keyi->out_of_range_group_action; - - if (keyi->defined & KEY_FIELD_VMODMAP) { - key->vmodmap = keyi->vmodmap; - key->explicit |= EXPLICIT_VMODMAP; - } - - if (keyi->repeat != KEY_REPEAT_UNDEFINED) { - key->repeats = (keyi->repeat == KEY_REPEAT_YES); - key->explicit |= EXPLICIT_REPEAT; - } - - darray_foreach(groupi, keyi->groups) { - if (groupi->defined & GROUP_FIELD_ACTS) { - key->explicit |= EXPLICIT_INTERP; - break; - } - } - - return true; -} - -static bool -CopyModMapDefToKeymap(struct xkb_keymap *keymap, SymbolsInfo *info, - ModMapEntry *entry) -{ - struct xkb_key *key; - - if (!entry->haveSymbol) { - key = XkbKeyByName(keymap, entry->u.keyName, true); - if (!key) { - log_vrb(info->ctx, 5, - "Key %s not found in keycodes; " - "Modifier map entry for %s not updated\n", - KeyNameText(info->ctx, entry->u.keyName), - ModIndexText(info->ctx, &info->mods, entry->modifier)); - return false; - } - } - else { - key = FindKeyForSymbol(keymap, entry->u.keySym); - if (!key) { - log_vrb(info->ctx, 5, - "Key \"%s\" not found in symbol map; " - "Modifier map entry for %s not updated\n", - KeysymText(info->ctx, entry->u.keySym), - ModIndexText(info->ctx, &info->mods, entry->modifier)); - return false; - } - } - - key->modmap |= (1u << entry->modifier); - return true; -} - -static bool -CopySymbolsToKeymap(struct xkb_keymap *keymap, SymbolsInfo *info) -{ - KeyInfo *keyi; - ModMapEntry *mm; - - keymap->symbols_section_name = strdup_safe(info->name); - XkbEscapeMapName(keymap->symbols_section_name); - - keymap->mods = info->mods; - - darray_steal(info->group_names, - &keymap->group_names, &keymap->num_group_names); - - darray_foreach(keyi, info->keys) - if (!CopySymbolsDefToKeymap(keymap, info, keyi)) - info->errorCount++; - - if (xkb_context_get_log_verbosity(keymap->ctx) > 3) { - struct xkb_key *key; - - xkb_keys_foreach(key, keymap) { - if (key->name == XKB_ATOM_NONE) - continue; - - if (key->num_groups < 1) - log_info(info->ctx, - "No symbols defined for %s\n", - KeyNameText(info->ctx, key->name)); - } - } - - darray_foreach(mm, info->modmaps) - if (!CopyModMapDefToKeymap(keymap, info, mm)) - info->errorCount++; - - /* XXX: If we don't ignore errorCount, things break. */ - return true; -} - -bool -CompileSymbols(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge) -{ - SymbolsInfo info; - ActionsInfo *actions; - - actions = NewActionsInfo(); - if (!actions) - return false; - - InitSymbolsInfo(&info, keymap, actions, &keymap->mods); - info.default_key.merge = merge; - - HandleSymbolsFile(&info, file, merge); - - if (info.errorCount != 0) - goto err_info; - - if (!CopySymbolsToKeymap(keymap, &info)) - goto err_info; - - ClearSymbolsInfo(&info); - FreeActionsInfo(actions); - return true; - -err_info: - FreeActionsInfo(actions); - ClearSymbolsInfo(&info); - return false; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/types.c b/src/3rdparty/xkbcommon/src/xkbcomp/types.c deleted file mode 100644 index e85b67e893..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/types.c +++ /dev/null @@ -1,742 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#include "xkbcomp-priv.h" -#include "text.h" -#include "vmod.h" -#include "expr.h" -#include "include.h" - -enum type_field { - TYPE_FIELD_MASK = (1 << 0), - TYPE_FIELD_MAP = (1 << 1), - TYPE_FIELD_PRESERVE = (1 << 2), - TYPE_FIELD_LEVEL_NAME = (1 << 3), -}; - -typedef struct { - enum type_field defined; - enum merge_mode merge; - - xkb_atom_t name; - xkb_mod_mask_t mods; - xkb_level_index_t num_levels; - darray(struct xkb_key_type_entry) entries; - darray(xkb_atom_t) level_names; -} KeyTypeInfo; - -typedef struct { - char *name; - int errorCount; - - darray(KeyTypeInfo) types; - struct xkb_mod_set mods; - - struct xkb_context *ctx; -} KeyTypesInfo; - -/***====================================================================***/ - -static inline const char * -MapEntryTxt(KeyTypesInfo *info, struct xkb_key_type_entry *entry) -{ - return ModMaskText(info->ctx, &info->mods, entry->mods.mods); -} - -static inline const char * -TypeTxt(KeyTypesInfo *info, KeyTypeInfo *type) -{ - return xkb_atom_text(info->ctx, type->name); -} - -static inline const char * -TypeMaskTxt(KeyTypesInfo *info, KeyTypeInfo *type) -{ - return ModMaskText(info->ctx, &info->mods, type->mods); -} - -static inline bool -ReportTypeShouldBeArray(KeyTypesInfo *info, KeyTypeInfo *type, - const char *field) -{ - return ReportShouldBeArray(info->ctx, "key type", field, - TypeTxt(info, type)); -} - -static inline bool -ReportTypeBadType(KeyTypesInfo *info, KeyTypeInfo *type, - const char *field, const char *wanted) -{ - return ReportBadType(info->ctx, "key type", field, - TypeTxt(info, type), wanted); -} - -/***====================================================================***/ - -static void -InitKeyTypesInfo(KeyTypesInfo *info, struct xkb_context *ctx, - const struct xkb_mod_set *mods) -{ - memset(info, 0, sizeof(*info)); - info->ctx = ctx; - info->mods = *mods; -} - -static void -ClearKeyTypeInfo(KeyTypeInfo *type) -{ - darray_free(type->entries); - darray_free(type->level_names); -} - -static void -ClearKeyTypesInfo(KeyTypesInfo *info) -{ - free(info->name); - darray_free(info->types); -} - -static KeyTypeInfo * -FindMatchingKeyType(KeyTypesInfo *info, xkb_atom_t name) -{ - KeyTypeInfo *old; - - darray_foreach(old, info->types) - if (old->name == name) - return old; - - return NULL; -} - -static bool -AddKeyType(KeyTypesInfo *info, KeyTypeInfo *new, bool same_file) -{ - KeyTypeInfo *old; - const int verbosity = xkb_context_get_log_verbosity(info->ctx); - - old = FindMatchingKeyType(info, new->name); - if (old) { - if (new->merge == MERGE_REPLACE || new->merge == MERGE_OVERRIDE) { - if ((same_file && verbosity > 0) || verbosity > 9) { - log_warn(info->ctx, - "Multiple definitions of the %s key type; " - "Earlier definition ignored\n", - xkb_atom_text(info->ctx, new->name)); - } - - ClearKeyTypeInfo(old); - *old = *new; - darray_init(new->entries); - darray_init(new->level_names); - return true; - } - - if (same_file) - log_vrb(info->ctx, 4, - "Multiple definitions of the %s key type; " - "Later definition ignored\n", - xkb_atom_text(info->ctx, new->name)); - - ClearKeyTypeInfo(new); - return true; - } - - darray_append(info->types, *new); - return true; -} - -/***====================================================================***/ - -static void -MergeIncludedKeyTypes(KeyTypesInfo *into, KeyTypesInfo *from, - enum merge_mode merge) -{ - if (from->errorCount > 0) { - into->errorCount += from->errorCount; - return; - } - - into->mods = from->mods; - - if (into->name == NULL) { - into->name = from->name; - from->name = NULL; - } - - if (darray_empty(into->types)) { - into->types = from->types; - darray_init(from->types); - } - else { - KeyTypeInfo *type; - darray_foreach(type, from->types) { - type->merge = (merge == MERGE_DEFAULT ? type->merge : merge); - if (!AddKeyType(into, type, false)) - into->errorCount++; - } - } -} - -static void -HandleKeyTypesFile(KeyTypesInfo *info, XkbFile *file, enum merge_mode merge); - -static bool -HandleIncludeKeyTypes(KeyTypesInfo *info, IncludeStmt *include) -{ - KeyTypesInfo included; - - InitKeyTypesInfo(&included, info->ctx, &info->mods); - included.name = include->stmt; - include->stmt = NULL; - - for (IncludeStmt *stmt = include; stmt; stmt = stmt->next_incl) { - KeyTypesInfo next_incl; - XkbFile *file; - - file = ProcessIncludeFile(info->ctx, stmt, FILE_TYPE_TYPES); - if (!file) { - info->errorCount += 10; - ClearKeyTypesInfo(&included); - return false; - } - - InitKeyTypesInfo(&next_incl, info->ctx, &included.mods); - - HandleKeyTypesFile(&next_incl, file, stmt->merge); - - MergeIncludedKeyTypes(&included, &next_incl, stmt->merge); - - ClearKeyTypesInfo(&next_incl); - FreeXkbFile(file); - } - - MergeIncludedKeyTypes(info, &included, include->merge); - ClearKeyTypesInfo(&included); - - return (info->errorCount == 0); -} - -/***====================================================================***/ - -static bool -SetModifiers(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx, - ExprDef *value) -{ - xkb_mod_mask_t mods; - - if (arrayNdx) - log_warn(info->ctx, - "The modifiers field of a key type is not an array; " - "Illegal array subscript ignored\n"); - - if (!ExprResolveModMask(info->ctx, value, MOD_BOTH, &info->mods, &mods)) { - log_err(info->ctx, - "Key type mask field must be a modifier mask; " - "Key type definition ignored\n"); - return false; - } - - if (type->defined & TYPE_FIELD_MASK) { - log_warn(info->ctx, - "Multiple modifier mask definitions for key type %s; " - "Using %s, ignoring %s\n", - xkb_atom_text(info->ctx, type->name), - TypeMaskTxt(info, type), - ModMaskText(info->ctx, &info->mods, mods)); - return false; - } - - type->mods = mods; - return true; -} - -/***====================================================================***/ - -static struct xkb_key_type_entry * -FindMatchingMapEntry(KeyTypeInfo *type, xkb_mod_mask_t mods) -{ - struct xkb_key_type_entry *entry; - - darray_foreach(entry, type->entries) - if (entry->mods.mods == mods) - return entry; - - return NULL; -} - -static bool -AddMapEntry(KeyTypesInfo *info, KeyTypeInfo *type, - struct xkb_key_type_entry *new, bool clobber, bool report) -{ - struct xkb_key_type_entry *old; - - old = FindMatchingMapEntry(type, new->mods.mods); - if (old) { - if (report && old->level != new->level) { - log_warn(info->ctx, - "Multiple map entries for %s in %s; " - "Using %d, ignoring %d\n", - MapEntryTxt(info, new), TypeTxt(info, type), - (clobber ? new->level : old->level) + 1, - (clobber ? old->level : new->level) + 1); - } - else { - log_vrb(info->ctx, 10, - "Multiple occurrences of map[%s]= %d in %s; Ignored\n", - MapEntryTxt(info, new), new->level + 1, - TypeTxt(info, type)); - return true; - } - - if (clobber) { - if (new->level >= type->num_levels) - type->num_levels = new->level + 1; - old->level = new->level; - } - - return true; - } - - if (new->level >= type->num_levels) - type->num_levels = new->level + 1; - - darray_append(type->entries, *new); - return true; -} - -static bool -SetMapEntry(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx, - ExprDef *value) -{ - struct xkb_key_type_entry entry; - - if (arrayNdx == NULL) - return ReportTypeShouldBeArray(info, type, "map entry"); - - if (!ExprResolveModMask(info->ctx, arrayNdx, MOD_BOTH, &info->mods, - &entry.mods.mods)) - return ReportTypeBadType(info, type, "map entry", "modifier mask"); - - if (entry.mods.mods & (~type->mods)) { - log_vrb(info->ctx, 1, - "Map entry for unused modifiers in %s; " - "Using %s instead of %s\n", - TypeTxt(info, type), - ModMaskText(info->ctx, &info->mods, - entry.mods.mods & type->mods), - MapEntryTxt(info, &entry)); - entry.mods.mods &= type->mods; - } - - if (!ExprResolveLevel(info->ctx, value, &entry.level)) { - log_err(info->ctx, - "Level specifications in a key type must be integer; " - "Ignoring malformed level specification\n"); - return false; - } - - entry.preserve.mods = 0; - - return AddMapEntry(info, type, &entry, true, true); -} - -/***====================================================================***/ - -static bool -AddPreserve(KeyTypesInfo *info, KeyTypeInfo *type, - xkb_mod_mask_t mods, xkb_mod_mask_t preserve_mods) -{ - struct xkb_key_type_entry *entry; - struct xkb_key_type_entry new; - - darray_foreach(entry, type->entries) { - if (entry->mods.mods != mods) - continue; - - /* Map exists without previous preserve (or "None"); override. */ - if (entry->preserve.mods == 0) { - entry->preserve.mods = preserve_mods; - return true; - } - - /* Map exists with same preserve; do nothing. */ - if (entry->preserve.mods == preserve_mods) { - log_vrb(info->ctx, 10, - "Identical definitions for preserve[%s] in %s; " - "Ignored\n", - ModMaskText(info->ctx, &info->mods, mods), - TypeTxt(info, type)); - return true; - } - - /* Map exists with different preserve; latter wins. */ - log_vrb(info->ctx, 1, - "Multiple definitions for preserve[%s] in %s; " - "Using %s, ignoring %s\n", - ModMaskText(info->ctx, &info->mods, mods), - TypeTxt(info, type), - ModMaskText(info->ctx, &info->mods, preserve_mods), - ModMaskText(info->ctx, &info->mods, entry->preserve.mods)); - - entry->preserve.mods = preserve_mods; - return true; - } - - /* - * Map does not exist, i.e. preserve[] came before map[]. - * Create a map with the specified mask mapping to Level1. The level - * may be overridden later with an explicit map[] statement. - */ - new.level = 0; - new.mods.mods = mods; - new.preserve.mods = preserve_mods; - darray_append(type->entries, new); - return true; -} - -static bool -SetPreserve(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx, - ExprDef *value) -{ - xkb_mod_mask_t mods, preserve_mods; - - if (arrayNdx == NULL) - return ReportTypeShouldBeArray(info, type, "preserve entry"); - - if (!ExprResolveModMask(info->ctx, arrayNdx, MOD_BOTH, &info->mods, &mods)) - return ReportTypeBadType(info, type, "preserve entry", - "modifier mask"); - - if (mods & ~type->mods) { - const char *before, *after; - - before = ModMaskText(info->ctx, &info->mods, mods); - mods &= type->mods; - after = ModMaskText(info->ctx, &info->mods, mods); - - log_vrb(info->ctx, 1, - "Preserve for modifiers not used by the %s type; " - "Index %s converted to %s\n", - TypeTxt(info, type), before, after); - } - - if (!ExprResolveModMask(info->ctx, value, MOD_BOTH, &info->mods, - &preserve_mods)) { - log_err(info->ctx, - "Preserve value in a key type is not a modifier mask; " - "Ignoring preserve[%s] in type %s\n", - ModMaskText(info->ctx, &info->mods, mods), - TypeTxt(info, type)); - return false; - } - - if (preserve_mods & ~mods) { - const char *before, *after; - - before = ModMaskText(info->ctx, &info->mods, preserve_mods); - preserve_mods &= mods; - after = ModMaskText(info->ctx, &info->mods, preserve_mods); - - log_vrb(info->ctx, 1, - "Illegal value for preserve[%s] in type %s; " - "Converted %s to %s\n", - ModMaskText(info->ctx, &info->mods, mods), - TypeTxt(info, type), before, after); - } - - return AddPreserve(info, type, mods, preserve_mods); -} - -/***====================================================================***/ - -static bool -AddLevelName(KeyTypesInfo *info, KeyTypeInfo *type, - xkb_level_index_t level, xkb_atom_t name, bool clobber) -{ - /* New name. */ - if (level >= darray_size(type->level_names)) { - darray_resize0(type->level_names, level + 1); - goto finish; - } - - /* Same level, same name. */ - if (darray_item(type->level_names, level) == name) { - log_vrb(info->ctx, 10, - "Duplicate names for level %d of key type %s; Ignored\n", - level + 1, TypeTxt(info, type)); - return true; - } - - /* Same level, different name. */ - if (darray_item(type->level_names, level) != XKB_ATOM_NONE) { - const char *old, *new; - old = xkb_atom_text(info->ctx, - darray_item(type->level_names, level)); - new = xkb_atom_text(info->ctx, name); - log_vrb(info->ctx, 1, - "Multiple names for level %d of key type %s; " - "Using %s, ignoring %s\n", - level + 1, TypeTxt(info, type), - (clobber ? new : old), (clobber ? old : new)); - - if (!clobber) - return true; - } - - /* XXX: What about different level, same name? */ - -finish: - darray_item(type->level_names, level) = name; - return true; -} - -static bool -SetLevelName(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx, - ExprDef *value) -{ - xkb_level_index_t level; - xkb_atom_t level_name; - - if (arrayNdx == NULL) - return ReportTypeShouldBeArray(info, type, "level name"); - - if (!ExprResolveLevel(info->ctx, arrayNdx, &level)) - return ReportTypeBadType(info, type, "level name", "integer"); - - if (!ExprResolveString(info->ctx, value, &level_name)) { - log_err(info->ctx, - "Non-string name for level %d in key type %s; " - "Ignoring illegal level name definition\n", - level + 1, xkb_atom_text(info->ctx, type->name)); - return false; - } - - return AddLevelName(info, type, level, level_name, true); -} - -/***====================================================================***/ - -static bool -SetKeyTypeField(KeyTypesInfo *info, KeyTypeInfo *type, - const char *field, ExprDef *arrayNdx, ExprDef *value) -{ - bool ok = false; - enum type_field type_field = 0; - - if (istreq(field, "modifiers")) { - type_field = TYPE_FIELD_MASK; - ok = SetModifiers(info, type, arrayNdx, value); - } - else if (istreq(field, "map")) { - type_field = TYPE_FIELD_MAP; - ok = SetMapEntry(info, type, arrayNdx, value); - } - else if (istreq(field, "preserve")) { - type_field = TYPE_FIELD_PRESERVE; - ok = SetPreserve(info, type, arrayNdx, value); - } - else if (istreq(field, "levelname") || istreq(field, "level_name")) { - type_field = TYPE_FIELD_LEVEL_NAME; - ok = SetLevelName(info, type, arrayNdx, value); - } else { - log_err(info->ctx, - "Unknown field %s in key type %s; Definition ignored\n", - field, TypeTxt(info, type)); - } - - type->defined |= type_field; - return ok; -} - -static bool -HandleKeyTypeBody(KeyTypesInfo *info, VarDef *def, KeyTypeInfo *type) -{ - bool ok = true; - const char *elem, *field; - ExprDef *arrayNdx; - - for (; def; def = (VarDef *) def->common.next) { - ok = ExprResolveLhs(info->ctx, def->name, &elem, &field, - &arrayNdx); - if (!ok) - continue; - - if (elem && istreq(elem, "type")) { - log_err(info->ctx, - "Support for changing the default type has been removed; " - "Statement ignored\n"); - continue; - } - - ok = SetKeyTypeField(info, type, field, arrayNdx, def->value); - } - - return ok; -} - -static bool -HandleKeyTypeDef(KeyTypesInfo *info, KeyTypeDef *def, enum merge_mode merge) -{ - KeyTypeInfo type = { - .defined = 0, - .merge = (def->merge == MERGE_DEFAULT ? merge : def->merge), - .name = def->name, - .mods = 0, - .num_levels = 1, - .entries = darray_new(), - .level_names = darray_new(), - }; - - if (!HandleKeyTypeBody(info, def->body, &type)) { - info->errorCount++; - return false; - } - - if (!AddKeyType(info, &type, true)) { - info->errorCount++; - return false; - } - - return true; -} - -static void -HandleKeyTypesFile(KeyTypesInfo *info, XkbFile *file, enum merge_mode merge) -{ - bool ok; - - free(info->name); - info->name = strdup_safe(file->name); - - for (ParseCommon *stmt = file->defs; stmt; stmt = stmt->next) { - switch (stmt->type) { - case STMT_INCLUDE: - ok = HandleIncludeKeyTypes(info, (IncludeStmt *) stmt); - break; - case STMT_TYPE: - ok = HandleKeyTypeDef(info, (KeyTypeDef *) stmt, merge); - break; - case STMT_VAR: - log_err(info->ctx, - "Support for changing the default type has been removed; " - "Statement ignored\n"); - ok = true; - break; - case STMT_VMOD: - ok = HandleVModDef(info->ctx, &info->mods, (VModDef *) stmt, merge); - break; - default: - log_err(info->ctx, - "Key type files may not include other declarations; " - "Ignoring %s\n", stmt_type_to_string(stmt->type)); - ok = false; - break; - } - - if (!ok) - info->errorCount++; - - if (info->errorCount > 10) { - log_err(info->ctx, - "Abandoning keytypes file \"%s\"\n", file->name); - break; - } - } -} - -/***====================================================================***/ - -static bool -CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info) -{ - unsigned num_types; - struct xkb_key_type *types; - - num_types = darray_empty(info->types) ? 1 : darray_size(info->types); - types = calloc(num_types, sizeof(*types)); - if (!types) - return false; - - /* - * If no types were specified, a default unnamed one-level type is - * used for all keys. - */ - if (darray_empty(info->types)) { - struct xkb_key_type *type = &types[0]; - - type->mods.mods = 0; - type->num_levels = 1; - type->entries = NULL; - type->num_entries = 0; - type->name = xkb_atom_intern_literal(keymap->ctx, "default"); - type->level_names = NULL; - type->num_level_names = 0; - } - else { - for (unsigned i = 0; i < num_types; i++) { - KeyTypeInfo *def = &darray_item(info->types, i); - struct xkb_key_type *type = &types[i]; - - type->name = def->name; - type->mods.mods = def->mods; - type->num_levels = def->num_levels; - darray_steal(def->level_names, &type->level_names, &type->num_level_names); - darray_steal(def->entries, &type->entries, &type->num_entries); - } - } - - keymap->types_section_name = strdup_safe(info->name); - XkbEscapeMapName(keymap->types_section_name); - keymap->num_types = num_types; - keymap->types = types; - keymap->mods = info->mods; - return true; -} - -/***====================================================================***/ - -bool -CompileKeyTypes(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge) -{ - KeyTypesInfo info; - - InitKeyTypesInfo(&info, keymap->ctx, &keymap->mods); - - HandleKeyTypesFile(&info, file, merge); - if (info.errorCount != 0) - goto err_info; - - if (!CopyKeyTypesToKeymap(keymap, &info)) - goto err_info; - - ClearKeyTypesInfo(&info); - return true; - -err_info: - ClearKeyTypesInfo(&info); - return false; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/vmod.c b/src/3rdparty/xkbcommon/src/xkbcomp/vmod.c deleted file mode 100644 index a0b029af4f..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/vmod.c +++ /dev/null @@ -1,105 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#include "xkbcomp-priv.h" -#include "text.h" -#include "expr.h" -#include "vmod.h" - -bool -HandleVModDef(struct xkb_context *ctx, struct xkb_mod_set *mods, - VModDef *stmt, enum merge_mode merge) -{ - xkb_mod_index_t i; - struct xkb_mod *mod; - xkb_mod_mask_t mapping; - - merge = (merge == MERGE_DEFAULT ? stmt->merge : merge); - - if (stmt->value) { - /* - * This is a statement such as 'virtualModifiers NumLock = Mod1'; - * it sets the vmod-to-real-mod[s] mapping directly instead of going - * through modifier_map or some such. - */ - if (!ExprResolveModMask(ctx, stmt->value, MOD_REAL, mods, &mapping)) { - log_err(ctx, - "Declaration of %s ignored\n", - xkb_atom_text(ctx, stmt->name)); - return false; - } - } - else { - mapping = 0; - } - - xkb_mods_enumerate(i, mod, mods) { - if (mod->name == stmt->name) { - if (mod->type != MOD_VIRT) { - log_err(ctx, - "Can't add a virtual modifier named \"%s\"; " - "there is already a non-virtual modifier with this name! Ignored\n", - xkb_atom_text(ctx, mod->name)); - return false; - } - - if (mod->mapping == mapping) - return true; - - if (mod->mapping != 0) { - xkb_mod_mask_t use, ignore; - - use = (merge == MERGE_OVERRIDE ? mapping : mod->mapping); - ignore = (merge == MERGE_OVERRIDE ? mod->mapping : mapping); - - log_warn(ctx, - "Virtual modifier %s defined multiple times; " - "Using %s, ignoring %s\n", - xkb_atom_text(ctx, stmt->name), - ModMaskText(ctx, mods, use), - ModMaskText(ctx, mods, ignore)); - - mapping = use; - } - - mod->mapping = mapping; - return true; - } - } - - if (mods->num_mods >= XKB_MAX_MODS) { - log_err(ctx, - "Too many modifiers defined (maximum %d)\n", - XKB_MAX_MODS); - return false; - } - - mods->mods[mods->num_mods].name = stmt->name; - mods->mods[mods->num_mods].type = MOD_VIRT; - mods->mods[mods->num_mods].mapping = mapping; - mods->num_mods++; - return true; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/vmod.h b/src/3rdparty/xkbcommon/src/xkbcomp/vmod.h deleted file mode 100644 index 546cf7ee42..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/vmod.h +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#ifndef XKBCOMP_VMOD_H -#define XKBCOMP_VMOD_H - -bool -HandleVModDef(struct xkb_context *ctx, struct xkb_mod_set *mods, - VModDef *stmt, enum merge_mode merge); - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-keymap.c b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-keymap.c deleted file mode 100644 index e95e50c371..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-keymap.c +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright © 2009 Dan Nicholson - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Dan Nicholson - * Daniel Stone - * Ran Benita - */ - -#include "xkbcomp-priv.h" - -static void -ComputeEffectiveMask(struct xkb_keymap *keymap, struct xkb_mods *mods) -{ - mods->mask = mod_mask_get_effective(keymap, mods->mods); -} - -static void -UpdateActionMods(struct xkb_keymap *keymap, union xkb_action *act, - xkb_mod_mask_t modmap) -{ - switch (act->type) { - case ACTION_TYPE_MOD_SET: - case ACTION_TYPE_MOD_LATCH: - case ACTION_TYPE_MOD_LOCK: - if (act->mods.flags & ACTION_MODS_LOOKUP_MODMAP) - act->mods.mods.mods = modmap; - ComputeEffectiveMask(keymap, &act->mods.mods); - break; - default: - break; - } -} - -static const struct xkb_sym_interpret default_interpret = { - .sym = XKB_KEY_NoSymbol, - .repeat = true, - .match = MATCH_ANY_OR_NONE, - .mods = 0, - .virtual_mod = XKB_MOD_INVALID, - .action = { .type = ACTION_TYPE_NONE }, -}; - -/** - * Find an interpretation which applies to this particular level, either by - * finding an exact match for the symbol and modifier combination, or a - * generic XKB_KEY_NoSymbol match. - */ -static const struct xkb_sym_interpret * -FindInterpForKey(struct xkb_keymap *keymap, const struct xkb_key *key, - xkb_layout_index_t group, xkb_level_index_t level) -{ - const xkb_keysym_t *syms; - int num_syms; - - num_syms = xkb_keymap_key_get_syms_by_level(keymap, key->keycode, group, - level, &syms); - if (num_syms == 0) - return NULL; - - /* - * There may be multiple matchings interprets; we should always return - * the most specific. Here we rely on compat.c to set up the - * sym_interprets array from the most specific to the least specific, - * such that when we find a match we return immediately. - */ - for (unsigned i = 0; i < keymap->num_sym_interprets; i++) { - const struct xkb_sym_interpret *interp = &keymap->sym_interprets[i]; - - xkb_mod_mask_t mods; - bool found = false; - - if ((num_syms > 1 || interp->sym != syms[0]) && - interp->sym != XKB_KEY_NoSymbol) - continue; - - if (interp->level_one_only && level != 0) - mods = 0; - else - mods = key->modmap; - - switch (interp->match) { - case MATCH_NONE: - found = !(interp->mods & mods); - break; - case MATCH_ANY_OR_NONE: - found = (!mods || (interp->mods & mods)); - break; - case MATCH_ANY: - found = (interp->mods & mods); - break; - case MATCH_ALL: - found = ((interp->mods & mods) == interp->mods); - break; - case MATCH_EXACTLY: - found = (interp->mods == mods); - break; - } - - if (found) - return interp; - } - - return &default_interpret; -} - -static bool -ApplyInterpsToKey(struct xkb_keymap *keymap, struct xkb_key *key) -{ - xkb_mod_mask_t vmodmap = 0; - xkb_layout_index_t group; - xkb_level_index_t level; - - /* If we've been told not to bind interps to this key, then don't. */ - if (key->explicit & EXPLICIT_INTERP) - return true; - - for (group = 0; group < key->num_groups; group++) { - for (level = 0; level < XkbKeyNumLevels(key, group); level++) { - const struct xkb_sym_interpret *interp; - - interp = FindInterpForKey(keymap, key, group, level); - if (!interp) - continue; - - /* Infer default key behaviours from the base level. */ - if (group == 0 && level == 0) - if (!(key->explicit & EXPLICIT_REPEAT) && interp->repeat) - key->repeats = true; - - if ((group == 0 && level == 0) || !interp->level_one_only) - if (interp->virtual_mod != XKB_MOD_INVALID) - vmodmap |= (1u << interp->virtual_mod); - - if (interp->action.type != ACTION_TYPE_NONE) - key->groups[group].levels[level].action = interp->action; - } - } - - if (!(key->explicit & EXPLICIT_VMODMAP)) - key->vmodmap = vmodmap; - - return true; -} - -/** - * This collects a bunch of disparate functions which was done in the server - * at various points that really should've been done within xkbcomp. Turns out - * your actions and types are a lot more useful when any of your modifiers - * other than Shift actually do something ... - */ -static bool -UpdateDerivedKeymapFields(struct xkb_keymap *keymap) -{ - struct xkb_key *key; - struct xkb_mod *mod; - struct xkb_led *led; - unsigned int i, j; - - /* Find all the interprets for the key and bind them to actions, - * which will also update the vmodmap. */ - xkb_keys_foreach(key, keymap) - if (!ApplyInterpsToKey(keymap, key)) - return false; - - /* Update keymap->mods, the virtual -> real mod mapping. */ - xkb_keys_foreach(key, keymap) - xkb_mods_enumerate(i, mod, &keymap->mods) - if (key->vmodmap & (1u << i)) - mod->mapping |= key->modmap; - - /* Now update the level masks for all the types to reflect the vmods. */ - for (i = 0; i < keymap->num_types; i++) { - ComputeEffectiveMask(keymap, &keymap->types[i].mods); - - for (j = 0; j < keymap->types[i].num_entries; j++) { - ComputeEffectiveMask(keymap, &keymap->types[i].entries[j].mods); - ComputeEffectiveMask(keymap, &keymap->types[i].entries[j].preserve); - } - } - - /* Update action modifiers. */ - xkb_keys_foreach(key, keymap) - for (i = 0; i < key->num_groups; i++) - for (j = 0; j < XkbKeyNumLevels(key, i); j++) - UpdateActionMods(keymap, &key->groups[i].levels[j].action, - key->modmap); - - /* Update vmod -> led maps. */ - xkb_leds_foreach(led, keymap) - ComputeEffectiveMask(keymap, &led->mods); - - /* Find maximum number of groups out of all keys in the keymap. */ - xkb_keys_foreach(key, keymap) - keymap->num_groups = MAX(keymap->num_groups, key->num_groups); - - return true; -} - -typedef bool (*compile_file_fn)(XkbFile *file, - struct xkb_keymap *keymap, - enum merge_mode merge); - -static const compile_file_fn compile_file_fns[LAST_KEYMAP_FILE_TYPE + 1] = { - [FILE_TYPE_KEYCODES] = CompileKeycodes, - [FILE_TYPE_TYPES] = CompileKeyTypes, - [FILE_TYPE_COMPAT] = CompileCompatMap, - [FILE_TYPE_SYMBOLS] = CompileSymbols, -}; - -bool -CompileKeymap(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge) -{ - bool ok; - XkbFile *files[LAST_KEYMAP_FILE_TYPE + 1] = { NULL }; - enum xkb_file_type type; - struct xkb_context *ctx = keymap->ctx; - - /* Collect section files and check for duplicates. */ - for (file = (XkbFile *) file->defs; file; - file = (XkbFile *) file->common.next) { - if (file->file_type < FIRST_KEYMAP_FILE_TYPE || - file->file_type > LAST_KEYMAP_FILE_TYPE) { - if (file->file_type == FILE_TYPE_GEOMETRY) { - log_vrb(ctx, 1, - "Geometry sections are not supported; ignoring\n"); - } else { - log_err(ctx, "Cannot define %s in a keymap file\n", - xkb_file_type_to_string(file->file_type)); - } - continue; - } - - if (files[file->file_type]) { - log_err(ctx, - "More than one %s section in keymap file; " - "All sections after the first ignored\n", - xkb_file_type_to_string(file->file_type)); - continue; - } - - files[file->file_type] = file; - } - - /* - * Check that all required section were provided. - * Report everything before failing. - */ - ok = true; - for (type = FIRST_KEYMAP_FILE_TYPE; - type <= LAST_KEYMAP_FILE_TYPE; - type++) { - if (files[type] == NULL) { - log_err(ctx, "Required section %s missing from keymap\n", - xkb_file_type_to_string(type)); - ok = false; - } - } - if (!ok) - return false; - - /* Compile sections. */ - for (type = FIRST_KEYMAP_FILE_TYPE; - type <= LAST_KEYMAP_FILE_TYPE; - type++) { - log_dbg(ctx, "Compiling %s \"%s\"\n", - xkb_file_type_to_string(type), files[type]->name); - - ok = compile_file_fns[type](files[type], keymap, merge); - if (!ok) { - log_err(ctx, "Failed to compile %s\n", - xkb_file_type_to_string(type)); - return false; - } - } - - return UpdateDerivedKeymapFields(keymap); -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-parser.c b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-parser.c deleted file mode 100644 index 520cc5b9c5..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-parser.c +++ /dev/null @@ -1,3392 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse _xkbcommon_parse -#define yylex _xkbcommon_lex -#define yyerror _xkbcommon_error -#define yydebug _xkbcommon_debug -#define yynerrs _xkbcommon_nerrs - - -/* Copy the first part of user declarations. */ -#line 33 "../src/xkbcomp/parser.y" /* yacc.c:339 */ - -#include "xkbcomp/xkbcomp-priv.h" -#include "xkbcomp/ast-build.h" -#include "xkbcomp/parser-priv.h" -#include "scanner-utils.h" - -struct parser_param { - struct xkb_context *ctx; - struct scanner *scanner; - XkbFile *rtrn; - bool more_maps; -}; - -#define parser_err(param, fmt, ...) \ - scanner_err((param)->scanner, fmt, ##__VA_ARGS__) - -#define parser_warn(param, fmt, ...) \ - scanner_warn((param)->scanner, fmt, ##__VA_ARGS__) - -static void -_xkbcommon_error(struct parser_param *param, const char *msg) -{ - parser_err(param, "%s", msg); -} - -static bool -resolve_keysym(const char *name, xkb_keysym_t *sym_rtrn) -{ - xkb_keysym_t sym; - - if (!name || istreq(name, "any") || istreq(name, "nosymbol")) { - *sym_rtrn = XKB_KEY_NoSymbol; - return true; - } - - if (istreq(name, "none") || istreq(name, "voidsymbol")) { - *sym_rtrn = XKB_KEY_VoidSymbol; - return true; - } - - sym = xkb_keysym_from_name(name, XKB_KEYSYM_NO_FLAGS); - if (sym != XKB_KEY_NoSymbol) { - *sym_rtrn = sym; - return true; - } - - return false; -} - -#define param_scanner param->scanner - -#line 124 "xkbcommon-internal@sta/parser.c" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "parser.h". */ -#ifndef YY__XKBCOMMON_XKBCOMMON_INTERNAL_STA_PARSER_H_INCLUDED -# define YY__XKBCOMMON_XKBCOMMON_INTERNAL_STA_PARSER_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int _xkbcommon_debug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - END_OF_FILE = 0, - ERROR_TOK = 255, - XKB_KEYMAP = 1, - XKB_KEYCODES = 2, - XKB_TYPES = 3, - XKB_SYMBOLS = 4, - XKB_COMPATMAP = 5, - XKB_GEOMETRY = 6, - XKB_SEMANTICS = 7, - XKB_LAYOUT = 8, - INCLUDE = 10, - OVERRIDE = 11, - AUGMENT = 12, - REPLACE = 13, - ALTERNATE = 14, - VIRTUAL_MODS = 20, - TYPE = 21, - INTERPRET = 22, - ACTION_TOK = 23, - KEY = 24, - ALIAS = 25, - GROUP = 26, - MODIFIER_MAP = 27, - INDICATOR = 28, - SHAPE = 29, - KEYS = 30, - ROW = 31, - SECTION = 32, - OVERLAY = 33, - TEXT = 34, - OUTLINE = 35, - SOLID = 36, - LOGO = 37, - VIRTUAL = 38, - EQUALS = 40, - PLUS = 41, - MINUS = 42, - DIVIDE = 43, - TIMES = 44, - OBRACE = 45, - CBRACE = 46, - OPAREN = 47, - CPAREN = 48, - OBRACKET = 49, - CBRACKET = 50, - DOT = 51, - COMMA = 52, - SEMI = 53, - EXCLAM = 54, - INVERT = 55, - STRING = 60, - INTEGER = 61, - FLOAT = 62, - IDENT = 63, - KEYNAME = 64, - PARTIAL = 70, - DEFAULT = 71, - HIDDEN = 72, - ALPHANUMERIC_KEYS = 73, - MODIFIER_KEYS = 74, - KEYPAD_KEYS = 75, - FUNCTION_KEYS = 76, - ALTERNATE_GROUP = 77 - }; -#endif - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 162 "../src/xkbcomp/parser.y" /* yacc.c:355 */ - - int ival; - int64_t num; - enum xkb_file_type file_type; - char *str; - xkb_atom_t atom; - enum merge_mode merge; - enum xkb_map_flags mapFlags; - xkb_keysym_t keysym; - ParseCommon *any; - ExprDef *expr; - VarDef *var; - VModDef *vmod; - InterpDef *interp; - KeyTypeDef *keyType; - SymbolsDef *syms; - ModMapDef *modMask; - GroupCompatDef *groupCompat; - LedMapDef *ledMap; - LedNameDef *ledName; - KeycodeDef *keyCode; - KeyAliasDef *keyAlias; - void *geom; - XkbFile *file; - -#line 256 "xkbcommon-internal@sta/parser.c" /* yacc.c:355 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -int _xkbcommon_parse (struct parser_param *param); - -#endif /* !YY__XKBCOMMON_XKBCOMMON_INTERNAL_STA_PARSER_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 272 "xkbcommon-internal@sta/parser.c" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 16 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 735 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 65 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 72 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 184 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 334 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 257 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 4, 5, 6, 7, 8, 9, 10, 11, 2, - 12, 13, 14, 15, 16, 2, 2, 2, 2, 2, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 2, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 2, 2, 2, 2, - 52, 53, 54, 55, 56, 2, 2, 2, 2, 2, - 57, 58, 59, 60, 61, 62, 63, 64, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 3, 1, 2 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 241, 241, 243, 245, 249, 255, 256, 257, 260, - 268, 272, 280, 281, 282, 283, 284, 287, 288, 291, - 292, 295, 296, 297, 298, 299, 300, 301, 302, 305, - 307, 310, 315, 320, 325, 330, 335, 340, 345, 350, - 355, 360, 365, 366, 367, 368, 375, 377, 379, 383, - 387, 391, 395, 398, 402, 404, 408, 414, 416, 420, - 423, 427, 433, 439, 442, 444, 447, 448, 449, 450, - 451, 454, 456, 460, 464, 468, 472, 474, 478, 480, - 484, 488, 489, 492, 494, 496, 498, 500, 504, 505, - 508, 509, 513, 514, 517, 519, 523, 527, 528, 531, - 534, 536, 540, 542, 544, 548, 550, 554, 558, 562, - 563, 564, 565, 568, 569, 572, 574, 576, 578, 580, - 582, 584, 586, 588, 590, 592, 596, 597, 600, 601, - 602, 603, 604, 614, 615, 618, 621, 625, 627, 629, - 631, 633, 635, 639, 641, 643, 645, 647, 649, 651, - 653, 657, 660, 664, 668, 670, 672, 674, 678, 680, - 682, 684, 688, 689, 692, 694, 696, 698, 702, 706, - 712, 713, 733, 734, 737, 738, 741, 744, 747, 750, - 751, 754, 757, 758, 761 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 0 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "END_OF_FILE", "error", "$undefined", "ERROR_TOK", "XKB_KEYMAP", - "XKB_KEYCODES", "XKB_TYPES", "XKB_SYMBOLS", "XKB_COMPATMAP", - "XKB_GEOMETRY", "XKB_SEMANTICS", "XKB_LAYOUT", "INCLUDE", "OVERRIDE", - "AUGMENT", "REPLACE", "ALTERNATE", "VIRTUAL_MODS", "TYPE", "INTERPRET", - "ACTION_TOK", "KEY", "ALIAS", "GROUP", "MODIFIER_MAP", "INDICATOR", - "SHAPE", "KEYS", "ROW", "SECTION", "OVERLAY", "TEXT", "OUTLINE", "SOLID", - "LOGO", "VIRTUAL", "EQUALS", "PLUS", "MINUS", "DIVIDE", "TIMES", - "OBRACE", "CBRACE", "OPAREN", "CPAREN", "OBRACKET", "CBRACKET", "DOT", - "COMMA", "SEMI", "EXCLAM", "INVERT", "STRING", "INTEGER", "FLOAT", - "IDENT", "KEYNAME", "PARTIAL", "DEFAULT", "HIDDEN", "ALPHANUMERIC_KEYS", - "MODIFIER_KEYS", "KEYPAD_KEYS", "FUNCTION_KEYS", "ALTERNATE_GROUP", - "$accept", "XkbFile", "XkbCompositeMap", "XkbCompositeType", - "XkbMapConfigList", "XkbMapConfig", "FileType", "OptFlags", "Flags", - "Flag", "DeclList", "Decl", "VarDecl", "KeyNameDecl", "KeyAliasDecl", - "VModDecl", "VModDefList", "VModDef", "InterpretDecl", "InterpretMatch", - "VarDeclList", "KeyTypeDecl", "SymbolsDecl", "SymbolsBody", - "SymbolsVarDecl", "ArrayInit", "GroupCompatDecl", "ModMapDecl", - "LedMapDecl", "LedNameDecl", "ShapeDecl", "SectionDecl", "SectionBody", - "SectionBodyItem", "RowBody", "RowBodyItem", "Keys", "Key", - "OverlayDecl", "OverlayKeyList", "OverlayKey", "OutlineList", - "OutlineInList", "CoordList", "Coord", "DoodadDecl", "DoodadType", - "FieldSpec", "Element", "OptMergeMode", "MergeMode", "OptExprList", - "ExprList", "Expr", "Term", "ActionList", "Action", "Lhs", "Terminal", - "OptKeySymList", "KeySymList", "KeySyms", "KeySym", "SignedNumber", - "Number", "Float", "Integer", "KeyCode", "Ident", "String", "OptMapName", - "MapName", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 255, 1, 2, 3, 4, 5, 6, - 7, 8, 10, 11, 12, 13, 14, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 60, 61, 62, 63, 64, 70, 71, 72, - 73, 74, 75, 76, 77 -}; -# endif - -#define YYPACT_NINF -182 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-182))) - -#define YYTABLE_NINF -180 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 176, -182, -182, -182, -182, -182, -182, -182, -182, -182, - 6, -182, -182, 271, 227, -182, -182, -182, -182, -182, - -182, -182, -182, -182, -182, -38, -38, -182, -182, -24, - -182, 33, 227, -182, 210, -182, 353, 44, 5, -182, - -182, -182, -182, -182, -182, 32, -182, 13, 41, -182, - -182, -48, 55, 11, -182, 79, 87, 58, -48, -2, - 55, -182, 55, 72, -182, -182, -182, 107, -48, -182, - 110, -182, -182, -182, -182, -182, -182, -182, -182, -182, - -182, -182, -182, -182, -182, -182, 55, -18, -182, 127, - 121, -182, 66, -182, 138, -182, 136, -182, -182, -182, - 144, 147, -182, 152, 180, 182, 178, 184, 187, 188, - 190, 58, 198, 201, 214, 367, 677, 367, -182, -48, - -182, 367, 663, 663, 367, 494, 200, 367, 367, 367, - 663, 68, 449, 223, -182, -182, 212, 663, -182, -182, - -182, -182, -182, -182, -182, -182, -182, 367, 367, 367, - 367, 367, -182, -182, 57, 157, -182, 224, -182, -182, - -182, -182, -182, 218, 91, -182, 333, -182, 509, 537, - 333, 552, -48, 1, -182, -182, 228, 40, 216, 143, - 70, 333, 150, 593, 247, -30, 97, -182, 105, -182, - 261, 55, 259, 55, -182, -182, 408, -182, -182, -182, - 367, -182, 608, -182, -182, -182, 287, -182, -182, 367, - 367, 367, 367, 367, -182, 367, 367, -182, 252, -182, - 253, 264, 24, 269, 272, 163, -182, 273, 270, -182, - -182, -182, 280, 494, 285, -182, -182, 283, 367, -182, - 284, 112, 8, -182, -182, 294, -182, 299, -36, 304, - 247, 326, 649, 279, 307, -182, 204, 316, -182, 322, - 320, 111, 111, -182, -182, 333, 211, -182, -182, 116, - 367, -182, 677, -182, 24, -182, -182, -182, 333, -182, - 333, -182, -182, -182, -30, -182, -182, -182, -182, 247, - 333, 334, -182, 466, -182, 318, -182, -182, -182, -182, - -182, -182, 339, -182, -182, -182, 343, 120, 14, 345, - -182, 361, 124, -182, -182, -182, -182, 367, -182, 131, - -182, -182, 344, 350, 318, 166, 352, 14, -182, -182, - -182, -182, -182, -182 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 18, 4, 21, 22, 23, 24, 25, 26, 27, 28, - 0, 2, 3, 0, 17, 20, 1, 6, 12, 13, - 15, 14, 16, 7, 8, 183, 183, 19, 184, 0, - 182, 0, 18, 30, 18, 10, 0, 127, 0, 9, - 128, 130, 129, 131, 132, 0, 29, 0, 126, 5, - 11, 0, 117, 116, 115, 118, 0, 119, 120, 121, - 122, 123, 124, 125, 110, 111, 112, 0, 0, 179, - 0, 180, 31, 34, 35, 32, 33, 36, 37, 39, - 38, 40, 41, 42, 43, 44, 0, 154, 114, 0, - 113, 45, 0, 53, 54, 181, 0, 170, 177, 169, - 0, 58, 171, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, - 51, 0, 0, 0, 0, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 178, 0, 0, 117, 116, - 118, 119, 120, 121, 122, 124, 125, 0, 0, 0, - 0, 0, 176, 161, 154, 0, 142, 147, 149, 160, - 159, 113, 158, 155, 0, 52, 55, 60, 0, 0, - 57, 163, 0, 0, 64, 70, 0, 113, 0, 0, - 0, 136, 0, 0, 0, 0, 0, 101, 0, 106, - 0, 121, 123, 0, 84, 86, 0, 82, 87, 85, - 0, 49, 0, 144, 147, 143, 0, 145, 146, 134, - 0, 0, 0, 0, 156, 0, 0, 46, 0, 59, - 0, 170, 0, 169, 0, 0, 152, 0, 162, 167, - 166, 69, 0, 0, 0, 50, 73, 0, 0, 76, - 0, 0, 0, 175, 174, 0, 173, 0, 0, 0, - 0, 0, 0, 0, 0, 81, 0, 0, 150, 0, - 133, 138, 139, 137, 140, 141, 0, 61, 56, 0, - 134, 72, 0, 71, 0, 62, 63, 67, 66, 74, - 135, 75, 102, 172, 0, 78, 100, 79, 105, 0, - 104, 0, 91, 0, 89, 0, 80, 77, 108, 148, - 157, 168, 0, 151, 165, 164, 0, 0, 0, 0, - 88, 0, 0, 98, 153, 107, 103, 0, 94, 0, - 93, 83, 0, 0, 0, 0, 0, 0, 99, 96, - 97, 95, 90, 92 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -182, -182, -182, -182, -182, 181, -182, 402, -182, 389, - -182, -182, -35, -182, -182, -182, -182, 288, -182, -182, - -50, -182, -182, -182, 173, 174, -182, -182, 362, -182, - -182, -182, -182, 215, -182, 119, -182, 86, -182, -182, - 90, -182, 167, -181, 185, 369, -182, -27, -182, -182, - -182, 154, -126, 83, 76, -182, 158, -31, -182, -182, - 221, 170, -52, 161, 205, -182, -44, -182, -47, -34, - 420, -182 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 10, 11, 25, 34, 12, 26, 36, 14, 15, - 37, 46, 167, 73, 74, 75, 92, 93, 76, 100, - 168, 77, 78, 173, 174, 175, 79, 80, 195, 82, - 83, 84, 196, 197, 293, 294, 319, 320, 198, 312, - 313, 186, 187, 188, 189, 199, 86, 154, 88, 47, - 48, 259, 260, 181, 156, 225, 226, 157, 158, 227, - 228, 229, 230, 245, 246, 159, 160, 136, 161, 162, - 29, 30 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 90, 101, 180, 241, 94, 184, 16, 69, 242, 102, - 71, 106, 72, 105, 28, 107, 89, 32, 96, 69, - 87, 112, 71, 243, 244, 108, 109, 115, 110, 116, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 97, 61, 62, 232, 63, 64, 65, 66, 67, 233, - 95, 98, 114, 97, 49, 317, 40, 41, 42, 43, - 44, 243, 244, 68, 98, 222, 99, 133, 69, 70, - 318, 71, 94, 169, 33, 90, 90, 98, 177, 99, - 183, 50, -68, 90, 190, 90, 45, 202, -68, 163, - 90, 89, 89, 91, 176, 87, 87, 194, 87, 89, - 209, 89, 115, 87, 116, 87, 89, 95, 307, 184, - 87, 98, 237, 185, 119, 120, 204, 204, 238, 204, - 204, 90, 90, 69, -109, 231, 71, 102, 210, 211, - 212, 213, 111, 219, 219, 103, 90, 89, 89, 247, - 217, 87, 87, 104, 224, 248, 113, 249, 219, 90, - 212, 213, 89, 250, 282, 90, 87, 108, 301, 253, - 250, 194, 316, 117, 274, 89, 323, 219, 250, 87, - 118, 89, 324, 326, 121, 87, 1, 122, 102, 327, - 210, 211, 212, 213, 124, 123, 177, 210, 211, 212, - 213, 325, 236, 125, 210, 211, 212, 213, 155, 239, - 164, 190, 176, 214, 166, 90, 87, 170, 331, 271, - 179, 272, 182, 35, 238, 39, 126, 292, 127, 128, - 129, 89, 305, 203, 205, 87, 207, 208, 130, 131, - 102, 132, 206, 2, 3, 4, 5, 6, 7, 8, - 9, 210, 211, 212, 213, 224, 90, 134, 210, 211, - 212, 213, 38, 297, 135, 137, 178, 300, 292, 200, - 215, 201, 89, 216, 234, 235, 87, 2, 3, 4, - 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, - 22, 23, 24, 256, 2, 3, 4, 5, 6, 7, - 8, 9, 185, 261, 262, 263, 264, 251, 265, 266, - 252, 267, 268, 138, 139, 54, 140, -124, 141, 142, - 143, 144, -179, 61, 145, 270, 146, 278, 274, 273, - 295, 280, 147, 148, 210, 211, 212, 213, 149, 275, - 171, 258, 279, 281, 290, 150, 151, 95, 98, 152, - 69, 153, 284, 71, 138, 139, 54, 140, 285, 141, - 142, 143, 144, 287, 61, 145, 296, 146, 18, 19, - 20, 21, 22, 147, 148, 298, 299, 289, 238, 149, - 210, 211, 212, 213, 311, 308, 150, 151, 95, 98, - 152, 69, 153, 314, 71, 138, 139, 54, 140, 315, - 141, 142, 143, 144, 321, 61, 145, 322, 146, 329, - 328, 332, 13, 27, 147, 148, 276, 165, 277, 81, - 149, 255, 310, 333, 330, 286, 85, 150, 151, 95, - 98, 152, 69, 153, 302, 71, 138, 139, 54, 140, - 303, 141, 142, 191, 144, 288, 192, 145, 193, 63, - 64, 65, 66, 269, 304, 306, 31, 283, 0, 0, - 254, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 0, 69, 0, 0, 71, 138, 139, 54, - 140, 0, 141, 142, 191, 144, 0, 192, 145, 193, - 63, 64, 65, 66, 138, 139, 54, 140, 0, 141, - 142, 143, 144, 291, 61, 145, 0, 146, 0, 68, - 0, 0, 0, 0, 69, 0, 0, 71, 309, 0, - 0, 0, 138, 139, 54, 140, 68, 141, 142, 143, - 144, 69, 61, 145, 71, 146, 0, 138, 139, 54, - 140, 0, 141, 142, 143, 144, 0, 61, 145, 171, - 146, 0, 0, 0, 172, 0, 0, 0, 0, 69, - 0, 218, 71, 0, 0, 138, 139, 54, 140, 68, - 141, 142, 143, 144, 69, 61, 145, 71, 146, 0, - 138, 139, 54, 140, 0, 141, 142, 143, 144, 220, - 61, 221, 0, 146, 0, 0, 0, 68, 0, 0, - 0, 0, 69, 222, 0, 71, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 98, 0, 223, 0, 0, - 71, 138, 139, 54, 140, 0, 141, 142, 143, 144, - 0, 61, 145, 0, 146, 0, 138, 139, 54, 140, - 0, 141, 142, 143, 144, 240, 61, 145, 0, 146, - 0, 0, 0, 68, 0, 0, 0, 0, 69, 0, - 257, 71, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 0, 69, 0, 0, 71, 138, 139, 54, - 140, 0, 141, 142, 143, 144, 291, 61, 145, 0, - 146, 138, 139, 54, 140, 0, 141, 142, 143, 144, - 0, 61, 145, 0, 146, 138, 139, 54, 140, 68, - 141, 142, 143, 144, 69, 61, 145, 71, 146, 0, - 0, 0, 0, 68, 0, 0, 0, 0, 69, 0, - 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 69, 0, 0, 71 -}; - -static const yytype_int16 yycheck[] = -{ - 47, 53, 128, 184, 51, 41, 0, 55, 38, 53, - 58, 58, 47, 57, 52, 59, 47, 41, 52, 55, - 47, 68, 58, 53, 54, 59, 60, 45, 62, 47, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 29, 28, 29, 42, 31, 32, 33, 34, 35, 48, - 52, 53, 86, 29, 49, 41, 12, 13, 14, 15, - 16, 53, 54, 50, 53, 41, 55, 111, 55, 56, - 56, 58, 119, 123, 41, 122, 123, 53, 125, 55, - 130, 49, 42, 130, 131, 132, 42, 137, 48, 116, - 137, 122, 123, 52, 125, 122, 123, 132, 125, 130, - 43, 132, 45, 130, 47, 132, 137, 52, 289, 41, - 137, 53, 42, 45, 48, 49, 147, 148, 48, 150, - 151, 168, 169, 55, 52, 172, 58, 171, 37, 38, - 39, 40, 25, 168, 169, 56, 183, 168, 169, 42, - 49, 168, 169, 56, 171, 48, 36, 42, 183, 196, - 39, 40, 183, 48, 42, 202, 183, 191, 42, 193, - 48, 196, 42, 36, 48, 196, 42, 202, 48, 196, - 49, 202, 48, 42, 36, 202, 0, 41, 222, 48, - 37, 38, 39, 40, 37, 41, 233, 37, 38, 39, - 40, 317, 49, 41, 37, 38, 39, 40, 115, 49, - 117, 248, 233, 46, 121, 252, 233, 124, 42, 46, - 127, 48, 129, 32, 48, 34, 36, 252, 36, 41, - 36, 252, 274, 147, 148, 252, 150, 151, 41, 41, - 274, 41, 149, 57, 58, 59, 60, 61, 62, 63, - 64, 37, 38, 39, 40, 272, 293, 49, 37, 38, - 39, 40, 42, 49, 53, 41, 56, 46, 293, 36, - 36, 49, 293, 45, 36, 49, 293, 57, 58, 59, - 60, 61, 62, 63, 64, 4, 5, 6, 7, 8, - 9, 10, 11, 200, 57, 58, 59, 60, 61, 62, - 63, 64, 45, 210, 211, 212, 213, 36, 215, 216, - 41, 49, 49, 18, 19, 20, 21, 43, 23, 24, - 25, 26, 43, 28, 29, 43, 31, 234, 48, 46, - 41, 238, 37, 38, 37, 38, 39, 40, 43, 49, - 45, 44, 49, 49, 251, 50, 51, 52, 53, 54, - 55, 56, 48, 58, 18, 19, 20, 21, 49, 23, - 24, 25, 26, 49, 28, 29, 49, 31, 5, 6, - 7, 8, 9, 37, 38, 49, 44, 41, 48, 43, - 37, 38, 39, 40, 56, 41, 50, 51, 52, 53, - 54, 55, 56, 44, 58, 18, 19, 20, 21, 46, - 23, 24, 25, 26, 49, 28, 29, 36, 31, 49, - 56, 49, 0, 14, 37, 38, 233, 119, 234, 47, - 43, 196, 293, 327, 324, 248, 47, 50, 51, 52, - 53, 54, 55, 56, 270, 58, 18, 19, 20, 21, - 272, 23, 24, 25, 26, 250, 28, 29, 30, 31, - 32, 33, 34, 222, 274, 284, 26, 242, -1, -1, - 42, -1, -1, -1, -1, -1, -1, -1, 50, -1, - -1, -1, -1, 55, -1, -1, 58, 18, 19, 20, - 21, -1, 23, 24, 25, 26, -1, 28, 29, 30, - 31, 32, 33, 34, 18, 19, 20, 21, -1, 23, - 24, 25, 26, 27, 28, 29, -1, 31, -1, 50, - -1, -1, -1, -1, 55, -1, -1, 58, 42, -1, - -1, -1, 18, 19, 20, 21, 50, 23, 24, 25, - 26, 55, 28, 29, 58, 31, -1, 18, 19, 20, - 21, -1, 23, 24, 25, 26, -1, 28, 29, 45, - 31, -1, -1, -1, 50, -1, -1, -1, -1, 55, - -1, 42, 58, -1, -1, 18, 19, 20, 21, 50, - 23, 24, 25, 26, 55, 28, 29, 58, 31, -1, - 18, 19, 20, 21, -1, 23, 24, 25, 26, 42, - 28, 29, -1, 31, -1, -1, -1, 50, -1, -1, - -1, -1, 55, 41, -1, 58, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 55, -1, -1, - 58, 18, 19, 20, 21, -1, 23, 24, 25, 26, - -1, 28, 29, -1, 31, -1, 18, 19, 20, 21, - -1, 23, 24, 25, 26, 42, 28, 29, -1, 31, - -1, -1, -1, 50, -1, -1, -1, -1, 55, -1, - 42, 58, -1, -1, -1, -1, -1, -1, 50, -1, - -1, -1, -1, 55, -1, -1, 58, 18, 19, 20, - 21, -1, 23, 24, 25, 26, 27, 28, 29, -1, - 31, 18, 19, 20, 21, -1, 23, 24, 25, 26, - -1, 28, 29, -1, 31, 18, 19, 20, 21, 50, - 23, 24, 25, 26, 55, 28, 29, 58, 31, -1, - -1, -1, -1, 50, -1, -1, -1, -1, 55, -1, - -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 55, -1, -1, 58 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 0, 57, 58, 59, 60, 61, 62, 63, 64, - 66, 67, 70, 72, 73, 74, 0, 4, 5, 6, - 7, 8, 9, 10, 11, 68, 71, 74, 52, 135, - 136, 135, 41, 41, 69, 70, 72, 75, 42, 70, - 12, 13, 14, 15, 16, 42, 76, 114, 115, 49, - 49, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 28, 29, 31, 32, 33, 34, 35, 50, 55, - 56, 58, 77, 78, 79, 80, 83, 86, 87, 91, - 92, 93, 94, 95, 96, 110, 111, 112, 113, 122, - 133, 52, 81, 82, 133, 52, 134, 29, 53, 55, - 84, 127, 131, 56, 56, 131, 133, 131, 134, 134, - 134, 25, 133, 36, 134, 45, 47, 36, 49, 48, - 49, 36, 41, 41, 37, 41, 36, 36, 41, 36, - 41, 41, 41, 131, 49, 53, 132, 41, 18, 19, - 21, 23, 24, 25, 26, 29, 31, 37, 38, 43, - 50, 51, 54, 56, 112, 118, 119, 122, 123, 130, - 131, 133, 134, 112, 118, 82, 118, 77, 85, 85, - 118, 45, 50, 88, 89, 90, 122, 133, 56, 118, - 117, 118, 118, 85, 41, 45, 106, 107, 108, 109, - 133, 25, 28, 30, 77, 93, 97, 98, 103, 110, - 36, 49, 85, 119, 122, 119, 118, 119, 119, 43, - 37, 38, 39, 40, 46, 36, 45, 49, 42, 77, - 42, 29, 41, 55, 112, 120, 121, 124, 125, 126, - 127, 133, 42, 48, 36, 49, 49, 42, 48, 49, - 42, 108, 38, 53, 54, 128, 129, 42, 48, 42, - 48, 36, 41, 134, 42, 98, 118, 42, 44, 116, - 117, 118, 118, 118, 118, 118, 118, 49, 49, 125, - 43, 46, 48, 46, 48, 49, 89, 90, 118, 49, - 118, 49, 42, 129, 48, 49, 107, 49, 109, 41, - 118, 27, 77, 99, 100, 41, 49, 49, 49, 44, - 46, 42, 116, 121, 126, 127, 128, 108, 41, 42, - 100, 56, 104, 105, 44, 46, 42, 41, 56, 101, - 102, 49, 36, 42, 48, 117, 42, 48, 56, 49, - 105, 42, 49, 102 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 65, 66, 66, 66, 67, 68, 68, 68, 69, - 69, 70, 71, 71, 71, 71, 71, 72, 72, 73, - 73, 74, 74, 74, 74, 74, 74, 74, 74, 75, - 75, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 77, 77, 77, 78, - 79, 80, 81, 81, 82, 82, 83, 84, 84, 85, - 85, 86, 87, 88, 88, 88, 89, 89, 89, 89, - 89, 90, 90, 91, 92, 93, 94, 94, 95, 95, - 96, 97, 97, 98, 98, 98, 98, 98, 99, 99, - 100, 100, 101, 101, 102, 102, 103, 104, 104, 105, - 106, 106, 107, 107, 107, 108, 108, 109, 110, 111, - 111, 111, 111, 112, 112, 113, 113, 113, 113, 113, - 113, 113, 113, 113, 113, 113, 114, 114, 115, 115, - 115, 115, 115, 116, 116, 117, 117, 118, 118, 118, - 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, - 119, 120, 120, 121, 122, 122, 122, 122, 123, 123, - 123, 123, 124, 124, 125, 125, 125, 125, 126, 127, - 127, 127, 128, 128, 129, 129, 130, 131, 132, 133, - 133, 134, 135, 135, 136 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 7, 1, 1, 1, 2, - 1, 7, 1, 1, 1, 1, 1, 1, 0, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 4, 2, 3, 4, - 5, 3, 3, 1, 1, 3, 6, 3, 1, 2, - 1, 6, 6, 3, 1, 0, 3, 3, 1, 2, - 1, 3, 3, 5, 6, 6, 5, 6, 6, 6, - 6, 2, 1, 5, 1, 1, 1, 1, 2, 1, - 5, 1, 3, 1, 1, 3, 6, 3, 1, 3, - 3, 1, 3, 5, 3, 3, 1, 5, 6, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 0, 3, 1, 3, 3, 3, - 3, 3, 1, 2, 2, 2, 2, 1, 4, 1, - 3, 3, 1, 4, 1, 3, 4, 6, 1, 1, - 1, 1, 1, 0, 3, 3, 1, 1, 3, 1, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 1 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (param, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, param); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_param *param) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (param); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_param *param) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, param); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, struct parser_param *param) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , param); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, param); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_param *param) -{ - YYUSE (yyvaluep); - YYUSE (param); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - switch (yytype) - { - case 52: /* STRING */ -#line 225 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { free(((*yyvaluep).str)); } -#line 1429 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 55: /* IDENT */ -#line 225 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { free(((*yyvaluep).str)); } -#line 1435 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 66: /* XkbFile */ -#line 224 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { if (!param->rtrn) FreeXkbFile(((*yyvaluep).file)); } -#line 1441 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 67: /* XkbCompositeMap */ -#line 224 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { if (!param->rtrn) FreeXkbFile(((*yyvaluep).file)); } -#line 1447 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 69: /* XkbMapConfigList */ -#line 224 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { if (!param->rtrn) FreeXkbFile(((*yyvaluep).file)); } -#line 1453 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 70: /* XkbMapConfig */ -#line 224 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { if (!param->rtrn) FreeXkbFile(((*yyvaluep).file)); } -#line 1459 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 75: /* DeclList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).any)); } -#line 1465 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 76: /* Decl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).any)); } -#line 1471 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 77: /* VarDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).var)); } -#line 1477 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 78: /* KeyNameDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).keyCode)); } -#line 1483 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 79: /* KeyAliasDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).keyAlias)); } -#line 1489 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 80: /* VModDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).vmod)); } -#line 1495 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 81: /* VModDefList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).vmod)); } -#line 1501 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 82: /* VModDef */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).vmod)); } -#line 1507 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 83: /* InterpretDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).interp)); } -#line 1513 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 84: /* InterpretMatch */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).interp)); } -#line 1519 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 85: /* VarDeclList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).var)); } -#line 1525 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 86: /* KeyTypeDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).keyType)); } -#line 1531 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 87: /* SymbolsDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).syms)); } -#line 1537 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 88: /* SymbolsBody */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).var)); } -#line 1543 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 89: /* SymbolsVarDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).var)); } -#line 1549 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 90: /* ArrayInit */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1555 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 91: /* GroupCompatDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).groupCompat)); } -#line 1561 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 92: /* ModMapDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).modMask)); } -#line 1567 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 93: /* LedMapDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).ledMap)); } -#line 1573 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 94: /* LedNameDecl */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).ledName)); } -#line 1579 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 108: /* CoordList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1585 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 109: /* Coord */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1591 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 116: /* OptExprList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1597 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 117: /* ExprList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1603 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 118: /* Expr */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1609 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 119: /* Term */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1615 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 120: /* ActionList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1621 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 121: /* Action */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1627 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 122: /* Lhs */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1633 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 123: /* Terminal */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1639 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 124: /* OptKeySymList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1645 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 125: /* KeySymList */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1651 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 126: /* KeySyms */ -#line 219 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { FreeStmt((ParseCommon *) ((*yyvaluep).expr)); } -#line 1657 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 135: /* OptMapName */ -#line 225 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { free(((*yyvaluep).str)); } -#line 1663 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - case 136: /* MapName */ -#line 225 "../src/xkbcomp/parser.y" /* yacc.c:1257 */ - { free(((*yyvaluep).str)); } -#line 1669 "xkbcommon-internal@sta/parser.c" /* yacc.c:1257 */ - break; - - - default: - break; - } - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (struct parser_param *param) -{ -/* The lookahead symbol. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, param_scanner); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 242 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file) = param->rtrn = (yyvsp[0].file); param->more_maps = !!param->rtrn; } -#line 1937 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 3: -#line 244 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file) = param->rtrn = (yyvsp[0].file); param->more_maps = !!param->rtrn; YYACCEPT; } -#line 1943 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 4: -#line 246 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file) = param->rtrn = NULL; param->more_maps = false; } -#line 1949 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 5: -#line 252 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file) = XkbFileCreate((yyvsp[-5].file_type), (yyvsp[-4].str), (ParseCommon *) (yyvsp[-2].file), (yyvsp[-6].mapFlags)); } -#line 1955 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 6: -#line 255 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_KEYMAP; } -#line 1961 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 7: -#line 256 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_KEYMAP; } -#line 1967 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 8: -#line 257 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_KEYMAP; } -#line 1973 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 9: -#line 261 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - if (!(yyvsp[0].file)) - (yyval.file) = (yyvsp[-1].file); - else - (yyval.file) = (XkbFile *) AppendStmt((ParseCommon *) (yyvsp[-1].file), - (ParseCommon *) (yyvsp[0].file)); - } -#line 1985 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 10: -#line 269 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file) = (yyvsp[0].file); } -#line 1991 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 11: -#line 275 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyval.file) = XkbFileCreate((yyvsp[-5].file_type), (yyvsp[-4].str), (yyvsp[-2].any), (yyvsp[-6].mapFlags)); - } -#line 1999 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 12: -#line 280 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_KEYCODES; } -#line 2005 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 13: -#line 281 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_TYPES; } -#line 2011 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 14: -#line 282 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_COMPAT; } -#line 2017 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 15: -#line 283 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_SYMBOLS; } -#line 2023 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 16: -#line 284 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.file_type) = FILE_TYPE_GEOMETRY; } -#line 2029 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 17: -#line 287 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = (yyvsp[0].mapFlags); } -#line 2035 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 18: -#line 288 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = 0; } -#line 2041 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 19: -#line 291 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = ((yyvsp[-1].mapFlags) | (yyvsp[0].mapFlags)); } -#line 2047 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 20: -#line 292 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = (yyvsp[0].mapFlags); } -#line 2053 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 21: -#line 295 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_IS_PARTIAL; } -#line 2059 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 22: -#line 296 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_IS_DEFAULT; } -#line 2065 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 23: -#line 297 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_IS_HIDDEN; } -#line 2071 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 24: -#line 298 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_HAS_ALPHANUMERIC; } -#line 2077 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 25: -#line 299 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_HAS_MODIFIER; } -#line 2083 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 26: -#line 300 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_HAS_KEYPAD; } -#line 2089 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 27: -#line 301 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_HAS_FN; } -#line 2095 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 28: -#line 302 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.mapFlags) = MAP_IS_ALTGR; } -#line 2101 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 29: -#line 306 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.any) = AppendStmt((yyvsp[-1].any), (yyvsp[0].any)); } -#line 2107 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 30: -#line 307 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.any) = NULL; } -#line 2113 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 31: -#line 311 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].var)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].var); - } -#line 2122 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 32: -#line 316 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].vmod)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].vmod); - } -#line 2131 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 33: -#line 321 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].interp)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].interp); - } -#line 2140 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 34: -#line 326 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].keyCode)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].keyCode); - } -#line 2149 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 35: -#line 331 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].keyAlias)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].keyAlias); - } -#line 2158 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 36: -#line 336 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].keyType)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].keyType); - } -#line 2167 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 37: -#line 341 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].syms)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].syms); - } -#line 2176 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 38: -#line 346 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].modMask)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].modMask); - } -#line 2185 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 39: -#line 351 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].groupCompat)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].groupCompat); - } -#line 2194 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 40: -#line 356 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].ledMap)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].ledMap); - } -#line 2203 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 41: -#line 361 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyvsp[0].ledName)->merge = (yyvsp[-1].merge); - (yyval.any) = (ParseCommon *) (yyvsp[0].ledName); - } -#line 2212 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 42: -#line 365 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.any) = NULL; } -#line 2218 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 43: -#line 366 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.any) = NULL; } -#line 2224 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 44: -#line 367 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.any) = NULL; } -#line 2230 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 45: -#line 369 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - (yyval.any) = (ParseCommon *) IncludeCreate(param->ctx, (yyvsp[0].str), (yyvsp[-1].merge)); - free((yyvsp[0].str)); - } -#line 2239 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 46: -#line 376 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = VarCreate((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 2245 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 47: -#line 378 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = BoolVarCreate((yyvsp[-1].atom), true); } -#line 2251 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 48: -#line 380 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = BoolVarCreate((yyvsp[-1].atom), false); } -#line 2257 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 49: -#line 384 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.keyCode) = KeycodeCreate((yyvsp[-3].atom), (yyvsp[-1].num)); } -#line 2263 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 50: -#line 388 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.keyAlias) = KeyAliasCreate((yyvsp[-3].atom), (yyvsp[-1].atom)); } -#line 2269 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 51: -#line 392 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.vmod) = (yyvsp[-1].vmod); } -#line 2275 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 52: -#line 396 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.vmod) = (VModDef *) AppendStmt((ParseCommon *) (yyvsp[-2].vmod), - (ParseCommon *) (yyvsp[0].vmod)); } -#line 2282 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 53: -#line 399 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.vmod) = (yyvsp[0].vmod); } -#line 2288 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 54: -#line 403 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.vmod) = VModCreate((yyvsp[0].atom), NULL); } -#line 2294 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 55: -#line 405 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.vmod) = VModCreate((yyvsp[-2].atom), (yyvsp[0].expr)); } -#line 2300 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 56: -#line 411 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyvsp[-4].interp)->def = (yyvsp[-2].var); (yyval.interp) = (yyvsp[-4].interp); } -#line 2306 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 57: -#line 415 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.interp) = InterpCreate((yyvsp[-2].keysym), (yyvsp[0].expr)); } -#line 2312 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 58: -#line 417 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.interp) = InterpCreate((yyvsp[0].keysym), NULL); } -#line 2318 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 59: -#line 421 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = (VarDef *) AppendStmt((ParseCommon *) (yyvsp[-1].var), - (ParseCommon *) (yyvsp[0].var)); } -#line 2325 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 60: -#line 424 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = (yyvsp[0].var); } -#line 2331 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 61: -#line 430 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.keyType) = KeyTypeCreate((yyvsp[-4].atom), (yyvsp[-2].var)); } -#line 2337 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 62: -#line 436 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.syms) = SymbolsCreate((yyvsp[-4].atom), (yyvsp[-2].var)); } -#line 2343 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 63: -#line 440 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = (VarDef *) AppendStmt((ParseCommon *) (yyvsp[-2].var), - (ParseCommon *) (yyvsp[0].var)); } -#line 2350 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 64: -#line 443 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = (yyvsp[0].var); } -#line 2356 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 65: -#line 444 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = NULL; } -#line 2362 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 66: -#line 447 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = VarCreate((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2368 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 67: -#line 448 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = VarCreate((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2374 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 68: -#line 449 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = BoolVarCreate((yyvsp[0].atom), true); } -#line 2380 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 69: -#line 450 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = BoolVarCreate((yyvsp[0].atom), false); } -#line 2386 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 70: -#line 451 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.var) = VarCreate(NULL, (yyvsp[0].expr)); } -#line 2392 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 71: -#line 455 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } -#line 2398 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 72: -#line 457 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateUnary(EXPR_ACTION_LIST, EXPR_TYPE_ACTION, (yyvsp[-1].expr)); } -#line 2404 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 73: -#line 461 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.groupCompat) = GroupCompatCreate((yyvsp[-3].ival), (yyvsp[-1].expr)); } -#line 2410 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 74: -#line 465 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.modMask) = ModMapCreate((yyvsp[-4].atom), (yyvsp[-2].expr)); } -#line 2416 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 75: -#line 469 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ledMap) = LedMapCreate((yyvsp[-4].atom), (yyvsp[-2].var)); } -#line 2422 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 76: -#line 473 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ledName) = LedNameCreate((yyvsp[-3].ival), (yyvsp[-1].expr), false); } -#line 2428 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 77: -#line 475 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ledName) = LedNameCreate((yyvsp[-3].ival), (yyvsp[-1].expr), true); } -#line 2434 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 78: -#line 479 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2440 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 79: -#line 481 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (void) (yyvsp[-2].expr); (yyval.geom) = NULL; } -#line 2446 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 80: -#line 485 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2452 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 81: -#line 488 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL;} -#line 2458 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 82: -#line 489 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2464 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 83: -#line 493 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2470 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 84: -#line 495 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { FreeStmt((ParseCommon *) (yyvsp[0].var)); (yyval.geom) = NULL; } -#line 2476 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 85: -#line 497 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2482 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 86: -#line 499 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { FreeStmt((ParseCommon *) (yyvsp[0].ledMap)); (yyval.geom) = NULL; } -#line 2488 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 87: -#line 501 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2494 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 88: -#line 504 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL;} -#line 2500 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 89: -#line 505 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2506 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 90: -#line 508 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2512 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 91: -#line 510 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { FreeStmt((ParseCommon *) (yyvsp[0].var)); (yyval.geom) = NULL; } -#line 2518 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 92: -#line 513 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2524 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 93: -#line 514 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2530 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 94: -#line 518 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2536 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 95: -#line 520 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { FreeStmt((ParseCommon *) (yyvsp[-1].expr)); (yyval.geom) = NULL; } -#line 2542 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 96: -#line 524 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2548 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 97: -#line 527 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2554 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 98: -#line 528 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2560 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 99: -#line 531 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2566 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 100: -#line 535 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL;} -#line 2572 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 101: -#line 537 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.geom) = NULL; } -#line 2578 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 102: -#line 541 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (void) (yyvsp[-1].expr); (yyval.geom) = NULL; } -#line 2584 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 103: -#line 543 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (void) (yyvsp[-1].expr); (yyval.geom) = NULL; } -#line 2590 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 104: -#line 545 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { FreeStmt((ParseCommon *) (yyvsp[0].expr)); (yyval.geom) = NULL; } -#line 2596 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 105: -#line 549 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (void) (yyvsp[-2].expr); (void) (yyvsp[0].expr); (yyval.expr) = NULL; } -#line 2602 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 106: -#line 551 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (void) (yyvsp[0].expr); (yyval.expr) = NULL; } -#line 2608 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 107: -#line 555 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = NULL; } -#line 2614 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 108: -#line 559 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { FreeStmt((ParseCommon *) (yyvsp[-2].var)); (yyval.geom) = NULL; } -#line 2620 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 109: -#line 562 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = 0; } -#line 2626 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 110: -#line 563 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = 0; } -#line 2632 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 111: -#line 564 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = 0; } -#line 2638 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 112: -#line 565 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = 0; } -#line 2644 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 113: -#line 568 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = (yyvsp[0].atom); } -#line 2650 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 114: -#line 569 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = (yyvsp[0].atom); } -#line 2656 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 115: -#line 573 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "action"); } -#line 2662 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 116: -#line 575 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "interpret"); } -#line 2668 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 117: -#line 577 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "type"); } -#line 2674 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 118: -#line 579 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "key"); } -#line 2680 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 119: -#line 581 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "group"); } -#line 2686 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 120: -#line 583 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - {(yyval.atom) = xkb_atom_intern_literal(param->ctx, "modifier_map");} -#line 2692 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 121: -#line 585 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "indicator"); } -#line 2698 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 122: -#line 587 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "shape"); } -#line 2704 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 123: -#line 589 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "row"); } -#line 2710 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 124: -#line 591 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "section"); } -#line 2716 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 125: -#line 593 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "text"); } -#line 2722 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 126: -#line 596 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.merge) = (yyvsp[0].merge); } -#line 2728 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 127: -#line 597 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.merge) = MERGE_DEFAULT; } -#line 2734 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 128: -#line 600 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.merge) = MERGE_DEFAULT; } -#line 2740 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 129: -#line 601 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.merge) = MERGE_AUGMENT; } -#line 2746 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 130: -#line 602 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.merge) = MERGE_OVERRIDE; } -#line 2752 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 131: -#line 603 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.merge) = MERGE_REPLACE; } -#line 2758 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 132: -#line 605 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - /* - * This used to be MERGE_ALT_FORM. This functionality was - * unused and has been removed. - */ - (yyval.merge) = MERGE_DEFAULT; - } -#line 2770 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 133: -#line 614 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2776 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 134: -#line 615 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = NULL; } -#line 2782 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 135: -#line 619 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (ExprDef *) AppendStmt((ParseCommon *) (yyvsp[-2].expr), - (ParseCommon *) (yyvsp[0].expr)); } -#line 2789 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 136: -#line 622 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2795 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 137: -#line 626 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateBinary(EXPR_DIVIDE, (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2801 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 138: -#line 628 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateBinary(EXPR_ADD, (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2807 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 139: -#line 630 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateBinary(EXPR_SUBTRACT, (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2813 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 140: -#line 632 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateBinary(EXPR_MULTIPLY, (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2819 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 141: -#line 634 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateBinary(EXPR_ASSIGN, (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2825 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 142: -#line 636 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2831 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 143: -#line 640 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateUnary(EXPR_NEGATE, (yyvsp[0].expr)->expr.value_type, (yyvsp[0].expr)); } -#line 2837 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 144: -#line 642 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateUnary(EXPR_UNARY_PLUS, (yyvsp[0].expr)->expr.value_type, (yyvsp[0].expr)); } -#line 2843 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 145: -#line 644 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateUnary(EXPR_NOT, EXPR_TYPE_BOOLEAN, (yyvsp[0].expr)); } -#line 2849 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 146: -#line 646 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateUnary(EXPR_INVERT, (yyvsp[0].expr)->expr.value_type, (yyvsp[0].expr)); } -#line 2855 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 147: -#line 648 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2861 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 148: -#line 650 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateAction((yyvsp[-3].atom), (yyvsp[-1].expr)); } -#line 2867 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 149: -#line 652 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2873 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 150: -#line 654 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } -#line 2879 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 151: -#line 658 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (ExprDef *) AppendStmt((ParseCommon *) (yyvsp[-2].expr), - (ParseCommon *) (yyvsp[0].expr)); } -#line 2886 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 152: -#line 661 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2892 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 153: -#line 665 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateAction((yyvsp[-3].atom), (yyvsp[-1].expr)); } -#line 2898 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 154: -#line 669 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateIdent((yyvsp[0].atom)); } -#line 2904 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 155: -#line 671 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateFieldRef((yyvsp[-2].atom), (yyvsp[0].atom)); } -#line 2910 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 156: -#line 673 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateArrayRef(XKB_ATOM_NONE, (yyvsp[-3].atom), (yyvsp[-1].expr)); } -#line 2916 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 157: -#line 675 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateArrayRef((yyvsp[-5].atom), (yyvsp[-3].atom), (yyvsp[-1].expr)); } -#line 2922 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 158: -#line 679 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateString((yyvsp[0].atom)); } -#line 2928 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 159: -#line 681 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateInteger((yyvsp[0].ival)); } -#line 2934 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 160: -#line 683 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateFloat(/* Discard $1 */); } -#line 2940 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 161: -#line 685 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateKeyName((yyvsp[0].atom)); } -#line 2946 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 162: -#line 688 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2952 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 163: -#line 689 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = NULL; } -#line 2958 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 164: -#line 693 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprAppendKeysymList((yyvsp[-2].expr), (yyvsp[0].keysym)); } -#line 2964 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 165: -#line 695 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprAppendMultiKeysymList((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2970 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 166: -#line 697 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateKeysymList((yyvsp[0].keysym)); } -#line 2976 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 167: -#line 699 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = ExprCreateMultiKeysymList((yyvsp[0].expr)); } -#line 2982 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 168: -#line 703 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } -#line 2988 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 169: -#line 707 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - if (!resolve_keysym((yyvsp[0].str), &(yyval.keysym))) - parser_warn(param, "unrecognized keysym \"%s\"", (yyvsp[0].str)); - free((yyvsp[0].str)); - } -#line 2998 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 170: -#line 712 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.keysym) = XKB_KEY_section; } -#line 3004 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 171: -#line 714 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { - if ((yyvsp[0].ival) < 0) { - parser_warn(param, "unrecognized keysym \"%d\"", (yyvsp[0].ival)); - (yyval.keysym) = XKB_KEY_NoSymbol; - } - else if ((yyvsp[0].ival) < 10) { /* XKB_KEY_0 .. XKB_KEY_9 */ - (yyval.keysym) = XKB_KEY_0 + (xkb_keysym_t) (yyvsp[0].ival); - } - else { - char buf[17]; - snprintf(buf, sizeof(buf), "0x%x", (yyvsp[0].ival)); - if (!resolve_keysym(buf, &(yyval.keysym))) { - parser_warn(param, "unrecognized keysym \"%s\"", buf); - (yyval.keysym) = XKB_KEY_NoSymbol; - } - } - } -#line 3026 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 172: -#line 733 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = -(yyvsp[0].ival); } -#line 3032 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 173: -#line 734 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = (yyvsp[0].ival); } -#line 3038 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 174: -#line 737 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = (yyvsp[0].num); } -#line 3044 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 175: -#line 738 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = (yyvsp[0].num); } -#line 3050 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 176: -#line 741 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = 0; } -#line 3056 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 177: -#line 744 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.ival) = (yyvsp[0].num); } -#line 3062 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 178: -#line 747 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.num) = (yyvsp[0].num); } -#line 3068 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 179: -#line 750 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_steal(param->ctx, (yyvsp[0].str)); } -#line 3074 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 180: -#line 751 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_intern_literal(param->ctx, "default"); } -#line 3080 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 181: -#line 754 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.atom) = xkb_atom_steal(param->ctx, (yyvsp[0].str)); } -#line 3086 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 182: -#line 757 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.str) = (yyvsp[0].str); } -#line 3092 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 183: -#line 758 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.str) = NULL; } -#line 3098 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - case 184: -#line 761 "../src/xkbcomp/parser.y" /* yacc.c:1646 */ - { (yyval.str) = (yyvsp[0].str); } -#line 3104 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - break; - - -#line 3108 "xkbcommon-internal@sta/parser.c" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (param, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (param, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, param); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, param); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (param, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, param); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, param); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 764 "../src/xkbcomp/parser.y" /* yacc.c:1906 */ - - -XkbFile * -parse(struct xkb_context *ctx, struct scanner *scanner, const char *map) -{ - int ret; - XkbFile *first = NULL; - struct parser_param param = { - .scanner = scanner, - .ctx = ctx, - .rtrn = NULL, - .more_maps = false, - }; - - /* - * If we got a specific map, we look for it exclusively and return - * immediately upon finding it. Otherwise, we need to get the - * default map. If we find a map marked as default, we return it - * immediately. If there are no maps marked as default, we return - * the first map in the file. - */ - - while ((ret = yyparse(¶m)) == 0 && param.more_maps) { - if (map) { - if (streq_not_null(map, param.rtrn->name)) - return param.rtrn; - else - FreeXkbFile(param.rtrn); - } - else { - if (param.rtrn->flags & MAP_IS_DEFAULT) { - FreeXkbFile(first); - return param.rtrn; - } - else if (!first) { - first = param.rtrn; - } - else { - FreeXkbFile(param.rtrn); - } - } - param.rtrn = NULL; - } - - if (ret != 0) { - FreeXkbFile(first); - return NULL; - } - - if (first) - log_vrb(ctx, 5, - "No map in include statement, but \"%s\" contains several; " - "Using first defined map, \"%s\"\n", - scanner->file_name, first->name); - - return first; -} diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h deleted file mode 100644 index 6cb774da17..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp-priv.h +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************ - * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -#ifndef XKBCOMP_PRIV_H -#define XKBCOMP_PRIV_H - -#include "keymap.h" -#include "ast.h" - -struct xkb_component_names { - char *keycodes; - char *types; - char *compat; - char *symbols; -}; - -char * -text_v1_keymap_get_as_string(struct xkb_keymap *keymap); - -XkbFile * -XkbParseFile(struct xkb_context *ctx, FILE *file, - const char *file_name, const char *map); - -XkbFile * -XkbParseString(struct xkb_context *ctx, - const char *string, size_t len, - const char *file_name, const char *map); - -void -FreeXkbFile(XkbFile *file); - -XkbFile * -XkbFileFromComponents(struct xkb_context *ctx, - const struct xkb_component_names *kkctgs); - -bool -CompileKeycodes(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge); - -bool -CompileKeyTypes(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge); - -bool -CompileCompatMap(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge); - -bool -CompileSymbols(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge); - -bool -CompileKeymap(XkbFile *file, struct xkb_keymap *keymap, - enum merge_mode merge); - -/***====================================================================***/ - -static inline bool -ReportNotArray(struct xkb_context *ctx, const char *type, const char *field, - const char *name) -{ - log_err(ctx, - "The %s %s field is not an array; " - "Ignoring illegal assignment in %s\n", - type, field, name); - return false; -} - -static inline bool -ReportShouldBeArray(struct xkb_context *ctx, const char *type, - const char *field, const char *name) -{ - log_err(ctx, - "Missing subscript for %s %s; " - "Ignoring illegal assignment in %s\n", - type, field, name); - return false; -} - -static inline bool -ReportBadType(struct xkb_context *ctx, const char *type, const char *field, - const char *name, const char *wanted) -{ - log_err(ctx, "The %s %s field must be a %s; " - "Ignoring illegal assignment in %s\n", - type, field, wanted, name); - return false; -} - -static inline bool -ReportBadField(struct xkb_context *ctx, const char *type, const char *field, - const char *name) -{ - log_err(ctx, - "Unknown %s field %s in %s; " - "Ignoring assignment to unknown field in %s\n", - type, field, name, name); - return false; -} - -#endif diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c b/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c deleted file mode 100644 index 007e3f73e8..0000000000 --- a/src/3rdparty/xkbcommon/src/xkbcomp/xkbcomp.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright © 2009 Dan Nicholson - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: Dan Nicholson - * Ran Benita - * Daniel Stone - */ - -#include "xkbcomp-priv.h" -#include "rules.h" - -static bool -compile_keymap_file(struct xkb_keymap *keymap, XkbFile *file) -{ - if (file->file_type != FILE_TYPE_KEYMAP) { - log_err(keymap->ctx, - "Cannot compile a %s file alone into a keymap\n", - xkb_file_type_to_string(file->file_type)); - return false; - } - - if (!CompileKeymap(file, keymap, MERGE_OVERRIDE)) { - log_err(keymap->ctx, - "Failed to compile keymap\n"); - return false; - } - - return true; -} - -static bool -text_v1_keymap_new_from_names(struct xkb_keymap *keymap, - const struct xkb_rule_names *rmlvo) -{ - bool ok; - struct xkb_component_names kccgst; - XkbFile *file; - - log_dbg(keymap->ctx, - "Compiling from RMLVO: rules '%s', model '%s', layout '%s', " - "variant '%s', options '%s'\n", - rmlvo->rules, rmlvo->model, rmlvo->layout, rmlvo->variant, - rmlvo->options); - - ok = xkb_components_from_rules(keymap->ctx, rmlvo, &kccgst); - if (!ok) { - log_err(keymap->ctx, - "Couldn't look up rules '%s', model '%s', layout '%s', " - "variant '%s', options '%s'\n", - rmlvo->rules, rmlvo->model, rmlvo->layout, rmlvo->variant, - rmlvo->options); - return false; - } - - log_dbg(keymap->ctx, - "Compiling from KcCGST: keycodes '%s', types '%s', " - "compat '%s', symbols '%s'\n", - kccgst.keycodes, kccgst.types, kccgst.compat, kccgst.symbols); - - file = XkbFileFromComponents(keymap->ctx, &kccgst); - - free(kccgst.keycodes); - free(kccgst.types); - free(kccgst.compat); - free(kccgst.symbols); - - if (!file) { - log_err(keymap->ctx, - "Failed to generate parsed XKB file from components\n"); - return false; - } - - ok = compile_keymap_file(keymap, file); - FreeXkbFile(file); - return ok; -} - -static bool -text_v1_keymap_new_from_string(struct xkb_keymap *keymap, - const char *string, size_t len) -{ - bool ok; - XkbFile *xkb_file; - - xkb_file = XkbParseString(keymap->ctx, string, len, "(input string)", NULL); - if (!xkb_file) { - log_err(keymap->ctx, "Failed to parse input xkb string\n"); - return NULL; - } - - ok = compile_keymap_file(keymap, xkb_file); - FreeXkbFile(xkb_file); - return ok; -} - -static bool -text_v1_keymap_new_from_file(struct xkb_keymap *keymap, FILE *file) -{ - bool ok; - XkbFile *xkb_file; - - xkb_file = XkbParseFile(keymap->ctx, file, "(unknown file)", NULL); - if (!xkb_file) { - log_err(keymap->ctx, "Failed to parse input xkb file\n"); - return false; - } - - ok = compile_keymap_file(keymap, xkb_file); - FreeXkbFile(xkb_file); - return ok; -} - -const struct xkb_keymap_format_ops text_v1_keymap_format_ops = { - .keymap_new_from_names = text_v1_keymap_new_from_names, - .keymap_new_from_string = text_v1_keymap_new_from_string, - .keymap_new_from_file = text_v1_keymap_new_from_file, - .keymap_get_as_string = text_v1_keymap_get_as_string, -}; diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h deleted file mode 100644 index 299732fdc3..0000000000 --- a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compat.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright © 2012 Daniel Stone - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#ifndef _XKBCOMMON_COMPAT_H -#define _XKBCOMMON_COMPAT_H - -/** - * Renamed keymap API. - */ -#define xkb_group_index_t xkb_layout_index_t -#define xkb_group_mask_t xkb_layout_mask_t -#define xkb_map_compile_flags xkb_keymap_compile_flags -#define XKB_GROUP_INVALID XKB_LAYOUT_INVALID - -#define XKB_STATE_DEPRESSED \ - (XKB_STATE_MODS_DEPRESSED | XKB_STATE_LAYOUT_DEPRESSED) -#define XKB_STATE_LATCHED \ - (XKB_STATE_MODS_LATCHED | XKB_STATE_LAYOUT_LATCHED) -#define XKB_STATE_LOCKED \ - (XKB_STATE_MODS_LOCKED | XKB_STATE_LAYOUT_LOCKED) -#define XKB_STATE_EFFECTIVE \ - (XKB_STATE_DEPRESSED | XKB_STATE_LATCHED | XKB_STATE_LOCKED | \ - XKB_STATE_MODS_EFFECTIVE | XKB_STATE_LAYOUT_EFFECTIVE) - -#define xkb_map_new_from_names(context, names, flags) \ - xkb_keymap_new_from_names(context, names, flags) -#define xkb_map_new_from_file(context, file, format, flags) \ - xkb_keymap_new_from_file(context, file, format, flags) -#define xkb_map_new_from_string(context, string, format, flags) \ - xkb_keymap_new_from_string(context, string, format, flags) -#define xkb_map_get_as_string(keymap) \ - xkb_keymap_get_as_string(keymap, XKB_KEYMAP_FORMAT_TEXT_V1) -#define xkb_map_ref(keymap) xkb_keymap_ref(keymap) -#define xkb_map_unref(keymap) xkb_keymap_unref(keymap) - -#define xkb_map_num_mods(keymap) xkb_keymap_num_mods(keymap) -#define xkb_map_mod_get_name(keymap, idx) xkb_keymap_mod_get_name(keymap, idx) -#define xkb_map_mod_get_index(keymap, str) xkb_keymap_mod_get_index(keymap, str) -#define xkb_key_mod_index_is_consumed(state, key, mod) \ - xkb_state_mod_index_is_consumed(state, key, mod) -#define xkb_key_mod_mask_remove_consumed(state, key, modmask) \ - xkb_state_mod_mask_remove_consumed(state, key, modmask) - -#define xkb_map_num_groups(keymap) xkb_keymap_num_layouts(keymap) -#define xkb_key_num_groups(keymap, key) \ - xkb_keymap_num_layouts_for_key(keymap, key) -#define xkb_map_group_get_name(keymap, idx) \ - xkb_keymap_layout_get_name(keymap, idx) -#define xkb_map_group_get_index(keymap, str) \ - xkb_keymap_layout_get_index(keymap, str) - -#define xkb_map_num_leds(keymap) xkb_keymap_num_leds(keymap) -#define xkb_map_led_get_name(keymap, idx) xkb_keymap_led_get_name(keymap, idx) -#define xkb_map_led_get_index(keymap, str) \ - xkb_keymap_led_get_index(keymap, str) - -#define xkb_key_repeats(keymap, key) xkb_keymap_key_repeats(keymap, key) - -#define xkb_key_get_syms(state, key, syms_out) \ - xkb_state_key_get_syms(state, key, syms_out) - -#define xkb_state_group_name_is_active(state, name, type) \ - xkb_state_layout_name_is_active(state, name, type) -#define xkb_state_group_index_is_active(state, idx, type) \ - xkb_state_layout_index_is_active(state, idx, type) - -#define xkb_state_serialize_group(state, component) \ - xkb_state_serialize_layout(state, component) - -#define xkb_state_get_map(state) xkb_state_get_keymap(state) - -/* Not needed anymore, since there's NO_FLAGS. */ -#define XKB_MAP_COMPILE_PLACEHOLDER XKB_KEYMAP_COMPILE_NO_FLAGS -#define XKB_MAP_COMPILE_NO_FLAGS XKB_KEYMAP_COMPILE_NO_FLAGS - -#endif diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compose.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compose.h deleted file mode 100644 index 25894b9394..0000000000 --- a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-compose.h +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef _XKBCOMMON_COMPOSE_H -#define _XKBCOMMON_COMPOSE_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file - * libxkbcommon Compose API - support for Compose and dead-keys. - */ - -/** - * @defgroup compose Compose and dead-keys support - * Support for Compose and dead-keys. - * @since 0.5.0 - * - * @{ - */ - -/** - * @page compose-overview Overview - * @parblock - * - * Compose and dead-keys are a common feature of many keyboard input - * systems. They extend the range of the keysysm that can be produced - * directly from a keyboard by using a sequence of key strokes, instead - * of just one. - * - * Here are some example sequences, in the libX11 Compose file format: - * - * : "á" aacute # LATIN SMALL LETTER A WITH ACUTE - * : "@" at # COMMERCIAL AT - * - * When the user presses a key which produces the `` keysym, - * nothing initially happens (thus the key is dubbed a "dead-key"). But - * when the user enters ``, "á" is "composed", in place of "a". If - * instead the user had entered a keysym which does not follow - * `` in any compose sequence, the sequence is said to be - * "cancelled". - * - * Compose files define many such sequences. For a description of the - * common file format for Compose files, see the Compose(5) man page. - * - * A successfuly-composed sequence has two results: a keysym and a UTF-8 - * string. At least one of the two is defined for each sequence. If only - * a keysym is given, the keysym's string representation is used for the - * result string (using xkb_keysym_to_utf8()). - * - * This library provides low-level support for Compose file parsing and - * processing. Higher-level APIs (such as libX11's `Xutf8LookupString`(3)) - * may be built upon it, or it can be used directly. - * - * @endparblock - */ - -/** - * @page compose-conflicting Conflicting Sequences - * @parblock - * - * To avoid ambiguity, a sequence is not allowed to be a prefix of another. - * In such a case, the conflict is resolved thus: - * - * 1. A longer sequence overrides a shorter one. - * 2. An equal sequence overrides an existing one. - * 3. A shorter sequence does not override a longer one. - * - * Sequences of length 1 are allowed. - * - * @endparblock - */ - -/** - * @page compose-cancellation Cancellation Behavior - * @parblock - * - * What should happen when a sequence is cancelled? For example, consider - * there are only the above sequences, and the input keysyms are - * ` `. There are a few approaches: - * - * 1. Swallow the cancelling keysym; that is, no keysym is produced. - * This is the approach taken by libX11. - * 2. Let the cancelling keysym through; that is, `` is produced. - * 3. Replay the entire sequence; that is, ` ` is produced. - * This is the approach taken by Microsoft Windows (approximately; - * instead of ``, the underlying key is used. This is - * difficult to simulate with XKB keymaps). - * - * You can program whichever approach best fits users' expectations. - * - * @endparblock - */ - -/** - * @struct xkb_compose_table - * Opaque Compose table object. - * - * The compose table holds the definitions of the Compose sequences, as - * gathered from Compose files. It is immutable. - */ -struct xkb_compose_table; - -/** - * @struct xkb_compose_state - * Opaque Compose state object. - * - * The compose state maintains state for compose sequence matching, such - * as which possible sequences are being matched, and the position within - * these sequences. It acts as a simple state machine wherein keysyms are - * the input, and composed keysyms and strings are the output. - * - * The compose state is usually associated with a keyboard device. - */ -struct xkb_compose_state; - -/** Flags affecting Compose file compilation. */ -enum xkb_compose_compile_flags { - /** Do not apply any flags. */ - XKB_COMPOSE_COMPILE_NO_FLAGS = 0 -}; - -/** The recognized Compose file formats. */ -enum xkb_compose_format { - /** The classic libX11 Compose text format, described in Compose(5). */ - XKB_COMPOSE_FORMAT_TEXT_V1 = 1 -}; - -/** - * @page compose-locale Compose Locale - * @parblock - * - * Compose files are locale dependent: - * - Compose files are written for a locale, and the locale is used when - * searching for the appropriate file to use. - * - Compose files may reference the locale internally, with directives - * such as \%L. - * - * As such, functions like xkb_compose_table_new_from_locale() require - * a `locale` parameter. This will usually be the current locale (see - * locale(7) for more details). You may also want to allow the user to - * explicitly configure it, so he can use the Compose file of a given - * locale, but not use that locale for other things. - * - * You may query the current locale as follows: - * @code - * const char *locale; - * locale = setlocale(LC_CTYPE, NULL); - * @endcode - * - * This will only give useful results if the program had previously set - * the current locale using setlocale(3), with `LC_CTYPE` or `LC_ALL` - * and a non-NULL argument. - * - * If you prefer not to use the locale system of the C runtime library, - * you may nevertheless obtain the user's locale directly using - * environment variables, as described in locale(7). For example, - * @code - * const char *locale; - * locale = getenv("LC_ALL"); - * if (!locale || !*locale) - * locale = getenv("LC_CTYPE"); - * if (!locale || !*locale) - * locale = getenv("LANG"); - * if (!locale || !*locale) - * locale = "C"; - * @endcode - * - * Note that some locales supported by the C standard library may not - * have a Compose file assigned. - * - * @endparblock - */ - -/** - * Create a compose table for a given locale. - * - * The locale is used for searching the file-system for an appropriate - * Compose file. The search order is described in Compose(5). It is - * affected by the following environment variables: - * - * 1. `XCOMPOSEFILE` - see Compose(5). - * 2. `HOME` - see Compose(5). - * 3. `XLOCALEDIR` - if set, used as the base directory for the system's - * X locale files, e.g. `/usr/share/X11/locale`, instead of the - * preconfigured directory. - * - * @param context - * The library context in which to create the compose table. - * @param locale - * The current locale. See @ref compose-locale.\n - * - * The value is copied, so it is safe to pass the result of getenv(3) - * (or similar) without fear of it being invalidated by a subsequent - * setenv(3) (or similar). - * @param flags - * Optional flags for the compose table, or 0. - * - * @returns A compose table for the given locale, or NULL if the - * compilation failed or a Compose file was not found. - * - * @memberof xkb_compose_table - */ -struct xkb_compose_table * -xkb_compose_table_new_from_locale(struct xkb_context *context, - const char *locale, - enum xkb_compose_compile_flags flags); - -/** - * Create a new compose table from a Compose file. - * - * @param context - * The library context in which to create the compose table. - * @param file - * The Compose file to compile. - * @param locale - * The current locale. See @ref compose-locale. - * @param format - * The text format of the Compose file to compile. - * @param flags - * Optional flags for the compose table, or 0. - * - * @returns A compose table compiled from the given file, or NULL if - * the compilation failed. - * - * @memberof xkb_compose_table - */ -struct xkb_compose_table * -xkb_compose_table_new_from_file(struct xkb_context *context, - FILE *file, - const char *locale, - enum xkb_compose_format format, - enum xkb_compose_compile_flags flags); - -/** - * Create a new compose table from a memory buffer. - * - * This is just like xkb_compose_table_new_from_file(), but instead of - * a file, gets the table as one enormous string. - * - * @see xkb_compose_table_new_from_file() - * @memberof xkb_compose_table - */ -struct xkb_compose_table * -xkb_compose_table_new_from_buffer(struct xkb_context *context, - const char *buffer, size_t length, - const char *locale, - enum xkb_compose_format format, - enum xkb_compose_compile_flags flags); - -/** - * Take a new reference on a compose table. - * - * @returns The passed in object. - * - * @memberof xkb_compose_table - */ -struct xkb_compose_table * -xkb_compose_table_ref(struct xkb_compose_table *table); - -/** - * Release a reference on a compose table, and possibly free it. - * - * @param table The object. If it is NULL, this function does nothing. - * - * @memberof xkb_compose_table - */ -void -xkb_compose_table_unref(struct xkb_compose_table *table); - -/** Flags for compose state creation. */ -enum xkb_compose_state_flags { - /** Do not apply any flags. */ - XKB_COMPOSE_STATE_NO_FLAGS = 0 -}; - -/** - * Create a new compose state object. - * - * @param table - * The compose table the state will use. - * @param flags - * Optional flags for the compose state, or 0. - * - * @returns A new compose state, or NULL on failure. - * - * @memberof xkb_compose_state - */ -struct xkb_compose_state * -xkb_compose_state_new(struct xkb_compose_table *table, - enum xkb_compose_state_flags flags); - -/** - * Take a new reference on a compose state object. - * - * @returns The passed in object. - * - * @memberof xkb_compose_state - */ -struct xkb_compose_state * -xkb_compose_state_ref(struct xkb_compose_state *state); - -/** - * Release a reference on a compose state object, and possibly free it. - * - * @param state The object. If NULL, do nothing. - * - * @memberof xkb_compose_state - */ -void -xkb_compose_state_unref(struct xkb_compose_state *state); - -/** - * Get the compose table which a compose state object is using. - * - * @returns The compose table which was passed to xkb_compose_state_new() - * when creating this state object. - * - * This function does not take a new reference on the compose table; you - * must explicitly reference it yourself if you plan to use it beyond the - * lifetime of the state. - * - * @memberof xkb_compose_state - */ -struct xkb_compose_table * -xkb_compose_state_get_compose_table(struct xkb_compose_state *state); - -/** Status of the Compose sequence state machine. */ -enum xkb_compose_status { - /** The initial state; no sequence has started yet. */ - XKB_COMPOSE_NOTHING, - /** In the middle of a sequence. */ - XKB_COMPOSE_COMPOSING, - /** A complete sequence has been matched. */ - XKB_COMPOSE_COMPOSED, - /** The last sequence was cancelled due to an unmatched keysym. */ - XKB_COMPOSE_CANCELLED -}; - -/** The effect of a keysym fed to xkb_compose_state_feed(). */ -enum xkb_compose_feed_result { - /** The keysym had no effect - it did not affect the status. */ - XKB_COMPOSE_FEED_IGNORED, - /** The keysym started, advanced or cancelled a sequence. */ - XKB_COMPOSE_FEED_ACCEPTED -}; - -/** - * Feed one keysym to the Compose sequence state machine. - * - * This function can advance into a compose sequence, cancel a sequence, - * start a new sequence, or do nothing in particular. The resulting - * status may be observed with xkb_compose_state_get_status(). - * - * Some keysyms, such as keysyms for modifier keys, are ignored - they - * have no effect on the status or otherwise. - * - * The following is a description of the possible status transitions, in - * the format CURRENT STATUS => NEXT STATUS, given a non-ignored input - * keysym `keysym`: - * - @verbatim - NOTHING or CANCELLED or COMPOSED => - NOTHING if keysym does not start a sequence. - COMPOSING if keysym starts a sequence. - COMPOSED if keysym starts and terminates a single-keysym sequence. - - COMPOSING => - COMPOSING if keysym advances any of the currently possible - sequences but does not terminate any of them. - COMPOSED if keysym terminates one of the currently possible - sequences. - CANCELLED if keysym does not advance any of the currently - possible sequences. - @endverbatim - * - * The current Compose formats do not support multiple-keysyms. - * Therefore, if you are using a function such as xkb_state_key_get_syms() - * and it returns more than one keysym, consider feeding XKB_KEY_NoSymbol - * instead. - * - * @param state - * The compose state object. - * @param keysym - * A keysym, usually obtained after a key-press event, with a - * function such as xkb_state_key_get_one_sym(). - * - * @returns Whether the keysym was ignored. This is useful, for example, - * if you want to keep a record of the sequence matched thus far. - * - * @memberof xkb_compose_state - */ -enum xkb_compose_feed_result -xkb_compose_state_feed(struct xkb_compose_state *state, - xkb_keysym_t keysym); - -/** - * Reset the Compose sequence state machine. - * - * The status is set to XKB_COMPOSE_NOTHING, and the current sequence - * is discarded. - * - * @memberof xkb_compose_state - */ -void -xkb_compose_state_reset(struct xkb_compose_state *state); - -/** - * Get the current status of the compose state machine. - * - * @see xkb_compose_status - * @memberof xkb_compose_state - **/ -enum xkb_compose_status -xkb_compose_state_get_status(struct xkb_compose_state *state); - -/** - * Get the result Unicode/UTF-8 string for a composed sequence. - * - * See @ref compose-overview for more details. This function is only - * useful when the status is XKB_COMPOSE_COMPOSED. - * - * @param[in] state - * The compose state. - * @param[out] buffer - * A buffer to write the string into. - * @param[in] size - * Size of the buffer. - * - * @warning If the buffer passed is too small, the string is truncated - * (though still NUL-terminated). - * - * @returns - * The number of bytes required for the string, excluding the NUL byte. - * If the sequence is not complete, or does not have a viable result - * string, returns 0, and sets `buffer` to the empty string (if possible). - * @returns - * You may check if truncation has occurred by comparing the return value - * with the size of `buffer`, similarly to the `snprintf`(3) function. - * You may safely pass NULL and 0 to `buffer` and `size` to find the - * required size (without the NUL-byte). - * - * @memberof xkb_compose_state - **/ -int -xkb_compose_state_get_utf8(struct xkb_compose_state *state, - char *buffer, size_t size); - -/** - * Get the result keysym for a composed sequence. - * - * See @ref compose-overview for more details. This function is only - * useful when the status is XKB_COMPOSE_COMPOSED. - * - * @returns The result keysym. If the sequence is not complete, or does - * not specify a result keysym, returns XKB_KEY_NoSymbol. - * - * @memberof xkb_compose_state - **/ -xkb_keysym_t -xkb_compose_state_get_one_sym(struct xkb_compose_state *state); - -/** @} */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _XKBCOMMON_COMPOSE_H */ diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h deleted file mode 100644 index bd172a6efc..0000000000 --- a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-keysyms.h +++ /dev/null @@ -1,3004 +0,0 @@ -#ifndef _XKBCOMMON_KEYSYMS_H -#define _XKBCOMMON_KEYSYMS_H - -/* This file is autogenerated; please do not commit directly. */ - -#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */ - -/*********************************************************** -Copyright 1987, 1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -/* - * The "X11 Window System Protocol" standard defines in Appendix A the - * keysym codes. These 29-bit integer values identify characters or - * functions associated with each key (e.g., via the visible - * engraving) of a keyboard layout. This file assigns mnemonic macro - * names for these keysyms. - * - * This file is also compiled (by src/util/makekeys.c in libX11) into - * hash tables that can be accessed with X11 library functions such as - * XStringToKeysym() and XKeysymToString(). - * - * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode - * character, this is noted in a comment that provides both the U+xxxx - * Unicode position, as well as the official Unicode name of the - * character. - * - * Where the correspondence is either not one-to-one or semantically - * unclear, the Unicode position and name are enclosed in - * parentheses. Such legacy keysyms should be considered deprecated - * and are not recommended for use in future keyboard mappings. - * - * For any future extension of the keysyms with characters already - * found in ISO 10646 / Unicode, the following algorithm shall be - * used. The new keysym code position will simply be the character's - * Unicode number plus 0x01000000. The keysym values in the range - * 0x01000100 to 0x0110ffff are reserved to represent Unicode - * characters in the range U+0100 to U+10FFFF. - * - * While most newer Unicode-based X11 clients do already accept - * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it - * will remain necessary for clients -- in the interest of - * compatibility with existing servers -- to also understand the - * existing legacy keysym values in the range 0x0100 to 0x20ff. - * - * Where several mnemonic names are defined for the same keysym in this - * file, all but the first one listed should be considered deprecated. - * - * Mnemonic names for keysyms are defined in this file with lines - * that match one of these Perl regular expressions: - * - * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/ - * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/ - * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/ - * - * Before adding new keysyms, please do consider the following: In - * addition to the keysym names defined in this file, the - * XStringToKeysym() and XKeysymToString() functions will also handle - * any keysym string of the form "U0020" to "U007E" and "U00A0" to - * "U10FFFF" for all possible Unicode characters. In other words, - * every possible Unicode character has already a keysym string - * defined algorithmically, even if it is not listed here. Therefore, - * defining an additional keysym macro is only necessary where a - * non-hexadecimal mnemonic name is needed, or where the new keysym - * does not represent any existing Unicode character. - * - * When adding new keysyms to this file, do not forget to also update the - * following as needed: - * - * - the mappings in src/KeyBind.c in the repo - * git://anongit.freedesktop.org/xorg/lib/libX11.git - * - * - the protocol specification in specs/keysyms.xml - * in the repo git://anongit.freedesktop.org/xorg/proto/x11proto.git - * - */ - -#define XKB_KEY_VoidSymbol 0xffffff /* Void symbol */ - -/* - * TTY function keys, cleverly chosen to map to ASCII, for convenience of - * programming, but could have been arbitrary (at the cost of lookup - * tables in client code). - */ - -#define XKB_KEY_BackSpace 0xff08 /* Back space, back char */ -#define XKB_KEY_Tab 0xff09 -#define XKB_KEY_Linefeed 0xff0a /* Linefeed, LF */ -#define XKB_KEY_Clear 0xff0b -#define XKB_KEY_Return 0xff0d /* Return, enter */ -#define XKB_KEY_Pause 0xff13 /* Pause, hold */ -#define XKB_KEY_Scroll_Lock 0xff14 -#define XKB_KEY_Sys_Req 0xff15 -#define XKB_KEY_Escape 0xff1b -#define XKB_KEY_Delete 0xffff /* Delete, rubout */ - - - -/* International & multi-key character composition */ - -#define XKB_KEY_Multi_key 0xff20 /* Multi-key character compose */ -#define XKB_KEY_Codeinput 0xff37 -#define XKB_KEY_SingleCandidate 0xff3c -#define XKB_KEY_MultipleCandidate 0xff3d -#define XKB_KEY_PreviousCandidate 0xff3e - -/* Japanese keyboard support */ - -#define XKB_KEY_Kanji 0xff21 /* Kanji, Kanji convert */ -#define XKB_KEY_Muhenkan 0xff22 /* Cancel Conversion */ -#define XKB_KEY_Henkan_Mode 0xff23 /* Start/Stop Conversion */ -#define XKB_KEY_Henkan 0xff23 /* Alias for Henkan_Mode */ -#define XKB_KEY_Romaji 0xff24 /* to Romaji */ -#define XKB_KEY_Hiragana 0xff25 /* to Hiragana */ -#define XKB_KEY_Katakana 0xff26 /* to Katakana */ -#define XKB_KEY_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */ -#define XKB_KEY_Zenkaku 0xff28 /* to Zenkaku */ -#define XKB_KEY_Hankaku 0xff29 /* to Hankaku */ -#define XKB_KEY_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */ -#define XKB_KEY_Touroku 0xff2b /* Add to Dictionary */ -#define XKB_KEY_Massyo 0xff2c /* Delete from Dictionary */ -#define XKB_KEY_Kana_Lock 0xff2d /* Kana Lock */ -#define XKB_KEY_Kana_Shift 0xff2e /* Kana Shift */ -#define XKB_KEY_Eisu_Shift 0xff2f /* Alphanumeric Shift */ -#define XKB_KEY_Eisu_toggle 0xff30 /* Alphanumeric toggle */ -#define XKB_KEY_Kanji_Bangou 0xff37 /* Codeinput */ -#define XKB_KEY_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */ -#define XKB_KEY_Mae_Koho 0xff3e /* Previous Candidate */ - -/* 0xff31 thru 0xff3f are under XK_KOREAN */ - -/* Cursor control & motion */ - -#define XKB_KEY_Home 0xff50 -#define XKB_KEY_Left 0xff51 /* Move left, left arrow */ -#define XKB_KEY_Up 0xff52 /* Move up, up arrow */ -#define XKB_KEY_Right 0xff53 /* Move right, right arrow */ -#define XKB_KEY_Down 0xff54 /* Move down, down arrow */ -#define XKB_KEY_Prior 0xff55 /* Prior, previous */ -#define XKB_KEY_Page_Up 0xff55 -#define XKB_KEY_Next 0xff56 /* Next */ -#define XKB_KEY_Page_Down 0xff56 -#define XKB_KEY_End 0xff57 /* EOL */ -#define XKB_KEY_Begin 0xff58 /* BOL */ - - -/* Misc functions */ - -#define XKB_KEY_Select 0xff60 /* Select, mark */ -#define XKB_KEY_Print 0xff61 -#define XKB_KEY_Execute 0xff62 /* Execute, run, do */ -#define XKB_KEY_Insert 0xff63 /* Insert, insert here */ -#define XKB_KEY_Undo 0xff65 -#define XKB_KEY_Redo 0xff66 /* Redo, again */ -#define XKB_KEY_Menu 0xff67 -#define XKB_KEY_Find 0xff68 /* Find, search */ -#define XKB_KEY_Cancel 0xff69 /* Cancel, stop, abort, exit */ -#define XKB_KEY_Help 0xff6a /* Help */ -#define XKB_KEY_Break 0xff6b -#define XKB_KEY_Mode_switch 0xff7e /* Character set switch */ -#define XKB_KEY_script_switch 0xff7e /* Alias for mode_switch */ -#define XKB_KEY_Num_Lock 0xff7f - -/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */ - -#define XKB_KEY_KP_Space 0xff80 /* Space */ -#define XKB_KEY_KP_Tab 0xff89 -#define XKB_KEY_KP_Enter 0xff8d /* Enter */ -#define XKB_KEY_KP_F1 0xff91 /* PF1, KP_A, ... */ -#define XKB_KEY_KP_F2 0xff92 -#define XKB_KEY_KP_F3 0xff93 -#define XKB_KEY_KP_F4 0xff94 -#define XKB_KEY_KP_Home 0xff95 -#define XKB_KEY_KP_Left 0xff96 -#define XKB_KEY_KP_Up 0xff97 -#define XKB_KEY_KP_Right 0xff98 -#define XKB_KEY_KP_Down 0xff99 -#define XKB_KEY_KP_Prior 0xff9a -#define XKB_KEY_KP_Page_Up 0xff9a -#define XKB_KEY_KP_Next 0xff9b -#define XKB_KEY_KP_Page_Down 0xff9b -#define XKB_KEY_KP_End 0xff9c -#define XKB_KEY_KP_Begin 0xff9d -#define XKB_KEY_KP_Insert 0xff9e -#define XKB_KEY_KP_Delete 0xff9f -#define XKB_KEY_KP_Equal 0xffbd /* Equals */ -#define XKB_KEY_KP_Multiply 0xffaa -#define XKB_KEY_KP_Add 0xffab -#define XKB_KEY_KP_Separator 0xffac /* Separator, often comma */ -#define XKB_KEY_KP_Subtract 0xffad -#define XKB_KEY_KP_Decimal 0xffae -#define XKB_KEY_KP_Divide 0xffaf - -#define XKB_KEY_KP_0 0xffb0 -#define XKB_KEY_KP_1 0xffb1 -#define XKB_KEY_KP_2 0xffb2 -#define XKB_KEY_KP_3 0xffb3 -#define XKB_KEY_KP_4 0xffb4 -#define XKB_KEY_KP_5 0xffb5 -#define XKB_KEY_KP_6 0xffb6 -#define XKB_KEY_KP_7 0xffb7 -#define XKB_KEY_KP_8 0xffb8 -#define XKB_KEY_KP_9 0xffb9 - - - -/* - * Auxiliary functions; note the duplicate definitions for left and right - * function keys; Sun keyboards and a few other manufacturers have such - * function key groups on the left and/or right sides of the keyboard. - * We've not found a keyboard with more than 35 function keys total. - */ - -#define XKB_KEY_F1 0xffbe -#define XKB_KEY_F2 0xffbf -#define XKB_KEY_F3 0xffc0 -#define XKB_KEY_F4 0xffc1 -#define XKB_KEY_F5 0xffc2 -#define XKB_KEY_F6 0xffc3 -#define XKB_KEY_F7 0xffc4 -#define XKB_KEY_F8 0xffc5 -#define XKB_KEY_F9 0xffc6 -#define XKB_KEY_F10 0xffc7 -#define XKB_KEY_F11 0xffc8 -#define XKB_KEY_L1 0xffc8 -#define XKB_KEY_F12 0xffc9 -#define XKB_KEY_L2 0xffc9 -#define XKB_KEY_F13 0xffca -#define XKB_KEY_L3 0xffca -#define XKB_KEY_F14 0xffcb -#define XKB_KEY_L4 0xffcb -#define XKB_KEY_F15 0xffcc -#define XKB_KEY_L5 0xffcc -#define XKB_KEY_F16 0xffcd -#define XKB_KEY_L6 0xffcd -#define XKB_KEY_F17 0xffce -#define XKB_KEY_L7 0xffce -#define XKB_KEY_F18 0xffcf -#define XKB_KEY_L8 0xffcf -#define XKB_KEY_F19 0xffd0 -#define XKB_KEY_L9 0xffd0 -#define XKB_KEY_F20 0xffd1 -#define XKB_KEY_L10 0xffd1 -#define XKB_KEY_F21 0xffd2 -#define XKB_KEY_R1 0xffd2 -#define XKB_KEY_F22 0xffd3 -#define XKB_KEY_R2 0xffd3 -#define XKB_KEY_F23 0xffd4 -#define XKB_KEY_R3 0xffd4 -#define XKB_KEY_F24 0xffd5 -#define XKB_KEY_R4 0xffd5 -#define XKB_KEY_F25 0xffd6 -#define XKB_KEY_R5 0xffd6 -#define XKB_KEY_F26 0xffd7 -#define XKB_KEY_R6 0xffd7 -#define XKB_KEY_F27 0xffd8 -#define XKB_KEY_R7 0xffd8 -#define XKB_KEY_F28 0xffd9 -#define XKB_KEY_R8 0xffd9 -#define XKB_KEY_F29 0xffda -#define XKB_KEY_R9 0xffda -#define XKB_KEY_F30 0xffdb -#define XKB_KEY_R10 0xffdb -#define XKB_KEY_F31 0xffdc -#define XKB_KEY_R11 0xffdc -#define XKB_KEY_F32 0xffdd -#define XKB_KEY_R12 0xffdd -#define XKB_KEY_F33 0xffde -#define XKB_KEY_R13 0xffde -#define XKB_KEY_F34 0xffdf -#define XKB_KEY_R14 0xffdf -#define XKB_KEY_F35 0xffe0 -#define XKB_KEY_R15 0xffe0 - -/* Modifiers */ - -#define XKB_KEY_Shift_L 0xffe1 /* Left shift */ -#define XKB_KEY_Shift_R 0xffe2 /* Right shift */ -#define XKB_KEY_Control_L 0xffe3 /* Left control */ -#define XKB_KEY_Control_R 0xffe4 /* Right control */ -#define XKB_KEY_Caps_Lock 0xffe5 /* Caps lock */ -#define XKB_KEY_Shift_Lock 0xffe6 /* Shift lock */ - -#define XKB_KEY_Meta_L 0xffe7 /* Left meta */ -#define XKB_KEY_Meta_R 0xffe8 /* Right meta */ -#define XKB_KEY_Alt_L 0xffe9 /* Left alt */ -#define XKB_KEY_Alt_R 0xffea /* Right alt */ -#define XKB_KEY_Super_L 0xffeb /* Left super */ -#define XKB_KEY_Super_R 0xffec /* Right super */ -#define XKB_KEY_Hyper_L 0xffed /* Left hyper */ -#define XKB_KEY_Hyper_R 0xffee /* Right hyper */ - -/* - * Keyboard (XKB) Extension function and modifier keys - * (from Appendix C of "The X Keyboard Extension: Protocol Specification") - * Byte 3 = 0xfe - */ - -#define XKB_KEY_ISO_Lock 0xfe01 -#define XKB_KEY_ISO_Level2_Latch 0xfe02 -#define XKB_KEY_ISO_Level3_Shift 0xfe03 -#define XKB_KEY_ISO_Level3_Latch 0xfe04 -#define XKB_KEY_ISO_Level3_Lock 0xfe05 -#define XKB_KEY_ISO_Level5_Shift 0xfe11 -#define XKB_KEY_ISO_Level5_Latch 0xfe12 -#define XKB_KEY_ISO_Level5_Lock 0xfe13 -#define XKB_KEY_ISO_Group_Shift 0xff7e /* Alias for mode_switch */ -#define XKB_KEY_ISO_Group_Latch 0xfe06 -#define XKB_KEY_ISO_Group_Lock 0xfe07 -#define XKB_KEY_ISO_Next_Group 0xfe08 -#define XKB_KEY_ISO_Next_Group_Lock 0xfe09 -#define XKB_KEY_ISO_Prev_Group 0xfe0a -#define XKB_KEY_ISO_Prev_Group_Lock 0xfe0b -#define XKB_KEY_ISO_First_Group 0xfe0c -#define XKB_KEY_ISO_First_Group_Lock 0xfe0d -#define XKB_KEY_ISO_Last_Group 0xfe0e -#define XKB_KEY_ISO_Last_Group_Lock 0xfe0f - -#define XKB_KEY_ISO_Left_Tab 0xfe20 -#define XKB_KEY_ISO_Move_Line_Up 0xfe21 -#define XKB_KEY_ISO_Move_Line_Down 0xfe22 -#define XKB_KEY_ISO_Partial_Line_Up 0xfe23 -#define XKB_KEY_ISO_Partial_Line_Down 0xfe24 -#define XKB_KEY_ISO_Partial_Space_Left 0xfe25 -#define XKB_KEY_ISO_Partial_Space_Right 0xfe26 -#define XKB_KEY_ISO_Set_Margin_Left 0xfe27 -#define XKB_KEY_ISO_Set_Margin_Right 0xfe28 -#define XKB_KEY_ISO_Release_Margin_Left 0xfe29 -#define XKB_KEY_ISO_Release_Margin_Right 0xfe2a -#define XKB_KEY_ISO_Release_Both_Margins 0xfe2b -#define XKB_KEY_ISO_Fast_Cursor_Left 0xfe2c -#define XKB_KEY_ISO_Fast_Cursor_Right 0xfe2d -#define XKB_KEY_ISO_Fast_Cursor_Up 0xfe2e -#define XKB_KEY_ISO_Fast_Cursor_Down 0xfe2f -#define XKB_KEY_ISO_Continuous_Underline 0xfe30 -#define XKB_KEY_ISO_Discontinuous_Underline 0xfe31 -#define XKB_KEY_ISO_Emphasize 0xfe32 -#define XKB_KEY_ISO_Center_Object 0xfe33 -#define XKB_KEY_ISO_Enter 0xfe34 - -#define XKB_KEY_dead_grave 0xfe50 -#define XKB_KEY_dead_acute 0xfe51 -#define XKB_KEY_dead_circumflex 0xfe52 -#define XKB_KEY_dead_tilde 0xfe53 -#define XKB_KEY_dead_perispomeni 0xfe53 /* alias for dead_tilde */ -#define XKB_KEY_dead_macron 0xfe54 -#define XKB_KEY_dead_breve 0xfe55 -#define XKB_KEY_dead_abovedot 0xfe56 -#define XKB_KEY_dead_diaeresis 0xfe57 -#define XKB_KEY_dead_abovering 0xfe58 -#define XKB_KEY_dead_doubleacute 0xfe59 -#define XKB_KEY_dead_caron 0xfe5a -#define XKB_KEY_dead_cedilla 0xfe5b -#define XKB_KEY_dead_ogonek 0xfe5c -#define XKB_KEY_dead_iota 0xfe5d -#define XKB_KEY_dead_voiced_sound 0xfe5e -#define XKB_KEY_dead_semivoiced_sound 0xfe5f -#define XKB_KEY_dead_belowdot 0xfe60 -#define XKB_KEY_dead_hook 0xfe61 -#define XKB_KEY_dead_horn 0xfe62 -#define XKB_KEY_dead_stroke 0xfe63 -#define XKB_KEY_dead_abovecomma 0xfe64 -#define XKB_KEY_dead_psili 0xfe64 /* alias for dead_abovecomma */ -#define XKB_KEY_dead_abovereversedcomma 0xfe65 -#define XKB_KEY_dead_dasia 0xfe65 /* alias for dead_abovereversedcomma */ -#define XKB_KEY_dead_doublegrave 0xfe66 -#define XKB_KEY_dead_belowring 0xfe67 -#define XKB_KEY_dead_belowmacron 0xfe68 -#define XKB_KEY_dead_belowcircumflex 0xfe69 -#define XKB_KEY_dead_belowtilde 0xfe6a -#define XKB_KEY_dead_belowbreve 0xfe6b -#define XKB_KEY_dead_belowdiaeresis 0xfe6c -#define XKB_KEY_dead_invertedbreve 0xfe6d -#define XKB_KEY_dead_belowcomma 0xfe6e -#define XKB_KEY_dead_currency 0xfe6f - -/* extra dead elements for German T3 layout */ -#define XKB_KEY_dead_lowline 0xfe90 -#define XKB_KEY_dead_aboveverticalline 0xfe91 -#define XKB_KEY_dead_belowverticalline 0xfe92 -#define XKB_KEY_dead_longsolidusoverlay 0xfe93 - -/* dead vowels for universal syllable entry */ -#define XKB_KEY_dead_a 0xfe80 -#define XKB_KEY_dead_A 0xfe81 -#define XKB_KEY_dead_e 0xfe82 -#define XKB_KEY_dead_E 0xfe83 -#define XKB_KEY_dead_i 0xfe84 -#define XKB_KEY_dead_I 0xfe85 -#define XKB_KEY_dead_o 0xfe86 -#define XKB_KEY_dead_O 0xfe87 -#define XKB_KEY_dead_u 0xfe88 -#define XKB_KEY_dead_U 0xfe89 -#define XKB_KEY_dead_small_schwa 0xfe8a -#define XKB_KEY_dead_capital_schwa 0xfe8b - -#define XKB_KEY_dead_greek 0xfe8c - -#define XKB_KEY_First_Virtual_Screen 0xfed0 -#define XKB_KEY_Prev_Virtual_Screen 0xfed1 -#define XKB_KEY_Next_Virtual_Screen 0xfed2 -#define XKB_KEY_Last_Virtual_Screen 0xfed4 -#define XKB_KEY_Terminate_Server 0xfed5 - -#define XKB_KEY_AccessX_Enable 0xfe70 -#define XKB_KEY_AccessX_Feedback_Enable 0xfe71 -#define XKB_KEY_RepeatKeys_Enable 0xfe72 -#define XKB_KEY_SlowKeys_Enable 0xfe73 -#define XKB_KEY_BounceKeys_Enable 0xfe74 -#define XKB_KEY_StickyKeys_Enable 0xfe75 -#define XKB_KEY_MouseKeys_Enable 0xfe76 -#define XKB_KEY_MouseKeys_Accel_Enable 0xfe77 -#define XKB_KEY_Overlay1_Enable 0xfe78 -#define XKB_KEY_Overlay2_Enable 0xfe79 -#define XKB_KEY_AudibleBell_Enable 0xfe7a - -#define XKB_KEY_Pointer_Left 0xfee0 -#define XKB_KEY_Pointer_Right 0xfee1 -#define XKB_KEY_Pointer_Up 0xfee2 -#define XKB_KEY_Pointer_Down 0xfee3 -#define XKB_KEY_Pointer_UpLeft 0xfee4 -#define XKB_KEY_Pointer_UpRight 0xfee5 -#define XKB_KEY_Pointer_DownLeft 0xfee6 -#define XKB_KEY_Pointer_DownRight 0xfee7 -#define XKB_KEY_Pointer_Button_Dflt 0xfee8 -#define XKB_KEY_Pointer_Button1 0xfee9 -#define XKB_KEY_Pointer_Button2 0xfeea -#define XKB_KEY_Pointer_Button3 0xfeeb -#define XKB_KEY_Pointer_Button4 0xfeec -#define XKB_KEY_Pointer_Button5 0xfeed -#define XKB_KEY_Pointer_DblClick_Dflt 0xfeee -#define XKB_KEY_Pointer_DblClick1 0xfeef -#define XKB_KEY_Pointer_DblClick2 0xfef0 -#define XKB_KEY_Pointer_DblClick3 0xfef1 -#define XKB_KEY_Pointer_DblClick4 0xfef2 -#define XKB_KEY_Pointer_DblClick5 0xfef3 -#define XKB_KEY_Pointer_Drag_Dflt 0xfef4 -#define XKB_KEY_Pointer_Drag1 0xfef5 -#define XKB_KEY_Pointer_Drag2 0xfef6 -#define XKB_KEY_Pointer_Drag3 0xfef7 -#define XKB_KEY_Pointer_Drag4 0xfef8 -#define XKB_KEY_Pointer_Drag5 0xfefd - -#define XKB_KEY_Pointer_EnableKeys 0xfef9 -#define XKB_KEY_Pointer_Accelerate 0xfefa -#define XKB_KEY_Pointer_DfltBtnNext 0xfefb -#define XKB_KEY_Pointer_DfltBtnPrev 0xfefc - -/* Single-Stroke Multiple-Character N-Graph Keysyms For The X Input Method */ - -#define XKB_KEY_ch 0xfea0 -#define XKB_KEY_Ch 0xfea1 -#define XKB_KEY_CH 0xfea2 -#define XKB_KEY_c_h 0xfea3 -#define XKB_KEY_C_h 0xfea4 -#define XKB_KEY_C_H 0xfea5 - - -/* - * 3270 Terminal Keys - * Byte 3 = 0xfd - */ - -#define XKB_KEY_3270_Duplicate 0xfd01 -#define XKB_KEY_3270_FieldMark 0xfd02 -#define XKB_KEY_3270_Right2 0xfd03 -#define XKB_KEY_3270_Left2 0xfd04 -#define XKB_KEY_3270_BackTab 0xfd05 -#define XKB_KEY_3270_EraseEOF 0xfd06 -#define XKB_KEY_3270_EraseInput 0xfd07 -#define XKB_KEY_3270_Reset 0xfd08 -#define XKB_KEY_3270_Quit 0xfd09 -#define XKB_KEY_3270_PA1 0xfd0a -#define XKB_KEY_3270_PA2 0xfd0b -#define XKB_KEY_3270_PA3 0xfd0c -#define XKB_KEY_3270_Test 0xfd0d -#define XKB_KEY_3270_Attn 0xfd0e -#define XKB_KEY_3270_CursorBlink 0xfd0f -#define XKB_KEY_3270_AltCursor 0xfd10 -#define XKB_KEY_3270_KeyClick 0xfd11 -#define XKB_KEY_3270_Jump 0xfd12 -#define XKB_KEY_3270_Ident 0xfd13 -#define XKB_KEY_3270_Rule 0xfd14 -#define XKB_KEY_3270_Copy 0xfd15 -#define XKB_KEY_3270_Play 0xfd16 -#define XKB_KEY_3270_Setup 0xfd17 -#define XKB_KEY_3270_Record 0xfd18 -#define XKB_KEY_3270_ChangeScreen 0xfd19 -#define XKB_KEY_3270_DeleteWord 0xfd1a -#define XKB_KEY_3270_ExSelect 0xfd1b -#define XKB_KEY_3270_CursorSelect 0xfd1c -#define XKB_KEY_3270_PrintScreen 0xfd1d -#define XKB_KEY_3270_Enter 0xfd1e - -/* - * Latin 1 - * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF) - * Byte 3 = 0 - */ -#define XKB_KEY_space 0x0020 /* U+0020 SPACE */ -#define XKB_KEY_exclam 0x0021 /* U+0021 EXCLAMATION MARK */ -#define XKB_KEY_quotedbl 0x0022 /* U+0022 QUOTATION MARK */ -#define XKB_KEY_numbersign 0x0023 /* U+0023 NUMBER SIGN */ -#define XKB_KEY_dollar 0x0024 /* U+0024 DOLLAR SIGN */ -#define XKB_KEY_percent 0x0025 /* U+0025 PERCENT SIGN */ -#define XKB_KEY_ampersand 0x0026 /* U+0026 AMPERSAND */ -#define XKB_KEY_apostrophe 0x0027 /* U+0027 APOSTROPHE */ -#define XKB_KEY_quoteright 0x0027 /* deprecated */ -#define XKB_KEY_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */ -#define XKB_KEY_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */ -#define XKB_KEY_asterisk 0x002a /* U+002A ASTERISK */ -#define XKB_KEY_plus 0x002b /* U+002B PLUS SIGN */ -#define XKB_KEY_comma 0x002c /* U+002C COMMA */ -#define XKB_KEY_minus 0x002d /* U+002D HYPHEN-MINUS */ -#define XKB_KEY_period 0x002e /* U+002E FULL STOP */ -#define XKB_KEY_slash 0x002f /* U+002F SOLIDUS */ -#define XKB_KEY_0 0x0030 /* U+0030 DIGIT ZERO */ -#define XKB_KEY_1 0x0031 /* U+0031 DIGIT ONE */ -#define XKB_KEY_2 0x0032 /* U+0032 DIGIT TWO */ -#define XKB_KEY_3 0x0033 /* U+0033 DIGIT THREE */ -#define XKB_KEY_4 0x0034 /* U+0034 DIGIT FOUR */ -#define XKB_KEY_5 0x0035 /* U+0035 DIGIT FIVE */ -#define XKB_KEY_6 0x0036 /* U+0036 DIGIT SIX */ -#define XKB_KEY_7 0x0037 /* U+0037 DIGIT SEVEN */ -#define XKB_KEY_8 0x0038 /* U+0038 DIGIT EIGHT */ -#define XKB_KEY_9 0x0039 /* U+0039 DIGIT NINE */ -#define XKB_KEY_colon 0x003a /* U+003A COLON */ -#define XKB_KEY_semicolon 0x003b /* U+003B SEMICOLON */ -#define XKB_KEY_less 0x003c /* U+003C LESS-THAN SIGN */ -#define XKB_KEY_equal 0x003d /* U+003D EQUALS SIGN */ -#define XKB_KEY_greater 0x003e /* U+003E GREATER-THAN SIGN */ -#define XKB_KEY_question 0x003f /* U+003F QUESTION MARK */ -#define XKB_KEY_at 0x0040 /* U+0040 COMMERCIAL AT */ -#define XKB_KEY_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */ -#define XKB_KEY_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */ -#define XKB_KEY_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */ -#define XKB_KEY_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */ -#define XKB_KEY_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */ -#define XKB_KEY_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */ -#define XKB_KEY_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */ -#define XKB_KEY_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */ -#define XKB_KEY_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */ -#define XKB_KEY_J 0x004a /* U+004A LATIN CAPITAL LETTER J */ -#define XKB_KEY_K 0x004b /* U+004B LATIN CAPITAL LETTER K */ -#define XKB_KEY_L 0x004c /* U+004C LATIN CAPITAL LETTER L */ -#define XKB_KEY_M 0x004d /* U+004D LATIN CAPITAL LETTER M */ -#define XKB_KEY_N 0x004e /* U+004E LATIN CAPITAL LETTER N */ -#define XKB_KEY_O 0x004f /* U+004F LATIN CAPITAL LETTER O */ -#define XKB_KEY_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */ -#define XKB_KEY_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */ -#define XKB_KEY_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */ -#define XKB_KEY_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */ -#define XKB_KEY_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */ -#define XKB_KEY_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */ -#define XKB_KEY_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */ -#define XKB_KEY_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */ -#define XKB_KEY_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */ -#define XKB_KEY_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */ -#define XKB_KEY_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */ -#define XKB_KEY_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */ -#define XKB_KEY_backslash 0x005c /* U+005C REVERSE SOLIDUS */ -#define XKB_KEY_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */ -#define XKB_KEY_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */ -#define XKB_KEY_underscore 0x005f /* U+005F LOW LINE */ -#define XKB_KEY_grave 0x0060 /* U+0060 GRAVE ACCENT */ -#define XKB_KEY_quoteleft 0x0060 /* deprecated */ -#define XKB_KEY_a 0x0061 /* U+0061 LATIN SMALL LETTER A */ -#define XKB_KEY_b 0x0062 /* U+0062 LATIN SMALL LETTER B */ -#define XKB_KEY_c 0x0063 /* U+0063 LATIN SMALL LETTER C */ -#define XKB_KEY_d 0x0064 /* U+0064 LATIN SMALL LETTER D */ -#define XKB_KEY_e 0x0065 /* U+0065 LATIN SMALL LETTER E */ -#define XKB_KEY_f 0x0066 /* U+0066 LATIN SMALL LETTER F */ -#define XKB_KEY_g 0x0067 /* U+0067 LATIN SMALL LETTER G */ -#define XKB_KEY_h 0x0068 /* U+0068 LATIN SMALL LETTER H */ -#define XKB_KEY_i 0x0069 /* U+0069 LATIN SMALL LETTER I */ -#define XKB_KEY_j 0x006a /* U+006A LATIN SMALL LETTER J */ -#define XKB_KEY_k 0x006b /* U+006B LATIN SMALL LETTER K */ -#define XKB_KEY_l 0x006c /* U+006C LATIN SMALL LETTER L */ -#define XKB_KEY_m 0x006d /* U+006D LATIN SMALL LETTER M */ -#define XKB_KEY_n 0x006e /* U+006E LATIN SMALL LETTER N */ -#define XKB_KEY_o 0x006f /* U+006F LATIN SMALL LETTER O */ -#define XKB_KEY_p 0x0070 /* U+0070 LATIN SMALL LETTER P */ -#define XKB_KEY_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */ -#define XKB_KEY_r 0x0072 /* U+0072 LATIN SMALL LETTER R */ -#define XKB_KEY_s 0x0073 /* U+0073 LATIN SMALL LETTER S */ -#define XKB_KEY_t 0x0074 /* U+0074 LATIN SMALL LETTER T */ -#define XKB_KEY_u 0x0075 /* U+0075 LATIN SMALL LETTER U */ -#define XKB_KEY_v 0x0076 /* U+0076 LATIN SMALL LETTER V */ -#define XKB_KEY_w 0x0077 /* U+0077 LATIN SMALL LETTER W */ -#define XKB_KEY_x 0x0078 /* U+0078 LATIN SMALL LETTER X */ -#define XKB_KEY_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */ -#define XKB_KEY_z 0x007a /* U+007A LATIN SMALL LETTER Z */ -#define XKB_KEY_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */ -#define XKB_KEY_bar 0x007c /* U+007C VERTICAL LINE */ -#define XKB_KEY_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */ -#define XKB_KEY_asciitilde 0x007e /* U+007E TILDE */ - -#define XKB_KEY_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */ -#define XKB_KEY_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */ -#define XKB_KEY_cent 0x00a2 /* U+00A2 CENT SIGN */ -#define XKB_KEY_sterling 0x00a3 /* U+00A3 POUND SIGN */ -#define XKB_KEY_currency 0x00a4 /* U+00A4 CURRENCY SIGN */ -#define XKB_KEY_yen 0x00a5 /* U+00A5 YEN SIGN */ -#define XKB_KEY_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */ -#define XKB_KEY_section 0x00a7 /* U+00A7 SECTION SIGN */ -#define XKB_KEY_diaeresis 0x00a8 /* U+00A8 DIAERESIS */ -#define XKB_KEY_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */ -#define XKB_KEY_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */ -#define XKB_KEY_guillemotleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ -#define XKB_KEY_notsign 0x00ac /* U+00AC NOT SIGN */ -#define XKB_KEY_hyphen 0x00ad /* U+00AD SOFT HYPHEN */ -#define XKB_KEY_registered 0x00ae /* U+00AE REGISTERED SIGN */ -#define XKB_KEY_macron 0x00af /* U+00AF MACRON */ -#define XKB_KEY_degree 0x00b0 /* U+00B0 DEGREE SIGN */ -#define XKB_KEY_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */ -#define XKB_KEY_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */ -#define XKB_KEY_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */ -#define XKB_KEY_acute 0x00b4 /* U+00B4 ACUTE ACCENT */ -#define XKB_KEY_mu 0x00b5 /* U+00B5 MICRO SIGN */ -#define XKB_KEY_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */ -#define XKB_KEY_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */ -#define XKB_KEY_cedilla 0x00b8 /* U+00B8 CEDILLA */ -#define XKB_KEY_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */ -#define XKB_KEY_masculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */ -#define XKB_KEY_guillemotright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ -#define XKB_KEY_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */ -#define XKB_KEY_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */ -#define XKB_KEY_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */ -#define XKB_KEY_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */ -#define XKB_KEY_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */ -#define XKB_KEY_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */ -#define XKB_KEY_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ -#define XKB_KEY_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */ -#define XKB_KEY_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */ -#define XKB_KEY_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */ -#define XKB_KEY_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */ -#define XKB_KEY_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */ -#define XKB_KEY_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */ -#define XKB_KEY_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */ -#define XKB_KEY_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ -#define XKB_KEY_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */ -#define XKB_KEY_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */ -#define XKB_KEY_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */ -#define XKB_KEY_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ -#define XKB_KEY_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */ -#define XKB_KEY_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */ -#define XKB_KEY_Eth 0x00d0 /* deprecated */ -#define XKB_KEY_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */ -#define XKB_KEY_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */ -#define XKB_KEY_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */ -#define XKB_KEY_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ -#define XKB_KEY_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */ -#define XKB_KEY_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */ -#define XKB_KEY_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */ -#define XKB_KEY_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */ -#define XKB_KEY_Ooblique 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */ -#define XKB_KEY_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */ -#define XKB_KEY_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */ -#define XKB_KEY_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ -#define XKB_KEY_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */ -#define XKB_KEY_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */ -#define XKB_KEY_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */ -#define XKB_KEY_Thorn 0x00de /* deprecated */ -#define XKB_KEY_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */ -#define XKB_KEY_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */ -#define XKB_KEY_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */ -#define XKB_KEY_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */ -#define XKB_KEY_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */ -#define XKB_KEY_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */ -#define XKB_KEY_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */ -#define XKB_KEY_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */ -#define XKB_KEY_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */ -#define XKB_KEY_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */ -#define XKB_KEY_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */ -#define XKB_KEY_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */ -#define XKB_KEY_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */ -#define XKB_KEY_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */ -#define XKB_KEY_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */ -#define XKB_KEY_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */ -#define XKB_KEY_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */ -#define XKB_KEY_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */ -#define XKB_KEY_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */ -#define XKB_KEY_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */ -#define XKB_KEY_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */ -#define XKB_KEY_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */ -#define XKB_KEY_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */ -#define XKB_KEY_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */ -#define XKB_KEY_division 0x00f7 /* U+00F7 DIVISION SIGN */ -#define XKB_KEY_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */ -#define XKB_KEY_ooblique 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */ -#define XKB_KEY_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */ -#define XKB_KEY_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */ -#define XKB_KEY_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */ -#define XKB_KEY_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */ -#define XKB_KEY_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */ -#define XKB_KEY_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */ -#define XKB_KEY_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */ - -/* - * Latin 2 - * Byte 3 = 1 - */ - -#define XKB_KEY_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */ -#define XKB_KEY_breve 0x01a2 /* U+02D8 BREVE */ -#define XKB_KEY_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */ -#define XKB_KEY_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */ -#define XKB_KEY_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */ -#define XKB_KEY_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */ -#define XKB_KEY_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */ -#define XKB_KEY_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */ -#define XKB_KEY_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */ -#define XKB_KEY_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */ -#define XKB_KEY_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */ -#define XKB_KEY_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */ -#define XKB_KEY_ogonek 0x01b2 /* U+02DB OGONEK */ -#define XKB_KEY_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */ -#define XKB_KEY_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */ -#define XKB_KEY_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */ -#define XKB_KEY_caron 0x01b7 /* U+02C7 CARON */ -#define XKB_KEY_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */ -#define XKB_KEY_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */ -#define XKB_KEY_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */ -#define XKB_KEY_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */ -#define XKB_KEY_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */ -#define XKB_KEY_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */ -#define XKB_KEY_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */ -#define XKB_KEY_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */ -#define XKB_KEY_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */ -#define XKB_KEY_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */ -#define XKB_KEY_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */ -#define XKB_KEY_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */ -#define XKB_KEY_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */ -#define XKB_KEY_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */ -#define XKB_KEY_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */ -#define XKB_KEY_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */ -#define XKB_KEY_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */ -#define XKB_KEY_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */ -#define XKB_KEY_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ -#define XKB_KEY_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */ -#define XKB_KEY_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */ -#define XKB_KEY_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ -#define XKB_KEY_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */ -#define XKB_KEY_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */ -#define XKB_KEY_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */ -#define XKB_KEY_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */ -#define XKB_KEY_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */ -#define XKB_KEY_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */ -#define XKB_KEY_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */ -#define XKB_KEY_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */ -#define XKB_KEY_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */ -#define XKB_KEY_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */ -#define XKB_KEY_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */ -#define XKB_KEY_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */ -#define XKB_KEY_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */ -#define XKB_KEY_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */ -#define XKB_KEY_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */ -#define XKB_KEY_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */ -#define XKB_KEY_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */ -#define XKB_KEY_abovedot 0x01ff /* U+02D9 DOT ABOVE */ - -/* - * Latin 3 - * Byte 3 = 2 - */ - -#define XKB_KEY_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */ -#define XKB_KEY_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ -#define XKB_KEY_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */ -#define XKB_KEY_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */ -#define XKB_KEY_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ -#define XKB_KEY_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */ -#define XKB_KEY_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */ -#define XKB_KEY_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */ -#define XKB_KEY_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */ -#define XKB_KEY_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */ -#define XKB_KEY_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */ -#define XKB_KEY_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ -#define XKB_KEY_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */ -#define XKB_KEY_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ -#define XKB_KEY_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */ -#define XKB_KEY_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ -#define XKB_KEY_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */ -#define XKB_KEY_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */ -#define XKB_KEY_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */ -#define XKB_KEY_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */ -#define XKB_KEY_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */ -#define XKB_KEY_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */ - - -/* - * Latin 4 - * Byte 3 = 3 - */ - -#define XKB_KEY_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */ -#define XKB_KEY_kappa 0x03a2 /* deprecated */ -#define XKB_KEY_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */ -#define XKB_KEY_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */ -#define XKB_KEY_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */ -#define XKB_KEY_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */ -#define XKB_KEY_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */ -#define XKB_KEY_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */ -#define XKB_KEY_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */ -#define XKB_KEY_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */ -#define XKB_KEY_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */ -#define XKB_KEY_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */ -#define XKB_KEY_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */ -#define XKB_KEY_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */ -#define XKB_KEY_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */ -#define XKB_KEY_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */ -#define XKB_KEY_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */ -#define XKB_KEY_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */ -#define XKB_KEY_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */ -#define XKB_KEY_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */ -#define XKB_KEY_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */ -#define XKB_KEY_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */ -#define XKB_KEY_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */ -#define XKB_KEY_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */ -#define XKB_KEY_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */ -#define XKB_KEY_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */ -#define XKB_KEY_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */ -#define XKB_KEY_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */ -#define XKB_KEY_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */ -#define XKB_KEY_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */ -#define XKB_KEY_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */ -#define XKB_KEY_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */ -#define XKB_KEY_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */ -#define XKB_KEY_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */ -#define XKB_KEY_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */ -#define XKB_KEY_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */ - -/* - * Latin 8 - */ -#define XKB_KEY_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */ -#define XKB_KEY_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */ -#define XKB_KEY_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */ -#define XKB_KEY_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */ -#define XKB_KEY_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */ -#define XKB_KEY_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */ -#define XKB_KEY_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */ -#define XKB_KEY_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */ -#define XKB_KEY_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */ -#define XKB_KEY_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */ -#define XKB_KEY_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */ -#define XKB_KEY_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */ -#define XKB_KEY_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */ -#define XKB_KEY_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */ -#define XKB_KEY_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */ -#define XKB_KEY_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */ -#define XKB_KEY_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */ -#define XKB_KEY_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */ -#define XKB_KEY_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */ -#define XKB_KEY_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */ -#define XKB_KEY_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */ -#define XKB_KEY_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */ -#define XKB_KEY_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */ -#define XKB_KEY_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */ -#define XKB_KEY_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */ -#define XKB_KEY_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */ - -/* - * Latin 9 - * Byte 3 = 0x13 - */ - -#define XKB_KEY_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */ -#define XKB_KEY_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */ -#define XKB_KEY_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */ - -/* - * Katakana - * Byte 3 = 4 - */ - -#define XKB_KEY_overline 0x047e /* U+203E OVERLINE */ -#define XKB_KEY_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */ -#define XKB_KEY_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */ -#define XKB_KEY_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */ -#define XKB_KEY_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */ -#define XKB_KEY_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */ -#define XKB_KEY_kana_middledot 0x04a5 /* deprecated */ -#define XKB_KEY_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */ -#define XKB_KEY_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */ -#define XKB_KEY_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */ -#define XKB_KEY_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */ -#define XKB_KEY_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */ -#define XKB_KEY_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */ -#define XKB_KEY_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */ -#define XKB_KEY_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */ -#define XKB_KEY_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */ -#define XKB_KEY_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */ -#define XKB_KEY_kana_tu 0x04af /* deprecated */ -#define XKB_KEY_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */ -#define XKB_KEY_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */ -#define XKB_KEY_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */ -#define XKB_KEY_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */ -#define XKB_KEY_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */ -#define XKB_KEY_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */ -#define XKB_KEY_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */ -#define XKB_KEY_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */ -#define XKB_KEY_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */ -#define XKB_KEY_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */ -#define XKB_KEY_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */ -#define XKB_KEY_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */ -#define XKB_KEY_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */ -#define XKB_KEY_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */ -#define XKB_KEY_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */ -#define XKB_KEY_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */ -#define XKB_KEY_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */ -#define XKB_KEY_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */ -#define XKB_KEY_kana_TI 0x04c1 /* deprecated */ -#define XKB_KEY_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */ -#define XKB_KEY_kana_TU 0x04c2 /* deprecated */ -#define XKB_KEY_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */ -#define XKB_KEY_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */ -#define XKB_KEY_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */ -#define XKB_KEY_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */ -#define XKB_KEY_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */ -#define XKB_KEY_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */ -#define XKB_KEY_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */ -#define XKB_KEY_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */ -#define XKB_KEY_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */ -#define XKB_KEY_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */ -#define XKB_KEY_kana_HU 0x04cc /* deprecated */ -#define XKB_KEY_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */ -#define XKB_KEY_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */ -#define XKB_KEY_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */ -#define XKB_KEY_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */ -#define XKB_KEY_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */ -#define XKB_KEY_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */ -#define XKB_KEY_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */ -#define XKB_KEY_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */ -#define XKB_KEY_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */ -#define XKB_KEY_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */ -#define XKB_KEY_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */ -#define XKB_KEY_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */ -#define XKB_KEY_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */ -#define XKB_KEY_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */ -#define XKB_KEY_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */ -#define XKB_KEY_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */ -#define XKB_KEY_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */ -#define XKB_KEY_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */ -#define XKB_KEY_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */ -#define XKB_KEY_kana_switch 0xff7e /* Alias for mode_switch */ - -/* - * Arabic - * Byte 3 = 5 - */ - -#define XKB_KEY_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */ -#define XKB_KEY_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */ -#define XKB_KEY_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */ -#define XKB_KEY_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */ -#define XKB_KEY_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */ -#define XKB_KEY_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */ -#define XKB_KEY_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */ -#define XKB_KEY_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */ -#define XKB_KEY_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */ -#define XKB_KEY_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */ -#define XKB_KEY_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */ -#define XKB_KEY_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */ -#define XKB_KEY_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */ -#define XKB_KEY_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */ -#define XKB_KEY_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */ -#define XKB_KEY_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */ -#define XKB_KEY_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */ -#define XKB_KEY_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */ -#define XKB_KEY_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */ -#define XKB_KEY_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */ -#define XKB_KEY_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */ -#define XKB_KEY_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */ -#define XKB_KEY_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */ -#define XKB_KEY_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */ -#define XKB_KEY_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */ -#define XKB_KEY_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */ -#define XKB_KEY_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */ -#define XKB_KEY_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */ -#define XKB_KEY_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */ -#define XKB_KEY_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */ -#define XKB_KEY_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */ -#define XKB_KEY_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */ -#define XKB_KEY_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */ -#define XKB_KEY_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */ -#define XKB_KEY_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */ -#define XKB_KEY_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */ -#define XKB_KEY_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */ -#define XKB_KEY_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */ -#define XKB_KEY_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */ -#define XKB_KEY_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */ -#define XKB_KEY_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */ -#define XKB_KEY_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */ -#define XKB_KEY_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */ -#define XKB_KEY_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */ -#define XKB_KEY_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */ -#define XKB_KEY_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */ -#define XKB_KEY_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */ -#define XKB_KEY_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */ -#define XKB_KEY_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */ -#define XKB_KEY_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */ -#define XKB_KEY_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */ -#define XKB_KEY_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */ -#define XKB_KEY_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */ -#define XKB_KEY_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */ -#define XKB_KEY_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */ -#define XKB_KEY_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */ -#define XKB_KEY_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */ -#define XKB_KEY_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */ -#define XKB_KEY_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */ -#define XKB_KEY_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */ -#define XKB_KEY_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */ -#define XKB_KEY_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */ -#define XKB_KEY_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */ -#define XKB_KEY_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */ -#define XKB_KEY_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */ -#define XKB_KEY_Arabic_heh 0x05e7 /* deprecated */ -#define XKB_KEY_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */ -#define XKB_KEY_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */ -#define XKB_KEY_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */ -#define XKB_KEY_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */ -#define XKB_KEY_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */ -#define XKB_KEY_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */ -#define XKB_KEY_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */ -#define XKB_KEY_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */ -#define XKB_KEY_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */ -#define XKB_KEY_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */ -#define XKB_KEY_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */ -#define XKB_KEY_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */ -#define XKB_KEY_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */ -#define XKB_KEY_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */ -#define XKB_KEY_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */ -#define XKB_KEY_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */ -#define XKB_KEY_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */ -#define XKB_KEY_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */ -#define XKB_KEY_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */ -#define XKB_KEY_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */ -#define XKB_KEY_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */ -#define XKB_KEY_Arabic_farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */ -#define XKB_KEY_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */ -#define XKB_KEY_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */ -#define XKB_KEY_Arabic_switch 0xff7e /* Alias for mode_switch */ - -/* - * Cyrillic - * Byte 3 = 6 - */ -#define XKB_KEY_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */ -#define XKB_KEY_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */ -#define XKB_KEY_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */ -#define XKB_KEY_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */ -#define XKB_KEY_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */ -#define XKB_KEY_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */ -#define XKB_KEY_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */ -#define XKB_KEY_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */ -#define XKB_KEY_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */ -#define XKB_KEY_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */ -#define XKB_KEY_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */ -#define XKB_KEY_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */ -#define XKB_KEY_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */ -#define XKB_KEY_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */ -#define XKB_KEY_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */ -#define XKB_KEY_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */ -#define XKB_KEY_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */ -#define XKB_KEY_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */ -#define XKB_KEY_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */ -#define XKB_KEY_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */ -#define XKB_KEY_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */ -#define XKB_KEY_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */ - -#define XKB_KEY_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */ -#define XKB_KEY_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */ -#define XKB_KEY_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */ -#define XKB_KEY_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */ -#define XKB_KEY_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */ -#define XKB_KEY_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */ -#define XKB_KEY_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */ -#define XKB_KEY_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */ - -#define XKB_KEY_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */ -#define XKB_KEY_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */ -#define XKB_KEY_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */ -#define XKB_KEY_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */ -#define XKB_KEY_Ukranian_je 0x06a4 /* deprecated */ -#define XKB_KEY_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */ -#define XKB_KEY_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ -#define XKB_KEY_Ukranian_i 0x06a6 /* deprecated */ -#define XKB_KEY_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */ -#define XKB_KEY_Ukranian_yi 0x06a7 /* deprecated */ -#define XKB_KEY_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */ -#define XKB_KEY_Serbian_je 0x06a8 /* deprecated */ -#define XKB_KEY_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */ -#define XKB_KEY_Serbian_lje 0x06a9 /* deprecated */ -#define XKB_KEY_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */ -#define XKB_KEY_Serbian_nje 0x06aa /* deprecated */ -#define XKB_KEY_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */ -#define XKB_KEY_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */ -#define XKB_KEY_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */ -#define XKB_KEY_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */ -#define XKB_KEY_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */ -#define XKB_KEY_Serbian_dze 0x06af /* deprecated */ -#define XKB_KEY_numerosign 0x06b0 /* U+2116 NUMERO SIGN */ -#define XKB_KEY_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */ -#define XKB_KEY_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */ -#define XKB_KEY_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */ -#define XKB_KEY_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */ -#define XKB_KEY_Ukranian_JE 0x06b4 /* deprecated */ -#define XKB_KEY_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */ -#define XKB_KEY_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ -#define XKB_KEY_Ukranian_I 0x06b6 /* deprecated */ -#define XKB_KEY_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */ -#define XKB_KEY_Ukranian_YI 0x06b7 /* deprecated */ -#define XKB_KEY_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */ -#define XKB_KEY_Serbian_JE 0x06b8 /* deprecated */ -#define XKB_KEY_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */ -#define XKB_KEY_Serbian_LJE 0x06b9 /* deprecated */ -#define XKB_KEY_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */ -#define XKB_KEY_Serbian_NJE 0x06ba /* deprecated */ -#define XKB_KEY_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */ -#define XKB_KEY_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */ -#define XKB_KEY_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ -#define XKB_KEY_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */ -#define XKB_KEY_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */ -#define XKB_KEY_Serbian_DZE 0x06bf /* deprecated */ -#define XKB_KEY_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */ -#define XKB_KEY_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */ -#define XKB_KEY_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */ -#define XKB_KEY_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */ -#define XKB_KEY_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */ -#define XKB_KEY_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */ -#define XKB_KEY_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */ -#define XKB_KEY_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */ -#define XKB_KEY_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */ -#define XKB_KEY_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */ -#define XKB_KEY_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */ -#define XKB_KEY_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */ -#define XKB_KEY_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */ -#define XKB_KEY_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */ -#define XKB_KEY_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */ -#define XKB_KEY_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */ -#define XKB_KEY_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */ -#define XKB_KEY_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */ -#define XKB_KEY_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */ -#define XKB_KEY_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */ -#define XKB_KEY_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */ -#define XKB_KEY_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */ -#define XKB_KEY_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */ -#define XKB_KEY_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */ -#define XKB_KEY_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */ -#define XKB_KEY_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */ -#define XKB_KEY_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */ -#define XKB_KEY_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */ -#define XKB_KEY_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */ -#define XKB_KEY_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */ -#define XKB_KEY_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */ -#define XKB_KEY_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */ -#define XKB_KEY_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */ -#define XKB_KEY_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */ -#define XKB_KEY_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */ -#define XKB_KEY_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */ -#define XKB_KEY_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */ -#define XKB_KEY_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */ -#define XKB_KEY_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */ -#define XKB_KEY_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */ -#define XKB_KEY_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */ -#define XKB_KEY_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */ -#define XKB_KEY_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */ -#define XKB_KEY_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */ -#define XKB_KEY_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */ -#define XKB_KEY_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */ -#define XKB_KEY_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */ -#define XKB_KEY_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */ -#define XKB_KEY_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */ -#define XKB_KEY_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */ -#define XKB_KEY_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */ -#define XKB_KEY_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */ -#define XKB_KEY_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */ -#define XKB_KEY_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */ -#define XKB_KEY_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */ -#define XKB_KEY_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */ -#define XKB_KEY_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */ -#define XKB_KEY_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */ -#define XKB_KEY_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */ -#define XKB_KEY_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */ -#define XKB_KEY_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */ -#define XKB_KEY_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */ -#define XKB_KEY_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */ -#define XKB_KEY_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */ - -/* - * Greek - * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7) - * Byte 3 = 7 - */ - -#define XKB_KEY_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */ -#define XKB_KEY_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */ -#define XKB_KEY_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */ -#define XKB_KEY_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */ -#define XKB_KEY_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ -#define XKB_KEY_Greek_IOTAdiaeresis 0x07a5 /* old typo */ -#define XKB_KEY_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */ -#define XKB_KEY_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */ -#define XKB_KEY_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ -#define XKB_KEY_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */ -#define XKB_KEY_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */ -#define XKB_KEY_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */ -#define XKB_KEY_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */ -#define XKB_KEY_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */ -#define XKB_KEY_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */ -#define XKB_KEY_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */ -#define XKB_KEY_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */ -#define XKB_KEY_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ -#define XKB_KEY_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */ -#define XKB_KEY_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */ -#define XKB_KEY_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */ -#define XKB_KEY_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ -#define XKB_KEY_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */ -#define XKB_KEY_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */ -#define XKB_KEY_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */ -#define XKB_KEY_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */ -#define XKB_KEY_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */ -#define XKB_KEY_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */ -#define XKB_KEY_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */ -#define XKB_KEY_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */ -#define XKB_KEY_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */ -#define XKB_KEY_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */ -#define XKB_KEY_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */ -#define XKB_KEY_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */ -#define XKB_KEY_Greek_LAMBDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */ -#define XKB_KEY_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */ -#define XKB_KEY_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */ -#define XKB_KEY_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */ -#define XKB_KEY_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */ -#define XKB_KEY_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */ -#define XKB_KEY_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */ -#define XKB_KEY_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */ -#define XKB_KEY_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */ -#define XKB_KEY_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */ -#define XKB_KEY_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */ -#define XKB_KEY_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */ -#define XKB_KEY_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */ -#define XKB_KEY_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */ -#define XKB_KEY_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */ -#define XKB_KEY_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */ -#define XKB_KEY_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */ -#define XKB_KEY_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */ -#define XKB_KEY_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */ -#define XKB_KEY_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */ -#define XKB_KEY_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */ -#define XKB_KEY_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */ -#define XKB_KEY_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */ -#define XKB_KEY_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */ -#define XKB_KEY_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */ -#define XKB_KEY_Greek_lambda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */ -#define XKB_KEY_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */ -#define XKB_KEY_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */ -#define XKB_KEY_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */ -#define XKB_KEY_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */ -#define XKB_KEY_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */ -#define XKB_KEY_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */ -#define XKB_KEY_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */ -#define XKB_KEY_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */ -#define XKB_KEY_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */ -#define XKB_KEY_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */ -#define XKB_KEY_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */ -#define XKB_KEY_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */ -#define XKB_KEY_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */ -#define XKB_KEY_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */ -#define XKB_KEY_Greek_switch 0xff7e /* Alias for mode_switch */ - -/* - * Technical - * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html) - * Byte 3 = 8 - */ - -#define XKB_KEY_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */ -#define XKB_KEY_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/ -#define XKB_KEY_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/ -#define XKB_KEY_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */ -#define XKB_KEY_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */ -#define XKB_KEY_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/ -#define XKB_KEY_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */ -#define XKB_KEY_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */ -#define XKB_KEY_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */ -#define XKB_KEY_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */ -#define XKB_KEY_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */ -#define XKB_KEY_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */ -#define XKB_KEY_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */ -#define XKB_KEY_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */ -#define XKB_KEY_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */ -#define XKB_KEY_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */ -#define XKB_KEY_topleftsummation 0x08b1 -#define XKB_KEY_botleftsummation 0x08b2 -#define XKB_KEY_topvertsummationconnector 0x08b3 -#define XKB_KEY_botvertsummationconnector 0x08b4 -#define XKB_KEY_toprightsummation 0x08b5 -#define XKB_KEY_botrightsummation 0x08b6 -#define XKB_KEY_rightmiddlesummation 0x08b7 -#define XKB_KEY_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */ -#define XKB_KEY_notequal 0x08bd /* U+2260 NOT EQUAL TO */ -#define XKB_KEY_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */ -#define XKB_KEY_integral 0x08bf /* U+222B INTEGRAL */ -#define XKB_KEY_therefore 0x08c0 /* U+2234 THEREFORE */ -#define XKB_KEY_variation 0x08c1 /* U+221D PROPORTIONAL TO */ -#define XKB_KEY_infinity 0x08c2 /* U+221E INFINITY */ -#define XKB_KEY_nabla 0x08c5 /* U+2207 NABLA */ -#define XKB_KEY_approximate 0x08c8 /* U+223C TILDE OPERATOR */ -#define XKB_KEY_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */ -#define XKB_KEY_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */ -#define XKB_KEY_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */ -#define XKB_KEY_identical 0x08cf /* U+2261 IDENTICAL TO */ -#define XKB_KEY_radical 0x08d6 /* U+221A SQUARE ROOT */ -#define XKB_KEY_includedin 0x08da /* U+2282 SUBSET OF */ -#define XKB_KEY_includes 0x08db /* U+2283 SUPERSET OF */ -#define XKB_KEY_intersection 0x08dc /* U+2229 INTERSECTION */ -#define XKB_KEY_union 0x08dd /* U+222A UNION */ -#define XKB_KEY_logicaland 0x08de /* U+2227 LOGICAL AND */ -#define XKB_KEY_logicalor 0x08df /* U+2228 LOGICAL OR */ -#define XKB_KEY_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */ -#define XKB_KEY_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */ -#define XKB_KEY_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */ -#define XKB_KEY_uparrow 0x08fc /* U+2191 UPWARDS ARROW */ -#define XKB_KEY_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */ -#define XKB_KEY_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */ - -/* - * Special - * (from the DEC VT100 Special Graphics Character Set) - * Byte 3 = 9 - */ - -#define XKB_KEY_blank 0x09df -#define XKB_KEY_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */ -#define XKB_KEY_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */ -#define XKB_KEY_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */ -#define XKB_KEY_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */ -#define XKB_KEY_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */ -#define XKB_KEY_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */ -#define XKB_KEY_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */ -#define XKB_KEY_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */ -#define XKB_KEY_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */ -#define XKB_KEY_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */ -#define XKB_KEY_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */ -#define XKB_KEY_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */ -#define XKB_KEY_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ -#define XKB_KEY_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */ -#define XKB_KEY_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */ -#define XKB_KEY_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */ -#define XKB_KEY_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */ -#define XKB_KEY_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */ -#define XKB_KEY_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ -#define XKB_KEY_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */ -#define XKB_KEY_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */ -#define XKB_KEY_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ -#define XKB_KEY_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */ - -/* - * Publishing - * (these are probably from a long forgotten DEC Publishing - * font that once shipped with DECwrite) - * Byte 3 = 0x0a - */ - -#define XKB_KEY_emspace 0x0aa1 /* U+2003 EM SPACE */ -#define XKB_KEY_enspace 0x0aa2 /* U+2002 EN SPACE */ -#define XKB_KEY_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */ -#define XKB_KEY_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */ -#define XKB_KEY_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */ -#define XKB_KEY_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */ -#define XKB_KEY_thinspace 0x0aa7 /* U+2009 THIN SPACE */ -#define XKB_KEY_hairspace 0x0aa8 /* U+200A HAIR SPACE */ -#define XKB_KEY_emdash 0x0aa9 /* U+2014 EM DASH */ -#define XKB_KEY_endash 0x0aaa /* U+2013 EN DASH */ -#define XKB_KEY_signifblank 0x0aac /*(U+2423 OPEN BOX)*/ -#define XKB_KEY_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */ -#define XKB_KEY_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */ -#define XKB_KEY_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */ -#define XKB_KEY_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */ -#define XKB_KEY_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */ -#define XKB_KEY_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */ -#define XKB_KEY_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */ -#define XKB_KEY_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */ -#define XKB_KEY_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */ -#define XKB_KEY_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */ -#define XKB_KEY_careof 0x0ab8 /* U+2105 CARE OF */ -#define XKB_KEY_figdash 0x0abb /* U+2012 FIGURE DASH */ -#define XKB_KEY_leftanglebracket 0x0abc /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/ -#define XKB_KEY_decimalpoint 0x0abd /*(U+002E FULL STOP)*/ -#define XKB_KEY_rightanglebracket 0x0abe /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/ -#define XKB_KEY_marker 0x0abf -#define XKB_KEY_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */ -#define XKB_KEY_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */ -#define XKB_KEY_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */ -#define XKB_KEY_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */ -#define XKB_KEY_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */ -#define XKB_KEY_signaturemark 0x0aca /*(U+2613 SALTIRE)*/ -#define XKB_KEY_trademarkincircle 0x0acb -#define XKB_KEY_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/ -#define XKB_KEY_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/ -#define XKB_KEY_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/ -#define XKB_KEY_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/ -#define XKB_KEY_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */ -#define XKB_KEY_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */ -#define XKB_KEY_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */ -#define XKB_KEY_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */ -#define XKB_KEY_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */ -#define XKB_KEY_permille 0x0ad5 /* U+2030 PER MILLE SIGN */ -#define XKB_KEY_minutes 0x0ad6 /* U+2032 PRIME */ -#define XKB_KEY_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */ -#define XKB_KEY_latincross 0x0ad9 /* U+271D LATIN CROSS */ -#define XKB_KEY_hexagram 0x0ada -#define XKB_KEY_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/ -#define XKB_KEY_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/ -#define XKB_KEY_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/ -#define XKB_KEY_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/ -#define XKB_KEY_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/ -#define XKB_KEY_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/ -#define XKB_KEY_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/ -#define XKB_KEY_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/ -#define XKB_KEY_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/ -#define XKB_KEY_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/ -#define XKB_KEY_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/ -#define XKB_KEY_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/ -#define XKB_KEY_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/ -#define XKB_KEY_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/ -#define XKB_KEY_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/ -#define XKB_KEY_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/ -#define XKB_KEY_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/ -#define XKB_KEY_club 0x0aec /* U+2663 BLACK CLUB SUIT */ -#define XKB_KEY_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */ -#define XKB_KEY_heart 0x0aee /* U+2665 BLACK HEART SUIT */ -#define XKB_KEY_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */ -#define XKB_KEY_dagger 0x0af1 /* U+2020 DAGGER */ -#define XKB_KEY_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */ -#define XKB_KEY_checkmark 0x0af3 /* U+2713 CHECK MARK */ -#define XKB_KEY_ballotcross 0x0af4 /* U+2717 BALLOT X */ -#define XKB_KEY_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */ -#define XKB_KEY_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */ -#define XKB_KEY_malesymbol 0x0af7 /* U+2642 MALE SIGN */ -#define XKB_KEY_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */ -#define XKB_KEY_telephone 0x0af9 /* U+260E BLACK TELEPHONE */ -#define XKB_KEY_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */ -#define XKB_KEY_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */ -#define XKB_KEY_caret 0x0afc /* U+2038 CARET */ -#define XKB_KEY_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */ -#define XKB_KEY_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */ -#define XKB_KEY_cursor 0x0aff - -/* - * APL - * Byte 3 = 0x0b - */ - -#define XKB_KEY_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/ -#define XKB_KEY_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/ -#define XKB_KEY_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/ -#define XKB_KEY_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/ -#define XKB_KEY_overbar 0x0bc0 /*(U+00AF MACRON)*/ -#define XKB_KEY_downtack 0x0bc2 /* U+22A4 DOWN TACK */ -#define XKB_KEY_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/ -#define XKB_KEY_downstile 0x0bc4 /* U+230A LEFT FLOOR */ -#define XKB_KEY_underbar 0x0bc6 /*(U+005F LOW LINE)*/ -#define XKB_KEY_jot 0x0bca /* U+2218 RING OPERATOR */ -#define XKB_KEY_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */ -#define XKB_KEY_uptack 0x0bce /* U+22A5 UP TACK */ -#define XKB_KEY_circle 0x0bcf /* U+25CB WHITE CIRCLE */ -#define XKB_KEY_upstile 0x0bd3 /* U+2308 LEFT CEILING */ -#define XKB_KEY_downshoe 0x0bd6 /*(U+222A UNION)*/ -#define XKB_KEY_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/ -#define XKB_KEY_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/ -#define XKB_KEY_lefttack 0x0bdc /* U+22A3 LEFT TACK */ -#define XKB_KEY_righttack 0x0bfc /* U+22A2 RIGHT TACK */ - -/* - * Hebrew - * Byte 3 = 0x0c - */ - -#define XKB_KEY_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */ -#define XKB_KEY_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */ -#define XKB_KEY_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */ -#define XKB_KEY_hebrew_beth 0x0ce1 /* deprecated */ -#define XKB_KEY_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */ -#define XKB_KEY_hebrew_gimmel 0x0ce2 /* deprecated */ -#define XKB_KEY_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */ -#define XKB_KEY_hebrew_daleth 0x0ce3 /* deprecated */ -#define XKB_KEY_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */ -#define XKB_KEY_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */ -#define XKB_KEY_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */ -#define XKB_KEY_hebrew_zayin 0x0ce6 /* deprecated */ -#define XKB_KEY_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */ -#define XKB_KEY_hebrew_het 0x0ce7 /* deprecated */ -#define XKB_KEY_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */ -#define XKB_KEY_hebrew_teth 0x0ce8 /* deprecated */ -#define XKB_KEY_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */ -#define XKB_KEY_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */ -#define XKB_KEY_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */ -#define XKB_KEY_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */ -#define XKB_KEY_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */ -#define XKB_KEY_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */ -#define XKB_KEY_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */ -#define XKB_KEY_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */ -#define XKB_KEY_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */ -#define XKB_KEY_hebrew_samekh 0x0cf1 /* deprecated */ -#define XKB_KEY_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */ -#define XKB_KEY_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */ -#define XKB_KEY_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */ -#define XKB_KEY_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */ -#define XKB_KEY_hebrew_finalzadi 0x0cf5 /* deprecated */ -#define XKB_KEY_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */ -#define XKB_KEY_hebrew_zadi 0x0cf6 /* deprecated */ -#define XKB_KEY_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */ -#define XKB_KEY_hebrew_kuf 0x0cf7 /* deprecated */ -#define XKB_KEY_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */ -#define XKB_KEY_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */ -#define XKB_KEY_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */ -#define XKB_KEY_hebrew_taf 0x0cfa /* deprecated */ -#define XKB_KEY_Hebrew_switch 0xff7e /* Alias for mode_switch */ - -/* - * Thai - * Byte 3 = 0x0d - */ - -#define XKB_KEY_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */ -#define XKB_KEY_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */ -#define XKB_KEY_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */ -#define XKB_KEY_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */ -#define XKB_KEY_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */ -#define XKB_KEY_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */ -#define XKB_KEY_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */ -#define XKB_KEY_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */ -#define XKB_KEY_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */ -#define XKB_KEY_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */ -#define XKB_KEY_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */ -#define XKB_KEY_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */ -#define XKB_KEY_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */ -#define XKB_KEY_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */ -#define XKB_KEY_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */ -#define XKB_KEY_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */ -#define XKB_KEY_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */ -#define XKB_KEY_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */ -#define XKB_KEY_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */ -#define XKB_KEY_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */ -#define XKB_KEY_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */ -#define XKB_KEY_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */ -#define XKB_KEY_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */ -#define XKB_KEY_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */ -#define XKB_KEY_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */ -#define XKB_KEY_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */ -#define XKB_KEY_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */ -#define XKB_KEY_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */ -#define XKB_KEY_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */ -#define XKB_KEY_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */ -#define XKB_KEY_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */ -#define XKB_KEY_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */ -#define XKB_KEY_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */ -#define XKB_KEY_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */ -#define XKB_KEY_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */ -#define XKB_KEY_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */ -#define XKB_KEY_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */ -#define XKB_KEY_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */ -#define XKB_KEY_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */ -#define XKB_KEY_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */ -#define XKB_KEY_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */ -#define XKB_KEY_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */ -#define XKB_KEY_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */ -#define XKB_KEY_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */ -#define XKB_KEY_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */ -#define XKB_KEY_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */ -#define XKB_KEY_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */ -#define XKB_KEY_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */ -#define XKB_KEY_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */ -#define XKB_KEY_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */ -#define XKB_KEY_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */ -#define XKB_KEY_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */ -#define XKB_KEY_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */ -#define XKB_KEY_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */ -#define XKB_KEY_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */ -#define XKB_KEY_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */ -#define XKB_KEY_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */ -#define XKB_KEY_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */ -#define XKB_KEY_Thai_maihanakat_maitho 0x0dde -#define XKB_KEY_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */ -#define XKB_KEY_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */ -#define XKB_KEY_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */ -#define XKB_KEY_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */ -#define XKB_KEY_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */ -#define XKB_KEY_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */ -#define XKB_KEY_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */ -#define XKB_KEY_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */ -#define XKB_KEY_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */ -#define XKB_KEY_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */ -#define XKB_KEY_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */ -#define XKB_KEY_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */ -#define XKB_KEY_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */ -#define XKB_KEY_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */ -#define XKB_KEY_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */ -#define XKB_KEY_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */ -#define XKB_KEY_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */ -#define XKB_KEY_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */ -#define XKB_KEY_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */ -#define XKB_KEY_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */ -#define XKB_KEY_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */ -#define XKB_KEY_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */ -#define XKB_KEY_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */ -#define XKB_KEY_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */ -#define XKB_KEY_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */ - -/* - * Korean - * Byte 3 = 0x0e - */ - - -#define XKB_KEY_Hangul 0xff31 /* Hangul start/stop(toggle) */ -#define XKB_KEY_Hangul_Start 0xff32 /* Hangul start */ -#define XKB_KEY_Hangul_End 0xff33 /* Hangul end, English start */ -#define XKB_KEY_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */ -#define XKB_KEY_Hangul_Jamo 0xff35 /* Hangul Jamo mode */ -#define XKB_KEY_Hangul_Romaja 0xff36 /* Hangul Romaja mode */ -#define XKB_KEY_Hangul_Codeinput 0xff37 /* Hangul code input mode */ -#define XKB_KEY_Hangul_Jeonja 0xff38 /* Jeonja mode */ -#define XKB_KEY_Hangul_Banja 0xff39 /* Banja mode */ -#define XKB_KEY_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */ -#define XKB_KEY_Hangul_PostHanja 0xff3b /* Post Hanja conversion */ -#define XKB_KEY_Hangul_SingleCandidate 0xff3c /* Single candidate */ -#define XKB_KEY_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */ -#define XKB_KEY_Hangul_PreviousCandidate 0xff3e /* Previous candidate */ -#define XKB_KEY_Hangul_Special 0xff3f /* Special symbols */ -#define XKB_KEY_Hangul_switch 0xff7e /* Alias for mode_switch */ - -/* Hangul Consonant Characters */ -#define XKB_KEY_Hangul_Kiyeog 0x0ea1 -#define XKB_KEY_Hangul_SsangKiyeog 0x0ea2 -#define XKB_KEY_Hangul_KiyeogSios 0x0ea3 -#define XKB_KEY_Hangul_Nieun 0x0ea4 -#define XKB_KEY_Hangul_NieunJieuj 0x0ea5 -#define XKB_KEY_Hangul_NieunHieuh 0x0ea6 -#define XKB_KEY_Hangul_Dikeud 0x0ea7 -#define XKB_KEY_Hangul_SsangDikeud 0x0ea8 -#define XKB_KEY_Hangul_Rieul 0x0ea9 -#define XKB_KEY_Hangul_RieulKiyeog 0x0eaa -#define XKB_KEY_Hangul_RieulMieum 0x0eab -#define XKB_KEY_Hangul_RieulPieub 0x0eac -#define XKB_KEY_Hangul_RieulSios 0x0ead -#define XKB_KEY_Hangul_RieulTieut 0x0eae -#define XKB_KEY_Hangul_RieulPhieuf 0x0eaf -#define XKB_KEY_Hangul_RieulHieuh 0x0eb0 -#define XKB_KEY_Hangul_Mieum 0x0eb1 -#define XKB_KEY_Hangul_Pieub 0x0eb2 -#define XKB_KEY_Hangul_SsangPieub 0x0eb3 -#define XKB_KEY_Hangul_PieubSios 0x0eb4 -#define XKB_KEY_Hangul_Sios 0x0eb5 -#define XKB_KEY_Hangul_SsangSios 0x0eb6 -#define XKB_KEY_Hangul_Ieung 0x0eb7 -#define XKB_KEY_Hangul_Jieuj 0x0eb8 -#define XKB_KEY_Hangul_SsangJieuj 0x0eb9 -#define XKB_KEY_Hangul_Cieuc 0x0eba -#define XKB_KEY_Hangul_Khieuq 0x0ebb -#define XKB_KEY_Hangul_Tieut 0x0ebc -#define XKB_KEY_Hangul_Phieuf 0x0ebd -#define XKB_KEY_Hangul_Hieuh 0x0ebe - -/* Hangul Vowel Characters */ -#define XKB_KEY_Hangul_A 0x0ebf -#define XKB_KEY_Hangul_AE 0x0ec0 -#define XKB_KEY_Hangul_YA 0x0ec1 -#define XKB_KEY_Hangul_YAE 0x0ec2 -#define XKB_KEY_Hangul_EO 0x0ec3 -#define XKB_KEY_Hangul_E 0x0ec4 -#define XKB_KEY_Hangul_YEO 0x0ec5 -#define XKB_KEY_Hangul_YE 0x0ec6 -#define XKB_KEY_Hangul_O 0x0ec7 -#define XKB_KEY_Hangul_WA 0x0ec8 -#define XKB_KEY_Hangul_WAE 0x0ec9 -#define XKB_KEY_Hangul_OE 0x0eca -#define XKB_KEY_Hangul_YO 0x0ecb -#define XKB_KEY_Hangul_U 0x0ecc -#define XKB_KEY_Hangul_WEO 0x0ecd -#define XKB_KEY_Hangul_WE 0x0ece -#define XKB_KEY_Hangul_WI 0x0ecf -#define XKB_KEY_Hangul_YU 0x0ed0 -#define XKB_KEY_Hangul_EU 0x0ed1 -#define XKB_KEY_Hangul_YI 0x0ed2 -#define XKB_KEY_Hangul_I 0x0ed3 - -/* Hangul syllable-final (JongSeong) Characters */ -#define XKB_KEY_Hangul_J_Kiyeog 0x0ed4 -#define XKB_KEY_Hangul_J_SsangKiyeog 0x0ed5 -#define XKB_KEY_Hangul_J_KiyeogSios 0x0ed6 -#define XKB_KEY_Hangul_J_Nieun 0x0ed7 -#define XKB_KEY_Hangul_J_NieunJieuj 0x0ed8 -#define XKB_KEY_Hangul_J_NieunHieuh 0x0ed9 -#define XKB_KEY_Hangul_J_Dikeud 0x0eda -#define XKB_KEY_Hangul_J_Rieul 0x0edb -#define XKB_KEY_Hangul_J_RieulKiyeog 0x0edc -#define XKB_KEY_Hangul_J_RieulMieum 0x0edd -#define XKB_KEY_Hangul_J_RieulPieub 0x0ede -#define XKB_KEY_Hangul_J_RieulSios 0x0edf -#define XKB_KEY_Hangul_J_RieulTieut 0x0ee0 -#define XKB_KEY_Hangul_J_RieulPhieuf 0x0ee1 -#define XKB_KEY_Hangul_J_RieulHieuh 0x0ee2 -#define XKB_KEY_Hangul_J_Mieum 0x0ee3 -#define XKB_KEY_Hangul_J_Pieub 0x0ee4 -#define XKB_KEY_Hangul_J_PieubSios 0x0ee5 -#define XKB_KEY_Hangul_J_Sios 0x0ee6 -#define XKB_KEY_Hangul_J_SsangSios 0x0ee7 -#define XKB_KEY_Hangul_J_Ieung 0x0ee8 -#define XKB_KEY_Hangul_J_Jieuj 0x0ee9 -#define XKB_KEY_Hangul_J_Cieuc 0x0eea -#define XKB_KEY_Hangul_J_Khieuq 0x0eeb -#define XKB_KEY_Hangul_J_Tieut 0x0eec -#define XKB_KEY_Hangul_J_Phieuf 0x0eed -#define XKB_KEY_Hangul_J_Hieuh 0x0eee - -/* Ancient Hangul Consonant Characters */ -#define XKB_KEY_Hangul_RieulYeorinHieuh 0x0eef -#define XKB_KEY_Hangul_SunkyeongeumMieum 0x0ef0 -#define XKB_KEY_Hangul_SunkyeongeumPieub 0x0ef1 -#define XKB_KEY_Hangul_PanSios 0x0ef2 -#define XKB_KEY_Hangul_KkogjiDalrinIeung 0x0ef3 -#define XKB_KEY_Hangul_SunkyeongeumPhieuf 0x0ef4 -#define XKB_KEY_Hangul_YeorinHieuh 0x0ef5 - -/* Ancient Hangul Vowel Characters */ -#define XKB_KEY_Hangul_AraeA 0x0ef6 -#define XKB_KEY_Hangul_AraeAE 0x0ef7 - -/* Ancient Hangul syllable-final (JongSeong) Characters */ -#define XKB_KEY_Hangul_J_PanSios 0x0ef8 -#define XKB_KEY_Hangul_J_KkogjiDalrinIeung 0x0ef9 -#define XKB_KEY_Hangul_J_YeorinHieuh 0x0efa - -/* Korean currency symbol */ -#define XKB_KEY_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/ - - -/* - * Armenian - */ - -#define XKB_KEY_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */ -#define XKB_KEY_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */ -#define XKB_KEY_Armenian_verjaket 0x1000589 /* U+0589 ARMENIAN FULL STOP */ -#define XKB_KEY_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */ -#define XKB_KEY_Armenian_but 0x100055d /* U+055D ARMENIAN COMMA */ -#define XKB_KEY_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */ -#define XKB_KEY_Armenian_yentamna 0x100058a /* U+058A ARMENIAN HYPHEN */ -#define XKB_KEY_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */ -#define XKB_KEY_Armenian_amanak 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */ -#define XKB_KEY_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */ -#define XKB_KEY_Armenian_shesht 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */ -#define XKB_KEY_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */ -#define XKB_KEY_Armenian_paruyk 0x100055e /* U+055E ARMENIAN QUESTION MARK */ -#define XKB_KEY_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */ -#define XKB_KEY_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */ -#define XKB_KEY_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */ -#define XKB_KEY_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */ -#define XKB_KEY_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */ -#define XKB_KEY_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */ -#define XKB_KEY_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */ -#define XKB_KEY_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */ -#define XKB_KEY_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */ -#define XKB_KEY_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */ -#define XKB_KEY_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */ -#define XKB_KEY_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */ -#define XKB_KEY_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */ -#define XKB_KEY_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */ -#define XKB_KEY_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */ -#define XKB_KEY_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */ -#define XKB_KEY_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */ -#define XKB_KEY_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */ -#define XKB_KEY_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */ -#define XKB_KEY_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */ -#define XKB_KEY_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */ -#define XKB_KEY_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */ -#define XKB_KEY_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */ -#define XKB_KEY_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */ -#define XKB_KEY_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */ -#define XKB_KEY_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */ -#define XKB_KEY_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */ -#define XKB_KEY_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */ -#define XKB_KEY_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */ -#define XKB_KEY_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */ -#define XKB_KEY_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */ -#define XKB_KEY_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */ -#define XKB_KEY_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */ -#define XKB_KEY_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */ -#define XKB_KEY_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */ -#define XKB_KEY_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */ -#define XKB_KEY_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */ -#define XKB_KEY_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */ -#define XKB_KEY_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */ -#define XKB_KEY_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */ -#define XKB_KEY_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */ -#define XKB_KEY_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */ -#define XKB_KEY_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */ -#define XKB_KEY_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */ -#define XKB_KEY_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */ -#define XKB_KEY_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */ -#define XKB_KEY_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */ -#define XKB_KEY_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */ -#define XKB_KEY_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */ -#define XKB_KEY_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */ -#define XKB_KEY_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */ -#define XKB_KEY_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */ -#define XKB_KEY_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */ -#define XKB_KEY_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */ -#define XKB_KEY_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */ -#define XKB_KEY_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */ -#define XKB_KEY_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */ -#define XKB_KEY_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */ -#define XKB_KEY_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */ -#define XKB_KEY_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */ -#define XKB_KEY_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */ -#define XKB_KEY_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */ -#define XKB_KEY_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */ -#define XKB_KEY_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */ -#define XKB_KEY_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */ -#define XKB_KEY_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */ -#define XKB_KEY_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */ -#define XKB_KEY_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */ -#define XKB_KEY_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */ -#define XKB_KEY_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */ -#define XKB_KEY_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */ -#define XKB_KEY_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */ -#define XKB_KEY_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */ -#define XKB_KEY_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */ -#define XKB_KEY_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */ -#define XKB_KEY_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */ -#define XKB_KEY_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */ - -/* - * Georgian - */ - -#define XKB_KEY_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */ -#define XKB_KEY_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */ -#define XKB_KEY_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */ -#define XKB_KEY_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */ -#define XKB_KEY_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */ -#define XKB_KEY_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */ -#define XKB_KEY_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */ -#define XKB_KEY_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */ -#define XKB_KEY_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */ -#define XKB_KEY_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */ -#define XKB_KEY_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */ -#define XKB_KEY_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */ -#define XKB_KEY_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */ -#define XKB_KEY_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */ -#define XKB_KEY_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */ -#define XKB_KEY_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */ -#define XKB_KEY_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */ -#define XKB_KEY_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */ -#define XKB_KEY_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */ -#define XKB_KEY_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */ -#define XKB_KEY_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */ -#define XKB_KEY_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */ -#define XKB_KEY_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */ -#define XKB_KEY_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */ -#define XKB_KEY_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */ -#define XKB_KEY_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */ -#define XKB_KEY_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */ -#define XKB_KEY_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */ -#define XKB_KEY_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */ -#define XKB_KEY_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */ -#define XKB_KEY_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */ -#define XKB_KEY_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */ -#define XKB_KEY_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */ -#define XKB_KEY_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */ -#define XKB_KEY_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */ -#define XKB_KEY_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */ -#define XKB_KEY_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */ -#define XKB_KEY_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */ -#define XKB_KEY_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */ - -/* - * Azeri (and other Turkic or Caucasian languages) - */ - -/* latin */ -#define XKB_KEY_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */ -#define XKB_KEY_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */ -#define XKB_KEY_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */ -#define XKB_KEY_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */ -#define XKB_KEY_Ocaron 0x10001d1 /* U+01D2 LATIN CAPITAL LETTER O WITH CARON */ -#define XKB_KEY_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */ -#define XKB_KEY_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */ -#define XKB_KEY_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */ -#define XKB_KEY_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */ -#define XKB_KEY_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */ -#define XKB_KEY_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */ -#define XKB_KEY_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */ -#define XKB_KEY_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */ -#define XKB_KEY_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */ -#define XKB_KEY_EZH 0x10001b7 /* U+01B7 LATIN CAPITAL LETTER EZH */ -#define XKB_KEY_ezh 0x1000292 /* U+0292 LATIN SMALL LETTER EZH */ -/* those are not really Caucasus */ -/* For Inupiak */ -#define XKB_KEY_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */ -#define XKB_KEY_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */ - -/* - * Vietnamese - */ - -#define XKB_KEY_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */ -#define XKB_KEY_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */ -#define XKB_KEY_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */ -#define XKB_KEY_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */ -#define XKB_KEY_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */ -#define XKB_KEY_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */ -#define XKB_KEY_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */ -#define XKB_KEY_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */ -#define XKB_KEY_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */ -#define XKB_KEY_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */ -#define XKB_KEY_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */ -#define XKB_KEY_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */ -#define XKB_KEY_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */ -#define XKB_KEY_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */ -#define XKB_KEY_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */ -#define XKB_KEY_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */ -#define XKB_KEY_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */ -#define XKB_KEY_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */ -#define XKB_KEY_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */ -#define XKB_KEY_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */ -#define XKB_KEY_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */ -#define XKB_KEY_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */ -#define XKB_KEY_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */ -#define XKB_KEY_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */ -#define XKB_KEY_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */ -#define XKB_KEY_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */ -#define XKB_KEY_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */ -#define XKB_KEY_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */ -#define XKB_KEY_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */ -#define XKB_KEY_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */ -#define XKB_KEY_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */ -#define XKB_KEY_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */ -#define XKB_KEY_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */ -#define XKB_KEY_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */ -#define XKB_KEY_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */ -#define XKB_KEY_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */ -#define XKB_KEY_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */ -#define XKB_KEY_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */ -#define XKB_KEY_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */ -#define XKB_KEY_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */ -#define XKB_KEY_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */ -#define XKB_KEY_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */ -#define XKB_KEY_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */ -#define XKB_KEY_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */ -#define XKB_KEY_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */ -#define XKB_KEY_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */ -#define XKB_KEY_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */ -#define XKB_KEY_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */ -#define XKB_KEY_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */ -#define XKB_KEY_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */ -#define XKB_KEY_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */ -#define XKB_KEY_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */ -#define XKB_KEY_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */ -#define XKB_KEY_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */ -#define XKB_KEY_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */ -#define XKB_KEY_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */ -#define XKB_KEY_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */ -#define XKB_KEY_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */ -#define XKB_KEY_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */ -#define XKB_KEY_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */ -#define XKB_KEY_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */ -#define XKB_KEY_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */ -#define XKB_KEY_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */ -#define XKB_KEY_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */ -#define XKB_KEY_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */ -#define XKB_KEY_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */ -#define XKB_KEY_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */ -#define XKB_KEY_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */ -#define XKB_KEY_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */ -#define XKB_KEY_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */ -#define XKB_KEY_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */ -#define XKB_KEY_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */ -#define XKB_KEY_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */ -#define XKB_KEY_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */ -#define XKB_KEY_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */ -#define XKB_KEY_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */ -#define XKB_KEY_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */ -#define XKB_KEY_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */ -#define XKB_KEY_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */ -#define XKB_KEY_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */ -#define XKB_KEY_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */ -#define XKB_KEY_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */ -#define XKB_KEY_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */ -#define XKB_KEY_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */ -#define XKB_KEY_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */ -#define XKB_KEY_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */ -#define XKB_KEY_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */ -#define XKB_KEY_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */ -#define XKB_KEY_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */ -#define XKB_KEY_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */ -#define XKB_KEY_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */ -#define XKB_KEY_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */ - - -#define XKB_KEY_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */ -#define XKB_KEY_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */ -#define XKB_KEY_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */ -#define XKB_KEY_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */ -#define XKB_KEY_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */ -#define XKB_KEY_MillSign 0x10020a5 /* U+20A5 MILL SIGN */ -#define XKB_KEY_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */ -#define XKB_KEY_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */ -#define XKB_KEY_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */ -#define XKB_KEY_WonSign 0x10020a9 /* U+20A9 WON SIGN */ -#define XKB_KEY_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */ -#define XKB_KEY_DongSign 0x10020ab /* U+20AB DONG SIGN */ -#define XKB_KEY_EuroSign 0x20ac /* U+20AC EURO SIGN */ - -/* one, two and three are defined above. */ -#define XKB_KEY_zerosuperior 0x1002070 /* U+2070 SUPERSCRIPT ZERO */ -#define XKB_KEY_foursuperior 0x1002074 /* U+2074 SUPERSCRIPT FOUR */ -#define XKB_KEY_fivesuperior 0x1002075 /* U+2075 SUPERSCRIPT FIVE */ -#define XKB_KEY_sixsuperior 0x1002076 /* U+2076 SUPERSCRIPT SIX */ -#define XKB_KEY_sevensuperior 0x1002077 /* U+2077 SUPERSCRIPT SEVEN */ -#define XKB_KEY_eightsuperior 0x1002078 /* U+2078 SUPERSCRIPT EIGHT */ -#define XKB_KEY_ninesuperior 0x1002079 /* U+2079 SUPERSCRIPT NINE */ -#define XKB_KEY_zerosubscript 0x1002080 /* U+2080 SUBSCRIPT ZERO */ -#define XKB_KEY_onesubscript 0x1002081 /* U+2081 SUBSCRIPT ONE */ -#define XKB_KEY_twosubscript 0x1002082 /* U+2082 SUBSCRIPT TWO */ -#define XKB_KEY_threesubscript 0x1002083 /* U+2083 SUBSCRIPT THREE */ -#define XKB_KEY_foursubscript 0x1002084 /* U+2084 SUBSCRIPT FOUR */ -#define XKB_KEY_fivesubscript 0x1002085 /* U+2085 SUBSCRIPT FIVE */ -#define XKB_KEY_sixsubscript 0x1002086 /* U+2086 SUBSCRIPT SIX */ -#define XKB_KEY_sevensubscript 0x1002087 /* U+2087 SUBSCRIPT SEVEN */ -#define XKB_KEY_eightsubscript 0x1002088 /* U+2088 SUBSCRIPT EIGHT */ -#define XKB_KEY_ninesubscript 0x1002089 /* U+2089 SUBSCRIPT NINE */ -#define XKB_KEY_partdifferential 0x1002202 /* U+2202 PARTIAL DIFFERENTIAL */ -#define XKB_KEY_emptyset 0x1002205 /* U+2205 NULL SET */ -#define XKB_KEY_elementof 0x1002208 /* U+2208 ELEMENT OF */ -#define XKB_KEY_notelementof 0x1002209 /* U+2209 NOT AN ELEMENT OF */ -#define XKB_KEY_containsas 0x100220B /* U+220B CONTAINS AS MEMBER */ -#define XKB_KEY_squareroot 0x100221A /* U+221A SQUARE ROOT */ -#define XKB_KEY_cuberoot 0x100221B /* U+221B CUBE ROOT */ -#define XKB_KEY_fourthroot 0x100221C /* U+221C FOURTH ROOT */ -#define XKB_KEY_dintegral 0x100222C /* U+222C DOUBLE INTEGRAL */ -#define XKB_KEY_tintegral 0x100222D /* U+222D TRIPLE INTEGRAL */ -#define XKB_KEY_because 0x1002235 /* U+2235 BECAUSE */ -#define XKB_KEY_approxeq 0x1002248 /* U+2245 ALMOST EQUAL TO */ -#define XKB_KEY_notapproxeq 0x1002247 /* U+2247 NOT ALMOST EQUAL TO */ -#define XKB_KEY_notidentical 0x1002262 /* U+2262 NOT IDENTICAL TO */ -#define XKB_KEY_stricteq 0x1002263 /* U+2263 STRICTLY EQUIVALENT TO */ - -#define XKB_KEY_braille_dot_1 0xfff1 -#define XKB_KEY_braille_dot_2 0xfff2 -#define XKB_KEY_braille_dot_3 0xfff3 -#define XKB_KEY_braille_dot_4 0xfff4 -#define XKB_KEY_braille_dot_5 0xfff5 -#define XKB_KEY_braille_dot_6 0xfff6 -#define XKB_KEY_braille_dot_7 0xfff7 -#define XKB_KEY_braille_dot_8 0xfff8 -#define XKB_KEY_braille_dot_9 0xfff9 -#define XKB_KEY_braille_dot_10 0xfffa -#define XKB_KEY_braille_blank 0x1002800 /* U+2800 BRAILLE PATTERN BLANK */ -#define XKB_KEY_braille_dots_1 0x1002801 /* U+2801 BRAILLE PATTERN DOTS-1 */ -#define XKB_KEY_braille_dots_2 0x1002802 /* U+2802 BRAILLE PATTERN DOTS-2 */ -#define XKB_KEY_braille_dots_12 0x1002803 /* U+2803 BRAILLE PATTERN DOTS-12 */ -#define XKB_KEY_braille_dots_3 0x1002804 /* U+2804 BRAILLE PATTERN DOTS-3 */ -#define XKB_KEY_braille_dots_13 0x1002805 /* U+2805 BRAILLE PATTERN DOTS-13 */ -#define XKB_KEY_braille_dots_23 0x1002806 /* U+2806 BRAILLE PATTERN DOTS-23 */ -#define XKB_KEY_braille_dots_123 0x1002807 /* U+2807 BRAILLE PATTERN DOTS-123 */ -#define XKB_KEY_braille_dots_4 0x1002808 /* U+2808 BRAILLE PATTERN DOTS-4 */ -#define XKB_KEY_braille_dots_14 0x1002809 /* U+2809 BRAILLE PATTERN DOTS-14 */ -#define XKB_KEY_braille_dots_24 0x100280a /* U+280a BRAILLE PATTERN DOTS-24 */ -#define XKB_KEY_braille_dots_124 0x100280b /* U+280b BRAILLE PATTERN DOTS-124 */ -#define XKB_KEY_braille_dots_34 0x100280c /* U+280c BRAILLE PATTERN DOTS-34 */ -#define XKB_KEY_braille_dots_134 0x100280d /* U+280d BRAILLE PATTERN DOTS-134 */ -#define XKB_KEY_braille_dots_234 0x100280e /* U+280e BRAILLE PATTERN DOTS-234 */ -#define XKB_KEY_braille_dots_1234 0x100280f /* U+280f BRAILLE PATTERN DOTS-1234 */ -#define XKB_KEY_braille_dots_5 0x1002810 /* U+2810 BRAILLE PATTERN DOTS-5 */ -#define XKB_KEY_braille_dots_15 0x1002811 /* U+2811 BRAILLE PATTERN DOTS-15 */ -#define XKB_KEY_braille_dots_25 0x1002812 /* U+2812 BRAILLE PATTERN DOTS-25 */ -#define XKB_KEY_braille_dots_125 0x1002813 /* U+2813 BRAILLE PATTERN DOTS-125 */ -#define XKB_KEY_braille_dots_35 0x1002814 /* U+2814 BRAILLE PATTERN DOTS-35 */ -#define XKB_KEY_braille_dots_135 0x1002815 /* U+2815 BRAILLE PATTERN DOTS-135 */ -#define XKB_KEY_braille_dots_235 0x1002816 /* U+2816 BRAILLE PATTERN DOTS-235 */ -#define XKB_KEY_braille_dots_1235 0x1002817 /* U+2817 BRAILLE PATTERN DOTS-1235 */ -#define XKB_KEY_braille_dots_45 0x1002818 /* U+2818 BRAILLE PATTERN DOTS-45 */ -#define XKB_KEY_braille_dots_145 0x1002819 /* U+2819 BRAILLE PATTERN DOTS-145 */ -#define XKB_KEY_braille_dots_245 0x100281a /* U+281a BRAILLE PATTERN DOTS-245 */ -#define XKB_KEY_braille_dots_1245 0x100281b /* U+281b BRAILLE PATTERN DOTS-1245 */ -#define XKB_KEY_braille_dots_345 0x100281c /* U+281c BRAILLE PATTERN DOTS-345 */ -#define XKB_KEY_braille_dots_1345 0x100281d /* U+281d BRAILLE PATTERN DOTS-1345 */ -#define XKB_KEY_braille_dots_2345 0x100281e /* U+281e BRAILLE PATTERN DOTS-2345 */ -#define XKB_KEY_braille_dots_12345 0x100281f /* U+281f BRAILLE PATTERN DOTS-12345 */ -#define XKB_KEY_braille_dots_6 0x1002820 /* U+2820 BRAILLE PATTERN DOTS-6 */ -#define XKB_KEY_braille_dots_16 0x1002821 /* U+2821 BRAILLE PATTERN DOTS-16 */ -#define XKB_KEY_braille_dots_26 0x1002822 /* U+2822 BRAILLE PATTERN DOTS-26 */ -#define XKB_KEY_braille_dots_126 0x1002823 /* U+2823 BRAILLE PATTERN DOTS-126 */ -#define XKB_KEY_braille_dots_36 0x1002824 /* U+2824 BRAILLE PATTERN DOTS-36 */ -#define XKB_KEY_braille_dots_136 0x1002825 /* U+2825 BRAILLE PATTERN DOTS-136 */ -#define XKB_KEY_braille_dots_236 0x1002826 /* U+2826 BRAILLE PATTERN DOTS-236 */ -#define XKB_KEY_braille_dots_1236 0x1002827 /* U+2827 BRAILLE PATTERN DOTS-1236 */ -#define XKB_KEY_braille_dots_46 0x1002828 /* U+2828 BRAILLE PATTERN DOTS-46 */ -#define XKB_KEY_braille_dots_146 0x1002829 /* U+2829 BRAILLE PATTERN DOTS-146 */ -#define XKB_KEY_braille_dots_246 0x100282a /* U+282a BRAILLE PATTERN DOTS-246 */ -#define XKB_KEY_braille_dots_1246 0x100282b /* U+282b BRAILLE PATTERN DOTS-1246 */ -#define XKB_KEY_braille_dots_346 0x100282c /* U+282c BRAILLE PATTERN DOTS-346 */ -#define XKB_KEY_braille_dots_1346 0x100282d /* U+282d BRAILLE PATTERN DOTS-1346 */ -#define XKB_KEY_braille_dots_2346 0x100282e /* U+282e BRAILLE PATTERN DOTS-2346 */ -#define XKB_KEY_braille_dots_12346 0x100282f /* U+282f BRAILLE PATTERN DOTS-12346 */ -#define XKB_KEY_braille_dots_56 0x1002830 /* U+2830 BRAILLE PATTERN DOTS-56 */ -#define XKB_KEY_braille_dots_156 0x1002831 /* U+2831 BRAILLE PATTERN DOTS-156 */ -#define XKB_KEY_braille_dots_256 0x1002832 /* U+2832 BRAILLE PATTERN DOTS-256 */ -#define XKB_KEY_braille_dots_1256 0x1002833 /* U+2833 BRAILLE PATTERN DOTS-1256 */ -#define XKB_KEY_braille_dots_356 0x1002834 /* U+2834 BRAILLE PATTERN DOTS-356 */ -#define XKB_KEY_braille_dots_1356 0x1002835 /* U+2835 BRAILLE PATTERN DOTS-1356 */ -#define XKB_KEY_braille_dots_2356 0x1002836 /* U+2836 BRAILLE PATTERN DOTS-2356 */ -#define XKB_KEY_braille_dots_12356 0x1002837 /* U+2837 BRAILLE PATTERN DOTS-12356 */ -#define XKB_KEY_braille_dots_456 0x1002838 /* U+2838 BRAILLE PATTERN DOTS-456 */ -#define XKB_KEY_braille_dots_1456 0x1002839 /* U+2839 BRAILLE PATTERN DOTS-1456 */ -#define XKB_KEY_braille_dots_2456 0x100283a /* U+283a BRAILLE PATTERN DOTS-2456 */ -#define XKB_KEY_braille_dots_12456 0x100283b /* U+283b BRAILLE PATTERN DOTS-12456 */ -#define XKB_KEY_braille_dots_3456 0x100283c /* U+283c BRAILLE PATTERN DOTS-3456 */ -#define XKB_KEY_braille_dots_13456 0x100283d /* U+283d BRAILLE PATTERN DOTS-13456 */ -#define XKB_KEY_braille_dots_23456 0x100283e /* U+283e BRAILLE PATTERN DOTS-23456 */ -#define XKB_KEY_braille_dots_123456 0x100283f /* U+283f BRAILLE PATTERN DOTS-123456 */ -#define XKB_KEY_braille_dots_7 0x1002840 /* U+2840 BRAILLE PATTERN DOTS-7 */ -#define XKB_KEY_braille_dots_17 0x1002841 /* U+2841 BRAILLE PATTERN DOTS-17 */ -#define XKB_KEY_braille_dots_27 0x1002842 /* U+2842 BRAILLE PATTERN DOTS-27 */ -#define XKB_KEY_braille_dots_127 0x1002843 /* U+2843 BRAILLE PATTERN DOTS-127 */ -#define XKB_KEY_braille_dots_37 0x1002844 /* U+2844 BRAILLE PATTERN DOTS-37 */ -#define XKB_KEY_braille_dots_137 0x1002845 /* U+2845 BRAILLE PATTERN DOTS-137 */ -#define XKB_KEY_braille_dots_237 0x1002846 /* U+2846 BRAILLE PATTERN DOTS-237 */ -#define XKB_KEY_braille_dots_1237 0x1002847 /* U+2847 BRAILLE PATTERN DOTS-1237 */ -#define XKB_KEY_braille_dots_47 0x1002848 /* U+2848 BRAILLE PATTERN DOTS-47 */ -#define XKB_KEY_braille_dots_147 0x1002849 /* U+2849 BRAILLE PATTERN DOTS-147 */ -#define XKB_KEY_braille_dots_247 0x100284a /* U+284a BRAILLE PATTERN DOTS-247 */ -#define XKB_KEY_braille_dots_1247 0x100284b /* U+284b BRAILLE PATTERN DOTS-1247 */ -#define XKB_KEY_braille_dots_347 0x100284c /* U+284c BRAILLE PATTERN DOTS-347 */ -#define XKB_KEY_braille_dots_1347 0x100284d /* U+284d BRAILLE PATTERN DOTS-1347 */ -#define XKB_KEY_braille_dots_2347 0x100284e /* U+284e BRAILLE PATTERN DOTS-2347 */ -#define XKB_KEY_braille_dots_12347 0x100284f /* U+284f BRAILLE PATTERN DOTS-12347 */ -#define XKB_KEY_braille_dots_57 0x1002850 /* U+2850 BRAILLE PATTERN DOTS-57 */ -#define XKB_KEY_braille_dots_157 0x1002851 /* U+2851 BRAILLE PATTERN DOTS-157 */ -#define XKB_KEY_braille_dots_257 0x1002852 /* U+2852 BRAILLE PATTERN DOTS-257 */ -#define XKB_KEY_braille_dots_1257 0x1002853 /* U+2853 BRAILLE PATTERN DOTS-1257 */ -#define XKB_KEY_braille_dots_357 0x1002854 /* U+2854 BRAILLE PATTERN DOTS-357 */ -#define XKB_KEY_braille_dots_1357 0x1002855 /* U+2855 BRAILLE PATTERN DOTS-1357 */ -#define XKB_KEY_braille_dots_2357 0x1002856 /* U+2856 BRAILLE PATTERN DOTS-2357 */ -#define XKB_KEY_braille_dots_12357 0x1002857 /* U+2857 BRAILLE PATTERN DOTS-12357 */ -#define XKB_KEY_braille_dots_457 0x1002858 /* U+2858 BRAILLE PATTERN DOTS-457 */ -#define XKB_KEY_braille_dots_1457 0x1002859 /* U+2859 BRAILLE PATTERN DOTS-1457 */ -#define XKB_KEY_braille_dots_2457 0x100285a /* U+285a BRAILLE PATTERN DOTS-2457 */ -#define XKB_KEY_braille_dots_12457 0x100285b /* U+285b BRAILLE PATTERN DOTS-12457 */ -#define XKB_KEY_braille_dots_3457 0x100285c /* U+285c BRAILLE PATTERN DOTS-3457 */ -#define XKB_KEY_braille_dots_13457 0x100285d /* U+285d BRAILLE PATTERN DOTS-13457 */ -#define XKB_KEY_braille_dots_23457 0x100285e /* U+285e BRAILLE PATTERN DOTS-23457 */ -#define XKB_KEY_braille_dots_123457 0x100285f /* U+285f BRAILLE PATTERN DOTS-123457 */ -#define XKB_KEY_braille_dots_67 0x1002860 /* U+2860 BRAILLE PATTERN DOTS-67 */ -#define XKB_KEY_braille_dots_167 0x1002861 /* U+2861 BRAILLE PATTERN DOTS-167 */ -#define XKB_KEY_braille_dots_267 0x1002862 /* U+2862 BRAILLE PATTERN DOTS-267 */ -#define XKB_KEY_braille_dots_1267 0x1002863 /* U+2863 BRAILLE PATTERN DOTS-1267 */ -#define XKB_KEY_braille_dots_367 0x1002864 /* U+2864 BRAILLE PATTERN DOTS-367 */ -#define XKB_KEY_braille_dots_1367 0x1002865 /* U+2865 BRAILLE PATTERN DOTS-1367 */ -#define XKB_KEY_braille_dots_2367 0x1002866 /* U+2866 BRAILLE PATTERN DOTS-2367 */ -#define XKB_KEY_braille_dots_12367 0x1002867 /* U+2867 BRAILLE PATTERN DOTS-12367 */ -#define XKB_KEY_braille_dots_467 0x1002868 /* U+2868 BRAILLE PATTERN DOTS-467 */ -#define XKB_KEY_braille_dots_1467 0x1002869 /* U+2869 BRAILLE PATTERN DOTS-1467 */ -#define XKB_KEY_braille_dots_2467 0x100286a /* U+286a BRAILLE PATTERN DOTS-2467 */ -#define XKB_KEY_braille_dots_12467 0x100286b /* U+286b BRAILLE PATTERN DOTS-12467 */ -#define XKB_KEY_braille_dots_3467 0x100286c /* U+286c BRAILLE PATTERN DOTS-3467 */ -#define XKB_KEY_braille_dots_13467 0x100286d /* U+286d BRAILLE PATTERN DOTS-13467 */ -#define XKB_KEY_braille_dots_23467 0x100286e /* U+286e BRAILLE PATTERN DOTS-23467 */ -#define XKB_KEY_braille_dots_123467 0x100286f /* U+286f BRAILLE PATTERN DOTS-123467 */ -#define XKB_KEY_braille_dots_567 0x1002870 /* U+2870 BRAILLE PATTERN DOTS-567 */ -#define XKB_KEY_braille_dots_1567 0x1002871 /* U+2871 BRAILLE PATTERN DOTS-1567 */ -#define XKB_KEY_braille_dots_2567 0x1002872 /* U+2872 BRAILLE PATTERN DOTS-2567 */ -#define XKB_KEY_braille_dots_12567 0x1002873 /* U+2873 BRAILLE PATTERN DOTS-12567 */ -#define XKB_KEY_braille_dots_3567 0x1002874 /* U+2874 BRAILLE PATTERN DOTS-3567 */ -#define XKB_KEY_braille_dots_13567 0x1002875 /* U+2875 BRAILLE PATTERN DOTS-13567 */ -#define XKB_KEY_braille_dots_23567 0x1002876 /* U+2876 BRAILLE PATTERN DOTS-23567 */ -#define XKB_KEY_braille_dots_123567 0x1002877 /* U+2877 BRAILLE PATTERN DOTS-123567 */ -#define XKB_KEY_braille_dots_4567 0x1002878 /* U+2878 BRAILLE PATTERN DOTS-4567 */ -#define XKB_KEY_braille_dots_14567 0x1002879 /* U+2879 BRAILLE PATTERN DOTS-14567 */ -#define XKB_KEY_braille_dots_24567 0x100287a /* U+287a BRAILLE PATTERN DOTS-24567 */ -#define XKB_KEY_braille_dots_124567 0x100287b /* U+287b BRAILLE PATTERN DOTS-124567 */ -#define XKB_KEY_braille_dots_34567 0x100287c /* U+287c BRAILLE PATTERN DOTS-34567 */ -#define XKB_KEY_braille_dots_134567 0x100287d /* U+287d BRAILLE PATTERN DOTS-134567 */ -#define XKB_KEY_braille_dots_234567 0x100287e /* U+287e BRAILLE PATTERN DOTS-234567 */ -#define XKB_KEY_braille_dots_1234567 0x100287f /* U+287f BRAILLE PATTERN DOTS-1234567 */ -#define XKB_KEY_braille_dots_8 0x1002880 /* U+2880 BRAILLE PATTERN DOTS-8 */ -#define XKB_KEY_braille_dots_18 0x1002881 /* U+2881 BRAILLE PATTERN DOTS-18 */ -#define XKB_KEY_braille_dots_28 0x1002882 /* U+2882 BRAILLE PATTERN DOTS-28 */ -#define XKB_KEY_braille_dots_128 0x1002883 /* U+2883 BRAILLE PATTERN DOTS-128 */ -#define XKB_KEY_braille_dots_38 0x1002884 /* U+2884 BRAILLE PATTERN DOTS-38 */ -#define XKB_KEY_braille_dots_138 0x1002885 /* U+2885 BRAILLE PATTERN DOTS-138 */ -#define XKB_KEY_braille_dots_238 0x1002886 /* U+2886 BRAILLE PATTERN DOTS-238 */ -#define XKB_KEY_braille_dots_1238 0x1002887 /* U+2887 BRAILLE PATTERN DOTS-1238 */ -#define XKB_KEY_braille_dots_48 0x1002888 /* U+2888 BRAILLE PATTERN DOTS-48 */ -#define XKB_KEY_braille_dots_148 0x1002889 /* U+2889 BRAILLE PATTERN DOTS-148 */ -#define XKB_KEY_braille_dots_248 0x100288a /* U+288a BRAILLE PATTERN DOTS-248 */ -#define XKB_KEY_braille_dots_1248 0x100288b /* U+288b BRAILLE PATTERN DOTS-1248 */ -#define XKB_KEY_braille_dots_348 0x100288c /* U+288c BRAILLE PATTERN DOTS-348 */ -#define XKB_KEY_braille_dots_1348 0x100288d /* U+288d BRAILLE PATTERN DOTS-1348 */ -#define XKB_KEY_braille_dots_2348 0x100288e /* U+288e BRAILLE PATTERN DOTS-2348 */ -#define XKB_KEY_braille_dots_12348 0x100288f /* U+288f BRAILLE PATTERN DOTS-12348 */ -#define XKB_KEY_braille_dots_58 0x1002890 /* U+2890 BRAILLE PATTERN DOTS-58 */ -#define XKB_KEY_braille_dots_158 0x1002891 /* U+2891 BRAILLE PATTERN DOTS-158 */ -#define XKB_KEY_braille_dots_258 0x1002892 /* U+2892 BRAILLE PATTERN DOTS-258 */ -#define XKB_KEY_braille_dots_1258 0x1002893 /* U+2893 BRAILLE PATTERN DOTS-1258 */ -#define XKB_KEY_braille_dots_358 0x1002894 /* U+2894 BRAILLE PATTERN DOTS-358 */ -#define XKB_KEY_braille_dots_1358 0x1002895 /* U+2895 BRAILLE PATTERN DOTS-1358 */ -#define XKB_KEY_braille_dots_2358 0x1002896 /* U+2896 BRAILLE PATTERN DOTS-2358 */ -#define XKB_KEY_braille_dots_12358 0x1002897 /* U+2897 BRAILLE PATTERN DOTS-12358 */ -#define XKB_KEY_braille_dots_458 0x1002898 /* U+2898 BRAILLE PATTERN DOTS-458 */ -#define XKB_KEY_braille_dots_1458 0x1002899 /* U+2899 BRAILLE PATTERN DOTS-1458 */ -#define XKB_KEY_braille_dots_2458 0x100289a /* U+289a BRAILLE PATTERN DOTS-2458 */ -#define XKB_KEY_braille_dots_12458 0x100289b /* U+289b BRAILLE PATTERN DOTS-12458 */ -#define XKB_KEY_braille_dots_3458 0x100289c /* U+289c BRAILLE PATTERN DOTS-3458 */ -#define XKB_KEY_braille_dots_13458 0x100289d /* U+289d BRAILLE PATTERN DOTS-13458 */ -#define XKB_KEY_braille_dots_23458 0x100289e /* U+289e BRAILLE PATTERN DOTS-23458 */ -#define XKB_KEY_braille_dots_123458 0x100289f /* U+289f BRAILLE PATTERN DOTS-123458 */ -#define XKB_KEY_braille_dots_68 0x10028a0 /* U+28a0 BRAILLE PATTERN DOTS-68 */ -#define XKB_KEY_braille_dots_168 0x10028a1 /* U+28a1 BRAILLE PATTERN DOTS-168 */ -#define XKB_KEY_braille_dots_268 0x10028a2 /* U+28a2 BRAILLE PATTERN DOTS-268 */ -#define XKB_KEY_braille_dots_1268 0x10028a3 /* U+28a3 BRAILLE PATTERN DOTS-1268 */ -#define XKB_KEY_braille_dots_368 0x10028a4 /* U+28a4 BRAILLE PATTERN DOTS-368 */ -#define XKB_KEY_braille_dots_1368 0x10028a5 /* U+28a5 BRAILLE PATTERN DOTS-1368 */ -#define XKB_KEY_braille_dots_2368 0x10028a6 /* U+28a6 BRAILLE PATTERN DOTS-2368 */ -#define XKB_KEY_braille_dots_12368 0x10028a7 /* U+28a7 BRAILLE PATTERN DOTS-12368 */ -#define XKB_KEY_braille_dots_468 0x10028a8 /* U+28a8 BRAILLE PATTERN DOTS-468 */ -#define XKB_KEY_braille_dots_1468 0x10028a9 /* U+28a9 BRAILLE PATTERN DOTS-1468 */ -#define XKB_KEY_braille_dots_2468 0x10028aa /* U+28aa BRAILLE PATTERN DOTS-2468 */ -#define XKB_KEY_braille_dots_12468 0x10028ab /* U+28ab BRAILLE PATTERN DOTS-12468 */ -#define XKB_KEY_braille_dots_3468 0x10028ac /* U+28ac BRAILLE PATTERN DOTS-3468 */ -#define XKB_KEY_braille_dots_13468 0x10028ad /* U+28ad BRAILLE PATTERN DOTS-13468 */ -#define XKB_KEY_braille_dots_23468 0x10028ae /* U+28ae BRAILLE PATTERN DOTS-23468 */ -#define XKB_KEY_braille_dots_123468 0x10028af /* U+28af BRAILLE PATTERN DOTS-123468 */ -#define XKB_KEY_braille_dots_568 0x10028b0 /* U+28b0 BRAILLE PATTERN DOTS-568 */ -#define XKB_KEY_braille_dots_1568 0x10028b1 /* U+28b1 BRAILLE PATTERN DOTS-1568 */ -#define XKB_KEY_braille_dots_2568 0x10028b2 /* U+28b2 BRAILLE PATTERN DOTS-2568 */ -#define XKB_KEY_braille_dots_12568 0x10028b3 /* U+28b3 BRAILLE PATTERN DOTS-12568 */ -#define XKB_KEY_braille_dots_3568 0x10028b4 /* U+28b4 BRAILLE PATTERN DOTS-3568 */ -#define XKB_KEY_braille_dots_13568 0x10028b5 /* U+28b5 BRAILLE PATTERN DOTS-13568 */ -#define XKB_KEY_braille_dots_23568 0x10028b6 /* U+28b6 BRAILLE PATTERN DOTS-23568 */ -#define XKB_KEY_braille_dots_123568 0x10028b7 /* U+28b7 BRAILLE PATTERN DOTS-123568 */ -#define XKB_KEY_braille_dots_4568 0x10028b8 /* U+28b8 BRAILLE PATTERN DOTS-4568 */ -#define XKB_KEY_braille_dots_14568 0x10028b9 /* U+28b9 BRAILLE PATTERN DOTS-14568 */ -#define XKB_KEY_braille_dots_24568 0x10028ba /* U+28ba BRAILLE PATTERN DOTS-24568 */ -#define XKB_KEY_braille_dots_124568 0x10028bb /* U+28bb BRAILLE PATTERN DOTS-124568 */ -#define XKB_KEY_braille_dots_34568 0x10028bc /* U+28bc BRAILLE PATTERN DOTS-34568 */ -#define XKB_KEY_braille_dots_134568 0x10028bd /* U+28bd BRAILLE PATTERN DOTS-134568 */ -#define XKB_KEY_braille_dots_234568 0x10028be /* U+28be BRAILLE PATTERN DOTS-234568 */ -#define XKB_KEY_braille_dots_1234568 0x10028bf /* U+28bf BRAILLE PATTERN DOTS-1234568 */ -#define XKB_KEY_braille_dots_78 0x10028c0 /* U+28c0 BRAILLE PATTERN DOTS-78 */ -#define XKB_KEY_braille_dots_178 0x10028c1 /* U+28c1 BRAILLE PATTERN DOTS-178 */ -#define XKB_KEY_braille_dots_278 0x10028c2 /* U+28c2 BRAILLE PATTERN DOTS-278 */ -#define XKB_KEY_braille_dots_1278 0x10028c3 /* U+28c3 BRAILLE PATTERN DOTS-1278 */ -#define XKB_KEY_braille_dots_378 0x10028c4 /* U+28c4 BRAILLE PATTERN DOTS-378 */ -#define XKB_KEY_braille_dots_1378 0x10028c5 /* U+28c5 BRAILLE PATTERN DOTS-1378 */ -#define XKB_KEY_braille_dots_2378 0x10028c6 /* U+28c6 BRAILLE PATTERN DOTS-2378 */ -#define XKB_KEY_braille_dots_12378 0x10028c7 /* U+28c7 BRAILLE PATTERN DOTS-12378 */ -#define XKB_KEY_braille_dots_478 0x10028c8 /* U+28c8 BRAILLE PATTERN DOTS-478 */ -#define XKB_KEY_braille_dots_1478 0x10028c9 /* U+28c9 BRAILLE PATTERN DOTS-1478 */ -#define XKB_KEY_braille_dots_2478 0x10028ca /* U+28ca BRAILLE PATTERN DOTS-2478 */ -#define XKB_KEY_braille_dots_12478 0x10028cb /* U+28cb BRAILLE PATTERN DOTS-12478 */ -#define XKB_KEY_braille_dots_3478 0x10028cc /* U+28cc BRAILLE PATTERN DOTS-3478 */ -#define XKB_KEY_braille_dots_13478 0x10028cd /* U+28cd BRAILLE PATTERN DOTS-13478 */ -#define XKB_KEY_braille_dots_23478 0x10028ce /* U+28ce BRAILLE PATTERN DOTS-23478 */ -#define XKB_KEY_braille_dots_123478 0x10028cf /* U+28cf BRAILLE PATTERN DOTS-123478 */ -#define XKB_KEY_braille_dots_578 0x10028d0 /* U+28d0 BRAILLE PATTERN DOTS-578 */ -#define XKB_KEY_braille_dots_1578 0x10028d1 /* U+28d1 BRAILLE PATTERN DOTS-1578 */ -#define XKB_KEY_braille_dots_2578 0x10028d2 /* U+28d2 BRAILLE PATTERN DOTS-2578 */ -#define XKB_KEY_braille_dots_12578 0x10028d3 /* U+28d3 BRAILLE PATTERN DOTS-12578 */ -#define XKB_KEY_braille_dots_3578 0x10028d4 /* U+28d4 BRAILLE PATTERN DOTS-3578 */ -#define XKB_KEY_braille_dots_13578 0x10028d5 /* U+28d5 BRAILLE PATTERN DOTS-13578 */ -#define XKB_KEY_braille_dots_23578 0x10028d6 /* U+28d6 BRAILLE PATTERN DOTS-23578 */ -#define XKB_KEY_braille_dots_123578 0x10028d7 /* U+28d7 BRAILLE PATTERN DOTS-123578 */ -#define XKB_KEY_braille_dots_4578 0x10028d8 /* U+28d8 BRAILLE PATTERN DOTS-4578 */ -#define XKB_KEY_braille_dots_14578 0x10028d9 /* U+28d9 BRAILLE PATTERN DOTS-14578 */ -#define XKB_KEY_braille_dots_24578 0x10028da /* U+28da BRAILLE PATTERN DOTS-24578 */ -#define XKB_KEY_braille_dots_124578 0x10028db /* U+28db BRAILLE PATTERN DOTS-124578 */ -#define XKB_KEY_braille_dots_34578 0x10028dc /* U+28dc BRAILLE PATTERN DOTS-34578 */ -#define XKB_KEY_braille_dots_134578 0x10028dd /* U+28dd BRAILLE PATTERN DOTS-134578 */ -#define XKB_KEY_braille_dots_234578 0x10028de /* U+28de BRAILLE PATTERN DOTS-234578 */ -#define XKB_KEY_braille_dots_1234578 0x10028df /* U+28df BRAILLE PATTERN DOTS-1234578 */ -#define XKB_KEY_braille_dots_678 0x10028e0 /* U+28e0 BRAILLE PATTERN DOTS-678 */ -#define XKB_KEY_braille_dots_1678 0x10028e1 /* U+28e1 BRAILLE PATTERN DOTS-1678 */ -#define XKB_KEY_braille_dots_2678 0x10028e2 /* U+28e2 BRAILLE PATTERN DOTS-2678 */ -#define XKB_KEY_braille_dots_12678 0x10028e3 /* U+28e3 BRAILLE PATTERN DOTS-12678 */ -#define XKB_KEY_braille_dots_3678 0x10028e4 /* U+28e4 BRAILLE PATTERN DOTS-3678 */ -#define XKB_KEY_braille_dots_13678 0x10028e5 /* U+28e5 BRAILLE PATTERN DOTS-13678 */ -#define XKB_KEY_braille_dots_23678 0x10028e6 /* U+28e6 BRAILLE PATTERN DOTS-23678 */ -#define XKB_KEY_braille_dots_123678 0x10028e7 /* U+28e7 BRAILLE PATTERN DOTS-123678 */ -#define XKB_KEY_braille_dots_4678 0x10028e8 /* U+28e8 BRAILLE PATTERN DOTS-4678 */ -#define XKB_KEY_braille_dots_14678 0x10028e9 /* U+28e9 BRAILLE PATTERN DOTS-14678 */ -#define XKB_KEY_braille_dots_24678 0x10028ea /* U+28ea BRAILLE PATTERN DOTS-24678 */ -#define XKB_KEY_braille_dots_124678 0x10028eb /* U+28eb BRAILLE PATTERN DOTS-124678 */ -#define XKB_KEY_braille_dots_34678 0x10028ec /* U+28ec BRAILLE PATTERN DOTS-34678 */ -#define XKB_KEY_braille_dots_134678 0x10028ed /* U+28ed BRAILLE PATTERN DOTS-134678 */ -#define XKB_KEY_braille_dots_234678 0x10028ee /* U+28ee BRAILLE PATTERN DOTS-234678 */ -#define XKB_KEY_braille_dots_1234678 0x10028ef /* U+28ef BRAILLE PATTERN DOTS-1234678 */ -#define XKB_KEY_braille_dots_5678 0x10028f0 /* U+28f0 BRAILLE PATTERN DOTS-5678 */ -#define XKB_KEY_braille_dots_15678 0x10028f1 /* U+28f1 BRAILLE PATTERN DOTS-15678 */ -#define XKB_KEY_braille_dots_25678 0x10028f2 /* U+28f2 BRAILLE PATTERN DOTS-25678 */ -#define XKB_KEY_braille_dots_125678 0x10028f3 /* U+28f3 BRAILLE PATTERN DOTS-125678 */ -#define XKB_KEY_braille_dots_35678 0x10028f4 /* U+28f4 BRAILLE PATTERN DOTS-35678 */ -#define XKB_KEY_braille_dots_135678 0x10028f5 /* U+28f5 BRAILLE PATTERN DOTS-135678 */ -#define XKB_KEY_braille_dots_235678 0x10028f6 /* U+28f6 BRAILLE PATTERN DOTS-235678 */ -#define XKB_KEY_braille_dots_1235678 0x10028f7 /* U+28f7 BRAILLE PATTERN DOTS-1235678 */ -#define XKB_KEY_braille_dots_45678 0x10028f8 /* U+28f8 BRAILLE PATTERN DOTS-45678 */ -#define XKB_KEY_braille_dots_145678 0x10028f9 /* U+28f9 BRAILLE PATTERN DOTS-145678 */ -#define XKB_KEY_braille_dots_245678 0x10028fa /* U+28fa BRAILLE PATTERN DOTS-245678 */ -#define XKB_KEY_braille_dots_1245678 0x10028fb /* U+28fb BRAILLE PATTERN DOTS-1245678 */ -#define XKB_KEY_braille_dots_345678 0x10028fc /* U+28fc BRAILLE PATTERN DOTS-345678 */ -#define XKB_KEY_braille_dots_1345678 0x10028fd /* U+28fd BRAILLE PATTERN DOTS-1345678 */ -#define XKB_KEY_braille_dots_2345678 0x10028fe /* U+28fe BRAILLE PATTERN DOTS-2345678 */ -#define XKB_KEY_braille_dots_12345678 0x10028ff /* U+28ff BRAILLE PATTERN DOTS-12345678 */ - -/* - * Sinhala (http://unicode.org/charts/PDF/U0D80.pdf) - * http://www.nongnu.org/sinhala/doc/transliteration/sinhala-transliteration_6.html - */ - -#define XKB_KEY_Sinh_ng 0x1000d82 /* U+0D82 SINHALA ANUSVARAYA */ -#define XKB_KEY_Sinh_h2 0x1000d83 /* U+0D83 SINHALA VISARGAYA */ -#define XKB_KEY_Sinh_a 0x1000d85 /* U+0D85 SINHALA AYANNA */ -#define XKB_KEY_Sinh_aa 0x1000d86 /* U+0D86 SINHALA AAYANNA */ -#define XKB_KEY_Sinh_ae 0x1000d87 /* U+0D87 SINHALA AEYANNA */ -#define XKB_KEY_Sinh_aee 0x1000d88 /* U+0D88 SINHALA AEEYANNA */ -#define XKB_KEY_Sinh_i 0x1000d89 /* U+0D89 SINHALA IYANNA */ -#define XKB_KEY_Sinh_ii 0x1000d8a /* U+0D8A SINHALA IIYANNA */ -#define XKB_KEY_Sinh_u 0x1000d8b /* U+0D8B SINHALA UYANNA */ -#define XKB_KEY_Sinh_uu 0x1000d8c /* U+0D8C SINHALA UUYANNA */ -#define XKB_KEY_Sinh_ri 0x1000d8d /* U+0D8D SINHALA IRUYANNA */ -#define XKB_KEY_Sinh_rii 0x1000d8e /* U+0D8E SINHALA IRUUYANNA */ -#define XKB_KEY_Sinh_lu 0x1000d8f /* U+0D8F SINHALA ILUYANNA */ -#define XKB_KEY_Sinh_luu 0x1000d90 /* U+0D90 SINHALA ILUUYANNA */ -#define XKB_KEY_Sinh_e 0x1000d91 /* U+0D91 SINHALA EYANNA */ -#define XKB_KEY_Sinh_ee 0x1000d92 /* U+0D92 SINHALA EEYANNA */ -#define XKB_KEY_Sinh_ai 0x1000d93 /* U+0D93 SINHALA AIYANNA */ -#define XKB_KEY_Sinh_o 0x1000d94 /* U+0D94 SINHALA OYANNA */ -#define XKB_KEY_Sinh_oo 0x1000d95 /* U+0D95 SINHALA OOYANNA */ -#define XKB_KEY_Sinh_au 0x1000d96 /* U+0D96 SINHALA AUYANNA */ -#define XKB_KEY_Sinh_ka 0x1000d9a /* U+0D9A SINHALA KAYANNA */ -#define XKB_KEY_Sinh_kha 0x1000d9b /* U+0D9B SINHALA MAHA. KAYANNA */ -#define XKB_KEY_Sinh_ga 0x1000d9c /* U+0D9C SINHALA GAYANNA */ -#define XKB_KEY_Sinh_gha 0x1000d9d /* U+0D9D SINHALA MAHA. GAYANNA */ -#define XKB_KEY_Sinh_ng2 0x1000d9e /* U+0D9E SINHALA KANTAJA NAASIKYAYA */ -#define XKB_KEY_Sinh_nga 0x1000d9f /* U+0D9F SINHALA SANYAKA GAYANNA */ -#define XKB_KEY_Sinh_ca 0x1000da0 /* U+0DA0 SINHALA CAYANNA */ -#define XKB_KEY_Sinh_cha 0x1000da1 /* U+0DA1 SINHALA MAHA. CAYANNA */ -#define XKB_KEY_Sinh_ja 0x1000da2 /* U+0DA2 SINHALA JAYANNA */ -#define XKB_KEY_Sinh_jha 0x1000da3 /* U+0DA3 SINHALA MAHA. JAYANNA */ -#define XKB_KEY_Sinh_nya 0x1000da4 /* U+0DA4 SINHALA TAALUJA NAASIKYAYA */ -#define XKB_KEY_Sinh_jnya 0x1000da5 /* U+0DA5 SINHALA TAALUJA SANYOOGA NAASIKYAYA */ -#define XKB_KEY_Sinh_nja 0x1000da6 /* U+0DA6 SINHALA SANYAKA JAYANNA */ -#define XKB_KEY_Sinh_tta 0x1000da7 /* U+0DA7 SINHALA TTAYANNA */ -#define XKB_KEY_Sinh_ttha 0x1000da8 /* U+0DA8 SINHALA MAHA. TTAYANNA */ -#define XKB_KEY_Sinh_dda 0x1000da9 /* U+0DA9 SINHALA DDAYANNA */ -#define XKB_KEY_Sinh_ddha 0x1000daa /* U+0DAA SINHALA MAHA. DDAYANNA */ -#define XKB_KEY_Sinh_nna 0x1000dab /* U+0DAB SINHALA MUURDHAJA NAYANNA */ -#define XKB_KEY_Sinh_ndda 0x1000dac /* U+0DAC SINHALA SANYAKA DDAYANNA */ -#define XKB_KEY_Sinh_tha 0x1000dad /* U+0DAD SINHALA TAYANNA */ -#define XKB_KEY_Sinh_thha 0x1000dae /* U+0DAE SINHALA MAHA. TAYANNA */ -#define XKB_KEY_Sinh_dha 0x1000daf /* U+0DAF SINHALA DAYANNA */ -#define XKB_KEY_Sinh_dhha 0x1000db0 /* U+0DB0 SINHALA MAHA. DAYANNA */ -#define XKB_KEY_Sinh_na 0x1000db1 /* U+0DB1 SINHALA DANTAJA NAYANNA */ -#define XKB_KEY_Sinh_ndha 0x1000db3 /* U+0DB3 SINHALA SANYAKA DAYANNA */ -#define XKB_KEY_Sinh_pa 0x1000db4 /* U+0DB4 SINHALA PAYANNA */ -#define XKB_KEY_Sinh_pha 0x1000db5 /* U+0DB5 SINHALA MAHA. PAYANNA */ -#define XKB_KEY_Sinh_ba 0x1000db6 /* U+0DB6 SINHALA BAYANNA */ -#define XKB_KEY_Sinh_bha 0x1000db7 /* U+0DB7 SINHALA MAHA. BAYANNA */ -#define XKB_KEY_Sinh_ma 0x1000db8 /* U+0DB8 SINHALA MAYANNA */ -#define XKB_KEY_Sinh_mba 0x1000db9 /* U+0DB9 SINHALA AMBA BAYANNA */ -#define XKB_KEY_Sinh_ya 0x1000dba /* U+0DBA SINHALA YAYANNA */ -#define XKB_KEY_Sinh_ra 0x1000dbb /* U+0DBB SINHALA RAYANNA */ -#define XKB_KEY_Sinh_la 0x1000dbd /* U+0DBD SINHALA DANTAJA LAYANNA */ -#define XKB_KEY_Sinh_va 0x1000dc0 /* U+0DC0 SINHALA VAYANNA */ -#define XKB_KEY_Sinh_sha 0x1000dc1 /* U+0DC1 SINHALA TAALUJA SAYANNA */ -#define XKB_KEY_Sinh_ssha 0x1000dc2 /* U+0DC2 SINHALA MUURDHAJA SAYANNA */ -#define XKB_KEY_Sinh_sa 0x1000dc3 /* U+0DC3 SINHALA DANTAJA SAYANNA */ -#define XKB_KEY_Sinh_ha 0x1000dc4 /* U+0DC4 SINHALA HAYANNA */ -#define XKB_KEY_Sinh_lla 0x1000dc5 /* U+0DC5 SINHALA MUURDHAJA LAYANNA */ -#define XKB_KEY_Sinh_fa 0x1000dc6 /* U+0DC6 SINHALA FAYANNA */ -#define XKB_KEY_Sinh_al 0x1000dca /* U+0DCA SINHALA AL-LAKUNA */ -#define XKB_KEY_Sinh_aa2 0x1000dcf /* U+0DCF SINHALA AELA-PILLA */ -#define XKB_KEY_Sinh_ae2 0x1000dd0 /* U+0DD0 SINHALA AEDA-PILLA */ -#define XKB_KEY_Sinh_aee2 0x1000dd1 /* U+0DD1 SINHALA DIGA AEDA-PILLA */ -#define XKB_KEY_Sinh_i2 0x1000dd2 /* U+0DD2 SINHALA IS-PILLA */ -#define XKB_KEY_Sinh_ii2 0x1000dd3 /* U+0DD3 SINHALA DIGA IS-PILLA */ -#define XKB_KEY_Sinh_u2 0x1000dd4 /* U+0DD4 SINHALA PAA-PILLA */ -#define XKB_KEY_Sinh_uu2 0x1000dd6 /* U+0DD6 SINHALA DIGA PAA-PILLA */ -#define XKB_KEY_Sinh_ru2 0x1000dd8 /* U+0DD8 SINHALA GAETTA-PILLA */ -#define XKB_KEY_Sinh_e2 0x1000dd9 /* U+0DD9 SINHALA KOMBUVA */ -#define XKB_KEY_Sinh_ee2 0x1000dda /* U+0DDA SINHALA DIGA KOMBUVA */ -#define XKB_KEY_Sinh_ai2 0x1000ddb /* U+0DDB SINHALA KOMBU DEKA */ -#define XKB_KEY_Sinh_o2 0x1000ddc /* U+0DDC SINHALA KOMBUVA HAA AELA-PILLA*/ -#define XKB_KEY_Sinh_oo2 0x1000ddd /* U+0DDD SINHALA KOMBUVA HAA DIGA AELA-PILLA*/ -#define XKB_KEY_Sinh_au2 0x1000dde /* U+0DDE SINHALA KOMBUVA HAA GAYANUKITTA */ -#define XKB_KEY_Sinh_lu2 0x1000ddf /* U+0DDF SINHALA GAYANUKITTA */ -#define XKB_KEY_Sinh_ruu2 0x1000df2 /* U+0DF2 SINHALA DIGA GAETTA-PILLA */ -#define XKB_KEY_Sinh_luu2 0x1000df3 /* U+0DF3 SINHALA DIGA GAYANUKITTA */ -#define XKB_KEY_Sinh_kunddaliya 0x1000df4 /* U+0DF4 SINHALA KUNDDALIYA */ -/* - * XFree86 vendor specific keysyms. - * - * The XFree86 keysym range is 0x10080001 - 0x1008FFFF. - * - * X.Org will not be adding to the XF86 set of keysyms, though they have - * been adopted and are considered a "standard" part of X keysym definitions. - * XFree86 never properly commented these keysyms, so we have done our - * best to explain the semantic meaning of these keys. - * - * XFree86 has removed their mail archives of the period, that might have - * shed more light on some of these definitions. Until/unless we resurrect - * these archives, these are from memory and usage. - */ - -/* - * ModeLock - * - * This one is old, and not really used any more since XKB offers this - * functionality. - */ - -#define XKB_KEY_XF86ModeLock 0x1008FF01 /* Mode Switch Lock */ - -/* Backlight controls. */ -#define XKB_KEY_XF86MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */ -#define XKB_KEY_XF86MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */ -#define XKB_KEY_XF86KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */ -#define XKB_KEY_XF86KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */ -#define XKB_KEY_XF86KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */ - -/* - * Keys found on some "Internet" keyboards. - */ -#define XKB_KEY_XF86Standby 0x1008FF10 /* System into standby mode */ -#define XKB_KEY_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */ -#define XKB_KEY_XF86AudioMute 0x1008FF12 /* Mute sound from the system */ -#define XKB_KEY_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */ -#define XKB_KEY_XF86AudioPlay 0x1008FF14 /* Start playing of audio > */ -#define XKB_KEY_XF86AudioStop 0x1008FF15 /* Stop playing audio */ -#define XKB_KEY_XF86AudioPrev 0x1008FF16 /* Previous track */ -#define XKB_KEY_XF86AudioNext 0x1008FF17 /* Next track */ -#define XKB_KEY_XF86HomePage 0x1008FF18 /* Display user's home page */ -#define XKB_KEY_XF86Mail 0x1008FF19 /* Invoke user's mail program */ -#define XKB_KEY_XF86Start 0x1008FF1A /* Start application */ -#define XKB_KEY_XF86Search 0x1008FF1B /* Search */ -#define XKB_KEY_XF86AudioRecord 0x1008FF1C /* Record audio application */ - -/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */ -#define XKB_KEY_XF86Calculator 0x1008FF1D /* Invoke calculator program */ -#define XKB_KEY_XF86Memo 0x1008FF1E /* Invoke Memo taking program */ -#define XKB_KEY_XF86ToDoList 0x1008FF1F /* Invoke To Do List program */ -#define XKB_KEY_XF86Calendar 0x1008FF20 /* Invoke Calendar program */ -#define XKB_KEY_XF86PowerDown 0x1008FF21 /* Deep sleep the system */ -#define XKB_KEY_XF86ContrastAdjust 0x1008FF22 /* Adjust screen contrast */ -#define XKB_KEY_XF86RockerUp 0x1008FF23 /* Rocker switches exist up */ -#define XKB_KEY_XF86RockerDown 0x1008FF24 /* and down */ -#define XKB_KEY_XF86RockerEnter 0x1008FF25 /* and let you press them */ - -/* Some more "Internet" keyboard symbols */ -#define XKB_KEY_XF86Back 0x1008FF26 /* Like back on a browser */ -#define XKB_KEY_XF86Forward 0x1008FF27 /* Like forward on a browser */ -#define XKB_KEY_XF86Stop 0x1008FF28 /* Stop current operation */ -#define XKB_KEY_XF86Refresh 0x1008FF29 /* Refresh the page */ -#define XKB_KEY_XF86PowerOff 0x1008FF2A /* Power off system entirely */ -#define XKB_KEY_XF86WakeUp 0x1008FF2B /* Wake up system from sleep */ -#define XKB_KEY_XF86Eject 0x1008FF2C /* Eject device (e.g. DVD) */ -#define XKB_KEY_XF86ScreenSaver 0x1008FF2D /* Invoke screensaver */ -#define XKB_KEY_XF86WWW 0x1008FF2E /* Invoke web browser */ -#define XKB_KEY_XF86Sleep 0x1008FF2F /* Put system to sleep */ -#define XKB_KEY_XF86Favorites 0x1008FF30 /* Show favorite locations */ -#define XKB_KEY_XF86AudioPause 0x1008FF31 /* Pause audio playing */ -#define XKB_KEY_XF86AudioMedia 0x1008FF32 /* Launch media collection app */ -#define XKB_KEY_XF86MyComputer 0x1008FF33 /* Display "My Computer" window */ -#define XKB_KEY_XF86VendorHome 0x1008FF34 /* Display vendor home web site */ -#define XKB_KEY_XF86LightBulb 0x1008FF35 /* Light bulb keys exist */ -#define XKB_KEY_XF86Shop 0x1008FF36 /* Display shopping web site */ -#define XKB_KEY_XF86History 0x1008FF37 /* Show history of web surfing */ -#define XKB_KEY_XF86OpenURL 0x1008FF38 /* Open selected URL */ -#define XKB_KEY_XF86AddFavorite 0x1008FF39 /* Add URL to favorites list */ -#define XKB_KEY_XF86HotLinks 0x1008FF3A /* Show "hot" links */ -#define XKB_KEY_XF86BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */ -#define XKB_KEY_XF86Finance 0x1008FF3C /* Display financial site */ -#define XKB_KEY_XF86Community 0x1008FF3D /* Display user's community */ -#define XKB_KEY_XF86AudioRewind 0x1008FF3E /* "rewind" audio track */ -#define XKB_KEY_XF86BackForward 0x1008FF3F /* ??? */ -#define XKB_KEY_XF86Launch0 0x1008FF40 /* Launch Application */ -#define XKB_KEY_XF86Launch1 0x1008FF41 /* Launch Application */ -#define XKB_KEY_XF86Launch2 0x1008FF42 /* Launch Application */ -#define XKB_KEY_XF86Launch3 0x1008FF43 /* Launch Application */ -#define XKB_KEY_XF86Launch4 0x1008FF44 /* Launch Application */ -#define XKB_KEY_XF86Launch5 0x1008FF45 /* Launch Application */ -#define XKB_KEY_XF86Launch6 0x1008FF46 /* Launch Application */ -#define XKB_KEY_XF86Launch7 0x1008FF47 /* Launch Application */ -#define XKB_KEY_XF86Launch8 0x1008FF48 /* Launch Application */ -#define XKB_KEY_XF86Launch9 0x1008FF49 /* Launch Application */ -#define XKB_KEY_XF86LaunchA 0x1008FF4A /* Launch Application */ -#define XKB_KEY_XF86LaunchB 0x1008FF4B /* Launch Application */ -#define XKB_KEY_XF86LaunchC 0x1008FF4C /* Launch Application */ -#define XKB_KEY_XF86LaunchD 0x1008FF4D /* Launch Application */ -#define XKB_KEY_XF86LaunchE 0x1008FF4E /* Launch Application */ -#define XKB_KEY_XF86LaunchF 0x1008FF4F /* Launch Application */ - -#define XKB_KEY_XF86ApplicationLeft 0x1008FF50 /* switch to application, left */ -#define XKB_KEY_XF86ApplicationRight 0x1008FF51 /* switch to application, right*/ -#define XKB_KEY_XF86Book 0x1008FF52 /* Launch bookreader */ -#define XKB_KEY_XF86CD 0x1008FF53 /* Launch CD/DVD player */ -#define XKB_KEY_XF86Calculater 0x1008FF54 /* Launch Calculater */ -#define XKB_KEY_XF86Clear 0x1008FF55 /* Clear window, screen */ -#define XKB_KEY_XF86Close 0x1008FF56 /* Close window */ -#define XKB_KEY_XF86Copy 0x1008FF57 /* Copy selection */ -#define XKB_KEY_XF86Cut 0x1008FF58 /* Cut selection */ -#define XKB_KEY_XF86Display 0x1008FF59 /* Output switch key */ -#define XKB_KEY_XF86DOS 0x1008FF5A /* Launch DOS (emulation) */ -#define XKB_KEY_XF86Documents 0x1008FF5B /* Open documents window */ -#define XKB_KEY_XF86Excel 0x1008FF5C /* Launch spread sheet */ -#define XKB_KEY_XF86Explorer 0x1008FF5D /* Launch file explorer */ -#define XKB_KEY_XF86Game 0x1008FF5E /* Launch game */ -#define XKB_KEY_XF86Go 0x1008FF5F /* Go to URL */ -#define XKB_KEY_XF86iTouch 0x1008FF60 /* Logitch iTouch- don't use */ -#define XKB_KEY_XF86LogOff 0x1008FF61 /* Log off system */ -#define XKB_KEY_XF86Market 0x1008FF62 /* ?? */ -#define XKB_KEY_XF86Meeting 0x1008FF63 /* enter meeting in calendar */ -#define XKB_KEY_XF86MenuKB 0x1008FF65 /* distingush keyboard from PB */ -#define XKB_KEY_XF86MenuPB 0x1008FF66 /* distinuish PB from keyboard */ -#define XKB_KEY_XF86MySites 0x1008FF67 /* Favourites */ -#define XKB_KEY_XF86New 0x1008FF68 /* New (folder, document... */ -#define XKB_KEY_XF86News 0x1008FF69 /* News */ -#define XKB_KEY_XF86OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/ -#define XKB_KEY_XF86Open 0x1008FF6B /* Open */ -#define XKB_KEY_XF86Option 0x1008FF6C /* ?? */ -#define XKB_KEY_XF86Paste 0x1008FF6D /* Paste */ -#define XKB_KEY_XF86Phone 0x1008FF6E /* Launch phone; dial number */ -#define XKB_KEY_XF86Q 0x1008FF70 /* Compaq's Q - don't use */ -#define XKB_KEY_XF86Reply 0x1008FF72 /* Reply e.g., mail */ -#define XKB_KEY_XF86Reload 0x1008FF73 /* Reload web page, file, etc. */ -#define XKB_KEY_XF86RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */ -#define XKB_KEY_XF86RotationPB 0x1008FF75 /* don't use */ -#define XKB_KEY_XF86RotationKB 0x1008FF76 /* don't use */ -#define XKB_KEY_XF86Save 0x1008FF77 /* Save (file, document, state */ -#define XKB_KEY_XF86ScrollUp 0x1008FF78 /* Scroll window/contents up */ -#define XKB_KEY_XF86ScrollDown 0x1008FF79 /* Scrool window/contentd down */ -#define XKB_KEY_XF86ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */ -#define XKB_KEY_XF86Send 0x1008FF7B /* Send mail, file, object */ -#define XKB_KEY_XF86Spell 0x1008FF7C /* Spell checker */ -#define XKB_KEY_XF86SplitScreen 0x1008FF7D /* Split window or screen */ -#define XKB_KEY_XF86Support 0x1008FF7E /* Get support (??) */ -#define XKB_KEY_XF86TaskPane 0x1008FF7F /* Show tasks */ -#define XKB_KEY_XF86Terminal 0x1008FF80 /* Launch terminal emulator */ -#define XKB_KEY_XF86Tools 0x1008FF81 /* toolbox of desktop/app. */ -#define XKB_KEY_XF86Travel 0x1008FF82 /* ?? */ -#define XKB_KEY_XF86UserPB 0x1008FF84 /* ?? */ -#define XKB_KEY_XF86User1KB 0x1008FF85 /* ?? */ -#define XKB_KEY_XF86User2KB 0x1008FF86 /* ?? */ -#define XKB_KEY_XF86Video 0x1008FF87 /* Launch video player */ -#define XKB_KEY_XF86WheelButton 0x1008FF88 /* button from a mouse wheel */ -#define XKB_KEY_XF86Word 0x1008FF89 /* Launch word processor */ -#define XKB_KEY_XF86Xfer 0x1008FF8A -#define XKB_KEY_XF86ZoomIn 0x1008FF8B /* zoom in view, map, etc. */ -#define XKB_KEY_XF86ZoomOut 0x1008FF8C /* zoom out view, map, etc. */ - -#define XKB_KEY_XF86Away 0x1008FF8D /* mark yourself as away */ -#define XKB_KEY_XF86Messenger 0x1008FF8E /* as in instant messaging */ -#define XKB_KEY_XF86WebCam 0x1008FF8F /* Launch web camera app. */ -#define XKB_KEY_XF86MailForward 0x1008FF90 /* Forward in mail */ -#define XKB_KEY_XF86Pictures 0x1008FF91 /* Show pictures */ -#define XKB_KEY_XF86Music 0x1008FF92 /* Launch music application */ - -#define XKB_KEY_XF86Battery 0x1008FF93 /* Display battery information */ -#define XKB_KEY_XF86Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */ -#define XKB_KEY_XF86WLAN 0x1008FF95 /* Enable/disable WLAN */ -#define XKB_KEY_XF86UWB 0x1008FF96 /* Enable/disable UWB */ - -#define XKB_KEY_XF86AudioForward 0x1008FF97 /* fast-forward audio track */ -#define XKB_KEY_XF86AudioRepeat 0x1008FF98 /* toggle repeat mode */ -#define XKB_KEY_XF86AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */ -#define XKB_KEY_XF86Subtitle 0x1008FF9A /* cycle through subtitle */ -#define XKB_KEY_XF86AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */ -#define XKB_KEY_XF86CycleAngle 0x1008FF9C /* cycle through angles */ -#define XKB_KEY_XF86FrameBack 0x1008FF9D /* video: go one frame back */ -#define XKB_KEY_XF86FrameForward 0x1008FF9E /* video: go one frame forward */ -#define XKB_KEY_XF86Time 0x1008FF9F /* display, or shows an entry for time seeking */ -#define XKB_KEY_XF86Select 0x1008FFA0 /* Select button on joypads and remotes */ -#define XKB_KEY_XF86View 0x1008FFA1 /* Show a view options/properties */ -#define XKB_KEY_XF86TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */ - -#define XKB_KEY_XF86Red 0x1008FFA3 /* Red button */ -#define XKB_KEY_XF86Green 0x1008FFA4 /* Green button */ -#define XKB_KEY_XF86Yellow 0x1008FFA5 /* Yellow button */ -#define XKB_KEY_XF86Blue 0x1008FFA6 /* Blue button */ - -#define XKB_KEY_XF86Suspend 0x1008FFA7 /* Sleep to RAM */ -#define XKB_KEY_XF86Hibernate 0x1008FFA8 /* Sleep to disk */ -#define XKB_KEY_XF86TouchpadToggle 0x1008FFA9 /* Toggle between touchpad/trackstick */ -#define XKB_KEY_XF86TouchpadOn 0x1008FFB0 /* The touchpad got switched on */ -#define XKB_KEY_XF86TouchpadOff 0x1008FFB1 /* The touchpad got switched off */ - -#define XKB_KEY_XF86AudioMicMute 0x1008FFB2 /* Mute the Mic from the system */ - -#define XKB_KEY_XF86Keyboard 0x1008FFB3 /* User defined keyboard related action */ - -#define XKB_KEY_XF86WWAN 0x1008FFB4 /* Toggle WWAN (LTE, UMTS, etc.) radio */ -#define XKB_KEY_XF86RFKill 0x1008FFB5 /* Toggle radios on/off */ - -#define XKB_KEY_XF86AudioPreset 0x1008FFB6 /* Select equalizer preset, e.g. theatre-mode */ - -/* Keys for special action keys (hot keys) */ -/* Virtual terminals on some operating systems */ -#define XKB_KEY_XF86Switch_VT_1 0x1008FE01 -#define XKB_KEY_XF86Switch_VT_2 0x1008FE02 -#define XKB_KEY_XF86Switch_VT_3 0x1008FE03 -#define XKB_KEY_XF86Switch_VT_4 0x1008FE04 -#define XKB_KEY_XF86Switch_VT_5 0x1008FE05 -#define XKB_KEY_XF86Switch_VT_6 0x1008FE06 -#define XKB_KEY_XF86Switch_VT_7 0x1008FE07 -#define XKB_KEY_XF86Switch_VT_8 0x1008FE08 -#define XKB_KEY_XF86Switch_VT_9 0x1008FE09 -#define XKB_KEY_XF86Switch_VT_10 0x1008FE0A -#define XKB_KEY_XF86Switch_VT_11 0x1008FE0B -#define XKB_KEY_XF86Switch_VT_12 0x1008FE0C - -#define XKB_KEY_XF86Ungrab 0x1008FE20 /* force ungrab */ -#define XKB_KEY_XF86ClearGrab 0x1008FE21 /* kill application with grab */ -#define XKB_KEY_XF86Next_VMode 0x1008FE22 /* next video mode available */ -#define XKB_KEY_XF86Prev_VMode 0x1008FE23 /* prev. video mode available */ -#define XKB_KEY_XF86LogWindowTree 0x1008FE24 /* print window tree to log */ -#define XKB_KEY_XF86LogGrabInfo 0x1008FE25 /* print all active grabs to log */ -/* - * Copyright (c) 1991, Oracle and/or its affiliates. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -/************************************************************ - -Copyright 1991, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -***********************************************************/ - -/* - * Floating Accent - */ - -#define XKB_KEY_SunFA_Grave 0x1005FF00 -#define XKB_KEY_SunFA_Circum 0x1005FF01 -#define XKB_KEY_SunFA_Tilde 0x1005FF02 -#define XKB_KEY_SunFA_Acute 0x1005FF03 -#define XKB_KEY_SunFA_Diaeresis 0x1005FF04 -#define XKB_KEY_SunFA_Cedilla 0x1005FF05 - -/* - * Miscellaneous Functions - */ - -#define XKB_KEY_SunF36 0x1005FF10 /* Labeled F11 */ -#define XKB_KEY_SunF37 0x1005FF11 /* Labeled F12 */ - -#define XKB_KEY_SunSys_Req 0x1005FF60 -#define XKB_KEY_SunPrint_Screen 0x0000FF61 /* Same as XK_Print */ - -/* - * International & Multi-Key Character Composition - */ - -#define XKB_KEY_SunCompose 0x0000FF20 /* Same as XK_Multi_key */ -#define XKB_KEY_SunAltGraph 0x0000FF7E /* Same as XK_Mode_switch */ - -/* - * Cursor Control - */ - -#define XKB_KEY_SunPageUp 0x0000FF55 /* Same as XK_Prior */ -#define XKB_KEY_SunPageDown 0x0000FF56 /* Same as XK_Next */ - -/* - * Open Look Functions - */ - -#define XKB_KEY_SunUndo 0x0000FF65 /* Same as XK_Undo */ -#define XKB_KEY_SunAgain 0x0000FF66 /* Same as XK_Redo */ -#define XKB_KEY_SunFind 0x0000FF68 /* Same as XK_Find */ -#define XKB_KEY_SunStop 0x0000FF69 /* Same as XK_Cancel */ -#define XKB_KEY_SunProps 0x1005FF70 -#define XKB_KEY_SunFront 0x1005FF71 -#define XKB_KEY_SunCopy 0x1005FF72 -#define XKB_KEY_SunOpen 0x1005FF73 -#define XKB_KEY_SunPaste 0x1005FF74 -#define XKB_KEY_SunCut 0x1005FF75 - -#define XKB_KEY_SunPowerSwitch 0x1005FF76 -#define XKB_KEY_SunAudioLowerVolume 0x1005FF77 -#define XKB_KEY_SunAudioMute 0x1005FF78 -#define XKB_KEY_SunAudioRaiseVolume 0x1005FF79 -#define XKB_KEY_SunVideoDegauss 0x1005FF7A -#define XKB_KEY_SunVideoLowerBrightness 0x1005FF7B -#define XKB_KEY_SunVideoRaiseBrightness 0x1005FF7C -#define XKB_KEY_SunPowerSwitchShift 0x1005FF7D -/*********************************************************** - -Copyright 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -/* - * DEC private keysyms - * (29th bit set) - */ - -/* two-key compose sequence initiators, chosen to map to Latin1 characters */ - -#define XKB_KEY_Dring_accent 0x1000FEB0 -#define XKB_KEY_Dcircumflex_accent 0x1000FE5E -#define XKB_KEY_Dcedilla_accent 0x1000FE2C -#define XKB_KEY_Dacute_accent 0x1000FE27 -#define XKB_KEY_Dgrave_accent 0x1000FE60 -#define XKB_KEY_Dtilde 0x1000FE7E -#define XKB_KEY_Ddiaeresis 0x1000FE22 - -/* special keysym for LK2** "Remove" key on editing keypad */ - -#define XKB_KEY_DRemove 0x1000FF00 /* Remove */ -/* - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the names of Hewlett Packard -or Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -*/ - - - -#define XKB_KEY_hpClearLine 0x1000FF6F -#define XKB_KEY_hpInsertLine 0x1000FF70 -#define XKB_KEY_hpDeleteLine 0x1000FF71 -#define XKB_KEY_hpInsertChar 0x1000FF72 -#define XKB_KEY_hpDeleteChar 0x1000FF73 -#define XKB_KEY_hpBackTab 0x1000FF74 -#define XKB_KEY_hpKP_BackTab 0x1000FF75 -#define XKB_KEY_hpModelock1 0x1000FF48 -#define XKB_KEY_hpModelock2 0x1000FF49 -#define XKB_KEY_hpReset 0x1000FF6C -#define XKB_KEY_hpSystem 0x1000FF6D -#define XKB_KEY_hpUser 0x1000FF6E -#define XKB_KEY_hpmute_acute 0x100000A8 -#define XKB_KEY_hpmute_grave 0x100000A9 -#define XKB_KEY_hpmute_asciicircum 0x100000AA -#define XKB_KEY_hpmute_diaeresis 0x100000AB -#define XKB_KEY_hpmute_asciitilde 0x100000AC -#define XKB_KEY_hplira 0x100000AF -#define XKB_KEY_hpguilder 0x100000BE -#define XKB_KEY_hpYdiaeresis 0x100000EE -#define XKB_KEY_hpIO 0x100000EE -#define XKB_KEY_hplongminus 0x100000F6 -#define XKB_KEY_hpblock 0x100000FC - - - -#define XKB_KEY_osfCopy 0x1004FF02 -#define XKB_KEY_osfCut 0x1004FF03 -#define XKB_KEY_osfPaste 0x1004FF04 -#define XKB_KEY_osfBackTab 0x1004FF07 -#define XKB_KEY_osfBackSpace 0x1004FF08 -#define XKB_KEY_osfClear 0x1004FF0B -#define XKB_KEY_osfEscape 0x1004FF1B -#define XKB_KEY_osfAddMode 0x1004FF31 -#define XKB_KEY_osfPrimaryPaste 0x1004FF32 -#define XKB_KEY_osfQuickPaste 0x1004FF33 -#define XKB_KEY_osfPageLeft 0x1004FF40 -#define XKB_KEY_osfPageUp 0x1004FF41 -#define XKB_KEY_osfPageDown 0x1004FF42 -#define XKB_KEY_osfPageRight 0x1004FF43 -#define XKB_KEY_osfActivate 0x1004FF44 -#define XKB_KEY_osfMenuBar 0x1004FF45 -#define XKB_KEY_osfLeft 0x1004FF51 -#define XKB_KEY_osfUp 0x1004FF52 -#define XKB_KEY_osfRight 0x1004FF53 -#define XKB_KEY_osfDown 0x1004FF54 -#define XKB_KEY_osfEndLine 0x1004FF57 -#define XKB_KEY_osfBeginLine 0x1004FF58 -#define XKB_KEY_osfEndData 0x1004FF59 -#define XKB_KEY_osfBeginData 0x1004FF5A -#define XKB_KEY_osfPrevMenu 0x1004FF5B -#define XKB_KEY_osfNextMenu 0x1004FF5C -#define XKB_KEY_osfPrevField 0x1004FF5D -#define XKB_KEY_osfNextField 0x1004FF5E -#define XKB_KEY_osfSelect 0x1004FF60 -#define XKB_KEY_osfInsert 0x1004FF63 -#define XKB_KEY_osfUndo 0x1004FF65 -#define XKB_KEY_osfMenu 0x1004FF67 -#define XKB_KEY_osfCancel 0x1004FF69 -#define XKB_KEY_osfHelp 0x1004FF6A -#define XKB_KEY_osfSelectAll 0x1004FF71 -#define XKB_KEY_osfDeselectAll 0x1004FF72 -#define XKB_KEY_osfReselect 0x1004FF73 -#define XKB_KEY_osfExtend 0x1004FF74 -#define XKB_KEY_osfRestore 0x1004FF78 -#define XKB_KEY_osfDelete 0x1004FFFF - - - -/************************************************************** - * The use of the following macros is deprecated. - * They are listed below only for backwards compatibility. - */ -#define XKB_KEY_Reset 0x1000FF6C -#define XKB_KEY_System 0x1000FF6D -#define XKB_KEY_User 0x1000FF6E -#define XKB_KEY_ClearLine 0x1000FF6F -#define XKB_KEY_InsertLine 0x1000FF70 -#define XKB_KEY_DeleteLine 0x1000FF71 -#define XKB_KEY_InsertChar 0x1000FF72 -#define XKB_KEY_DeleteChar 0x1000FF73 -#define XKB_KEY_BackTab 0x1000FF74 -#define XKB_KEY_KP_BackTab 0x1000FF75 -#define XKB_KEY_Ext16bit_L 0x1000FF76 -#define XKB_KEY_Ext16bit_R 0x1000FF77 -#define XKB_KEY_mute_acute 0x100000a8 -#define XKB_KEY_mute_grave 0x100000a9 -#define XKB_KEY_mute_asciicircum 0x100000aa -#define XKB_KEY_mute_diaeresis 0x100000ab -#define XKB_KEY_mute_asciitilde 0x100000ac -#define XKB_KEY_lira 0x100000af -#define XKB_KEY_guilder 0x100000be -#define XKB_KEY_IO 0x100000ee -#define XKB_KEY_longminus 0x100000f6 -#define XKB_KEY_block 0x100000fc - - - -#endif diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h deleted file mode 100644 index ecb551ff10..0000000000 --- a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-names.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#ifndef _XKBCOMMON_NAMES_H -#define _XKBCOMMON_NAMES_H - -/** - * @file - * @brief Predefined names for common modifiers and LEDs. - */ - -#define XKB_MOD_NAME_SHIFT "Shift" -#define XKB_MOD_NAME_CAPS "Lock" -#define XKB_MOD_NAME_CTRL "Control" -#define XKB_MOD_NAME_ALT "Mod1" -#define XKB_MOD_NAME_NUM "Mod2" -#define XKB_MOD_NAME_LOGO "Mod4" - -#define XKB_LED_NAME_CAPS "Caps Lock" -#define XKB_LED_NAME_NUM "Num Lock" -#define XKB_LED_NAME_SCROLL "Scroll Lock" - -#endif diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-x11.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-x11.h deleted file mode 100644 index cf244d2559..0000000000 --- a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon-x11.h +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright © 2013 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef _XKBCOMMON_X11_H -#define _XKBCOMMON_X11_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file - * libxkbcommon-x11 API - Additional X11 support for xkbcommon. - */ - -/** - * @defgroup x11 X11 support - * Additional X11 support for xkbcommon. - * @since 0.4.0 - * - * @{ - */ - -/** - * @page x11-overview Overview - * @parblock - * - * The xkbcommon-x11 module provides a means for creating an xkb_keymap - * corresponding to the currently active keymap on the X server. To do - * so, it queries the XKB X11 extension using the xcb-xkb library. It - * can be used as a replacement for Xlib's keyboard handling. - * - * Following is an example workflow using xkbcommon-x11. A complete - * example may be found in the test/interactive-x11.c file in the - * xkbcommon source repository. On startup: - * - * 1. Connect to the X server using xcb_connect(). - * 2. Setup the XKB X11 extension. You can do this either by using the - * xcb_xkb_use_extension() request directly, or by using the - * xkb_x11_setup_xkb_extension() helper function. - * - * The XKB extension supports using separate keymaps and states for - * different keyboard devices. The devices are identified by an integer - * device ID and are managed by another X11 extension, XInput. The - * original X11 protocol only had one keyboard device, called the "core - * keyboard", which is still supported as a "virtual device". - * - * 3. We will use the core keyboard as an example. To get its device ID, - * use either the xcb_xkb_get_device_info() request directly, or the - * xkb_x11_get_core_keyboard_device_id() helper function. - * 4. Create an initial xkb_keymap for this device, using the - * xkb_x11_keymap_new_from_device() function. - * 5. Create an initial xkb_state for this device, using the - * xkb_x11_state_new_from_device() function. - * - * @note At this point, you may consider setting various XKB controls and - * XKB per-client flags. For example, enabling detectable autorepeat: \n - * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Detectable_Autorepeat - * - * Next, you need to react to state changes (e.g. a modifier was pressed, - * the layout was changed) and to keymap changes (e.g. a tool like xkbcomp, - * setxkbmap or xmodmap was used): - * - * 6. Select to listen to at least the following XKB events: - * NewKeyboardNotify, MapNotify, StateNotify; using the - * xcb_xkb_select_events_aux() request. - * 7. When NewKeyboardNotify or MapNotify are received, recreate the - * xkb_keymap and xkb_state as described above. - * 8. When StateNotify is received, update the xkb_state accordingly - * using the xkb_state_update_mask() function. - * - * @note It is also possible to use the KeyPress/KeyRelease @p state - * field to find the effective modifier and layout state, instead of - * using XkbStateNotify: \n - * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Computing_A_State_Field_from_an_XKB_State - * \n However, XkbStateNotify is more accurate. - * - * @note There is no need to call xkb_state_update_key(); the state is - * already synchronized. - * - * Finally, when a key event is received, you can use ordinary xkbcommon - * functions, like xkb_state_key_get_one_sym() and xkb_state_key_get_utf8(), - * as you normally would. - * - * @endparblock - */ - -/** - * The minimal compatible major version of the XKB X11 extension which - * this library can use. - */ -#define XKB_X11_MIN_MAJOR_XKB_VERSION 1 -/** - * The minimal compatible minor version of the XKB X11 extension which - * this library can use (for the minimal major version). - */ -#define XKB_X11_MIN_MINOR_XKB_VERSION 0 - -/** Flags for the xkb_x11_setup_xkb_extension() function. */ -enum xkb_x11_setup_xkb_extension_flags { - /** Do not apply any flags. */ - XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS = 0 -}; - -/** - * Setup the XKB X11 extension for this X client. - * - * The xkbcommon-x11 library uses various XKB requests. Before doing so, - * an X client must notify the server that it will be using the extension. - * This function (or an XCB equivalent) must be called before any other - * function in this library is used. - * - * Some X servers may not support or disable the XKB extension. If you - * want to support such servers, you need to use a different fallback. - * - * You may call this function several times; it is idempotent. - * - * @param connection - * An XCB connection to the X server. - * @param major_xkb_version - * See @p minor_xkb_version. - * @param minor_xkb_version - * The XKB extension version to request. To operate correctly, you - * must have (major_xkb_version, minor_xkb_version) >= - * (XKB_X11_MIN_MAJOR_XKB_VERSION, XKB_X11_MIN_MINOR_XKB_VERSION), - * though this is not enforced. - * @param flags - * Optional flags, or 0. - * @param[out] major_xkb_version_out - * See @p minor_xkb_version_out. - * @param[out] minor_xkb_version_out - * Backfilled with the compatible XKB extension version numbers picked - * by the server. Can be NULL. - * @param[out] base_event_out - * Backfilled with the XKB base (also known as first) event code, needed - * to distinguish XKB events. Can be NULL. - * @param[out] base_error_out - * Backfilled with the XKB base (also known as first) error code, needed - * to distinguish XKB errors. Can be NULL. - * - * @returns 1 on success, or 0 on failure. - */ -int -xkb_x11_setup_xkb_extension(xcb_connection_t *connection, - uint16_t major_xkb_version, - uint16_t minor_xkb_version, - enum xkb_x11_setup_xkb_extension_flags flags, - uint16_t *major_xkb_version_out, - uint16_t *minor_xkb_version_out, - uint8_t *base_event_out, - uint8_t *base_error_out); - -/** - * Get the keyboard device ID of the core X11 keyboard. - * - * @param connection An XCB connection to the X server. - * - * @returns A device ID which may be used with other xkb_x11_* functions, - * or -1 on failure. - */ -int32_t -xkb_x11_get_core_keyboard_device_id(xcb_connection_t *connection); - -/** - * Create a keymap from an X11 keyboard device. - * - * This function queries the X server with various requests, fetches the - * details of the active keymap on a keyboard device, and creates an - * xkb_keymap from these details. - * - * @param context - * The context in which to create the keymap. - * @param connection - * An XCB connection to the X server. - * @param device_id - * An XInput device ID (in the range 0-127) with input class KEY. - * Passing values outside of this range is an error (the XKB protocol - * predates the XInput2 protocol, which first allowed IDs > 127). - * @param flags - * Optional flags for the keymap, or 0. - * - * @returns A keymap retrieved from the X server, or NULL on failure. - * - * @memberof xkb_keymap - */ -struct xkb_keymap * -xkb_x11_keymap_new_from_device(struct xkb_context *context, - xcb_connection_t *connection, - int32_t device_id, - enum xkb_keymap_compile_flags flags); - -/** - * Create a new keyboard state object from an X11 keyboard device. - * - * This function is the same as xkb_state_new(), only pre-initialized - * with the state of the device at the time this function is called. - * - * @param keymap - * The keymap for which to create the state. - * @param connection - * An XCB connection to the X server. - * @param device_id - * An XInput 1 device ID (in the range 0-255) with input class KEY. - * Passing values outside of this range is an error. - * - * @returns A new keyboard state object, or NULL on failure. - * - * @memberof xkb_state - */ -struct xkb_state * -xkb_x11_state_new_from_device(struct xkb_keymap *keymap, - xcb_connection_t *connection, - int32_t device_id); - -/** @} */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _XKBCOMMON_X11_H */ diff --git a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h b/src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h deleted file mode 100644 index c28123f95e..0000000000 --- a/src/3rdparty/xkbcommon/xkbcommon/xkbcommon.h +++ /dev/null @@ -1,1868 +0,0 @@ -/* - * Copyright 1985, 1987, 1990, 1998 The Open Group - * Copyright 2008 Dan Nicholson - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the names of the authors or their - * institutions shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization from the authors. - */ - -/************************************************************ - * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of Silicon Graphics not be - * used in advertising or publicity pertaining to distribution - * of the software without specific prior written permission. - * Silicon Graphics makes no representation about the suitability - * of this software for any purpose. It is provided "as is" - * without any express or implied warranty. - * - * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - * THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - ********************************************************/ - -/* - * Copyright © 2009-2012 Daniel Stone - * Copyright © 2012 Intel Corporation - * Copyright © 2012 Ran Benita - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: Daniel Stone - */ - -#ifndef _XKBCOMMON_H_ -#define _XKBCOMMON_H_ - -#include -#include -#include - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file - * Main libxkbcommon API. - */ - -/** - * @struct xkb_context - * Opaque top level library context object. - * - * The context contains various general library data and state, like - * logging level and include paths. - * - * Objects are created in a specific context, and multiple contexts may - * coexist simultaneously. Objects from different contexts are completely - * separated and do not share any memory or state. - */ -struct xkb_context; - -/** - * @struct xkb_keymap - * Opaque compiled keymap object. - * - * The keymap object holds all of the static keyboard information obtained - * from compiling XKB files. - * - * A keymap is immutable after it is created (besides reference counts, etc.); - * if you need to change it, you must create a new one. - */ -struct xkb_keymap; - -/** - * @struct xkb_state - * Opaque keyboard state object. - * - * State objects contain the active state of a keyboard (or keyboards), such - * as the currently effective layout and the active modifiers. It acts as a - * simple state machine, wherein key presses and releases are the input, and - * key symbols (keysyms) are the output. - */ -struct xkb_state; - -/** - * A number used to represent a physical key on a keyboard. - * - * A standard PC-compatible keyboard might have 102 keys. An appropriate - * keymap would assign each of them a keycode, by which the user should - * refer to the key throughout the library. - * - * Historically, the X11 protocol, and consequentially the XKB protocol, - * assign only 8 bits for keycodes. This limits the number of different - * keys that can be used simultaneously in a single keymap to 256 - * (disregarding other limitations). This library does not share this limit; - * keycodes beyond 255 ('extended keycodes') are not treated specially. - * Keymaps and applications which are compatible with X11 should not use - * these keycodes. - * - * The values of specific keycodes are determined by the keymap and the - * underlying input system. For example, with an X11-compatible keymap - * and Linux evdev scan codes (see linux/input.h), a fixed offset is used: - * - * The keymap defines a canonical name for each key, plus possible aliases. - * Historically, the XKB protocol restricts these names to at most 4 (ASCII) - * characters, but this library does not share this limit. - * - * @code - * xkb_keycode_t keycode_A = KEY_A + 8; - * @endcode - * - * @sa xkb_keycode_is_legal_ext() xkb_keycode_is_legal_x11() - */ -typedef uint32_t xkb_keycode_t; - -/** - * A number used to represent the symbols generated from a key on a keyboard. - * - * A key, represented by a keycode, may generate different symbols according - * to keyboard state. For example, on a QWERTY keyboard, pressing the key - * labled \ generates the symbol 'a'. If the Shift key is held, it - * generates the symbol 'A'. If a different layout is used, say Greek, - * it generates the symbol 'α'. And so on. - * - * Each such symbol is represented by a keysym. Note that keysyms are - * somewhat more general, in that they can also represent some "function", - * such as "Left" or "Right" for the arrow keys. For more information, - * see: - * https://www.x.org/releases/current/doc/xproto/x11protocol.html#keysym_encoding - * - * Specifically named keysyms can be found in the - * xkbcommon/xkbcommon-keysyms.h header file. Their name does not include - * the XKB_KEY_ prefix. - * - * Besides those, any Unicode/ISO 10646 character in the range U0100 to - * U10FFFF can be represented by a keysym value in the range 0x01000100 to - * 0x0110FFFF. The name of Unicode keysyms is "U", e.g. "UA1B2". - * - * The name of other unnamed keysyms is the hexadecimal representation of - * their value, e.g. "0xabcd1234". - * - * Keysym names are case-sensitive. - */ -typedef uint32_t xkb_keysym_t; - -/** - * Index of a keyboard layout. - * - * The layout index is a state component which detemines which keyboard - * layout is active. These may be different alphabets, different key - * arrangements, etc. - * - * Layout indices are consecutive. The first layout has index 0. - * - * Each layout is not required to have a name, and the names are not - * guaranteed to be unique (though they are usually provided and unique). - * Therefore, it is not safe to use the name as a unique identifier for a - * layout. Layout names are case-sensitive. - * - * Layouts are also called "groups" by XKB. - * - * @sa xkb_keymap_num_layouts() xkb_keymap_num_layouts_for_key() - */ -typedef uint32_t xkb_layout_index_t; -/** A mask of layout indices. */ -typedef uint32_t xkb_layout_mask_t; - -/** - * Index of a shift level. - * - * Any key, in any layout, can have several shift levels. Each - * shift level can assign different keysyms to the key. The shift level - * to use is chosen according to the current keyboard state; for example, - * if no keys are pressed, the first level may be used; if the Left Shift - * key is pressed, the second; if Num Lock is pressed, the third; and - * many such combinations are possible (see xkb_mod_index_t). - * - * Level indices are consecutive. The first level has index 0. - */ -typedef uint32_t xkb_level_index_t; - -/** - * Index of a modifier. - * - * A @e modifier is a state component which changes the way keys are - * interpreted. A keymap defines a set of modifiers, such as Alt, Shift, - * Num Lock or Meta, and specifies which keys may @e activate which - * modifiers (in a many-to-many relationship, i.e. a key can activate - * several modifiers, and a modifier may be activated by several keys. - * Different keymaps do this differently). - * - * When retrieving the keysyms for a key, the active modifier set is - * consulted; this detemines the correct shift level to use within the - * currently active layout (see xkb_level_index_t). - * - * Modifier indices are consecutive. The first modifier has index 0. - * - * Each modifier must have a name, and the names are unique. Therefore, it - * is safe to use the name as a unique identifier for a modifier. The names - * of some common modifiers are provided in the xkbcommon/xkbcommon-names.h - * header file. Modifier names are case-sensitive. - * - * @sa xkb_keymap_num_mods() - */ -typedef uint32_t xkb_mod_index_t; -/** A mask of modifier indices. */ -typedef uint32_t xkb_mod_mask_t; - -/** - * Index of a keyboard LED. - * - * LEDs are logical objects which may be @e active or @e inactive. They - * typically correspond to the lights on the keyboard. Their state is - * determined by the current keyboard state. - * - * LED indices are non-consecutive. The first LED has index 0. - * - * Each LED must have a name, and the names are unique. Therefore, - * it is safe to use the name as a unique identifier for a LED. The names - * of some common LEDs are provided in the xkbcommon/xkbcommon-names.h - * header file. LED names are case-sensitive. - * - * @warning A given keymap may specify an exact index for a given LED. - * Therefore, LED indexing is not necessarily sequential, as opposed to - * modifiers and layouts. This means that when iterating over the LEDs - * in a keymap using e.g. xkb_keymap_num_leds(), some indices might be - * invalid. Given such an index, functions like xkb_keymap_led_get_name() - * will return NULL, and xkb_state_led_index_is_active() will return -1. - * - * LEDs are also called "indicators" by XKB. - * - * @sa xkb_keymap_num_leds() - */ -typedef uint32_t xkb_led_index_t; -/** A mask of LED indices. */ -typedef uint32_t xkb_led_mask_t; - -#define XKB_KEYCODE_INVALID (0xffffffff) -#define XKB_LAYOUT_INVALID (0xffffffff) -#define XKB_LEVEL_INVALID (0xffffffff) -#define XKB_MOD_INVALID (0xffffffff) -#define XKB_LED_INVALID (0xffffffff) - -#define XKB_KEYCODE_MAX (0xffffffff - 1) - -/** - * Test whether a value is a valid extended keycode. - * @sa xkb_keycode_t - **/ -#define xkb_keycode_is_legal_ext(key) (key <= XKB_KEYCODE_MAX) - -/** - * Test whether a value is a valid X11 keycode. - * @sa xkb_keycode_t - */ -#define xkb_keycode_is_legal_x11(key) (key >= 8 && key <= 255) - -/** - * Names to compile a keymap with, also known as RMLVO. - * - * The names are the common configuration values by which a user picks - * a keymap. - * - * If the entire struct is NULL, then each field is taken to be NULL. - * You should prefer passing NULL instead of choosing your own defaults. - */ -struct xkb_rule_names { - /** - * The rules file to use. The rules file describes how to interpret - * the values of the model, layout, variant and options fields. - * - * If NULL or the empty string "", a default value is used. - * If the XKB_DEFAULT_RULES environment variable is set, it is used - * as the default. Otherwise the system default is used. - */ - const char *rules; - /** - * The keyboard model by which to interpret keycodes and LEDs. - * - * If NULL or the empty string "", a default value is used. - * If the XKB_DEFAULT_MODEL environment variable is set, it is used - * as the default. Otherwise the system default is used. - */ - const char *model; - /** - * A comma separated list of layouts (languages) to include in the - * keymap. - * - * If NULL or the empty string "", a default value is used. - * If the XKB_DEFAULT_LAYOUT environment variable is set, it is used - * as the default. Otherwise the system default is used. - */ - const char *layout; - /** - * A comma separated list of variants, one per layout, which may - * modify or augment the respective layout in various ways. - * - * If NULL or the empty string "", and a default value is also used - * for the layout, a default value is used. Otherwise no variant is - * used. - * If the XKB_DEFAULT_VARIANT environment variable is set, it is used - * as the default. Otherwise the system default is used. - */ - const char *variant; - /** - * A comma separated list of options, through which the user specifies - * non-layout related preferences, like which key combinations are used - * for switching layouts, or which key is the Compose key. - * - * If NULL, a default value is used. If the empty string "", no - * options are used. - * If the XKB_DEFAULT_OPTIONS environment variable is set, it is used - * as the default. Otherwise the system default is used. - */ - const char *options; -}; - -/** - * @defgroup keysyms Keysyms - * Utility functions related to keysyms. - * - * @{ - */ - -/** - * @page keysym-transformations Keysym Transformations - * - * Keysym translation is subject to several "keysym transformations", - * as described in the XKB specification. These are: - * - * - Capitalization transformation. If the Caps Lock modifier is - * active and was not consumed by the translation process, a single - * keysym is transformed to its upper-case form (if applicable). - * Similarly, the UTF-8/UTF-32 string produced is capitalized. - * - * This is described in: - * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Lock_Modifier - * - * - Control transformation. If the Control modifier is active and - * was not consumed by the translation process, the string produced - * is transformed to its matching ASCII control character (if - * applicable). Keysyms are not affected. - * - * This is described in: - * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Control_Modifier - * - * Each relevant function discusses which transformations it performs. - * - * These transformations are not applicable when a key produces multiple - * keysyms. - */ - - -/** - * Get the name of a keysym. - * - * For a description of how keysyms are named, see @ref xkb_keysym_t. - * - * @param[in] keysym The keysym. - * @param[out] buffer A string buffer to write the name into. - * @param[in] size Size of the buffer. - * - * @warning If the buffer passed is too small, the string is truncated - * (though still NUL-terminated); a size of at least 64 bytes is recommended. - * - * @returns The number of bytes in the name, excluding the NUL byte. If - * the keysym is invalid, returns -1. - * - * You may check if truncation has occurred by comparing the return value - * with the length of buffer, similarly to the snprintf(3) function. - * - * @sa xkb_keysym_t - */ -int -xkb_keysym_get_name(xkb_keysym_t keysym, char *buffer, size_t size); - -/** Flags for xkb_keysym_from_name(). */ -enum xkb_keysym_flags { - /** Do not apply any flags. */ - XKB_KEYSYM_NO_FLAGS = 0, - /** Find keysym by case-insensitive search. */ - XKB_KEYSYM_CASE_INSENSITIVE = (1 << 0) -}; - -/** - * Get a keysym from its name. - * - * @param name The name of a keysym. See remarks in xkb_keysym_get_name(); - * this function will accept any name returned by that function. - * @param flags A set of flags controlling how the search is done. If - * invalid flags are passed, this will fail with XKB_KEY_NoSymbol. - * - * If you use the XKB_KEYSYM_CASE_INSENSITIVE flag and two keysym names - * differ only by case, then the lower-case keysym is returned. For - * instance, for KEY_a and KEY_A, this function would return KEY_a for the - * case-insensitive search. If this functionality is needed, it is - * recommended to first call this function without this flag; and if that - * fails, only then to try with this flag, while possibly warning the user - * he had misspelled the name, and might get wrong results. - * - * Case folding is done according to the C locale; the current locale is not - * consulted. - * - * @returns The keysym. If the name is invalid, returns XKB_KEY_NoSymbol. - * - * @sa xkb_keysym_t - */ -xkb_keysym_t -xkb_keysym_from_name(const char *name, enum xkb_keysym_flags flags); - -/** - * Get the Unicode/UTF-8 representation of a keysym. - * - * @param[in] keysym The keysym. - * @param[out] buffer A buffer to write the UTF-8 string into. - * @param[in] size The size of buffer. Must be at least 7. - * - * @returns The number of bytes written to the buffer (including the - * terminating byte). If the keysym does not have a Unicode - * representation, returns 0. If the buffer is too small, returns -1. - * - * This function does not perform any @ref keysym-transformations. - * Therefore, prefer to use xkb_state_key_get_utf8() if possible. - * - * @sa xkb_state_key_get_utf8() - */ -int -xkb_keysym_to_utf8(xkb_keysym_t keysym, char *buffer, size_t size); - -/** - * Get the Unicode/UTF-32 representation of a keysym. - * - * @returns The Unicode/UTF-32 representation of keysym, which is also - * compatible with UCS-4. If the keysym does not have a Unicode - * representation, returns 0. - * - * This function does not perform any @ref keysym-transformations. - * Therefore, prefer to use xkb_state_key_get_utf32() if possible. - * - * @sa xkb_state_key_get_utf32() - */ -uint32_t -xkb_keysym_to_utf32(xkb_keysym_t keysym); - -/** - * Convert a keysym to its uppercase form. - * - * If there is no such form, the keysym is returned unchanged. - * - * The conversion rules may be incomplete; prefer to work with the Unicode - * representation instead, when possible. - */ -xkb_keysym_t -xkb_keysym_to_upper(xkb_keysym_t ks); - -/** - * Convert a keysym to its lowercase form. - * - * The conversion rules may be incomplete; prefer to work with the Unicode - * representation instead, when possible. - */ -xkb_keysym_t -xkb_keysym_to_lower(xkb_keysym_t ks); - -/** @} */ - -/** - * @defgroup context Library Context - * Creating, destroying and using library contexts. - * - * Every keymap compilation request must have a context associated with - * it. The context keeps around state such as the include path. - * - * @{ - */ - -/** - * @page envvars Environment Variables - * - * The user may set some environment variables which affect the library: - * - * - `XKB_CONFIG_ROOT`, `HOME` - see @ref include-path. - * - `XKB_LOG_LEVEL` - see xkb_context_set_log_level(). - * - `XKB_LOG_VERBOSITY` - see xkb_context_set_log_verbosity(). - * - `XKB_DEFAULT_RULES`, `XKB_DEFAULT_MODEL`, `XKB_DEFAULT_LAYOUT`, - * `XKB_DEFAULT_VARIANT`, `XKB_DEFAULT_OPTIONS` - see xkb_rule_names. - */ - -/** Flags for context creation. */ -enum xkb_context_flags { - /** Do not apply any context flags. */ - XKB_CONTEXT_NO_FLAGS = 0, - /** Create this context with an empty include path. */ - XKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0), - /** - * Don't take RMLVO names from the environment. - * @since 0.3.0 - */ - XKB_CONTEXT_NO_ENVIRONMENT_NAMES = (1 << 1) -}; - -/** - * Create a new context. - * - * @param flags Optional flags for the context, or 0. - * - * @returns A new context, or NULL on failure. - * - * @memberof xkb_context - */ -struct xkb_context * -xkb_context_new(enum xkb_context_flags flags); - -/** - * Take a new reference on a context. - * - * @returns The passed in context. - * - * @memberof xkb_context - */ -struct xkb_context * -xkb_context_ref(struct xkb_context *context); - -/** - * Release a reference on a context, and possibly free it. - * - * @param context The context. If it is NULL, this function does nothing. - * - * @memberof xkb_context - */ -void -xkb_context_unref(struct xkb_context *context); - -/** - * Store custom user data in the context. - * - * This may be useful in conjunction with xkb_context_set_log_fn() or other - * callbacks. - * - * @memberof xkb_context - */ -void -xkb_context_set_user_data(struct xkb_context *context, void *user_data); - -/** - * Retrieves stored user data from the context. - * - * @returns The stored user data. If the user data wasn't set, or the - * passed in context is NULL, returns NULL. - * - * This may be useful to access private user data from callbacks like a - * custom logging function. - * - * @memberof xkb_context - **/ -void * -xkb_context_get_user_data(struct xkb_context *context); - -/** @} */ - -/** - * @defgroup include-path Include Paths - * Manipulating the include paths in a context. - * - * The include paths are the file-system paths that are searched when an - * include statement is encountered during keymap compilation. - * - * The default include paths are: - * - The system XKB root, defined at library configuration time. - * If * the `XKB_CONFIG_ROOT` environment is defined, it is used instead. - * - The path `$HOME/.xkb`, where $HOME is the value of the environment - * variable `HOME`. - * - * @{ - */ - -/** - * Append a new entry to the context's include path. - * - * @returns 1 on success, or 0 if the include path could not be added or is - * inaccessible. - * - * @memberof xkb_context - */ -int -xkb_context_include_path_append(struct xkb_context *context, const char *path); - -/** - * Append the default include paths to the context's include path. - * - * @returns 1 on success, or 0 if the primary include path could not be added. - * - * @memberof xkb_context - */ -int -xkb_context_include_path_append_default(struct xkb_context *context); - -/** - * Reset the context's include path to the default. - * - * Removes all entries from the context's include path, and inserts the - * default paths. - * - * @returns 1 on success, or 0 if the primary include path could not be added. - * - * @memberof xkb_context - */ -int -xkb_context_include_path_reset_defaults(struct xkb_context *context); - -/** - * Remove all entries from the context's include path. - * - * @memberof xkb_context - */ -void -xkb_context_include_path_clear(struct xkb_context *context); - -/** - * Get the number of paths in the context's include path. - * - * @memberof xkb_context - */ -unsigned int -xkb_context_num_include_paths(struct xkb_context *context); - -/** - * Get a specific include path from the context's include path. - * - * @returns The include path at the specified index. If the index is - * invalid, returns NULL. - * - * @memberof xkb_context - */ -const char * -xkb_context_include_path_get(struct xkb_context *context, unsigned int index); - -/** @} */ - -/** - * @defgroup logging Logging Handling - * Manipulating how logging from this library is handled. - * - * @{ - */ - -/** Specifies a logging level. */ -enum xkb_log_level { - XKB_LOG_LEVEL_CRITICAL = 10, /**< Log critical internal errors only. */ - XKB_LOG_LEVEL_ERROR = 20, /**< Log all errors. */ - XKB_LOG_LEVEL_WARNING = 30, /**< Log warnings and errors. */ - XKB_LOG_LEVEL_INFO = 40, /**< Log information, warnings, and errors. */ - XKB_LOG_LEVEL_DEBUG = 50 /**< Log everything. */ -}; - -/** - * Set the current logging level. - * - * @param context The context in which to set the logging level. - * @param level The logging level to use. Only messages from this level - * and below will be logged. - * - * The default level is XKB_LOG_LEVEL_ERROR. The environment variable - * XKB_LOG_LEVEL, if set in the time the context was created, overrides the - * default value. It may be specified as a level number or name. - * - * @memberof xkb_context - */ -void -xkb_context_set_log_level(struct xkb_context *context, - enum xkb_log_level level); - -/** - * Get the current logging level. - * - * @memberof xkb_context - */ -enum xkb_log_level -xkb_context_get_log_level(struct xkb_context *context); - -/** - * Sets the current logging verbosity. - * - * The library can generate a number of warnings which are not helpful to - * ordinary users of the library. The verbosity may be increased if more - * information is desired (e.g. when developing a new keymap). - * - * The default verbosity is 0. The environment variable XKB_LOG_VERBOSITY, - * if set in the time the context was created, overrides the default value. - * - * @param context The context in which to use the set verbosity. - * @param verbosity The verbosity to use. Currently used values are - * 1 to 10, higher values being more verbose. 0 would result in no verbose - * messages being logged. - * - * Most verbose messages are of level XKB_LOG_LEVEL_WARNING or lower. - * - * @memberof xkb_context - */ -void -xkb_context_set_log_verbosity(struct xkb_context *context, int verbosity); - -/** - * Get the current logging verbosity of the context. - * - * @memberof xkb_context - */ -int -xkb_context_get_log_verbosity(struct xkb_context *context); - -/** - * Set a custom function to handle logging messages. - * - * @param context The context in which to use the set logging function. - * @param log_fn The function that will be called for logging messages. - * Passing NULL restores the default function, which logs to stderr. - * - * By default, log messages from this library are printed to stderr. This - * function allows you to replace the default behavior with a custom - * handler. The handler is only called with messages which match the - * current logging level and verbosity settings for the context. - * level is the logging level of the message. @a format and @a args are - * the same as in the vprintf(3) function. - * - * You may use xkb_context_set_user_data() on the context, and then call - * xkb_context_get_user_data() from within the logging function to provide - * it with additional private context. - * - * @memberof xkb_context - */ -void -xkb_context_set_log_fn(struct xkb_context *context, - void (*log_fn)(struct xkb_context *context, - enum xkb_log_level level, - const char *format, va_list args)); - -/** @} */ - -/** - * @defgroup keymap Keymap Creation - * Creating and destroying keymaps. - * - * @{ - */ - -/** Flags for keymap compilation. */ -enum xkb_keymap_compile_flags { - /** Do not apply any flags. */ - XKB_KEYMAP_COMPILE_NO_FLAGS = 0 -}; - -/** - * Create a keymap from RMLVO names. - * - * The primary keymap entry point: creates a new XKB keymap from a set of - * RMLVO (Rules + Model + Layouts + Variants + Options) names. - * - * @param context The context in which to create the keymap. - * @param names The RMLVO names to use. See xkb_rule_names. - * @param flags Optional flags for the keymap, or 0. - * - * @returns A keymap compiled according to the RMLVO names, or NULL if - * the compilation failed. - * - * @sa xkb_rule_names - * @memberof xkb_keymap - */ -struct xkb_keymap * -xkb_keymap_new_from_names(struct xkb_context *context, - const struct xkb_rule_names *names, - enum xkb_keymap_compile_flags flags); - -/** The possible keymap formats. */ -enum xkb_keymap_format { - /** The current/classic XKB text format, as generated by xkbcomp -xkb. */ - XKB_KEYMAP_FORMAT_TEXT_V1 = 1 -}; - -/** - * Create a keymap from a keymap file. - * - * @param context The context in which to create the keymap. - * @param file The keymap file to compile. - * @param format The text format of the keymap file to compile. - * @param flags Optional flags for the keymap, or 0. - * - * @returns A keymap compiled from the given XKB keymap file, or NULL if - * the compilation failed. - * - * The file must contain a complete keymap. For example, in the - * XKB_KEYMAP_FORMAT_TEXT_V1 format, this means the file must contain one - * top level '%xkb_keymap' section, which in turn contains other required - * sections. - * - * @memberof xkb_keymap - */ -struct xkb_keymap * -xkb_keymap_new_from_file(struct xkb_context *context, FILE *file, - enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags); - -/** - * Create a keymap from a keymap string. - * - * This is just like xkb_keymap_new_from_file(), but instead of a file, gets - * the keymap as one enormous string. - * - * @see xkb_keymap_new_from_file() - * @memberof xkb_keymap - */ -struct xkb_keymap * -xkb_keymap_new_from_string(struct xkb_context *context, const char *string, - enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags); - -/** - * Create a keymap from a memory buffer. - * - * This is just like xkb_keymap_new_from_string(), but takes a length argument - * so the input string does not have to be zero-terminated. - * - * @see xkb_keymap_new_from_string() - * @memberof xkb_keymap - * @since 0.3.0 - */ -struct xkb_keymap * -xkb_keymap_new_from_buffer(struct xkb_context *context, const char *buffer, - size_t length, enum xkb_keymap_format format, - enum xkb_keymap_compile_flags flags); - -/** - * Take a new reference on a keymap. - * - * @returns The passed in keymap. - * - * @memberof xkb_keymap - */ -struct xkb_keymap * -xkb_keymap_ref(struct xkb_keymap *keymap); - -/** - * Release a reference on a keymap, and possibly free it. - * - * @param keymap The keymap. If it is NULL, this function does nothing. - * - * @memberof xkb_keymap - */ -void -xkb_keymap_unref(struct xkb_keymap *keymap); - -/** - * Get the keymap as a string in the format from which it was created. - * @sa xkb_keymap_get_as_string() - **/ -#define XKB_KEYMAP_USE_ORIGINAL_FORMAT ((enum xkb_keymap_format) -1) - -/** - * Get the compiled keymap as a string. - * - * @param keymap The keymap to get as a string. - * @param format The keymap format to use for the string. You can pass - * in the special value XKB_KEYMAP_USE_ORIGINAL_FORMAT to use the format - * from which the keymap was originally created. - * - * @returns The keymap as a NUL-terminated string, or NULL if unsuccessful. - * - * The returned string may be fed back into xkb_keymap_new_from_string() to get - * the exact same keymap (possibly in another process, etc.). - * - * The returned string is dynamically allocated and should be freed by the - * caller. - * - * @memberof xkb_keymap - */ -char * -xkb_keymap_get_as_string(struct xkb_keymap *keymap, - enum xkb_keymap_format format); - -/** @} */ - -/** - * @defgroup components Keymap Components - * Enumeration of state components in a keymap. - * - * @{ - */ - -/** - * Get the minimum keycode in the keymap. - * - * @sa xkb_keycode_t - * @memberof xkb_keymap - * @since 0.3.1 - */ -xkb_keycode_t -xkb_keymap_min_keycode(struct xkb_keymap *keymap); - -/** - * Get the maximum keycode in the keymap. - * - * @sa xkb_keycode_t - * @memberof xkb_keymap - * @since 0.3.1 - */ -xkb_keycode_t -xkb_keymap_max_keycode(struct xkb_keymap *keymap); - -/** - * The iterator used by xkb_keymap_key_for_each(). - * - * @sa xkb_keymap_key_for_each - * @memberof xkb_keymap - * @since 0.3.1 - */ -typedef void -(*xkb_keymap_key_iter_t)(struct xkb_keymap *keymap, xkb_keycode_t key, - void *data); - -/** - * Run a specified function for every valid keycode in the keymap. If a - * keymap is sparse, this function may be called fewer than - * (max_keycode - min_keycode + 1) times. - * - * @sa xkb_keymap_min_keycode() xkb_keymap_max_keycode() xkb_keycode_t - * @memberof xkb_keymap - * @since 0.3.1 - */ -void -xkb_keymap_key_for_each(struct xkb_keymap *keymap, xkb_keymap_key_iter_t iter, - void *data); - -/** - * Find the name of the key with the given keycode. - * - * This function always returns the canonical name of the key (see - * description in xkb_keycode_t). - * - * @returns The key name. If no key with this keycode exists, - * returns NULL. - * - * @sa xkb_keycode_t - * @memberof xkb_keymap - * @since 0.6.0 - */ -const char * -xkb_keymap_key_get_name(struct xkb_keymap *keymap, xkb_keycode_t key); - -/** - * Find the keycode of the key with the given name. - * - * The name can be either a canonical name or an alias. - * - * @returns The keycode. If no key with this name exists, - * returns XKB_KEYCODE_INVALID. - * - * @sa xkb_keycode_t - * @memberof xkb_keymap - * @since 0.6.0 - */ -xkb_keycode_t -xkb_keymap_key_by_name(struct xkb_keymap *keymap, const char *name); - -/** - * Get the number of modifiers in the keymap. - * - * @sa xkb_mod_index_t - * @memberof xkb_keymap - */ -xkb_mod_index_t -xkb_keymap_num_mods(struct xkb_keymap *keymap); - -/** - * Get the name of a modifier by index. - * - * @returns The name. If the index is invalid, returns NULL. - * - * @sa xkb_mod_index_t - * @memberof xkb_keymap - */ -const char * -xkb_keymap_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx); - -/** - * Get the index of a modifier by name. - * - * @returns The index. If no modifier with this name exists, returns - * XKB_MOD_INVALID. - * - * @sa xkb_mod_index_t - * @memberof xkb_keymap - */ -xkb_mod_index_t -xkb_keymap_mod_get_index(struct xkb_keymap *keymap, const char *name); - -/** - * Get the number of layouts in the keymap. - * - * @sa xkb_layout_index_t xkb_rule_names xkb_keymap_num_layouts_for_key() - * @memberof xkb_keymap - */ -xkb_layout_index_t -xkb_keymap_num_layouts(struct xkb_keymap *keymap); - -/** - * Get the name of a layout by index. - * - * @returns The name. If the index is invalid, or the layout does not have - * a name, returns NULL. - * - * @sa xkb_layout_index_t - * @memberof xkb_keymap - */ -const char * -xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx); - -/** - * Get the index of a layout by name. - * - * @returns The index. If no layout exists with this name, returns - * XKB_LAYOUT_INVALID. If more than one layout in the keymap has this name, - * returns the lowest index among them. - * - * @memberof xkb_keymap - */ -xkb_layout_index_t -xkb_keymap_layout_get_index(struct xkb_keymap *keymap, const char *name); - -/** - * Get the number of LEDs in the keymap. - * - * @warning The range [ 0...xkb_keymap_num_leds() ) includes all of the LEDs - * in the keymap, but may also contain inactive LEDs. When iterating over - * this range, you need the handle this case when calling functions such as - * xkb_keymap_led_get_name() or xkb_state_led_index_is_active(). - * - * @sa xkb_led_index_t - * @memberof xkb_keymap - */ -xkb_led_index_t -xkb_keymap_num_leds(struct xkb_keymap *keymap); - -/** - * Get the name of a LED by index. - * - * @returns The name. If the index is invalid, returns NULL. - * - * @memberof xkb_keymap - */ -const char * -xkb_keymap_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx); - -/** - * Get the index of a LED by name. - * - * @returns The index. If no LED with this name exists, returns - * XKB_LED_INVALID. - * - * @memberof xkb_keymap - */ -xkb_led_index_t -xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name); - -/** - * Get the number of layouts for a specific key. - * - * This number can be different from xkb_keymap_num_layouts(), but is always - * smaller. It is the appropriate value to use when iterating over the - * layouts of a key. - * - * @sa xkb_layout_index_t - * @memberof xkb_keymap - */ -xkb_layout_index_t -xkb_keymap_num_layouts_for_key(struct xkb_keymap *keymap, xkb_keycode_t key); - -/** - * Get the number of shift levels for a specific key and layout. - * - * If @c layout is out of range for this key (that is, larger or equal to - * the value returned by xkb_keymap_num_layouts_for_key()), it is brought - * back into range in a manner consistent with xkb_state_key_get_layout(). - * - * @sa xkb_level_index_t - * @memberof xkb_keymap - */ -xkb_level_index_t -xkb_keymap_num_levels_for_key(struct xkb_keymap *keymap, xkb_keycode_t key, - xkb_layout_index_t layout); - -/** - * Get the keysyms obtained from pressing a key in a given layout and - * shift level. - * - * This function is like xkb_state_key_get_syms(), only the layout and - * shift level are not derived from the keyboard state but are instead - * specified explicitly. - * - * @param[in] keymap The keymap. - * @param[in] key The keycode of the key. - * @param[in] layout The layout for which to get the keysyms. - * @param[in] level The shift level in the layout for which to get the - * keysyms. This must be smaller than: - * @code xkb_keymap_num_levels_for_key(keymap, key) @endcode - * @param[out] syms_out An immutable array of keysyms corresponding to the - * key in the given layout and shift level. - * - * If @c layout is out of range for this key (that is, larger or equal to - * the value returned by xkb_keymap_num_layouts_for_key()), it is brought - * back into range in a manner consistent with xkb_state_key_get_layout(). - * - * @returns The number of keysyms in the syms_out array. If no keysyms - * are produced by the key in the given layout and shift level, returns 0 - * and sets syms_out to NULL. - * - * @sa xkb_state_key_get_syms() - * @memberof xkb_keymap - */ -int -xkb_keymap_key_get_syms_by_level(struct xkb_keymap *keymap, - xkb_keycode_t key, - xkb_layout_index_t layout, - xkb_level_index_t level, - const xkb_keysym_t **syms_out); - -/** - * Determine whether a key should repeat or not. - * - * A keymap may specify different repeat behaviors for different keys. - * Most keys should generally exhibit repeat behavior; for example, holding - * the 'a' key down in a text editor should normally insert a single 'a' - * character every few milliseconds, until the key is released. However, - * there are keys which should not or do not need to be repeated. For - * example, repeating modifier keys such as Left/Right Shift or Caps Lock - * is not generally useful or desired. - * - * @returns 1 if the key should repeat, 0 otherwise. - * - * @memberof xkb_keymap - */ -int -xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t key); - -/** @} */ - -/** - * @defgroup state Keyboard State - * Creating, destroying and manipulating keyboard state objects. - * - * @{ - */ - -/** - * Create a new keyboard state object. - * - * @param keymap The keymap which the state will use. - * - * @returns A new keyboard state object, or NULL on failure. - * - * @memberof xkb_state - */ -struct xkb_state * -xkb_state_new(struct xkb_keymap *keymap); - -/** - * Take a new reference on a keyboard state object. - * - * @returns The passed in object. - * - * @memberof xkb_state - */ -struct xkb_state * -xkb_state_ref(struct xkb_state *state); - -/** - * Release a reference on a keybaord state object, and possibly free it. - * - * @param state The state. If it is NULL, this function does nothing. - * - * @memberof xkb_state - */ -void -xkb_state_unref(struct xkb_state *state); - -/** - * Get the keymap which a keyboard state object is using. - * - * @returns The keymap which was passed to xkb_state_new() when creating - * this state object. - * - * This function does not take a new reference on the keymap; you must - * explicitly reference it yourself if you plan to use it beyond the - * lifetime of the state. - * - * @memberof xkb_state - */ -struct xkb_keymap * -xkb_state_get_keymap(struct xkb_state *state); - -/** Specifies the direction of the key (press / release). */ -enum xkb_key_direction { - XKB_KEY_UP, /**< The key was released. */ - XKB_KEY_DOWN /**< The key was pressed. */ -}; - -/** - * Modifier and layout types for state objects. This enum is bitmaskable, - * e.g. (XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LATCHED) is valid to - * exclude locked modifiers. - * - * In XKB, the DEPRESSED components are also known as 'base'. - */ -enum xkb_state_component { - /** Depressed modifiers, i.e. a key is physically holding them. */ - XKB_STATE_MODS_DEPRESSED = (1 << 0), - /** Latched modifiers, i.e. will be unset after the next non-modifier - * key press. */ - XKB_STATE_MODS_LATCHED = (1 << 1), - /** Locked modifiers, i.e. will be unset after the key provoking the - * lock has been pressed again. */ - XKB_STATE_MODS_LOCKED = (1 << 2), - /** Effective modifiers, i.e. currently active and affect key - * processing (derived from the other state components). - * Use this unless you explictly care how the state came about. */ - XKB_STATE_MODS_EFFECTIVE = (1 << 3), - /** Depressed layout, i.e. a key is physically holding it. */ - XKB_STATE_LAYOUT_DEPRESSED = (1 << 4), - /** Latched layout, i.e. will be unset after the next non-modifier - * key press. */ - XKB_STATE_LAYOUT_LATCHED = (1 << 5), - /** Locked layout, i.e. will be unset after the key provoking the lock - * has been pressed again. */ - XKB_STATE_LAYOUT_LOCKED = (1 << 6), - /** Effective layout, i.e. currently active and affects key processing - * (derived from the other state components). - * Use this unless you explictly care how the state came about. */ - XKB_STATE_LAYOUT_EFFECTIVE = (1 << 7), - /** LEDs (derived from the other state components). */ - XKB_STATE_LEDS = (1 << 8) -}; - -/** - * Update the keyboard state to reflect a given key being pressed or - * released. - * - * This entry point is intended for programs which track the keyboard state - * explictly (like an evdev client). If the state is serialized to you by - * a master process (like a Wayland compositor) using functions like - * xkb_state_serialize_mods(), you should use xkb_state_update_mask() instead. - * The two functins should not generally be used together. - * - * A series of calls to this function should be consistent; that is, a call - * with XKB_KEY_DOWN for a key should be matched by an XKB_KEY_UP; if a key - * is pressed twice, it should be released twice; etc. Otherwise (e.g. due - * to missed input events), situations like "stuck modifiers" may occur. - * - * This function is often used in conjunction with the function - * xkb_state_key_get_syms() (or xkb_state_key_get_one_sym()), for example, - * when handling a key event. In this case, you should prefer to get the - * keysyms *before* updating the key, such that the keysyms reported for - * the key event are not affected by the event itself. This is the - * conventional behavior. - * - * @returns A mask of state components that have changed as a result of - * the update. If nothing in the state has changed, returns 0. - * - * @memberof xkb_state - * - * @sa xkb_state_update_mask() - */ -enum xkb_state_component -xkb_state_update_key(struct xkb_state *state, xkb_keycode_t key, - enum xkb_key_direction direction); - -/** - * Update a keyboard state from a set of explicit masks. - * - * This entry point is intended for window systems and the like, where a - * master process holds an xkb_state, then serializes it over a wire - * protocol, and clients then use the serialization to feed in to their own - * xkb_state. - * - * All parameters must always be passed, or the resulting state may be - * incoherent. - * - * The serialization is lossy and will not survive round trips; it must only - * be used to feed slave state objects, and must not be used to update the - * master state. - * - * If you do not fit the description above, you should use - * xkb_state_update_key() instead. The two functions should not generally be - * used together. - * - * @returns A mask of state components that have changed as a result of - * the update. If nothing in the state has changed, returns 0. - * - * @memberof xkb_state - * - * @sa xkb_state_component - * @sa xkb_state_update_key - */ -enum xkb_state_component -xkb_state_update_mask(struct xkb_state *state, - xkb_mod_mask_t depressed_mods, - xkb_mod_mask_t latched_mods, - xkb_mod_mask_t locked_mods, - xkb_layout_index_t depressed_layout, - xkb_layout_index_t latched_layout, - xkb_layout_index_t locked_layout); - -/** - * Get the keysyms obtained from pressing a particular key in a given - * keyboard state. - * - * Get the keysyms for a key according to the current active layout, - * modifiers and shift level for the key, as determined by a keyboard - * state. - * - * @param[in] state The keyboard state object. - * @param[in] key The keycode of the key. - * @param[out] syms_out An immutable array of keysyms corresponding the - * key in the given keyboard state. - * - * As an extension to XKB, this function can return more than one keysym. - * If you do not want to handle this case, you can use - * xkb_state_key_get_one_sym() for a simpler interface. - * - * This function does not perform any @ref keysym-transformations. - * (This might change). - * - * @returns The number of keysyms in the syms_out array. If no keysyms - * are produced by the key in the given keyboard state, returns 0 and sets - * syms_out to NULL. - * - * @memberof xkb_state - */ -int -xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t key, - const xkb_keysym_t **syms_out); - -/** - * Get the Unicode/UTF-8 string obtained from pressing a particular key - * in a given keyboard state. - * - * @param[in] state The keyboard state object. - * @param[in] key The keycode of the key. - * @param[out] buffer A buffer to write the string into. - * @param[in] size Size of the buffer. - * - * @warning If the buffer passed is too small, the string is truncated - * (though still NUL-terminated). - * - * @returns The number of bytes required for the string, excluding the - * NUL byte. If there is nothing to write, returns 0. - * - * You may check if truncation has occurred by comparing the return value - * with the size of @p buffer, similarly to the snprintf(3) function. - * You may safely pass NULL and 0 to @p buffer and @p size to find the - * required size (without the NUL-byte). - * - * This function performs Capitalization and Control @ref - * keysym-transformations. - * - * @memberof xkb_state - * @since 0.4.1 - */ -int -xkb_state_key_get_utf8(struct xkb_state *state, xkb_keycode_t key, - char *buffer, size_t size); - -/** - * Get the Unicode/UTF-32 codepoint obtained from pressing a particular - * key in a a given keyboard state. - * - * @returns The UTF-32 representation for the key, if it consists of only - * a single codepoint. Otherwise, returns 0. - * - * This function performs Capitalization and Control @ref - * keysym-transformations. - * - * @memberof xkb_state - * @since 0.4.1 - */ -uint32_t -xkb_state_key_get_utf32(struct xkb_state *state, xkb_keycode_t key); - -/** - * Get the single keysym obtained from pressing a particular key in a - * given keyboard state. - * - * This function is similar to xkb_state_key_get_syms(), but intended - * for users which cannot or do not want to handle the case where - * multiple keysyms are returned (in which case this function is - * preferred). - * - * @returns The keysym. If the key does not have exactly one keysym, - * returns XKB_KEY_NoSymbol - * - * This function performs Capitalization @ref keysym-transformations. - * - * @sa xkb_state_key_get_syms() - * @memberof xkb_state - */ -xkb_keysym_t -xkb_state_key_get_one_sym(struct xkb_state *state, xkb_keycode_t key); - -/** - * Get the effective layout index for a key in a given keyboard state. - * - * @returns The layout index for the key in the given keyboard state. If - * the given keycode is invalid, or if the key is not included in any - * layout at all, returns XKB_LAYOUT_INVALID. - * - * @invariant If the returned layout is valid, the following always holds: - * @code - * xkb_state_key_get_layout(state, key) < xkb_keymap_num_layouts_for_key(keymap, key) - * @endcode - * - * @memberof xkb_state - */ -xkb_layout_index_t -xkb_state_key_get_layout(struct xkb_state *state, xkb_keycode_t key); - -/** - * Get the effective shift level for a key in a given keyboard state and - * layout. - * - * @param state The keyboard state. - * @param key The keycode of the key. - * @param layout The layout for which to get the shift level. This must be - * smaller than: - * @code xkb_keymap_num_layouts_for_key(keymap, key) @endcode - * usually it would be: - * @code xkb_state_key_get_layout(state, key) @endcode - * - * @return The shift level index. If the key or layout are invalid, - * returns XKB_LEVEL_INVALID. - * - * @invariant If the returned level is valid, the following always holds: - * @code - * xkb_state_key_get_level(state, key, layout) < xkb_keymap_num_levels_for_key(keymap, key, layout) - * @endcode - * - * @memberof xkb_state - */ -xkb_level_index_t -xkb_state_key_get_level(struct xkb_state *state, xkb_keycode_t key, - xkb_layout_index_t layout); - -/** - * Match flags for xkb_state_mod_indices_are_active() and - * xkb_state_mod_names_are_active(), specifying the conditions for a - * successful match. XKB_STATE_MATCH_NON_EXCLUSIVE is bitmaskable with - * the other modes. - */ -enum xkb_state_match { - /** Returns true if any of the modifiers are active. */ - XKB_STATE_MATCH_ANY = (1 << 0), - /** Returns true if all of the modifiers are active. */ - XKB_STATE_MATCH_ALL = (1 << 1), - /** Makes matching non-exclusive, i.e. will not return false if a - * modifier not specified in the arguments is active. */ - XKB_STATE_MATCH_NON_EXCLUSIVE = (1 << 16) -}; - -/** - * The counterpart to xkb_state_update_mask for modifiers, to be used on - * the server side of serialization. - * - * @param state The keyboard state. - * @param components A mask of the modifier state components to serialize. - * State components other than XKB_STATE_MODS_* are ignored. - * If XKB_STATE_MODS_EFFECTIVE is included, all other state components are - * ignored. - * - * @returns A xkb_mod_mask_t representing the given components of the - * modifier state. - * - * This function should not be used in regular clients; please use the - * xkb_state_mod_*_is_active API instead. - * - * @memberof xkb_state - */ -xkb_mod_mask_t -xkb_state_serialize_mods(struct xkb_state *state, - enum xkb_state_component components); - -/** - * The counterpart to xkb_state_update_mask for layouts, to be used on - * the server side of serialization. - * - * @param state The keyboard state. - * @param components A mask of the layout state components to serialize. - * State components other than XKB_STATE_LAYOUT_* are ignored. - * If XKB_STATE_LAYOUT_EFFECTIVE is included, all other state components are - * ignored. - * - * @returns A layout index representing the given components of the - * layout state. - * - * This function should not be used in regular clients; please use the - * xkb_state_layout_*_is_active API instead. - * - * @memberof xkb_state - */ -xkb_layout_index_t -xkb_state_serialize_layout(struct xkb_state *state, - enum xkb_state_component components); - -/** - * Test whether a modifier is active in a given keyboard state by name. - * - * @returns 1 if the modifier is active, 0 if it is not. If the modifier - * name does not exist in the keymap, returns -1. - * - * @memberof xkb_state - */ -int -xkb_state_mod_name_is_active(struct xkb_state *state, const char *name, - enum xkb_state_component type); - -/** - * Test whether a set of modifiers are active in a given keyboard state by - * name. - * - * @param state The keyboard state. - * @param type The component of the state against which to match the - * given modifiers. - * @param match The manner by which to match the state against the - * given modifiers. - * @param ... The set of of modifier names to test, terminated by a NULL - * argument (sentinel). - * - * @returns 1 if the modifiers are active, 0 if they are not. If any of - * the modifier names do not exist in the keymap, returns -1. - * - * @memberof xkb_state - */ -int -xkb_state_mod_names_are_active(struct xkb_state *state, - enum xkb_state_component type, - enum xkb_state_match match, - ...); - -/** - * Test whether a modifier is active in a given keyboard state by index. - * - * @returns 1 if the modifier is active, 0 if it is not. If the modifier - * index is invalid in the keymap, returns -1. - * - * @memberof xkb_state - */ -int -xkb_state_mod_index_is_active(struct xkb_state *state, xkb_mod_index_t idx, - enum xkb_state_component type); - -/** - * Test whether a set of modifiers are active in a given keyboard state by - * index. - * - * @param state The keyboard state. - * @param type The component of the state against which to match the - * given modifiers. - * @param match The manner by which to match the state against the - * given modifiers. - * @param ... The set of of modifier indices to test, terminated by a - * XKB_MOD_INVALID argument (sentinel). - * - * @returns 1 if the modifiers are active, 0 if they are not. If any of - * the modifier indices are invalid in the keymap, returns -1. - * - * @memberof xkb_state - */ -int -xkb_state_mod_indices_are_active(struct xkb_state *state, - enum xkb_state_component type, - enum xkb_state_match match, - ...); - -/** - * @page consumed-modifiers Consumed Modifiers - * @parblock - * - * Some functions, like xkb_state_key_get_syms(), look at the state of - * the modifiers in the keymap and derive from it the correct shift level - * to use for the key. For example, in a US layout, pressing the key - * labeled \ while the Shift modifier is active, generates the keysym - * 'A'. In this case, the Shift modifier is said to be "consumed". - * However, the Num Lock modifier does not affect this translation at all, - * even if it is active, so it is not consumed by this translation. - * - * It may be desirable for some application to not reuse consumed modifiers - * for further processing, e.g. for hotkeys or keyboard shortcuts. To - * understand why, consider some requirements from a standard shortcut - * mechanism, and how they are implemented: - * - * 1. The shortcut's modifiers must match exactly to the state. For - * example, it is possible to bind separate actions to \\ - * and to \\\. Further, if only \\ is - * bound to an action, pressing \\\ should not - * trigger the shortcut. - * Effectively, this means that the modifiers are compared using the - * equality operator (==). - * - * 2. Only relevant modifiers are considered for the matching. For example, - * Caps Lock and Num Lock should not generally affect the matching, e.g. - * when matching \\ against the state, it does not matter - * whether Num Lock is active or not. These relevant, or "significant", - * modifiers usually include Alt, Control, Shift, Super and similar. - * Effectively, this means that non-significant modifiers are masked out, - * before doing the comparison as described above. - * - * 3. The matching must be independent of the layout/keymap. For example, - * the \ (+) symbol is found on the first level on some layouts, - * but requires holding Shift on others. If you simply bind the action - * to the \ keysym, it would work for the unshifted kind, but - * not for the others, because the match against Shift would fail. If - * you bind the action to \\, only the shifted kind would - * work. So what is needed is to recognize that Shift is used up in the - * translation of the keysym itself, and therefore should not be included - * in the matching. - * Effectively, this means that consumed modifiers (Shift in this example) - * are masked out as well, before doing the comparison. - * - * In summary, this is approximately how the matching would be performed: - * @code - * (keysym == shortcut_keysym) && - * ((state_mods & ~consumed_mods & significant_mods) == shortcut_mods) - * @endcode - * - * @c state_mods are the modifiers reported by - * xkb_state_mod_index_is_active() and similar functions. - * @c consumed_mods are the modifiers reported by - * xkb_state_mod_index_is_consumed() and similar functions. - * @c significant_mods are decided upon by the application/toolkit/user; - * it is up to them to decide whether these are configurable or hard-coded. - * - * @endparblock - */ - -/** - * Consumed modifiers mode. - * - * There are several possible methods for deciding which modifiers are - * consumed and which are not, each applicable for different systems or - * situations. The mode selects the method to use. - * - * Keep in mind that in all methods, the keymap may decide to "preserve" - * a modifier, meaning it is not reported as consumed even if it would - * have otherwise. - */ -enum xkb_consumed_mode { - /** - * This is the mode defined in the XKB specification and used by libX11. - * - * A modifier is consumed if and only if it *may affect* key translation. - * - * For example, if `Control+Alt+` produces some assigned keysym, - * then when pressing just ``, `Control` and `Alt` are consumed, - * even though they are not active, since if they *were* active they would - * have affected key translation. - */ - XKB_CONSUMED_MODE_XKB, - /** - * This is the mode used by the GTK+ toolkit. - * - * The mode consists of the following two independent heuristics: - * - * - The currently active set of modifiers, excluding modifiers which do - * not affect the key (as described for @ref XKB_CONSUMED_MODE_XKB), are - * considered consumed, if the keysyms produced when all of them are - * active are different from the keysyms produced when no modifiers are - * active. - * - * - A single modifier is considered consumed if the keysyms produced for - * the key when it is the only active modifier are different from the - * keysyms produced when no modifiers are active. - */ - XKB_CONSUMED_MODE_GTK -}; - -/** - * Get the mask of modifiers consumed by translating a given key. - * - * @param state The keyboard state. - * @param key The keycode of the key. - * @param mode The consumed modifiers mode to use; see enum description. - * - * @returns a mask of the consumed modifiers. - * - * @memberof xkb_state - * @since 0.7.0 - */ -xkb_mod_mask_t -xkb_state_key_get_consumed_mods2(struct xkb_state *state, xkb_keycode_t key, - enum xkb_consumed_mode mode); - -/** - * Same as xkb_state_key_get_consumed_mods2() with mode XKB_CONSUMED_MODE_XKB. - * - * @memberof xkb_state - * @since 0.4.1 - */ -xkb_mod_mask_t -xkb_state_key_get_consumed_mods(struct xkb_state *state, xkb_keycode_t key); - -/** - * Test whether a modifier is consumed by keyboard state translation for - * a key. - * - * @param state The keyboard state. - * @param key The keycode of the key. - * @param idx The index of the modifier to check. - * @param mode The consumed modifiers mode to use; see enum description. - * - * @returns 1 if the modifier is consumed, 0 if it is not. If the modifier - * index is not valid in the keymap, returns -1. - * - * @sa xkb_state_mod_mask_remove_consumed() - * @sa xkb_state_key_get_consumed_mods() - * @memberof xkb_state - * @since 0.7.0 - */ -int -xkb_state_mod_index_is_consumed2(struct xkb_state *state, - xkb_keycode_t key, - xkb_mod_index_t idx, - enum xkb_consumed_mode mode); - -/** - * Same as xkb_state_mod_index_is_consumed2() with mode XKB_CONSUMED_MOD_XKB. - * - * @memberof xkb_state - * @since 0.4.1 - */ -int -xkb_state_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t key, - xkb_mod_index_t idx); - -/** - * Remove consumed modifiers from a modifier mask for a key. - * - * @deprecated Use xkb_state_key_get_consumed_mods2() instead. - * - * Takes the given modifier mask, and removes all modifiers which are - * consumed for that particular key (as in xkb_state_mod_index_is_consumed()). - * - * @sa xkb_state_mod_index_is_consumed() - * @memberof xkb_state - */ -xkb_mod_mask_t -xkb_state_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t key, - xkb_mod_mask_t mask); - -/** - * Test whether a layout is active in a given keyboard state by name. - * - * @returns 1 if the layout is active, 0 if it is not. If no layout with - * this name exists in the keymap, return -1. - * - * If multiple layouts in the keymap have this name, the one with the lowest - * index is tested. - * - * @sa xkb_layout_index_t - * @memberof xkb_state - */ -int -xkb_state_layout_name_is_active(struct xkb_state *state, const char *name, - enum xkb_state_component type); - -/** - * Test whether a layout is active in a given keyboard state by index. - * - * @returns 1 if the layout is active, 0 if it is not. If the layout index - * is not valid in the keymap, returns -1. - * - * @sa xkb_layout_index_t - * @memberof xkb_state - */ -int -xkb_state_layout_index_is_active(struct xkb_state *state, - xkb_layout_index_t idx, - enum xkb_state_component type); - -/** - * Test whether a LED is active in a given keyboard state by name. - * - * @returns 1 if the LED is active, 0 if it not. If no LED with this name - * exists in the keymap, returns -1. - * - * @sa xkb_led_index_t - * @memberof xkb_state - */ -int -xkb_state_led_name_is_active(struct xkb_state *state, const char *name); - -/** - * Test whether a LED is active in a given keyboard state by index. - * - * @returns 1 if the LED is active, 0 if it not. If the LED index is not - * valid in the keymap, returns -1. - * - * @sa xkb_led_index_t - * @memberof xkb_state - */ -int -xkb_state_led_index_is_active(struct xkb_state *state, xkb_led_index_t idx); - -/** @} */ - -/* Leave this include last, so it can pick up our types, etc. */ -#include - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _XKBCOMMON_H_ */ diff --git a/src/gui/configure.json b/src/gui/configure.json index 0332631ec8..590e52d258 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -46,9 +46,7 @@ "xcb-xlib": "boolean", "xcb-xinput": "boolean", "xkb": "boolean", - "xkbcommon": { "type": "enum", "values": [ "no", "qt", "system" ] }, - "xkbcommon-evdev": "boolean", - "xkbcommon-x11": { "type": "enum", "name": "xkbcommon", "values": [ "no", "qt", "system" ] } + "xkbcommon": "boolean" } }, @@ -606,21 +604,33 @@ ] }, "xkbcommon": { - "label": "xkbcommon", - "export": "xkbcommon_evdev", + "label": "xkbcommon >= 0.5.0", "test": { - "include": [ "xkbcommon/xkbcommon.h", "xkbcommon/xkbcommon-keysyms.h", "xkbcommon/xkbcommon-names.h" ], + "include": [ "xkbcommon/xkbcommon.h" ], "main": "xkb_context_new(XKB_CONTEXT_NO_FLAGS);" }, "sources": [ - { "type": "pkgConfig", "args": "xkbcommon" } + { "type": "pkgConfig", "args": "xkbcommon >= 0.5.0" } ] }, "xkbcommon_x11": { - "label": "xkbcommon-x11 >= 0.4.1", - "export": "xkbcommon", + "label": "xkbcommon-x11", + "test": { + "include": [ "xkbcommon/xkbcommon-x11.h" ], + "main": "xkb_x11_get_core_keyboard_device_id(nullptr);" + }, "sources": [ - { "type": "pkgConfig", "args": "xkbcommon xkbcommon-x11 >= 0.4.1" } + { "type": "pkgConfig", "args": "xkbcommon-x11" } + ] + }, + "xkbcommon_evdev": { + "label": "xkbcommon_evdev TRANSITION HACK", + "test": { + "include": [ "xkbcommon/xkbcommon.h" ], + "main": "xkb_context_new(XKB_CONTEXT_NO_FLAGS);" + }, + "sources": [ + { "type": "pkgConfig", "args": "xkbcommon >= 0.5.0" } ] }, "xrender": { @@ -1091,7 +1101,7 @@ "label": "Mir client", "section": "Platform plugins", "autoDetect": false, - "condition": "libs.mirclient", + "condition": "libs.mirclient && features.xkbcommon", "output": [ "privateFeature" ] }, "mtdev": { @@ -1304,7 +1314,7 @@ "section": "Platform plugins", "autoDetect": "!config.darwin", "enable": "input.xcb == 'system' || input.xcb == 'qt' || input.xcb == 'yes'", - "condition": "features.thread && libs.xcb", + "condition": "features.thread && features.xkbcommon && libs.xcb", "output": [ "privateFeature" ] }, "system-xcb": { @@ -1347,7 +1357,7 @@ "xkb": { "label": "XCB XKB", "emitIf": "features.xcb", - "condition": "!features.system-xcb || libs.xcb_xkb", + "condition": "(!features.system-xcb || libs.xcb_xkb) && libs.xkbcommon_x11", "output": [ "privateFeature" ] }, "xcb-xlib": { @@ -1368,17 +1378,14 @@ "condition": "!features.system-xcb || libs.xcb_xinput", "output": [ "privateFeature" ] }, - "xkbcommon-evdev": { - "label": "xkbcommon-evdev", + "xkbcommon": { + "label": "xkbcommon", "condition": "libs.xkbcommon", "output": [ "privateFeature" ] }, - "xkbcommon-system": { - "label": "Using system-provided xkbcommon", - "emitIf": "features.xcb", - "enable": "input.xkbcommon == 'system'", - "disable": "input.xkbcommon == 'qt' || input.xkbcommon == 'no'", - "condition": "libs.xkbcommon_x11", + "xkbcommon-evdev": { + "label": "xkbcommon-evdev TRANSITION HACK", + "condition": "libs.xkbcommon_evdev", "output": [ "privateFeature" ] }, "xlib": { @@ -1594,7 +1601,7 @@ { "type": "error", "condition": "input.xcb != '' && input.xcb != 'no' && input.xkbcommon == 'no'", - "message": "XCB plugin requires libxkbcommon. See -qt-xkbcommon-x11 and -system-xkbcommon-x11." + "message": "XCB plugin requires xkbcommon, but -no-xkbcommon was provided." } ], @@ -1705,7 +1712,7 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla "integrityhid", "mtdev", "tslib", - "xkbcommon-evdev" + "xkbcommon" ] }, { @@ -1736,7 +1743,7 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla "section": "X11", "condition": "features.xcb", "entries": [ - "system-xcb", "egl_x11", "xkb", "xlib", "xcb-render", "xcb-glx", "xcb-xinput", "xcb-xlib", "xkbcommon-system", "xcb-native-painting" + "system-xcb", "egl_x11", "xkb", "xlib", "xcb-render", "xcb-glx", "xcb-xinput", "xcb-xlib", "xcb-native-painting" ] }, { diff --git a/src/platformsupport/input/libinput/libinput.pri b/src/platformsupport/input/libinput/libinput.pri index f922769a37..476f20c1b8 100644 --- a/src/platformsupport/input/libinput/libinput.pri +++ b/src/platformsupport/input/libinput/libinput.pri @@ -14,7 +14,4 @@ QMAKE_USE_PRIVATE += libudev libinput INCLUDEPATH += $$PWD/../shared -qtConfig(xkbcommon-evdev): \ - QMAKE_USE_PRIVATE += xkbcommon_evdev -else: \ - DEFINES += QT_NO_XKBCOMMON_EVDEV +qtConfig(xkbcommon): QMAKE_USE_PRIVATE += xkbcommon diff --git a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp index 2524066301..baef769bc9 100644 --- a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp +++ b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp @@ -44,7 +44,7 @@ #include #include #include -#ifndef QT_NO_XKBCOMMON_EVDEV +#if QT_CONFIG(xkbcommon) #include #include #endif @@ -56,7 +56,7 @@ Q_DECLARE_LOGGING_CATEGORY(qLcLibInput) const int REPEAT_DELAY = 500; const int REPEAT_RATE = 100; -#ifndef QT_NO_XKBCOMMON_EVDEV +#if QT_CONFIG(xkbcommon) struct KeyTabEntry { int xkbkey; int qtkey; @@ -132,14 +132,14 @@ static const KeyTabEntry keyTab[] = { #endif QLibInputKeyboard::QLibInputKeyboard() -#ifndef QT_NO_XKBCOMMON_EVDEV +#if QT_CONFIG(xkbcommon) : m_ctx(0), m_keymap(0), m_state(0), m_mods(Qt::NoModifier) #endif { -#ifndef QT_NO_XKBCOMMON_EVDEV +#if QT_CONFIG(xkbcommon) qCDebug(qLcLibInput) << "Using xkbcommon for key mapping"; m_ctx = xkb_context_new(XKB_CONTEXT_NO_FLAGS); if (!m_ctx) { @@ -164,13 +164,13 @@ QLibInputKeyboard::QLibInputKeyboard() m_repeatTimer.setSingleShot(true); connect(&m_repeatTimer, &QTimer::timeout, this, &QLibInputKeyboard::handleRepeat); #else - qCWarning(qLcLibInput) << "X-less xkbcommon not available, not performing key mapping"; + qCWarning(qLcLibInput) << "xkbcommon not available, not performing key mapping"; #endif } QLibInputKeyboard::~QLibInputKeyboard() { -#ifndef QT_NO_XKBCOMMON_EVDEV +#if QT_CONFIG(xkbcommon) if (m_state) xkb_state_unref(m_state); if (m_keymap) @@ -182,7 +182,7 @@ QLibInputKeyboard::~QLibInputKeyboard() void QLibInputKeyboard::processKey(libinput_event_keyboard *e) { -#ifndef QT_NO_XKBCOMMON_EVDEV +#if QT_CONFIG(xkbcommon) if (!m_ctx || !m_keymap || !m_state) return; @@ -245,7 +245,7 @@ void QLibInputKeyboard::processKey(libinput_event_keyboard *e) #endif } -#ifndef QT_NO_XKBCOMMON_EVDEV +#if QT_CONFIG(xkbcommon) void QLibInputKeyboard::handleRepeat() { QWindowSystemInterface::handleExtendedKeyEvent(nullptr, QEvent::KeyPress, diff --git a/src/plugins/platforminputcontexts/compose/compose.pro b/src/plugins/platforminputcontexts/compose/compose.pro index 2f53c5b416..68bc2c3466 100644 --- a/src/plugins/platforminputcontexts/compose/compose.pro +++ b/src/plugins/platforminputcontexts/compose/compose.pro @@ -9,12 +9,7 @@ SOURCES += $$PWD/qcomposeplatforminputcontextmain.cpp \ HEADERS += $$PWD/qcomposeplatforminputcontext.h \ $$PWD/generator/qtablegenerator.h \ -# libxkbcommon -!qtConfig(xkbcommon-system) { - include(../../../3rdparty/xkbcommon.pri) -} else { - QMAKE_USE += xkbcommon -} +QMAKE_USE_PRIVATE += xkbcommon include($$OUT_PWD/../../../gui/qtgui-config.pri) diff --git a/src/plugins/platforms/mirclient/mirclient.pro b/src/plugins/platforms/mirclient/mirclient.pro index d2da7e6ca0..d9eb069200 100644 --- a/src/plugins/platforms/mirclient/mirclient.pro +++ b/src/plugins/platforms/mirclient/mirclient.pro @@ -53,12 +53,7 @@ HEADERS = \ qmirclienttheme.h \ qmirclientwindow.h -# libxkbcommon -!qtConfig(xkbcommon-system) { - include(../../../3rdparty/xkbcommon.pri) -} else { - QMAKE_USE += xkbcommon -} +QMAKE_USE_PRIVATE += xkbcommon PLUGIN_TYPE = platforms PLUGIN_CLASS_NAME = MirServerIntegrationPlugin diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index c65b145fb6..9883617ab6 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -97,21 +97,15 @@ qtConfig(vulkan) { !qtConfig(system-xcb) { QMAKE_USE += xcb-static xcb } else { - qtConfig(xkb): QMAKE_USE += xcb_xkb qtConfig(xcb-render): QMAKE_USE += xcb_render qtConfig(xcb-xinput): QMAKE_USE += xcb_xinput QMAKE_USE += xcb_syslibs } -# libxkbcommon -!qtConfig(xkbcommon-system) { - qtConfig(xkb) { - include(../../../3rdparty/xkbcommon-x11.pri) - } else { - include(../../../3rdparty/xkbcommon.pri) - } -} else { - QMAKE_USE += xkbcommon +QMAKE_USE += xkbcommon +qtConfig(xkb) { + QMAKE_USE += xkbcommon_x11 + qtConfig(system-xcb): QMAKE_USE += xcb_xkb } qtConfig(dlopen): QMAKE_USE += libdl From 7aaf54f5725c65bf830088a9cfd104ef4817f256 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 12 Nov 2018 15:18:12 +0100 Subject: [PATCH 46/73] Codecs example: Add a dialog for showing common C++ encodings Add a dialog where the user can enter a line of text, which is then displayed in several encodings with special characters converted suitable for C++/Python string literals. Task-number: QTBUG-60635 Change-Id: Ibd436f9f76e128c93cbb581235c730d636641d8a Reviewed-by: Andy Shaw --- examples/widgets/tools/codecs/codecs.pro | 9 +- examples/widgets/tools/codecs/codecs.qrc | 5 + .../widgets/tools/codecs/encodingdialog.cpp | 333 ++++++++++++++++++ .../widgets/tools/codecs/encodingdialog.h | 73 ++++ .../widgets/tools/codecs/images/editcopy.png | Bin 0 -> 1325 bytes examples/widgets/tools/codecs/mainwindow.cpp | 19 + examples/widgets/tools/codecs/mainwindow.h | 4 + 7 files changed, 441 insertions(+), 2 deletions(-) create mode 100644 examples/widgets/tools/codecs/codecs.qrc create mode 100644 examples/widgets/tools/codecs/encodingdialog.cpp create mode 100644 examples/widgets/tools/codecs/encodingdialog.h create mode 100644 examples/widgets/tools/codecs/images/editcopy.png diff --git a/examples/widgets/tools/codecs/codecs.pro b/examples/widgets/tools/codecs/codecs.pro index 13daa79237..6f4b0742a9 100644 --- a/examples/widgets/tools/codecs/codecs.pro +++ b/examples/widgets/tools/codecs/codecs.pro @@ -2,10 +2,15 @@ QT += widgets requires(qtConfig(filedialog)) HEADERS += mainwindow.h \ - previewform.h + previewform.h \ + encodingdialog.h + SOURCES += main.cpp \ mainwindow.cpp \ - previewform.cpp + previewform.cpp \ + encodingdialog.cpp + +RESOURCES += codecs.qrc EXAMPLE_FILES = encodedfiles diff --git a/examples/widgets/tools/codecs/codecs.qrc b/examples/widgets/tools/codecs/codecs.qrc new file mode 100644 index 0000000000..65fa1aa64d --- /dev/null +++ b/examples/widgets/tools/codecs/codecs.qrc @@ -0,0 +1,5 @@ + + + images/editcopy.png + + diff --git a/examples/widgets/tools/codecs/encodingdialog.cpp b/examples/widgets/tools/codecs/encodingdialog.cpp new file mode 100644 index 0000000000..ca4b56db9e --- /dev/null +++ b/examples/widgets/tools/codecs/encodingdialog.cpp @@ -0,0 +1,333 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "encodingdialog.h" + +#if QT_CONFIG(action) +# include +#endif +#include +#include +#include +#include +#include + +#if QT_CONFIG(clipboard) +# include +# include +#endif + +#include + +// Helpers for formatting character sequences + +// Format a special character like '\x0a' +template +static void formatEscapedNumber(QTextStream &str, Int value, int base, + int width = 0,char prefix = 0) +{ + str << '\\'; + if (prefix) + str << prefix; + const auto oldPadChar = str.padChar(); + const auto oldFieldWidth = str.fieldWidth(); + const auto oldFieldAlignment = str.fieldAlignment(); + const auto oldIntegerBase = str.integerBase(); + str.setPadChar(QLatin1Char('0')); + str.setFieldWidth(width); + str.setFieldAlignment(QTextStream::AlignRight); + str.setIntegerBase(base); + str << value; + str.setIntegerBase(oldIntegerBase); + str.setFieldAlignment(oldFieldAlignment); + str.setFieldWidth(oldFieldWidth); + str.setPadChar(oldPadChar); +} + +template +static bool formatSpecialCharacter(QTextStream &str, Int value) +{ + bool result = true; + switch (value) { + case '\\': + str << "\\\\"; + break; + case '\"': + str << "\\\""; + break; + case '\n': + str << "\\n"; + break; + default: + result = false; + break; + } + return result; +} + +// Format a sequence of characters (QChar, ushort (UTF-16), uint (UTF-32) +// or just char (Latin1, Utf-8)) with the help of traits specifying +// how to obtain the code for checking the printable-ness and how to +// stream out the plain ASCII values. + +template +struct FormattingTraits +{ +}; + +template <> +struct FormattingTraits +{ + static ushort code(QChar c) { return c.unicode(); } + static char toAscii(QChar c) { return c.toLatin1(); } +}; + +template <> +struct FormattingTraits +{ + static ushort code(char c) { return uchar(c); } + static char toAscii(char c) { return c; } +}; + +template <> +struct FormattingTraits +{ + static ushort code(ushort c) { return c; } + static char toAscii(ushort c) { return char(c); } +}; + +template <> +struct FormattingTraits +{ + static uint code(uint c) { return c; } + static char toAscii(uint c) { return char(c); } +}; + +template <> +struct FormattingTraits +{ + static uchar code(char c) { return uchar(c); } + static char toAscii(char c) { return c; } +}; + +static bool isHexDigit(char c) +{ + return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') + || (c >= 'A' && c <= 'F'); +} + +template +static void formatStringSequence(QTextStream &str, Iterator i1, Iterator i2, + int escapeIntegerBase, int escapeWidth, + char escapePrefix = 0) +{ + str << '"'; + bool separateHexEscape = false; + for (; i1 != i2; ++i1) { + const auto code = FormattingTraits::code(*i1); + if (code >= 0x80) { + formatEscapedNumber(str, code, escapeIntegerBase, escapeWidth, escapePrefix); + separateHexEscape = escapeIntegerBase == 16 && escapeWidth == 0; + } else { + if (!formatSpecialCharacter(str, code)) { + const char c = FormattingTraits::toAscii(*i1); + // For variable width/hex: Terminate the literal to stop digit parsing + // ("\x12" "34..."). + if (separateHexEscape && isHexDigit(c)) + str << "\" \""; + str << c; + } + separateHexEscape = false; + } + } + str << '"'; +} + +static QString encodedString(const QString &value, EncodingDialog::Encoding e) +{ + QString result; + QTextStream str(&result); + switch (e) { + case EncodingDialog::Unicode: + formatStringSequence(str, value.cbegin(), value.cend(), + 16, 4, 'u'); + break; + case EncodingDialog::Utf8: { + const QByteArray utf8 = value.toUtf8(); + str << "u8"; + formatStringSequence(str, utf8.cbegin(), utf8.cend(), + 8, 3); + } + break; + case EncodingDialog::Utf16: { + auto utf16 = value.utf16(); + auto utf16End = utf16 + value.size(); + str << 'u'; + formatStringSequence(str, utf16, utf16End, + 16, 0, 'x'); + } + break; + case EncodingDialog::Utf32: { + auto utf32 = value.toUcs4(); + str << 'U'; + formatStringSequence(str, utf32.cbegin(), utf32.cend(), + 16, 0, 'x'); + } + break; + case EncodingDialog::Latin1: { + const QByteArray latin1 = value.toLatin1(); + formatStringSequence(str, latin1.cbegin(), latin1.cend(), + 16, 0, 'x'); + } + break; + case EncodingDialog::EncodingCount: + break; + } + return result; +} + +// Dialog helpers + +static const char *encodingLabels[] +{ + QT_TRANSLATE_NOOP("EncodingDialog", "Unicode:"), + QT_TRANSLATE_NOOP("EncodingDialog", "UTF-8:"), + QT_TRANSLATE_NOOP("EncodingDialog", "UTF-16:"), + QT_TRANSLATE_NOOP("EncodingDialog", "UTF-32:"), + QT_TRANSLATE_NOOP("EncodingDialog", "Latin1:") +}; + +static const char *encodingToolTips[] +{ + QT_TRANSLATE_NOOP("EncodingDialog", "Unicode points for use with any encoding (C++, Python)"), + QT_TRANSLATE_NOOP("EncodingDialog", "QString::fromUtf8()"), + QT_TRANSLATE_NOOP("EncodingDialog", "QStringViewLiteral(), wchar_t on Windows"), + QT_TRANSLATE_NOOP("EncodingDialog", "wchar_t on Unix (Ucs4)"), + QT_TRANSLATE_NOOP("EncodingDialog", "QLatin1String") +}; + +// A read-only line edit with a tool button to copy the contents +class DisplayLineEdit : public QLineEdit +{ + Q_OBJECT +public: + explicit DisplayLineEdit(const QIcon &icon, QWidget *parent = nullptr); + +public slots: + void copyAll(); +}; + +DisplayLineEdit::DisplayLineEdit(const QIcon &icon, QWidget *parent) : + QLineEdit(parent) +{ + setReadOnly(true); +#if QT_CONFIG(clipboard) && QT_CONFIG(action) + auto copyAction = addAction(icon, QLineEdit::TrailingPosition); + connect(copyAction, &QAction::triggered, this, &DisplayLineEdit::copyAll); +#endif +} + +void DisplayLineEdit::copyAll() +{ +#if QT_CONFIG(clipboard) + QGuiApplication::clipboard()->setText(text()); +#endif +} + +static void addFormLayoutRow(QFormLayout *formLayout, const QString &text, + QWidget *w, const QString &toolTip) +{ + auto label = new QLabel(text); + label->setToolTip(toolTip); + w->setToolTip(toolTip); + label->setBuddy(w); + formLayout->addRow(label, w); +} + +EncodingDialog::EncodingDialog(QWidget *parent) : + QDialog(parent) +{ + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + setWindowTitle(tr("Encodings")); + + auto formLayout = new QFormLayout; + auto sourceLineEdit = new QLineEdit(this); + sourceLineEdit->setClearButtonEnabled(true); + connect(sourceLineEdit, &QLineEdit::textChanged, this, &EncodingDialog::textChanged); + + addFormLayoutRow(formLayout, tr("&Source:"), sourceLineEdit, tr("Enter text")); + + const auto copyIcon = QIcon::fromTheme(QLatin1String("edit-copy"), + QIcon(QLatin1String(":/images/editcopy"))); + for (int i = 0; i < EncodingCount; ++i) { + m_lineEdits[i] = new DisplayLineEdit(copyIcon, this); + addFormLayoutRow(formLayout, tr(encodingLabels[i]), + m_lineEdits[i], tr(encodingToolTips[i])); + } + + auto mainLayout = new QVBoxLayout(this); + mainLayout->addLayout(formLayout); + auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); + mainLayout->addWidget(buttonBox); +} + +void EncodingDialog::textChanged(const QString &t) +{ + if (t.isEmpty()) { + for (auto lineEdit : m_lineEdits) + lineEdit->clear(); + } else { + for (int i = 0; i < EncodingCount; ++i) + m_lineEdits[i]->setText(encodedString(t, static_cast(i))); + } +} + +#include "encodingdialog.moc" diff --git a/examples/widgets/tools/codecs/encodingdialog.h b/examples/widgets/tools/codecs/encodingdialog.h new file mode 100644 index 0000000000..3f82da84af --- /dev/null +++ b/examples/widgets/tools/codecs/encodingdialog.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef ENCODINGDIALOG_H +#define ENCODINGDIALOG_H + +#include + +QT_FORWARD_DECLARE_CLASS(QLineEdit) + +class EncodingDialog : public QDialog +{ + Q_OBJECT +public: + explicit EncodingDialog(QWidget *parent = nullptr); + + enum Encoding { Unicode, Utf8, Utf16, Utf32, Latin1, EncodingCount }; + +private slots: + void textChanged(const QString &t); + +private: + QLineEdit *m_lineEdits[EncodingCount]; +}; + +#endif // ENCODINGDIALOG_H diff --git a/examples/widgets/tools/codecs/images/editcopy.png b/examples/widgets/tools/codecs/images/editcopy.png new file mode 100644 index 0000000000000000000000000000000000000000..1121b47d8b6b48f6cdf525851e7c0f502454ffe1 GIT binary patch literal 1325 zcmV+|1=9M7P)+{buk{F=nCJX#i^AQGtBfP^U9E=s!&EKn3+*9AyOC5y5_m4HQB2~pH` zRYX%2)m58>DgqW&sAx;EBU4=37{7w!SM2eOJs!`@eVlXtjqY3tTS5?(-{yaHb@l)B zec!pdSBVIB!=;~|e%P7xymRJ$5osgh_&4efy`JyCUMhx9Kk}ogMRI&{UihAR)H(VP z5`ixu00_b{5e5q-zVY>M|NPMBA38(Y-oZLchI61bL7|V$#mUE~-@NcRpbiK;|6O(N zfk%J%Y@t+fHjUDudrucpC_qYs_XMTNy?z?C^q*foM`|MO`|`smOlCq5Y$|AffYRZk z1m#2g^824X`-5laF9IMU{OT;%tWD%U5hqqQHn+rzNOfaXUit9}xpwhevNrpY)K=e+ z>e6d6H~pftTia5-{gJHQcvaqe>5RPb)EA!+5j21}j7vL!fJ7h$Fxhq7s2$=XbQ*apq!syTR7h7DJ;ak=_$L@YoY5qR0x4qnI>JyURTfv?kuG)9hFQ(Bzig%{x2T0Vw))rZsUuJTqc?}RB zayzmI$t>XKE_%9=#B-p^;FY>ji9xH7Anaju4o)p z9%uqB5oz!1paas%Pl^wu;12>?@7Wcg0d(Zx zhlqm$W(R^Xh!-Io1+@po6A*q0JdbvDCs~`i(%Gx6@WB#qEmxCq5xK#C!6ygR1K}{F z4Jh9Og<%N$=~Oqu`pG7hW&{7(U;2z<{$co^Ef>^0+f z`TE<9*>|q)G;S}O%acqlZ1T6YZ9d*=aWjvj1$6F8Kzppmtr|VSaptG4)aU>DhsN&h zS#$oPdv2-51h5X&^WrRbO)e0I{N~r^&-Nf3pIBgF>R(LU+~oac!W>Y~iu;rt_-#>2 jRe%!E1{&Go|C3Ju!Z7S4^>URZ00000NkvXXu0mjfFDrHZ literal 0 HcmV?d00001 diff --git a/examples/widgets/tools/codecs/mainwindow.cpp b/examples/widgets/tools/codecs/mainwindow.cpp index 28f904d1a7..229c2ccfd4 100644 --- a/examples/widgets/tools/codecs/mainwindow.cpp +++ b/examples/widgets/tools/codecs/mainwindow.cpp @@ -51,6 +51,7 @@ #include #include "mainwindow.h" +#include "encodingdialog.h" #include "previewform.h" MainWindow::MainWindow() @@ -188,9 +189,27 @@ void MainWindow::createMenus() QAction *exitAct = fileMenu->addAction(tr("E&xit"), this, &QWidget::close); exitAct->setShortcuts(QKeySequence::Quit); + auto toolMenu = menuBar()->addMenu(tr("&Tools")); + auto encodingAction = toolMenu->addAction(tr("Encodings"), this, &MainWindow::encodingDialog); + encodingAction->setShortcut(Qt::CTRL + Qt::Key_E); + encodingAction->setToolTip(tr("Shows a dialog allowing to convert to common encoding in programming languages.")); + + menuBar()->addSeparator(); QMenu *helpMenu = menuBar()->addMenu(tr("&Help")); helpMenu->addAction(tr("&About"), this, &MainWindow::about); helpMenu->addAction(tr("About &Qt"), qApp, &QApplication::aboutQt); } + +void MainWindow::encodingDialog() +{ + if (!m_encodingDialog) { + m_encodingDialog = new EncodingDialog(this); + const QRect screenGeometry = QApplication::desktop()->screenGeometry(this); + m_encodingDialog->setMinimumWidth(screenGeometry.width() / 4); + } + m_encodingDialog->show(); + m_encodingDialog->raise(); + +} diff --git a/examples/widgets/tools/codecs/mainwindow.h b/examples/widgets/tools/codecs/mainwindow.h index 7121c0b122..64494d1960 100644 --- a/examples/widgets/tools/codecs/mainwindow.h +++ b/examples/widgets/tools/codecs/mainwindow.h @@ -59,6 +59,8 @@ class QAction; class QTextCodec; class QPlainTextEdit; QT_END_NAMESPACE + +class EncodingDialog; class PreviewForm; class MainWindow : public QMainWindow @@ -73,6 +75,7 @@ private slots: void save(); void about(); void aboutToShowSaveAsMenu(); + void encodingDialog(); private: void findCodecs(); @@ -82,6 +85,7 @@ private: QPlainTextEdit *textEdit; PreviewForm *previewForm; QList codecs; + EncodingDialog *m_encodingDialog = nullptr; }; #endif From eab84914f1a31984f4698bcbca170556a56fd6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 27 Sep 2018 12:26:36 +0200 Subject: [PATCH 47/73] macOS: make QScreen::grabWindow() fast again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 17b73b0d2b8 regressed performance by grabbing the entire screen and then copying the grab region. Move back to grabbing a minimal rectangle instead. Also handle multi-screen grabs at different device pixel ratios. Multi-screen grabbing is handled by grabbing each screen individually, and then stitching together the result. The returned pixmap is created using the highest DPR available, upscaling lower resolution parts as needed. Change-Id: I9d45c5f7ec7b342360b745f49ef2939dc588f40b Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoascreen.mm | 93 +++++++++++---------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm index 0d6567070e..afe14e623c 100644 --- a/src/plugins/platforms/cocoa/qcocoascreen.mm +++ b/src/plugins/platforms/cocoa/qcocoascreen.mm @@ -428,66 +428,71 @@ QWindow *QCocoaScreen::topLevelAt(const QPoint &point) const return window; } -QPixmap QCocoaScreen::grabWindow(WId window, int x, int y, int width, int height) const +QPixmap QCocoaScreen::grabWindow(WId view, int x, int y, int width, int height) const { - // TODO window should be handled - Q_UNUSED(window) + // Determine the grab rect. FIXME: The rect should be bounded by the view's + // geometry, but note that for the pixeltool use case that window will be the + // desktop widgets's view, which currently gets resized to fit one screen + // only, since its NSWindow has the NSWindowStyleMaskTitled flag set. + Q_UNUSED(view); + QRect grabRect = QRect(x, y, width, height); + qCDebug(lcQpaScreen) << "input grab rect" << grabRect; - const int maxDisplays = 128; // 128 displays should be enough for everyone. + // Find which displays to grab from, or all of them if the grab size is unspecified + const int maxDisplays = 128; CGDirectDisplayID displays[maxDisplays]; CGDisplayCount displayCount; - CGRect cgRect; - - if (width < 0 || height < 0) { - // get all displays - cgRect = CGRectInfinite; - } else { - cgRect = CGRectMake(x, y, width, height); - } + CGRect cgRect = (width < 0 || height < 0) ? CGRectInfinite : grabRect.toCGRect(); const CGDisplayErr err = CGGetDisplaysWithRect(cgRect, maxDisplays, displays, &displayCount); - - if (err && displayCount == 0) + if (err || displayCount == 0) return QPixmap(); - // calculate pixmap size - QSize windowSize(width, height); + // If the grab size is not specified, set it to be the bounding box of all screens, if (width < 0 || height < 0) { QRect windowRect; for (uint i = 0; i < displayCount; ++i) { - const CGRect cgRect = CGDisplayBounds(displays[i]); - QRect qRect(cgRect.origin.x, cgRect.origin.y, cgRect.size.width, cgRect.size.height); - windowRect = windowRect.united(qRect); + QRect displayBounds = QRectF::fromCGRect(CGDisplayBounds(displays[i])).toRect(); + windowRect = windowRect.united(displayBounds); } - if (width < 0) - windowSize.setWidth(windowRect.width()); - if (height < 0) - windowSize.setHeight(windowRect.height()); + if (grabRect.width() < 0) + grabRect.setWidth(windowRect.width()); + if (grabRect.height() < 0) + grabRect.setHeight(windowRect.height()); } - const qreal dpr = devicePixelRatio(); - QPixmap windowPixmap(windowSize * dpr); + qCDebug(lcQpaScreen) << "final grab rect" << grabRect << "from" << displayCount << "displays"; + + // Grab images from each display + QVector images; + QVector destinations; + for (uint i = 0; i < displayCount; ++i) { + auto display = displays[i]; + QRect displayBounds = QRectF::fromCGRect(CGDisplayBounds(display)).toRect(); + QRect grabBounds = displayBounds.intersected(grabRect); + QRect displayLocalGrabBounds = QRect(QPoint(grabBounds.topLeft() - displayBounds.topLeft()), grabBounds.size()); + QImage displayImage = qt_mac_toQImage(QCFType(CGDisplayCreateImageForRect(display, displayLocalGrabBounds.toCGRect()))); + displayImage.setDevicePixelRatio(displayImage.size().width() / displayLocalGrabBounds.size().width()); + images.append(displayImage); + QRect destBounds = QRect(QPoint(grabBounds.topLeft() - grabRect.topLeft()), grabBounds.size()); + destinations.append(destBounds); + qCDebug(lcQpaScreen) << "grab display" << i << "global" << grabBounds << "local" << displayLocalGrabBounds + << "grab image size" << displayImage.size() << "devicePixelRatio" << displayImage.devicePixelRatio(); + } + + // Determine the highest dpr, which becomes the dpr for the returned pixmap. + qreal dpr = 1.0; + for (uint i = 0; i < displayCount; ++i) + dpr = qMax(dpr, images.at(i).devicePixelRatio()); + + // Alocate target pixmap and draw each screen's content + qCDebug(lcQpaScreen) << "Create grap pixmap" << grabRect.size() << "at devicePixelRatio" << dpr; + QPixmap windowPixmap(grabRect.size() * dpr); windowPixmap.setDevicePixelRatio(dpr); windowPixmap.fill(Qt::transparent); + QPainter painter(&windowPixmap); + for (uint i = 0; i < displayCount; ++i) + painter.drawImage(destinations.at(i), images.at(i)); - for (uint i = 0; i < displayCount; ++i) { - const CGRect bounds = CGDisplayBounds(displays[i]); - - // Calculate the position and size of the requested area - QPoint pos(qAbs(bounds.origin.x - x), qAbs(bounds.origin.y - y)); - QSize size(qMin(width, qRound(bounds.size.width)), - qMin(height, qRound(bounds.size.height))); - pos *= dpr; - size *= dpr; - - // Take the whole screen and crop it afterwards, because CGDisplayCreateImageForRect - // has a strange behavior when mixing highDPI and non-highDPI displays - QCFType cgImage = CGDisplayCreateImage(displays[i]); - const QImage image = qt_mac_toQImage(cgImage); - - // Draw into windowPixmap only the requested size - QPainter painter(&windowPixmap); - painter.drawImage(windowPixmap.rect(), image, QRect(pos, size)); - } return windowPixmap; } From b926d5f919d2564cfdece497a87111a02e927db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 26 Nov 2018 23:01:50 +0100 Subject: [PATCH 48/73] CoreText: Remove handling of QFontEngineMulti's highByte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a leftover from when the Cocoa plugin used QFontEngineMulti exclusively. Nowadays QFontEngineMulti will strip out the highByte before calling into the real engine. Left an assert just in case.. Change-Id: I6cb26d20a908d7c3aaf096297fca160805fdb85b Reviewed-by: Simon Hausmann Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Tor Arne Vestbø --- src/gui/text/qfontengine.cpp | 2 +- src/gui/text/qfontengine_p.h | 2 ++ .../fontdatabases/mac/qfontengine_coretext.mm | 17 +++++------------ 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 9b0b0ec0d5..eb7e416dd1 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1755,7 +1755,7 @@ QImage QFontEngineBox::alphaMapForGlyph(glyph_t) // Multi engine // ------------------------------------------------------------------ -static inline uchar highByte(glyph_t glyph) +uchar QFontEngineMulti::highByte(glyph_t glyph) { return glyph >> 24; } // strip high byte from glyph diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index a411e9ce4c..708c79c2ae 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -485,6 +485,8 @@ public: void setFallbackFamiliesList(const QStringList &fallbackFamilies); + static uchar highByte(glyph_t glyph); // Used for determining engine + inline QFontEngine *engine(int at) const { Q_ASSERT(at < m_engines.size()); return m_engines.at(at); } diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 7fb22c0675..0f8727a13c 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -885,10 +885,8 @@ void QCoreTextFontEngine::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::Shap QVarLengthArray cgGlyphs(numGlyphs); for (int i = 0; i < numGlyphs; ++i) { - if (glyphs->glyphs[i] & 0xff000000) - cgGlyphs[i] = 0; - else - cgGlyphs[i] = glyphs->glyphs[i]; + Q_ASSERT(!QFontEngineMulti::highByte(glyphs->glyphs[i])); + cgGlyphs[i] = glyphs->glyphs[i]; } loadAdvancesForGlyphs(cgGlyphs, glyphs); @@ -901,14 +899,9 @@ void QCoreTextFontEngine::loadAdvancesForGlyphs(QVarLengthArray &cgGlyp CTFontGetAdvancesForGlyphs(ctfont, kCTFontOrientationHorizontal, cgGlyphs.data(), advances.data(), numGlyphs); for (int i = 0; i < numGlyphs; ++i) { - if (glyphs->glyphs[i] & 0xff000000) - continue; - glyphs->advances[i] = QFixed::fromReal(advances[i].width); - } - - if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { - for (int i = 0; i < numGlyphs; ++i) - glyphs->advances[i] = glyphs->advances[i].round(); + QFixed advance = QFixed::fromReal(advances[i].width); + glyphs->advances[i] = fontDef.styleStrategy & QFont::ForceIntegerMetrics + ? advance.round() : advance; } } From dae2e6be939e5efcb48bcbfa872d07727dffacb2 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Wed, 28 Nov 2018 19:19:13 +0100 Subject: [PATCH 49/73] Fusion style - avoid a warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... printed by QPainter when it gets a pixmap with one or both of dimensions equal to 0 (and a nullptr as a paintEngine). Task-number: QTBUG-71806 Change-Id: I978f56c843daab307042e34390fc33f338ce8cf5 Reviewed-by: Tor Arne Vestbø --- src/widgets/styles/qfusionstyle.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 5231f04df9..df151067df 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -247,6 +247,9 @@ static QLinearGradient qt_fusion_gradient(const QRect &rect, const QBrush &baseC static void qt_fusion_draw_arrow(Qt::ArrowType type, QPainter *painter, const QStyleOption *option, const QRect &rect, const QColor &color) { + if (rect.isEmpty()) + return; + const int arrowWidth = QStyleHelper::dpiScaled(14); const int arrowHeight = QStyleHelper::dpiScaled(8); From 64037f18d308c936848b7db2324bdb5dadb85a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 30 Nov 2018 12:03:58 +0100 Subject: [PATCH 50/73] CoreText: Respect QFont::NoSubpixelAntialias when deciding glyph format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I846758bce2fd7536f9941b11f23fc0e5d5bc6f1b Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Tor Arne Vestbø --- src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 0f8727a13c..a1299154cb 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -235,7 +235,7 @@ void QCoreTextFontEngine::init() if (traits & kCTFontColorGlyphsTrait) glyphFormat = QFontEngine::Format_ARGB; - else if (fontSmoothing() == FontSmoothing::Subpixel) + else if (shouldSmoothFont() && fontSmoothing() == FontSmoothing::Subpixel) glyphFormat = QFontEngine::Format_A32; else glyphFormat = QFontEngine::Format_A8; From 10f9bd82ea12f6015543d334bf6ac9c06b19667f Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 28 Nov 2018 12:32:00 +0100 Subject: [PATCH 51/73] ctest: Make cmake test pass if it has been run before We have to check if the directory exists before calling mkdir or the test will fail on every run but the first one. Change-Id: I36f10cfc18b3cb99990dc96190349ee00a0c1c4e Reviewed-by: Oswald Buddenhagen --- mkspecs/features/ctest_testcase_common.prf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf index 63e31f5415..ea90bf89cd 100644 --- a/mkspecs/features/ctest_testcase_common.prf +++ b/mkspecs/features/ctest_testcase_common.prf @@ -65,7 +65,8 @@ for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) { CMAKE_MODULES_UNDER_TEST = $$join(CMAKE_MODULES_UNDER_TEST, ;) check.commands = \ - $(MKDIR) $$BUILD_DIR && $$QMAKE_CD $$BUILD_DIR && \ + $$sprintf($$QMAKE_MKDIR_CMD, $$BUILD_DIR) $$escape_expand(\\n\\t) \ + $$QMAKE_CD $$BUILD_DIR && \ cmake $$CMAKE_TEST_LOCATION $$CMAKE_GENERATOR \ -DCMAKE_C_COMPILER=$$QMAKE_CC \ -DCMAKE_CXX_COMPILER=$$QMAKE_CXX \ From e11a3b3f3e41050e048a586a8de2bd68c5ed3cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 28 Nov 2018 12:17:58 +0100 Subject: [PATCH 52/73] CoreText: Base glyph fill color logic on font smoothing algorithm Change-Id: I22be1efb1f91048745008ea1b49186b39367d122 Reviewed-by: Lars Knoll --- .../fontdatabases/mac/qfontengine_coretext.mm | 57 +++++++++++-------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index a1299154cb..3dd3f468f2 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -748,37 +748,44 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition if (!im.width() || !im.height()) return im; -#if defined(Q_OS_MACOS) - CGColorRef glyphColor = CGColorGetConstantColor(kCGColorWhite); - if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave) { - // macOS 10.14 uses a new font smoothing algorithm that takes the fill color into - // account. This means our default approach of drawing white on black to produce - // the alpha map will result in non-native looking text when then drawn as black - // on white during the final blit. As a workaround we use the application's current - // appearance to decide whether to draw with white or black fill, and then invert - // the glyph image in the latter case, producing an alpha map. This covers the - // most common use-cases, but longer term we should propagate the fill color all - // the way from the paint engine, and include it in the key for the glyph cache. - if (!qt_mac_applicationIsInDarkMode()) - glyphColor = CGColorGetConstantColor(kCGColorBlack); - } - const bool blackOnWhiteGlyphs = !hasColorGlyphs() - && CGColorEqualToColor(glyphColor, CGColorGetConstantColor(kCGColorBlack)); - if (blackOnWhiteGlyphs) - im.fill(Qt::white); - else -#endif - im.fill(0); // Faster than Qt::black - QCFType colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); QCFType ctx = CGBitmapContextCreate(im.bits(), im.width(), im.height(), 8, im.bytesPerLine(), colorspace, qt_mac_bitmapInfoForImage(im)); Q_ASSERT(ctx); - CGContextSetFontSize(ctx, fontDef.pixelSize); CGContextSetShouldAntialias(ctx, shouldAntialias()); - CGContextSetShouldSmoothFonts(ctx, shouldSmoothFont()); + + const bool shouldSmooth = shouldSmoothFont(); + CGContextSetShouldSmoothFonts(ctx, shouldSmooth); + +#if defined(Q_OS_MACOS) + auto glyphColor = [&] { + if (shouldSmooth && fontSmoothing() == Grayscale) { + // The grayscale font smoothing algorithm introduced in macOS Mojave (10.14) adjusts + // its dilation (stem darkening) parameters based on the fill color. This means our + // default approach of drawing white on black to produce the alpha map will result + // in non-native looking text when then drawn as black on white during the final blit. + // As a workaround we use the application's current appearance to decide whether to + // draw with white or black fill, and then invert the glyph image in the latter case, + // producing an alpha map. This covers the most common use-cases, but longer term we + // should propagate the fill color all the way from the paint engine, and include it + //in the key for the glyph cache. + + if (!qt_mac_applicationIsInDarkMode()) + return kCGColorBlack; + } + return kCGColorWhite; + }(); + + const bool blackOnWhiteGlyphs = glyphColor == kCGColorBlack; + if (blackOnWhiteGlyphs) + im.fill(Qt::white); + else +#endif + im.fill(0); + + CGContextSetFontSize(ctx, fontDef.pixelSize); CGAffineTransform cgMatrix = CGAffineTransformIdentity; @@ -798,7 +805,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition if (!hasColorGlyphs()) { CGContextSetTextMatrix(ctx, cgMatrix); #if defined(Q_OS_MACOS) - CGContextSetFillColorWithColor(ctx, glyphColor); + CGContextSetFillColorWithColor(ctx, CGColorGetConstantColor(glyphColor)); #else CGContextSetRGBFillColor(ctx, 1, 1, 1, 1); #endif From 0de4b326d8e02c228ebefcac1abe069c45cbb5c4 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 26 Nov 2018 15:23:27 +0100 Subject: [PATCH 53/73] xcb: fix issue with dialogs hidden by other windows This was a regression from Qt4, due to not setting the window group leader in WM_HINTS property. Qt4 did set this property. It was not obvious that something was missing because of the similarly named WM_CLIENT_LEADER property, which we do set. Testing revealed that setting WM_CLIENT_LEADER is sufficient on some DEs, e.g. KDE, Unity, but did not have the desired effect on e.g Gnome and XFCE. EWMH/ICCCM specs are known to be ambiguous, WM_CLIENT_LEADER is only mentioned in the section on the session management, so it is not surprising that there is this inconsistency between various WMs. This patch merely restores a lost WM hint. This solves the reported issues on major desktops. If we support calling show() on a dialog before its parent has been shown is still an open question, which should be handled in QTBUG-72040. Task-number: QTBUG-56829 Fixes: QTBUG-46626 Fixes: QTBUG-70756 Task-number: QTBUG-72040 Change-Id: Id2c575850e5f4f5af3e57963c577d33572e30b6e Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 891fe6b155..65e1c71531 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -501,6 +501,8 @@ void QXcbWindow::create() // from various setter functions for adjusting the hints. xcb_wm_hints_t hints; memset(&hints, 0, sizeof(hints)); + hints.flags = XCB_ICCCM_WM_HINT_WINDOW_GROUP; + hints.window_group = connection()->clientLeader(); xcb_set_wm_hints(xcb_connection(), m_window, &hints); xcb_window_t leader = connection()->clientLeader(); From f2b4462f84d0b8b28da50141163890bbf7fe6174 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 1 Nov 2018 15:29:35 +0100 Subject: [PATCH 54/73] xcb: remove old work-around for building with util-wm Commits that added this code: 7ce8491280990350162933a0716d1b014f65aeb6 and f005dee1b3692a09e47782dcff9b5b07aa659b51 I guess this was a work-around, before we started bundling XCB libs a year later in 21bd66e1ea06e466754ab06ee2c5f8b737bb4bd7 0.3.8 was released in 2011-04-26 and we are bundling 0.3.9, so it is safe to remove the include work-around as well. Change-Id: I5794f40d86e10ebdad984aa4b61311979aaadcf3 Reviewed-by: Oswald Buddenhagen Reviewed-by: Frederik Gladhorn Reviewed-by: Shawn Rutledge --- src/gui/configure.json | 9 +-- src/plugins/platforms/xcb/qxcbwindow.cpp | 83 +++++++++--------------- 2 files changed, 31 insertions(+), 61 deletions(-) diff --git a/src/gui/configure.json b/src/gui/configure.json index 590e52d258..25ff553876 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -484,13 +484,8 @@ "xcb/xinerama.h", "xcb/sync.h", "xcb/randr.h", - "xcb/shm.h" - ], - "tail": [ - "// This workaround can be removed for xcb-icccm > 3.8", - "#define class class_name", - "#include ", - "#undef class" + "xcb/shm.h", + "xcb/xcb_icccm.h" ], "main": [ "int primaryScreen = 0;", diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 65e1c71531..3bfcbf2adb 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -64,38 +64,13 @@ #include -// FIXME This workaround can be removed for xcb-icccm > 3.8 -#define class class_name #include -#undef class #include #include #if QT_CONFIG(xcb_xinput) #include #endif -// xcb-icccm 3.8 support -#ifdef XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS -#define xcb_get_wm_hints_reply xcb_icccm_get_wm_hints_reply -#define xcb_get_wm_hints xcb_icccm_get_wm_hints -#define xcb_get_wm_hints_unchecked xcb_icccm_get_wm_hints_unchecked -#define xcb_set_wm_hints xcb_icccm_set_wm_hints -#define xcb_set_wm_normal_hints xcb_icccm_set_wm_normal_hints -#define xcb_size_hints_set_base_size xcb_icccm_size_hints_set_base_size -#define xcb_size_hints_set_max_size xcb_icccm_size_hints_set_max_size -#define xcb_size_hints_set_min_size xcb_icccm_size_hints_set_min_size -#define xcb_size_hints_set_position xcb_icccm_size_hints_set_position -#define xcb_size_hints_set_resize_inc xcb_icccm_size_hints_set_resize_inc -#define xcb_size_hints_set_size xcb_icccm_size_hints_set_size -#define xcb_size_hints_set_win_gravity xcb_icccm_size_hints_set_win_gravity -#define xcb_wm_hints_set_iconic xcb_icccm_wm_hints_set_iconic -#define xcb_wm_hints_set_normal xcb_icccm_wm_hints_set_normal -#define xcb_wm_hints_set_input xcb_icccm_wm_hints_set_input -#define xcb_wm_hints_t xcb_icccm_wm_hints_t -#define XCB_WM_STATE_ICONIC XCB_ICCCM_WM_STATE_ICONIC -#define XCB_WM_STATE_WITHDRAWN XCB_ICCCM_WM_STATE_WITHDRAWN -#endif - #include #include @@ -497,13 +472,13 @@ void QXcbWindow::create() clientMachine.size(), clientMachine.constData()); } - // Create WM_HINTS property on the window, so we can xcb_get_wm_hints*() + // Create WM_HINTS property on the window, so we can xcb_icccm_get_wm_hints*() // from various setter functions for adjusting the hints. - xcb_wm_hints_t hints; + xcb_icccm_wm_hints_t hints; memset(&hints, 0, sizeof(hints)); hints.flags = XCB_ICCCM_WM_HINT_WINDOW_GROUP; hints.window_group = connection()->clientLeader(); - xcb_set_wm_hints(xcb_connection(), m_window, &hints); + xcb_icccm_set_wm_hints(xcb_connection(), m_window, &hints); xcb_window_t leader = connection()->clientLeader(); xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, @@ -1200,7 +1175,7 @@ void QXcbWindow::setWindowState(Qt::WindowStates state) event.sequence = 0; event.window = m_window; event.type = atom(QXcbAtom::WM_CHANGE_STATE); - event.data.data32[0] = XCB_WM_STATE_ICONIC; + event.data.data32[0] = XCB_ICCCM_WM_STATE_ICONIC; event.data.data32[1] = 0; event.data.data32[2] = 0; event.data.data32[3] = 0; @@ -1214,14 +1189,14 @@ void QXcbWindow::setWindowState(Qt::WindowStates state) setNetWmState(state); - xcb_get_property_cookie_t cookie = xcb_get_wm_hints_unchecked(xcb_connection(), m_window); - xcb_wm_hints_t hints; - if (xcb_get_wm_hints_reply(xcb_connection(), cookie, &hints, nullptr)) { + xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_hints_unchecked(xcb_connection(), m_window); + xcb_icccm_wm_hints_t hints; + if (xcb_icccm_get_wm_hints_reply(xcb_connection(), cookie, &hints, nullptr)) { if (state & Qt::WindowMinimized) - xcb_wm_hints_set_iconic(&hints); + xcb_icccm_wm_hints_set_iconic(&hints); else - xcb_wm_hints_set_normal(&hints); - xcb_set_wm_hints(xcb_connection(), m_window, &hints); + xcb_icccm_wm_hints_set_normal(&hints); + xcb_icccm_set_wm_hints(xcb_connection(), m_window, &hints); } connection()->sync(); @@ -1302,14 +1277,14 @@ void QXcbWindow::setTransparentForMouseEvents(bool transparent) void QXcbWindow::updateDoesNotAcceptFocus(bool doesNotAcceptFocus) { - xcb_get_property_cookie_t cookie = xcb_get_wm_hints_unchecked(xcb_connection(), m_window); + xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_hints_unchecked(xcb_connection(), m_window); - xcb_wm_hints_t hints; - if (!xcb_get_wm_hints_reply(xcb_connection(), cookie, &hints, nullptr)) + xcb_icccm_wm_hints_t hints; + if (!xcb_icccm_get_wm_hints_reply(xcb_connection(), cookie, &hints, nullptr)) return; - xcb_wm_hints_set_input(&hints, !doesNotAcceptFocus); - xcb_set_wm_hints(xcb_connection(), m_window, &hints); + xcb_icccm_wm_hints_set_input(&hints, !doesNotAcceptFocus); + xcb_icccm_set_wm_hints(xcb_connection(), m_window, &hints); } WId QXcbWindow::winId() const @@ -1417,9 +1392,9 @@ void QXcbWindow::propagateSizeHints() QWindowPrivate *win = qt_window_private(window()); if (!win->positionAutomatic) - xcb_size_hints_set_position(&hints, true, rect.x(), rect.y()); + xcb_icccm_size_hints_set_position(&hints, true, rect.x(), rect.y()); if (rect.width() < QWINDOWSIZE_MAX || rect.height() < QWINDOWSIZE_MAX) - xcb_size_hints_set_size(&hints, true, rect.width(), rect.height()); + xcb_icccm_size_hints_set_size(&hints, true, rect.width(), rect.height()); /* Gravity describes how to interpret x and y values the next time window needs to be positioned on a screen. @@ -1428,7 +1403,7 @@ void QXcbWindow::propagateSizeHints() auto gravity = win->positionPolicy == QWindowPrivate::WindowFrameInclusive ? XCB_GRAVITY_NORTH_WEST : XCB_GRAVITY_STATIC; - xcb_size_hints_set_win_gravity(&hints, gravity); + xcb_icccm_size_hints_set_win_gravity(&hints, gravity); QSize minimumSize = windowMinimumSize(); QSize maximumSize = windowMaximumSize(); @@ -1436,21 +1411,21 @@ void QXcbWindow::propagateSizeHints() QSize sizeIncrement = windowSizeIncrement(); if (minimumSize.width() > 0 || minimumSize.height() > 0) - xcb_size_hints_set_min_size(&hints, - qMin(XCOORD_MAX,minimumSize.width()), - qMin(XCOORD_MAX,minimumSize.height())); + xcb_icccm_size_hints_set_min_size(&hints, + qMin(XCOORD_MAX,minimumSize.width()), + qMin(XCOORD_MAX,minimumSize.height())); if (maximumSize.width() < QWINDOWSIZE_MAX || maximumSize.height() < QWINDOWSIZE_MAX) - xcb_size_hints_set_max_size(&hints, - qMin(XCOORD_MAX, maximumSize.width()), - qMin(XCOORD_MAX, maximumSize.height())); + xcb_icccm_size_hints_set_max_size(&hints, + qMin(XCOORD_MAX, maximumSize.width()), + qMin(XCOORD_MAX, maximumSize.height())); if (sizeIncrement.width() > 0 || sizeIncrement.height() > 0) { - xcb_size_hints_set_base_size(&hints, baseSize.width(), baseSize.height()); - xcb_size_hints_set_resize_inc(&hints, sizeIncrement.width(), sizeIncrement.height()); + xcb_icccm_size_hints_set_base_size(&hints, baseSize.width(), baseSize.height()); + xcb_icccm_size_hints_set_resize_inc(&hints, sizeIncrement.width(), sizeIncrement.height()); } - xcb_set_wm_normal_hints(xcb_connection(), m_window, &hints); + xcb_icccm_set_wm_normal_hints(xcb_connection(), m_window, &hints); } void QXcbWindow::requestActivateWindow() @@ -2257,8 +2232,8 @@ void QXcbWindow::handlePropertyNotifyEvent(const xcb_property_notify_event_t *ev if (reply && reply->format == 32 && reply->type == atom(QXcbAtom::WM_STATE)) { const quint32 *data = (const quint32 *)xcb_get_property_value(reply.get()); if (reply->length != 0) - m_minimized = (data[0] == XCB_WM_STATE_ICONIC - || (data[0] == XCB_WM_STATE_WITHDRAWN && m_minimized)); + m_minimized = (data[0] == XCB_ICCCM_WM_STATE_ICONIC + || (data[0] == XCB_ICCCM_WM_STATE_WITHDRAWN && m_minimized)); } } if (m_minimized) From 042707a6339cff6795d8d2ea08f927924f218a7b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 22 Nov 2018 17:17:21 +0100 Subject: [PATCH 55/73] Avoid invalid qmake code in macOS-specific pluginloader test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You cannot manipulate variables in custom target dependencies, so the following code was invalid: i386_d.depends = EXPORT_VALID_ARCHS=i386 In order to still build the fat binary, we split the project in four, one for each architecture, plus one to create the final package. Change-Id: If08cf54e2e4098a7e10df41b7ea8d2bf699f58be Reviewed-by: Oswald Buddenhagen Reviewed-by: Tor Arne Vestbø --- .../qpluginloader/machtest/machtest.pri | 13 ++++ .../qpluginloader/machtest/machtest.pro | 73 +++---------------- .../qpluginloader/machtest/machtest_fat.pro | 41 +++++++++++ .../qpluginloader/machtest/machtest_i386.pro | 3 + .../qpluginloader/machtest/machtest_ppc64.pro | 9 +++ .../machtest/machtest_x86_64.pro | 2 + 6 files changed, 80 insertions(+), 61 deletions(-) create mode 100644 tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pri create mode 100644 tests/auto/corelib/plugin/qpluginloader/machtest/machtest_fat.pro create mode 100644 tests/auto/corelib/plugin/qpluginloader/machtest/machtest_i386.pro create mode 100644 tests/auto/corelib/plugin/qpluginloader/machtest/machtest_ppc64.pro create mode 100644 tests/auto/corelib/plugin/qpluginloader/machtest/machtest_x86_64.pro diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pri b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pri new file mode 100644 index 0000000000..ca4a0a07e9 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pri @@ -0,0 +1,13 @@ +TEMPLATE = aux + +# Needs explicit load()ing due to aux template. Relies on QT being non-empty. +load(qt) + +goodlib.target = good.$${QMAKE_APPLE_DEVICE_ARCHS}.dylib +goodlib.commands = $(CXX) $(CXXFLAGS) -shared -o $@ -I$(INCPATH) $< +goodlib.depends += $$PWD/../fakeplugin.cpp + +all.depends += goodlib + +QMAKE_EXTRA_TARGETS += goodlib all +QMAKE_CLEAN += $$goodlib.target diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro index 7f7caa7f76..795dd89895 100644 --- a/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro +++ b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro @@ -1,64 +1,15 @@ -TEMPLATE = aux -OTHER_FILES += \ - ppcconverter.pl \ - generate-bad.pl +TEMPLATE = subdirs -# Needs explicit load()ing due to aux template. Relies on QT being non-empty. -load(qt) - -i386_d.target = good.i386.dylib -i386_d.depends = EXPORT_VALID_ARCHS=i386 -i386.target = good.i386.dylib -i386.commands = $(CXX) $(CXXFLAGS) -shared -o $@ -I$(INCPATH) $< -i386.depends += $$PWD/../fakeplugin.cpp - -x86_64_d.target = good.x86_64.dylib -x86_64_d.depends = EXPORT_VALID_ARCHS=x86_64 -x86_64.target = good.x86_64.dylib -x86_64.commands = $(CXX) $(CXXFLAGS) -shared -o $@ -I$(INCPATH) $< -x86_64.depends += $$PWD/../fakeplugin.cpp - -# Current Mac OS X toolchains have no compiler for PPC anymore -# So we fake it by converting an x86-64 binary to (little-endian!) PPC64 -ppc64.target = good.ppc64.dylib -ppc64.commands = $$PWD/ppcconverter.pl $< $@ -ppc64.depends = x86_64 $$PWD/ppcconverter.pl - -# Generate a fat binary with three architectures -fat_all.target = good.fat.all.dylib -fat_all.commands = lipo -create -output $@ \ - -arch ppc64 $$ppc64.target \ - -arch i386 $$i386.target \ - -arch x86_64 $$x86_64.target -fat_all.depends += i386 x86_64 ppc64 - -fat_no_i386.target = good.fat.no-i386.dylib -fat_no_i386.commands = lipo -create -output $@ -arch x86_64 $$x86_64.target -arch ppc64 $$ppc64.target -fat_no_i386.depends += x86_64 ppc64 - -fat_no_x86_64.target = good.fat.no-x86_64.dylib -fat_no_x86_64.commands = lipo -create -output $@ -arch i386 $$i386.target -arch ppc64 $$ppc64.target -fat_no_x86_64.depends += i386 ppc64 - -fat_stub_i386.target = good.fat.stub-i386.dylib -fat_stub_i386.commands = lipo -create -output $@ -arch ppc64 $$ppc64.target -arch_blank i386 -fat_stub_i386.depends += x86_64 ppc64 - -fat_stub_x86_64.target = good.fat.stub-x86_64.dylib -fat_stub_x86_64.commands = lipo -create -output $@ -arch ppc64 $$ppc64.target -arch_blank x86_64 -fat_stub_x86_64.depends += i386 ppc64 - -bad.commands = $$PWD/generate-bad.pl -bad.depends += $$PWD/generate-bad.pl - -MYTARGETS = $$fat_all.depends fat_all fat_no_x86_64 fat_no_i386 \ - fat_stub_i386 fat_stub_x86_64 bad -all.depends += $$MYTARGETS -QMAKE_EXTRA_TARGETS += i386_d x86_64_d $$MYTARGETS all - -QMAKE_CLEAN += $$i386.target $$x86_64.target $$ppc64.target $$fat_all.target \ - $$fat_no_i386.target $$fat_no_x86_64.target \ - $$fat_stub_i386.target $$fat_stub_x86_64.target \ - "bad*.dylib" +SUBDIRS = \ + machtest_i386.pro \ + machtest_x86_64.pro \ + machtest_ppc64.pro \ + machtest_fat.pro +machtest_fat-pro.depends = \ + machtest_i386.pro \ + machtest_x86_64.pro \ + machtest_ppc64.pro +machtest_ppc64-pro.depends = \ + machtest_x86_64.pro diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_fat.pro b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_fat.pro new file mode 100644 index 0000000000..8daa343e2b --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_fat.pro @@ -0,0 +1,41 @@ +TEMPLATE = aux +OTHER_FILES += generate-bad.pl + +# Needs explicit load()ing due to aux template. Relies on QT being non-empty. +load(qt) + +# Generate a fat binary with three architectures +fat_all.target = good.fat.all.dylib +fat_all.commands = lipo -create -output $@ \ + -arch ppc64 good.ppc64.dylib \ + -arch i386 good.i386.dylib \ + -arch x86_64 good.x86_64.dylib +fat_all.depends += good.i386.dylib good.x86_64.dylib good.ppc64.dylib + +fat_no_i386.target = good.fat.no-i386.dylib +fat_no_i386.commands = lipo -create -output $@ -arch x86_64 good.x86_64.dylib -arch ppc64 good.ppc64.dylib +fat_no_i386.depends += good.x86_64.dylib good.ppc64.dylib + +fat_no_x86_64.target = good.fat.no-x86_64.dylib +fat_no_x86_64.commands = lipo -create -output $@ -arch i386 good.i386.dylib -arch ppc64 good.ppc64.dylib +fat_no_x86_64.depends += good.i386.dylib good.ppc64.dylib + +fat_stub_i386.target = good.fat.stub-i386.dylib +fat_stub_i386.commands = lipo -create -output $@ -arch ppc64 good.ppc64.dylib -arch_blank i386 +fat_stub_i386.depends += good.x86_64.dylib good.ppc64.dylib + +fat_stub_x86_64.target = good.fat.stub-x86_64.dylib +fat_stub_x86_64.commands = lipo -create -output $@ -arch ppc64 good.ppc64.dylib -arch_blank x86_64 +fat_stub_x86_64.depends += good.i386.dylib good.ppc64.dylib + +bad.commands = $$PWD/generate-bad.pl +bad.depends += $$PWD/generate-bad.pl + +MYTARGETS = $$fat_all.depends fat_all fat_no_x86_64 fat_no_i386 \ + fat_stub_i386 fat_stub_x86_64 bad +all.depends += $$MYTARGETS +QMAKE_EXTRA_TARGETS += $$MYTARGETS all + +QMAKE_CLEAN += $$fat_all.target $$fat_no_i386.target $$fat_no_x86_64.target \ + $$fat_stub_i386.target $$fat_stub_x86_64.target \ + "bad*.dylib" diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_i386.pro b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_i386.pro new file mode 100644 index 0000000000..bfb2e0930c --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_i386.pro @@ -0,0 +1,3 @@ +QMAKE_APPLE_DEVICE_ARCHS = i386 +include(machtest.pri) + diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_ppc64.pro b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_ppc64.pro new file mode 100644 index 0000000000..a73f97ccc6 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_ppc64.pro @@ -0,0 +1,9 @@ +QMAKE_APPLE_DEVICE_ARCHS = ppc64 +include(machtest.pri) + +OTHER_FILES += ppcconverter.pl + +# Current macOS toolchains have no compiler for PPC anymore +# So we fake it by converting an x86-64 binary to (little-endian!) PPC64 +goodlib.commands = $$PWD/ppcconverter.pl $< $@ +goodlib.depends = good.x86_64.dylib $$PWD/ppcconverter.pl diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_x86_64.pro b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_x86_64.pro new file mode 100644 index 0000000000..9dbae5c4ee --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/machtest/machtest_x86_64.pro @@ -0,0 +1,2 @@ +QMAKE_APPLE_DEVICE_ARCHS = x86_64 +include(machtest.pri) From 2afe4a1a074096a3a6476aae21e732c418717da7 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 28 Nov 2018 14:56:45 +0100 Subject: [PATCH 56/73] Android: Don't use blocking queued when suspending the application If the application gets suspended when a blocking queued connection is made then it will cause the application to hang when being resumed. Therefore a check is needed to still post the event to the other thread but in a non blocking manner so that it does not cause a hang on return. Fixes: QTBUG-72101 Change-Id: I6d53c97ed6d9d500559da2a9fd195226d1fc9905 Reviewed-by: BogDan Vatra --- src/plugins/platforms/android/qandroidinputcontext.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp index c5cd0b92d9..7b3546f9bb 100644 --- a/src/plugins/platforms/android/qandroidinputcontext.cpp +++ b/src/plugins/platforms/android/qandroidinputcontext.cpp @@ -99,9 +99,13 @@ static jfieldID m_selectionStartFieldID = 0; static jfieldID m_startOffsetFieldID = 0; static jfieldID m_textFieldID = 0; +Q_DECLARE_METATYPE(std::function) + static void runOnQtThread(const std::function &func) { - QMetaObject::invokeMethod(m_androidInputContext, "safeCall", Qt::BlockingQueuedConnection, Q_ARG(std::function, func)); + const bool block = QGuiApplication::applicationState() >= Qt::ApplicationInactive; + QMetaObject::invokeMethod(m_androidInputContext, "safeCall", + block ? Qt::BlockingQueuedConnection : Qt::QueuedConnection, Q_ARG(std::function, func)); } static jboolean beginBatchEdit(JNIEnv */*env*/, jobject /*thiz*/) @@ -512,6 +516,7 @@ QAndroidInputContext::QAndroidInputContext() m_handleMode = Hidden; updateSelectionHandles(); }); + qRegisterMetaType>(); } QAndroidInputContext::~QAndroidInputContext() From 5ed471a80a5a88b26db31adf7bc673b5026cc907 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 5 Nov 2018 15:13:22 +0100 Subject: [PATCH 57/73] qmake: Escape '=' in dependency paths for unix make '=' cannot be handled in the same manner as other "critical" characters as no amount of backslashes will escape it. Use a variable instead. The documentation for nmake suggests that '=' in file names is not among the "Special Characters in a Makefile". Therefore, we assume nmake can handle it and don't escape it. Fixes: QTBUG-67262 Change-Id: Ib60f808d7d4e981c98f7d8bf2075d55b2b7f3b7d Reviewed-by: Oswald Buddenhagen Reviewed-by: Michael Brasser --- qmake/generators/makefile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index b7e591d2ab..7247d1f8df 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2325,6 +2325,7 @@ MakefileGenerator::writeHeader(QTextStream &t) if (ofile.lastIndexOf(Option::dir_sep) != -1) ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1); t << "MAKEFILE = " << escapeFilePath(ofile) << endl << endl; + t << "EQ = =\n\n"; } QList @@ -2869,6 +2870,7 @@ MakefileGenerator::escapeDependencyPath(const QString &path) const static const QRegExp criticalChars(QStringLiteral("([\t #])")); #endif ret.replace(criticalChars, QStringLiteral("\\\\1")); + ret.replace(QLatin1Char('='), QStringLiteral("$(EQ)")); debug_msg(2, "escapeDependencyPath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData()); } return ret; From 58e66a2573e40cc3e12a5479575a8ecbef1be6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 27 Nov 2018 19:13:54 +0100 Subject: [PATCH 58/73] CoreText: Define font smoothing gamma along with rest of relevant code Change-Id: I57909603732de6c1a91c744a358968941e64acdf Reviewed-by: Lars Knoll --- .../fontdatabases/mac/qfontengine_coretext.mm | 5 +++++ .../fontdatabases/mac/qfontengine_coretext_p.h | 1 + src/plugins/platforms/cocoa/qcocoaintegration.mm | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 3dd3f468f2..19b450b643 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -739,6 +739,11 @@ bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const return shouldSmoothFont(); } +qreal QCoreTextFontEngine::fontSmoothingGamma() +{ + return 2.0; +} + QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix) { glyph_metrics_t br = alphaMapBoundingBox(glyph, subPixelPosition, matrix, glyphFormat); diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index 28810f13bc..4064507058 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -127,6 +127,7 @@ public: Q_ENUM(FontSmoothing); static FontSmoothing fontSmoothing(); + static qreal fontSmoothingGamma(); static bool ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length); static QFont::Weight qtWeightFromCFWeight(float value); diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 1bd1029863..f6a49dd74f 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -63,6 +63,8 @@ #include +#include + #ifdef QT_WIDGETS_LIB #include #if QT_CONFIG(filedialog) @@ -477,7 +479,7 @@ QCocoaServices *QCocoaIntegration::services() const QVariant QCocoaIntegration::styleHint(StyleHint hint) const { if (hint == QPlatformIntegration::FontSmoothingGamma) - return 2.0; + return QCoreTextFontEngine::fontSmoothingGamma(); return QPlatformIntegration::styleHint(hint); } From c0dd44556454ce0fa451f83decdad3931a6deaec Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Fri, 30 Nov 2018 12:49:01 +0200 Subject: [PATCH 59/73] Fix a nullptr compile error with gcc 4.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit template argument deduction/substitution failed: qtbase/tests/auto/corelib/kernel/qobject/tst_qobject.cpp:6756:71: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘std::nullptr_t’ Change-Id: I8e7872457d1fc30c4b29e96c16091915264f9bce Reviewed-by: Simon Hausmann --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index effc82261b..06254091cd 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -6750,16 +6750,16 @@ void tst_QObject::connectWarnings() r1.reset(); QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, ReceiverObject): invalid null parameter"); - connect(nullptr, &SubSender::signal1, &r1, &ReceiverObject::slot1); + connect(static_cast(nullptr), &SubSender::signal1, &r1, &ReceiverObject::slot1); QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SubSender, Unknown): invalid null parameter"); - connect(&sub, &SubSender::signal1, nullptr, &ReceiverObject::slot1); + connect(&sub, &SubSender::signal1, static_cast(nullptr), &ReceiverObject::slot1); QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, ReceiverObject): invalid null parameter"); - connect(nullptr, &SenderObject::signal1, &r1, &ReceiverObject::slot1); + connect(static_cast(nullptr), &SenderObject::signal1, &r1, &ReceiverObject::slot1); QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, Unknown): invalid null parameter"); - connect(&obj, &SenderObject::signal1, nullptr, &ReceiverObject::slot1); + connect(&obj, &SenderObject::signal1, static_cast(nullptr), &ReceiverObject::slot1); } struct QmlReceiver : public QtPrivate::QSlotObjectBase From 096d87c8b01a32083d6819516be17050b0f183a9 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 30 Nov 2018 14:15:45 +0100 Subject: [PATCH 60/73] OpenSSL context (1.1) - make the if-fery/switch less ugly no need in duplicating DTLS-specific cases. Change-Id: I475c6fb53daa44d60a5054bf3acc8474355b2186 Reviewed-by: Edward Welbourne --- src/network/ssl/qsslcontext_openssl11.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/network/ssl/qsslcontext_openssl11.cpp b/src/network/ssl/qsslcontext_openssl11.cpp index 02ce466c80..c96a48dac1 100644 --- a/src/network/ssl/qsslcontext_openssl11.cpp +++ b/src/network/ssl/qsslcontext_openssl11.cpp @@ -97,24 +97,20 @@ init_context: unsupportedProtocol = true; } else { switch (sslContext->sslConfiguration.protocol()) { -#if QT_CONFIG(dtls) case QSsl::DtlsV1_0: case QSsl::DtlsV1_0OrLater: case QSsl::DtlsV1_2: case QSsl::DtlsV1_2OrLater: +#if QT_CONFIG(dtls) isDtls = true; sslContext->ctx = q_SSL_CTX_new(client ? q_DTLS_client_method() : q_DTLS_server_method()); - break; #else // dtls - case QSsl::DtlsV1_0: - case QSsl::DtlsV1_0OrLater: - case QSsl::DtlsV1_2: - case QSsl::DtlsV1_2OrLater: sslContext->ctx = nullptr; unsupportedProtocol = true; qCWarning(lcSsl, "DTLS protocol requested, but feature 'dtls' is disabled"); - break; + #endif // dtls + break; case QSsl::TlsV1_3: case QSsl::TlsV1_3OrLater: #if !defined(TLS1_3_VERSION) From d23d146175d6fab2ede50818777afe248ca0be23 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 29 Nov 2018 11:57:51 +0100 Subject: [PATCH 61/73] Fix alignment of temporary QRgba64 buffers on win32 The alignment of long long on 32-bit windows is only 32-bits, but we should be safe to assume it is aligned at 64-bit. Since QRgba64 is a public type, we can't fix the alignment there without breaking ABI, so instead fix it where temporary buffers are allocated. At the same time be consistent about using QRgba64 so we can switch to it enforcing alignment in Qt6. Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97 Reviewed-by: Thiago Macieira --- src/gui/painting/qdrawhelper.cpp | 64 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index bbeb9fd9ea..ca3590e280 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -3500,8 +3500,8 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf uint sbuf1[BufferSize]; uint sbuf2[BufferSize]; - QRgba64 buf1[BufferSize]; - QRgba64 buf2[BufferSize]; + alignas(8) QRgba64 buf1[BufferSize]; + alignas(8) QRgba64 buf2[BufferSize]; QRgba64 *end = buffer + length; QRgba64 *b = buffer; @@ -3658,8 +3658,8 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint64(QRgba64 *buf const qreal cx = x + qreal(0.5); const qreal cy = y + qreal(0.5); - QRgba64 buf1[BufferSize]; - QRgba64 buf2[BufferSize]; + alignas(8) QRgba64 buf1[BufferSize]; + alignas(8) QRgba64 buf2[BufferSize]; QRgba64 *end = buffer + length; QRgba64 *b = buffer; @@ -4371,7 +4371,7 @@ void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData) return blend_color_generic(count, spans, userData); } - quint64 buffer[BufferSize]; + alignas(8) QRgba64 buffer[BufferSize]; const QRgba64 color = data->solid.color; bool solidFill = data->rasterBuffer->compositionMode == QPainter::CompositionMode_Source || (data->rasterBuffer->compositionMode == QPainter::CompositionMode_SourceOver && color.isOpaque()); @@ -4392,7 +4392,7 @@ void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData) while (length) { int l = qMin(BufferSize, length); - QRgba64 *dest = op.destFetch64((QRgba64 *)buffer, data->rasterBuffer, x, spans->y, l); + QRgba64 *dest = op.destFetch64(buffer, data->rasterBuffer, x, spans->y, l); op.funcSolid64(dest, l, color, spans->coverage); if (op.destStore64) op.destStore64(data->rasterBuffer, x, spans->y, dest, l); @@ -4544,8 +4544,8 @@ struct QBlendBase BlendType *dest; - BlendType buffer[BufferSize]; - BlendType src_buffer[BufferSize]; + alignas(8) BlendType buffer[BufferSize]; + alignas(8) BlendType src_buffer[BufferSize]; }; class BlendSrcGeneric : public QBlendBase @@ -4574,11 +4574,11 @@ public: } }; -class BlendSrcGenericRGB64 : public QBlendBase +class BlendSrcGenericRGB64 : public QBlendBase { public: BlendSrcGenericRGB64(QSpanData *d, const Operator &o) - : QBlendBase(d, o) + : QBlendBase(d, o) { } @@ -4587,21 +4587,21 @@ public: return op.func64 && op.destFetch64; } - const quint64 *fetch(int x, int y, int len) + const QRgba64 *fetch(int x, int y, int len) { - dest = (quint64 *)op.destFetch64((QRgba64 *)buffer, data->rasterBuffer, x, y, len); - return (const quint64 *)op.srcFetch64((QRgba64 *)src_buffer, &op, data, y, x, len); + dest = op.destFetch64(buffer, data->rasterBuffer, x, y, len); + return op.srcFetch64(src_buffer, &op, data, y, x, len); } - void process(int, int, int len, int coverage, const quint64 *src, int offset) + void process(int, int, int len, int coverage, const QRgba64 *src, int offset) { - op.func64((QRgba64 *)dest + offset, (const QRgba64 *)src + offset, len, coverage); + op.func64(dest + offset, src + offset, len, coverage); } void store(int x, int y, int len) { if (op.destStore64) - op.destStore64(data->rasterBuffer, x, y, (QRgba64 *)dest, len); + op.destStore64(data->rasterBuffer, x, y, dest, len); } }; @@ -4680,8 +4680,8 @@ static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, voi qCDebug(lcQtGuiDrawHelper, "blend_untransformed_generic_rgb64: unsupported 64-bit blend attempted, falling back to 32-bit"); return blend_untransformed_generic(count, spans, userData); } - quint64 buffer[BufferSize]; - quint64 src_buffer[BufferSize]; + alignas(8) QRgba64 buffer[BufferSize]; + alignas(8) QRgba64 src_buffer[BufferSize]; const int image_width = data->texture.width; const int image_height = data->texture.height; @@ -4705,8 +4705,8 @@ static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, voi const int coverage = (spans->coverage * data->texture.const_alpha) >> 8; while (length) { int l = qMin(BufferSize, length); - const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, l); - QRgba64 *dest = op.destFetch64((QRgba64 *)buffer, data->rasterBuffer, x, spans->y, l); + const QRgba64 *src = op.srcFetch64(src_buffer, &op, data, sy, sx, l); + QRgba64 *dest = op.destFetch64(buffer, data->rasterBuffer, x, spans->y, l); op.func64(dest, src, l, coverage); if (op.destStore64) op.destStore64(data->rasterBuffer, x, spans->y, dest, l); @@ -4922,8 +4922,8 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD qCDebug(lcQtGuiDrawHelper, "blend_tiled_generic_rgb64: unsupported 64-bit blend attempted, falling back to 32-bit"); return blend_tiled_generic(count, spans, userData); } - quint64 buffer[BufferSize]; - quint64 src_buffer[BufferSize]; + alignas(8) QRgba64 buffer[BufferSize]; + alignas(8) QRgba64 src_buffer[BufferSize]; const int image_width = data->texture.width; const int image_height = data->texture.height; @@ -4952,7 +4952,7 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD int sl = qMin(image_width, length); if (sx > 0 && sl > 0) { int l = qMin(image_width - sx, sl); - const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, l); + const QRgba64 *src = op.srcFetch64(src_buffer, &op, data, sy, sx, l); op.destStore64(data->rasterBuffer, x, y, src, l); x += l; sx += l; @@ -4962,7 +4962,7 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD } if (sl > 0) { Q_ASSERT(sx == 0); - const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, sl); + const QRgba64 *src = op.srcFetch64(src_buffer, &op, data, sy, sx, sl); op.destStore64(data->rasterBuffer, x, y, src, sl); x += sl; sx += sl; @@ -4994,8 +4994,8 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD int l = qMin(image_width - sx, length); if (BufferSize < l) l = BufferSize; - const QRgba64 *src = op.srcFetch64((QRgba64 *)src_buffer, &op, data, sy, sx, l); - QRgba64 *dest = op.destFetch64((QRgba64 *)buffer, data->rasterBuffer, x, spans->y, l); + const QRgba64 *src = op.srcFetch64(src_buffer, &op, data, sy, sx, l); + QRgba64 *dest = op.destFetch64(buffer, data->rasterBuffer, x, spans->y, l); op.func64(dest, src, l, coverage); if (op.destStore64) op.destStore64(data->rasterBuffer, x, spans->y, dest, l); @@ -5472,7 +5472,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer, srcColor = colorProfile->toLinear(srcColor.unpremultiplied()).premultiplied(); } - quint64 buffer[BufferSize]; + alignas(8) QRgba64 buffer[BufferSize]; const DestFetchProc64 destFetch64 = destFetchProc64[rasterBuffer->format]; const DestStoreProc64 destStore64 = destStoreProc64[rasterBuffer->format]; @@ -5482,7 +5482,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer, int length = mapWidth; while (length > 0) { int l = qMin(BufferSize, length); - QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, i, y + ly, l); + QRgba64 *dest = destFetch64(buffer, rasterBuffer, i, y + ly, l); for (int j=0; j < l; ++j) { const int coverage = map[j + (i - x)]; alphamapblend_generic(coverage, dest, j, srcColor, color, colorProfile); @@ -5512,7 +5512,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer, if (end <= start) continue; Q_ASSERT(end - start <= BufferSize); - QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start); + QRgba64 *dest = destFetch64(buffer, rasterBuffer, start, clip.y, end - start); for (int xp=start; xptoLinear(srcColor.unpremultiplied()).premultiplied(); } - quint64 buffer[BufferSize]; + alignas(8) QRgba64 buffer[BufferSize]; const DestFetchProc64 destFetch64 = destFetchProc64[rasterBuffer->format]; const DestStoreProc64 destStore64 = destStoreProc64[rasterBuffer->format]; @@ -5801,7 +5801,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer, int length = mapWidth; while (length > 0) { int l = qMin(BufferSize, length); - QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, i, y + ly, l); + QRgba64 *dest = destFetch64(buffer, rasterBuffer, i, y + ly, l); for (int j=0; j < l; ++j) { const uint coverage = src[j + (i - x)]; alphargbblend_generic(coverage, dest, j, srcColor, color, colorProfile); @@ -5831,7 +5831,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer, if (end <= start) continue; Q_ASSERT(end - start <= BufferSize); - QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start); + QRgba64 *dest = destFetch64(buffer, rasterBuffer, start, clip.y, end - start); for (int xp=start; xp Date: Fri, 9 Nov 2018 17:56:08 +0100 Subject: [PATCH 62/73] Read font selection flags and use them when querying for metrics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Certain fonts with multiple styles have the same family name. When loading these as application fonts we were not specific enough when querying for the text metrics. This meant that e.g. the bold version in a font family would get the metrics of the regular one. Fixes: QTBUG-67273 Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6 Reviewed-by: Mårten Nordheim Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../windows/qwindowsfontdatabase.cpp | 39 +++++++++++++++--- .../windows/qwindowsfontdatabase_p.h | 8 ++++ .../auto/gui/text/qfontdatabase/testdata.qrc | 1 + .../text/qfontdatabase/tst_qfontdatabase.cpp | 29 +++++++++++++ .../auto/shared/resources/testfont_italic.ttf | Bin 0 -> 64136 bytes 5 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 tests/auto/shared/resources/testfont_italic.ttf diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp index c70d507b99..9ff50bdf05 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp @@ -1490,7 +1490,8 @@ static void getFontTable(const uchar *fileBegin, const uchar *data, quint32 tag, static void getFamiliesAndSignatures(const QByteArray &fontData, QList *families, - QVector *signatures) + QVector *signatures, + QVector *values) { const uchar *data = reinterpret_cast(fontData.constData()); @@ -1511,9 +1512,25 @@ static void getFamiliesAndSignatures(const QByteArray &fontData, families->append(qMove(names)); + if (values || signatures) + getFontTable(data, font, MAKE_TAG('O', 'S', '/', '2'), &table, &length); + + if (values) { + QFontValues fontValues; + if (table && length >= 64) { + // Read in some details about the font, offset calculated based on the specification + fontValues.weight = qFromBigEndian(table + 4); + + quint16 fsSelection = qFromBigEndian(table + 62); + fontValues.isItalic = (fsSelection & 1) != 0; + fontValues.isUnderlined = (fsSelection & (1 << 1)) != 0; + fontValues.isOverstruck = (fsSelection & (1 << 4)) != 0; + } + values->append(std::move(fontValues)); + } + if (signatures) { FONTSIGNATURE signature; - getFontTable(data, font, MAKE_TAG('O', 'S', '/', '2'), &table, &length); if (table && length >= 86) { // Offsets taken from OS/2 table in the TrueType spec signature.fsUsb[0] = qFromBigEndian(table + 42); @@ -1536,11 +1553,12 @@ QStringList QWindowsFontDatabase::addApplicationFont(const QByteArray &fontData, WinApplicationFont font; font.fileName = fileName; QVector signatures; + QVector fontValues; QList families; QStringList familyNames; if (!fontData.isEmpty()) { - getFamiliesAndSignatures(fontData, &families, &signatures); + getFamiliesAndSignatures(fontData, &families, &signatures, &fontValues); if (families.isEmpty()) return familyNames; @@ -1553,14 +1571,23 @@ QStringList QWindowsFontDatabase::addApplicationFont(const QByteArray &fontData, // Memory fonts won't show up in enumeration, so do add them the hard way. for (int j = 0; j < families.count(); ++j) { - const QString familyName = families.at(j).name; - const QString styleName = families.at(j).style; + const auto &family = families.at(j); + const QString &familyName = family.name; + const QString &styleName = family.style; familyNames << familyName; HDC hdc = GetDC(0); LOGFONT lf; memset(&lf, 0, sizeof(LOGFONT)); memcpy(lf.lfFaceName, familyName.utf16(), sizeof(wchar_t) * qMin(LF_FACESIZE - 1, familyName.size())); lf.lfCharSet = DEFAULT_CHARSET; + const QFontValues &values = fontValues.at(j); + lf.lfWeight = values.weight; + if (values.isItalic) + lf.lfItalic = TRUE; + if (values.isOverstruck) + lf.lfStrikeOut = TRUE; + if (values.isUnderlined) + lf.lfUnderline = TRUE; HFONT hfont = CreateFontIndirect(&lf); HGDIOBJ oldobj = SelectObject(hdc, hfont); @@ -1581,7 +1608,7 @@ QStringList QWindowsFontDatabase::addApplicationFont(const QByteArray &fontData, QByteArray data = f.readAll(); f.close(); - getFamiliesAndSignatures(data, &families, 0); + getFamiliesAndSignatures(data, &families, nullptr, nullptr); if (families.isEmpty()) return QStringList(); diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h index ab6d6307c7..9d0aa7f723 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h @@ -177,6 +177,14 @@ struct QFontNames QString preferredStyle; // e.g. "Condensed Italic" }; +struct QFontValues +{ + quint16 weight = 0; + bool isItalic = false; + bool isOverstruck = false; + bool isUnderlined = false; +}; + bool qt_localizedName(const QString &name); QString qt_getEnglishName(const QString &familyName, bool includeStyle = false); QFontNames qt_getCanonicalFontNames(const LOGFONT &lf); diff --git a/tests/auto/gui/text/qfontdatabase/testdata.qrc b/tests/auto/gui/text/qfontdatabase/testdata.qrc index 81a0b5b0bf..224e845601 100644 --- a/tests/auto/gui/text/qfontdatabase/testdata.qrc +++ b/tests/auto/gui/text/qfontdatabase/testdata.qrc @@ -3,5 +3,6 @@ LED_REAL.TTF ../../../shared/resources/testfont.ttf ../../../shared/resources/testfont_condensed.ttf + ../../../shared/resources/testfont_italic.ttf diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index da2f100c0b..68664cdd2f 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -61,6 +61,8 @@ private slots: void addAppFont_data(); void addAppFont(); + void addTwoAppFontsFromFamily(); + void aliases(); void fallbackFonts(); @@ -75,6 +77,7 @@ private: QString m_ledFont; QString m_testFont; QString m_testFontCondensed; + QString m_testFontItalic; }; tst_QFontDatabase::tst_QFontDatabase() @@ -86,9 +89,11 @@ void tst_QFontDatabase::initTestCase() m_ledFont = QFINDTESTDATA("LED_REAL.TTF"); m_testFont = QFINDTESTDATA("testfont.ttf"); m_testFontCondensed = QFINDTESTDATA("testfont_condensed.ttf"); + m_testFontItalic = QFINDTESTDATA("testfont_italic.ttf"); QVERIFY(!m_ledFont.isEmpty()); QVERIFY(!m_testFont.isEmpty()); QVERIFY(!m_testFontCondensed.isEmpty()); + QVERIFY(!m_testFontItalic.isEmpty()); } void tst_QFontDatabase::styles_data() @@ -259,6 +264,30 @@ void tst_QFontDatabase::addAppFont() QCOMPARE(db.families(), oldFamilies); } +void tst_QFontDatabase::addTwoAppFontsFromFamily() +{ + int regularId = QFontDatabase::addApplicationFont(m_testFont); + if (regularId == -1) + QSKIP("Skip the test since app fonts are not supported on this system"); + + int italicId = QFontDatabase::addApplicationFont(m_testFontItalic); + QVERIFY(italicId != -1); + + QVERIFY(!QFontDatabase::applicationFontFamilies(regularId).isEmpty()); + QVERIFY(!QFontDatabase::applicationFontFamilies(italicId).isEmpty()); + + QString regularFontName = QFontDatabase::applicationFontFamilies(regularId).first(); + QString italicFontName = QFontDatabase::applicationFontFamilies(italicId).first(); + QCOMPARE(regularFontName, italicFontName); + + QFont italicFont = QFontDatabase().font(italicFontName, + QString::fromLatin1("Italic"), 14); + QVERIFY(italicFont.italic()); + + QFontDatabase::removeApplicationFont(regularId); + QFontDatabase::removeApplicationFont(italicId); +} + void tst_QFontDatabase::aliases() { QFontDatabase db; diff --git a/tests/auto/shared/resources/testfont_italic.ttf b/tests/auto/shared/resources/testfont_italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0a01f883f4820bd90e39bddc406e676c6053d162 GIT binary patch literal 64136 zcmc${36x}6SuT3cKJz@siFuwQGBPqUGa~1#tjwCLt83`$uBz^?o|~rUE}EukplJpf zTDTWMgp2E9i-71tZJvPO6~!m=e2ChDa%Irxa7ExESMLQCu`A!V_lc}-yl*LMJ=d~2 zPR4X1;_QF_!}ovxzjt#y$8kRXh+KK+%#lNQh9_UV0r%>modX9sm-{h1za7t0hfZF7 z=H_2Ldm7JQ&T-{$9y)V&|Ghu*@PFjEf4mFtm#;oEJG$qoo4$sx_yC^YeA|7uJXlq; z4{)6DNsc4;-uB4DWv-3?I8(*@>YWe1;J(UtfBz#KC-*r{`s@qted(Rw{K@E>9B1w0 zxOd)s*B!UqE_`?H621@bbK|@4g8WPT6L?Oqr+(Lc4?p@pzqa}mz8l}ifApR^F5Ul@ zhhBAno+-T-{Eq? z*YFDWTVGzr7&-2bnjevNAHDpvctW^~Bb zk8$7Tvg|qiC5}pJ?<+V#SmWQqNt{T2g*=J(-jv+)f6R@ze`IH0`J?jeQ~Qz^PM$w~ z2H#%U-JM>;UHnPBQ=#wj-zLAp&LaG`>D6)X#BmVEdvQFA<06hTIIhC+I$?{qaJ&nn z_#B?U2Zx435VlAU_us&KIo$sc?$6==%eXgj6!7?V93R4QH;z>tAH?xTIR1S4`~$du z0_Wb99Nh2Xp2s2M*uZ-i@SESp{RBsh1MhP`jpJb)M{rIa_pinAIF7gB+&{*>GJWl> zxId0#KaTI=+!XF#jpGG4zJQ~TXD()%n0QU@cE%!d|7H)@o8$aQG2h;WpcO8Ee^O@TH z4*x}d%olhYmUM*sE*EqAcE61GF7g`pAh*hWp1Y5$aj)Zw+(E9-?dQ7O!tUQ;R&L?` zE0^E>#oecNzrRO*+c<~2i~AckcM|>zIH-+?INpX?(RavcfX3` zzwPe8&fmhm5!N)-(;^Y&HZV6Y*LtAA|;Y@bUr`TT(*PZCz2JST+ zo700{`92)@6?_|qYfBEQ$_H^!ouwl@H9b_^!xM4W;F#bzJ3Z)#uf_2=jujlgHa#FA z=@}fK!*fVX`aF(r;PGu7FAQ-|&-ZfNA7%%~y$tt9a2&G~F;Q+i^WV z2%}V-&SZ1>La|h?RBQD{Q*5<6-5%-B3}%OOqxpr!u{v2==2uqN);BiyZSCKNyFGOH z$kAiRuR3w{$y2A#Tyyr?>&~6OaQzK8UcBk%TW^Cyr=2|a zA)fya=Rd~p{?Ny`ox;a4kHSqCXFdiuT`nJZ;m*_i&3Hokc%fUtBcWeD__WYCc=}xJ zeEG@plSgiUvV5?7*Dbd{EjHLa-niq*^RwlrxijZph`-mIt318$eD2D_JIHp)7<$dpQPV;=3K4v^b=1$nR^oB zm_Gj)_sM_u0?+;P7xqnGfF$r8ki>zH@lTw@m*K8f$((eg}BC-NMwIZH*J|92F5;rm2h{Fg;ux-t-4 zbs3jmVj{2n8;QL7gNVHL1BtwTtoxwDel}No7fSMtzI=^Xj*?9o^PX=$G_&>7OyG#?P83EZ2I{ z_U%tP2c6Hl54+#+?)N_DZ}?C6e-QjicyHuKuSg6HD^ya2tIyxqEsSX5agejfx5%e}-_BrU12%$6ie7e5+p1~GWz@`hJES{>dztQ|UZs3r!oA+z@cNz#d-i?W<6=GDV*JRDzr=2+nK2JaF; zef%Tbd$|F*lUxSMeAje#lWD6}2c%Y|161T9p%XnG(CM2L>7>$k>4-N3%(T)RFSb%j z*yF2DbW?-4V?~x$dW{DZ}?1-!fIzGxnYT>;~Dv@_P1Wn)LtOGD2u$VnVPQKp(&R=JLLb&cP*#tRk~SM zkt_oFWpyn$sb?2*hR*9oI5X4pb=VWpRVyyE3b}Tr;7OjX z35s8WhoD*KMeZi@Me_5=_D*px-m?&y$(#8$Y9hQcUaXE&As#{68~h@(3~DUY79ig- zeC1T+)DaH&xVb>*fsg5#BsFy?O~sZJxyj$kR3Azzg_@Ddl_J+xRozOPB6LKMTvZi$ zk+)M>OHZXD&CeN%E2{kUYR2u)r&H}#F9(0)D!G|88*gTzG3F$_2Gcs@wSvWWTC+`eaoM%4L& zot4TL=K43>c)p`rx*&8fT)a3lIQyrfW2sPhVl8cL_^M0@^G3X2^hOK4JkRU!J7>5Z z@+$IaWVTm9f0^K5{!C<$PvUtTK1@YW-;^RVEvC*UPEFNRVm^clI0Zps4hB?t`7g?r z4EYc~w-9H`glu%nTLr_`H8@ow@~WtWKBjlPxn1sVyEYtkBMfFP-=oX2Z7$wFKKjFl znRE`l`N;UbyHrKjMbf*pe&oryW;+#Yo*SAmQHjDUMoy=-~@wzJH3 zNhF901`FrRtCAQ}Jt7$8DtR^eWw0OjT^TR4#_3@B+QN9=<{df`HrhlO7;=%vhy{f` zw*|?b2C5AjfUn%x_-V9C%=EL8qr$T|y+Ply1;3dKnvPL3a77YP1VJ!D1(zsbI+f~R z6!%vPLSWbGRgDPnOQt5Nm!DEyOOV}45DZ7d$SwH!jl7-lnQ+pTpmeyX1##AkTD8*8 z8HR2&FWz#o*__K8a9jbe5QT(_sgxi;)kqmp-dF6__G10S(XB{^@8vU*9lTVRMN5x* zLD)=-zyz8T*lH?K7a?tUVW?0yESFjxD#O=tHDN-&$_=KOO@r|{9_njf^?;LLgQsFgd_gD~`@APOD(px@?Byj$NJ-F<5%F@yGF|d@$+pzlGqaNI zXu|B7b=^pbaP+(Ya~0{p;iP%hMkIE~%QZyk*IfSIYncy!El+7RT;sdQgXDVh3}LH%P=3Cixi}WpN9V-%Ord`5VQf6aVZw!MH?T*_<nn)$Y0K;VJ9hXX4W$E=o$soHkGwd{N90ZW9QgwnFuSIU5QCS_87coC`l1^LxrNRi3HV z()@`$WEg_1`qgqJ(DM157IrgU*lAYNh9GM8?07You4N>+Z8!zXlX(mX7?XDN*GmgW{A7T?;AC|Q^9cu8Ezgn9ilX5t8i1&+ zgmI(>GlQP*yNVVMI!?{Y%>bi8Y(NWw;u!$33QShu)$r}Nz_wlz9uh)u_4`pH;3hJ)+~?mY z2B3mTZjB^q*dS2(`RaHyex7yFR3b>;NAeMm=OFY1jsgBMkKYL_Yw?!BHSamQc;6&H zFK7-_*)BJ#&g9<38-C&X(guI0rtyZR5mgZo`b}OEG^WZ?Af#f?5|EeD%)(F|-h`JE zfy3~Sx8uC&8+zd}HF8U*nmcdY*FIMFGteN#(#$CI^~P15LvKHv89fH6+aeJpNDu#L z29PRbMZwQx_-C1l5;-tLQBg%;F4Z&bjH`%poJ~PqJSXh_FLIpx6MPcapw`bYCiH6> zxaJe>#Hgsun5$r!I79X{Q>(&9?nyI=hI^?36*}@hi4M8n0*f#9b zi(@U{n_cVs{n^B`MBXc`v=3oxl3PW;JYux^G(fv=8rqREH;4;05EANmM_7-HEJMbktPJ<9N~| z_o7z$WzJ#|fki>&#E>0%o8()P=pU+iN)XMG-_kW=>a~F^6cmvL6`uPBCyNix&D7G4Eb{`U^x{r- zOrA+{%}ljncP`#~ORuY_g$2^cs{rLP4af~f1}>Y@yJg` zbe{K2EwL$fJyY{a0IEpQ6Y(_5lEbDM8K#k+KeInK%pzg8O@RqXi6%YWEOHEt|b+3%WNHm_|gK6xBpBYiAhvD)h zzd&4lUPwi5)=;xnGR) zkKPU%MKQX!-g!%#DNF5!TW%olrx&yQ!2J&_v+>YJe+4af<**O}eN*ifi~x-UJon|@ zpXM)eNAdd6WJJhAVH_Z8qXJYzs0`{ zSs&17V=uBp@1R}K#_?z}t}0M9{xCzLqN14D*i>>3g6rfMTfpCvOJqXJnL;|Kz zHDjlHs=W<3Ch}Xa*hwwS&-n<0M2hAYC+XpZ>o1Pf$;Pr^CZPxliW@Mws~0yas|=#8 zKfWF|n(bH>WJ}BR+U->D+_|$Yxi{Nn^5s5+81)g@?zz3|Wlk=+RLU?iUqizZuJTF@ z+DpbDHF`@R6E)zyo524a8;m^|HYKlOx{=E3p!PtUY3WqBwmxxG$I?lv=cH%sx^D-5 zIAdB_Ev=;B-3zJo#=(QdQq9y|T?97fwb(anzSSGAkk2He?T+WQ?7nR4cvJP%u-T~E zZibLlt?g4PMVWi`EAPUnMYTXA-ZWyn^@0a4&1cr)^stpCq!PQ$c0Z;0TK7b^u$}kU zRt69V;qKo37C8vNUx6p%5XKW$!M0(Gi=XC>8r25`8Sy|BI$GLPPUiU2r?tN zp=ws(iiNCWDq3L4;0CDjtKB?UKr=L4&roIR#AFYyP>cH+r{yVX;>~G>ESi`TJuNaj zX{mx?CRQCb!rK1Y+GFe4g=}t;)0}Jucvb_LtVrM?Scr1fK#_16UMdX$#;aOpoK8=& z_)z_D!>hs$R(JoNYytbwXuzaIht48bV!BlMaifA6PZq|o4tXycjEiDiB-3X})TV|) z!v6r$&Q3_pVtGflHQ?CD`j@g2FC(^L6swE41qS_qm{ z77?Lo+Ka@?N)6Jr7N{4~F`E6p@9LWDS+Zn?>B7;Sv5uSfz`SmHfdLK>2udPr%tiRsO4WC>w(c!w=PulM$7)o{rtQuM84eLsh6IZs z0{B|Gc2Xdtm`j@ z?W-GBZ?rg50TV*xawn+|eUOvLFOqN5&Xv7biz%4$%adW;Dk62F@{|#mX)aWRI2mwg z(J;Xb9wMz`cA7Yie+eADSNHwRofXs7%01Vw`Vnt#97v^>Z&=PADrVc&vI|V^sYbC{ zG1nisW+V+JMq1$0VKxeFQ0lzezIj0KWsdAs$bW+GB%UPMnre)e7EDW5@}L!#&)j*} z?Jd8ft6r(BFxpZq6hkR{^5SjhkAysLq%;NKDiVF);ziGZKtS)9u-`x0{b}-U@<-?c zq8{xEq!8j3n0IP@aA+8Djp`kEJ%x^MgCK)%jwvUBSoItTNkGe5aN&-{Hy8f50zxL;-e<$3Z@BSJ2WueTS;2ydn4_;}dn0bwhm~%1> zOcbF}bOwZ(ibE==>Bv!Xm{M`n)i+ys8PeN(n{puzUxhgLa&1!OPc!@R8j2z6B&hlE zOsk}(${w*K!?9+=_IS|E*+l`Qhmh0aYGbBq77R&MBp#eLJ{&A}kgOCmm6tnJM2FPk z(o)Waav=s2hq`o16!9#6elD<6*o_QlBHll zGhDiK&&7sSNIN9RSG+i%t%K^d%~+4qd^Vdub>^y=;eq^0t$%n>oz!hrN|pMwyi;At zA<6YxPC<|R`Rl&?c+?lbA|joY6fJYr4R_A@Gs9sR=R8BvZKxzhskugWb9JEUshPDr zLk#8lFjKVk)a+V5T%7Ny7(G!e$&^&nNN*p%y8iHo4^n9m?gP8K!dJ-Gxosv5Hkb-> zlqwC9Q>ie|y@vuBB;?~31ND1eJWe1UT+cK}@OLttP4XtvdrcEXCuesiv*T7gnj40_ zBQ4RiTs37$76^ERI!o5w{M?|Q4(I0Q)0>ZM#MR7o&mu(yLR`9Z=@J8o`qD!$x<5#Xwd$jp`9{=gb<@Lp<|WU?^u*1MP7!a|^K?1Cv9+(5>2=!C@w>1Udcm&1ZxhHo2g!~=(6YfQLk_?1O0PGVqVsF|pKgCtl93^^I zs)+(^N=`x{Wesr7?4E$ggUscG&6L-xg^D`bKDyCGQB}6KuD@rozFqFE7I{a|OxGB{ z;SG;7KhjGD_UA-aW(6= z-8KxtR#J;AYvfOo=r5>Jw%YRjV!l}I<>Hy_{OzX}M9?r=+}fDave{T|Z0{T!guP}F zS#JWwk#KcTd8{oDd%ZzU?F_m)Du%EtR|>Kg(VW8XmU5JZ~n z)h)wfG+Vh}EL>e9U^Au_aE3I-%cF#;xNwJ zyr>0gsuO!PkAb4|zi|Hi(-)XiKL7Oj>;I4IO$l6)fPha7!7aL^J=+#EQ3K`rY|4rJpfchLVs|CrkzWv5X8a zu5B>og0F^B!Pg+f^WWn^GgERMwKy6x84~1G%sc`AfPXTv@+hFkhAd|?{s9K#MNwpc zLkTrRS=k2N5(`mIRz*{Y%H(HtOF$ig7O9ZEpyG)P6*MO*R;Z)%D)B@=rCS9z)V28X z`xELz5^)&{Do!+l!`lj#P6urnL@Sju)SvwB?gxlTny90rUpKL$s!Stv1Yk{5G=&v# zX$_LXmknOn%QETQ+k9)xFbw~LGmE_Dzj6+3XV3ATT%q$n$s;Z+UAPk*nzd>C@R7pF6YN-STZ=O$q zUa*n*LU(!YgXC$lO*@JC@m_?aUSN|SMhL@j3D4cYGf_{_s=?TssI}5U8S@h~kdSxk z765zgz|K}NtVIH9^Tf7tTZO3Up!BYo2zm-=XAgZPGBB9yn~e^Leup@Qrq~X^+P+tj zO;NU7$?43_r5&{9Ul%`958*VEXC zjDq`X@-;%xRo%eI_DUYi+YM;Vmj$zAWSA?ewKD$%bLQ8)?+oL_&i>RVS&p;z*s2le zbec5WuRg|qDRCI$v{oyABYBQq3@~Uc{lL8n*=}&Rlm9}_absLT!i(+IUQt<+l*uTZ zr)=_=g1x=qI-%Dx;Q8O6%ou8Ko*mV)TBzxkym;jF;YG!T7Zp&LM-zpD3g95Olt;3o z=oxKrge*~VES<-HwPR(?gL_qS)mkYM8t`MVZXTxwjnFEZXqzaZ!DREzhzA!qN$`aZ z_tX^~ppjsDMM8w;B#4OBKWR*$b4|-hQ!|g;6G6r$3jqGLb79a=MM`2Ed1}IHh!PV^mc#6~7mh_mMnPQW1!! zT=Q+oE{0CgQ33}SVYP#NuaYs1X0PWJH_F}P%T-z=svYVVwp)vjKXP+gHZ`E|_HcxX z3ox5ru$yZED(XUf@0k;?f8>QjwUCeD(0QSRO9mb5f>|Z#0qJq@XFQG#s3d-dw zib%wzb#Tct;f+)TD?vgA!R$+j;8x+m;i3g3uQD$w5oVfql&YDr(ybWqCf&&H{1k66 zoYcNyo%zh+%_`$3XU^Yn^E_iRQQOOnGI6Wfh*ZhWF6C-l_1>wIC%f*TR~0oK5d=kP z1W7~{Xp){U77f86GiPTO?wT)-^W~kYXdq*qQCiAbn*Q)x+wz^IrOHzXh3Lk&^8qugS?uzv^j3-swU7b_SRdX)s!R|H+Q zDy#F|QXmjp@pi7ep`)Yi&nT@Gww4V6Z3kP&4_KMGWZf&!cKLeDucB zM%kI09~dh7RV3m>>Btkcyf#;oNT4>ATyu7DwHS?O(h3o4tdt_f;BGR#(J1s9e(&&7 zTW3tE77}r|&+WQKwN{i(j}J3WyW4gb?pnC&o$x&|*Cnq-KhFvH9_kF6;IQC2K%Am~ zlFAh_0^c&t2O$#*B}7D_#1kcMXM_gIQHngCI7T#PNt!OGs$v?go$l}jHy{UaDl@Y) z&i*%D4UR}8j7>LZ*S9xD*32ze50S4)QYxD>DkrWvKNEE$)HqV)SDDYGq$Sc?G!n$w zqvvj&OAoq@VkCv22SAUY4Gn~N0Df5(^w!3iMf9B7)oRJ89NC&f+9I&EB|PxLcZ40_ zrkgR&1PM&dh<5G(Gr;Fl)Re+druF!Z1XCl@A_zmZXy={ClHjR+jQ0$h{|^)(D0E9p~=-<>tx8}h#WYWJdbKug6x*_L!<7#$id(}rh!d>3l%rrJ;%d(zYIeXWO zSEIR6&sGJ?fqw$~gl5ku2MUZ(afM`fJ?eOr8_peqq z7uq<_i~}i6vWZZ;m!Ifl_&GPs;UJgM8+QCc*$^p-X!fdd2_B5AyhN*#!WCLzf)LL`nG*a>Q zk>;77IL$oAsh>P;ma0`dUKlh~QAd3Q4RR~YxeV^v&m#Tgev3`M64ji5Axr0~k-+U4IJi}dLvuw9#N9n z{L&j=b$5=n)@AN~;*Ad;x%>&{!gCq)hb6#P&@#Zad91bFfX}Y{b6*Cnq7I6wGL2tU zp(0wlD=*fps)H606>*9(iz+y7%RrsJwn#qAV$MfyY#eT;`mtN~*hTp@KQou9Y*lXf zD7B&2VwLWr+^MHFI9w z$<0 zTjg?IZSJdv6Q6OO<2(9Jt<^zKu`KCfvtF@h?xOSlw%xzrKTm$^%DnGM3LHYK2$%p@ znWEimxIMq2my%J5%-CO^|5;`ocG;@0w*791j2XxU(~N}7`Z zsBjBaJE|>o`hjxM_~4WFr!#RG=wR5UM`-erkDWmsc!3 zPPu}l`;pjI>ofDiu4%*5NwCcz69oN!*PC30^&coAcW=A%me%C<#q2npa?EC{3IZ=% zuN8o-hS%S4^J48#!!9})D?8g;t>yc@VP)~g^XG@6+3EN4lq+l34L+Vv=jP`Za_4>p zbE@qA1>)g%IqVI9JcETSOcsU-GWLqXBP`)DB(q0AV1>w@%$^URs2phcV>f)9g~_Rw zAlpRzT;Q>=Ko`?%1Ho}D@JJ|>hXY5~RM|(Sj_eGz3*w_yNL0Y5MtmzsyN+%*t#YSG z%?MpeR?F5MFB|GPBBV7VRB1;;UUfv(Q#8lv-`NJ2M9`;XNnlv4*gp9qCupA)TE0wO zs2r=Mx{+6gWue}$SaN;4*1D>-{Ls?E?Mq??g2^@x*RT7zYpIT1`*YVe4mEO<@nY5% zoUKPT&;In;`hg~BF+Z0tN4atC%zLjPSk^-Pjdc{#;2W_U!H9f_q9^`JFA#MI5Nc}y zx&vrHaRIGwN_&m)iQK?S;Uw~UMx%`$e$fk?8FU2C9J*m@r zH3S_+mt7c^nKHe@=Pp#yZ`@dEn8A23xb@CE$xkx!ObR;($MvJt!NIO>*~jmA(bymK z%7Wk$+KQl~$eZ@uxSEZZv+3D%<;Z3q&eXCNc1~Vxt&DZiUN`y1zy zl=8Z3&otwvi<%6GLCrJ|pFZx@mWqXCg(>#g_n*D)gV)KdWNQHYs%bkr9M0#`bK&|H za(<+g#4q-8UO$TJ^?Io10V%;eoO$1wv+t*Ip68AuX1;+u%e?{Pnf4{JOQsCzcyTgD zKPMtPRo}#~)6@{qEXKSsb~I!)n>~hv@u?U;ReHPzettspgAHmwi6vAi8dRRQ;N)KP zD{6s~nQ0ZRsO|!#(4_J*@K?7F75oxtM!c)|Xc+{=2lTOXky`I` zZ3uzY&SXPRFD=cvrJ93sub@^anJNbRwpT140LVlOZ>g1a5lna~8dvmOxfN+C6a7I7 z;J|e^UZ}1;x+c1`TxNJp*bFd|gqrr^&f&D5^NaKC92g%9Uxd!dm&pEKJ>M{86{29qxD4IiW*r}w74~VbJfoJDDy;jEJ zt00AEwQ|0!E6}C9Pb);#O?~ zIzVlJaNpxf;tBG{T!!vH0a?NKjOq|i;<6#QrU-dWR{%`85!gov*EO~NDFyTtzxM99 z-|eLsQ5*Mqz4$+0{*9MVY&ZYFI&s5{&Cm@>;Iuj_cnx>qMsg1`R8-;>fcXT^f+K+T z-b~%@lb8R;56kVDCX@vYUf@`hLM?LMm;85N-V{f`C%={Mra`M7-=`yV5eX7A^iZM9 zJiXLusG^IzV9rPl z4C8bZGd8k|+4Ra}#w=`Q8DzC9wVIQjogHRMGjmN(2k3$Anzqw(yJtETY`&5BuUGGW z9anjodkx10tegdJMICV|X?vu@Wzz`M4ZE3EO~mrZ4;1@F3|(2s1%(d%~qmx zC?Hig4c)9-VZmo~Pmm7{^aZ=7+j8}Ep&SGnT~5NN9k@8$%eJgzNs^piNLiYW5;8i} z%aO(ZK9gzhy6diK)hg()6pUh{R7z`T#a1ZI5XF(~_4;j-=$)CaDP)Tofmp<@Ibj`! zoo5sg?!Af^H2t^}yS{w0V=#DYEOsOLx+C4oxTUdvgEYM_!iL z&kK-5ln_JO&#S$`#U~a7>4P9j>NCt+QPe2VP=mQiZq$g_YQw2cq8Di&6)T#~5v?!~ zMNl%bf*O+Mph|;CUlem`ELf7r2T^njmp8YH>29l&Ni9zXnxD5--%!j-Ifb<#QKr-C zr1P7rWAcea1=q?KK5#}Uf%UUI+bY_$Xk!;`EU&%qPapLvjK||l zG}Ec-e$!{ICeAPyRI9ZpJsvM+3d^e~vJvhJTqqdiA5qhpgB2#U7}XFV>Eut!(k%bP zcqRS_rMUX-iU|BC7MmUZCr}athnlaq>lxw5Ee9thhKMUGNAEl?=NjF1o%}ko6RSNt zj1ZB6nO=Q|wIuLyrCG}ghaY+IYp!8{;M^Nt{<33ozR|8_a9w?Hd-sz+Q*>km~ z6nLG~6~df?+dakK1Nf7@mLJ5JS&XMdJAY_ikNJT=*>ffA0dp*Prxj0Emyh6cn!AnKa;z2wo6->lbtix@aB?x(ijuy5_s{@Jk_VEL^;oC9w<&^y@% zl_!!`RYOI}9d^dHc^5uiF83MD$Wf$XJQ3($zN~ zVNF{_SFf}|K9d9)y7Y$^ zQSA_#=$XN7eD`?ip7AsUA#D& zNV?UjtEIPa0ZW2e{EU(PVleUm5avpVq0SRQmgVn;9XJ%zIdP!nRL1}thvg*bIkF@8 zdukU^1`9Hbz_+nz-cmAJoOjX@`7(nI&66jNS7}wAuN*94Ka1RU0TB!9An;KvdVwRM zuo`-n13J+?KRrpAfl)ry-2PF_!+UrC0ps`_#qvqir>=_mAgbwf5-8S1w?L|fOeMkd zbbJ$K$Pg{{Us#{ce~>Bm`pf1mEMH7#^@U>@FucG&8Zt60)#n9Gs2pyv9+J{#(J6Vc zq&sTv;82TmWqwp;nVG~{M=h%{L2kl$*_qiKkLoXyZ)78iPc&|TzA~qV;VI!16}ylMn8`mIccDCz}UL$-07}V#ERc|4pc#Vlt;3T5~&Z} z!u*J`l5qo)E)~JQ(nfTJF03_)Qm1g%{A!1kdI&Cjt`r&_OBQ8$%4aq3_oI1z{*y4H^t z_tA(2REG7ssyp6)_|Rq?%?<~l?K|^Jb5`x}fz3>i=8Lsxd3EeJb_zYZci|(uf6af1 zJWac`A+qOcg-r8P5qf{2Fi7$k&V7D;mQEH$Oi3b0#m!_p8A!DzlOYW)sc?@yp>pK6 zDO(YBuu9C(ix%QJP%t5CR+U+472G;eKx~w|D=n{O`lh7liZQo!q6Kz>)nbe58>@Ll zeAHkyU76e0&!Z3zwN}MSf0;IB7-oew zYGC5Ps>CyKb$zae#yHiS4Z}gUxqqPs;y$r4f)(bKe3``MdNC9#tH)Y$shS6^k5rKN zszK{ed*emx<+GAbtKI^W{v3sdJ<5n^sAf_~a|t8_u3O6?TI|M@tnXNt(1Q z1a6Kt&%NiO~M27QpQ&oJ3%B#ku{p;gqfc*?`{TsV~PTmV2c=3PN z19qiTPJmA1WG@M&kH^!N3V3$dOJcxODNr3{wnNWhH}Z0t{@9sNPwS~t=yiSFvaGzI zcWIE4Y+0MzfArv*>lOB$u4~8zXk&z#vW9mauSEX#nH#Rz?;@yLq84XjO~=A>Q}-Hn z+;X*|;bq7t>5R8dwo~2I=+;sDs&;B71^m|AZqgX;VowcO%a5APtu9voT3D@()&|uR zU3>n_d~dT8NI3{S2(?19-mhZ2kyLf7I{(m2c9>~i1^K)i^ZOt9-(<)($qZ9;?-&%c zrnrgLJuuNgIS6s5sEG0l3*wQjwo@8c2oqOhDJvV!IimRmY-^me)H|j%!$Es8$G%+u1`A#G5!C%W5iTlS)xO8 zXu7DBO=+URv_OMT;`8+U1Q#UHmH#FpyzXE(9WReWp=5x_LhiS;F##=v`mL^DOBm{( z1uW6Wk|^|bZtrZQ(bJA4Y%I%$_a^nZ#UNX;vDu8Q36|^wIM^ujJ3P8_>x21pdOla1 z@r-n4^WZUll_44wfpp#N#8JImpj*L^Vyk7?%~s8T*#m7DSWadX2Bq!`?s-9{j4n+_ zigY7qu?$ELwN${nrdQ9D50%47aIrip*_ABz9xC?+UanUwId%mceRsKBSs9?32D!cr z^^V^|ZS5rW6Al1Ot_EIla0(&^5_60(6Ke^Ks3y zO5}qYI?0r!M^?99yMOq?5vVA~mJ4h7cs5i6&k)tg_NJr8SSFA_iP`aDm>s4NiKL}N zheFhfbk&{n-n{=c`^Qip6k4GB>*N~XDeyv9R=rUGuEYzh-j(!-1xz!T?T@Kjq*elu zIEI?hHG3$91OvKB2zmyQasa_00mO1MA+_|Mslua+&MZc$8n!M$H>TmZYPPco+w%%FN|3(`VWhxc?Una!aACBylIPzJudeZEBoi$^ zGQ+K{1?juyo!)=Vx3*qp<#DC;YV@K;Ue`Va9hX6_t(tPChidqcpt zBr!b5<^$2R)3^}$F@d{&_uKrF6l3tCQaS)b^&ZR=R*o$!3_Zg|l`vYEOcdHCnd%gn-WK}g6EsTQ_h0YZ zdSXAD*R3bE#`oQO-(@o?MHU-PhYiK=G>aM9EZM)ImFz)uBg6LGpCJz2hxK)+r98J~ z4i=r{39Y2Wxb8jYl*D3$qCE&k$1?@D&;edkUF?K%?K?I+aO2QNyd`6+nshzuQdkQY zAp(0#F0aQW6*~bqUM6&77^v3LKB-vxhn@3iJNO{`EA zr{jTJX6^;R3B6ZzasXASYoTvprf5=$)Qo}A#RY85*22T2Gw}N$En0HqHM)|QoDCUpX!9sc7w8u-Cck)1p&E|QfXAx^_Q+Uk2Hms{PjyTYuyPn^D{%k-gg;K2Tp32Ccf%|+eI1_nZbDdB~kYp>0cmwXd@wW(V3cx(3J z&`eu#56d2@UskbO^=pukUq$)PDT~I+i?pD&=bRDjinLFMxd19S$Tb1$cm*6MSgA{t zGt;q54|%^}d9H=VZJzH+>3qoyn$cj8tzgNAEWyQ?OfD9hdrf6wa~ZXhC{naCZA;;; zAc{kN$hb1AU=x%BdAZo?Hu9nZ2F+et8=GFnNUNe86ay@QC~uaT0O}jdlY&RmbmLXGi2v<<%6?U-S& zHxtc_8#%}vMS1}9bS+z2DSEj$ZO>6!2)oXImH#?+CVvpl3%WjynO8<^{8O#K6ZsNu{~5mAt2-k zk`J!S4QQH;v=M)02iU;2)iCb?D=^v{jU^$rl0jC9c0*xsVRjxp8-#oFe*$6K){WWGjOsMVz|A<^-47JC!hu}Hmo6mgRyB-0Nq8%uX`SV9`+Jp?Lqp|=9nKbPJnG~XZmh5 z!lLF_cS=?G9J=;4y^yg*=h;7F!Y41iDX7%D`Jm?dP-tBO)izUT%(sfz4)3y-?0|#b z0rd0Jm`f)Rf9Q%)Z1#!qLDA6Qg7p zgNmI08A=XR4rS4TO>2TY?_(vNSMLroVcG}6EBG|3YG%GvanSYdntr2JFw*UUi!Nwf z7}ndI;s1hq$7_G~y7sXabGG%h$x=D!wTrT7xGwfqVbN8u~iu^NHy#g@1dS`VaefVM?!si$R1LpeS8L-k`sR_H9zA;|V~4(P+9?+aJ_I3Z4xE!`W)B_NkCoMM zJ*F`TQxh<7N;;o6-Lm5pUAN>!0{=ZW6$TdnVu`Dr4opD8%y7oVrcq17GQzd2IDR&u zqOq{59jo8bB+?qD;Mc;Q?IP58gV&NUn2 zZ`1Jv6RdF;bT}U~04E*JMWy)|>(r50V`W-oI5Szh4E{p<->J!8KP$!r8ksPS6}|{ zoekNXc5~Tk@9vkpdYgXIskp0;jPt{SU9J?+scL#^ezdsW-1kbz-(@alArPo!UA-8VrUr5!7< zz^h?nD!G5>$jau+URcSvsAtn1_5k$o5qwU<8D<*Ge~MdM>p4A^g%E{FtopK>*focC z^XY+93N+Q`|A1wv`(C!T`O0~$hsH@*Q%C#0?AXMv5pL13s|Ki!SV=8SW{jOzZ28?z z%k>2(XBlOXr^pCV3ZqdD5QCscrlfbzoVliNp=&PhrDg~H$Q!M0SFu?cI97H3iOr2y zP`^gF_w9a_{5c?Fk!b@BUlc;@p@>9C$bXo4sYIzKry~10+kq`pFBP%J4R&fkl?_|n zV*A6i+Meso91JY`rjK7N%+@k0_2YV@KgwMEIR8l&KALB)J=Zl$$kYrPU?J?{pfrY+`3>%IQl&99(zrz%ISTJ1vNk>z`J26w+ddQZw?tlFoUcWy^H)UXfrolQ8J)*Tuc*~}Yed-Kl zZe>B+dE*=3umh&Kdu=Ow?C_d_g%geh3i=Mr;SOpZU*Nw7u9i~I45Y*>u-<9^eB!mH zz6%DUKrm=paCm@yI^UG213gRgrl}Rde8v-{iLMc}?^0f}N+FHFU}RFw;X_aoXWn^C zuAyFSMcHAlb*M3W(_D6xlQO7?f^`P86NS5;c>y-UrA?gJl|q&c`vt%Eg0!vWOGWeG z8}~I1bv0mVM}@cLK}j1Bxb3?~-~N79D*6U%m*GDRr*1Q}X@#h7QU&9;1C<$Cdsnj zc(#j$x$t*}9OQClAedN$BQ|G;t{Y;fC&5y!W@J^6c2i&ztgH+*2T7rh{xYT2uL%U( znIabpjR4pLUIN$!`KPEh7dObKlB!R+H}w5dv5ekk5K9#*axJPCv!>bXwhSWxjSlaG zh)(HlPc&1i)6e)_tT(`(a2aeUjNL$G@NI}Lh{d$KM~x-75#%<7_d|lCmNUva92&~0KIbX4Tv^Htz#|e28JDbt13uRl)&(Dub5V4wpq=W3R-;0q6 z>5@snc{>DcL5c|AjQAo)sCLJtiWXT&`(Q76ntXueHj-P)7Pf1C&Ccqm8`Eh)6R%~c zHd1A5!K|B>WRJ!R*dj(PG<<>fwSf&pmz5gVVkA0ISgYl7KDLxaz6Mjo<^w94S3T3o z{lA302YkC%dG~Eewk*rmvTVtcm%O(u*|OyQpWb_KXAwf0K>{Ixq$C6y3TXqBQ3!iJ z1qzhivZ3r!2&1epT6XADD4T~;-}n3do!kE;eLkP}ecSMp{5l1Nxb)GnKX&ODP-)dekIjwHBlhRXCa001ei?!#FiL=EY zYd7(=&B!ZLgN>0`bxkzV4M~qBuo_VgPd8BCnDo~Ua2$!kY+|_}nY%06(bboTHrH0O zZK?mmI!uW1(xyyRa{=*GlhIJ7&NoJ?Lg7F;yLhSY&eHf;AzhBlr>?BFKbvn>xE;SH z0|CI}s)Y06;kcUYKyNVG7WE^`HPbWY>Wh)ZQxKsIZg81ny{m8zHX{$3Ss1Sc?pg83+5%u|xf%6PARwY>~*8{NpN>a6k zDD$UUnm=ZCV}i**)47KFbF~!>sXDZ=x=FqgD%TCO4d$<-gM)n>fS0{#sQyAKm~iUV zP3O*?Yib;y7&n#N#_{p-M!0(C+<)rq)F8|=c@~xGlHP1jaaC7!$709w%T`QK$li48 zZ8txz2huY8yq*#hhvw~{ac<2SJxQ#@d&+6Jq!>OO-USn@<%#^~ab06h;PY38I31k8 z<}ddqIq!(-Qz%-AP%KeW-QeS}eRoB)HfWd*rP<*uWdyd9+gCaw6K94vj^52#1+34* zBNwLXdbWB4*<70DFm`^!Ik|ty+0nU2dC;S#Q$>}+!(LLuB;^-G zoLYxAa%9nSrry`Fl!3Go_6Jf;jTJq^eVvIwGknl!+=~?6m-JVV7)r;%d{a?R2Lr_6 zh`X3tUvt|)SG>2TVPvq^>CN?@|C6%Xdbq|g44FS`k`<|FurZYiFdwjun;deUXAsZC z6a5K})b+KtHI;!pT#3e%w=I(%&$f5P1Ac#%3g|qw zBN5B9OGRGWI8oD3=MQMJTDbpt(PR}Vx|(GUk3GnY3s;?TwJnuJdUD_3d6^^it> z!`S$ELo`1!7>2o7;$nj^TwC3r8)V|CI5DKr_0Wa3Il~?!3I;cz80O%T^6^xDugoYckm6qywq()Z}dwee2UBRS_y< z+QsIaz4F@0g}wabt!El1OrPqDKJUKVy=Ax-PN|bTjrt#lT9;;wWK_4bTJ`N%DQg05 zca=`5R;*;wcfHjFwyLghypv;C+ADZ`Lsc*m*3frxXo@?i2i&lhrEbVv&kjy}psyWG zP1~5e&uJ4imA;X4jYAP`Ey0D|9fqE`D>}%9%@a~JPTwvqhrjEsZS9G5oK4r#bnF)_ zT6O>0<8t;-AE}eUvuWm>jVyZ`X7ZI=I-|}wv)Sa3aG&Ozu_$MC?VE5Nfg;XXxoqLP zz5Q48wvIG~I-4Wx!IXIGf~kua&eX+Qla*}9F)016P=vOwU&5nJC4xxGFNq1)Ei}r_q63EM|#U+ZCaIc-cWf*UnYv6IyqMF z90O^lU*|Z7hBI|7Gwt!hU=KxPFMsO~Mr-QBb@K}sdDc%QYLQrZJnz0)#wa{~I5adm z81RKTJR1_^_VI3AaZMs#f|i;xcF1??qh^+N(zjB$a<1ZVG|-*yiv%+x6C>$BOi7-b z6Apb%i!F1{mmi?3{gAua{k)=Ujo!v27%a=YkK|ws(0Fc;z7}Ax;S~>0AaV`XXBy0| zI1Jr*DM{IBU4&)b=_qtI#}u}YO&UUmUs?vspwwSd%K=~2;Rew~IUbfdHq_OZuA-`X`E*@VA3 zp8SX-Ou+oga7#D_BEvyr_2UhGk~Yd89HYZ3rZ`wLGB&~~qKT%uGB}Mqr9e|G=hSgH z2|N4L#%nS)gI99MBR{RHrr0pQxmcO(Pn0E+Rb~to{Q<4*0B00-6N9|U1)Oj#Tj5)B zDPx-kms1{a#SGJtr44-bAe(BTSS~+M*>I+X{&g%h6uV;+XGSV1v&U!-f?Cd`FD{|1 z-ZI@Xc=cnh9t_r?mvs9Rs4~4{x7~W{SlQ56j(ZrlA9DSp`-wVNi!z$IhfX@CmPprT z?gjg5kVADWKsIAe%r{PLa_gY89c$(w6BPR|&xT_hFI`?2C`ayF4xJCiSD6Az5TG=x zg*Ei0%C>-)2Q%@ItXP8jL0xOSthueZEHO}H+>moLs(Si*s~aa9Ylh=q_-i7Nv5I6S zp~lN0PNptH&_JtHl4@`DRSpd0qOtkqsStY#+`tn0ch){}ecpXl(bdeWr%A9Gm1=tf zMKnXIr17K)&g^+=0#isl4PU08+##>Aj4~v4Rnjg)692OC%uro28AN(e%OQ12E_skz zNhr~p2u>|u43z4)eQ!x+O&|!_ekjaSj7o~b*+i5=SfZLIBB6zbxEk<8+?DO^O~L9$ zs^6-|dCC)AP4P76phzyG9+~gv*p+Ie|CKQv&U)tTL?YPT5(<>oQ_kVg>0Djvd_!uq z*_0@o#~Nd~L{)#bzp6Zys^NeTtEts9u(exM={o0(y`DPYz~$MgOve)YgcEuX}Y;(D1Vmy&1mG3ENifmnDEg@g&8CrltbD9N1uHWbx_)aq-FMi+YTM=aREs6q9_56>@+!`N zt4o!cYP7$-8x z2DXkXGCff9wQS~7RF)n-K!f|rbF|bylQQu~yf@$F#D$nni*0Gv@pP`gG0$HJq2obY z>#vFqwas4`iE)H(3Dn0z$Kdr>uEnW|A)3|`E>IK|$1_vyofk>A;_^)LO^)b9YNS0^ z7Lh)8sy{p48{|1j9K97}j;DUW&K?gEdxukj#FYBarIv)=!YN+aX;_Wvz z_boKkjRcxnI3|IaG1M4t9f)xz!9;y|W^^KHmQAsN0kpVvAqv?XR>AkiVkNDu;m(c} z#R}R-4Tym$e?Vqo|IYnccx2sXU&)k^s@k0j&cnH5hY6R}r4K*Kh$y7cddhEbl^MCB z+tV>7Ms-Eh-%wEseZ%aMcBDE8rJV4uN#}-t%UAZ9;V@chODczwdFsh;`^$qM{}m zmCrSGbJHH?NAYwf@o>o281wP}i%#@M4$q6VB%@v!CiQNf1(vRwfBu3=R2KefA=FLL z4i;B`fd|th8eW6fR+QIIj1MOvPL-534v(I9-^g@S(my&J9Ju+m+sBZh5b=!2m&r8j z8^7b$o3fe|2*+BkIGL{aN?*p3?vSI)Z$fik;)0#*a^lQJiu- zMDa%BfB9{QO+I9IkDCZlP`X@sEGJ`#nwy&MB%f zKj)i;S^8u{Ji5C&qa%NV#h!4qx{R#QU)|mkNkpo7DpZ-*>#|r?aRz3q-S} zW&lkB3WS&bGl{a9Jskh{cufg}B7<3|>W4JlS*Po7zNUZ>tSI+Z^NhwI4=vWDE4>@NNhbG1thXxKffk!`Uoc)B3)E~~ab=r{r-NHO88ngK z>}FOkqaB>DIB>^>_NDf|9qaQLFz8LBn~75%7o~wvbA@>{PkCc7-WO}`$5&hIpQ2_N z;GP|lDdT>WQk3JGP+^QATV1Mu;f|-&V>c5=jP5%&aW(`^=y062qrJi1(jIiT8ugKa zflHJU%8rSqp86P+uK@XeOMg?euRjy_SDu*Lo?baS*j_^x6)BH$Xp`n(W}xy|Nhy;F zlm(WJT7T3`Ubx^jVTRhbr#t}MVGABdfiReq@t}9cs*sV-#a50o>fgD z6Q~Q;o~<9h)j9vXZ?7*oo=gtK44MN&$G-5oJMki(<`1>bO(CaKQDT2(F=+`RP?c;PZoW)=vzgKRmSVNRkh?(S zqEf}15UiC_Z#F|Eox|bvuhSo1`kfx)hXu{&$W>He*JzRX2iZ?@Hp!La$bF-HneL8U zm{-H%;~N#bAN}5`LR`8f3`0o{oq5zj{k^B9z~+_ynlCj&g45P`qio4lh);^h?QJ>j z5>FR1@yhknU`Mz=)DgT`nubs9OGEbe_OqJrFXI-ZOUuH(H0tVfX=!=7yj;KGBV`a% z)2s=r^t;p$IzG1-9YPrayQgoUHju1HSJYN;Kyr5_$JTg50WSoSuA!#;^?9_T{lWU+ z2+tWydjqBVEXNg;_rt*MD&_Yx8(M#HRI9(4!XiMe9-T$*6&jDtE+91-ky#?w5_5%N|x;= zkL0kcAS{QrXrQB~H`2DcI-ffE7hQs@HfS1mB-vbZwfjRn za|K}r=ec=HqUD@uL}Ep$yo{*AS%<|{v8cPEiek3EG!o^(qsl}(HruFZS0R6xX&t#~ zM1f)SiDUeOy#bDzGR3@-a`*R5AgLY9a)!=oN8Mnex+l&N6?H@`cBDDO*410c6esfy z?W=9cf$Si8>NMwT-tB&{=sC(guqwlSy8*6cZda!t1>n|UZ`Xb3pFL^@-ZivC%qT zq%Pbt-IzMdBX;xzjk3PU`T3dJXugo)3BEjLqPjj%T3JdBgVKIYJnX8h$hiO339+iW zmIn*t`GB79>uQ^At8VAfF5&#}Kn45C#oVFFa9dkTuq#swtD@AM5b3!p80hS1)N@cM z+xoL3g>WPm36*z{XR;Yso2aUnf8u^I&!K89TEDb^L!H2x!ATWOxstHz#5m=a#-c0)oRD_v&5xSPhT4P0JH}C~ z$5OB}UF~N$;oncLt&P@9Qj z-WsMqfB)FUvqK)^odcI=Af$NR=bv@HX?$#~$t)3@#z!ZbFFfab-b%qz4(u+=;z z9M{QA8}F})wD4d!e4De9soHa3Q!zCizmLA3FDm1CCST_nT4aXRf@ppmDH5Cr7J2^RfAXWFYsVjnBWby=ezp$_m46a4RxHI+Hr2d zGUrm4f6UO`+&q(7Rr{Le_Hc#P$ehd^_n}nDp_?i8&JRTYoKXU zk#lGCcdQaQHMT!k)f?$fgfk5_lWk*98ZSI{uyCf9mia0w1F4B@<6Y*{m*^bCyd1pn z54fMDX9h&Qmy+X{F|3m6hSQ*i!JMf<$ACE2KAkGK1+Esu5Et#&c$#xxvfi}(?eyW- zLDvV$L!9%>fyz9xix}k&_I6a4x+`OGUnEi8obPL6$j9VloxM!xk!V9-TfK-bzFCh)jCnJpQetsW#$Q?1c&4$UEj`%4*49$5Pm>t0G!ia%`@`;wrX=ZuPE*yE z>1{4)zU<0QM0sU2 zbi;q%inpG*{Y-Lcb%t9Ljv=H| zNu!RhlW`)Ppg<6HH@3BuERa~0L^?X!f>qts&DGsi!M2W$$dAH2Hh$zu6TzBbur3gc zkzmDwr2PDQ;z=Xcll5yhHnkGwd4ry2&evz}nqA!z=|4d`^Jtr zHuPfEvGx{C$wN8q?heK9_0xEPCZ@VW&roBr#;+dPp3}Wze*xD*l{@IXK=&hy(ym~wr-I$yit<1w zC!8uF&~RtxNvy7t(#mM01i^fSYNjvBST7EGVpR=i>nb36u_;H;c*Oirf*OH*B;W&iN;u&aK6oVA8rKO*=UVDA=-RH}ERK6P z<0T90nd5j)7e{#|evjfFaMMoHJ5PaQe0i`eKZ)l}E%TJ$ewu8U=>96#Q&t#O49>u; z(dd-ab!LW!Y9Pz$csGY-<*oE<`re97lI0yM@5a_VR9W^9Eqje>{a7~=p6&QRom95HW4 zoFgv^X4V}U9vLWZu8p=;_RV%63Qg4WR1JwkD_h`waOzj*V~5+yVG-kS_#Gn!rFeoywG_@Nh|# zDcG49ILTiVtcVCYHvP1^h`*^G?)jmqgNEyas674QP|4V>>9$0zAxM^&@YtkKl{D(v&bWv9eUOa-rg`^)C2AUQgR-x;+x&p=K27A}N%j#fdY^TYd5VM1+NW=R|L+ zoNOO*y6oz&Z>?qx#o_UtdG~W16S7JV*SEB#{P+C(^~H5bQ#&my;n5%gfADetd`%>q z%Y;j!*q{IRx~n?kY_0L6w(jn9t&_}X+qMWIDBGjZb4s43;*Du!gE9WA-=` z^IN;iljIH@6A`_zzQ4Qd+GLZn8pS0?SB2{vD@tN6Uy3b*GM7IY5A{@+2Ey@>=}BPd z;?lzTxJh$sXO~x}3$D-8=Hi-$=3sK5e(=_bnk>glM~Z9e5+(U-Gfl(w<*9}k{F_(X ze{@-JMDL>2j|7+wT0W$773ro)W^?%*Nkbfhv6(=OlQ^p#uL(eAVM8yS-?D3pu!fJC zkb{IA!iuJxc38JeGo0R{?+$t<%oDtN^DT)$NtDCkTOiOfO}LtPc4n^*X3>ODQ5yEu z6>6(Hs(c9Bh~J(FL|a0+!&Tz3dI(-Pj1NL0)CVXhZeQWt*$9#uM36}~$I(r(&rUI; zBus9X>=~#G!lVup}=_usaUzEqW`kAzotCl z3-;x5(cxQfdm>N9eh^;QmpzwL^*b+((xoa0w!3sD(Iey%vtEdr+9|_Mah%iag7}UW zAJI$olS&LvE=*U{ONCyePY$8SDgRdD*;Fj~Lz+U5H0bfkODlta7Lx-y5E z^Y>h+A9cOjR6DwMwpLP!p&0ctvljE#rc(Z<)ty~y$}BGjA2axR*ZJ2g>wTT|q1O*S z#)-wp)_=Kw?8(4A;oKu8DcC;kLum~jx}=^v3ri}L0+r)#B~rvVh7%nJ&o-lxM2?z8ay{M*VMK!doJI_j6<$exGqnQQR*(|R6vfX(jmBtPSA?VcnC~% z;`ZBbpEPE_`jb~zj-MSx9?n!6ujt}&zLdhtn%debB7MDGb(}j^Qt2^6pN7i2X%2&AFXtt1i{n<8;r@phd^6A#k?=^j& zdCS{gJ?3udPcui3*x&c;x}Qwdy@}P)DHGSE;Tl2s8vi+kw5G(SG#GwnQh*TKk*rkKdf!Mj{1k1Ui`_%2KD@9n2klPUDLYy-XsEUm9Df6AdFSFHxob1Z&YeL-GI^1 z(ohL%$Iw|o@adnK0!5%V-Hzn2I$oOWOhnSE&Xx6z3`fnQkt%s`Wp}Ncw7RCOmfhT# z9^hTv)ZON~XbzH~{K~Q*R2v$2OpiMX;Rm+8&eN`R#r)kzgC%v%&F*`R4Im$tF%VJ} zgI5o>&9(cgynddENaz<+HRLT0C8N=9oC6sDv;!%*SIAGoIYf10)RLsOcV*ecn z(5Jhg)cYy%1j0e;TnF#iFUwEDCC4`!I2Za}_wP6>B&#alqvEoe)*dM~uyaJWi2hqdP#rXZ0}JX^tqEgxf-5^S8Y7y%x#lP_b>Hq^vEr`H+wpkSC%^( z#>U27&k~!XwttGFRbWKqSBE)g*A!=(I+_|LE-dwhTPsNfLXE+m`Lmpn-N!+5%7tHD zbiezP?q3z{ovuIBId!HgPi{wDnFRLq@M2}i#%;`u)8ILs^c7kO$ZXAN7m1+EEahIH zdnMs;m^x!IIz$ws9;Tz3iHUruA~iG`?i@|>w3N%QxpJn(lvzrvyT+&IS{T_i;o_=_ zs!WrKZgrFC>VSWEc70(q5Quj6yRV{`F36pnuEl9GI^mQWG$go|RI-kTclZj62ff*R zs5(2(#*nWpp6RMD55&u2<+0I`43rpVYu4sv)!prlnN--#v)xs-~=wlzfwIR zIvCD^bDK4bG@uhVW65ySoVkVtH{C{+@<{l2cp7s3fl$Xo<#@PTyt>NYwbPTmYQPh! zMC|SkL@G0WPJ;CULJikc-3V`>8`!q)f5w9@Lee4 z>{>Hc^Q1vq8xzE|Oi^Xkt@US`18tmv!-KHfgQs*Ui(jA6mIdaidT>F>KkJgool4_TjBOL?dEy*q(##osw4OKVnJno6Z z%~K^feY~-{X@2Xn{Opqk{8-mpKDjU-d+I-*FNNVtm6L-Os6Vmr2$HI{KlUllo^6~u zKMch#QX8zDoLcN0yLxZ6wYq_B5(9o=|Ev3jobf!MC&W0~DFwGj{v#~pRMIfv;o+e} z*DhsqniQbsR>2^}E3k_uJI!>A88QYr1o};#xYO9wP{EY$OCYd9g02D15GT`fN0Ui! zMWQSit43AUa1*{+UY_jj?MalD@>Fgi_QBjULH5oq~PNh8f|$Rg#+wSxnL z$=>ar`tkbIM2ay6J(%hqHFrJYIygKzTmg4k6pU;(drBiMYwzwtrVB5bBP7{=M4A_@ zZAihAj#Rg#nxZ~xzopuM< zW#0~V+usL!?0T@*?gRVG=hODfc;9cm2+Y{~VAd`M2W-BvXwZHwn6sY^4jIhbExa$- z{ot_uC*X*E6F6#*f@Ag@z;Sy3oUnu7q#XsP?DOEXY1@qTE#A-CmxFV*8=SX31}<3d z1sCnJ;F6_to0hF-fGhS@;HvdpaLv9KT({NV4Z9uOv~LBstY3iJrq?^xcX_{SKNj4x zpAYWahv0$zAb4m`fJgTI;IUnf*STn?8@pkz%{!QT(=Lv4eO`irhP5AWql3Yw%5QN>$Bjl^;K}sj)VKwUw{X8EqKTsaTgt# z&mUXgFX9=m_CJ7b`xek=e+BHMzdr2tVz9fY4D7K7!CreF?6W@&rtSBF{nnenjC~E5 zwVS{Jy8#@uKLqCNSAj$JyTQCY4i@YsaM*q#IASk@qxh;1fBP~xZmv6l-}= zeE8d~;0%`WVYkPDbKEr_cKZRiVChyMsS^x;=|u^ z;HLfO;Fk4kaNGVYxMQoQyY@Zcp8XbZ-+mr=0DH=Zzuf>H*`EZD@x4y$Rt>soNhfw| z20QI@V3(Z*yY0Kc9@^81zkLquvwOfaKG})gE`k|50cNd_fCJY1z(LyFiQV?VA?{r# z{`MuXVErdJYeTo0r%`_aNl|WJg|?!L&ilXc54HV8F5`jF6-T(+j1=7?_m z?E;vwYrrh`y&Jm;2kpDT95K9``1WfsPxR=t*$;rU7woaG1bZ2?J=pDcVA}o_*l+zCm?7fz5Z|`J0eb@+BqsD= zx1WJS_7A~46aSBStp*zJ4ZnrX?p{olObuwMvn+CKuf z%+Lo(>)v`y4Y<_hPsELASjQ`s}O0PUenY z>~|;sUhK97PLhH2GEQf~Y17V`lXvib)>;JTPW}%#Z@my) zIQeUEkzA!0yS)Tlww?*DFz@tYw`YNC_;xSj^a|4fE5NOjPlMZx{obOTlm7&F z84JBddzQX)-+C%|z%1X(IMw$b;oC3`t?D8&GW%xGZC?la@P|J9?O9-#!EXC|yzgO- z>%(qsV4wXLVA}p`u-|$qn6a-1v&7*({4D|w+Mfq=Sf&rVJq66$SRA{}fy4MlALH}` z;3#u?AO7}SaGW;xF;0H~PU5$H_}k;aX?qi#A(HgrZ@T&%KG}!ez5*^-zXcb$BYoKI z&ET^29dO0;Nb_kQ{`P8c-PRR1m?Qe|w@-pwj~yJ;cg+lqm`79PfY`a&>my&UXkjPx^~Dh6b&QgFa31_!Ob19Rq+ zLqykp<^{4A=7n)^*t!NBF;^V5vb-O|0{zSjL*Rr(K8@Wn;FPrlPFwrn46|oHovUJu(;oh)BC|Ks|?&` z#_wmG{t?`@t_JsrKmCkT_3Hqy?q{6RTgIur|JZ8dtYa559cuzUnZa&f1v{;~z%KHW zjLAbX*lm&by<`y??DiQjP3Az)hz}W)hh(tZDDMZX0yv28Ww4t*IfS2Nu-iUZVD`*l zx7ULsWNsP8>EpmL>&xIcaWaG5&V!TY=gLDe*zG=W#BU_ z+a5T<9G4}&&4W{{J+q9{MR3Nt4V)zoWU<>l;5_SsEOt{%7Kwpb#_9FovUMZ4!pxFo zoZbztG0LdTGoxj(+bh6LVrdq;y%^j!t=b_E&oWNWfqU2rR*h-Z0qg55cKZ@|WGrxu z%~?rXgP@yl8^GW280_{PunX@UV4VIH*mLrGu$Osc0DoHo)AV8hfBPbsv9`c0cVPg# zO@M<$tpWV)N8pgv3g#Id1NfW1ZJ2%y;BWfO=*gGCG5S7$zdZ+>II+P=a^nH)c0D+4 zt$;K5*Z_9BADm-E4`8<%aDjY#z>L!Y{O$X^Up}$G73Qn~{O#x98f)GG{OuudgE<-| zFFDKrcDn}Lw*EJ`gC7pyZ^Rn>?RIeg(_r3xNgJafA5V4miT78DyM31diFy0LSeBI6;+T5Pz!!r%bD+@$fSGfQQV9gZSH1!DIXu?YTiWzQKBz8cWXjTMoOG@V=W-lf!N= z1$(WxgMG}%%!gD7a@Z{nX2`U2*zG=WfS8cOZUrz$wx7dp`kp)$fE@nzNpP6Eki%|2 z07r?UIqarSj+F)%3-&4aKSnT7p;$jOI8A0 zw$!f`)1y_qJ%`!fx*e-Q@E_*zK!eCwavXc6%AvT~rD7Fe8%>l2egk*`EW`_J_fK=FK7e z?HOPen=^Wd07KaAQ((@19XMpZKW|U*zCbQIgumSej*w9dnfNw@-M+^Aan^T3*v$qf z4Nj5G4iVq}6r8~`hw!&2f^$@&hOpaDLDfTs@V7&737ZUIx7UL!rd6w^g=_XZ`N_Kd zH{b>lYzVul&0F~J5O(`AxWj602!H!4aL@E^-+n&t4~hcdA(_b#cKavrn7JU2-KIdd zbprbE?L7YWc(4o4&*N`bf<3JF^Z47B!9H?Dawx2n$8KX_hS;0O-`)TY5MA@wtrE=P znb?NPQXYT%AXu=z0S=QN=CK>AR{ZUc;22fMJpT3@aDp0F9=rV*oWgta*o`_AdB|tM zS#pCs{-&1C6aDh!A-dusRgOG%TLG7?GvJEt0auyd^Z1+EvyMIU_}gQ_P1d$~)(c++ zx5+2-*lh>gCHu`|w`y?TwDW*5p2y#Q0v?eG=kd1((BY|WN%fIl6tG(e>?DE}u-hEi z&C08Q-97;JQoSi)w?;6{d{n@0`(TFa7O>kl!2xVrz;5pWbKJWEb}I$**1v)UtX;rv zTi}TGPv9taE?_q)0>`mW0lWPJsC8C>__hd6Gp`l!w?BZh)WHh)TRAvy{&s;3vtaC2 zz;3tje%auPP5lMC-3G3a8x-)jSArXi&;tIZ>uxdb3fN8U+#z}wu$vp)GkxF3TMCR* zwf2xoX#u{x3}d$| zzzt@uVeGaAZkg}dW<@iMzr6|ErE)%u-KM~OW}IQ{b`^NYcpt`YWbOFdXNpFsm;V(= z?b%=t`*vE9H-oI(z%=KGjuiEigN1 zcLaaC0L~E`N2rIq7hGVSGQzW{XTT-)HAae-?dO6ka4ANLR=MvZT;mDgI@!nw{`M4b zlNo9RyG?@IMfZU__KU$?bFICi$MSx^=sNJA=m+2-?Hb{nj;Dgh>}InoLa*6RU|f&l zZ+C*7c>XB#O|YL88LI@c#8Le1W8eUp`6<@5~Xk zi1bwTNAb7sfCW~acoxxS6o303I7<8<#oulO$B6@@_}lZrN$&nA@lBtfW?YQoZ%+Yd ziNmABx3_@vmRh?&_Be{a{T^ImT{DWmje{#x+DGxXRd5ae8O7hod+@ghz)kXjQS5df zxXmaY#ot~5?lSsD@i+a|KJjN1e|sxi~V+oiY549VYBH z3wGNd2YZN$W7y3CmA{Q)H~m#VQF;u!wSieO>M`v00656ne+;|rfJ2N~W)Jd*G3=&q z7-mI3hTUETj+&p0QHL4BZa)Mk%+DwBhcWyu1WudppJ6yFC|NAPXI1 zKJ|c0RC~s-+XlEo_BDpxt_0V(k7L+v9o*pVk72hlaEofm7~<}< z&wU@mZvOxtvU@VdIDHa$OiUQZZZXhJ#gCm6?*2Ib_G_?WSu>%cxT zCF%s`Z~Lt(-e*|bj$^lb!2#B`(8o@R5SL^JWjbpbv!A&yoaqRYVaNGQRhbqK4@l7q+V@4P!zTE~M7;7A|b{=QF z@EY)#S)N@%BH;vfdjsfWq_9_Gk$tkx`ZCzfXqv!o_kg|ZOHN?7H-TyVVS;tme}EZk z9jsZcZE%2bL3U3RonW2yFW?YLEdX!KS3VyDsa(yKe%-AF>v|hJIqZ zHK3c?)Fk8d80@4v%{~mZxJmr&F0hC7<|KJ<9oUEWQlnzMKgl?K1(;#CZjyPS8XRCf zGRZjo2ACsCPclx~onoEU1QzTSaG1zUJSJ95lJ~MUAigbwGQxjX4Ogj?JMAdY1^W`!22ajS6pUwGs!r;3|yt=Fv&Q5CAe;X3fy3p zpTyt34Q`R`OfpX252{W+$v7ppGEQZaePYWb#u=M#KxiSt8FABjSEgE1D@r#8bgV+BQWCE5T)}4qRc3Owqy)aE*~ZMGM&*U_`tZ z++<&1iV^V+aGTs_ib(QdaM%1~k6d?(7V4W-v6-TUcY;Uc$y40f_c5DJardWb+ZEsp zE9+_6_IhxR*>D=K`y#kNFQ#c5eZcGf9$Y?oE4adJGL6^08(hPN)6A-00yoUJX;z)4 zZRfyk?!q)}qrObr7Qj6s-ZX7%0uSiRG;J#dkEl*e(>CrUZF?O!&B&dhZ5P2=a@`r) zb_F<(m1bxgyO^}?22hoU8QS)9P$Oc7w*44fBj=f+ZNCIJh#oVHh(Cf`M5h@ONoHu< zChvEN9y7G<%iuow^9*g%Hyko2&d|2cfydMhW@+1Vz-eqXOWRnZ(zdsObF2<#XP=2yS7eS=#n1aL1zNLfiEH zd(4}&wC&~K0kgm?ZF@X;L?oG|ZP$=DO%aXfXxn$e8GLMx5m5%tG2Z8lzs=FMyLrDz zzA=ZtwSmj5qvvSbufSD{eI`ak3S4Klnxk!>1vjbu&(XH`gWJr}bF}T{;I6sW9@+aG zZTlX0K>clww!IrXGT(EI*Ui(m4saUF&lBYy0B5avaPH*a!TFOQgiy${?ZS6{$xF95g6w->P6(?H$R1tN*QXP>!v0lU?M zhxBxTw*3Y?rZ0=M?G@lObrL+0d1sNfeH5Id(vF?10JuQ4d6BkV3u-JZVz(cIs=_T| zx9@?PRTr__FTf4@xJcW);1*uAh~0hz?l1}#Y1?DLJx1{&ZA*a%to{~hTMKx^?%1Lk z3q&AROiQ$lyTv{I9ym*@mbj-jIDhgHaN*>W;3Bih5^Z}CxP0W!km^ zPLppe)3#rNv&4#J>{brWpL_vaIQb#C$S7W>Z7&6v8Jo+rZ3|pIc?r0N<(FyOt3d5C zEYr64fm@b1d)wCEfIAla656%_?vYb1V>c=VwC&yCAu(Z@wmlitF2f3K({sqCPksi@ zoV)>?wVJ`Xlh1(jCr<|#*zZ^=TBMyTw2c{ywlPYJR);~wy*1iqgUjqaVJ+_38g2V8aE(#0#yE|D8{FA7#zF$zg5$Bq zIMvU0@W3_N_Ltxu+0hzp+Xat25tKTIKz0^U|wL)jJACNoF_lu zz;4e67g?)r5Z}&&%f!76GNmB6YJRdtRd55lT@I@9uz}sUyR_}I;5PZ#25oyixJ#XI zgZRe$f!!Vg4_KvcV7Cv0M?}R9+V%<7*;9DhCT+V8oZ*U_*zNDYIc9-P?DivYfed+* zw&CB{?PK8b$@{?-=JZYM_Gxg9O3Nm8dl1}Uk7EyZO;H#+0ERdZSMou$wszl+hf2@thzgWwK(H(Rvr5ZohfY|%FMmT23@ zK<$8R(Y6&2UO#CXxqJ@m_IwT?VVJ1 zrpOX^iM>AsXHMP%&SJ@3?Dj5j{^WLWff;Jo#9n5b6V-#3PpCo?d;br(dO~FlyS0Gp z+`(O9@8`fxM&B-W`!u*sA9u0a=fT~R--3H&^}CGI2f+ipYnO5QQSb0$r@q5_qdEf%Rx`*994K8u@J?uvG#BLV2YF!1cQHR;XZuHdnUL=hQ>W-HMED_ehu!Dx9>4d6W~4(U=O>sf`^RaJ=*plcucGIi6LHaniUz@ zF*)QuZHs_v+dgf3J*eH8eX1fcaEX@e(>A`B7;*+&#nbj_n^5<3pSC>&YIkOzw%rGA z!-v_YZSMqk*-6=_ZBGFAS>^51wl9E(_`p8*^cmnWclLm`T@Q*ebwJy`3eHj~I$$LT zvxEv^1-O9k9niMB!6j^aK-)eDu27+3o}spLK-(S!*X=ie8>~hTXxm-j7I)-;w*3*@ zp|uCJO@F&*e;3?`DSE*Fv(}<*`nDtc58$zV2NlC9qTC_(^mpJ4);Pr9z5vcy&jiJ~ zJfv+zZSLu}z$G$=L)u1uPuq&YRqHG$mhT~LD+f1-LWi`C9c9{f54cUFJ;ZJ=1$W81 z4{2Kx+_xLS1N%jwR;h=yja3cz^g-&FQ>-G7u-ip&hPuiTc6&TH$DKW*ZJz=csE-|C zH=R$sM65odZQlV`SdSmkwwHiwRPdO2?AL-DRKSjC+k3z*YL!Q{?Oosw^*zQ1dk06f z?Ot%7eZwQ#_I~h?`oIxwdm4Dm?$|MQ`y42{9n-dZz*(y3$Jp(;;5=FMF>SjYTqH6a z)3&qVvc)=$ws}CYqmOA@7r2g1jMp>vx9I< z+wKMr@zP`3#vTK9`wskkFPWUD2<<<0^E&?RymuE>@N_iiy+_ZpJbhnG{ruAVlA_!B zjq@2VKmRcK!!4+yu0<7bE%VORoI`XA>)^*1-N>s}VYhHX$MyW~Dr%?O{Qe1i;#%|j z6kG!MP5l4=+s~;=^2uBIs~f1c>u*z3<;Av3v6F6C6jT;3UF`zDznZJv!r$nVurc_4 zb}{*+_yg?sQoB!4#b;lb@4J>y{(rR|2HB%pFAa$KKRjc=dG~)I>T7ldI*VRg)Qp^r z$0%@};-V6)UCN$BS&<)pWd-|;LG~fS>?BkcMT@G?(#AOVpoViSlSQ>Ug@Sv~NGqFA zxVNIvYUgxI7{u&eh#M!CkopZvf}XKwNF|>NI(0&-ah!g6mUD~FQ@^>$Xr?a0%9?dE zYcbYU*pj@P9+Q`Grr$7SqhT){&XIGV)e;|xE)tDK`f1IWQcuCOcO zs&qwNRjz7R%oTUlxDu|UtJYQLsz>_O=t{YoT+OZ)SF5Yd)$ZzWb-KDZ$*9NG>*_-} z-tWq|vOJx2(3Nuyx$>Nk`J@}K%?w@4oW5pHUk6TK2Txyfr>{e&uldv0OMgFn`tOm` z*K?<@=TBcRoW5Q>eVsaeopxTQPOm?8di|->>rb6tf9mx5Q>WLTI=%kX>Gh{huRnEq z{i$=_CuK8(xnc7%m~mdR&dY%FGU&YIoR=ZzCGWfxoR`x-A94QWeCObK=U*3`my6EJ zl=CueUUJU$a?bT~&h>K6^>WVja?bT~&h>K6^>WUIa_8jGF5}h03iD2WuYXB{DVV_Kx7S_$1pUnU9M8rzV+O@fkt_9l^U0y2TU^ub8u!0@K3M#m zlFPjV94hxU-y6$r_b-+=l>egQ9|JE8J~lKQ_J_Y6d0XYvqU#9nepmgO>Mz8GW3P=@ z#BYuNTg`mUyAutGXC;1>JWPJ7HdFi3y5hPU>%LKczWyx@v4*EL{CneOb+vAzLZ)oTs#YQnY~Yyx0o8Qqb!oHNU9=filiu# zo=9pUX^EsHl8#6!B58=EAd-Ga>LF=|q#TlNNU9-ehNKvhUPx*oX@#T|l1@k}A!&r9 z5RyJf>L6)@qzsZSNU9)df}{wN9!Nbx4@3*KcOs^|bU;!8NdqJWkn}%N|492I<&Shf zQvFEtBgK#OK2rNg>od%pBAt&^KGOI|;Uj&I)IHMnNZBJ@k5oO<^hnVoJ&)8p((*{j zqpVHylxBA+c%wuhv5~??d|;_-q^*&%M!FiQYNV-=qDFcescEF8k&;F_ z8mVZcp;3>j=@D8UYWh;oNIRpQ2I*#`nvrHkiW%u;v|BH&jFd9c$w(z5jf@mB(#J?0 zBW=tm{7Uf|q>7OyMv55eVWftU7Dh@K>0p$PNdqGVjPx(ct)+dD@W*q z7pYyOb&=9VIv1&2q;ZkLMfw)0Tj&wFr?f3nwisOt_K~JViWccvq-K$pMM@UwSfpZ+ zhD8b%=~tv)k#-i%2UXrHFJQQi(_-B875!sBdJd^Mq~(y3LplzrIHci_fCx4A-3#ausu})m^cn2dIrj*jIKPuBLz)aJGNi|l z8bewPDKVtOkP1T@3@I?AzZmBpN_!zjkaQPPT}X2w#f9`1Qd>xCA*F?M7E)PAViM=A0c&wv=LH9NEabhgftP_S(F|^Y6xi| zq=e9ZqErylKu7_hRglyVPON)1_vi!MBX%Q*V^Taw?;y2CtW6qu;4V%+JytNOd61ffNVQ8%S*+t$~yVMrVL`NMj&{f%FC1 zO_#Pn$^z*Mq$-f6K#BtC38W^FmOx4Z=?J7EkcL1C0_g{&9*}lG$^q#Hq#BTBK#BqB z1*8^`RzNj;=>((_kVZfX0qFyz4v;oL$^hvCqzX{AUOhrP%WtIzkQzW*04I8*E+QgJ z10V%};s2ZHEhZ0qJMNWO|Kj|M@h`r=*#0BTMPmAk=P#DOIR0YzJJI_-?ok^(dJR1~ zPmfNxN9@yRXXE6v^ytI%=tcDC0eVE8m)1Jb`?K^&?1+cBM;-L&6{per+1w+l2+T6# z>x-=~uX`C@cM-3x{7;*wi;fqxb0%L zi`VW%hA{W&PVUh&xkq;p8FuN>Z@EYC*okxEu#3Si{<_%f;;xIiF5bFW>*B17u`a&4 z*y`e{i>WT2x>)MssEeU4e!AG{;--t4ZlX6cxH#!zq>GO(HoCazswawvE*82t=whIY ze=hdJp1D}&;+TtJZusTo0pga6SuS3=SmolB zi%~8<`8YX;xa5<(ibpOMxj5uvkc&Squ7#?TVvdV9F4nj><6?}9FD|yYxZIUCcDT6VVup(sE>^hi(fheachDmu1JPM*aB;!K1Q!onEO2qa#Q+!oTkLOf zzs3AEyl?(qoNqC{#rGE5+Zjh+;~tIDBY7R%4`xyEyT$Gnw_D6^@w%PdTQx)W8Hp@n zbBoI@CbxLpVsVSZEe5yv+hT8vyDjFnc-vxai?c1pw)ooW(G=t8gdU;#W-m@WZLze) z(H28n{A{ta#myEoTfA(svc<_3Birz?sjG^MEhe^j*kWOiv5FG|Tl{OWuf@F<^IE)X zv986r7UNocYq71xwHDJ_l{~Sm#jzH{TKsCUtHrGrvs%1rv8u(X7Nc4fJF%(7r52M~ zJ<^H~bu?o^9BMJB#h(^?THI+dr^TBVYg(LXF{Z_r7F$|eX)&b@PnuqfBQ1us_|axH zK@Y@?HdzpHPMl~lqQ!?68(LgwF`=Cv-9nFUp-1S!i9}*Qi~B6*vv|*9J&W@!#DbJ`Azgg^Naht_#7Oz>XW^tOuXcnK@Ss%Tf9-(caRbnxV z!z>1~;VnFpU2%5B*j10NqemU|=r6cOI(Y_FzWs4}^b>ky(Id@A*U_T` zdelabzC@26phr)pM?3WB272^MdSuZfomlZIybfkAxx6^IV&IB@EB39pw_@IkcPrMd zIJaWlif=2nt+=*g+KOi@maRCpV%UmbD|W58wPMzaS1VTSJ{A?DR(x8qX~m^gk7C5S z?~*f63o=+r=}J}-X_MW_@-i;ifbySsd%PhnTlg7hN<|aVwZ|rDrTv8rDBzeQz}NO z;gjN-&WexSYV0i*sW_x&#m9BT9u;>~%u(@1#Tpf7RE$yaMa32sS5!<rRirXn>r+A%W zb&As|MyL3kVsnbi>BPKq+^er}C3O2lEAcnQ-V}FJj0y2J#oE-BUdNT-Y%-UNuPL^s zxSC>Wil-@NnmC${SNxbOeVr@)k}JXDz|+Labo^W#joY}=m$?$VD~u)aFvY?Y2UAyi z4p(|TSITjvw{ay{Q`ES`yA|!|@ zjw3Yy@f*c%6t_{#M)4ZOY80nYj7ISp#by+jQA|c-Jz}9ajAAf~zbN*ixQn{dE4b31 zaV4?HKFXCY<4OVU6MRLk=6D3WH9qac2}QnNaHTuAl9wwzo<9ACE8WJGsOuBE_F;*L zk0>^xxQLfL;tW?3vy|#IR}lkI{6n!14fhb{p?HU49g1@(#-aFzVjGHUD5jx!hGH3t zVX7j6pBwMHletLViFo2AwDM#p%{eX4~jkL)E(YO zpZr|uZ|D=}N->X#FDSO4xPoE|iYKVLgRWF$ID%pbiXSL;ptylz28tIbR-oYo(suCy z#Rgobe_{fP2PhVxIDldRivK6}pSXWw{)zV|)}J_kx{_kVbGc7vxY9f66AVc!%zbL7 zPq%TUf8k1Bqff8kN^q*G}XpHFN)arwmL6OT_UK5_WO;M0{p z#Fbvlm9FPX-{(qqa-|loBwpOJxRQ3p;IaV5BVc!PL)V(E#aCx)K*d1B{@n$&aB=&*w_tU_70tPX*?VAmiyg zU>{=ghnBr%z9(PoJhw@8Lc@$d%y3(Gqdt#Do(MPAoWa;KYCv|ILZz@GQ6!y3##d z=~}L&Q*=~|(oVv!xe_X3bEQwvCn`61jyP^&xQX9pYEkr4%r^1b#A*|#O^i12*~DgZ z>KrfNN;~FC39i(_eY%S)RpRCBl%3qeeY(Jvis{p3+$VAU3S0?p6P6WQO#slOlDU#^`+%Nma#8AFa{&z>t(6ca^6@lZ6>tgL)AdO4_erW?r| k->+P?Ywt^uxt;x7(}CV6Jw{m^qG2 Date: Thu, 29 Nov 2018 22:07:51 +0100 Subject: [PATCH 63/73] QNetworkConfiguration: add missing timeout unit to setConnectTimeout doc Change-Id: I3738e989a41607244b55245222ec3c83dda68198 Reviewed-by: Alex Blasche --- src/network/bearer/qnetworkconfiguration.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp index 3367de80c8..e36903fc94 100644 --- a/src/network/bearer/qnetworkconfiguration.cpp +++ b/src/network/bearer/qnetworkconfiguration.cpp @@ -347,6 +347,8 @@ int QNetworkConfiguration::connectTimeout() const This allows control of the timeout used by \c QAbstractSocket to establish a connection. + \note \a timeout is in millisecond. + \warning This will have no effect if the bearer plugin doesn't have the CanStartAndStopInterfaces capability. From 86aabb500cce306d0729d159f82bfdcef9ac547a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 9 Nov 2018 15:57:42 +0100 Subject: [PATCH 64/73] Add lancelot tests to verify vertical alignment of inline images Adds a test case for 199f9c54484b0dae3bc81f83c880a965192ecb24. Task-number: QTBUG-59310 Change-Id: Iee26f8bc21884da36471935f64524b62c3f79ff4 Reviewed-by: Eirik Aavitsland --- tests/auto/other/lancelot/paintcommands.cpp | 28 +++++++++++++++++++ tests/auto/other/lancelot/paintcommands.h | 1 + .../auto/other/lancelot/scripts/richtext.qps | 9 ++++++ 3 files changed, 38 insertions(+) create mode 100644 tests/auto/other/lancelot/scripts/richtext.qps diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index 65a688ec40..8aa3a035e3 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #ifndef QT_NO_OPENGL @@ -441,6 +442,10 @@ void PaintCommands::staticInit() "^drawStaticText\\s+(-?\\w*)\\s+(-?\\w*)\\s+\"(.*)\"$", "drawStaticText ", "drawStaticText 10 10 \"my text\""); + DECL_PAINTCOMMAND("drawTextDocument", command_drawTextDocument, + "^drawTextDocument\\s+(-?\\w*)\\s+(-?\\w*)\\s+\"(.*)\"$", + "drawTextDocument ", + "drawTextDocument 10 10 \"html\""); DECL_PAINTCOMMAND("drawTiledPixmap", command_drawTiledPixmap, "^drawTiledPixmap\\s+([\\w.:\\/]*)" "\\s+(-?\\w*)\\s+(-?\\w*)\\s*(-?\\w*)\\s*(-?\\w*)" @@ -1295,6 +1300,29 @@ void PaintCommands::command_drawStaticText(QRegularExpressionMatch re) m_painter->drawStaticText(x, y, QStaticText(txt)); } +void PaintCommands::command_drawTextDocument(QRegularExpressionMatch re) +{ + if (!m_shouldDrawText) + return; + QStringList caps = re.capturedTexts(); + int x = convertToInt(caps.at(1)); + int y = convertToInt(caps.at(2)); + QString txt = caps.at(3); + + if (m_verboseMode) + printf(" -(lance) drawTextDocument(%d, %d, %s)\n", x, y, qPrintable(txt)); + + QTextDocument doc; + doc.setBaseUrl(QUrl::fromLocalFile(QDir::currentPath() + QLatin1String("/"))); + doc.setHtml(txt); + + m_painter->save(); + m_painter->translate(x, y); + doc.drawContents(m_painter); + m_painter->restore(); +} + + /***************************************************************************************************/ void PaintCommands::command_noop(QRegularExpressionMatch) { diff --git a/tests/auto/other/lancelot/paintcommands.h b/tests/auto/other/lancelot/paintcommands.h index 83e3bbc11c..79bdab634a 100644 --- a/tests/auto/other/lancelot/paintcommands.h +++ b/tests/auto/other/lancelot/paintcommands.h @@ -198,6 +198,7 @@ private: void command_drawRoundRect(QRegularExpressionMatch re); void command_drawText(QRegularExpressionMatch re); void command_drawStaticText(QRegularExpressionMatch re); + void command_drawTextDocument(QRegularExpressionMatch re); void command_drawTiledPixmap(QRegularExpressionMatch re); void command_path_addEllipse(QRegularExpressionMatch re); void command_path_addPolygon(QRegularExpressionMatch re); diff --git a/tests/auto/other/lancelot/scripts/richtext.qps b/tests/auto/other/lancelot/scripts/richtext.qps new file mode 100644 index 0000000000..787c97421b --- /dev/null +++ b/tests/auto/other/lancelot/scripts/richtext.qps @@ -0,0 +1,9 @@ +drawTextDocument 10 10 "Xy" +drawTextDocument 10 210 "Xy" +drawTextDocument 310 210 "Xy" +drawTextDocument 10 310 "Xy" + +drawTextDocument 10 410 "Xy" +drawTextDocument 10 510 "Xy" +drawTextDocument 310 410 "Xy" +drawTextDocument 310 510 "Xy" From c4daa2b5278bbc01adbb19cc12ee69fb0df79c19 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 19 Nov 2018 13:56:08 +0100 Subject: [PATCH 65/73] Fix compilation ::link() is defined in unistd.h, so include it. Change-Id: I58e99dbcdd64da6388f85d98e73e7d1bd56f4e37 Reviewed-by: Eirik Aavitsland --- tests/baselineserver/src/report.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/baselineserver/src/report.cpp b/tests/baselineserver/src/report.cpp index bef957ea35..5a55fe5b37 100644 --- a/tests/baselineserver/src/report.cpp +++ b/tests/baselineserver/src/report.cpp @@ -32,6 +32,7 @@ #include #include #include +#include Report::Report() : initialized(false), handler(0), written(false), numItems(0), numMismatches(0), settings(0), From 79e4fe54bfc1f36df6137cce84015dbb0a52639a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 23 Nov 2018 14:22:03 +0100 Subject: [PATCH 66/73] WebAssembly: Fix compilation of application on Windows host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running configure on a Windows host, it would fail with the error that the copy statement was invalid, due to the forward slashes. This makes configure finish without errors. Task-number: QTBUG-72000 Change-Id: Id315d7436bbbfd2cd5c5f2dfcfe0c3dc3b9e34c2 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Morten Johan Sørvig --- mkspecs/features/wasm/wasm.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf index 278a6719c7..13ac43443d 100644 --- a/mkspecs/features/wasm/wasm.prf +++ b/mkspecs/features/wasm/wasm.prf @@ -41,14 +41,14 @@ contains(TEMPLATE, .*app) { appjs.name = application qtloader.js appjs.output = $$DESTDIR/qtloader.js - appjs.commands = $$QMAKE_COPY $$WASM_PLUGIN_PATH/qtloader.js $$DESTDIR + appjs.commands = $$QMAKE_COPY $$shell_path($$WASM_PLUGIN_PATH/qtloader.js) $$shell_path($$DESTDIR) appjs.input = $$WASM_PLUGIN_PATH/qtloader.js appjs.depends = $$appjs.input QMAKE_EXTRA_COMPILERS += appjs appsvg.name = application qtlogo.svg appsvg.output = $$DESTDIR/qtlogo.svg - appsvg.commands = $$QMAKE_COPY $$WASM_PLUGIN_PATH/qtlogo.svg $$DESTDIR + appsvg.commands = $$QMAKE_COPY $$shell_path($$WASM_PLUGIN_PATH/qtlogo.svg) $$shell_path($$DESTDIR) appsvg.input = $$WASM_PLUGIN_PATH/qtlogo.svg appsvg.depends = $$appsvg.input QMAKE_EXTRA_COMPILERS += appsvg From 5dde7bd92211c4049b75738b17532f6d6a66b37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= Date: Mon, 8 Oct 2018 21:12:26 +0200 Subject: [PATCH 67/73] Erase password data on QLineEdit destruction The contents of a deleted QString can still remain in memory and can be accessible by tools that read the raw process memory. This means that a QLineEdit that serves as a password input field can leak the password after it is destroyed. With this patch, the contents of the m_text string member variable will be zeroed-out before the m_text is destructed. This is done only in the cases when the QLineEdit serves as a password field. [ChangeLog][QtWidgets][QWidgetLineControl/security] Zero-out the string that contains a password entered into the QLineEdit Change-Id: I8f88f952244bf8a0399c14acf0869439ca0a60ca Reviewed-by: Luca Beldi Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/widgets/widgets/qwidgetlinecontrol_p.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 3e33bc0605..b730b415f0 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -110,6 +110,12 @@ public: ~QWidgetLineControl() { + // If this control is used for password input, we don't want the + // password data to stay in the process memory, therefore we need + // to zero it out + if (m_echoMode != QLineEdit::Normal) + m_text.fill('\0'); + delete [] m_maskData; } From 416b4cf685030114837bd375664fd12047895a62 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 9 Nov 2018 10:04:54 +0100 Subject: [PATCH 68/73] Set correct vertical position for text following a very large image If the document is paged and contains an image spanning more than one page, correctly set the y position for everything following that image. Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172 Fixes: QTBUG-59886 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextdocumentlayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index ebd7a7d69f..323253c70d 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -155,7 +155,7 @@ struct QTextLayoutStruct { { return pageHeight == 0 ? 0 : (absoluteY() / pageHeight).truncate(); } inline void newPage() - { if (pageHeight == QFIXED_MAX) return; pageBottom += pageHeight; y = pageBottom - pageHeight + pageBottomMargin + pageTopMargin - frameY; } + { if (pageHeight == QFIXED_MAX) return; pageBottom += pageHeight; y = qMax(y, pageBottom - pageHeight + pageBottomMargin + pageTopMargin - frameY); } }; class QTextTableData : public QTextFrameData @@ -2709,7 +2709,7 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi qreal(q->paintDevice()->logicalDpiY()) / qreal(qt_defaultDpi()) : 1; getLineHeightParams(blockFormat, line, scaling, &lineAdjustment, &lineBreakHeight, &lineHeight, &lineBottom); - if (layoutStruct->pageHeight > 0 && layoutStruct->absoluteY() + lineBreakHeight > layoutStruct->pageBottom && + while (layoutStruct->pageHeight > 0 && layoutStruct->absoluteY() + lineBreakHeight > layoutStruct->pageBottom && layoutStruct->pageHeight >= lineBreakHeight) { layoutStruct->newPage(); From 49319734c11206f6993aa12b42a663d3906da26e Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Tue, 27 Nov 2018 15:25:53 +0100 Subject: [PATCH 69/73] ico image handler: check for out of range image size Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: I598db817c387867a449040f5be5427c8b8746483 Reviewed-by: Lars Knoll --- src/plugins/imageformats/ico/qicohandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp index e61173db30..30935cacda 100644 --- a/src/plugins/imageformats/ico/qicohandler.cpp +++ b/src/plugins/imageformats/ico/qicohandler.cpp @@ -506,6 +506,8 @@ QImage ICOReader::iconAt(int index) icoAttrib.h = iconEntry.bHeight; if (icoAttrib.h == 0) // means 256 pixels icoAttrib.h = header.biHeight/2; + if (icoAttrib.w > 256 || icoAttrib.h > 256) // Max ico size + return img; QImage::Format format = QImage::Format_ARGB32; if (icoAttrib.nbits == 24) From 46a2b44b2b7f50ced7f2c0731cc6224478d960c7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Oct 2018 14:41:41 +0200 Subject: [PATCH 70/73] qmake: fix QMAKE_DEFAULT_LIBDIRS detection on android amazingly enough, android has different sysroots for the compiler (shared includes full of #ifdefs) and the linker (per-platform libraries). this patch supports only clang for non-darwin, which notably covers all supported android ndks. with this fixed, we also remove the hard-coded setting of QMAKE_DEFAULT_*DIRS from the specs. amends 353fb118c. Change-Id: Ie0513de0f7123d7f5b8ca1ffcc72c017cddd126c Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- mkspecs/common/android-base-tail.conf | 3 --- mkspecs/features/toolchain.prf | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/mkspecs/common/android-base-tail.conf b/mkspecs/common/android-base-tail.conf index 57f009f78f..f403ef9330 100644 --- a/mkspecs/common/android-base-tail.conf +++ b/mkspecs/common/android-base-tail.conf @@ -87,6 +87,3 @@ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 !exists($$NDK_ROOT): error("You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.") load(qt_config) - -QMAKE_DEFAULT_LIBDIRS = $$QMAKE_LIBDIR -QMAKE_DEFAULT_INCDIRS = $$QMAKE_INCDIR diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index 4ecfb8d889..6039c52bd0 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -128,8 +128,8 @@ isEmpty($${target_prefix}.INCDIRS) { # paths, so it can't just be used in place of the above code). # What's more, -print-search-dirs can't be used on clang on Apple because it # won't print all the library paths (only the clang-internal ones). - output = $$system("$$cmd_prefix $$QMAKE_CXX -print-search-dirs", lines, ec) - !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX, $$output) + output = $$system("$$cmd_prefix $$QMAKE_LINK $$QMAKE_LFLAGS -print-search-dirs", lines, ec) + !equals(ec, 0): qtCompilerErrror($$QMAKE_LINK, $$output) for (line, output) { contains(line, "^libraries: .*") { From 521a85395da1a2728902816c072ec46bcb0ad380 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 1 Dec 2017 20:13:08 +0100 Subject: [PATCH 71/73] configure: actually resolve libraries into full filepaths this considerably speeds up failures, as no doomed build is attempted, and produces more reliable results, as no second lookup (which would be subject to environment changes) is done any more during the build. in principle, this also opens up possibilities like selecting specific variants of dependencies, automatically extracting rpaths, etc. qt_helper_lib.prf also needs to create fully resolved library names now. Change-Id: I65f13564b635433030e40fa017427bbc72d1c130 Reviewed-by: Joerg Bornemann --- configure.json | 2 +- mkspecs/features/qmake_use.prf | 1 - mkspecs/features/qt_configure.prf | 171 +++++++++++++++++++++------ mkspecs/features/qt_helper_lib.prf | 19 ++- src/network/configure.json | 1 - src/network/configure.pri | 6 +- src/plugins/sqldrivers/configure.pri | 50 +++----- 7 files changed, 173 insertions(+), 77 deletions(-) diff --git a/configure.json b/configure.json index 7c79b5c582..69e058e0c2 100644 --- a/configure.json +++ b/configure.json @@ -211,7 +211,7 @@ "verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "qmakeargs", "commit" ], "compile": [ "verifyspec" ], "detectPkgConfig": [ "cross_compile", "machineTuple" ], - "library": [ "pkg-config" ], + "library": [ "pkg-config", "compiler-flags" ], "getPkgConfigVariable": [ "pkg-config" ] }, diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf index f81d1cece4..dba45de92a 100644 --- a/mkspecs/features/qmake_use.prf +++ b/mkspecs/features/qmake_use.prf @@ -9,7 +9,6 @@ for(ever) { error("Library '$$name' is not defined.") !contains(use, nolink) { - QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu) debug: \ LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$$nu) else: \ diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 65ee7df50b..44d8a3e639 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -365,9 +365,13 @@ defineTest(qtConfTest_linkerSupportsFlag) { } defineReplace(qtConfFindInPathList) { + # This nesting is consistent with Apple ld -search_paths_first, + # and presumably with GNU ld (no actual documentation found). for (dir, 2) { - exists("$$dir/$${1}"): \ - return("$$dir/$${1}") + for (file, 1) { + exists("$$dir/$$file"): \ + return("$$dir/$$file") + } } return() } @@ -488,6 +492,110 @@ defineTest(qtConfSetupLibraries) { } } +# libs-var, libs, in-paths, out-paths-var +defineTest(qtConfResolveLibs) { + ret = true + paths = $$3 + out = + copy = false + for (l, 2) { + $$copy { + copy = false + out += $$l + } else: equals(l, "-s") { + # em++ flag to link libraries from emscripten-ports; passed on literally. + copy = true + out += $$l + } else: contains(l, "^-L.*") { + lp = $$replace(l, "^-L", ) + !exists($$lp/.) { + qtLog("Library path $$val_escape(lp) is invalid.") + ret = false + } else { + paths += $$lp + } + } else: contains(l, "^-l.*") { + lib = $$replace(l, "^-l", ) + lcan = + unix { + # Under UNIX, we look for actual shared libraries, in addition + # to static ones. + lcan += \ + $${QMAKE_PREFIX_SHLIB}$${lib}.$${QMAKE_EXTENSION_SHLIB} \ + $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB} + } else { + # Under Windows, we look only for static libraries, as even for DLLs + # one actually links against a static import library. + mingw { + lcan += \ + # MinGW supports UNIX-style library naming in addition to + # the MSVC style. + lib$${lib}.dll.a lib$${lib}.a \ + # Fun fact: prefix-less libraries are also supported. + $${lib}.dll.a $${lib}.a + } + lcan += $${lib}.lib + } + l = $$qtConfFindInPathList($$lcan, $$paths $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS) + isEmpty(l) { + qtLog("None of [$$val_escape(lcan)] found in [$$val_escape(paths)] and global paths.") + ret = false + } else { + out += $$l + } + } else { + out += $$l + } + } + $$1 = $$out + export($$1) + !isEmpty(4) { + $$4 = $$paths + export($$4) + } + return($$ret) +} + +# source-var +defineTest(qtConfResolveAllLibs) { + ret = true + !qtConfResolveLibs($${1}.libs, $$eval($${1}.libs), , $${1}.libdirs): \ + ret = false + for (b, $${1}.builds._KEYS_): \ + !qtConfResolveLibs($${1}.builds.$${b}, $$eval($${1}.builds.$${b}), $$eval($${1}.libdirs), ): \ + ret = false + return($$ret) +} + +# libs-var, in-paths, libs +defineTest(qtConfResolvePathLibs) { + ret = true + for (libdir, 2) { + !exists($$libdir/.) { + qtLog("Library path $$val_escape(libdir) is invalid.") + ret = false + } + } + !qtConfResolveLibs($$1, $$3, $$2): \ + ret = false + return($$ret) +} + +# includes-var, includes +defineTest(qtConfResolvePathIncs) { + ret = true + for (incdir, 2) { + !exists($$incdir/.) { + qtLog("Include path $$val_escape(incdir) is invalid.") + ret = false + } + } + 2 -= $$QMAKE_DEFAULT_INCDIRS + $$1 = $$2 + export($$1) + return($$ret) +} + # the library is specified inline in a 'libs' field. # overrides from the command line are accepted. defineTest(qtConfLibrary_inline) { @@ -517,7 +625,6 @@ defineTest(qtConfLibrary_inline) { vars += $$eval(config.commandline.rev_assignments.$${iv}) defined(config.input.$${iv}, var) { eval($${1}.builds.$${b} = $$eval(config.input.$${iv})) - export($${1}.builds.$${b}) $${1}.builds._KEYS_ *= $${b} any = true } else { @@ -532,35 +639,30 @@ defineTest(qtConfLibrary_inline) { export($${1}.builds._KEYS_) # we also reset the generic libs, to avoid surprises. $${1}.libs = - export($${1}.libs) } # direct libs. overwrites inline libs. - defined(config.input.$${input}.libs, var) { + defined(config.input.$${input}.libs, var): \ eval($${1}.libs = $$eval(config.input.$${input}.libs)) - export($${1}.libs) - } + + includes = $$eval(config.input.$${input}.incdir) # prefix. prepends to (possibly overwritten) inline libs. prefix = $$eval(config.input.$${input}.prefix) !isEmpty(prefix) { - $${1}.includedir = $$prefix/include - export($${1}.includedir) + includes += $$prefix/include $${1}.libs = -L$$prefix/lib $$eval($${1}.libs) - export($${1}.libs) - } - - incdir = $$eval(config.input.$${input}.incdir) - !isEmpty(incdir) { - $${1}.includedir = $$incdir - export($${1}.includedir) } libdir = $$eval(config.input.$${input}.libdir) - !isEmpty(libdir) { + !isEmpty(libdir): \ $${1}.libs = -L$$libdir $$eval($${1}.libs) - export($${1}.libs) - } + + !qtConfResolveAllLibs($$1): \ + return(false) + + !qtConfResolvePathIncs($${1}.includedir, $$includes): \ + return(false) return(true) } @@ -572,17 +674,13 @@ defineTest(qtConfLibrary_makeSpec) { isEmpty(spec): \ error("makeSpec source in library '$$eval($${1}.library)' does not specify 'spec'.") - $${1}.includedir = $$eval(QMAKE_INCDIR_$$spec) - export($${1}.includedir) - $${1}.libs = - for (l, QMAKE_LIBDIR_$$spec): \ - $${1}.libs += -L$$l - $${1}.libs += $$eval(QMAKE_LIBS_$$spec) - export($${1}.libs) + !qtConfResolvePathLibs($${1}.libs, $$eval(QMAKE_LIBDIR_$$spec), $$eval(QMAKE_LIBS_$$spec)): \ + return(false) - # the library definition is always in scope, so no point in exporting it. - $${1}.export = false - export($${1}.export) + !qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec)): \ + return(false) + + # note that the object is re-exported, because we resolve the libraries. return(true) } @@ -602,13 +700,15 @@ defineTest(qtConfLibrary_pkgConfig) { } qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false) - qtRunLoggedCommand("$$pkg_config --libs-only-L $$args", libpaths)|return(false) - qtRunLoggedCommand("$$pkg_config --libs-only-l $$args", libs)|return(false) version ~= s/[^0-9.].*$// $${1}.version = $$first(version) export($${1}.version) - eval($${1}.libs = $$libpaths $$libs) - export($${1}.libs) + + qtRunLoggedCommand("$$pkg_config --libs-only-L $$args", libpaths)|return(false) + qtRunLoggedCommand("$$pkg_config --libs-only-l $$args", libs)|return(false) + eval(libs = $$libpaths $$libs) + !qtConfResolveLibs($${1}.libs, $$libs): \ + return(false) qtRunLoggedCommand("$$pkg_config --cflags $$args", $${1}.cflags)|return(false) # Split CFLAGS into stuff that goes into DEFINES, INCLUDEPATH, and other stuff. @@ -633,10 +733,11 @@ defineTest(qtConfLibrary_pkgConfig) { } !isEmpty(ignored): \ qtLog("Note: Dropped compiler flags '$$ignored'.") + !qtConfResolvePathIncs($${1}.includedir, $$includes): \ + return(false) $${1}.defines = $$defines export($${1}.defines) - $${1}.includedir = $$includes - export($${1}.includedir) + return(true) } diff --git a/mkspecs/features/qt_helper_lib.prf b/mkspecs/features/qt_helper_lib.prf index b3e49e4626..1a8446acb4 100644 --- a/mkspecs/features/qt_helper_lib.prf +++ b/mkspecs/features/qt_helper_lib.prf @@ -34,19 +34,30 @@ THE_TARGET = $$qt5LibraryTarget($$TARGET) MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_ext_$${MODULE}.pri ucmodule = $$upper($$MODULE) + win32|CONFIG(static, static|shared) { + prefix = $$QMAKE_PREFIX_STATICLIB + suffix = $$QMAKE_EXTENSION_STATICLIB + } else { + prefix = $$QMAKE_PREFIX_SHLIB + suffix = $$QMAKE_EXTENSION_SHLIB + } MODULE_PRI_CONT = \ "QMAKE_INCDIR_$${ucmodule} = $$val_escape(MODULE_INCLUDEPATH)" \ "QMAKE_DEFINES_$${ucmodule} = $$val_escape(MODULE_DEFINES)" debug_and_release { - win32: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}d - darwin: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}_debug - MODULE_RELEASE_LIBS = -L$$DESTDIR -l$$TARGET + win32: \ + MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}d.$$suffix + else: darwin: \ + MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}_debug.$$suffix + else: \ + error("'$$QMAKE_PLATFORM' does not do debug_and_release.") + MODULE_RELEASE_LIBS = $$DESTDIR/$$prefix$${TARGET}.$$suffix MODULE_PRI_CONT += \ "QMAKE_LIBS_$${ucmodule} =" \ # Needed for the module to be recognized. "QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \ "QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_RELEASE_LIBS)" } else { - MODULE_LIBS = -L$$DESTDIR -l$$THE_TARGET + MODULE_LIBS = $$DESTDIR/$$prefix$${THE_TARGET}.$$suffix MODULE_PRI_CONT += \ "QMAKE_LIBS_$${ucmodule} = $$val_escape(MODULE_LIBS)" } diff --git a/src/network/configure.json b/src/network/configure.json index 327131ba11..019f8378c7 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -32,7 +32,6 @@ ] }, "network": { - "export": "", "sources": [ { "type": "makeSpec", "spec": "NETWORK" } ] diff --git a/src/network/configure.pri b/src/network/configure.pri index fa502db1d1..ad4d711cba 100644 --- a/src/network/configure.pri +++ b/src/network/configure.pri @@ -1,10 +1,10 @@ # custom tests defineTest(qtConfLibrary_openssl) { - libs = $$getenv("OPENSSL_LIBS") + eval(libs = $$getenv("OPENSSL_LIBS")) !isEmpty(libs) { - eval($${1}.libs = $$libs) - export($${1}.libs) + !qtConfResolveLibs($${1}.libs, $$libs): \ + return(false) return(true) } qtLog("$OPENSSL_LIBS is not set.") diff --git a/src/plugins/sqldrivers/configure.pri b/src/plugins/sqldrivers/configure.pri index 24954e9514..747a47e7b8 100644 --- a/src/plugins/sqldrivers/configure.pri +++ b/src/plugins/sqldrivers/configure.pri @@ -1,29 +1,16 @@ # custom tests -defineReplace(filterLibraryPath) { - str = $${1} - for (l, QMAKE_DEFAULT_LIBDIRS): \ - str -= "-L$$l" - - return($$str) -} - defineTest(qtConfLibrary_psqlConfig) { pg_config = $$config.input.psql_config isEmpty(pg_config): \ pg_config = $$qtConfFindInPath("pg_config") !win32:!isEmpty(pg_config) { qtRunLoggedCommand("$$pg_config --libdir", libdir)|return(false) + !qtConfResolvePathLibs($${1}.libs, $$libdir, -lpq): \ + return(false) qtRunLoggedCommand("$$pg_config --includedir", includedir)|return(false) - libdir -= $$QMAKE_DEFAULT_LIBDIRS - libs = - !isEmpty(libdir): libs += "-L$$libdir" - libs += "-lpq" - $${1}.libs = $$libs - includedir -= $$QMAKE_DEFAULT_INCDIRS - $${1}.includedir = $$includedir - export($${1}.libs) - export($${1}.includedir) + !qtConfResolvePathIncs($${1}.includedir, $$includedir): \ + return(false) return(true) } qtLog("pg_config not found.") @@ -34,8 +21,9 @@ defineTest(qtConfLibrary_psqlEnv) { # Respect PSQL_LIBS if set PSQL_LIBS = $$getenv(PSQL_LIBS) !isEmpty(PSQL_LIBS) { - eval($${1}.libs = $$PSQL_LIBS) - export($${1}.libs) + eval(libs = $$PSQL_LIBS) + !qtConfResolveLibs($${1}.libs, $$libs): \ + return(false) } else { !qtConfLibrary_inline($$1, $$2): \ return(false) @@ -58,7 +46,6 @@ defineTest(qtConfLibrary_mysqlConfig) { qtRunLoggedCommand("$$mysql_config $$query", libs)|return(false) qtRunLoggedCommand("$$mysql_config --include", includedir)|return(false) eval(libs = $$libs) - libs = $$filterLibraryPath($$libs) # -rdynamic should not be returned by mysql_config, but is on RHEL 6.6 libs -= -rdynamic equals($${1}.cleanlibs, true) { @@ -69,16 +56,15 @@ defineTest(qtConfLibrary_mysqlConfig) { } libs = $$cleanlibs } - $${1}.libs = $$libs + !qtConfResolveLibs($${1}.libs, $$libs): \ + return(false) eval(rawincludedir = $$includedir) rawincludedir ~= s/^-I//g includedir = for (id, rawincludedir): \ includedir += $$clean_path($$id) - includedir -= $$QMAKE_DEFAULT_INCDIRS - $${1}.includedir = $$includedir - export($${1}.libs) - export($${1}.includedir) + !qtConfResolvePathIncs($${1}.includedir, $$includedir): \ + return(false) return(true) } qtLog("mysql_config not found.") @@ -86,14 +72,14 @@ defineTest(qtConfLibrary_mysqlConfig) { } defineTest(qtConfLibrary_sybaseEnv) { - libs = + libdir = sybase = $$getenv(SYBASE) !isEmpty(sybase): \ - libs += "-L$${sybase}/lib" - eval(libs += $$getenv(SYBASE_LIBS)) - !isEmpty(libs) { - $${1}.libs = $$libs - export($${1}.libs) - } + libdir += $${sybase}/lib + eval(libs = $$getenv(SYBASE_LIBS)) + isEmpty(libs): \ + libs = $$eval($${1}.libs) + !qtConfResolvePathLibs($${1}.libs, $$libdir, $$libs): \ + return(false) return(true) } From 1314d2688c6eab24d33e2a558403fa6e2482f849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 30 Nov 2018 15:28:13 +0100 Subject: [PATCH 72/73] macOS: Fix Objective-C namespaceing with Xcode 10 Xcode 10 ships version 921.0.1 of cctools, which otool is part of. The defaults have changed in that version to no longer print verbosely (symbolically), which we relied on. We now request it explicitly. Change-Id: Ifbe0c97462b9f78cf128c820847eff9c72f17065 Reviewed-by: Timur Pocheptsov Reviewed-by: Tim Blechmann --- mkspecs/features/data/mac/objc_namespace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/data/mac/objc_namespace.sh b/mkspecs/features/data/mac/objc_namespace.sh index 6ac004fe2d..ceff2df324 100755 --- a/mkspecs/features/data/mac/objc_namespace.sh +++ b/mkspecs/features/data/mac/objc_namespace.sh @@ -146,7 +146,7 @@ inspect_binary() { echo "found namespaced class names, updating class entries..." fi - classes=$(otool -o "$target" | grep class_ro_t) + classes=$(otool -o -v "$target" | grep class_ro_t) while read -a class; do address="$(sanitize_address ${class[1]})" From b82559244e2dc03f1ceff66bb67630df4300dc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 30 Nov 2018 14:51:18 +0100 Subject: [PATCH 73/73] macOS: Account for LC_BUILD_VERSION when checking SDK version and deployment target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The more modern LC_BUILD_VERSION load command was introduced in the 10.13 SDK to unify the various versions of the LC_*_VERSION_MIN command. When building with a deployment target of 10.14, the linker will use this load command instead. Change-Id: Ic3571fdbfdf4dfb9346128c6f6e75d1e06f86cd2 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoahelpers.mm | 25 +++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index 36841c77ab..d86e935788 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -402,23 +402,30 @@ QOperatingSystemVersion QMacVersion::currentRuntime() QMacVersion::VersionTuple QMacVersion::versionsForImage(const mach_header *machHeader) { + static auto makeVersionTuple = [](uint32_t dt, uint32_t sdk) { + return qMakePair( + QOperatingSystemVersion(QOperatingSystemVersion::MacOS, + dt >> 16 & 0xffff, dt >> 8 & 0xff, dt & 0xff), + QOperatingSystemVersion(QOperatingSystemVersion::MacOS, + sdk >> 16 & 0xffff, sdk >> 8 & 0xff, sdk & 0xff) + ); + }; + auto commandCursor = uintptr_t(machHeader) + sizeof(mach_header_64); for (uint32_t i = 0; i < machHeader->ncmds; ++i) { load_command *loadCommand = reinterpret_cast(commandCursor); if (loadCommand->cmd == LC_VERSION_MIN_MACOSX) { auto versionCommand = reinterpret_cast(loadCommand); - uint32_t dt = versionCommand->version; // Deployment target - uint32_t sdk = versionCommand->sdk; // Build SDK - return qMakePair( - QOperatingSystemVersion(QOperatingSystemVersion::MacOS, - dt >> 16 & 0xffff, dt >> 8 & 0xff, dt & 0xff), - QOperatingSystemVersion(QOperatingSystemVersion::MacOS, - sdk >> 16 & 0xffff, sdk >> 8 & 0xff, sdk & 0xff) - ); + return makeVersionTuple(versionCommand->version, versionCommand->sdk); +#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13) + } else if (loadCommand->cmd == LC_BUILD_VERSION) { + auto versionCommand = reinterpret_cast(loadCommand); + return makeVersionTuple(versionCommand->minos, versionCommand->sdk); +#endif } commandCursor += loadCommand->cmdsize; } - Q_ASSERT_X(false, "QCocoaIntegration", "Could not find version-min load command"); + Q_ASSERT_X(false, "QCocoaIntegration", "Could not find any version load command"); Q_UNREACHABLE(); }