From 03bbffb0d73c96e628442e107f2a42617171a820 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 6 Mar 2009 20:27:10 +0000 Subject: Refactor keymap code to avoid duplication ("Daniel P. Berrange") Each of the graphical frontends #include a .c file, for keymap code resulting in duplicated definitions & duplicated compiled code. A couple of small changes allowed this to be sanitized, so instead of doing a #include "keymaps.c", duplicating all code, we can have a shared keymaps.h file, and only compile code once. This allows the next patch to move the VncState struct out into a header file without causing clashing definitions. Makefile | 9 +++++--- b/keymaps.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ curses.c | 3 -- curses_keys.h | 9 +++----- keymaps.c | 45 ++++++++++++++++--------------------------- sdl.c | 3 -- sdl_keysym.h | 7 ++---- vnc.c | 5 +--- vnc_keysym.h | 7 ++---- 9 files changed, 97 insertions(+), 51 deletions(-) Signed-off-by: Daniel P. Berrange Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6721 c046a42c-6fe2-441c-8c8c-71466251a162 --- sdl_keysym.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sdl_keysym.h') diff --git a/sdl_keysym.h b/sdl_keysym.h index c9087d75a7..c213ef873b 100644 --- a/sdl_keysym.h +++ b/sdl_keysym.h @@ -1,7 +1,6 @@ -typedef struct { - const char* name; - int keysym; -} name2keysym_t; + +#include "keymaps.h" + static const name2keysym_t name2keysym[]={ /* ascii */ { "space", 0x020}, -- cgit v1.2.3