diff options
| author | Fabien Costantini <fabien@onepost.net> | 2012-04-22 02:45:09 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2012-04-22 02:45:09 +0000 |
| commit | 822bc272fc05b79a4385cbf139f4a6c87031617a (patch) | |
| tree | 24fb3b283eb7b2b8f8c70ac66df38e759ebfd2dd /src/xutf8/utf8Input.c | |
| parent | 4f7f902a00678be6a3028f12037fa2e337baf881 (diff) | |
Fixed linux 64 gcc 4.6.1 compilation problems
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9373 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/xutf8/utf8Input.c')
| -rw-r--r-- | src/xutf8/utf8Input.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xutf8/utf8Input.c b/src/xutf8/utf8Input.c index 6d17604a9..1809e3052 100644 --- a/src/xutf8/utf8Input.c +++ b/src/xutf8/utf8Input.c @@ -62,10 +62,10 @@ XConvertEucTwToUtf8(char* buffer_return, int len) { int i = 0; #endif int l = 0; - char *buf, *b; + char *buf; // , *b; if (len < 1) return 0; - b = buf = (char*) malloc((unsigned)len); + /*b = */ buf = (char*) malloc((unsigned)len); memcpy(buf, buffer_return, (unsigned) len); #if HAVE_LIBC_ICONV @@ -83,17 +83,22 @@ XConvertEucTwToUtf8(char* buffer_return, int len) { ucs = c; i++; } else if (c >= 0xa1 && c < 0xff && len - i > 1 ) { + +#if 0 unsigned char b[2]; b[0] = (unsigned char) c - 0x80; b[1] = (unsigned char) buf[i + 1] - 0x80; +#endif ucs = ' '; i += 2; } else if (c == 0x8e && len - i > 3) { - unsigned char b[2]; unsigned char c1 = buf[i + 1]; unsigned char c2 = buf[i + 2]; unsigned char c3 = buf[i + 3]; +#if 0 + unsigned char b[2]; b[0] = (unsigned char) buf[i + 2] - 0x80; b[1] = (unsigned char) buf[i + 3] - 0x80; +#endif if (c1 >= 0xa1 && c1 <= 0xb0) { if (c2 >= 0xa1 && c2 < 0xff && c3 >= 0xa1 && c3 < 0xff) { ucs = ' '; i += 4; |
