From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2Wsp-0002pS-12 for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:00:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2Wsn-0002ma-13 for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:00:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2Wsm-0002mF-R4 for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:00:04 -0500 Received: from [195.3.96.89] (helo=email.aon.at) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H2Wsm-0006hg-4E for qemu-devel@nongnu.org; Thu, 04 Jan 2007 13:00:04 -0500 Received: from m1016p009.adsl.highway.telekom.at (HELO s37.loc) ([62.47.158.233]) (envelope-sender ) by smarthub74.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 4 Jan 2007 17:59:57 -0000 Received: from cow by s37.loc with local (Exim 4.63) (envelope-from ) id 1H2WuW-0000dQ-7J for qemu-devel@nongnu.org; Thu, 04 Jan 2007 19:01:52 +0100 Date: Thu, 4 Jan 2007 19:01:52 +0100 From: Bernhard Fischer Subject: Re: [Qemu-devel] [patch] factor out commonly used scancode translation table Message-ID: <20070104180152.GH28746@aon.at> References: <20070104172914.GG28746@aon.at> <459D3EF8.4030101@videotron.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <459D3EF8.4030101@videotron.ca> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 ¹). >> >>Comments? >> >How it is done right now, each time x_keycode.c is included, you will >end up with an extra copy in the final executable. Perhaps that simply >keeping the LUT in sdl.c but removing the 'static' keyword from it and >creating a sdl.h file with the statement: 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. What's the preferred method? public LUT or public accessor?