mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 07:01:34 +08:00
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
This commit is contained in:
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
+6
-6
@@ -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,
|
||||
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,
|
||||
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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_TOOSMALL;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
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$".
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_TOOSMALL;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
} 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);
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOWC
|
||||
#endif /* NEED_TOWC */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
*/
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_TOOSMALL;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_TOOSMALL;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_ILSEQ;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
return RET_TOOSMALL;
|
||||
}
|
||||
#endif // NEED_TOMB
|
||||
#endif /* NEED_TOMB */
|
||||
|
||||
+1
-1
@@ -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]);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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') {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user