diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2020-11-03 09:57:41 +0200 |
---|---|---|
committer | Alex Dowad <alexinbeijing@gmail.com> | 2020-11-11 11:18:59 +0200 |
commit | e169ad3b61260e16dcfb24731064181ddbba6a9c (patch) | |
tree | 9f69d22e8239c19636ed28be7d3658692b4153c3 /ext/mbstring | |
parent | 17d82b68862901eb5157c4be3c08a21e4377f5ac (diff) | |
download | php-git-e169ad3b61260e16dcfb24731064181ddbba6a9c.tar.gz |
Consolidate all single-byte encodings in one source file
We can squeeze out a lot of duplicated code in this way.
Diffstat (limited to 'ext/mbstring')
75 files changed, 639 insertions, 4235 deletions
diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index 8c4b01fb52..9547130fba 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -94,16 +94,10 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ PHP_MBSTRING_ADD_SOURCES([ libmbfl/filters/html_entities.c libmbfl/filters/mbfilter_7bit.c - libmbfl/filters/mbfilter_ascii.c libmbfl/filters/mbfilter_base64.c libmbfl/filters/mbfilter_big5.c - libmbfl/filters/mbfilter_cp1251.c - libmbfl/filters/mbfilter_cp1252.c - libmbfl/filters/mbfilter_cp1254.c libmbfl/filters/mbfilter_cp5022x.c libmbfl/filters/mbfilter_cp51932.c - libmbfl/filters/mbfilter_cp850.c - libmbfl/filters/mbfilter_cp866.c libmbfl/filters/mbfilter_cp932.c libmbfl/filters/mbfilter_cp936.c libmbfl/filters/mbfilter_gb18030.c @@ -119,24 +113,9 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_iso2022jp_2004.c libmbfl/filters/mbfilter_iso2022jp_mobile.c libmbfl/filters/mbfilter_iso2022_kr.c - libmbfl/filters/mbfilter_iso8859_1.c - libmbfl/filters/mbfilter_iso8859_10.c - libmbfl/filters/mbfilter_iso8859_13.c - libmbfl/filters/mbfilter_iso8859_14.c - libmbfl/filters/mbfilter_iso8859_15.c - libmbfl/filters/mbfilter_iso8859_16.c - libmbfl/filters/mbfilter_iso8859_2.c - libmbfl/filters/mbfilter_iso8859_3.c - libmbfl/filters/mbfilter_iso8859_4.c - libmbfl/filters/mbfilter_iso8859_5.c - libmbfl/filters/mbfilter_iso8859_6.c - libmbfl/filters/mbfilter_iso8859_7.c - libmbfl/filters/mbfilter_iso8859_8.c - libmbfl/filters/mbfilter_iso8859_9.c libmbfl/filters/mbfilter_jis.c - libmbfl/filters/mbfilter_koi8r.c - libmbfl/filters/mbfilter_armscii8.c libmbfl/filters/mbfilter_qprint.c + libmbfl/filters/mbfilter_singlebyte.c libmbfl/filters/mbfilter_sjis.c libmbfl/filters/mbfilter_sjis_open.c libmbfl/filters/mbfilter_sjis_mobile.c @@ -153,7 +132,6 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_utf8.c libmbfl/filters/mbfilter_utf8_mobile.c libmbfl/filters/mbfilter_uuencode.c - libmbfl/filters/mbfilter_koi8u.c libmbfl/mbfl/mbfilter.c libmbfl/mbfl/mbfilter_8bit.c libmbfl/mbfl/mbfilter_pass.c diff --git a/ext/mbstring/config.w32 b/ext/mbstring/config.w32 index 239446f600..8a9eadf41b 100644 --- a/ext/mbstring/config.w32 +++ b/ext/mbstring/config.w32 @@ -17,25 +17,18 @@ if (PHP_MBSTRING != "no") { "ext\\mbstring\\libmbfl\\config.h", true); ADD_SOURCES("ext/mbstring/libmbfl/filters", "html_entities.c \ - mbfilter_7bit.c mbfilter_ascii.c mbfilter_base64.c mbfilter_big5.c \ - mbfilter_cp1251.c mbfilter_cp1252.c \ - mbfilter_cp866.c mbfilter_cp932.c mbfilter_cp936.c mbfilter_cp51932.c \ - mbfilter_euc_cn.c mbfilter_euc_jp.c mbfilter_euc_jp_win.c mbfilter_euc_kr.c \ + mbfilter_7bit.c mbfilter_base64.c mbfilter_big5.c mbfilter_cp932.c \ + mbfilter_cp936.c mbfilter_cp51932.c mbfilter_euc_cn.c \ + mbfilter_euc_jp.c mbfilter_euc_jp_win.c mbfilter_euc_kr.c \ mbfilter_euc_tw.c mbfilter_htmlent.c mbfilter_hz.c mbfilter_iso2022_kr.c \ - mbfilter_iso8859_1.c mbfilter_iso8859_10.c mbfilter_iso8859_13.c \ - mbfilter_iso8859_14.c mbfilter_iso8859_15.c mbfilter_iso8859_16.c \ - mbfilter_iso8859_2.c mbfilter_iso8859_3.c mbfilter_iso8859_4.c \ - mbfilter_iso8859_5.c mbfilter_iso8859_6.c mbfilter_iso8859_7.c \ - mbfilter_iso8859_8.c mbfilter_iso8859_9.c mbfilter_jis.c \ - mbfilter_iso2022_jp_ms.c mbfilter_gb18030.c mbfilter_sjis_2004.c \ - mbfilter_koi8r.c mbfilter_qprint.c mbfilter_sjis.c mbfilter_ucs2.c \ + mbfilter_jis.c mbfilter_iso2022_jp_ms.c mbfilter_gb18030.c \ + mbfilter_sjis_2004.c mbfilter_qprint.c mbfilter_sjis.c mbfilter_ucs2.c \ mbfilter_ucs4.c mbfilter_uhc.c mbfilter_utf16.c mbfilter_utf32.c \ - mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_utf8.c mbfilter_utf8_mobile.c \ - mbfilter_koi8u.c mbfilter_cp1254.c mbfilter_euc_jp_2004.c \ - mbfilter_uuencode.c mbfilter_armscii8.c mbfilter_cp850.c \ + mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_utf8.c \ + mbfilter_utf8_mobile.c mbfilter_euc_jp_2004.c mbfilter_uuencode.c \ mbfilter_cp5022x.c mbfilter_sjis_open.c mbfilter_sjis_mobile.c \ - mbfilter_sjis_mac.c \ - mbfilter_iso2022jp_2004.c mbfilter_iso2022jp_mobile.c \ + mbfilter_sjis_mac.c mbfilter_iso2022jp_2004.c \ + mbfilter_iso2022jp_mobile.c mbfilter_singlebyte.c \ mbfilter_tl_jisx0201_jisx0208.c", "mbstring"); ADD_SOURCES("ext/mbstring/libmbfl/mbfl", "mbfilter.c mbfilter_8bit.c \ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.c b/ext/mbstring/libmbfl/filters/mbfilter_armscii8.c deleted file mode 100644 index 70999f9102..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: Hayk Chamyan <hamshen@gmail.com> - * - */ - -/* - * "armenian code filter and converter" - */ - -#include "mbfilter.h" -#include "mbfilter_armscii8.h" -#include "unicode_table_armscii8.h" - -static const char *mbfl_encoding_armscii8_aliases[] = {"ArmSCII-8", "ArmSCII8", "ARMSCII-8", "ARMSCII8", NULL}; - -const mbfl_encoding mbfl_encoding_armscii8 = { - mbfl_no_encoding_armscii8, - "ArmSCII-8", - "ArmSCII-8", - mbfl_encoding_armscii8_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_armscii8_wchar, - &vtbl_wchar_armscii8 -}; - -const struct mbfl_convert_vtbl vtbl_wchar_armscii8 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_armscii8, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_armscii8, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_armscii8_wchar = { - mbfl_no_encoding_armscii8, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_armscii8_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_armscii8_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c < armscii8_ucs_table_min) { - s = c; - } else { - s = armscii8_ucs_table[c - armscii8_ucs_table_min]; - if (!s) { - s = c | MBFL_WCSGROUP_THROUGH; - } - } - - CK((*filter->output_function)(s, filter->data)); - return c; -} - -int mbfl_filt_conv_wchar_armscii8(int c, mbfl_convert_filter *filter) -{ - if (c >= 0x28 && c <= 0x2F) { - CK((*filter->output_function)(ucs_armscii8_table[c - 0x28], filter->data)); - } else if (c < armscii8_ucs_table_min) { - CK((*filter->output_function)(c, filter->data)); - } else { - for (int n = 0; n < armscii8_ucs_table_len; n++) { - if (c == armscii8_ucs_table[n]) { - CK((*filter->output_function)(armscii8_ucs_table_min + n, filter->data)); - return c; - } - } - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.h b/ext/mbstring/libmbfl/filters/mbfilter_armscii8.h deleted file mode 100644 index 223aa8d206..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: Hayk Chamyan <hamshen@gmail.com> - * - */ - -#ifndef MBFL_MBFILTER_ARMSCII8_H -#define MBFL_MBFILTER_ARMSCII8_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_armscii8; -extern const struct mbfl_convert_vtbl vtbl_wchar_armscii8; -extern const struct mbfl_convert_vtbl vtbl_armscii8_wchar; - -int mbfl_filt_conv_armscii8_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_armscii8(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ARMSCII8_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ascii.c b/ext/mbstring/libmbfl/filters/mbfilter_ascii.c deleted file mode 100644 index bfe7d1da98..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_ascii.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002. The file - * mbfilter.c is included in this package . - * - */ - -#include "mbfilter.h" -#include "mbfilter_ascii.h" - -static const char *mbfl_encoding_ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "IBM-367", "cp367", "csASCII", NULL}; - -const mbfl_encoding mbfl_encoding_ascii = { - mbfl_no_encoding_ascii, - "ASCII", - "US-ASCII", /* preferred MIME name */ - mbfl_encoding_ascii_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_ascii_wchar, - &vtbl_wchar_ascii -}; - -const struct mbfl_convert_vtbl vtbl_ascii_wchar = { - mbfl_no_encoding_ascii, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_ascii_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_ascii = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_ascii, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_ascii, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ASCII => wchar - */ -int mbfl_filt_conv_ascii_wchar(int c, mbfl_convert_filter *filter) -{ - if (c < 0x80) { - (*filter->output_function)(c, filter->data); - } else { - (*filter->output_function)(c | MBFL_WCSGROUP_THROUGH, filter->data); - } - return c; -} - - -/* - * wchar => ASCII - */ -int mbfl_filt_conv_wchar_ascii(int c, mbfl_convert_filter *filter) -{ - if (c >= 0 && c < 0x80) { - CK((*filter->output_function)(c, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ascii.h b/ext/mbstring/libmbfl/filters/mbfilter_ascii.h deleted file mode 100644 index ae048fbd09..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_ascii.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002. The file - * mbfilter.c is included in this package . - * - */ - -#ifndef MBFL_MBFILTER_ASCII_H -#define MBFL_MBFILTER_ASCII_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_ascii; -extern const struct mbfl_convert_vtbl vtbl_ascii_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_ascii; - -int mbfl_filt_conv_ascii_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_ascii(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ASCII_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1251.c b/ext/mbstring/libmbfl/filters/mbfilter_cp1251.c deleted file mode 100644 index a85d19bb28..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1251.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * - */ -/* - * The source code included in this files was separated from mbfilter_ru.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_cp1251.h" -#include "unicode_table_cp1251.h" - -static const char *mbfl_encoding_cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL}; - -const mbfl_encoding mbfl_encoding_cp1251 = { - mbfl_no_encoding_cp1251, - "Windows-1251", - "Windows-1251", - mbfl_encoding_cp1251_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_cp1251_wchar, - &vtbl_wchar_cp1251 -}; - -const struct mbfl_convert_vtbl vtbl_wchar_cp1251 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_cp1251, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_cp1251, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_cp1251_wchar = { - mbfl_no_encoding_cp1251, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_cp1251_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_cp1251_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c < cp1251_ucs_table_min) { - s = c; - } else { - s = cp1251_ucs_table[c - cp1251_ucs_table_min]; - if (!s) { - s = c | MBFL_WCSGROUP_THROUGH; - } - } - - CK((*filter->output_function)(s, filter->data)); - return c; -} - -int mbfl_filt_conv_wchar_cp1251(int c, mbfl_convert_filter *filter) -{ - if (c < 0x80) { - CK((*filter->output_function)(c, filter->data)); - } else { - for (int n = 0; n < cp1251_ucs_table_len; n++) { - if (c == cp1251_ucs_table[n]) { - CK((*filter->output_function)(cp1251_ucs_table_min + n, filter->data)); - return c; - } - } - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1251.h b/ext/mbstring/libmbfl/filters/mbfilter_cp1251.h deleted file mode 100644 index 68ebd0932b..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1251.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * - */ -/* - * the source code included in this files was separated from mbfilter_ru.h - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_CP1251_H -#define MBFL_MBFILTER_CP1251_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_cp1251; -extern const struct mbfl_convert_vtbl vtbl_wchar_cp1251; -extern const struct mbfl_convert_vtbl vtbl_cp1251_wchar; - -int mbfl_filt_conv_wchar_cp1251(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_cp1251_wchar(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_CP1251_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1252.c b/ext/mbstring/libmbfl/filters/mbfilter_cp1252.c deleted file mode 100644 index 9770ba87e4..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1252.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Wez Furlong <wez@thebrainroom.com> - * - */ -/* - * the source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_cp1252.h" -#include "unicode_table_cp1252.h" - -static const char *mbfl_encoding_cp1252_aliases[] = {"cp1252", NULL}; - -const mbfl_encoding mbfl_encoding_cp1252 = { - mbfl_no_encoding_cp1252, - "Windows-1252", - "Windows-1252", - mbfl_encoding_cp1252_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_cp1252_wchar, - &vtbl_wchar_cp1252 -}; - -const struct mbfl_convert_vtbl vtbl_cp1252_wchar = { - mbfl_no_encoding_cp1252, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_cp1252_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_cp1252 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_cp1252, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_cp1252, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_wchar_cp1252(int c, mbfl_convert_filter *filter) -{ - int s = -1; - - if (c >= 0x100) { - /* Look it up from the CP1252 table */ - for (int n = 31; n >= 0; n--) { - if (c == cp1252_ucs_table[n]) { - s = 0x80 + n; - break; - } - } - } else if (c <= 0x7F || c >= 0xA0) { - s = c; - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - return c; -} - -int mbfl_filt_conv_cp1252_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0x80 && c < 0xA0) { - s = cp1252_ucs_table[c - 0x80]; - if (!s) { - s = c | MBFL_WCSGROUP_THROUGH; - } - } else { - s = c; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1252.h b/ext/mbstring/libmbfl/filters/mbfilter_cp1252.h deleted file mode 100644 index 73017e33b2..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1252.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Wez Furlong <wez@thebrainroom.com> - * - */ -/* - * the source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_CP1252_H -#define MBFL_MBFILTER_CP1252_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_cp1252; -extern const struct mbfl_convert_vtbl vtbl_cp1252_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_cp1252; - -int mbfl_filt_conv_wchar_cp1252(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_cp1252_wchar(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_CP1252_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1254.c b/ext/mbstring/libmbfl/filters/mbfilter_cp1254.c deleted file mode 100644 index 910ddda1c6..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1254.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Haluk AKIN <halukakin@gmail.com> - * - */ -/* - * The source code included in this files was separated from mbfilter_ru.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_cp1254.h" -#include "unicode_table_cp1254.h" - -static const char *mbfl_encoding_cp1254_aliases[] = {"CP1254", "CP-1254", "WINDOWS-1254", NULL}; - -const mbfl_encoding mbfl_encoding_cp1254 = { - mbfl_no_encoding_cp1254, - "Windows-1254", - "Windows-1254", - mbfl_encoding_cp1254_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_cp1254_wchar, - &vtbl_wchar_cp1254 -}; - -const struct mbfl_convert_vtbl vtbl_cp1254_wchar = { - mbfl_no_encoding_cp1254, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_cp1254_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_cp1254 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_cp1254, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_cp1254, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_wchar_cp1254(int c, mbfl_convert_filter *filter) -{ - if (c < 0x80) { - CK((*filter->output_function)(c, filter->data)); - } else { - for (int n = 0; n < cp1254_ucs_table_len; n++) { - if (c == cp1254_ucs_table[n]) { - CK((*filter->output_function)(cp1254_ucs_table_min + n, filter->data)); - return c; - } - } - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} - -int mbfl_filt_conv_cp1254_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c < cp1254_ucs_table_min) { - s = c; - } else { - s = cp1254_ucs_table[c - cp1254_ucs_table_min]; - if (!s) { - s = c | MBFL_WCSGROUP_THROUGH; - } - } - - CK((*filter->output_function)(s, filter->data)); - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp1254.h b/ext/mbstring/libmbfl/filters/mbfilter_cp1254.h deleted file mode 100644 index 21327e3b7f..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp1254.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Haluk AKIN <halukakin@gmail.com> - * - */ -/* - * the source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_CP1254_H -#define MBFL_MBFILTER_CP1254_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_cp1254; -extern const struct mbfl_convert_vtbl vtbl_cp1254_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_cp1254; - -int mbfl_filt_conv_wchar_cp1254(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_cp1254_wchar(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_CP1254_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp850.c b/ext/mbstring/libmbfl/filters/mbfilter_cp850.c deleted file mode 100644 index 941f1eee35..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp850.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * Adaption for CP850: D. Giffeler <dg@artegic.de> - * - */ - -#include "mbfilter.h" -#include "mbfilter_cp850.h" -#include "unicode_table_cp850.h" - -static const char *mbfl_encoding_cp850_aliases[] = {"CP850", "CP-850", "IBM850", "IBM-850", NULL}; - -const mbfl_encoding mbfl_encoding_cp850 = { - mbfl_no_encoding_cp850, - "CP850", - "CP850", - mbfl_encoding_cp850_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_cp850_wchar, - &vtbl_wchar_cp850 -}; - -const struct mbfl_convert_vtbl vtbl_wchar_cp850 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_cp850, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_cp850, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_cp850_wchar = { - mbfl_no_encoding_cp850, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_cp850_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_cp850_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c < cp850_ucs_table_min) { - s = c; - } else { - s = cp850_ucs_table[c - cp850_ucs_table_min]; - } - - CK((*filter->output_function)(s, filter->data)); - return c; -} - -int mbfl_filt_conv_wchar_cp850(int c, mbfl_convert_filter *filter) -{ - if (c < 0x80) { - CK((*filter->output_function)(c, filter->data)); - } else { - for (int n = 0; n < cp850_ucs_table_len; n++) { - if (c == cp850_ucs_table[n]) { - CK((*filter->output_function)(cp850_ucs_table_min + n, filter->data)); - return c; - } - } - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp850.h b/ext/mbstring/libmbfl/filters/mbfilter_cp850.h deleted file mode 100644 index d823f2975d..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp850.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * Adaption for CP850: D. Giffeler <dg@artegic.de> - * - */ - -#ifndef MBFL_MBFILTER_CP850_H -#define MBFL_MBFILTER_CP850_H - -extern const mbfl_encoding mbfl_encoding_cp850; -extern const struct mbfl_convert_vtbl vtbl_wchar_cp850; -extern const struct mbfl_convert_vtbl vtbl_cp850_wchar; - -int mbfl_filt_conv_cp850_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_cp850(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_CP850_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp866.c b/ext/mbstring/libmbfl/filters/mbfilter_cp866.c deleted file mode 100644 index f0aeece297..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp866.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * - */ -/* - * The source code included in this files was separated from mbfilter_ru.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_cp866.h" -#include "unicode_table_cp866.h" - -static const char *mbfl_encoding_cp866_aliases[] = {"CP866", "CP-866", "IBM866", "IBM-866", NULL}; - -const mbfl_encoding mbfl_encoding_cp866 = { - mbfl_no_encoding_cp866, - "CP866", - "CP866", - mbfl_encoding_cp866_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_cp866_wchar, - &vtbl_wchar_cp866 -}; - -const struct mbfl_convert_vtbl vtbl_wchar_cp866 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_cp866, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_cp866, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_cp866_wchar = { - mbfl_no_encoding_cp866, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_cp866_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_cp866_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c < cp866_ucs_table_min) { - s = c; - } else { - s = cp866_ucs_table[c - cp866_ucs_table_min]; - } - - CK((*filter->output_function)(s, filter->data)); - return c; -} - -int mbfl_filt_conv_wchar_cp866(int c, mbfl_convert_filter *filter) -{ - if (c < 0x80) { - CK((*filter->output_function)(c, filter->data)); - } else { - for (int n = 0; n < cp866_ucs_table_len; n++) { - if (c == cp866_ucs_table[n]) { - CK((*filter->output_function)(cp866_ucs_table_min + n, filter->data)); - return c; - } - } - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp866.h b/ext/mbstring/libmbfl/filters/mbfilter_cp866.h deleted file mode 100644 index a580132ce2..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp866.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * - */ -/* - * The source code included in this files was separated from mbfilter_ru.h - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_CP866_H -#define MBFL_MBFILTER_CP866_H - -extern const mbfl_encoding mbfl_encoding_cp866; -extern const struct mbfl_convert_vtbl vtbl_wchar_cp866; -extern const struct mbfl_convert_vtbl vtbl_cp866_wchar; - -int mbfl_filt_conv_cp866_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_cp866(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_CP866_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c deleted file mode 100644 index 6c091e0fff..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_1.h" - -static const char *mbfl_encoding_8859_1_aliases[] = {"ISO8859-1", "latin1", NULL}; - -const mbfl_encoding mbfl_encoding_8859_1 = { - mbfl_no_encoding_8859_1, - "ISO-8859-1", - "ISO-8859-1", - mbfl_encoding_8859_1_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_1_wchar, - &vtbl_wchar_8859_1 -}; - -const struct mbfl_convert_vtbl vtbl_8859_1_wchar = { - mbfl_no_encoding_8859_1, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_1_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_1 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_1, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_1, - mbfl_filt_conv_common_flush, - NULL, -}; - - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-1 => wchar - */ -int mbfl_filt_conv_8859_1_wchar(int c, mbfl_convert_filter *filter) -{ - return (*filter->output_function)(c, filter->data); -} - -/* - * wchar => ISO-8859-1 - */ -int mbfl_filt_conv_wchar_8859_1(int c, mbfl_convert_filter *filter) -{ - if (c >= 0 && c < 0x100) { - CK((*filter->output_function)(c, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.h deleted file mode 100644 index 91223d7738..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.h - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_1_H -#define MBFL_MBFILTER_ISO8859_1_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_1; -extern const struct mbfl_convert_vtbl vtbl_8859_1_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_1; - -int mbfl_filt_conv_8859_1_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_1(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_1_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c deleted file mode 100644 index 39288ec595..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_10.h" -#include "unicode_table_iso8859_10.h" - -static const char *mbfl_encoding_8859_10_aliases[] = {"ISO8859-10", "latin6", NULL}; - -const mbfl_encoding mbfl_encoding_8859_10 = { - mbfl_no_encoding_8859_10, - "ISO-8859-10", - "ISO-8859-10", - mbfl_encoding_8859_10_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_10_wchar, - &vtbl_wchar_8859_10 -}; - -const struct mbfl_convert_vtbl vtbl_8859_10_wchar = { - mbfl_no_encoding_8859_10, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_10_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_10 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_10, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_10, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-10 => wchar - */ -int mbfl_filt_conv_8859_10_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_10_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-10 - */ -int mbfl_filt_conv_wchar_8859_10(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_10_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.h deleted file mode 100644 index 7027ae5228..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_10_H -#define MBFL_MBFILTER_ISO8859_10_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_10; -extern const struct mbfl_convert_vtbl vtbl_8859_10_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_10; - -int mbfl_filt_conv_8859_10_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_10(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_10_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c deleted file mode 100644 index e44416dbc7..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_13.h" -#include "unicode_table_iso8859_13.h" - -static const char *mbfl_encoding_8859_13_aliases[] = {"ISO8859-13", NULL}; - -const mbfl_encoding mbfl_encoding_8859_13 = { - mbfl_no_encoding_8859_13, - "ISO-8859-13", - "ISO-8859-13", - mbfl_encoding_8859_13_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_13_wchar, - &vtbl_wchar_8859_13 -}; - -const struct mbfl_convert_vtbl vtbl_8859_13_wchar = { - mbfl_no_encoding_8859_13, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_13_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_13 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_13, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_13, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-13 => wchar - */ -int mbfl_filt_conv_8859_13_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_13_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-13 - */ -int mbfl_filt_conv_wchar_8859_13(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_13_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.h deleted file mode 100644 index 9240cadd2f..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_13_H -#define MBFL_MBFILTER_ISO8859_13_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_13; -extern const struct mbfl_convert_vtbl vtbl_8859_13_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_13; - -int mbfl_filt_conv_8859_13_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_13(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_13_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c deleted file mode 100644 index 1da474c0a5..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_14.h" -#include "unicode_table_iso8859_14.h" - -static const char *mbfl_encoding_8859_14_aliases[] = {"ISO8859-14", "latin8", NULL}; - -const mbfl_encoding mbfl_encoding_8859_14 = { - mbfl_no_encoding_8859_14, - "ISO-8859-14", - "ISO-8859-14", - mbfl_encoding_8859_14_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_14_wchar, - &vtbl_wchar_8859_14 -}; - -const struct mbfl_convert_vtbl vtbl_8859_14_wchar = { - mbfl_no_encoding_8859_14, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_14_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_14 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_14, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_14, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-14 => wchar - */ -int mbfl_filt_conv_8859_14_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_14_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-14 - */ -int mbfl_filt_conv_wchar_8859_14(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_14_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.h deleted file mode 100644 index 6f62e684f8..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * COPYRIGHT NOTICE - * - * This file is a portion of "streamable kanji code filter and converter" - * library, which is distributed under GNU Lesser General Public License - * version 2.1. - * - * The source code included in this files was separated from mbfilter.c - * by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_14_H -#define MBFL_MBFILTER_ISO8859_14_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_14; -extern const struct mbfl_convert_vtbl vtbl_8859_14_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_14; - -int mbfl_filt_conv_8859_14_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_14(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_14_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c deleted file mode 100644 index 25ea9ae0f4..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_15.h" -#include "unicode_table_iso8859_15.h" - -static const char *mbfl_encoding_8859_15_aliases[] = {"ISO8859-15", NULL}; - -const mbfl_encoding mbfl_encoding_8859_15 = { - mbfl_no_encoding_8859_15, - "ISO-8859-15", - "ISO-8859-15", - mbfl_encoding_8859_15_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_15_wchar, - &vtbl_wchar_8859_15 -}; - -const struct mbfl_convert_vtbl vtbl_8859_15_wchar = { - mbfl_no_encoding_8859_15, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_15_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_15 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_15, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_15, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-15 => wchar - */ -int mbfl_filt_conv_8859_15_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_15_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-15 - */ -int mbfl_filt_conv_wchar_8859_15(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_15_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.h deleted file mode 100644 index 839889a7f4..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * COPYRIGHT NOTICE - * - * This file is a portion of "streamable kanji code filter and converter" - * library, which is distributed under GNU Lesser General Public License - * version 2.1. - * - * The source code included in this files was separated from mbfilter.c - * by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_15_H -#define MBFL_MBFILTER_ISO8859_15_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_15; -extern const struct mbfl_convert_vtbl vtbl_8859_15_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_15; - -int mbfl_filt_conv_8859_15_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_15(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_15_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c deleted file mode 100644 index 84025b1d53..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_16.h" -#include "unicode_table_iso8859_16.h" - -static const char *mbfl_encoding_8859_16_aliases[] = {"ISO8859-16", NULL}; - -const mbfl_encoding mbfl_encoding_8859_16 = { - mbfl_no_encoding_8859_16, - "ISO-8859-16", - "ISO-8859-16", - mbfl_encoding_8859_16_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_16_wchar, - &vtbl_wchar_8859_16 -}; - -const struct mbfl_convert_vtbl vtbl_8859_16_wchar = { - mbfl_no_encoding_8859_16, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_16_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_16 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_16, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_16, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-16 => wchar - */ -int mbfl_filt_conv_8859_16_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_16_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-16 - */ -int mbfl_filt_conv_wchar_8859_16(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_16_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h deleted file mode 100644 index e2b2ef21ad..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * COPYRIGHT NOTICE - * - * This file is a portion of "streamable kanji code filter and converter" - * library, which is distributed under GNU Lesser General Public License - * version 2.1. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_16_H -#define MBFL_MBFILTER_ISO8859_16_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_16; -extern const struct mbfl_convert_vtbl vtbl_8859_16_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_16; - -int mbfl_filt_conv_8859_16_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_16(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_16_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c deleted file mode 100644 index 37a34d5b5f..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_2.h" -#include "unicode_table_iso8859_2.h" - -static const char *mbfl_encoding_8859_2_aliases[] = {"ISO8859-2", "latin2", NULL}; - -const mbfl_encoding mbfl_encoding_8859_2 = { - mbfl_no_encoding_8859_2, - "ISO-8859-2", - "ISO-8859-2", - mbfl_encoding_8859_2_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_2_wchar, - &vtbl_wchar_8859_2 -}; - -const struct mbfl_convert_vtbl vtbl_8859_2_wchar = { - mbfl_no_encoding_8859_2, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_2_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_2 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_2, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_2, - mbfl_filt_conv_common_flush, - NULL, -}; - - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-2 => wchar - */ -int mbfl_filt_conv_8859_2_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_2_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-2 - */ -int mbfl_filt_conv_wchar_8859_2(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_2_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.h deleted file mode 100644 index d0a8dc609f..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_2_H -#define MBFL_MBFILTER_ISO8859_2_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_2; -extern const struct mbfl_convert_vtbl vtbl_8859_2_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_2; - -int mbfl_filt_conv_8859_2_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_2(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_2_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c deleted file mode 100644 index 9e3e5b5d0c..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_3.h" -#include "unicode_table_iso8859_3.h" - -static const char *mbfl_encoding_8859_3_aliases[] = {"ISO8859-3", "latin3", NULL}; - -const mbfl_encoding mbfl_encoding_8859_3 = { - mbfl_no_encoding_8859_3, - "ISO-8859-3", - "ISO-8859-3", - mbfl_encoding_8859_3_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_3_wchar, - &vtbl_wchar_8859_3 -}; - -const struct mbfl_convert_vtbl vtbl_8859_3_wchar = { - mbfl_no_encoding_8859_3, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_3_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_3 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_3, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_3, - mbfl_filt_conv_common_flush, - NULL, -}; - - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-3 => wchar - */ -int mbfl_filt_conv_8859_3_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_3_ucs_table[c - 0xa0]; - if (s <= 0) { - s = c; - s &= MBFL_WCSPLANE_MASK; - s |= MBFL_WCSPLANE_8859_3; - } - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-3 - */ -int mbfl_filt_conv_wchar_8859_3(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_3_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.h deleted file mode 100644 index f5f920b8d5..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_3_H -#define MBFL_MBFILTER_ISO8859_3_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_3; -extern const struct mbfl_convert_vtbl vtbl_8859_3_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_3; - -int mbfl_filt_conv_8859_3_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_3(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_3_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c deleted file mode 100644 index 8698ac7c00..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_4.h" -#include "unicode_table_iso8859_4.h" - -static const char *mbfl_encoding_8859_4_aliases[] = {"ISO8859-4", "latin4", NULL}; - -const mbfl_encoding mbfl_encoding_8859_4 = { - mbfl_no_encoding_8859_4, - "ISO-8859-4", - "ISO-8859-4", - mbfl_encoding_8859_4_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_4_wchar, - &vtbl_wchar_8859_4 -}; - -const struct mbfl_convert_vtbl vtbl_8859_4_wchar = { - mbfl_no_encoding_8859_4, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_4_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_4 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_4, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_4, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-4 => wchar - */ -int mbfl_filt_conv_8859_4_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_4_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-4 - */ -int mbfl_filt_conv_wchar_8859_4(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_4_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.h deleted file mode 100644 index df74576f48..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_4_H -#define MBFL_MBFILTER_ISO8859_4_H - -extern const mbfl_encoding mbfl_encoding_8859_4; -extern const struct mbfl_convert_vtbl vtbl_8859_4_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_4; - -int mbfl_filt_conv_8859_4_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_4(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_4_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c deleted file mode 100644 index 1ccf142c41..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_5.h" -#include "unicode_table_iso8859_5.h" - -static const char *mbfl_encoding_8859_5_aliases[] = {"ISO8859-5", "cyrillic", NULL}; - -const mbfl_encoding mbfl_encoding_8859_5 = { - mbfl_no_encoding_8859_5, - "ISO-8859-5", - "ISO-8859-5", - mbfl_encoding_8859_5_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_5_wchar, - &vtbl_wchar_8859_5 -}; - -const struct mbfl_convert_vtbl vtbl_8859_5_wchar = { - mbfl_no_encoding_8859_5, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_5_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_5 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_5, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_5, - mbfl_filt_conv_common_flush, - NULL, -}; - - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-5 => wchar - */ -int mbfl_filt_conv_8859_5_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_5_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-5 - */ -int mbfl_filt_conv_wchar_8859_5(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_5_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.h deleted file mode 100644 index 71f997d5bf..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_5_H -#define MBFL_MBFILTER_ISO8859_5_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_5; -extern const struct mbfl_convert_vtbl vtbl_8859_5_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_5; - -int mbfl_filt_conv_8859_5_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_5(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_5_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c deleted file mode 100644 index f0dacb8cbd..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_6.h" -#include "unicode_table_iso8859_6.h" - -static const char *mbfl_encoding_8859_6_aliases[] = {"ISO8859-6", "arabic", NULL}; - -const mbfl_encoding mbfl_encoding_8859_6 = { - mbfl_no_encoding_8859_6, - "ISO-8859-6", - "ISO-8859-6", - mbfl_encoding_8859_6_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_6_wchar, - &vtbl_wchar_8859_6 -}; - -const struct mbfl_convert_vtbl vtbl_8859_6_wchar = { - mbfl_no_encoding_8859_6, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_6_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_6 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_6, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_6, - mbfl_filt_conv_common_flush, - NULL, -}; - - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-6 => wchar - */ -int mbfl_filt_conv_8859_6_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_6_ucs_table[c - 0xa0]; - if (s <= 0) { - s = c; - s &= MBFL_WCSPLANE_MASK; - s |= MBFL_WCSPLANE_8859_6; - } - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-6 - */ -int mbfl_filt_conv_wchar_8859_6(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_6_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.h deleted file mode 100644 index 4c75372ab5..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_6_H -#define MBFL_MBFILTER_ISO8859_6_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_6; -extern const struct mbfl_convert_vtbl vtbl_8859_6_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_6; - -int mbfl_filt_conv_8859_6_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_6(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_6_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c deleted file mode 100644 index 1dc0f3f2e8..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_7.h" -#include "unicode_table_iso8859_7.h" - -static const char *mbfl_encoding_8859_7_aliases[] = {"ISO8859-7", "greek", NULL}; - -const mbfl_encoding mbfl_encoding_8859_7 = { - mbfl_no_encoding_8859_7, - "ISO-8859-7", - "ISO-8859-7", - mbfl_encoding_8859_7_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_7_wchar, - &vtbl_wchar_8859_7 -}; - -const struct mbfl_convert_vtbl vtbl_8859_7_wchar = { - mbfl_no_encoding_8859_7, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_7_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_7 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_7, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_7, - mbfl_filt_conv_common_flush, - NULL, -}; - - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-7 => wchar - */ -int mbfl_filt_conv_8859_7_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_7_ucs_table[c - 0xa0]; - if (s <= 0) { - s = c; - s &= MBFL_WCSPLANE_MASK; - s |= MBFL_WCSPLANE_8859_7; - } - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-7 - */ -int mbfl_filt_conv_wchar_8859_7(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_7_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.h deleted file mode 100644 index cd38d0c06f..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_7_H -#define MBFL_MBFILTER_ISO8859_7_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_7; -extern const struct mbfl_convert_vtbl vtbl_8859_7_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_7; - -int mbfl_filt_conv_8859_7_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_7(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_7_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c deleted file mode 100644 index 827b4dabea..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_8.h" -#include "unicode_table_iso8859_8.h" - -static const char *mbfl_encoding_8859_8_aliases[] = {"ISO8859-8", "hebrew", NULL}; - -const mbfl_encoding mbfl_encoding_8859_8 = { - mbfl_no_encoding_8859_8, - "ISO-8859-8", - "ISO-8859-8", - mbfl_encoding_8859_8_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_8_wchar, - &vtbl_wchar_8859_8 -}; - -const struct mbfl_convert_vtbl vtbl_8859_8_wchar = { - mbfl_no_encoding_8859_8, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_8_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_8 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_8, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_8, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-8 => wchar - */ -int mbfl_filt_conv_8859_8_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_8_ucs_table[c - 0xa0]; - if (s <= 0) { - s = c; - s &= MBFL_WCSPLANE_MASK; - s |= MBFL_WCSPLANE_8859_8; - } - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-8 - */ -int mbfl_filt_conv_wchar_8859_8(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_8_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.h deleted file mode 100644 index ab02ae831c..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_8_H -#define MBFL_MBFILTER_ISO8859_8_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_8; -extern const struct mbfl_convert_vtbl vtbl_8859_8_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_8; - -int mbfl_filt_conv_8859_8_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_8(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_8_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c deleted file mode 100644 index 12e1a44d1a..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_iso8859_9.h" -#include "unicode_table_iso8859_9.h" - -static const char *mbfl_encoding_8859_9_aliases[] = {"ISO8859-9", "latin5", NULL}; - -const mbfl_encoding mbfl_encoding_8859_9 = { - mbfl_no_encoding_8859_9, - "ISO-8859-9", - "ISO-8859-9", - mbfl_encoding_8859_9_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_8859_9_wchar, - &vtbl_wchar_8859_9 -}; - -const struct mbfl_convert_vtbl vtbl_8859_9_wchar = { - mbfl_no_encoding_8859_9, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_8859_9_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_wchar_8859_9 = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_8859_9, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_8859_9, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -/* - * ISO-8859-9 => wchar - */ -int mbfl_filt_conv_8859_9_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c >= 0 && c < 0xa0) { - s = c; - } else if (c >= 0xa0 && c < 0x100) { - s = iso8859_9_ucs_table[c - 0xa0]; - } else { - s = c; - s &= MBFL_WCSGROUP_MASK; - s |= MBFL_WCSGROUP_THROUGH; - } - - CK((*filter->output_function)(s, filter->data)); - - return c; -} - -/* - * wchar => ISO-8859-9 - */ -int mbfl_filt_conv_wchar_8859_9(int c, mbfl_convert_filter *filter) -{ - int s, n; - - if (c >= 0 && c < 0xa0) { - s = c; - } else { - s = -1; - n = 95; - while (n >= 0) { - if (c == iso8859_9_ucs_table[n]) { - s = 0xa0 + n; - break; - } - n--; - } - } - - if (s >= 0) { - CK((*filter->output_function)(s, filter->data)); - } else { - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.h deleted file mode 100644 index e628a8219d..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: - * - */ -/* - * The source code included in this files was separated from mbfilter.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_ISO8859_9_H -#define MBFL_MBFILTER_ISO8859_9_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_8859_9; -extern const struct mbfl_convert_vtbl vtbl_8859_9_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_8859_9; - -int mbfl_filt_conv_8859_9_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_8859_9(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_ISO8859_9_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.c b/ext/mbstring/libmbfl/filters/mbfilter_koi8r.c deleted file mode 100644 index de82c473cf..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * - */ -/* - * The source code included in this files was separated from mbfilter_ru.c - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#include "mbfilter.h" -#include "mbfilter_koi8r.h" -#include "unicode_table_koi8r.h" - -static const char *mbfl_encoding_koi8r_aliases[] = {"KOI8-R", "KOI8R", NULL}; - -const mbfl_encoding mbfl_encoding_koi8r = { - mbfl_no_encoding_koi8r, - "KOI8-R", - "KOI8-R", - mbfl_encoding_koi8r_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_koi8r_wchar, - &vtbl_wchar_koi8r -}; - -const struct mbfl_convert_vtbl vtbl_wchar_koi8r = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_koi8r, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_koi8r, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_koi8r_wchar = { - mbfl_no_encoding_koi8r, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_koi8r_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_koi8r_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c < koi8r_ucs_table_min) { - s = c; - } else { - s = koi8r_ucs_table[c - koi8r_ucs_table_min]; - } - - CK((*filter->output_function)(s, filter->data)); - return c; -} - -int mbfl_filt_conv_wchar_koi8r(int c, mbfl_convert_filter *filter) -{ - if (c < 0x80) { - CK((*filter->output_function)(c, filter->data)); - } else { - for (int n = 0; n < koi8r_ucs_table_len; n++) { - if (c == koi8r_ucs_table[n]) { - CK((*filter->output_function)(koi8r_ucs_table_min + n, filter->data)); - return c; - } - } - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.h b/ext/mbstring/libmbfl/filters/mbfilter_koi8r.h deleted file mode 100644 index 16da179b16..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * - */ -/* - * The source code included in this files was separated from mbfilter_ru.h - * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. - * - */ - -#ifndef MBFL_MBFILTER_KOI8R_H -#define MBFL_MBFILTER_KOI8R_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_koi8r; -extern const struct mbfl_convert_vtbl vtbl_wchar_koi8r; -extern const struct mbfl_convert_vtbl vtbl_koi8r_wchar; - -int mbfl_filt_conv_koi8r_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_koi8r(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_KOI8R_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.c b/ext/mbstring/libmbfl/filters/mbfilter_koi8u.c deleted file mode 100644 index 26754ac0ab..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Maksym Veremeyenko <verem@m1.tv> - * - * Based on mbfilter_koi8r.c code - * - */ - -#include "mbfilter.h" -#include "mbfilter_koi8u.h" -#include "unicode_table_koi8u.h" - -static const char *mbfl_encoding_koi8u_aliases[] = {"KOI8-U", "KOI8U", NULL}; - -const mbfl_encoding mbfl_encoding_koi8u = { - mbfl_no_encoding_koi8u, - "KOI8-U", - "KOI8-U", - mbfl_encoding_koi8u_aliases, - NULL, - MBFL_ENCTYPE_SBCS, - &vtbl_koi8u_wchar, - &vtbl_wchar_koi8u -}; - -const struct mbfl_convert_vtbl vtbl_wchar_koi8u = { - mbfl_no_encoding_wchar, - mbfl_no_encoding_koi8u, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_wchar_koi8u, - mbfl_filt_conv_common_flush, - NULL, -}; - -const struct mbfl_convert_vtbl vtbl_koi8u_wchar = { - mbfl_no_encoding_koi8u, - mbfl_no_encoding_wchar, - mbfl_filt_conv_common_ctor, - NULL, - mbfl_filt_conv_koi8u_wchar, - mbfl_filt_conv_common_flush, - NULL, -}; - -#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) - -int mbfl_filt_conv_koi8u_wchar(int c, mbfl_convert_filter *filter) -{ - int s; - - if (c < koi8u_ucs_table_min) { - s = c; - } else { - s = koi8u_ucs_table[c - koi8u_ucs_table_min]; - } - - CK((*filter->output_function)(s, filter->data)); - return c; -} - -int mbfl_filt_conv_wchar_koi8u(int c, mbfl_convert_filter *filter) -{ - if (c < 0x80) { - CK((*filter->output_function)(c, filter->data)); - } else { - for (int n = 0; n < koi8u_ucs_table_len; n++) { - if (c == koi8u_ucs_table[n]) { - CK((*filter->output_function)(koi8u_ucs_table_min + n, filter->data)); - return c; - } - } - CK(mbfl_filt_conv_illegal_output(c, filter)); - } - - return c; -} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.h b/ext/mbstring/libmbfl/filters/mbfilter_koi8u.h deleted file mode 100644 index 8eb6c2c425..0000000000 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Maksym Veremeyenko <verem@m1.tv> - * - * Based on mbfilter_koi8r.h code - * - */ - -#ifndef MBFL_MBFILTER_KOI8U_H -#define MBFL_MBFILTER_KOI8U_H - -#include "mbfilter.h" - -extern const mbfl_encoding mbfl_encoding_koi8u; -extern const struct mbfl_convert_vtbl vtbl_wchar_koi8u; -extern const struct mbfl_convert_vtbl vtbl_koi8u_wchar; - -int mbfl_filt_conv_koi8u_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_koi8u(int c, mbfl_convert_filter *filter); - -#endif /* MBFL_MBFILTER_KOI8U_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c new file mode 100644 index 0000000000..7e7bdfbfaa --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.c @@ -0,0 +1,581 @@ +/* + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ +*/ + +#include "mbfilter_singlebyte.h" + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +/* Helper for single-byte encodings which use a conversion table */ +static int mbfl_conv_singlebyte_table(int c, mbfl_convert_filter *filter, int tbl_min, const unsigned short tbl[]) +{ + if (c < tbl_min) { + CK((*filter->output_function)(c, filter->data)); + } else { + int s = tbl[c - tbl_min]; + if (!s) { + s = c | MBFL_WCSGROUP_THROUGH; + } + CK((*filter->output_function)(s, filter->data)); + } + return c; +} + +static int mbfl_conv_reverselookup_table(int c, mbfl_convert_filter *filter, int tbl_min, const unsigned short tbl[]) +{ + if (c < tbl_min) { + CK((*filter->output_function)(c, filter->data)); + } else { + for (int i = 0; i < 256 - tbl_min; i++) { + if (c == tbl[i]) { + CK((*filter->output_function)(i + tbl_min, filter->data)); + return c; + } + } + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + return c; +} + +/* Initialize data structures for a single-byte encoding */ +#define DEF_SB(id, name, mime_name, aliases) \ + static int mbfl_filt_conv_##id##_wchar(int c, mbfl_convert_filter *filter); \ + static int mbfl_filt_conv_wchar_##id(int c, mbfl_convert_filter *filter); \ + static const struct mbfl_convert_vtbl vtbl_##id##_wchar = { \ + mbfl_no_encoding_##id, \ + mbfl_no_encoding_wchar, \ + mbfl_filt_conv_common_ctor, \ + NULL, \ + mbfl_filt_conv_##id##_wchar, \ + mbfl_filt_conv_common_flush, \ + NULL \ + }; \ + static const struct mbfl_convert_vtbl vtbl_wchar_##id = { \ + mbfl_no_encoding_wchar, \ + mbfl_no_encoding_##id, \ + mbfl_filt_conv_common_ctor, \ + NULL, \ + mbfl_filt_conv_wchar_##id, \ + mbfl_filt_conv_common_flush, \ + NULL \ + }; \ + const mbfl_encoding mbfl_encoding_##id = { \ + mbfl_no_encoding_##id, \ + name, \ + mime_name, \ + aliases, \ + NULL, \ + MBFL_ENCTYPE_SBCS, \ + &vtbl_##id##_wchar, \ + &vtbl_wchar_##id \ + } + +/* For single-byte encodings which use a conversion table */ +#define DEF_SB_TBL(id, name, mime_name, aliases, tbl_min, tbl) \ + static int mbfl_filt_conv_##id##_wchar(int c, mbfl_convert_filter *filter) { \ + return mbfl_conv_singlebyte_table(c, filter, tbl_min, tbl); \ + } \ + static int mbfl_filt_conv_wchar_##id(int c, mbfl_convert_filter *filter) { \ + return mbfl_conv_reverselookup_table(c, filter, tbl_min, tbl); \ + } \ + DEF_SB(id, name, mime_name, aliases) + +/* The grand-daddy of them all: ASCII */ +static const char *ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "IBM-367", "cp367", "csASCII", NULL}; +DEF_SB(ascii, "ASCII", "US-ASCII", ascii_aliases); + +static int mbfl_filt_conv_ascii_wchar(int c, mbfl_convert_filter *filter) +{ + if (c < 0x80) { + CK((*filter->output_function)(c, filter->data)); + } else { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + return c; +} + +static int mbfl_filt_conv_wchar_ascii(int c, mbfl_convert_filter *filter) +{ + if (c < 0x80) { + CK((*filter->output_function)(c, filter->data)); + } else { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + return c; +} + +/* ISO-8859-X */ + +static const char *iso8859_1_aliases[] = {"ISO8859-1", "latin1", NULL}; +DEF_SB(8859_1, "ISO-8859-1", "ISO-8859-1", iso8859_1_aliases); + +static int mbfl_filt_conv_8859_1_wchar(int c, mbfl_convert_filter *filter) +{ + return (*filter->output_function)(c, filter->data); +} + +static int mbfl_filt_conv_wchar_8859_1(int c, mbfl_convert_filter *filter) +{ + if (c < 0x100) { + CK((*filter->output_function)(c, filter->data)); + } else { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + return c; +} + +static const char *iso8859_2_aliases[] = {"ISO8859-2", "latin2", NULL}; +static const unsigned short iso8859_2_ucs_table[] = { + 0X00A0, 0X0104, 0X02D8, 0X0141, 0X00A4, 0X013D, 0X015A, 0X00A7, + 0X00A8, 0X0160, 0X015E, 0X0164, 0X0179, 0X00AD, 0X017D, 0X017B, + 0X00B0, 0X0105, 0X02DB, 0X0142, 0X00B4, 0X013E, 0X015B, 0X02C7, + 0X00B8, 0X0161, 0X015F, 0X0165, 0X017A, 0X02DD, 0X017E, 0X017C, + 0X0154, 0X00C1, 0X00C2, 0X0102, 0X00C4, 0X0139, 0X0106, 0X00C7, + 0X010C, 0X00C9, 0X0118, 0X00CB, 0X011A, 0X00CD, 0X00CE, 0X010E, + 0X0110, 0X0143, 0X0147, 0X00D3, 0X00D4, 0X0150, 0X00D6, 0X00D7, + 0X0158, 0X016E, 0X00DA, 0X0170, 0X00DC, 0X00DD, 0X0162, 0X00DF, + 0X0155, 0X00E1, 0X00E2, 0X0103, 0X00E4, 0X013A, 0X0107, 0X00E7, + 0X010D, 0X00E9, 0X0119, 0X00EB, 0X011B, 0X00ED, 0X00EE, 0X010F, + 0X0111, 0X0144, 0X0148, 0X00F3, 0X00F4, 0X0151, 0X00F6, 0X00F7, + 0X0159, 0X016F, 0X00FA, 0X0171, 0X00FC, 0X00FD, 0X0163, 0X02D9 +}; +DEF_SB_TBL(8859_2, "ISO-8859-2", "ISO-8859-2", iso8859_2_aliases, 0xA0, iso8859_2_ucs_table); + +static const char *iso8859_3_aliases[] = {"ISO8859-3", "latin3", NULL}; +static const unsigned short iso8859_3_ucs_table[] = { + 0X00A0, 0X0126, 0X02D8, 0X00A3, 0X00A4, 0X0000, 0X0124, 0X00A7, + 0X00A8, 0X0130, 0X015E, 0X011E, 0X0134, 0X00AD, 0X0000, 0X017B, + 0X00B0, 0X0127, 0X00B2, 0X00B3, 0X00B4, 0X00B5, 0X0125, 0X00B7, + 0X00B8, 0X0131, 0X015F, 0X011F, 0X0135, 0X00BD, 0X0000, 0X017C, + 0X00C0, 0X00C1, 0X00C2, 0X0000, 0X00C4, 0X010A, 0X0108, 0X00C7, + 0X00C8, 0X00C9, 0X00CA, 0X00CB, 0X00CC, 0X00CD, 0X00CE, 0X00CF, + 0X0000, 0X00D1, 0X00D2, 0X00D3, 0X00D4, 0X0120, 0X00D6, 0X00D7, + 0X011C, 0X00D9, 0X00DA, 0X00DB, 0X00DC, 0X016C, 0X015C, 0X00DF, + 0X00E0, 0X00E1, 0X00E2, 0X0000, 0X00E4, 0X010B, 0X0109, 0X00E7, + 0X00E8, 0X00E9, 0X00EA, 0X00EB, 0X00EC, 0X00ED, 0X00EE, 0X00EF, + 0X0000, 0X00F1, 0X00F2, 0X00F3, 0X00F4, 0X0121, 0X00F6, 0X00F7, + 0X011D, 0X00F9, 0X00FA, 0X00FB, 0X00FC, 0X016D, 0X015D, 0X02D9 +}; +DEF_SB_TBL(8859_3, "ISO-8859-3", "ISO-8859-3", iso8859_3_aliases, 0xA0, iso8859_3_ucs_table); + +static const char *iso8859_4_aliases[] = {"ISO8859-4", "latin4", NULL}; +static const unsigned short iso8859_4_ucs_table[] = { + 0X00A0, 0X0104, 0X0138, 0X0156, 0X00A4, 0X0128, 0X013B, 0X00A7, + 0X00A8, 0X0160, 0X0112, 0X0122, 0X0166, 0X00AD, 0X017D, 0X00AF, + 0X00B0, 0X0105, 0X02DB, 0X0157, 0X00B4, 0X0129, 0X013C, 0X02C7, + 0X00B8, 0X0161, 0X0113, 0X0123, 0X0167, 0X014A, 0X017E, 0X014B, + 0X0100, 0X00C1, 0X00C2, 0X00C3, 0X00C4, 0X00C5, 0X00C6, 0X012E, + 0X010C, 0X00C9, 0X0118, 0X00CB, 0X0116, 0X00CD, 0X00CE, 0X012A, + 0X0110, 0X0145, 0X014C, 0X0136, 0X00D4, 0X00D5, 0X00D6, 0X00D7, + 0X00D8, 0X0172, 0X00DA, 0X00DB, 0X00DC, 0X0168, 0X016A, 0X00DF, + 0X0101, 0X00E1, 0X00E2, 0X00E3, 0X00E4, 0X00E5, 0X00E6, 0X012F, + 0X010D, 0X00E9, 0X0119, 0X00EB, 0X0117, 0X00ED, 0X00EE, 0X012B, + 0X0111, 0X0146, 0X014D, 0X0137, 0X00F4, 0X00F5, 0X00F6, 0X00F7, + 0X00F8, 0X0173, 0X00FA, 0X00FB, 0X00FC, 0X0169, 0X016B, 0X02D9 +}; +DEF_SB_TBL(8859_4, "ISO-8859-4", "ISO-8859-4", iso8859_4_aliases, 0xA0, iso8859_4_ucs_table); + +static const char *iso8859_5_aliases[] = {"ISO8859-5", "cyrillic", NULL}; +static const unsigned short iso8859_5_ucs_table[] = { + 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, + 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, + 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, + 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f +}; +DEF_SB_TBL(8859_5, "ISO-8859-5", "ISO-8859-5", iso8859_5_aliases, 0xA0, iso8859_5_ucs_table); + +static const char *iso8859_6_aliases[] = {"ISO8859-6", "arabic", NULL}; +static const unsigned short iso8859_6_ucs_table[] = { + 0X00A0, 0X0000, 0X0000, 0X0000, 0X00A4, 0X0000, 0X0000, 0X0000, + 0X0000, 0X0000, 0X0000, 0X0000, 0X060C, 0X00AD, 0X0000, 0X0000, + 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, + 0X0000, 0X0000, 0X0000, 0X061B, 0X0000, 0X0000, 0X0000, 0X061F, + 0X0000, 0X0621, 0X0622, 0X0623, 0X0624, 0X0625, 0X0626, 0X0627, + 0X0628, 0X0629, 0X062A, 0X062B, 0X062C, 0X062D, 0X062E, 0X062F, + 0X0630, 0X0631, 0X0632, 0X0633, 0X0634, 0X0635, 0X0636, 0X0637, + 0X0638, 0X0639, 0X063A, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, + 0X0640, 0X0641, 0X0642, 0X0643, 0X0644, 0X0645, 0X0646, 0X0647, + 0X0648, 0X0649, 0X064A, 0X064B, 0X064C, 0X064D, 0X064E, 0X064F, + 0X0650, 0X0651, 0X0652, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, + 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000 +}; +DEF_SB_TBL(8859_6, "ISO-8859-6", "ISO-8859-6", iso8859_6_aliases, 0xA0, iso8859_6_ucs_table); + +static const char *iso8859_7_aliases[] = {"ISO8859-7", "greek", NULL}; +static const unsigned short iso8859_7_ucs_table[] = { + 0X00A0, 0X2018, 0X2019, 0X00A3, 0X20AC, 0X20AF, 0X00A6, 0X00A7, + 0X00A8, 0X00A9, 0X037A, 0X00AB, 0X00AC, 0X00AD, 0X0000, 0X2015, + 0X00B0, 0X00B1, 0X00B2, 0X00B3, 0X0384, 0X0385, 0X0386, 0X00B7, + 0X0388, 0X0389, 0X038A, 0X00BB, 0X038C, 0X00BD, 0X038E, 0X038F, + 0X0390, 0X0391, 0X0392, 0X0393, 0X0394, 0X0395, 0X0396, 0X0397, + 0X0398, 0X0399, 0X039A, 0X039B, 0X039C, 0X039D, 0X039E, 0X039F, + 0X03A0, 0X03A1, 0X0000, 0X03A3, 0X03A4, 0X03A5, 0X03A6, 0X03A7, + 0X03A8, 0X03A9, 0X03AA, 0X03AB, 0X03AC, 0X03AD, 0X03AE, 0X03AF, + 0X03B0, 0X03B1, 0X03B2, 0X03B3, 0X03B4, 0X03B5, 0X03B6, 0X03B7, + 0X03B8, 0X03B9, 0X03BA, 0X03BB, 0X03BC, 0X03BD, 0X03BE, 0X03BF, + 0X03C0, 0X03C1, 0X03C2, 0X03C3, 0X03C4, 0X03C5, 0X03C6, 0X03C7, + 0X03C8, 0X03C9, 0X03CA, 0X03CB, 0X03CC, 0X03CD, 0X03CE, 0X0000 +}; +DEF_SB_TBL(8859_7, "ISO-8859-7", "ISO-8859-7", iso8859_7_aliases, 0xA0, iso8859_7_ucs_table); + +static const char *iso8859_8_aliases[] = {"ISO8859-8", "hebrew", NULL}; +static const unsigned short iso8859_8_ucs_table[] = { + 0X00A0, 0X0000, 0X00A2, 0X00A3, 0X00A4, 0X00A5, 0X00A6, 0X00A7, + 0X00A8, 0X00A9, 0X00D7, 0X00AB, 0X00AC, 0X00AD, 0X00AE, 0X00AF, + 0X00B0, 0X00B1, 0X00B2, 0X00B3, 0X00B4, 0X00B5, 0X00B6, 0X00B7, + 0X00B8, 0X00B9, 0X00F7, 0X00BB, 0X00BC, 0X00BD, 0X00BE, 0X0000, + 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, + 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, + 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, + 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X0000, 0X2017, + 0X05D0, 0X05D1, 0X05D2, 0X05D3, 0X05D4, 0X05D5, 0X05D6, 0X05D7, + 0X05D8, 0X05D9, 0X05DA, 0X05DB, 0X05DC, 0X05DD, 0X05DE, 0X05DF, + 0X05E0, 0X05E1, 0X05E2, 0X05E3, 0X05E4, 0X05E5, 0X05E6, 0X05E7, + 0X05E8, 0X05E9, 0X05EA, 0X0000, 0X0000, 0X200E, 0X200F, 0X0000 +}; +DEF_SB_TBL(8859_8, "ISO-8859-8", "ISO-8859-8", iso8859_8_aliases, 0xA0, iso8859_8_ucs_table); + +static const char *iso8859_9_aliases[] = {"ISO8859-9", "latin5", NULL}; +static const unsigned short iso8859_9_ucs_table[] = { + 0X00A0, 0X00A1, 0X00A2, 0X00A3, 0X00A4, 0X00A5, 0X00A6, 0X00A7, + 0X00A8, 0X00A9, 0X00AA, 0X00AB, 0X00AC, 0X00AD, 0X00AE, 0X00AF, + 0X00B0, 0X00B1, 0X00B2, 0X00B3, 0X00B4, 0X00B5, 0X00B6, 0X00B7, + 0X00B8, 0X00B9, 0X00BA, 0X00BB, 0X00BC, 0X00BD, 0X00BE, 0X00BF, + 0X00C0, 0X00C1, 0X00C2, 0X00C3, 0X00C4, 0X00C5, 0X00C6, 0X00C7, + 0X00C8, 0X00C9, 0X00CA, 0X00CB, 0X00CC, 0X00CD, 0X00CE, 0X00CF, + 0X011E, 0X00D1, 0X00D2, 0X00D3, 0X00D4, 0X00D5, 0X00D6, 0X00D7, + 0X00D8, 0X00D9, 0X00DA, 0X00DB, 0X00DC, 0X0130, 0X015E, 0X00DF, + 0X00E0, 0X00E1, 0X00E2, 0X00E3, 0X00E4, 0X00E5, 0X00E6, 0X00E7, + 0X00E8, 0X00E9, 0X00EA, 0X00EB, 0X00EC, 0X00ED, 0X00EE, 0X00EF, + 0X011F, 0X00F1, 0X00F2, 0X00F3, 0X00F4, 0X00F5, 0X00F6, 0X00F7, + 0X00F8, 0X00F9, 0X00FA, 0X00FB, 0X00FC, 0X0131, 0X015F, 0X00FF +}; +DEF_SB_TBL(8859_9, "ISO-8859-9", "ISO-8859-9", iso8859_9_aliases, 0xA0, iso8859_9_ucs_table); + +static const char *iso8859_10_aliases[] = {"ISO8859-10", "latin6", NULL}; +static const unsigned short iso8859_10_ucs_table[] = { + 0X00A0, 0X0104, 0X0112, 0X0122, 0X012A, 0X0128, 0X0136, 0X00A7, + 0X013B, 0X0110, 0X0160, 0X0166, 0X017D, 0X00AD, 0X016A, 0X014A, + 0X00B0, 0X0105, 0X0113, 0X0123, 0X012B, 0X0129, 0X0137, 0X00B7, + 0X013C, 0X0111, 0X0161, 0X0167, 0X017E, 0X2015, 0X016B, 0X014B, + 0X0100, 0X00C1, 0X00C2, 0X00C3, 0X00C4, 0X00C5, 0X00C6, 0X012E, + 0X010C, 0X00C9, 0X0118, 0X00CB, 0X0116, 0X00CD, 0X00CE, 0X00CF, + 0X00D0, 0X0145, 0X014C, 0X00D3, 0X00D4, 0X00D5, 0X00D6, 0X0168, + 0X00D8, 0X0172, 0X00DA, 0X00DB, 0X00DC, 0X00DD, 0X00DE, 0X00DF, + 0X0101, 0X00E1, 0X00E2, 0X00E3, 0X00E4, 0X00E5, 0X00E6, 0X012F, + 0X010D, 0X00E9, 0X0119, 0X00EB, 0X0117, 0X00ED, 0X00EE, 0X00EF, + 0X00F0, 0X0146, 0X014D, 0X00F3, 0X00F4, 0X00F5, 0X00F6, 0X0169, + 0X00F8, 0X0173, 0X00FA, 0X00FB, 0X00FC, 0X00FD, 0X00FE, 0X0138 +}; +DEF_SB_TBL(8859_10, "ISO-8859-10", "ISO-8859-10", iso8859_10_aliases, 0xA0, iso8859_10_ucs_table); + +static const char *iso8859_13_aliases[] = {"ISO8859-13", NULL}; +static const unsigned short iso8859_13_ucs_table[] = { + 0X00A0, 0X201D, 0X00A2, 0X00A3, 0X00A4, 0X201E, 0X00A6, 0X00A7, + 0X00D8, 0X00A9, 0X0156, 0X00AB, 0X00AC, 0X00AD, 0X00AE, 0X00C6, + 0X00B0, 0X00B1, 0X00B2, 0X00B3, 0X201C, 0X00B5, 0X00B6, 0X00B7, + 0X00F8, 0X00B9, 0X0157, 0X00BB, 0X00BC, 0X00BD, 0X00BE, 0X00E6, + 0X0104, 0X012E, 0X0100, 0X0106, 0X00C4, 0X00C5, 0X0118, 0X0112, + 0X010C, 0X00C9, 0X0179, 0X0116, 0X0122, 0X0136, 0X012A, 0X013B, + 0X0160, 0X0143, 0X0145, 0X00D3, 0X014C, 0X00D5, 0X00D6, 0X00D7, + 0X0172, 0X0141, 0X015A, 0X016A, 0X00DC, 0X017B, 0X017D, 0X00DF, + 0X0105, 0X012F, 0X0101, 0X0107, 0X00E4, 0X00E5, 0X0119, 0X0113, + 0X010D, 0X00E9, 0X017A, 0X0117, 0X0123, 0X0137, 0X012B, 0X013C, + 0X0161, 0X0144, 0X0146, 0X00F3, 0X014D, 0X00F5, 0X00F6, 0X00F7, + 0X0173, 0X0142, 0X015B, 0X016B, 0X00FC, 0X017C, 0X017E, 0X2019 +}; +DEF_SB_TBL(8859_13, "ISO-8859-13", "ISO-8859-13", iso8859_13_aliases, 0xA0, iso8859_13_ucs_table); + +static const char *iso8859_14_aliases[] = {"ISO8859-14", "latin8", NULL}; +static const unsigned short iso8859_14_ucs_table[] = { + 0X00A0, 0X1E02, 0X1E03, 0X00A3, 0X010A, 0X010B, 0X1E0A, 0X00A7, + 0X1E80, 0X00A9, 0X1E82, 0X1E0B, 0X1EF2, 0X00AD, 0X00AE, 0X0178, + 0X1E1E, 0X1E1F, 0X0120, 0X0121, 0X1E40, 0X1E41, 0X00B6, 0X1E56, + 0X1E81, 0X1E57, 0X1E83, 0X1E60, 0X1EF3, 0X1E84, 0X1E85, 0X1E61, + 0X00C0, 0X00C1, 0X00C2, 0X00C3, 0X00C4, 0X00C5, 0X00C6, 0X00C7, + 0X00C8, 0X00C9, 0X00CA, 0X00CB, 0X00CC, 0X00CD, 0X00CE, 0X00CF, + 0X0174, 0X00D1, 0X00D2, 0X00D3, 0X00D4, 0X00D5, 0X00D6, 0X1E6A, + 0X00D8, 0X00D9, 0X00DA, 0X00DB, 0X00DC, 0X00DD, 0X0176, 0X00DF, + 0X00E0, 0X00E1, 0X00E2, 0X00E3, 0X00E4, 0X00E5, 0X00E6, 0X00E7, + 0X00E8, 0X00E9, 0X00EA, 0X00EB, 0X00EC, 0X00ED, 0X00EE, 0X00EF, + 0X0175, 0X00F1, 0X00F2, 0X00F3, 0X00F4, 0X00F5, 0X00F6, 0X1E6B, + 0X00F8, 0X00F9, 0X00FA, 0X00FB, 0X00FC, 0X00FD, 0X0177, 0X00FF +}; +DEF_SB_TBL(8859_14, "ISO-8859-14", "ISO-8859-14", iso8859_14_aliases, 0xA0, iso8859_14_ucs_table); + +static const char *iso8859_15_aliases[] = {"ISO8859-15", NULL}; +static const unsigned short iso8859_15_ucs_table[] = { + 0X00A0, 0X00A1, 0X00A2, 0X00A3, 0X20AC, 0X00A5, 0X0160, 0X00A7, + 0X0161, 0X00A9, 0X00AA, 0X00AB, 0X00AC, 0X00AD, 0X00AE, 0X00AF, + 0X00B0, 0X00B1, 0X00B2, 0X00B3, 0X017D, 0X00B5, 0X00B6, 0X00B7, + 0X017E, 0X00B9, 0X00BA, 0X00BB, 0X0152, 0X0153, 0X0178, 0X00BF, + 0X00C0, 0X00C1, 0X00C2, 0X00C3, 0X00C4, 0X00C5, 0X00C6, 0X00C7, + 0X00C8, 0X00C9, 0X00CA, 0X00CB, 0X00CC, 0X00CD, 0X00CE, 0X00CF, + 0X00D0, 0X00D1, 0X00D2, 0X00D3, 0X00D4, 0X00D5, 0X00D6, 0X00D7, + 0X00D8, 0X00D9, 0X00DA, 0X00DB, 0X00DC, 0X00DD, 0X00DE, 0X00DF, + 0X00E0, 0X00E1, 0X00E2, 0X00E3, 0X00E4, 0X00E5, 0X00E6, 0X00E7, + 0X00E8, 0X00E9, 0X00EA, 0X00EB, 0X00EC, 0X00ED, 0X00EE, 0X00EF, + 0X00F0, 0X00F1, 0X00F2, 0X00F3, 0X00F4, 0X00F5, 0X00F6, 0X00F7, + 0X00F8, 0X00F9, 0X00FA, 0X00FB, 0X00FC, 0X00FD, 0X00FE, 0X00FF +}; +DEF_SB_TBL(8859_15, "ISO-8859-15", "ISO-8859-15", iso8859_15_aliases, 0xA0, iso8859_15_ucs_table); + +static const char *iso8859_16_aliases[] = {"ISO8859-16", NULL}; +static const unsigned short iso8859_16_ucs_table[] = { + 0X00A0, 0X0104, 0X0105, 0X0141, 0X20AC, 0X201E, 0X0160, 0X00A7, + 0X0161, 0X00A9, 0X0218, 0X00AB, 0X0179, 0X00AD, 0X017A, 0X017B, + 0X00B0, 0X00B1, 0X010C, 0X0142, 0X017D, 0X201D, 0X00B6, 0X00B7, + 0X017E, 0X010D, 0X0219, 0X00BB, 0X0152, 0X0153, 0X0178, 0X017C, + 0X00C0, 0X00C1, 0X00C2, 0X0102, 0X00C4, 0X0106, 0X00C6, 0X00C7, + 0X00C8, 0X00C9, 0X00CA, 0X00CB, 0X00CC, 0X00CD, 0X00CE, 0X00CF, + 0X0110, 0X0143, 0X00D2, 0X00D3, 0X00D4, 0X0150, 0X00D6, 0X015A, + 0X0170, 0X00D9, 0X00DA, 0X00DB, 0X00DC, 0X0118, 0X021A, 0X00DF, + 0X00E0, 0X00E1, 0X00E2, 0X0103, 0X00E4, 0X0107, 0X00E6, 0X00E7, + 0X00E8, 0X00E9, 0X00EA, 0X00EB, 0X00EC, 0X00ED, 0X00EE, 0X00EF, + 0X0111, 0X0144, 0X00F2, 0X00F3, 0X00F4, 0X0151, 0X00F6, 0X015B, + 0X0171, 0X00F9, 0X00FA, 0X00FB, 0X00FC, 0X0119, 0X021B, 0X00FF +}; +DEF_SB_TBL(8859_16, "ISO-8859-16", "ISO-8859-16", iso8859_16_aliases, 0xA0, iso8859_16_ucs_table); + +static const char *cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL}; +static const unsigned short cp1251_ucs_table[] = { + 0X0402, 0X0403, 0X201A, 0X0453, 0X201E, 0X2026, 0X2020, 0X2021, + 0X20AC, 0X2030, 0X0409, 0X2039, 0X040A, 0X040C, 0X040B, 0X040F, + 0X0452, 0X2018, 0X2019, 0X201C, 0X201D, 0X2022, 0X2013, 0X2014, + 0X0000, 0X2122, 0X0459, 0X203A, 0X045A, 0X045C, 0X045B, 0X045F, + 0X00A0, 0X040E, 0X045E, 0X0408, 0X00A4, 0X0490, 0X00A6, 0X00A7, + 0X0401, 0X00A9, 0X0404, 0X00AB, 0X00AC, 0X00AD, 0X00AE, 0X0407, + 0X00B0, 0X00B1, 0X0406, 0X0456, 0X0491, 0X00B5, 0X00B6, 0X00B7, + 0X0451, 0X2116, 0X0454, 0X00BB, 0X0458, 0X0405, 0X0455, 0X0457, + 0X0410, 0X0411, 0X0412, 0X0413, 0X0414, 0X0415, 0X0416, 0X0417, + 0X0418, 0X0419, 0X041A, 0X041B, 0X041C, 0X041D, 0X041E, 0X041F, + 0X0420, 0X0421, 0X0422, 0X0423, 0X0424, 0X0425, 0X0426, 0X0427, + 0X0428, 0X0429, 0X042A, 0X042B, 0X042C, 0X042D, 0X042E, 0X042F, + 0X0430, 0X0431, 0X0432, 0X0433, 0X0434, 0X0435, 0X0436, 0X0437, + 0X0438, 0X0439, 0X043A, 0X043B, 0X043C, 0X043D, 0X043E, 0X043F, + 0X0440, 0X0441, 0X0442, 0X0443, 0X0444, 0X0445, 0X0446, 0X0447, + 0X0448, 0X0449, 0X044A, 0X044B, 0X044C, 0X044D, 0X044E, 0X044F +}; +DEF_SB_TBL(cp1251, "Windows-1251", "Windows-1251", cp1251_aliases, 0x80, cp1251_ucs_table); + +static const char *cp1252_aliases[] = {"cp1252", NULL}; +static const unsigned short cp1252_ucs_table[] = { + 0X20AC,0X0000,0X201A,0X0192,0X201E,0X2026,0X2020,0X2021, + 0X02C6,0X2030,0X0160,0X2039,0X0152,0X0000,0X017D,0X0000, + 0X0000,0X2018,0X2019,0X201C,0X201D,0X2022,0X2013,0X2014, + 0X02DC,0X2122,0X0161,0X203A,0X0153,0X0000,0X017E,0X0178 +}; +DEF_SB(cp1252, "Windows-1252", "Windows-1252", cp1252_aliases); + +static int mbfl_filt_conv_wchar_cp1252(int c, mbfl_convert_filter *filter) +{ + if (c >= 0x100) { + for (int n = 0; n < 32; n++) { + if (c == cp1252_ucs_table[n]) { + CK((*filter->output_function)(0x80 + n, filter->data)); + return c; + } + } + CK(mbfl_filt_conv_illegal_output(c, filter)); + } else if (c <= 0x7F || c >= 0xA0) { + CK((*filter->output_function)(c, filter->data)); + } else { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + return c; +} + +static int mbfl_filt_conv_cp1252_wchar(int c, mbfl_convert_filter *filter) +{ + int s; + + if (c >= 0x80 && c < 0xA0) { + s = cp1252_ucs_table[c - 0x80]; + if (!s) { + s = c | MBFL_WCSGROUP_THROUGH; + } + } else { + s = c; + } + + CK((*filter->output_function)(s, filter->data)); + return c; +} + +static const char *cp1254_aliases[] = {"CP1254", "CP-1254", "WINDOWS-1254", NULL}; +static const unsigned short cp1254_ucs_table[] = { + 0X20AC, 0X0000, 0X201A, 0X0192, 0X201E, 0X2026, 0X2020, 0X2021, + 0X02C6, 0X2030, 0X0160, 0X2039, 0X0152, 0X0000, 0X0000, 0X0000, + 0X0000, 0X2018, 0X2019, 0X201C, 0X201D, 0X2022, 0X2013, 0X2014, + 0X02DC, 0X2122, 0X0161, 0X203A, 0X0153, 0X0000, 0X0000, 0X0178, + 0X00A0, 0X00A1, 0X00A2, 0X00A3, 0X00A4, 0X00A5, 0X00A6, 0X00A7, + 0X00A8, 0X00A9, 0X00AA, 0X00AB, 0X00AC, 0X00AD, 0X00AE, 0X00AF, + 0X00B0, 0X00B1, 0X00B2, 0X00B3, 0X00B4, 0X00B5, 0X00B6, 0X00B7, + 0X00B8, 0X00B9, 0X00BA, 0X00BB, 0X00BC, 0X00BD, 0X00BE, 0X00BF, + 0X00C0, 0X00C1, 0X00C2, 0X00C3, 0X00C4, 0X00C5, 0X00C6, 0X00C7, + 0X00C8, 0X00C9, 0X00CA, 0X00CB, 0X00CC, 0X00CD, 0X00CE, 0X00CF, + 0X011E, 0X00D1, 0X00D2, 0X00D3, 0X00D4, 0X00D5, 0X00D6, 0X00D7, + 0X00D8, 0X00D9, 0X00DA, 0X00DB, 0X00DC, 0X0130, 0X015E, 0X00DF, + 0X00E0, 0X00E1, 0X00E2, 0X00E3, 0X00E4, 0X00E5, 0X00E6, 0X00E7, + 0X00E8, 0X00E9, 0X00EA, 0X00EB, 0X00EC, 0X00ED, 0X00EE, 0X00EF, + 0X011F, 0X00F1, 0X00F2, 0X00F3, 0X00F4, 0X00F5, 0X00F6, 0X00F7, + 0X00F8, 0X00F9, 0X00FA, 0X00FB, 0X00FC, 0X0131, 0X015F, 0X00FF +}; +DEF_SB_TBL(cp1254, "Windows-1254", "Windows-1254", cp1254_aliases, 0x80, cp1254_ucs_table); + +static const char *cp866_aliases[] = {"CP-866", "IBM866", "IBM-866", NULL}; +static const unsigned short cp866_ucs_table[] = { + 0X0410, 0X0411, 0X0412, 0X0413, 0X0414, 0X0415, 0X0416, 0X0417, + 0X0418, 0X0419, 0X041A, 0X041B, 0X041C, 0X041D, 0X041E, 0X041F, + 0X0420, 0X0421, 0X0422, 0X0423, 0X0424, 0X0425, 0X0426, 0X0427, + 0X0428, 0X0429, 0X042A, 0X042B, 0X042C, 0X042D, 0X042E, 0X042F, + 0X0430, 0X0431, 0X0432, 0X0433, 0X0434, 0X0435, 0X0436, 0X0437, + 0X0438, 0X0439, 0X043A, 0X043B, 0X043C, 0X043D, 0X043E, 0X043F, + 0X2591, 0X2592, 0X2593, 0X2502, 0X2524, 0X2561, 0X2562, 0X2556, + 0X2555, 0X2563, 0X2551, 0X2557, 0X255D, 0X255C, 0X255B, 0X2510, + 0X2514, 0X2534, 0X252C, 0X251C, 0X2500, 0X253C, 0X255E, 0X255F, + 0X255A, 0X2554, 0X2569, 0X2566, 0X2560, 0X2550, 0X256C, 0X2567, + 0X2568, 0X2564, 0X2565, 0X2559, 0X2558, 0X2552, 0X2553, 0X256B, + 0X256A, 0X2518, 0X250C, 0X2588, 0X2584, 0X258C, 0X2590, 0X2580, + 0X0440, 0X0441, 0X0442, 0X0443, 0X0444, 0X0445, 0X0446, 0X0447, + 0X0448, 0X0449, 0X044A, 0X044B, 0X044C, 0X044D, 0X044E, 0X044F, + 0X0401, 0X0451, 0X0404, 0X0454, 0X0407, 0X0457, 0X040E, 0X045E, + 0X00B0, 0X2219, 0X00B7, 0X221A, 0X2116, 0X00A4, 0X25A0, 0X00A0 +}; +DEF_SB_TBL(cp866, "CP866", "CP866", cp866_aliases, 0x80, cp866_ucs_table); + +static const char *cp850_aliases[] = {"CP-850", "IBM850", "IBM-850", NULL}; +static const unsigned short cp850_ucs_table[] = { + 0X00C7, 0X00FC, 0X00E9, 0X00E2, 0X00E4, 0X00E0, 0X00E5, 0X00E7, + 0X00EA, 0X00EB, 0X00E8, 0X00EF, 0X00EE, 0X00EC, 0X00C4, 0X00C5, + 0X00C9, 0X00E6, 0X00C6, 0X00F4, 0X00F6, 0X00F2, 0X00FB, 0X00F9, + 0X00FF, 0X00D6, 0X00DC, 0X00F8, 0X00A3, 0X00D8, 0X00D7, 0X0192, + 0X00E1, 0X00ED, 0X00F3, 0X00FA, 0X00F1, 0X00D1, 0X00AA, 0X00BA, + 0X00BF, 0X00AE, 0X00AC, 0X00BD, 0X00BC, 0X00A1, 0X00AB, 0X00BB, + 0X2591, 0X2592, 0X2593, 0X2502, 0X2524, 0X00C1, 0X00C2, 0X00C0, + 0X00A9, 0X2563, 0X2551, 0X2557, 0X255D, 0X00A2, 0X00A5, 0X2510, + 0X2514, 0X2534, 0X252C, 0X251C, 0X2500, 0X253C, 0X00E3, 0X00C3, + 0X255A, 0X2554, 0X2569, 0X2566, 0X2560, 0X2550, 0X256C, 0X00A4, + 0X00F0, 0X00D0, 0X00CA, 0X00CB, 0X00C8, 0X0131, 0X00CD, 0X00CE, + 0X00CF, 0X2518, 0X250C, 0X2588, 0X2584, 0X00A6, 0X00CC, 0X2580, + 0X00D3, 0X00DF, 0X00D4, 0X00D2, 0X00F5, 0X00D5, 0X00B5, 0X00FE, + 0X00DE, 0X00DA, 0X00DB, 0X00D9, 0X00FD, 0X00DD, 0X00AF, 0X00B4, + 0X00AD, 0X00B1, 0X2017, 0X00BE, 0X00B6, 0X00A7, 0X00F7, 0X00B8, + 0X00B0, 0X00A8, 0X00B7, 0X00B9, 0X00B3, 0X00B2, 0X25A0, 0X00A0 +}; +DEF_SB_TBL(cp850, "CP850", "CP850", cp850_aliases, 0x80, cp850_ucs_table); + +static const char *koi8r_aliases[] = {"KOI8R", NULL}; +static const unsigned short koi8r_ucs_table[] = { + 0X2500, 0X2502, 0X250C, 0X2510, 0X2514, 0X2518, 0X251C, 0X2524, + 0X252C, 0X2534, 0X253C, 0X2580, 0X2584, 0X2588, 0X258C, 0X2590, + 0X2591, 0X2592, 0X2593, 0X2320, 0X25A0, 0X2219, 0X221A, 0X2248, + 0X2264, 0X2265, 0X00A0, 0X2321, 0X00B0, 0X00B2, 0X00B7, 0X00F7, + 0X2550, 0X2551, 0X2552, 0X0451, 0X2553, 0X2554, 0X2555, 0X2556, + 0X2557, 0X2558, 0X2559, 0X255A, 0X255B, 0X255C, 0X255D, 0X255E, + 0X255F, 0X2560, 0X2561, 0X0401, 0X2562, 0X2563, 0X2564, 0X2565, + 0X2566, 0X2567, 0X2568, 0X2569, 0X256A, 0X256B, 0X256C, 0X00A9, + 0X044E, 0X0430, 0X0431, 0X0446, 0X0434, 0X0435, 0X0444, 0X0433, + 0X0445, 0X0438, 0X0439, 0X043A, 0X043B, 0X043C, 0X043D, 0X043E, + 0X043F, 0X044F, 0X0440, 0X0441, 0X0442, 0X0443, 0X0436, 0X0432, + 0X044C, 0X044B, 0X0437, 0X0448, 0X044D, 0X0449, 0X0447, 0X044A, + 0X042E, 0X0410, 0X0411, 0X0426, 0X0414, 0X0415, 0X0424, 0X0413, + 0X0425, 0X0418, 0X0419, 0X041A, 0X041B, 0X041C, 0X041D, 0X041E, + 0X041F, 0X042F, 0X0420, 0X0421, 0X0422, 0X0423, 0X0416, 0X0412, + 0X042C, 0X042B, 0X0417, 0X0428, 0X042D, 0X0429, 0X0427, 0X042A +}; +DEF_SB_TBL(koi8r, "KOI8-R", "KOI8-R", koi8r_aliases, 0x80, koi8r_ucs_table); + +static const char *koi8u_aliases[] = {"KOI8U", NULL}; +static const unsigned short koi8u_ucs_table[] = { + 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, + 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, + 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, + 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, + 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, + 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x0491, 0x255D, 0x255E, + 0x255F, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407, + 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x0490, 0x256C, 0x00A9, + 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, + 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, + 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, + 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, + 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, + 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, + 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, + 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A +}; +DEF_SB_TBL(koi8u, "KOI8-U", "KOI8-U", koi8u_aliases, 0x80, koi8u_ucs_table); + +static const char *armscii8_aliases[] = {"ArmSCII8", "ARMSCII-8", "ARMSCII8", NULL}; +static const unsigned short armscii8_ucs_table[] = { + 0X00A0, 0X0000, 0X0587, 0X0589, 0X0029, 0X0028, 0X00BB, 0X00AB, + 0X2014, 0X002E, 0X055D, 0X002C, 0X002D, 0X058A, 0X2026, 0X055C, + 0X055B, 0X055E, 0X0531, 0X0561, 0X0532, 0X0562, 0X0533, 0X0563, + 0X0534, 0X0564, 0X0535, 0X0565, 0X0536, 0X0566, 0X0537, 0X0567, + 0X0538, 0X0568, 0X0539, 0X0569, 0X053A, 0X056A, 0X053B, 0X056B, + 0X053C, 0X056C, 0X053D, 0X056D, 0X053E, 0X056E, 0X053F, 0X056F, + 0X0540, 0X0570, 0X0541, 0X0571, 0X0542, 0X0572, 0X0543, 0X0573, + 0X0544, 0X0574, 0X0545, 0X0575, 0X0546, 0X0576, 0X0547, 0X0577, + 0X0548, 0X0578, 0X0549, 0X0579, 0X054A, 0X057A, 0X054B, 0X057B, + 0X054C, 0X057C, 0X054D, 0X057D, 0X054E, 0X057E, 0X054F, 0X057F, + 0X0550, 0X0580, 0X0551, 0X0581, 0X0552, 0X0582, 0X0553, 0X0583, + 0X0554, 0X0584, 0X0555, 0X0585, 0X0556, 0X0586, 0X055A, 0X0000 +}; +static const unsigned char ucs_armscii8_table[] = { + 0XA5, 0XA4, 0X2A, 0X2B, 0XAB, 0XAC, 0XA9, 0X2F +}; +DEF_SB(armscii8, "ArmSCII-8", "ArmSCII-8", armscii8_aliases); + +int mbfl_filt_conv_armscii8_wchar(int c, mbfl_convert_filter *filter) +{ + int s; + + if (c < 0xA0) { + s = c; + } else { + s = armscii8_ucs_table[c - 0xA0]; + if (!s) { + s = c | MBFL_WCSGROUP_THROUGH; + } + } + + CK((*filter->output_function)(s, filter->data)); + return c; +} + +int mbfl_filt_conv_wchar_armscii8(int c, mbfl_convert_filter *filter) +{ + if (c >= 0x28 && c <= 0x2F) { + CK((*filter->output_function)(ucs_armscii8_table[c - 0x28], filter->data)); + } else if (c < 0xA0) { + CK((*filter->output_function)(c, filter->data)); + } else { + for (int n = 0; n < 0x60; n++) { + if (c == armscii8_ucs_table[n]) { + CK((*filter->output_function)(0xA0 + n, filter->data)); + return c; + } + } + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + return c; +} diff --git a/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.h b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.h new file mode 100644 index 0000000000..ca7c6f806c --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_singlebyte.h @@ -0,0 +1,44 @@ +/* + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ +*/ + +#ifndef MBFL_SINGLEBYTE_H +#define MBFL_SINGLEBYTE_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_ascii; +extern const mbfl_encoding mbfl_encoding_8859_1; +extern const mbfl_encoding mbfl_encoding_8859_2; +extern const mbfl_encoding mbfl_encoding_8859_3; +extern const mbfl_encoding mbfl_encoding_8859_4; +extern const mbfl_encoding mbfl_encoding_8859_5; +extern const mbfl_encoding mbfl_encoding_8859_6; +extern const mbfl_encoding mbfl_encoding_8859_7; +extern const mbfl_encoding mbfl_encoding_8859_8; +extern const mbfl_encoding mbfl_encoding_8859_9; +extern const mbfl_encoding mbfl_encoding_8859_10; +extern const mbfl_encoding mbfl_encoding_8859_13; +extern const mbfl_encoding mbfl_encoding_8859_14; +extern const mbfl_encoding mbfl_encoding_8859_15; +extern const mbfl_encoding mbfl_encoding_8859_16; +extern const mbfl_encoding mbfl_encoding_cp1251; +extern const mbfl_encoding mbfl_encoding_cp1252; +extern const mbfl_encoding mbfl_encoding_cp1254; +extern const mbfl_encoding mbfl_encoding_cp866; +extern const mbfl_encoding mbfl_encoding_cp850; +extern const mbfl_encoding mbfl_encoding_koi8r; +extern const mbfl_encoding mbfl_encoding_koi8u; +extern const mbfl_encoding mbfl_encoding_armscii8; + +#endif /* MBFL_SINGLEBYTE_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_armscii8.h b/ext/mbstring/libmbfl/filters/unicode_table_armscii8.h deleted file mode 100644 index 6630148f25..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_armscii8.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this file: Hayk Chamyan <hamshen@gmail.com> - * - */ - -#ifndef UNICODE_TABLE_ARMSCII8_H -#define UNICODE_TABLE_ARMSCII8_H - -/* ArmSCII-8 to Unicode table */ -static const unsigned short armscii8_ucs_table[] = { -0x00a0, 0x0000, 0x0587, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab, -0x2014, 0x002e, 0x055d, 0x002c, 0x002d, 0x058a, 0x2026, 0x055c, -0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563, -0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567, -0x0538, 0x0568, 0x0539, 0x0569, 0x053a, 0x056a, 0x053b, 0x056b, -0x053c, 0x056c, 0x053d, 0x056d, 0x053e, 0x056e, 0x053f, 0x056f, -0x0540, 0x0570, 0x0541, 0x0571, 0x0542, 0x0572, 0x0543, 0x0573, -0x0544, 0x0574, 0x0545, 0x0575, 0x0546, 0x0576, 0x0547, 0x0577, -0x0548, 0x0578, 0x0549, 0x0579, 0x054a, 0x057a, 0x054b, 0x057b, -0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f, -0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583, -0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x055a, 0x0000 -}; - -static const unsigned char ucs_armscii8_table[] = { -0xa5, 0xa4, 0x2a, 0x2b, 0xab, 0xac, 0xa9, 0x2f -}; - -static const int armscii8_ucs_table_min = 0xa0; -static const int armscii8_ucs_table_len = (sizeof (armscii8_ucs_table) / sizeof (unsigned short)); -static const int armscii8_ucs_table_max = 0xa0 + (sizeof (armscii8_ucs_table) / sizeof (unsigned short)); - -#endif /* UNICODE_TABLE_ARMSCII8_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_cp1251.h b/ext/mbstring/libmbfl/filters/unicode_table_cp1251.h deleted file mode 100644 index 662552ab3b..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_cp1251.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The authors of this file: PHP3 internationalization team - * You can contact the primary author 金本 茂 <sgk@happysize.co.jp>. - * - */ - -#ifndef UNICODE_TABLE_CP1251_H - -/* cp1251 to Unicode table */ -static const unsigned short cp1251_ucs_table[] = { - 0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, - 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f, - 0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0000, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f, - 0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, - 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407, - 0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, - 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f -}; -static const int cp1251_ucs_table_min = 0x80; -static const int cp1251_ucs_table_len = (sizeof (cp1251_ucs_table) / sizeof (unsigned short)); -static const int cp1251_ucs_table_max = 0x80 + (sizeof (cp1251_ucs_table) / sizeof (unsigned short)); - -#endif /* UNICODE_TABLE_CP1251_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_cp1254.h b/ext/mbstring/libmbfl/filters/unicode_table_cp1254.h deleted file mode 100644 index 1e70af33a2..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_cp1254.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The authors of this file: PHP3 internationalization team - * You can contact the primary author 金本 茂 <sgk@happysize.co.jp>. - * - */ - -#ifndef UNICODE_TABLE_CP1254_H - -/* cp1254 to Unicode table */ -static const unsigned short cp1254_ucs_table[] = { - 0x20ac, 0x0000, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000, - 0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x0000, 0x0000, 0x0178, - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff -}; -static const int cp1254_ucs_table_min = 0x80; -static const int cp1254_ucs_table_len = (sizeof (cp1254_ucs_table) / sizeof (unsigned short)); -static const int cp1254_ucs_table_max = 0x80 + (sizeof (cp1254_ucs_table) / sizeof (unsigned short)); - -#endif /* UNICODE_TABLE_CP1254_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_cp850.h b/ext/mbstring/libmbfl/filters/unicode_table_cp850.h deleted file mode 100644 index 57fb61dbc9..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_cp850.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Den V. Tsopa <tdv@edisoft.ru> - * Adaption for CP850: D. Giffeler <dg@artegic.de> - * - */ - -#ifndef UNICODE_TABLE_CP850_H -#define UNICODE_TABLE_CP850_H - -/* cp850_DOS to Unicode table */ -static const unsigned short cp850_ucs_table[] = { - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7 -, 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5 -, 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9 -, 0x00ff, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x0192 -, 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba -, 0x00bf, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb -, 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x00c0 -, 0x00a9, 0x2563, 0x2551, 0x2557, 0x255d, 0x00a2, 0x00a5, 0x2510 -, 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x00e3, 0x00c3 -, 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4 -, 0x00f0, 0x00d0, 0x00ca, 0x00cb, 0x00c8, 0x0131, 0x00cd, 0x00ce -, 0x00cf, 0x2518, 0x250c, 0x2588, 0x2584, 0x00a6, 0x00cc, 0x2580 -, 0x00d3, 0x00df, 0x00d4, 0x00d2, 0x00f5, 0x00d5, 0x00b5, 0x00fe -, 0x00de, 0x00da, 0x00db, 0x00d9, 0x00fd, 0x00dd, 0x00af, 0x00b4 -, 0x00ad, 0x00b1, 0x2017, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8 -, 0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0 -}; -static const int cp850_ucs_table_min = 0x80; -static const int cp850_ucs_table_len = (sizeof (cp850_ucs_table) / sizeof (unsigned short)); -static const int cp850_ucs_table_max = 0x80 + (sizeof (cp850_ucs_table) / sizeof (unsigned short)); - -#endif /* UNICODE_TABLE_CP850_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_cp866.h b/ext/mbstring/libmbfl/filters/unicode_table_cp866.h deleted file mode 100644 index 468e1a77c2..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_cp866.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The original author of this file: Den V. Tsopa <tdv@edisoft.ru> - * - */ - -#ifndef UNICODE_TABLE_CP866_H -#define UNICODE_TABLE_CP866_H - -/* cp866_DOSCyrillicRussian to Unicode table */ -static const unsigned short cp866_ucs_table[] = { - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0 -}; -static const int cp866_ucs_table_min = 0x80; -static const int cp866_ucs_table_len = (sizeof (cp866_ucs_table) / sizeof (unsigned short)); -static const int cp866_ucs_table_max = 0x80 + (sizeof (cp866_ucs_table) / sizeof (unsigned short)); - -#endif /* UNICODE_TABLE_CP866_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h deleted file mode 100644 index 2b6b78f32b..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_10_H -static const int iso8859_10_ucs_table[] = { - 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7, - 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a, - 0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7, - 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b, - 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, - 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf, - 0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168, - 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, - 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, - 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138 -}; -#endif /* UNICODE_TABLE_ISO8859_10_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_13.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_13.h deleted file mode 100644 index 5822396525..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_13.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_13_H -static const int iso8859_13_ucs_table[] = { - 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, - 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, - 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, - 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, - 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, - 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, - 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, - 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, - 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, - 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, - 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019 -}; -#endif /* UNICODE_TABLE_ISO8859_13_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_14.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_14.h deleted file mode 100644 index 6bd03b367a..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_14.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_14_H -static const int iso8859_14_ucs_table[] = { - 0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, - 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178, - 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56, - 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff -}; -#endif /* UNICODE_TABLE_ISO8859_14_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_15.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_15.h deleted file mode 100644 index 029a2bcfc4..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_15.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_15_H -static const int iso8859_15_ucs_table[] = { - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, - 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, - 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff -}; -#endif /* UNICODE_TABLE_ISO8859_15_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_16.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_16.h deleted file mode 100644 index 555472d0dc..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_16.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLEISO8859_16_H -static const int iso8859_16_ucs_table[] = { - 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, - 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b, - 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, - 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, - 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a, - 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, - 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff -}; -#endif /* UNICODE_TABLEISO8859_16_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h deleted file mode 100644 index 12bb3cb2dc..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_2_H -static const int iso8859_2_ucs_table[] = { - 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, - 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b, - 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, - 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, - 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, - 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, - 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, - 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, - 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, - 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, - 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, - 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 -}; -#endif /* UNICODE_TABLE_ISO8859_2_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_3.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_3.h deleted file mode 100644 index f50c348aff..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_3.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_3_H -static const int iso8859_3_ucs_table[] = { - 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7, - 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b, - 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, - 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0x0000, 0x017c, - 0x00c0, 0x00c1, 0x00c2, 0x0000, 0x00c4, 0x010a, 0x0108, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x0000, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, - 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x0000, 0x00e4, 0x010b, 0x0109, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x0000, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, - 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9 -}; -#endif /* UNICODE_TABLE_ISO8859_3_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_4.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_4.h deleted file mode 100644 index ff7ecdb4c0..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_4.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_4_H -static const int iso8859_4_ucs_table[] = { - 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, - 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af, - 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, - 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b, - 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, - 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a, - 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df, - 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, - 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b, - 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9 -}; -#endif /* UNICODE_TABLE_ISO8859_4_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_5.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_5.h deleted file mode 100644 index 411ab84b60..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_5.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_5_H -static const int iso8859_5_ucs_table[] = { - 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, - 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f -}; -#endif /* UNICODE_TABLE_ISO8859_5_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_6.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_6.h deleted file mode 100644 index 0b3952e3a0..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_6.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_6_H -static const int iso8859_6_ucs_table[] = { - 0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, - 0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, - 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, - 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, - 0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, - 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, - 0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; -#endif /* UNICODE_TABLE_ISO8859_6_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_7.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_7.h deleted file mode 100644 index 687f4cbc74..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_7.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_7_H -static const int iso8859_7_ucs_table[] = { - 0x00a0, 0x2018, 0x2019, 0x00a3, 0x20ac, 0x20af, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7, - 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f, - 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, - 0x03a0, 0x03a1, 0x0000, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, - 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, - 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, - 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000 -}; -#endif /* UNICODE_TABLE_ISO8859_7_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_8.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_8.h deleted file mode 100644 index 4ec6490bae..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_8.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_8_H -static const int iso8859_8_ucs_table[] = { - 0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017, - 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, - 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, - 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, - 0x05e8, 0x05e9, 0x05ea, 0x0000, 0x0000, 0x200e, 0x200f, 0x0000 -}; -#endif /* UNICODE_TABLE_ISO8859_8_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_9.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_9.h deleted file mode 100644 index 12f988ad7a..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_9.h +++ /dev/null @@ -1,17 +0,0 @@ -/* This file is automatically generated. Do not edit! */ -#ifndef UNICODE_TABLE_ISO8859_9_H -static const int iso8859_9_ucs_table[] = { - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff -}; -#endif /* UNICODE_TABLE_ISO8859_9_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_koi8r.h b/ext/mbstring/libmbfl/filters/unicode_table_koi8r.h deleted file mode 100644 index fc850e5685..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_koi8r.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The original author of this file: Den V. Tsopa <tdv@edisoft.ru> - * - */ - -#ifndef UNICODE_TABLE_KOI8R_H -#define UNICODE_TABLE_KOI8R_H - -/* KOI8-R (RFC1489) to Unicode */ -static const unsigned short koi8r_ucs_table[] = { - 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, - 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, - 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, - 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, - 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, - 0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9, - 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, - 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, - 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, - 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, - 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, - 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, - 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, - 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a -}; -static const int koi8r_ucs_table_min = 0x80; -static const int koi8r_ucs_table_len = (sizeof (koi8r_ucs_table) / sizeof (unsigned short)); -static const int koi8r_ucs_table_max = 0x80 + (sizeof (koi8r_ucs_table) / sizeof (unsigned short)); - - - -#endif /* UNNICODE_TABLE_KOI8R_H */ diff --git a/ext/mbstring/libmbfl/filters/unicode_table_koi8u.h b/ext/mbstring/libmbfl/filters/unicode_table_koi8u.h deleted file mode 100644 index e59c685fe8..0000000000 --- a/ext/mbstring/libmbfl/filters/unicode_table_koi8u.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * "streamable kanji code filter and converter" - * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. - * - * LICENSE NOTICES - * - * This file is part of "streamable kanji code filter and converter", - * which is distributed under the terms of GNU Lesser General Public - * License (version 2) as published by the Free Software Foundation. - * - * This software 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with "streamable kanji code filter and converter"; - * if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - * The author of this part: Maksym Veremeyenko <verem@m1.tv> - * - */ - -#ifndef UNICODE_TABLE_KOI8U_H -#define UNICODE_TABLE_KOI8U_H - -/* KOI8-U (RFC2319) to Unicode */ -static const unsigned short koi8u_ucs_table[] = { - 0x2500, /* BOX DRAWINGS LIGHT HORIZONTAL */ - 0x2502, /* BOX DRAWINGS LIGHT VERTICAL */ - 0x250C, /* BOX DRAWINGS LIGHT DOWN AND RIGHT */ - 0x2510, /* BOX DRAWINGS LIGHT DOWN AND LEFT */ - 0x2514, /* BOX DRAWINGS LIGHT UP AND RIGHT */ - 0x2518, /* BOX DRAWINGS LIGHT UP AND LEFT */ - 0x251C, /* BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ - 0x2524, /* BOX DRAWINGS LIGHT VERTICAL AND LEFT */ - 0x252C, /* BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ - 0x2534, /* BOX DRAWINGS LIGHT UP AND HORIZONTAL */ - 0x253C, /* BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ - 0x2580, /* UPPER HALF BLOCK */ - 0x2584, /* LOWER HALF BLOCK */ - 0x2588, /* FULL BLOCK */ - 0x258C, /* LEFT HALF BLOCK */ - 0x2590, /* RIGHT HALF BLOCK */ - 0x2591, /* LIGHT SHADE */ - 0x2592, /* MEDIUM SHADE */ - 0x2593, /* DARK SHADE */ - 0x2320, /* TOP HALF INTEGRAL */ - 0x25A0, /* BLACK SQUARE */ - 0x2219, /* BULLET OPERATOR */ - 0x221A, /* SQUARE ROOT */ - 0x2248, /* ALMOST EQUAL TO */ - 0x2264, /* LESS THAN OR EQUAL TO */ - 0x2265, /* GREATER THAN OR EQUAL TO */ - 0x00A0, /* NO-BREAK SPACE */ - 0x2321, /* BOTTOM HALF INTEGRAL */ - 0x00B0, /* DEGREE SIGN */ - 0x00B2, /* SUPERSCRIPT TWO */ - 0x00B7, /* MIDDLE DOT */ - 0x00F7, /* DIVISION SIGN */ - 0x2550, /* BOX DRAWINGS DOUBLE HORIZONTAL */ - 0x2551, /* BOX DRAWINGS DOUBLE VERTICAL */ - 0x2552, /* BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE */ - 0x0451, /* CYRILLIC SMALL LETTER IO */ - 0x0454, /* CYRILLIC SMALL LETTER UKRAINIAN IE */ - 0x2554, /* BOX DRAWINGS DOUBLE DOWN AND RIGHT */ - 0x0456, /* CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ - 0x0457, /* CYRILLIC SMALL LETTER YI (UKRAINIAN) */ - 0x2557, /* BOX DRAWINGS DOUBLE DOWN AND LEFT */ - 0x2558, /* BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE */ - 0x2559, /* BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE */ - 0x255A, /* BOX DRAWINGS DOUBLE UP AND RIGHT */ - 0x255B, /* BOX DRAWINGS UP SINGLE AND LEFT DOUBLE */ - 0x0491, /* CYRILLIC SMALL LETTER GHE WITH UPTURN */ - 0x255D, /* BOX DRAWINGS DOUBLE UP AND LEFT */ - 0x255E, /* BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE */ - 0x255F, /* BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE */ - 0x2560, /* BOX DRAWINGS DOUBLE VERTICAL AND RIGHT */ - 0x2561, /* BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE */ - 0x0401, /* CYRILLIC CAPITAL LETTER IO */ - 0x0404, /* CYRILLIC CAPITAL LETTER UKRAINIAN IE */ - 0x2563, /* BOX DRAWINGS DOUBLE VERTICAL AND LEFT */ - 0x0406, /* CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ - 0x0407, /* CYRILLIC CAPITAL LETTER YI (UKRAINIAN) */ - 0x2566, /* BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL */ - 0x2567, /* BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE */ - 0x2568, /* BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE */ - 0x2569, /* BOX DRAWINGS DOUBLE UP AND HORIZONTAL */ - 0x256A, /* BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE */ - 0x0490, /* CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ - 0x256C, /* BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL */ - 0x00A9, /* COPYRIGHT SIGN */ - 0x044E, /* CYRILLIC SMALL LETTER YU */ - 0x0430, /* CYRILLIC SMALL LETTER A */ - 0x0431, /* CYRILLIC SMALL LETTER BE */ - 0x0446, /* CYRILLIC SMALL LETTER TSE */ - 0x0434, /* CYRILLIC SMALL LETTER DE */ - 0x0435, /* CYRILLIC SMALL LETTER IE */ - 0x0444, /* CYRILLIC SMALL LETTER EF */ - 0x0433, /* CYRILLIC SMALL LETTER GHE */ - 0x0445, /* CYRILLIC SMALL LETTER KHA */ - 0x0438, /* CYRILLIC SMALL LETTER I */ - 0x0439, /* CYRILLIC SMALL LETTER SHORT I */ - 0x043A, /* CYRILLIC SMALL LETTER KA */ - 0x043B, /* CYRILLIC SMALL LETTER EL */ - 0x043C, /* CYRILLIC SMALL LETTER EM */ - 0x043D, /* CYRILLIC SMALL LETTER EN */ - 0x043E, /* CYRILLIC SMALL LETTER O */ - 0x043F, /* CYRILLIC SMALL LETTER PE */ - 0x044F, /* CYRILLIC SMALL LETTER YA */ - 0x0440, /* CYRILLIC SMALL LETTER ER */ - 0x0441, /* CYRILLIC SMALL LETTER ES */ - 0x0442, /* CYRILLIC SMALL LETTER TE */ - 0x0443, /* CYRILLIC SMALL LETTER U */ - 0x0436, /* CYRILLIC SMALL LETTER ZHE */ - 0x0432, /* CYRILLIC SMALL LETTER VE */ - 0x044C, /* CYRILLIC SMALL LETTER SOFT SIGN */ - 0x044B, /* CYRILLIC SMALL LETTER YERU */ - 0x0437, /* CYRILLIC SMALL LETTER ZE */ - 0x0448, /* CYRILLIC SMALL LETTER SHA */ - 0x044D, /* CYRILLIC SMALL LETTER E */ - 0x0449, /* CYRILLIC SMALL LETTER SHCHA */ - 0x0447, /* CYRILLIC SMALL LETTER CHE */ - 0x044A, /* CYRILLIC SMALL LETTER HARD SIGN */ - 0x042E, /* CYRILLIC CAPITAL LETTER YU */ - 0x0410, /* CYRILLIC CAPITAL LETTER A */ - 0x0411, /* CYRILLIC CAPITAL LETTER BE */ - 0x0426, /* CYRILLIC CAPITAL LETTER TSE */ - 0x0414, /* CYRILLIC CAPITAL LETTER DE */ - 0x0415, /* CYRILLIC CAPITAL LETTER IE */ - 0x0424, /* CYRILLIC CAPITAL LETTER EF */ - 0x0413, /* CYRILLIC CAPITAL LETTER GHE */ - 0x0425, /* CYRILLIC CAPITAL LETTER KHA */ - 0x0418, /* CYRILLIC CAPITAL LETTER I */ - 0x0419, /* CYRILLIC CAPITAL LETTER SHORT I */ - 0x041A, /* CYRILLIC CAPITAL LETTER KA */ - 0x041B, /* CYRILLIC CAPITAL LETTER EL */ - 0x041C, /* CYRILLIC CAPITAL LETTER EM */ - 0x041D, /* CYRILLIC CAPITAL LETTER EN */ - 0x041E, /* CYRILLIC CAPITAL LETTER O */ - 0x041F, /* CYRILLIC CAPITAL LETTER PE */ - 0x042F, /* CYRILLIC CAPITAL LETTER YA */ - 0x0420, /* CYRILLIC CAPITAL LETTER ER */ - 0x0421, /* CYRILLIC CAPITAL LETTER ES */ - 0x0422, /* CYRILLIC CAPITAL LETTER TE */ - 0x0423, /* CYRILLIC CAPITAL LETTER U */ - 0x0416, /* CYRILLIC CAPITAL LETTER ZHE */ - 0x0412, /* CYRILLIC CAPITAL LETTER VE */ - 0x042C, /* CYRILLIC CAPITAL LETTER SOFT SIGN */ - 0x042B, /* CYRILLIC CAPITAL LETTER YERU */ - 0x0417, /* CYRILLIC CAPITAL LETTER ZE */ - 0x0428, /* CYRILLIC CAPITAL LETTER SHA */ - 0x042D, /* CYRILLIC CAPITAL LETTER E */ - 0x0429, /* CYRILLIC CAPITAL LETTER SHCHA */ - 0x0427, /* CYRILLIC CAPITAL LETTER CHE */ - 0x042A /* CYRILLIC CAPITAL LETTER HARD SIGN */ -}; -static const int koi8u_ucs_table_min = 0x80; -static const int koi8u_ucs_table_len = (sizeof (koi8u_ucs_table) / sizeof (unsigned short)); -static const int koi8u_ucs_table_max = 0x80 + (sizeof (koi8u_ucs_table) / sizeof (unsigned short)); - - - -#endif /* UNNICODE_TABLE_KOI8U_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 748fdf3b99..a20960f926 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -88,9 +88,9 @@ #include "mbfilter_wchar.h" #include "mbstring.h" #include "php_unicode.h" -#include "filters/mbfilter_ascii.h" #include "filters/mbfilter_base64.h" #include "filters/mbfilter_qprint.h" +#include "filters/mbfilter_singlebyte.h" #include "filters/mbfilter_tl_jisx0201_jisx0208.h" #include "filters/mbfilter_utf8.h" diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h index dd37165ecf..0f57310d5e 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h @@ -51,10 +51,6 @@ #define MBFL_WCSPLANE_JIS0208 0x70e10000 /* JIS HEX : 2121h - 7E7Eh */ #define MBFL_WCSPLANE_JIS0212 0x70e20000 /* JIS HEX : 2121h - 7E7Eh */ #define MBFL_WCSPLANE_WINCP932 0x70e30000 /* JIS HEX : 2121h - 9898h */ -#define MBFL_WCSPLANE_8859_3 0x70e60000 /* 00h - FFh */ -#define MBFL_WCSPLANE_8859_6 0x70e90000 /* 00h - FFh */ -#define MBFL_WCSPLANE_8859_7 0x70ea0000 /* 00h - FFh */ -#define MBFL_WCSPLANE_8859_8 0x70eb0000 /* 00h - FFh */ #define MBFL_WCSPLANE_KSC5601 0x70f10000 /* 2121h - 7E7Eh */ #define MBFL_WCSPLANE_GB2312 0x70f20000 /* 2121h - 7E7Eh */ #define MBFL_WCSPLANE_WINCP936 0x70f30000 /* 2121h - 9898h */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index 34920fe5d6..cf35a4f4e4 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -57,29 +57,9 @@ #include "filters/mbfilter_euc_jp_2004.h" #include "filters/mbfilter_euc_jp_win.h" #include "filters/mbfilter_gb18030.h" -#include "filters/mbfilter_ascii.h" -#include "filters/mbfilter_koi8r.h" -#include "filters/mbfilter_koi8u.h" -#include "filters/mbfilter_cp866.h" #include "filters/mbfilter_cp932.h" #include "filters/mbfilter_cp936.h" -#include "filters/mbfilter_cp1251.h" -#include "filters/mbfilter_cp1252.h" -#include "filters/mbfilter_cp1254.h" #include "filters/mbfilter_cp5022x.h" -#include "filters/mbfilter_iso8859_1.h" -#include "filters/mbfilter_iso8859_2.h" -#include "filters/mbfilter_iso8859_3.h" -#include "filters/mbfilter_iso8859_4.h" -#include "filters/mbfilter_iso8859_5.h" -#include "filters/mbfilter_iso8859_6.h" -#include "filters/mbfilter_iso8859_7.h" -#include "filters/mbfilter_iso8859_8.h" -#include "filters/mbfilter_iso8859_9.h" -#include "filters/mbfilter_iso8859_10.h" -#include "filters/mbfilter_iso8859_13.h" -#include "filters/mbfilter_iso8859_14.h" -#include "filters/mbfilter_iso8859_15.h" #include "filters/mbfilter_base64.h" #include "filters/mbfilter_qprint.h" #include "filters/mbfilter_uuencode.h" @@ -93,8 +73,7 @@ #include "filters/mbfilter_ucs4.h" #include "filters/mbfilter_ucs2.h" #include "filters/mbfilter_htmlent.h" -#include "filters/mbfilter_armscii8.h" -#include "filters/mbfilter_cp850.h" +#include "filters/mbfilter_singlebyte.h" /* hex character table "0123456789ABCDEF" */ static char mbfl_hexchar_table[] = { diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c index 483355b1be..e558fba4b9 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c @@ -61,30 +61,9 @@ #include "filters/mbfilter_euc_jp_win.h" #include "filters/mbfilter_euc_jp_2004.h" #include "filters/mbfilter_gb18030.h" -#include "filters/mbfilter_ascii.h" -#include "filters/mbfilter_koi8r.h" -#include "filters/mbfilter_koi8u.h" -#include "filters/mbfilter_cp866.h" #include "filters/mbfilter_cp932.h" #include "filters/mbfilter_cp936.h" -#include "filters/mbfilter_cp1251.h" -#include "filters/mbfilter_cp1252.h" -#include "filters/mbfilter_cp1254.h" #include "filters/mbfilter_cp5022x.h" -#include "filters/mbfilter_iso8859_1.h" -#include "filters/mbfilter_iso8859_2.h" -#include "filters/mbfilter_iso8859_3.h" -#include "filters/mbfilter_iso8859_4.h" -#include "filters/mbfilter_iso8859_5.h" -#include "filters/mbfilter_iso8859_6.h" -#include "filters/mbfilter_iso8859_7.h" -#include "filters/mbfilter_iso8859_8.h" -#include "filters/mbfilter_iso8859_9.h" -#include "filters/mbfilter_iso8859_10.h" -#include "filters/mbfilter_iso8859_13.h" -#include "filters/mbfilter_iso8859_14.h" -#include "filters/mbfilter_iso8859_15.h" -#include "filters/mbfilter_iso8859_16.h" #include "filters/mbfilter_base64.h" #include "filters/mbfilter_qprint.h" #include "filters/mbfilter_uuencode.h" @@ -98,8 +77,7 @@ #include "filters/mbfilter_ucs4.h" #include "filters/mbfilter_ucs2.h" #include "filters/mbfilter_htmlent.h" -#include "filters/mbfilter_armscii8.h" -#include "filters/mbfilter_cp850.h" +#include "filters/mbfilter_singlebyte.h" #ifndef HAVE_STRCASECMP #ifdef HAVE_STRICMP diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 22332e5216..6d5541f073 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -34,12 +34,12 @@ #include "libmbfl/mbfl/mbfilter_8bit.h" #include "libmbfl/mbfl/mbfilter_pass.h" #include "libmbfl/mbfl/mbfilter_wchar.h" -#include "libmbfl/filters/mbfilter_ascii.h" #include "libmbfl/filters/mbfilter_base64.h" #include "libmbfl/filters/mbfilter_qprint.h" #include "libmbfl/filters/mbfilter_ucs4.h" #include "libmbfl/filters/mbfilter_utf8.h" #include "libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.h" +#include "libmbfl/filters/mbfilter_singlebyte.h" #include "php_variables.h" #include "php_globals.h" |