=== modified file 'termkey.c' --- termkey.c 2008-11-24 21:58:55 +0000 +++ termkey.c 2008-11-16 12:40:14 +0000 @@ -319,7 +319,7 @@ } } -static inline unsigned int utf8_seqlen(long codepoint) +static inline int utf8_seqlen(long codepoint) { if(codepoint < 0x0000080) return 1; if(codepoint < 0x0000800) return 2; @@ -470,7 +470,7 @@ } else if(tk->flags & TERMKEY_FLAG_UTF8) { // Some UTF-8 - unsigned int nbytes; + int nbytes; long codepoint; key->type = TERMKEY_TYPE_UNICODE; @@ -522,7 +522,7 @@ return TERMKEY_RES_KEY; } - for(unsigned int b = 1; b < nbytes; b++) { + for(int b = 1; b < nbytes; b++) { unsigned char cb = CHARAT(b); if(cb < 0x80 || cb >= 0xc0) { (*tk->method.emit_codepoint)(tk, UTF8_INVALID, key); @@ -769,7 +769,7 @@ termkey_result termkey_advisereadable(termkey_t *tk) { unsigned char buffer[64]; // Smaller than the default size - ssize_t len = read(tk->fd, buffer, sizeof buffer); + size_t len = read(tk->fd, buffer, sizeof buffer); if(len == -1 && errno == EAGAIN) return TERMKEY_RES_NONE;