pike.git / src / modules / _Charset / misc.c

version» Context lines:

pike.git/src/modules/_Charset/misc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: misc.c,v 1.20 2007/06/19 16:47:01 grubba Exp $ + || $Id: misc.c,v 1.21 2008/01/25 16:44:39 grubba Exp $   */      #include "global.h"      /* Note: See tables.c for how the private space is used. */      static const p_wchar1 map_DEC_MCS[] = {    0xfffd, 0x00a1, 0x00a2, 0x00a3, 0xfffd, 0x00a5, 0xfffd, 0x00a7,    0x00a4, 0x00a9, 0x00aa, 0x00ab, 0xfffd, 0xfffd, 0xfffd, 0xfffd,    0x00b0, 0x00b1, 0x00b2, 0x00b3, 0xfffd, 0x00b5, 0x00b6, 0x00b7,
pike.git/src/modules/_Charset/misc.c:1734:    0x00b1, 0x00b2, 0x00b3, 0x00d7, 0x00b5, 0x00b6, 0x00b7, 0x00f7,    0x2019, 0x201d, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0xe344,    0xe300, 0xe301, 0xe302, 0xe303, 0xe304, 0xe306, 0xe307, 0xe308,    0xfffd, 0xe30a, 0xe327, 0xfffd, 0xe30b, 0xe328, 0xe30c, 0x2014,    0x00b9, 0x00ae, 0x00a9, 0x2122, 0x2669, 0xfffd, 0xfffd, 0xfffd,    0xfffd, 0xfffd, 0xfffd, 0x215b, 0x215c, 0x215d, 0x215e, 0x2126,    0x00c6, 0x00d0, 0x00aa, 0x0126, 0xfffd, 0x0132, 0x013f, 0x0141,    0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, 0x0149, 0x0138,    0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0140, 0x0142,    0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, 0xfffd, }; + static const p_wchar1 map_windows_874[] = { +  0x20ac, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2026, 0xfffd, 0xfffd, +  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, +  0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, +  0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, +  0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, +  0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, +  0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, +  0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, +  0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, +  0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, +  0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, +  0x0e38, 0x0e39, 0x0e3a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0e3f, +  0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, +  0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, +  0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, +  0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, + };   static const p_wchar1 map_windows_1250[] = {    0x20ac, 0xfffd, 0x201a, 0xfffd, 0x201e, 0x2026, 0x2020, 0x2021,    0xfffd, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,    0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,    0xfffd, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,    0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7,    0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,    0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7,    0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c,    0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
pike.git/src/modules/_Charset/misc.c:2073:    { "videotexsuppl", map_videotex_suppl, 33, 255 }, /* :: videotex-suppl */    { "windows1250", map_windows_1250, 128, 255 }, /* :: windows-1250 */    { "windows1251", map_windows_1251, 128, 255 }, /* :: windows-1251 */    { "windows1252", map_windows_1252, 128, 255 }, /* :: windows-1252 */    { "windows1253", map_windows_1253, 128, 255 }, /* :: windows-1253 */    { "windows1254", map_windows_1254, 128, 255 }, /* :: windows-1254 */    { "windows1255", map_windows_1255, 128, 255 }, /* :: windows-1255 */    { "windows1256", map_windows_1256, 128, 255 }, /* :: windows-1256 */    { "windows1257", map_windows_1257, 128, 255 }, /* :: windows-1257 */    { "windows1258", map_windows_1258, 128, 255 }, /* :: windows-1258 */ +  { "windows874", map_windows_874, 128, 255 }, /* :: windows-874 */    { "x0201", map_JIS_X0201, 92, 255 }, /* :: x0201 */   };   #define NUM_CHARSETS (sizeof(charset_map)/sizeof(charset_map[0]))      p_wchar1 const *misc_charset_lookup(const char *name, int *rlo, int *rhi)   {    int lo=0, hi=NUM_CHARSETS-1;    while(lo<=hi) {    int c, mid = (lo+hi)>>1;    if((c = strcmp(name, charset_map[mid].name))==0) {