summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/xkbcommon/src/keysym-utf.c
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@digia.com>2014-02-05 16:25:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-19 15:42:13 +0100
commitb19b0808940c8c54b102012be134a370b26e348e (patch)
tree63d951814f771e87508be7b0f8d4346d0079dc05 /src/3rdparty/xkbcommon/src/keysym-utf.c
parentc6b555dac389f9a599a9ad342de56dea329fff60 (diff)
Update bundled libxkbcommon version to 0.4.0
This release comes with important bug fixes. Also we can now remove the workaround code which was needed for libxkbcommon 0.2.0. Task-number: QTBUG-31712 Task-number: QTBUG-33732 Task-number: QTBUG-34056 Change-Id: I57caf7f803b9a01a15541a5ad82e464de3b8abbb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/xkbcommon/src/keysym-utf.c')
-rw-r--r--src/3rdparty/xkbcommon/src/keysym-utf.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/3rdparty/xkbcommon/src/keysym-utf.c b/src/3rdparty/xkbcommon/src/keysym-utf.c
index 5484a8311d..129da15cf8 100644
--- a/src/3rdparty/xkbcommon/src/keysym-utf.c
+++ b/src/3rdparty/xkbcommon/src/keysym-utf.c
@@ -838,20 +838,19 @@ static const struct codepair keysymtab[] = {
static uint32_t
bin_search(const struct codepair *table, size_t length, xkb_keysym_t keysym)
{
- int min = 0;
- int max = length;
- int mid;
+ int first = 0;
+ int last = length;
if (keysym < table[0].keysym || keysym > table[length].keysym)
return 0;
/* binary search in table */
- while (max >= min) {
- mid = (min + max) / 2;
+ while (last >= first) {
+ int mid = (first + last) / 2;
if (table[mid].keysym < keysym)
- min = mid + 1;
+ first = mid + 1;
else if (table[mid].keysym > keysym)
- max = mid - 1;
+ last = mid - 1;
else /* found it */
return table[mid].ucs;
}