diff options
| author | 2014-07-29 22:53:05 +0200 | |
|---|---|---|
| committer | 2014-07-30 01:11:08 +0200 | |
| commit | e82e92f3e802028200a4f15ffca24b51aa8acda1 (patch) | |
| tree | cc01bc678093e8463314baf4dd142db4fa6e25c1 /xkbcat.c | |
| parent | a9babb7e82b567f55b3674ec093cdbf4d29442a3 (diff) | |
| download | xkbcat-e82e92f3e802028200a4f15ffca24b51aa8acda1.tar.gz xkbcat-e82e92f3e802028200a4f15ffca24b51aa8acda1.zip | |
Move keysym length constant to where needed
Easier to read `main` when this state isn't there.
Diffstat (limited to 'xkbcat.c')
| -rw-r--r-- | xkbcat.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 ""; |
