diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 9f2b3254..96e7e074 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -144,7 +144,7 @@ void handle_key(unichar key) return; } - if (key >= 0 && key < 32) { + if (key < 32) { /* control key */ str[0] = '^'; str[1] = (char)key+'@'; diff --git a/src/fe-text/utf8.c b/src/fe-text/utf8.c index 8a2f2a8b..2d72fe2b 100644 --- a/src/fe-text/utf8.c +++ b/src/fe-text/utf8.c @@ -105,7 +105,7 @@ int strlen_utf8(const char *str) return len; } -int utf16_char_to_utf8(unichar c, unsigned char *outbuf) +int utf16_char_to_utf8(unichar c, char *outbuf) { int len, i, first; diff --git a/src/fe-text/utf8.h b/src/fe-text/utf8.h index a37c0b6a..efc6af08 100644 --- a/src/fe-text/utf8.h +++ b/src/fe-text/utf8.h @@ -12,7 +12,7 @@ void utf8_to_utf16(const char *str, unichar *out); /* unichar -> UTF-8 string. outbuf must be at least 6 chars long. Returns outbuf string length. */ -int utf16_char_to_utf8(unichar c, unsigned char *outbuf); +int utf16_char_to_utf8(unichar c, char *outbuf); /* unichar -> UTF-8 string. The NUL is copied as well. Make sure out is at least 6 x length of str. */