Browse Source

Fixes to help build on SGI.

Mainly: problem with C++ style comments that were in C code and headers.
SGI C compiler / pre processor no grok C++ comments.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
pull/49/head
Greg Ercolano 15 years ago
parent
commit
9510d1d52b
  1. 6
      src/fl_utf.c
  2. 12
      src/scandir_win32.c
  3. 2
      src/xutf8/fl_wcwidth.c
  4. 4
      src/xutf8/lcUniConv/big5.h
  5. 4
      src/xutf8/lcUniConv/cp1251.h
  6. 70
      src/xutf8/lcUniConv/cp936ext.h
  7. 4
      src/xutf8/lcUniConv/gb2312.h
  8. 6
      src/xutf8/lcUniConv/gbk_tab_to_h.c
  9. 4
      src/xutf8/lcUniConv/iso8859_10.h
  10. 4
      src/xutf8/lcUniConv/iso8859_11.h
  11. 4
      src/xutf8/lcUniConv/iso8859_13.h
  12. 4
      src/xutf8/lcUniConv/iso8859_14.h
  13. 4
      src/xutf8/lcUniConv/iso8859_15.h
  14. 4
      src/xutf8/lcUniConv/iso8859_2.h
  15. 4
      src/xutf8/lcUniConv/iso8859_3.h
  16. 4
      src/xutf8/lcUniConv/iso8859_4.h
  17. 4
      src/xutf8/lcUniConv/iso8859_5.h
  18. 4
      src/xutf8/lcUniConv/iso8859_6.h
  19. 4
      src/xutf8/lcUniConv/iso8859_7.h
  20. 4
      src/xutf8/lcUniConv/iso8859_8.h
  21. 4
      src/xutf8/lcUniConv/iso8859_9.h
  22. 4
      src/xutf8/lcUniConv/jisx0201.h
  23. 4
      src/xutf8/lcUniConv/jisx0208.h
  24. 4
      src/xutf8/lcUniConv/jisx0212.h
  25. 4
      src/xutf8/lcUniConv/koi8_r.h
  26. 4
      src/xutf8/lcUniConv/koi8_u.h
  27. 4
      src/xutf8/lcUniConv/ksc5601.h
  28. 2
      src/xutf8/test.c
  29. 5
      src/xutf8/utf8Input.c
  30. 2
      src/xutf8/utils/convert_map.c
  31. 2
      src/xutf8/utils/euc_tw.c

6
src/fl_utf.c

