From d26cfab77984803f14bd198880670241f8cdffee Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Tue, 20 Sep 2011 22:32:56 +0200 Subject: Fixed redundant code in AltGr handling --- evspy-core.h | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'evspy-core.h') diff --git a/evspy-core.h b/evspy-core.h index 49da4b5..6cbe913 100644 --- a/evspy-core.h +++ b/evspy-core.h @@ -142,18 +142,13 @@ * Returns the character associated with event code c when altgr is pressed */ #ifdef EVS_ALTGR_ENABLED -# define evs_altgr(c) \ - ({ \ - void *__vp; \ - char __c; \ - __vp = khm_get(ahm, (c)); \ - if (__vp) __c = *(char *)__vp; \ - else __c = map[c]; \ - __c; \ - }) -#else -# define evs_altgr(c) \ +#define evs_altgr(c) \ ({ \ - (c); \ - }) + void *__vp; \ + char __c; \ + __vp = khm_get(ahm, (c)); \ + if (__vp) __c = *(char *)__vp; \ + else __c = map[c]; \ + __c; \ +}) #endif -- cgit v1.2.3