From e82e92f3e802028200a4f15ffca24b51aa8acda1 Mon Sep 17 00:00:00 2001 From: Antti K Date: Tue, 29 Jul 2014 22:53:05 +0200 Subject: Move keysym length constant to where needed Easier to read `main` when this state isn't there. --- xkbcat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkbcat.c b/xkbcat.c index 9cc5aba..3a6d9ea 100644 --- a/xkbcat.c +++ b/xkbcat.c @@ -23,7 +23,6 @@ typedef char KbBuffer[32]; static inline bool keyState(KbBuffer c, int key) { return ( c[key/8] & (1<<(key%8)) ); } -const int KEYSYM_STRLEN = 64; char * keyPressToString(Display * disp, int code, bool down); @@ -101,6 +100,7 @@ int main(int argc, char * argv[]) { */ char * keyPressToString(Display * disp, int code, bool down) { + const int KEYSYM_STRLEN = 64; static char * str, buf[KEYSYM_STRLEN + 1]; KeySym keysym = XkbKeycodeToKeysym(disp, code, 0, 0); if (NoSymbol == keysym) return ""; -- cgit v1.3-2-g0d8e