@ -124,10 +124,10 @@ static unsigned short cp1252[32] = { @@ -124,10 +124,10 @@ static unsigned short cp1252[32] = {
unexpectedly 1 will work:
\code
if (*p & 0x80) { // what should be a multibyte encoding
if (*p & 0x80) { // what should be a multibyte encoding
code = fl_utf8decode(p,end,&len);
if (len<2) code = 0xFFFD; // Turn errors into REPLACEMENT CHARACTER
} else { // handle the 1-byte utf8 encoding:
if (len<2) code = 0xFFFD; // Turn errors into REPLACEMENT CHARACTER
} else { // handle the 1-byte utf8 encoding:
code = *p;
len = 1;
}

12
src/scandir_win32.c

@ -49,9 +49,9 @@ int fl_scandir(const char *dirname, struct dirent ***namelist, @@ -49,9 +49,9 @@ int fl_scandir(const char *dirname, struct dirent ***namelist,
if (!findIn) return -1;
strcpy(findIn, dirname);
//#if defined(__GNUC__)
//#warning FIXME This probably needs to be MORE UTF8 aware now
//#endif /*__GNUC__*/
/* #if defined(__GNUC__) */
/* #warning FIXME This probably needs to be MORE UTF8 aware now */
/* #endif */
for (d = findIn; *d; d++) if (*d=='/') *d='\\';
if ((len==0)) { strcpy(findIn, ".\\*"); }
if ((len==2)&&findIn[1]==':'&&isalpha(findIn[0])) { *d++ = '\\'; *d = 0; }
@ -64,8 +64,8 @@ int fl_scandir(const char *dirname, struct dirent ***namelist, @@ -64,8 +64,8 @@ int fl_scandir(const char *dirname, struct dirent ***namelist,
strcpy(d, "\\*");
}
{ /* Create a block to limit the scope while we find the initial "wide" filename */
// unsigned short * wbuf = (unsigned short*)malloc(sizeof(short) *(len + 10));
// wbuf[fl_utf2unicode(findIn, strlen(findIn), wbuf)] = 0;
/* unsigned short * wbuf = (unsigned short*)malloc(sizeof(short) *(len + 10)); */
/* wbuf[fl_utf2unicode(findIn, strlen(findIn), wbuf)] = 0; */
unsigned short *wbuf = NULL;
unsigned wlen = fl_utf8toUtf16(findIn, strlen(findIn), NULL, 0); /* Pass NULL to query length */
wlen++; /* add a little extra for termination etc. */
@ -89,7 +89,7 @@ int fl_scandir(const char *dirname, struct dirent ***namelist, @@ -89,7 +89,7 @@ int fl_scandir(const char *dirname, struct dirent ***namelist,
int dstlen = l * 5 + 1;
selectDir=(struct dirent*)malloc(sizeof(struct dirent)+dstlen);
// l = fl_unicode2utf(findw.cFileName, l, selectDir->d_name);
/* l = fl_unicode2utf(findw.cFileName, l, selectDir->d_name); */
l = fl_utf8fromwc(selectDir->d_name, dstlen, findw.cFileName, l);
selectDir->d_name[l] = 0;

2
src/xutf8/fl_wcwidth.c

@ -44,7 +44,7 @@ static int mk_wcswidth_cjk(const unsigned int *pwcs, size_t n); @@ -44,7 +44,7 @@ static int mk_wcswidth_cjk(const unsigned int *pwcs, size_t n);
#include "mk_wcwidth.c"
int fl_wcwidth(unsigned int ucs) {
// warning: we have problems if sizeof(wchar_t) == 2 and ucs > 0xffff
/* warning: we have problems if sizeof(wchar_t) == 2 and ucs > 0xffff */
return mk_wcwidth(ucs);
}

4
src/xutf8/lcUniConv/big5.h

@ -1880,7 +1880,7 @@ big5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -1880,7 +1880,7 @@ big5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned short big5_2charset[13703] = {
@ -4142,4 +4142,4 @@ big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -4142,4 +4142,4 @@ big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_TOOSMALL;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/cp1251.h

@ -49,7 +49,7 @@ cp1251_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -49,7 +49,7 @@ cp1251_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char cp1251_page00[32] = {
@ -114,4 +114,4 @@ cp1251_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -114,4 +114,4 @@ cp1251_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

70
src/xutf8/lcUniConv/cp936ext.h

@ -1,29 +1,29 @@ @@ -1,29 +1,29 @@
//
// "$Id$"
//
// Character encoding support for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
/*
* "$Id$"
*
* Character encoding support for the Fast Light Tool Kit (FLTK).
*
* Copyright 1998-2010 by Bill Spitzak and others.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems on the following page:
*
* http://www.fltk.org/str.php
*/
#if !defined(WIN32) && !defined(__APPLE__)
@ -34,7 +34,7 @@ cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -34,7 +34,7 @@ cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
{
return 0;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static int
@ -42,7 +42,7 @@ cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -42,7 +42,7 @@ cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
{
return 0;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */
#else
/*
@ -3206,7 +3206,7 @@ cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -3206,7 +3206,7 @@ cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
@ -6248,12 +6248,12 @@ cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -6248,12 +6248,12 @@ cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_TOOSMALL;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */
#endif // CP936
#endif /* CP936 */
#endif // __APPLE__ WIN32
#endif /* __APPLE__ WIN32 */
//
// End of "$Id$".
//
/*
* End of "$Id$".
*/

4
src/xutf8/lcUniConv/gb2312.h

@ -1088,7 +1088,7 @@ gb2312_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -1088,7 +1088,7 @@ gb2312_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned short gb2312_2charset[7445] = {
@ -2553,4 +2553,4 @@ gb2312_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -2553,4 +2553,4 @@ gb2312_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_TOOSMALL;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

6
src/xutf8/lcUniConv/gbk_tab_to_h.c

@ -332,9 +332,9 @@ static void output_uni2charset_dense (const char* name, Encoding* enc) @@ -332,9 +332,9 @@ static void output_uni2charset_dense (const char* name, Encoding* enc)
p = -1;
for (t = 0; t < tableno; t++)
if (tables[t].usecount > 1) {
//p = tables[t].minline >> 5;
/* p = tables[t].minline >> 5; */
p = tables[t].minline ;
//printf("static const unsigned short %s_page%02x[%d] = {\n", name, p, 8*(tables[t].maxline-tables[t].minline+1));
/* printf("static const unsigned short %s_page%02x[%d] = {\n", name, p, 8*(tables[t].maxline-tables[t].minline+1)); */
printf("static const unsigned short %s_page%04x[%d] = {\n", name, p, 8*(tables[t].maxline-tables[t].minline+1));
for (j1 = tables[t].minline; j1 <= tables[t].maxline; j1++) {
if ((j1 % 0x20) == 0 && j1 > tables[t].minline)
@ -382,7 +382,7 @@ static void output_uni2charset_dense (const char* name, Encoding* enc) @@ -382,7 +382,7 @@ static void output_uni2charset_dense (const char* name, Encoding* enc)
} else {
printf("if (wc >= 0x%04x && wc < 0x%04x)", 8*j1, 8*j2);
}
//printf("\n c = %s_page%02x[wc", name, j1 >> 5);
/* printf("\n c = %s_page%02x[wc", name, j1 >> 5); */
printf("\n c = %s_page%04x[wc", name, j1);
if (tables[t].minline > 0)
printf("-0x%04x", 8*j1);

4
src/xutf8/lcUniConv/iso8859_10.h

@ -36,7 +36,7 @@ iso8859_10_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -36,7 +36,7 @@ iso8859_10_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) iso8859_10_2uni[c-0xa0];
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_10_page00[224] = {
@ -89,4 +89,4 @@ iso8859_10_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -89,4 +89,4 @@ iso8859_10_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_11.h

@ -45,7 +45,7 @@ iso8859_11_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -45,7 +45,7 @@ iso8859_11_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_11_page0e[96] = {
@ -79,4 +79,4 @@ iso8859_11_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -79,4 +79,4 @@ iso8859_11_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_13.h

@ -36,7 +36,7 @@ iso8859_13_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -36,7 +36,7 @@ iso8859_13_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) iso8859_13_2uni[c-0xa0];
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_13_page00[224] = {
@ -92,4 +92,4 @@ iso8859_13_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -92,4 +92,4 @@ iso8859_13_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */

4
src/xutf8/lcUniConv/iso8859_14.h

@ -36,7 +36,7 @@ iso8859_14_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -36,7 +36,7 @@ iso8859_14_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) c;
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_14_page00[96] = {
@ -110,4 +110,4 @@ iso8859_14_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -110,4 +110,4 @@ iso8859_14_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_15.h

@ -24,7 +24,7 @@ iso8859_15_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -24,7 +24,7 @@ iso8859_15_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) c;
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_15_page00[32] = {
@ -64,4 +64,4 @@ iso8859_15_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -64,4 +64,4 @@ iso8859_15_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_2.h

@ -36,7 +36,7 @@ iso8859_2_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -36,7 +36,7 @@ iso8859_2_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) iso8859_2_2uni[c-0xa0];
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_2_page00[224] = {
@ -97,4 +97,4 @@ iso8859_2_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -97,4 +97,4 @@ iso8859_2_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
return RET_ILSEQ;
}
*/
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_3.h

@ -43,7 +43,7 @@ iso8859_3_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -43,7 +43,7 @@ iso8859_3_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_3_page00[96] = {
@ -101,4 +101,4 @@ iso8859_3_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -101,4 +101,4 @@ iso8859_3_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_4.h

@ -36,7 +36,7 @@ iso8859_4_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -36,7 +36,7 @@ iso8859_4_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) iso8859_4_2uni[c-0xa0];
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_4_page00[224] = {
@ -95,4 +95,4 @@ iso8859_4_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -95,4 +95,4 @@ iso8859_4_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_5.h

@ -36,7 +36,7 @@ iso8859_5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -36,7 +36,7 @@ iso8859_5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) iso8859_5_2uni[c-0xa0];
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_5_page00[16] = {
@ -78,4 +78,4 @@ iso8859_5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -78,4 +78,4 @@ iso8859_5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_6.h

@ -43,7 +43,7 @@ iso8859_6_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -43,7 +43,7 @@ iso8859_6_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_6_page00[16] = {
@ -81,4 +81,4 @@ iso8859_6_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -81,4 +81,4 @@ iso8859_6_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_7.h

@ -43,7 +43,7 @@ iso8859_7_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -43,7 +43,7 @@ iso8859_7_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_7_page00[32] = {
@ -89,4 +89,4 @@ iso8859_7_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -89,4 +89,4 @@ iso8859_7_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_8.h

@ -43,7 +43,7 @@ iso8859_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -43,7 +43,7 @@ iso8859_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_8_page00[88] = {
@ -90,4 +90,4 @@ iso8859_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -90,4 +90,4 @@ iso8859_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/iso8859_9.h

@ -27,7 +27,7 @@ iso8859_9_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -27,7 +27,7 @@ iso8859_9_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) c;
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char iso8859_9_page00[48] = {
@ -68,4 +68,4 @@ iso8859_9_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -68,4 +68,4 @@ iso8859_9_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/jisx0201.h

@ -25,7 +25,7 @@ jisx0201_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -25,7 +25,7 @@ jisx0201_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
@ -50,4 +50,4 @@ jisx0201_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -50,4 +50,4 @@ jisx0201_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/jisx0208.h

@ -1020,7 +1020,7 @@ jisx0208_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -1020,7 +1020,7 @@ jisx0208_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned short jisx0208_2charset[6879] = {
@ -2398,4 +2398,4 @@ jisx0208_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -2398,4 +2398,4 @@ jisx0208_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_TOOSMALL;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/jisx0212.h

@ -927,7 +927,7 @@ jisx0212_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -927,7 +927,7 @@ jisx0212_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned short jisx0212_2charset[6067] = {
@ -2165,4 +2165,4 @@ jisx0212_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -2165,4 +2165,4 @@ jisx0212_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_TOOSMALL;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/koi8_r.h

@ -44,7 +44,7 @@ koi8_r_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -44,7 +44,7 @@ koi8_r_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) koi8_r_2uni[c-0x80];
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char koi8_r_page00[88] = {
@ -136,4 +136,4 @@ koi8_r_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -136,4 +136,4 @@ koi8_r_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/koi8_u.h

@ -43,7 +43,7 @@ koi8_u_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -43,7 +43,7 @@ koi8_u_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
*pwc = (ucs4_t) koi8_u_2uni[c-0x80];
return 1;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned char koi8_u_page00[88] = {
@ -143,4 +143,4 @@ koi8_u_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -143,4 +143,4 @@ koi8_u_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

4
src/xutf8/lcUniConv/ksc5601.h

@ -1198,7 +1198,7 @@ ksc5601_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -1198,7 +1198,7 @@ ksc5601_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
}
return RET_ILSEQ;
}
#endif // NEED_TOWC
#endif /* NEED_TOWC */
#ifdef NEED_TOMB
static const unsigned short ksc5601_2charset[8224] = {
@ -3003,4 +3003,4 @@ ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -3003,4 +3003,4 @@ ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
}
return RET_TOOSMALL;
}
#endif // NEED_TOMB
#endif /* NEED_TOMB */

2
src/xutf8/test.c

@ -201,7 +201,7 @@ int main(int argc, char**argv) { @@ -201,7 +201,7 @@ int main(int argc, char**argv) {
nb_font--;
if (fontset->fonts[nb_font]) {
printf("encoding=\"\" fid=%d \n %s\n",
// fontset->encodings[nb_font],
/* fontset->encodings[nb_font], */
fontset->fonts[nb_font]->fid,
fontset->font_name_list[nb_font]);
}

5
src/xutf8/utf8Input.c

@ -52,7 +52,7 @@ typedef struct { @@ -52,7 +52,7 @@ typedef struct {
unsigned short used;
} Summary16;
#define NEED_TOWC // indicates what part of these include files is needed here (avoid compilation warnings)
#define NEED_TOWC /* indicates what part of these include files is needed here (avoid compilation warnings) */
#include "lcUniConv/big5.h"
#include "lcUniConv/gb2312.h"
#include "lcUniConv/cp936ext.h"
@ -382,7 +382,8 @@ XConvertEucToUtf8(const char* locale, @@ -382,7 +382,8 @@ XConvertEucToUtf8(const char* locale,
int len,
int bytes_buffer) {
//if (!locale/* || strstr(locale, "UTF") || strstr(locale, "utf")*/) {
/* if (!locale) { */
/* if (!locale || strstr(locale, "UTF") || strstr(locale, "utf")) { */
if (!locale || strstr(locale, "UTF") || strstr(locale, "utf")) {
return len;
}

2
src/xutf8/utils/convert_map.c

@ -105,7 +105,7 @@ int JIS0212(unsigned char * ptr) { @@ -105,7 +105,7 @@ int JIS0212(unsigned char * ptr) {
ptr += 7;
i += 7;
while(*ptr == ' ') { ptr++; i++; }
//i++; ptr++;
/* i++; ptr++; */
*(ptr+6) = '\0';
ucs = (unsigned int)strtoul(ptr, NULL, 16);
if (*(ptr + 1) != 'x') {

2
src/xutf8/utils/euc_tw.c

@ -54,7 +54,7 @@ int main(int argc, char **argv) { @@ -54,7 +54,7 @@ int main(int argc, char **argv) {
if (l2 != 6) {
ucs = (unsigned)ob[0];
ucs += (unsigned) (ob[1] << 8);
//XConvertUtf8ToUcs((unsigned char*)ob, 6 - l2, &ucs);
/* XConvertUtf8ToUcs((unsigned char*)ob, 6 - l2, &ucs); */
printf ("%x --> %X\n", i, ucs & 0xFFFF);
}
}

Loading…
Cancel
Save