diff options
Diffstat (limited to 'app/xterm/xutf8.c')
-rw-r--r-- | app/xterm/xutf8.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/xterm/xutf8.c b/app/xterm/xutf8.c index 8b99f6052..d7356a3f1 100644 --- a/app/xterm/xutf8.c +++ b/app/xterm/xutf8.c @@ -1,4 +1,4 @@ -/* $XTermId: xutf8.c,v 1.11 2011/09/11 14:59:37 tom Exp $ */ +/* $XTermId: xutf8.c,v 1.13 2012/05/09 20:56:09 tom Exp $ */ /* * Copyright (c) 2001 by Juliusz Chroboczek @@ -68,7 +68,7 @@ utf8countBytes(int c) } static void -utf8insert(char *dest, int c, int *len_return) +utf8insert(char *dest, int c, size_t *len_return) { if (c < 0) return; @@ -95,10 +95,10 @@ utf8insert(char *dest, int c, int *len_return) } static int -l1countUtf8Bytes(char *s, int len) +l1countUtf8Bytes(char *s, size_t len) { int l = 0; - while (len > 0) { + while (len != 0) { if ((*s & 0x80) == 0) l++; else @@ -110,12 +110,12 @@ l1countUtf8Bytes(char *s, int len) } static void -l1utf8copy(char *d, char *s, int len) +l1utf8copy(char *d, char *s, size_t len) { - int l; - while (len > 0) { + size_t l; + while (len != 0) { utf8insert(d, (*s) & 0xFF, &l); - d += l; + d += (int) l; s++; len--; } @@ -334,7 +334,7 @@ Xutf8LookupString(XIC ic GCC_UNUSED, int rc; KeySym keysym; int codepoint; - int len; + size_t len; rc = XLookupString(ev, buffer, nbytes, &keysym, NULL); @@ -367,7 +367,7 @@ Xutf8LookupString(XIC ic GCC_UNUSED, } else { *status_return = XLookupChars; } - return len; + return (int) len; } #else /* X_HAVE_UTF8_STRING */ /* Silence the compiler */ |