diff options
| author | Manolo Gouy <Manolo> | 2010-12-15 14:07:43 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-12-15 14:07:43 +0000 |
| commit | 6e3bb7b24deb332eb33d96d071bb0d6ec377ee8e (patch) | |
| tree | fbc5bb3290f1a27de185da290ec8b977dfa404ba | |
| parent | ff1d7b6dad3d6fb3301a1d5b55a2febc2d3bba49 (diff) | |
Fix STR # 2481: removed compilation warnings.
Files utf8Input.c and utf8Wrap.c (via ucs2fontmap.c that's included)
need a different half of each of these input files. What is in the other
half is unused and thus triggers a compilation warning.
This has been fixed by adding #define NEED_TOWC in utf8Input.c
and #define NEED_TOMB in ucs2fontmap.c and by bracketting the first half
of these include files by #ifdef NEED_TOWC/#endif and the second half
by #ifdef NEED_TOMB/#endif.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8038 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
25 files changed, 102 insertions, 5 deletions
diff --git a/src/xutf8/lcUniConv/big5.h b/src/xutf8/lcUniConv/big5.h index deff86692..a2939bf08 100644 --- a/src/xutf8/lcUniConv/big5.h +++ b/src/xutf8/lcUniConv/big5.h @@ -3,7 +3,7 @@ /* * BIG5 */ - +#ifdef NEED_TOWC static const unsigned short big5_2uni_pagea1[6121] = { /* 0xa1 */ 0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2022, 0xff1b, 0xff1a, @@ -1880,7 +1880,9 @@ big5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned short big5_2charset[13703] = { 0xa246, 0xa247, 0xa244, 0xa1b1, 0xa258, 0xa1d3, 0xa150, 0xa1d1, 0xa1d2, 0xa3be, 0xa3bc, 0xa3bd, 0xa3bf, 0xa3bb, 0xa344, 0xa345, @@ -4140,3 +4142,4 @@ big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_TOOSMALL; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/cp1251.h b/src/xutf8/lcUniConv/cp1251.h index f3f7577f1..c46c115f7 100644 --- a/src/xutf8/lcUniConv/cp1251.h +++ b/src/xutf8/lcUniConv/cp1251.h @@ -3,6 +3,7 @@ /* * CP1251 */ +#ifdef NEED_TOWC static const unsigned short cp1251_2uni[128] = { /* 0x80 */ @@ -48,7 +49,9 @@ cp1251_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char cp1251_page00[32] = { 0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */ 0x00, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */ @@ -111,3 +114,4 @@ cp1251_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/cp936ext.h b/src/xutf8/lcUniConv/cp936ext.h index 9e26d663a..f1e2292db 100644 --- a/src/xutf8/lcUniConv/cp936ext.h +++ b/src/xutf8/lcUniConv/cp936ext.h @@ -28,22 +28,27 @@ #if !defined(WIN32) && !defined(__APPLE__) #ifndef CP936 +#ifdef NEED_TOWC static int cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) { return 0; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static int cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { return 0; } +#endif // NEED_TOMB #else /* * CP936EXT */ +#ifdef NEED_TOWC static const unsigned short cp936ext_2uni_page81[23766] = { /* 0x81 */ @@ -3201,6 +3206,9 @@ cp936ext_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC + +#ifdef NEED_TOMB static const unsigned short cp936ext_page0014[208] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xa1e8, 0x0000, 0x0000, 0xa1ec, /*0xa0-0xa7*/ @@ -6240,6 +6248,7 @@ cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_TOOSMALL; } +#endif // NEED_TOMB #endif // CP936 diff --git a/src/xutf8/lcUniConv/gb2312.h b/src/xutf8/lcUniConv/gb2312.h index 3c0c35987..d7ee42789 100644 --- a/src/xutf8/lcUniConv/gb2312.h +++ b/src/xutf8/lcUniConv/gb2312.h @@ -3,7 +3,7 @@ /* * GB2312.1980-0 */ - +#ifdef NEED_TOWC static const unsigned short gb2312_2uni_page21[831] = { /* 0x21 */ 0x3000, 0x3001, 0x3002, 0x30fb, 0x02c9, 0x02c7, 0x00a8, 0x3003, @@ -1088,7 +1088,9 @@ gb2312_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned short gb2312_2charset[7445] = { 0x2168, 0x216c, 0x2127, 0x2163, 0x2140, 0x2141, 0x2824, 0x2822, 0x2828, 0x2826, 0x283a, 0x282c, 0x282a, 0x2830, 0x282e, 0x2142, @@ -2551,3 +2553,4 @@ gb2312_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_TOOSMALL; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_10.h b/src/xutf8/lcUniConv/iso8859_10.h index b63de3eb0..fc5305025 100644 --- a/src/xutf8/lcUniConv/iso8859_10.h +++ b/src/xutf8/lcUniConv/iso8859_10.h @@ -4,6 +4,7 @@ * ISO-8859-10 */ +#ifdef NEED_TOWC static const unsigned short iso8859_10_2uni[96] = { /* 0xa0 */ 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7, @@ -35,7 +36,9 @@ 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 +#ifdef NEED_TOMB static const unsigned char iso8859_10_page00[224] = { 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ @@ -86,3 +89,4 @@ iso8859_10_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_11.h b/src/xutf8/lcUniConv/iso8859_11.h index ced0b3f29..cdf2098b0 100644 --- a/src/xutf8/lcUniConv/iso8859_11.h +++ b/src/xutf8/lcUniConv/iso8859_11.h @@ -4,6 +4,7 @@ * ISO8859-11 */ +#ifdef NEED_TOWC static const unsigned short iso8859_11_2uni[96] = { /* 0xa0 */ 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, @@ -44,7 +45,9 @@ iso8859_11_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_11_page0e[96] = { 0x00, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x00-0x07 */ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x08-0x0f */ @@ -76,3 +79,4 @@ iso8859_11_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_13.h b/src/xutf8/lcUniConv/iso8859_13.h index fe1d767bc..a3bb91c48 100644 --- a/src/xutf8/lcUniConv/iso8859_13.h +++ b/src/xutf8/lcUniConv/iso8859_13.h @@ -4,6 +4,7 @@ * ISO-8859-13 */ +#ifdef NEED_TOWC static const unsigned short iso8859_13_2uni[96] = { /* 0xa0 */ 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, @@ -35,7 +36,9 @@ 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 +#ifdef NEED_TOMB static const unsigned char iso8859_13_page00[224] = { 0xa0, 0x00, 0xa2, 0xa3, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */ 0x00, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */ @@ -89,3 +92,4 @@ iso8859_13_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC diff --git a/src/xutf8/lcUniConv/iso8859_14.h b/src/xutf8/lcUniConv/iso8859_14.h index c76c2c2ae..7442aedf3 100644 --- a/src/xutf8/lcUniConv/iso8859_14.h +++ b/src/xutf8/lcUniConv/iso8859_14.h @@ -4,6 +4,7 @@ * ISO-8859-14 */ +#ifdef NEED_TOWC static const unsigned short iso8859_14_2uni[96] = { /* 0xa0 */ 0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, @@ -35,7 +36,9 @@ iso8859_14_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) *pwc = (ucs4_t) c; return 1; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_14_page00[96] = { 0xa0, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */ 0x00, 0xa9, 0x00, 0x00, 0x00, 0xad, 0xae, 0x00, /* 0xa8-0xaf */ @@ -107,3 +110,4 @@ iso8859_14_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_15.h b/src/xutf8/lcUniConv/iso8859_15.h index 8c613d7f7..a3a0f1699 100644 --- a/src/xutf8/lcUniConv/iso8859_15.h +++ b/src/xutf8/lcUniConv/iso8859_15.h @@ -4,6 +4,7 @@ * ISO-8859-15 */ +#ifdef NEED_TOWC static const unsigned short iso8859_15_2uni[32] = { /* 0xa0 */ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, @@ -23,7 +24,9 @@ iso8859_15_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) *pwc = (ucs4_t) c; return 1; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_15_page00[32] = { 0xa0, 0xa1, 0xa2, 0xa3, 0x00, 0xa5, 0x00, 0xa7, /* 0xa0-0xa7 */ 0x00, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */ @@ -61,3 +64,4 @@ iso8859_15_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_2.h b/src/xutf8/lcUniConv/iso8859_2.h index 9598d54bd..3f4be1262 100644 --- a/src/xutf8/lcUniConv/iso8859_2.h +++ b/src/xutf8/lcUniConv/iso8859_2.h @@ -4,6 +4,7 @@ * ISO-8859-2 */ +#ifdef NEED_TOWC static const unsigned short iso8859_2_2uni[96] = { /* 0xa0 */ 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, @@ -35,7 +36,9 @@ 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 +#ifdef NEED_TOMB static const unsigned char iso8859_2_page00[224] = { 0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */ 0xa8, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ @@ -74,6 +77,7 @@ static const unsigned char iso8859_2_page02[32] = { 0xa2, 0xff, 0x00, 0xb2, 0x00, 0xbd, 0x00, 0x00, /* 0xd8-0xdf */ }; +/* static int iso8859_2_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { @@ -92,3 +96,5 @@ iso8859_2_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +*/ +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_3.h b/src/xutf8/lcUniConv/iso8859_3.h index 1604c2545..0402a965f 100644 --- a/src/xutf8/lcUniConv/iso8859_3.h +++ b/src/xutf8/lcUniConv/iso8859_3.h @@ -4,6 +4,7 @@ * ISO-8859-3 */ +#ifdef NEED_TOWC static const unsigned short iso8859_3_2uni[96] = { /* 0xa0 */ 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0xfffd, 0x0124, 0x00a7, @@ -42,7 +43,9 @@ iso8859_3_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_3_page00[96] = { 0xa0, 0x00, 0x00, 0xa3, 0xa4, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */ 0xa8, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ @@ -98,3 +101,4 @@ iso8859_3_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_4.h b/src/xutf8/lcUniConv/iso8859_4.h index 6ea62d1cf..bb9bc5820 100644 --- a/src/xutf8/lcUniConv/iso8859_4.h +++ b/src/xutf8/lcUniConv/iso8859_4.h @@ -4,6 +4,7 @@ * ISO-8859-4 */ +#ifdef NEED_TOWC static const unsigned short iso8859_4_2uni[96] = { /* 0xa0 */ 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, @@ -35,7 +36,9 @@ 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 +#ifdef NEED_TOMB static const unsigned char iso8859_4_page00[224] = { 0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */ 0xa8, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0xaf, /* 0xa8-0xaf */ @@ -92,3 +95,4 @@ iso8859_4_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_5.h b/src/xutf8/lcUniConv/iso8859_5.h index d47856772..41818e189 100644 --- a/src/xutf8/lcUniConv/iso8859_5.h +++ b/src/xutf8/lcUniConv/iso8859_5.h @@ -4,6 +4,7 @@ * ISO-8859-5 */ +#ifdef NEED_TOWC static const unsigned short iso8859_5_2uni[96] = { /* 0xa0 */ 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, @@ -35,7 +36,9 @@ 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 +#ifdef NEED_TOMB static const unsigned char iso8859_5_page00[16] = { 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, /* 0xa0-0xa7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ @@ -75,3 +78,4 @@ iso8859_5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_6.h b/src/xutf8/lcUniConv/iso8859_6.h index 4d57893ac..1b8d0c941 100644 --- a/src/xutf8/lcUniConv/iso8859_6.h +++ b/src/xutf8/lcUniConv/iso8859_6.h @@ -4,6 +4,7 @@ * ISO-8859-6 */ +#ifdef NEED_TOWC static const unsigned short iso8859_6_2uni[96] = { /* 0xa0 */ 0x00a0, 0xfffd, 0xfffd, 0xfffd, 0x00a4, 0xfffd, 0xfffd, 0xfffd, @@ -42,7 +43,9 @@ iso8859_6_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_6_page00[16] = { 0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ @@ -78,3 +81,4 @@ iso8859_6_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_7.h b/src/xutf8/lcUniConv/iso8859_7.h index 790cec759..bbb33be71 100644 --- a/src/xutf8/lcUniConv/iso8859_7.h +++ b/src/xutf8/lcUniConv/iso8859_7.h @@ -4,6 +4,7 @@ * ISO-8859-7 */ +#ifdef NEED_TOWC static const unsigned short iso8859_7_2uni[96] = { /* 0xa0 */ 0x00a0, 0x2018, 0x2019, 0x00a3, 0xfffd, 0xfffd, 0x00a6, 0x00a7, @@ -42,7 +43,9 @@ iso8859_7_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_7_page00[32] = { 0xa0, 0x00, 0x00, 0xa3, 0x00, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */ 0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ @@ -86,3 +89,4 @@ iso8859_7_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_8.h b/src/xutf8/lcUniConv/iso8859_8.h index 7b780f029..a641fac43 100644 --- a/src/xutf8/lcUniConv/iso8859_8.h +++ b/src/xutf8/lcUniConv/iso8859_8.h @@ -4,6 +4,7 @@ * ISO-8859-8 */ +#ifdef NEED_TOWC static const unsigned short iso8859_8_2uni[96] = { /* 0xa0 */ 0x00a0, 0xfffd, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, @@ -42,7 +43,9 @@ iso8859_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_8_page00[88] = { 0xa0, 0x00, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */ 0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */ @@ -87,3 +90,4 @@ iso8859_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/iso8859_9.h b/src/xutf8/lcUniConv/iso8859_9.h index 55ec1cb11..6e361160d 100644 --- a/src/xutf8/lcUniConv/iso8859_9.h +++ b/src/xutf8/lcUniConv/iso8859_9.h @@ -4,6 +4,7 @@ * ISO-8859-9 */ +#ifdef NEED_TOWC static const unsigned short iso8859_9_2uni[48] = { /* 0xd0 */ 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, @@ -26,7 +27,9 @@ iso8859_9_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) *pwc = (ucs4_t) c; return 1; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned char iso8859_9_page00[48] = { 0x00, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */ @@ -65,3 +68,4 @@ iso8859_9_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/jisx0201.h b/src/xutf8/lcUniConv/jisx0201.h index 4a30f2847..4c4365e4c 100644 --- a/src/xutf8/lcUniConv/jisx0201.h +++ b/src/xutf8/lcUniConv/jisx0201.h @@ -3,6 +3,7 @@ /* * JISX0201.1976-0 */ +#ifdef NEED_TOWC static int jisx0201_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) @@ -24,6 +25,9 @@ jisx0201_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC + +#ifdef NEED_TOMB static int jisx0201_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) @@ -46,3 +50,4 @@ jisx0201_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/jisx0208.h b/src/xutf8/lcUniConv/jisx0208.h index 9c080522e..400ac8bd3 100644 --- a/src/xutf8/lcUniConv/jisx0208.h +++ b/src/xutf8/lcUniConv/jisx0208.h @@ -3,6 +3,7 @@ /* * JISX0208.1990-0 */ +#ifdef NEED_TOWC static const unsigned short jisx0208_2uni_page21[690] = { /* 0x21 */ @@ -1019,7 +1020,9 @@ jisx0208_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned short jisx0208_2charset[6879] = { 0x2140, 0x2171, 0x2172, 0x2178, 0x212f, 0x224c, 0x216b, 0x215e, 0x212d, 0x2279, 0x215f, 0x2160, 0x2621, 0x2622, 0x2623, 0x2624, @@ -2395,3 +2398,4 @@ jisx0208_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_TOOSMALL; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/jisx0212.h b/src/xutf8/lcUniConv/jisx0212.h index a4857b9bd..958c1fffc 100644 --- a/src/xutf8/lcUniConv/jisx0212.h +++ b/src/xutf8/lcUniConv/jisx0212.h @@ -3,6 +3,7 @@ /* * JISX0212.1990-0 */ +#ifdef NEED_TOWC static const unsigned short jisx0212_2uni_page22[81] = { /* 0x22 */ @@ -926,7 +927,9 @@ jisx0212_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned short jisx0212_2charset[6067] = { 0x2237, 0x2242, 0x2270, 0x2243, 0x226d, 0x226c, 0x226e, 0x2234, 0x2231, 0x226b, 0x2244, 0x2a22, 0x2a21, 0x2a24, 0x2a2a, 0x2a23, @@ -2162,3 +2165,4 @@ jisx0212_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_TOOSMALL; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/koi8_r.h b/src/xutf8/lcUniConv/koi8_r.h index a0d3d9b26..887979535 100644 --- a/src/xutf8/lcUniConv/koi8_r.h +++ b/src/xutf8/lcUniConv/koi8_r.h @@ -6,6 +6,7 @@ /* Specification: RFC 1489 */ +#ifdef NEED_TOWC static const unsigned short koi8_r_2uni[128] = { /* 0x80 */ 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, @@ -43,7 +44,9 @@ 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 +#ifdef NEED_TOMB static const unsigned char koi8_r_page00[88] = { 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ @@ -133,3 +136,4 @@ koi8_r_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/koi8_u.h b/src/xutf8/lcUniConv/koi8_u.h index 43457afd9..c53e00e52 100644 --- a/src/xutf8/lcUniConv/koi8_u.h +++ b/src/xutf8/lcUniConv/koi8_u.h @@ -5,7 +5,7 @@ */ /* Specification: RFC 2319 */ - +#ifdef NEED_TOWC static const unsigned short koi8_u_2uni[128] = { /* 0x80 */ 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, @@ -43,7 +43,9 @@ 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 +#ifdef NEED_TOMB static const unsigned char koi8_u_page00[88] = { 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ @@ -141,3 +143,4 @@ koi8_u_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_ILSEQ; } +#endif // NEED_TOMB diff --git a/src/xutf8/lcUniConv/ksc5601.h b/src/xutf8/lcUniConv/ksc5601.h index 62ac66d7f..e6a8bd56c 100644 --- a/src/xutf8/lcUniConv/ksc5601.h +++ b/src/xutf8/lcUniConv/ksc5601.h @@ -3,7 +3,7 @@ /* * KSC5601.1987-0 */ - +#ifdef NEED_TOWC static const unsigned short ksc5601_2uni_page21[1115] = { /* 0x21 */ 0x3000, 0x3001, 0x3002, 0x00b7, 0x2025, 0x2026, 0x00a8, 0x3003, @@ -1198,7 +1198,9 @@ ksc5601_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) } return RET_ILSEQ; } +#endif // NEED_TOWC +#ifdef NEED_TOMB static const unsigned short ksc5601_2charset[8224] = { 0x222e, 0x2234, 0x2157, 0x2127, 0x2823, 0x2129, 0x2146, 0x213e, 0x2977, 0x2978, 0x2225, 0x2252, 0x2124, 0x222c, 0x2976, 0x282c, @@ -3001,3 +3003,4 @@ ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) } return RET_TOOSMALL; } +#endif // NEED_TOMB diff --git a/src/xutf8/ucs2fontmap.c b/src/xutf8/ucs2fontmap.c index 37f74d701..3f2175762 100644 --- a/src/xutf8/ucs2fontmap.c +++ b/src/xutf8/ucs2fontmap.c @@ -36,7 +36,7 @@ typedef struct { unsigned short used; } Summary16; - +#define NEED_TOMB // indicates what part of these include files is needed here (avoid compilation warnings) #include "lcUniConv/cp936ext.h" #include "lcUniConv/big5.h" #include "lcUniConv/gb2312.h" diff --git a/src/xutf8/utf8Input.c b/src/xutf8/utf8Input.c index 0e37485ea..400b7b1de 100644 --- a/src/xutf8/utf8Input.c +++ b/src/xutf8/utf8Input.c @@ -52,6 +52,7 @@ typedef struct { unsigned short used; } Summary16; +#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" |
