=== modified file 't/10keyname.c' --- t/10keyname.c 2013-07-15 00:03:35 +0000 +++ t/10keyname.c 2012-01-26 12:55:34 +0000 @@ -5,7 +5,7 @@ { TermKey *tk; TermKeySym sym; - const char *end; + char *end; plan_tests(10); === modified file 't/12strpkey.c' --- t/12strpkey.c 2013-07-15 00:03:35 +0000 +++ t/12strpkey.c 2012-01-26 12:55:34 +0000 @@ -5,7 +5,7 @@ { TermKey *tk; TermKeyKey key; - const char *endp; + char *endp; #define CLEAR_KEY do { key.type = -1; key.code.codepoint = -1; key.modifiers = -1; key.utf8[0] = 0; } while(0) === modified file 't/20canon.c' --- t/20canon.c 2013-07-15 00:03:35 +0000 +++ t/20canon.c 2012-01-26 12:55:34 +0000 @@ -5,7 +5,7 @@ { TermKey *tk; TermKeyKey key; - const char *endp; + char *endp; #define CLEAR_KEY do { key.type = -1; key.code.codepoint = -1; key.modifiers = -1; key.utf8[0] = 0; } while(0) === modified file 'termkey.c' --- termkey.c 2013-07-15 00:03:35 +0000 +++ termkey.c 2012-12-06 02:09:03 +0000 @@ -1113,7 +1113,7 @@ return "UNKNOWN"; } -const char *termkey_lookup_keyname(TermKey *tk, const char *str, TermKeySym *sym) +char *termkey_lookup_keyname(TermKey *tk, const char *str, TermKeySym *sym) { /* We store an array, so we can't do better than a linear search. Doesn't * matter because user won't be calling this too often */ @@ -1133,7 +1133,7 @@ TermKeySym termkey_keyname2sym(TermKey *tk, const char *keyname) { TermKeySym sym; - const char *endp = termkey_lookup_keyname(tk, keyname, &sym); + char *endp = termkey_lookup_keyname(tk, keyname, &sym); if(!endp || endp[0]) return TERMKEY_SYM_UNKNOWN; return sym; @@ -1255,7 +1255,7 @@ int line, col; termkey_interpret_mouse(tk, key, &ev, &button, &line, &col); - static const char *evnames[] = { "Unknown", "Press", "Drag", "Release" }; + static char *evnames[] = { "Unknown", "Press", "Drag", "Release" }; l = snprintf(buffer + pos, len - pos, "Mouse%s(%d)", evnames[ev], button); @@ -1297,7 +1297,7 @@ return pos; } -const char *termkey_strpkey(TermKey *tk, const char *str, TermKeyKey *key, TermKeyFormat format) +char *termkey_strpkey(TermKey *tk, const char *str, TermKeyKey *key, TermKeyFormat format) { struct modnames *mods = &modnames[!!(format & TERMKEY_FORMAT_LONGMOD) + !!(format & TERMKEY_FORMAT_ALTISMETA) * 2]; @@ -1340,7 +1340,7 @@ size_t nbytes; ssize_t snbytes; - const char *endstr; + char *endstr; if((endstr = termkey_lookup_keyname(tk, str, &key->code.sym))) { key->type = TERMKEY_TYPE_KEYSYM; @@ -1351,7 +1351,7 @@ str += snbytes; } // Unicode must be last - else if(parse_utf8((unsigned const char *)str, strlen(str), &key->code.codepoint, &nbytes) == TERMKEY_RES_KEY) { + else if(parse_utf8((unsigned char *)str, strlen(str), &key->code.codepoint, &nbytes) == TERMKEY_RES_KEY) { key->type = TERMKEY_TYPE_UNICODE; fill_utf8(key); str += nbytes; === modified file 'termkey.h.in' --- termkey.h.in 2013-07-15 00:03:35 +0000 +++ termkey.h.in 2012-11-30 16:34:47 +0000 @@ -198,7 +198,7 @@ TermKeySym termkey_register_keyname(TermKey *tk, TermKeySym sym, const char *name); const char *termkey_get_keyname(TermKey *tk, TermKeySym sym); -const char *termkey_lookup_keyname(TermKey *tk, const char *str, TermKeySym *sym); +char *termkey_lookup_keyname(TermKey *tk, const char *str, TermKeySym *sym); TermKeySym termkey_keyname2sym(TermKey *tk, const char *keyname); @@ -223,8 +223,8 @@ #define TERMKEY_FORMAT_VIM (TERMKEY_FORMAT_ALTISMETA|TERMKEY_FORMAT_WRAPBRACKET) -size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, TermKeyFormat format); -const char *termkey_strpkey(TermKey *tk, const char *str, TermKeyKey *key, TermKeyFormat format); +size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, TermKeyFormat format); +char *termkey_strpkey(TermKey *tk, const char *str, TermKeyKey *key, TermKeyFormat format); int termkey_keycmp(TermKey *tk, const TermKeyKey *key1, const TermKeyKey *key2);