[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] Fix binary search in console-client
From: |
Diego Nieto Cid |
Subject: |
[PATCH 0/2] Fix binary search in console-client |
Date: |
Thu, 4 Jun 2015 22:58:08 -0300 |
Hi
A few weeks ago, a problem with the Hurd console was reported at the
IRC channel.
Justus had a look at it and he found that the keysym to unicode translation
was broken when converting a keysym lower than the lowest keysym known to
the conversion table. He fixed it by quitting the search if the value
looked for is not in the range being considered.
I'm sending this alternative to be considered instead because I don't
feel right with penalizing successful lookups with the extra comparisons :)
BTW it's just a feeling; I didn't check whether more existing keysyms are
looked up than non-existant ones. And it's probably irrelevant given the time
between keystrokes is astronomic compared to the speed of a CPU.
Patch one is probably good to have. Just in case pointers go wild in the future.
Regards,
Diego
--
Diego Nieto Cid (2):
* console-client/xkb/kstoucs.c (find_ucs): assert precondition.
console-client: Fix lower range of binary search
console-client/xkb/kstoucs.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--
2.1.4
- [PATCH 0/2] Fix binary search in console-client,
Diego Nieto Cid <=