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 | |
| 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')
| -rw-r--r-- | src/xutf8/utf8Input.c | 11 | ||||
| -rw-r--r-- | src/xutf8/utf8Wrap.c | 24 |
2 files changed, 20 insertions, 15 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; diff --git a/src/xutf8/utf8Wrap.c b/src/xutf8/utf8Wrap.c index 1ca187cf5..662f218c8 100644 --- a/src/xutf8/utf8Wrap.c +++ b/src/xutf8/utf8Wrap.c @@ -230,10 +230,10 @@ load_fonts(Display *dpy, XUtf8FontStruct *font_set) { int i; - char **list; + //char **list; i = 0; - list = NULL; + //list = NULL; font_set->fonts = (XFontStruct**) malloc(sizeof(XFontStruct*) * font_set->nb_font); @@ -820,19 +820,19 @@ XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, XFontStruct **fnt, unsigned short *id) { - int x; + //int x; int *encodings; /* encodings array */ XFontStruct **fonts; /* fonts array */ int fnum; /* index of the current font in the fonts array*/ - int i; /* current byte in the XChar2b buffer */ + //int i; /* current byte in the XChar2b buffer */ int first; /* first valid font index */ - int last_fnum; /* font index of the previous char */ + //int last_fnum; /* font index of the previous char */ int nb_font; /* quantity of fonts in the font array */ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */ int *ranges; /* sub range of iso10646 */ nb_font = font_set->nb_font; - x = 0; + //x = 0; if (nb_font < 1) { /* there is no font in the font_set :-( */ @@ -842,7 +842,7 @@ XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, ranges = font_set->ranges; fonts = font_set->fonts; encodings = font_set->encodings; - i = 0; + //i = 0; fnum = 0; while(fnum < nb_font && !fonts[fnum]) fnum++; @@ -852,7 +852,7 @@ XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, } first = fnum; - last_fnum = fnum; + //last_fnum = fnum; /* * find the first encoding which can be used to @@ -894,9 +894,9 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set, XFontStruct **fonts; /* fonts array */ Fl_XChar2b buf[8]; /* drawing buffer */ int fnum; /* index of the current font in the fonts array*/ - int i; /* current byte in the XChar2b buffer */ + //int i; /* current byte in the XChar2b buffer */ int first; /* first valid font index */ - int last_fnum; /* font index of the previous char */ + //int last_fnum; /* font index of the previous char */ int nb_font; /* quantity of fonts in the font array */ char glyph[2]; /* byte1 and byte2 value of the UTF-8 char */ int *ranges; /* sub range of iso10646 */ @@ -913,7 +913,7 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set, ranges = font_set->ranges; fonts = font_set->fonts; encodings = font_set->encodings; - i = 0; + //i = 0; fnum = 0; while(fnum < nb_font && !fonts[fnum]) fnum++; @@ -923,7 +923,7 @@ XUtf8UcsWidth(XUtf8FontStruct *font_set, } first = fnum; - last_fnum = fnum; + //last_fnum = fnum; no_spc = XUtf8IsNonSpacing(ucs); if (no_spc) ucs = no_spc; |
