=== modified file 'termkey.c' --- termkey.c 2008-11-09 21:58:30 +0000 +++ termkey.c 2008-11-09 20:04:14 +0000 @@ -546,28 +546,6 @@ fprintf(stderr, "..."); } -static void print_key(termkey_t *tk, termkey_key *key) -{ - switch(key->type) { - case TERMKEY_TYPE_UNICODE: - fprintf(stderr, "Unicode codepoint=U+%04lx utf8='%s'", key->code.codepoint, key->utf8); - break; - case TERMKEY_TYPE_FUNCTION: - fprintf(stderr, "Function F%d", key->code.number); - break; - case TERMKEY_TYPE_KEYSYM: - fprintf(stderr, "Keysym sym=%d(%s)", key->code.sym, termkey_get_keyname(tk, key->code.sym)); - break; - } - - int m = key->modifiers; - fprintf(stderr, " mod=%s%s%s+%02x", - (m & TERMKEY_KEYMOD_CTRL ? "C" : ""), - (m & TERMKEY_KEYMOD_ALT ? "A" : ""), - (m & TERMKEY_KEYMOD_SHIFT ? "S" : ""), - m & ~(TERMKEY_KEYMOD_CTRL|TERMKEY_KEYMOD_ALT|TERMKEY_KEYMOD_SHIFT)); -} - static const char *res2str(termkey_result res) { switch(res) { @@ -606,10 +584,6 @@ switch(ret) { case TERMKEY_RES_KEY: -#ifdef DEBUG - print_key(tk, key); fprintf(stderr, "\n"); -#endif - /* fallthrough */ case TERMKEY_RES_EOF: return ret; @@ -628,9 +602,6 @@ #ifdef DEBUG fprintf(stderr, "getkey_simple(force=0) yields %s\n", res2str(ret)); - if(ret == TERMKEY_RES_KEY) { - print_key(tk, key); fprintf(stderr, "\n"); - } #endif return ret; @@ -655,10 +626,6 @@ switch(ret) { case TERMKEY_RES_KEY: -#ifdef DEBUG - print_key(tk, key); fprintf(stderr, "\n"); -#endif - /* fallthrough */ case TERMKEY_RES_EOF: return ret; @@ -672,9 +639,6 @@ #ifdef DEBUG fprintf(stderr, "getkey_simple(force=1) yields %s\n", res2str(ret)); - if(ret == TERMKEY_RES_KEY) { - print_key(tk, key); fprintf(stderr, "\n"); - } #endif return ret;