From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2X5k-0001Qn-7r for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:13:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2X5j-0001PS-BY for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:13:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2X5j-0001P5-6J for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:13:27 -0500 Received: from [193.7.176.60] (helo=mail.bawue.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H2X5i-0000at-Ou for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:13:27 -0500 Date: Thu, 4 Jan 2007 18:10:30 +0000 Subject: Re: [Qemu-devel] [patch] factor out commonly used scancode translation table Message-ID: <20070104181030.GA3277@networkno.de> References: <20070104172914.GG28746@aon.at> <459D3EF8.4030101@videotron.ca> <20070104180152.GH28746@aon.at> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20070104180152.GH28746@aon.at> From: Thiemo Seufer Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bernhard Fischer Cc: qemu-devel@nongnu.org Bernhard Fischer wrote: > On Thu, Jan 04, 2007 at 12:52:56PM -0500, Jonathan Phenix wrote: > >Bernhard Fischer wrote: > >>Hi, > >> > >>The attached patch moves the x_keycode_to_pc_keycode LUT from sdl.c into > >>an x_keycode.c. This struct is also used by the GGI backend (that is not > >>yet merged =B9). > >> > >>Comments? > >> =20 > >How it is done right now, each time x_keycode.c is included, you will=20 > >end up with an extra copy in the final executable. Perhaps that simply= =20 > >keeping the LUT in sdl.c but removing the 'static' keyword from it and= =20 > >creating a sdl.h file with the statement: >=20 > Yes, or create one public accessor func (_translate_keycode() or the > like). I don't have SDL installed, so only have the LUT once, but you're > of course right. >=20 > What's the preferred method? public LUT or public accessor? Public accessor, I'd say. Keystroke processing isn't performance critical. Thiemo