qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1 of 3] Fix keymap handling for vnc console


From: John Haxby
Subject: Re: [Qemu-devel] [PATCH 1 of 3] Fix keymap handling for vnc console
Date: Thu, 08 Jan 2009 20:46:46 +0000
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Anthony Liguori wrote:
John Haxby wrote:
Fix keymap handling for international keyboards

Signed-off-by: John Haxby <address@hidden>

[snip]

Doing an in place sort of a literal array is probably not a great idea. Why does the array need sorting? The indenting is really screwed up here.

The size of the array is dramatically larger than it used to be -- over 1000 entries -- so a linear search over about 200 keysyms is, I thought, a little excessive for linear search and would take an appreciable time at start up. It also seems to me that more keysyms might need to be added in future: the choice was a one-off sort in the vnc_keysym.h definition which is prone to future editing errors or the one-off static sort in the code. I tossed the arguments back and forth with my stuffed penguin and came down in favour of sorting the array: it's a technique I've used before when I wanted robust code at the expense of a little initialisation overhead. Why do you think it's not a good idea? I'll happily revisit the notion.

I have no idea why the indenting is screwed up -- it wasn't. I think the Christmas Elves must've got at it.

Read and understood the remainder of the comments. I'll re-submit the patches tomorrow -- thanks for looking.

jch





reply via email to

[Prev in Thread] Current Thread [Next in Thread]