From b2c4331ac365bb7d92cecdb4d6e1f947d8d37d00 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 28 Jul 2012 22:15:59 +0300 Subject: Handle key names consistently We treat the key names as fixed length, non NUL terminated strings of length XkbKeyNameLength, and use the appropriate *Text functions to print them. We also use strncpy everywhere instead of memcpy to copy the names, because it does some NUL padding and we might as well. Signed-off-by: Ran Benita --- src/text.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index ed677b9..54a7e68 100644 --- a/src/text.h +++ b/src/text.h @@ -55,7 +55,7 @@ const char * KeysymText(xkb_keysym_t sym); const char * -KeyNameText(char *name); +KeyNameText(const char name[XkbKeyNameLength]); const char * SIMatchText(unsigned type); -- cgit v1.2.1