=== modified file 'driver-csi.c' --- driver-csi.c 2008-10-09 23:50:56 +0000 +++ driver-csi.c 2008-10-09 22:53:35 +0000 @@ -164,7 +164,7 @@ } unsigned char cmd = CHARAT(csi_end); - long arg[16]; + int arg[16]; char present = 0; int args = 0; @@ -226,7 +226,7 @@ key->code.sym = TERMKEY_SYM_UNKNOWN; if(key->code.sym == TERMKEY_SYM_UNKNOWN) - fprintf(stderr, "CSI function key %ld\n", arg[0]); + fprintf(stderr, "CSI function key %d\n", arg[0]); } else { // We know from the logic above that cmd must be >= 0x40 and < 0x80 @@ -236,7 +236,7 @@ key->modifiers |= csi->csi_ss3s[cmd - 0x40].modifier_set; if(key->code.sym == TERMKEY_SYM_UNKNOWN) - fprintf(stderr, "CSI arg1=%ld arg2=%ld cmd=%c\n", arg[0], arg[1], cmd); + fprintf(stderr, "CSI arg1=%d arg2=%d cmd=%c\n", arg[0], arg[1], cmd); } return TERMKEY_RES_KEY; === modified file 'termkey-internal.h' --- termkey-internal.h 2008-10-09 23:50:56 +0000 +++ termkey-internal.h 2008-10-09 19:23:45 +0000 @@ -48,7 +48,7 @@ // want exported as real symbols in the library struct { void (*eat_bytes)(termkey_t *tk, size_t count); - void (*emit_codepoint)(termkey_t *tk, long codepoint, termkey_key *key); + void (*emit_codepoint)(termkey_t *tk, int codepoint, termkey_key *key); termkey_result (*getkey_simple)(termkey_t *tk, termkey_key *key); } method; }; === modified file 'termkey.c' --- termkey.c 2008-10-09 23:50:56 +0000 +++ termkey.c 2008-10-09 22:53:35 +0000 @@ -16,7 +16,7 @@ // Forwards for the "protected" methods static void eat_bytes(termkey_t *tk, size_t count); -static void emit_codepoint(termkey_t *tk, long codepoint, termkey_key *key); +static void emit_codepoint(termkey_t *tk, int codepoint, termkey_key *key); static termkey_result getkey_simple(termkey_t *tk, termkey_key *key); static termkey_keysym register_c0(termkey_t *tk, termkey_keysym sym, unsigned char ctrl, const char *name); @@ -230,7 +230,7 @@ } } -static inline int utf8_seqlen(long codepoint) +static inline int utf8_seqlen(int codepoint) { if(codepoint < 0x0000080) return 1; if(codepoint < 0x0000800) return 2; @@ -242,7 +242,7 @@ static void fill_utf8(termkey_key *key) { - long codepoint = key->code.codepoint; + int codepoint = key->code.codepoint; int nbytes = utf8_seqlen(codepoint); key->utf8[nbytes] = 0; @@ -265,7 +265,7 @@ } } -static void emit_codepoint(termkey_t *tk, long codepoint, termkey_key *key) +static void emit_codepoint(termkey_t *tk, int codepoint, termkey_key *key) { if(codepoint < 0x20) { // C0 range @@ -338,7 +338,7 @@ else if(tk->flags & TERMKEY_FLAG_UTF8) { // Some UTF-8 int nbytes; - long codepoint; + int codepoint; key->type = TERMKEY_TYPE_UNICODE; key->modifiers = 0; === modified file 'termkey.h' --- termkey.h 2008-10-09 23:50:56 +0000 +++ termkey.h 2008-10-06 22:53:25 +0000 @@ -82,7 +82,7 @@ typedef struct { termkey_type type; union { - long codepoint; // TERMKEY_TYPE_UNICODE + int codepoint; // TERMKEY_TYPE_UNICODE int number; // TERMKEY_TYPE_FUNCTION termkey_keysym sym; // TERMKEY_TYPE_KEYSYM } code;