From ebc27e8dce3ab3c486875fe0fabd780ccfa0d167 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Mon, 21 Feb 2005 07:10:14 +0000 Subject: [PATCH] - Upgrade libmbfl (fixers bug #28220, #30549 and #31911). --- NEWS | 8 +- ext/mbstring/config.m4 | 1 + ext/mbstring/libmbfl/AUTHORS | 10 +- ext/mbstring/libmbfl/Makefile.am | 5 +- ext/mbstring/libmbfl/Makefile.bcc32 | 8 +- ext/mbstring/libmbfl/README | 2 +- ext/mbstring/libmbfl/config.h.in | 9 ++ ext/mbstring/libmbfl/configure.in | 17 ++- ext/mbstring/libmbfl/filters/Makefile.am | 103 +++++++++++++++++- ext/mbstring/libmbfl/filters/Makefile.bcc32 | 2 +- ext/mbstring/libmbfl/filters/html_entities.c | 8 +- ext/mbstring/libmbfl/filters/html_entities.h | 7 +- .../libmbfl/filters/mbfilter_htmlent.c | 71 ++++++------ .../libmbfl/filters/mbfilter_qprint.c | 39 ++++--- ext/mbstring/libmbfl/filters/mk_sb_tbl.awk | 27 ++++- .../filters/unicode_table_iso8859_10.h | 55 +++------- .../filters/unicode_table_iso8859_13.h | 55 +++------- .../filters/unicode_table_iso8859_14.h | 55 +++------- .../filters/unicode_table_iso8859_15.h | 55 +++------- .../libmbfl/filters/unicode_table_iso8859_2.h | 56 +++------- .../libmbfl/filters/unicode_table_iso8859_3.h | 54 +++------ .../libmbfl/filters/unicode_table_iso8859_4.h | 55 +++------- .../libmbfl/filters/unicode_table_iso8859_5.h | 55 +++------- .../libmbfl/filters/unicode_table_iso8859_6.h | 55 +++------- .../libmbfl/filters/unicode_table_iso8859_7.h | 55 +++------- .../libmbfl/filters/unicode_table_iso8859_8.h | 55 +++------- .../libmbfl/filters/unicode_table_iso8859_9.h | 55 +++------- ext/mbstring/libmbfl/libmbfl.dsp | 12 ++ ext/mbstring/libmbfl/mbfl/Makefile.am | 14 ++- ext/mbstring/libmbfl/mbfl/mbfilter.c | 103 ++++++++---------- ext/mbstring/libmbfl/mbfl/mbfilter.h | 18 +-- ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h | 2 +- ext/mbstring/libmbfl/mbfl/mbfilter_pass.h | 4 +- ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_consts.h | 1 + ext/mbstring/libmbfl/mbfl/mbfl_convert.c | 32 ++---- ext/mbstring/libmbfl/mbfl/mbfl_convert.h | 1 - ext/mbstring/libmbfl/mbfl/mbfl_encoding.c | 12 +- ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 2 + ext/mbstring/libmbfl/mbfl/mbfl_ident.c | 58 +++++----- ext/mbstring/libmbfl/mbfl/mbfl_ident.h | 4 +- ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk | 28 ++++- ext/mbstring/libmbfl/nls/Makefile.am | 4 +- 43 files changed, 577 insertions(+), 697 deletions(-) diff --git a/NEWS b/NEWS index 26b98ae7d0..314bf94236 100644 --- a/NEWS +++ b/NEWS @@ -7,9 +7,11 @@ PHP 4 NEWS - Fixed several leaks in ext/filepro. (Tony) - Fixed build system to always use bundled libtool files. (Jani) - Fixed MacOSX shared extensions crashing on Apache startup. (Rasmus) -- Fixed bug #31936 (set_h_errno() is redefined incompatibly). (Jani) - Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns with NULL values). (Daniel Convissor) +- Fixed bug #31936 (set_h_errno() is redefined incompatibly). (Jani) +- Fixed bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes). + (Moriyoshi) - Fixed bug #31858 (--disable-cli does not force --without-pear). (Jani) - Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string). (Jani) @@ -61,6 +63,8 @@ PHP 4 NEWS - Fixed bug #31055 (apache2filter: per request leak proportional to the full path of the request URI). (kameshj at fastmail dot fm) - Fixed bug #30726 (-.1 like numbers are not being handled correctly). (Ilia) +- Fixed bug #30549 (incorrect character translations for some ISO8859 + charsets). (Moriyoshi) - Fixed bug #30446 (apache2handler: virtual() includes files out of sequence) - Fixed bug #30430 (odbc_next_result() doesn't bind values and that results in segfault). (pdan-php at esync dot org, Tony) @@ -76,6 +80,8 @@ PHP 4 NEWS (wendland at scan-plus dot de) - Fixed bug #28451 (corupt EXIF headers have unlimited recursive IFD directory entries). (Andrei) +- Fixed bug #28220 (mb_strwidth() returns wrong width values for some hangul + characters). (Moriyoshi) - Fixed bug #28086 (crash inside overload() function). (Tony) - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). (chris at ex-parrot dot com) diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index 371bf8c07f..4d71a04450 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -106,6 +106,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ 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 diff --git a/ext/mbstring/libmbfl/AUTHORS b/ext/mbstring/libmbfl/AUTHORS index 8e6eb49264..e606231518 100644 --- a/ext/mbstring/libmbfl/AUTHORS +++ b/ext/mbstring/libmbfl/AUTHORS @@ -1,8 +1,10 @@ +Den V. Tsopa Hironori Sato +Marcus Boerger +Moriyoshi Koizumi +Rui Hirokawa Shigeru Kanemoto Tsukada Takuya -U. Kenkichi Tateyama -Moriyoshi Koizumi -Rui Hirokawa -Other gracious contributors +U. Kenkichi +Wez Furlong diff --git a/ext/mbstring/libmbfl/Makefile.am b/ext/mbstring/libmbfl/Makefile.am index 72c855eec6..7f60683435 100644 --- a/ext/mbstring/libmbfl/Makefile.am +++ b/ext/mbstring/libmbfl/Makefile.am @@ -1,2 +1,5 @@ -EXTRA_DIST=AUTHORS DISCLAIMER +EXTRA_DIST=AUTHORS DISCLAIMER LICENSE Makefile.bcc32 \ + config.h.bcc32 config.h.vc6 \ + libmbfl.dsp libmbfl.dsw libmbfl.sln libmbfl.vcproj mbfl.rc \ + mksbcc32.bat rules.mak.bcc32 SUBDIRS = nls filters mbfl diff --git a/ext/mbstring/libmbfl/Makefile.bcc32 b/ext/mbstring/libmbfl/Makefile.bcc32 index a740f256ed..6dde6b8384 100644 --- a/ext/mbstring/libmbfl/Makefile.bcc32 +++ b/ext/mbstring/libmbfl/Makefile.bcc32 @@ -5,12 +5,12 @@ SUBDIRS=mbfl nls filters all: mbfl.dll mbfl.lib mbfl.lib: mbfl.dll - implib mbfl.lib mbfl.dll + implib -a mbfl.lib mbfl.dll -mbfl.dll: compile mbfl.def mbfl.res +mbfl.dll: compile mbfl.res @if exist linker.rsp del linker.rsp @for %i in ($(SUBDIRS)) do @for %j in (%i\*.obj) do @echo %j+ >> linker.rsp - ilink32 $(LDFLAGS) @linker.rsp,mbfl.dll,,$(LIBS),mbfl.def,mbfl.res + ilink32 $(LDFLAGS) @linker.rsp,mbfl.dll,,$(LIBS),,mbfl.res del linker.rsp mbfl.res: mbfl.rc @@ -22,6 +22,8 @@ prepare: config.h.bcc32 clean: @for %i in ($(SUBDIRS)) do $(COMSPEC) /C mksbcc32.bat $(MAKE) %i clean + @if exist linker.rsp del linker.rsp + @if exist mbfl.RES del mbfl.RES @if exist mbfl.dll del mbfl.dll @if exist mbfl.lib del mbfl.lib @if exist config.h del config.h diff --git a/ext/mbstring/libmbfl/README b/ext/mbstring/libmbfl/README index d8debc6750..5a3255560e 100644 --- a/ext/mbstring/libmbfl/README +++ b/ext/mbstring/libmbfl/README @@ -5,4 +5,4 @@ See LICENSE and DISCLAIMER for licensing information. See the file INSTALL for building and installation instructions. -# $Id: README,v 1.1.2.2 2003/08/24 18:18:51 moriyoshi Exp +# $Id$ diff --git a/ext/mbstring/libmbfl/config.h.in b/ext/mbstring/libmbfl/config.h.in index 17458c857b..8e7493257e 100644 --- a/ext/mbstring/libmbfl/config.h.in +++ b/ext/mbstring/libmbfl/config.h.in @@ -3,6 +3,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -47,6 +50,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Name of package */ +#undef PACKAGE + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -65,6 +71,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Version number of package */ +#undef VERSION + /* Define to empty if `const' does not conform to ANSI C. */ #undef const diff --git a/ext/mbstring/libmbfl/configure.in b/ext/mbstring/libmbfl/configure.in index 96da1e85a3..25d2e59373 100644 --- a/ext/mbstring/libmbfl/configure.in +++ b/ext/mbstring/libmbfl/configure.in @@ -1,8 +1,11 @@ # Process this file with autoconf to produce a configure script. -AC_INIT([libmbfl],[1.0.0]) -AM_INIT_AUTOMAKE -AC_CONFIG_SRCDIR([mbfl/mbfilter.c]) -AC_CONFIG_HEADER([config.h]) +AC_INIT(mbfl/mbfilter.c) +AM_INIT_AUTOMAKE(libmbfl, 1.0.0) +AC_CONFIG_SRCDIR(mbfl/mbfilter.c) +AM_CONFIG_HEADER(config.h) + +SHLIB_VERSION="1:0:0" +AC_SUBST(SHLIB_VERSION) # Checks for programs. AC_PROG_CC @@ -25,5 +28,11 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([strcasecmp strchr]) +AC_CHECK_PROGS([FETCH_VIA_FTP], [wget curl ncftpget]) + +if test "$FETCH_VIA_FTP" = "curl"; then + FETCH_VIA_FTP="curl -O" +fi + AC_CONFIG_FILES([Makefile mbfl/Makefile filters/Makefile nls/Makefile]) AC_OUTPUT diff --git a/ext/mbstring/libmbfl/filters/Makefile.am b/ext/mbstring/libmbfl/filters/Makefile.am index b8d8b7926a..aab009b9d5 100644 --- a/ext/mbstring/libmbfl/filters/Makefile.am +++ b/ext/mbstring/libmbfl/filters/Makefile.am @@ -1,3 +1,104 @@ +EXTRA_DIST=Makefile.bcc32 mk_sb_tbl.awk noinst_LTLIBRARIES=libmbfl_filters.la INCLUDES=-I../mbfl -libmbfl_filters_la_SOURCES=mbfilter_cp936.c mbfilter_hz.c mbfilter_euc_tw.c mbfilter_big5.c mbfilter_euc_jp.c mbfilter_jis.c mbfilter_iso8859_1.c mbfilter_iso8859_2.c mbfilter_cp1252.c mbfilter_cp1251.c mbfilter_ascii.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_iso8859_10.c mbfilter_iso8859_13.c mbfilter_iso8859_14.c mbfilter_iso8859_15.c mbfilter_htmlent.c mbfilter_byte2.c mbfilter_byte4.c mbfilter_uuencode.c mbfilter_base64.c mbfilter_sjis.c mbfilter_7bit.c mbfilter_qprint.c mbfilter_ucs4.c mbfilter_ucs2.c mbfilter_utf32.c mbfilter_utf16.c mbfilter_utf8.c mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_euc_jp_win.c mbfilter_cp932.c mbfilter_euc_cn.c mbfilter_euc_kr.c mbfilter_uhc.c mbfilter_iso2022_kr.c mbfilter_cp866.c mbfilter_koi8r.c html_entities.c +libmbfl_filters_la_LDFLAGS=-version-info $(SHLIB_VERSION) +libmbfl_filters_la_SOURCES=mbfilter_cp936.c mbfilter_hz.c mbfilter_euc_tw.c mbfilter_big5.c mbfilter_euc_jp.c mbfilter_jis.c mbfilter_iso8859_1.c mbfilter_iso8859_2.c mbfilter_cp1252.c mbfilter_cp1251.c mbfilter_ascii.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_iso8859_10.c mbfilter_iso8859_13.c mbfilter_iso8859_14.c mbfilter_iso8859_15.c mbfilter_iso8859_16.c mbfilter_htmlent.c mbfilter_byte2.c mbfilter_byte4.c mbfilter_uuencode.c mbfilter_base64.c mbfilter_sjis.c mbfilter_7bit.c mbfilter_qprint.c mbfilter_ucs4.c mbfilter_ucs2.c mbfilter_utf32.c mbfilter_utf16.c mbfilter_utf8.c mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_euc_jp_win.c mbfilter_cp932.c mbfilter_euc_cn.c mbfilter_euc_kr.c mbfilter_uhc.c mbfilter_iso2022_kr.c mbfilter_cp866.c mbfilter_koi8r.c html_entities.c cp932_table.h html_entities.h mbfilter_7bit.h mbfilter_ascii.h mbfilter_base64.h mbfilter_big5.h mbfilter_byte2.h mbfilter_byte4.h mbfilter_cp1251.h mbfilter_cp1252.h mbfilter_cp866.h mbfilter_cp932.h mbfilter_cp936.h mbfilter_euc_cn.h mbfilter_euc_jp.h mbfilter_euc_jp_win.h mbfilter_euc_kr.h mbfilter_euc_tw.h mbfilter_htmlent.h mbfilter_hz.h mbfilter_iso2022_kr.h mbfilter_iso8859_1.h mbfilter_iso8859_10.h mbfilter_iso8859_13.h mbfilter_iso8859_14.h mbfilter_iso8859_15.h mbfilter_iso8859_16.h mbfilter_iso8859_2.h mbfilter_iso8859_3.h mbfilter_iso8859_4.h mbfilter_iso8859_5.h mbfilter_iso8859_6.h mbfilter_iso8859_7.h mbfilter_iso8859_8.h mbfilter_iso8859_9.h mbfilter_jis.h mbfilter_koi8r.h mbfilter_qprint.h mbfilter_sjis.h mbfilter_ucs2.h mbfilter_ucs4.h mbfilter_uhc.h mbfilter_utf16.h mbfilter_utf32.h mbfilter_utf7.h mbfilter_utf7imap.h mbfilter_utf8.h mbfilter_uuencode.h unicode_prop.h unicode_table_big5.h unicode_table_cns11643.h unicode_table_cp1251.h unicode_table_cp1252.h unicode_table_cp866.h unicode_table_cp932_ext.h unicode_table_cp936.h unicode_table_iso8859_10.h unicode_table_iso8859_13.h unicode_table_iso8859_14.h unicode_table_iso8859_15.h unicode_table_iso8859_16.h unicode_table_iso8859_2.h unicode_table_iso8859_3.h unicode_table_iso8859_4.h unicode_table_iso8859_5.h unicode_table_iso8859_6.h unicode_table_iso8859_7.h unicode_table_iso8859_8.h unicode_table_iso8859_9.h unicode_table_jis.h unicode_table_koi8r.h unicode_table_uhc.h + +mbfilter_iso8859_2.c: unicode_table_iso8859_2.h + +mbfilter_iso8859_3.c: unicode_table_iso8859_3.h + +mbfilter_iso8859_4.c: unicode_table_iso8859_4.h + +mbfilter_iso8859_5.c: unicode_table_iso8859_5.h + +mbfilter_iso8859_6.c: unicode_table_iso8859_6.h + +mbfilter_iso8859_7.c: unicode_table_iso8859_7.h + +mbfilter_iso8859_8.c: unicode_table_iso8859_8.h + +mbfilter_iso8859_9.c: unicode_table_iso8859_9.h + +mbfilter_iso8859_10.c: unicode_table_iso8859_10.h + +mbfilter_iso8859_11.c: unicode_table_iso8859_11.h + +mbfilter_iso8859_13.c: unicode_table_iso8859_13.h + +mbfilter_iso8859_14.c: unicode_table_iso8859_13.h + +mbfilter_iso8859_15.c: unicode_table_iso8859_15.h + +mbfilter_iso8859_16.c: unicode_table_iso8859_16.h + +8859-1.TXT 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT 8859-6.TXT \ +8859-7.TXT 8859-8.TXT 8859-9.TXT 8859-10.TXT 8859-11.TXT 8859-13.TXT \ +8859-14.TXT 8859-15.TXT 8859-16.TXT: + $(FETCH_VIA_FTP) ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/$@ + +unicode_table_iso8859_1.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_1_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_1_H -f mk_sb_tbl.awk 8859-1.TXT > $@ + +unicode_table_iso8859_2.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_2_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_2_H -f mk_sb_tbl.awk 8859-2.TXT > $@ + +unicode_table_iso8859_3.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_3_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_3_H -f mk_sb_tbl.awk 8859-3.TXT > $@ + +unicode_table_iso8859_4.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_4_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_4_H -f mk_sb_tbl.awk 8859-4.TXT > $@ + +unicode_table_iso8859_5.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_5_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_5_H -f mk_sb_tbl.awk 8859-5.TXT > $@ + +unicode_table_iso8859_6.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_6_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_6_H -f mk_sb_tbl.awk 8859-6.TXT > $@ + +unicode_table_iso8859_7.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_7_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_7_H -f mk_sb_tbl.awk 8859-7.TXT > $@ + +unicode_table_iso8859_8.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_8_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_8_H -f mk_sb_tbl.awk 8859-8.TXT > $@ + +unicode_table_iso8859_9.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_9_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_9_H -f mk_sb_tbl.awk 8859-9.TXT > $@ + +unicode_table_iso8859_10.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_10_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_10_H -f mk_sb_tbl.awk 8859-10.TXT > $@ + +unicode_table_iso8859_11.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_11_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_11_H -f mk_sb_tbl.awk 8859-11.TXT > $@ + +unicode_table_iso8859_13.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_13_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_13_H -f mk_sb_tbl.awk 8859-13.TXT > $@ + +unicode_table_iso8859_14.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_14_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_14_H -f mk_sb_tbl.awk 8859-14.TXT > $@ + +unicode_table_iso8859_15.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_15_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLE_ISO8859_15_H -f mk_sb_tbl.awk 8859-15.TXT > $@ + +unicode_table_iso8859_16.h: mk_sb_tbl.awk + $(AWK) -v TABLE_NAME=iso8859_16_ucs_table \ + -v IFNDEF_NAME=UNICODE_TABLEISO8859_16_H -f mk_sb_tbl.awk 8859-16.TXT > $@ + +unidata: 8859-1.TXT 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT 8859-6.TXT \ +8859-7.TXT 8859-8.TXT 8859-9.TXT 8859-10.TXT 8859-11.TXT 8859-13.TXT \ +8859-14.TXT 8859-15.TXT 8859-16.TXT + +.PHONY: unidata diff --git a/ext/mbstring/libmbfl/filters/Makefile.bcc32 b/ext/mbstring/libmbfl/filters/Makefile.bcc32 index 4219ed9061..32bd161093 100644 --- a/ext/mbstring/libmbfl/filters/Makefile.bcc32 +++ b/ext/mbstring/libmbfl/filters/Makefile.bcc32 @@ -1,6 +1,6 @@ !include ..\rules.mak.bcc32 INCLUDES=$(INCLUDES) -I../mbfl -OBJS=mbfilter_cp936.obj mbfilter_hz.obj mbfilter_euc_tw.obj mbfilter_big5.obj mbfilter_euc_jp.obj mbfilter_jis.obj mbfilter_iso8859_1.obj mbfilter_iso8859_2.obj mbfilter_cp1252.obj mbfilter_cp1251.obj mbfilter_ascii.obj mbfilter_iso8859_3.obj mbfilter_iso8859_4.obj mbfilter_iso8859_5.obj mbfilter_iso8859_6.obj mbfilter_iso8859_7.obj mbfilter_iso8859_8.obj mbfilter_iso8859_9.obj mbfilter_iso8859_10.obj mbfilter_iso8859_13.obj mbfilter_iso8859_14.obj mbfilter_iso8859_15.obj mbfilter_htmlent.obj mbfilter_byte2.obj mbfilter_byte4.obj mbfilter_uuencode.obj mbfilter_base64.obj mbfilter_sjis.obj mbfilter_7bit.obj mbfilter_qprint.obj mbfilter_ucs4.obj mbfilter_ucs2.obj mbfilter_utf32.obj mbfilter_utf16.obj mbfilter_utf8.obj mbfilter_utf7.obj mbfilter_utf7imap.obj mbfilter_euc_jp_win.obj mbfilter_cp932.obj mbfilter_euc_cn.obj mbfilter_euc_kr.obj mbfilter_uhc.obj mbfilter_iso2022_kr.obj mbfilter_cp866.obj mbfilter_koi8r.obj html_entities.obj +OBJS=mbfilter_cp936.obj mbfilter_hz.obj mbfilter_euc_tw.obj mbfilter_big5.obj mbfilter_euc_jp.obj mbfilter_jis.obj mbfilter_iso8859_1.obj mbfilter_iso8859_2.obj mbfilter_cp1252.obj mbfilter_cp1251.obj mbfilter_ascii.obj mbfilter_iso8859_3.obj mbfilter_iso8859_4.obj mbfilter_iso8859_5.obj mbfilter_iso8859_6.obj mbfilter_iso8859_7.obj mbfilter_iso8859_8.obj mbfilter_iso8859_9.obj mbfilter_iso8859_10.obj mbfilter_iso8859_13.obj mbfilter_iso8859_14.obj mbfilter_iso8859_15.obj mbfilter_iso8859_16.obj mbfilter_htmlent.obj mbfilter_byte2.obj mbfilter_byte4.obj mbfilter_uuencode.obj mbfilter_base64.obj mbfilter_sjis.obj mbfilter_7bit.obj mbfilter_qprint.obj mbfilter_ucs4.obj mbfilter_ucs2.obj mbfilter_utf32.obj mbfilter_utf16.obj mbfilter_utf8.obj mbfilter_utf7.obj mbfilter_utf7imap.obj mbfilter_euc_jp_win.obj mbfilter_cp932.obj mbfilter_euc_cn.obj mbfilter_euc_kr.obj mbfilter_uhc.obj mbfilter_iso2022_kr.obj mbfilter_cp866.obj mbfilter_koi8r.obj html_entities.obj all: $(OBJS) diff --git a/ext/mbstring/libmbfl/filters/html_entities.c b/ext/mbstring/libmbfl/filters/html_entities.c index 0fc0476b9f..59eb1818d0 100644 --- a/ext/mbstring/libmbfl/filters/html_entities.c +++ b/ext/mbstring/libmbfl/filters/html_entities.c @@ -32,13 +32,13 @@ #endif #include "mbfilter.h" -#include +#include "html_entities.h" -const mbfl_html_entity mbfl_html_entity_list[] = { /* - {"quot", 34}, DO NOT CONVERT THESE AUTOMATICALLY +const mbfl_html_entity_entry mbfl_html_entity_list[] = { + {"quot", 34}, {"amp", 38}, {"lt", 60}, - {"gt", 62}, */ + {"gt", 62}, {"nbsp", 160}, {"iexcl", 161}, {"cent", 162}, diff --git a/ext/mbstring/libmbfl/filters/html_entities.h b/ext/mbstring/libmbfl/filters/html_entities.h index 99dbfe2630..a73b9d5bbd 100644 --- a/ext/mbstring/libmbfl/filters/html_entities.h +++ b/ext/mbstring/libmbfl/filters/html_entities.h @@ -30,9 +30,12 @@ #ifndef MBFL_HTML_ENTITIES_H #define MBFL_HTML_ENTITIES_H -#include "mbfilter.h" +typedef struct _mbfl_html_entity_entry { + char * name; + int code; +} mbfl_html_entity_entry; -extern mbfl_html_entity mbfl_html_entity_list[]; +extern const mbfl_html_entity_entry mbfl_html_entity_list[]; #endif /* MBFL_HTML_ENTITIES_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c index 789f5c6bff..2eaa09cf74 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c @@ -43,7 +43,15 @@ #include "mbfilter_htmlent.h" #include "html_entities.h" -static const unsigned char mblen_table_html[] = { /* 0x00, 0x80 - 0xFF, only valid for numeric entities */ +static const int htmlentitifieds[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -51,15 +59,7 @@ static const unsigned char mblen_table_html[] = { /* 0x00, 0x80 - 0xFF, only val 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static const char *mbfl_encoding_html_ent_aliases[] = {"HTML", "html", NULL}; @@ -69,7 +69,7 @@ const mbfl_encoding mbfl_encoding_html_ent = { "HTML-ENTITIES", "HTML-ENTITIES", (const char *(*)[])&mbfl_encoding_html_ent_aliases, - NULL, /* mblen_table_html, Do not use table instead calulate length based on entities actually used */ + NULL, MBFL_ENCTYPE_HTML_ENT }; @@ -98,40 +98,45 @@ const struct mbfl_convert_vtbl vtbl_html_wchar = { */ int mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter) { - int tmp[10]; - int i = 0, p = 0, e; + int tmp[64]; + int i; unsigned int uc; + const mbfl_html_entity_entry *e; - if (c<256 && mblen_table_html[c]==1) { + if (c < sizeof(htmlentitifieds) / sizeof(htmlentitifieds[0]) && + htmlentitifieds[c] != 1) { CK((*filter->output_function)(c, filter->data)); } else { - /*php_error_docref("ref.mbstring" TSRMLS_CC, E_NOTICE, "mbfl_filt_conv_html_enc(0x%08X = %d)", c, c);*/ CK((*filter->output_function)('&', filter->data)); - while (1) { - e = mbfl_html_entity_list[i].code; - if (c < e || e == -1) { - break; - } - if (c == e) { - while(mbfl_html_entity_list[i].name[p]) { - CK((*filter->output_function)((int)mbfl_html_entity_list[i].name[p++], filter->data)); + for (i = 0; (e = &mbfl_html_entity_list[i])->name != NULL; i++) { + if (c == e->code) { + char *p; + + for (p = e->name; *p != '\0'; p++) { + CK((*filter->output_function)((int)*p, filter->data)); } - break; + goto last; } - i++; } - i=0; - if (!p) { + + { + int *p = tmp + sizeof(tmp) / sizeof(tmp[0]); + CK((*filter->output_function)('#', filter->data)); + uc = (unsigned int)c; + + *(--p) = '\0'; do { - tmp[i++] = '0'+uc%10; + *(--p) = "0123456789"[uc % 10]; uc /= 10; } while (uc); - do { - CK((*filter->output_function)(tmp[--i], filter->data)); - } while (i); + + for (; *p != '\0'; p++) { + CK((*filter->output_function)(*p, filter->data)); + } } + last: CK((*filter->output_function)(';', filter->data)); } return c; @@ -169,7 +174,7 @@ void mbfl_filt_conv_html_dec_dtor(mbfl_convert_filter *filter) int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter) { int pos, ent = 0; - mbfl_html_entity *entity; + mbfl_html_entity_entry *entity; char *buffer = (char*)filter->cache; if (!filter->status) { @@ -192,7 +197,7 @@ int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter) /*php_error_docref("ref.mbstring" TSRMLS_CC, E_NOTICE, "mbstring decoded '%s'=%d", buffer, ent);*/ } else { /* named entity */ - entity = (mbfl_html_entity *)mbfl_html_entity_list; + entity = (mbfl_html_entity_entry *)mbfl_html_entity_list; while (entity->name) { if (!strcmp(buffer+1, entity->name)) { ent = entity->code; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 9b18a1cb2b..188d088ed0 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -155,11 +155,30 @@ int mbfl_filt_conv_qprintenc_flush(mbfl_convert_filter *filter) */ int mbfl_filt_conv_qprintdec(int c, mbfl_convert_filter *filter) { - int n; + int n, m; + + static int hex2code_map[] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + }; switch (filter->status) { case 1: - if ((c >= 0x30 && c <= 0x39) || (c >= 0x41 && c <= 0x46)) { /* 0 - 9 or A - F */ + if (hex2code_map[c & 0xff] >= 0) { filter->cache = c; filter->status = 2; } else if (c == 0x0d) { /* soft line feed */ @@ -173,21 +192,13 @@ int mbfl_filt_conv_qprintdec(int c, mbfl_convert_filter *filter) } break; case 2: - n = filter->cache; - if (n >= 0x30 && n <= 0x39) { /* '0' - '9' */ - n -= 48; /* 48 = '0' */ - } else { - n -= 55; /* 55 = 'A' - 10 */ - } - n <<= 4; - if (c >= 0x30 && c <= 0x39) { /* '0' - '9' */ - n += (c - 48); - } else if (c >= 0x41 && c <= 0x46) { /* 'A' - 'F' */ - n += (c - 55); - } else { + m = hex2code_map[c & 0xff]; + if (m < 0) { CK((*filter->output_function)(0x3d, filter->data)); /* '=' */ CK((*filter->output_function)(filter->cache, filter->data)); n = c; + } else { + n = hex2code_map[filter->cache] << 4 | m; } CK((*filter->output_function)(n, filter->data)); filter->status = 0; diff --git a/ext/mbstring/libmbfl/filters/mk_sb_tbl.awk b/ext/mbstring/libmbfl/filters/mk_sb_tbl.awk index ae090b5aa5..1ca7324c84 100755 --- a/ext/mbstring/libmbfl/filters/mk_sb_tbl.awk +++ b/ext/mbstring/libmbfl/filters/mk_sb_tbl.awk @@ -5,6 +5,29 @@ # Description: a script that generates a single byte code set to Unicode # mapping table. # + +function conv(str) { + if (!match(str, "^0[xX]")) { + return 0 + str + } + + retval = 0 + + for (i = 3; i <= length(str); i++) { + n = index("0123456789abcdefABCDEF", substr(str, i, 1)) - 1 + + if (n < 0) { + return 0 + str; + } else if (n >= 16) { + n -= 6; + } + + retval = retval * 16 + n + } + + return retval +} + BEGIN { FS="[ \t#]" } @@ -14,7 +37,7 @@ BEGIN { } { - tbl[$1 + 0] = $2 + tbl[conv($1)] = conv($2) } END { @@ -30,7 +53,7 @@ END { if (i != 256) { printf(",\n"); } else { - print + print "" break; } } diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h index 0de0d17eb4..48b1301b72 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_10_H -#define UNICODE_TABLE_ISO8859_10_H - -static const unsigned short iso8859_10_ucs_table[] = { - 0x00A0,0x0104,0x0112,0x0122,0x0124,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 +static const unsigned 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 index ee69310bdb..e7991f8e28 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_13.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_13.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_13_H -#define UNICODE_TABLE_ISO8859_13_H - -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 +static const unsigned 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 index f0633963ff..8c0bfe133a 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_14.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_14.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_14_H -#define UNICODE_TABLE_ISO8859_14_H - -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 +static const unsigned 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 index ab2f1a82b6..82743da2b5 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_15.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_15.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_15_H -#define UNICODE_TABLE_ISO8859_15_H - -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 +static const unsigned 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_2.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h index 148fdbfff5..ab1ca6eea8 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h @@ -1,45 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_2_H -#define UNICODE_TABLE_ISO8859_2_H - -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 +static const unsigned 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 index 40aa5d635a..f0501787e3 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_3.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_3.h @@ -1,43 +1,17 @@ -/* - * "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 金本 茂 . - * - */ +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_3_H -#define UNICODE_TABLE_ISO8859_3_H - -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 +static const unsigned 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 index 4aaa276c00..01f90fb3e9 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_4.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_4.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_4_H -#define UNICODE_TABLE_ISO8859_4_H - -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 +static const unsigned 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 index 58fc0e2ada..70c9f38c5e 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_5.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_5.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_5_H -#define UNICODE_TABLE_ISO8859_5_H - -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 +static const unsigned 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 index 9dba3ad895..c9d6624337 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_6.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_6.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_6_H -#define UNICODE_TABLE_ISO8859_6_H - -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,0x060C,0x00AD,0x0000,0x0000 +static const unsigned 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 index 0dfde9bb84..4961c30f92 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_7.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_7.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_7_H -#define UNICODE_TABLE_ISO8859_7_H - -static const unsigned short iso8859_7_ucs_table[] = { - 0x00A0,0x2018,0x2019,0x00A3,0x0000,0x0000,0x00A6,0x00A7, - 0x00A8,0x00A9,0x0000,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 +static const unsigned 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 index 756004f913..3a52badb36 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_8.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_8.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_8_H -#define UNICODE_TABLE_ISO8859_8_H - -static const unsigned short iso8859_8_ucs_table[] = { - 0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, - 0x00A8,0x00A9,0x00D7,0x00AB,0x00AC,0x00AD,0x00AE,0x203E, - 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,0x0000,0x0000,0x0000 +static const unsigned 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 index f39e83f45e..eaac8c6723 100644 --- a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_9.h +++ b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_9.h @@ -1,44 +1,17 @@ -/* - * "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 金本 茂 . - * - */ - +/* This file is automatically generated. Do not edit! */ #ifndef UNICODE_TABLE_ISO8859_9_H -#define UNICODE_TABLE_ISO8859_9_H - -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 +static const unsigned 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/libmbfl.dsp b/ext/mbstring/libmbfl/libmbfl.dsp index bf3fe06557..e041df02c5 100644 --- a/ext/mbstring/libmbfl/libmbfl.dsp +++ b/ext/mbstring/libmbfl/libmbfl.dsp @@ -199,6 +199,10 @@ SOURCE=.\filters\mbfilter_iso8859_15.c # End Source File # Begin Source File +SOURCE=.\filters\mbfilter_iso8859_16.c +# End Source File +# Begin Source File + SOURCE=.\filters\mbfilter_iso8859_2.c # End Source File # Begin Source File @@ -500,6 +504,10 @@ SOURCE=.\filters\mbfilter_iso8859_15.h # End Source File # Begin Source File +SOURCE=.\filters\mbfilter_iso8859_16.h +# End Source File +# Begin Source File + SOURCE=.\filters\mbfilter_iso8859_2.h # End Source File # Begin Source File @@ -708,6 +716,10 @@ SOURCE=.\filters\unicode_table_iso8859_15.h # End Source File # Begin Source File +SOURCE=.\filters\unicode_table_iso8859_16.h +# End Source File +# Begin Source File + SOURCE=.\filters\unicode_table_iso8859_2.h # End Source File # Begin Source File diff --git a/ext/mbstring/libmbfl/mbfl/Makefile.am b/ext/mbstring/libmbfl/mbfl/Makefile.am index 1b9bdcada1..25d6734541 100644 --- a/ext/mbstring/libmbfl/mbfl/Makefile.am +++ b/ext/mbstring/libmbfl/mbfl/Makefile.am @@ -1,10 +1,20 @@ +EXTRA_DIST=Makefile.bcc32 mk_eaw_tbl.awk lib_LTLIBRARIES=libmbfl.la -libmbfl_la_SOURCES=mbfilter.c mbfl_string.c mbfl_language.c mbfl_encoding.c mbfl_convert.c mbfl_ident.c mbfl_memory_device.c mbfl_allocators.c mbfl_filter_output.c mbfilter_pass.c mbfilter_wchar.c mbfilter_8bit.c +libmbfl_la_SOURCES=mbfilter.c mbfl_string.c mbfl_language.c mbfl_encoding.c mbfl_convert.c mbfl_ident.c mbfl_memory_device.c mbfl_allocators.c mbfl_filter_output.c mbfilter_pass.c mbfilter_wchar.c mbfilter_8bit.c eaw_table.h libmbfl_filters_la=../filters/libmbfl_filters.la libmbfl_nls_la=../nls/libmbfl_nls.la libmbfl_la_LIBADD=$(libmbfl_filters_la) $(libmbfl_nls_la) +libmbfl_la_LDFLAGS=-version-info $(SHLIB_VERSION) libmbfl_includedir=$(includedir)/mbfl -libmbfl_include_HEADERS=mbfilter.h mbfl_consts.h mbfl_encoding.h mbfl_language.h mbfl_string.h mbfl_convert.h mbfl_ident.h mbfl_memory_device.h mbfl_allocators.h mbfl_defs.h +libmbfl_include_HEADERS=mbfilter.h mbfl_consts.h mbfl_encoding.h mbfl_language.h mbfl_string.h mbfl_convert.h mbfl_ident.h mbfl_memory_device.h mbfl_allocators.h mbfl_defs.h mbfl_filter_output.h mbfilter_pass.h mbfilter_wchar.h mbfilter_8bit.h + +mbfilter.c: eaw_table.h + +eaw_table.h: mk_eaw_tbl.awk + $(AWK) -v TABLE_NAME=mbfl_eaw_table -f mk_eaw_tbl.awk EastAsianWidth.txt > $@ + +EastAsianWidth.txt: + $(FETCH_VIA_FTP) ftp://ftp.unicode.org/Public/UNIDATA/EastAsianWidth.txt $(libmbfl_filters_la): $(MAKE) -C `dirname $(libmbfl_filters_la)` diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 640100f0c4..ea2ca5632d 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -103,6 +103,8 @@ #include "mbfl_filter_output.h" #include "mbfilter_pass.h" +#include "eaw_table.h" + /* hex character table "0123456789ABCDEF" */ static char mbfl_hexchar_table[] = { 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x41,0x42,0x43,0x44,0x45,0x46 @@ -334,14 +336,14 @@ mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *str * encoding detector */ mbfl_encoding_detector * -mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int eliztsz) +mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz) { mbfl_encoding_detector *identd; int i, num; mbfl_identify_filter *filter; - if (elist == NULL || eliztsz <= 0) { + if (elist == NULL || elistsz <= 0) { return NULL; } @@ -350,7 +352,7 @@ mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int eliztsz) if (identd == NULL) { return NULL; } - identd->filter_list = (mbfl_identify_filter **)mbfl_calloc(eliztsz, sizeof(mbfl_identify_filter *)); + identd->filter_list = (mbfl_identify_filter **)mbfl_calloc(elistsz, sizeof(mbfl_identify_filter *)); if (identd->filter_list == NULL) { mbfl_free(identd); return NULL; @@ -359,7 +361,7 @@ mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int eliztsz) /* create filters */ i = 0; num = 0; - while (i < eliztsz) { + while (i < elistsz) { filter = mbfl_identify_filter_new(elist[i]); if (filter != NULL) { identd->filter_list[num] = filter; @@ -522,49 +524,41 @@ mbfl_convert_encoding( * identify encoding */ const mbfl_encoding * -mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz, int strict) +mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict) { int i, n, num, bad; unsigned char *p; - const struct mbfl_identify_vtbl *vtbl; mbfl_identify_filter *flist, *filter; const mbfl_encoding *encoding; - /* initialize */ - flist = (mbfl_identify_filter *)mbfl_calloc(eliztsz, sizeof(mbfl_identify_filter)); + /* flist is an array of mbfl_identify_filter instances */ + flist = (mbfl_identify_filter *)mbfl_calloc(elistsz, sizeof(mbfl_identify_filter)); if (flist == NULL) { return NULL; } - i = 0; + num = 0; if (elist != NULL) { - while (i < eliztsz) { - vtbl = mbfl_identify_filter_get_vtbl(elist[i]); - if (vtbl != NULL) { - filter = &flist[num]; - mbfl_identify_filter_set_vtbl(filter, vtbl); - filter->encoding = mbfl_no2encoding(vtbl->encoding); - (*filter->filter_ctor)(filter); + for (i = 0; i < elistsz; i++) { + if (!mbfl_identify_filter_init(&flist[num], elist[i])) { num++; } - i++; } } /* feed data */ n = string->len; p = string->val; + if (p != NULL) { + bad = 0; while (n > 0) { - i = 0; - bad = 0; - while (i < num) { + for (i = 0; i < num; i++) { filter = &flist[i]; (*filter->filter_function)(*p, filter); if (filter->flag) { bad++; } - i++; } if ((num - 1) <= bad && !strict) { break; @@ -575,41 +569,33 @@ mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int el } /* judge */ - i = num - 1; - bad = 1; encoding = NULL; - while (i >= 0) { + + for (i = 0; i < num; i++) { filter = &flist[i]; - if (filter->flag) { - bad++; - } else { + if (!filter->flag) { encoding = filter->encoding; + break; } - i--; } -#if 0 - if (bad < num) { - encoding = NULL; - } -#endif - i = 0; - while (i < num) { - filter = &flist[i]; - (*filter->filter_dtor)(filter); - i++; + /* cleanup */ + /* dtors should be called in reverse order */ + i = num; while (--i >= 0) { + mbfl_identify_filter_cleanup(&flist[i]); } + mbfl_free((void *)flist); return encoding; } const char* -mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz, int strict) +mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict) { const mbfl_encoding *encoding; - encoding = mbfl_identify_encoding(string, elist, eliztsz, strict); + encoding = mbfl_identify_encoding(string, elist, elistsz, strict); if (encoding != NULL && encoding->no_encoding > mbfl_no_encoding_charset_min && encoding->no_encoding < mbfl_no_encoding_charset_max) { @@ -620,11 +606,11 @@ mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, i } const enum mbfl_no_encoding -mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz) +mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz) { const mbfl_encoding *encoding; - encoding = mbfl_identify_encoding(string, elist, eliztsz, 0); + encoding = mbfl_identify_encoding(string, elist, elistsz, 0); if (encoding != NULL && encoding->no_encoding > mbfl_no_encoding_charset_min && encoding->no_encoding < mbfl_no_encoding_charset_max) { @@ -1362,17 +1348,27 @@ mbfl_strcut( /* * strwidth */ -static int -filter_count_width(int c, void* data) +static int is_fullwidth(int c) { - if (c >= 0x20) { - if (c < 0x2000 || (c > 0xff60 && c < 0xffa0)) { - (*(int *)data)++; - } else { - (*(int *)data) += 2; + int i; + + if (c < mbfl_eaw_table[0].begin) { + return 0; + } + + for (i = 0; i < sizeof(mbfl_eaw_table) / sizeof(mbfl_eaw_table[0]); i++) { + if (mbfl_eaw_table[i].begin <= c && c <= mbfl_eaw_table[i].end) { + return 1; } } + return 0; +} + +static int +filter_count_width(int c, void* data) +{ + (*(int *)data) += (is_fullwidth(c) ? 2: 1); return c; } @@ -1437,13 +1433,8 @@ collector_strimwidth(int c, void* data) break; default: if (pc->outchar >= pc->from) { - if (c >= 0x20) { - if (c < 0x2000 || (c > 0xff60 && c < 0xffa0)) { - pc->outwidth++; - } else { - pc->outwidth += 2; - } - } + pc->outwidth += (is_fullwidth(c) ? 2: 1); + if (pc->outwidth > pc->width) { if (pc->status == 0) { pc->endpos = pc->device.pos; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index 949a5e626c..eadae7b3f4 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -140,7 +140,7 @@ struct _mbfl_encoding_detector { int filter_list_size; }; -MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int eliztsz); +MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz); MBFLAPI extern void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd); MBFLAPI extern int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string); MBFLAPI extern enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *identd); @@ -157,13 +157,13 @@ mbfl_convert_encoding(mbfl_string *string, mbfl_string *result, enum mbfl_no_enc * identify encoding */ MBFLAPI extern const mbfl_encoding * -mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz, int strict); +mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict); MBFLAPI extern const char * -mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz, int strict); +mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict); MBFLAPI extern const enum mbfl_no_encoding -mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz); +mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz); /* * strlen @@ -265,26 +265,16 @@ mbfl_mime_header_decode( mbfl_string *result, enum mbfl_no_encoding outcode); - /* * convert HTML numeric entity */ MBFLAPI extern mbfl_string * mbfl_html_numeric_entity(mbfl_string *string, mbfl_string *result, int *convmap, int mapsize, int type); - /* * convert of harfwidth and fullwidth for japanese */ MBFLAPI extern mbfl_string * mbfl_ja_jp_hantozen(mbfl_string *string, mbfl_string *result, int mode); -/* - * HTML Entity table - */ -typedef struct _mbfl_html_entity { - char * name; - int code; -} mbfl_html_entity; - #endif /* MBFL_MBFILTER_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h index 4fc8922605..a87c564616 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h @@ -34,6 +34,6 @@ #include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_8bit; +MBFLAPI extern const mbfl_encoding mbfl_encoding_8bit; #endif /* MBFL_MBFILTER_8BIT_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h index 087aa2c3be..49d169c668 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h @@ -33,8 +33,8 @@ #include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_pass; -extern const struct mbfl_convert_vtbl vtbl_pass; +MBFLAPI extern const mbfl_encoding mbfl_encoding_pass; +MBFLAPI extern const struct mbfl_convert_vtbl vtbl_pass; MBFLAPI extern int mbfl_filt_conv_pass(int c, mbfl_convert_filter *filter); diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h index 24bf7473c1..9e9396a77f 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h @@ -34,6 +34,6 @@ #include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_wchar; +MBFLAPI extern const mbfl_encoding mbfl_encoding_wchar; #endif /* MBFL_MBFILTER_WCHAR_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h index d907512ec2..d20b3ceea9 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h @@ -74,6 +74,7 @@ #define MBFL_WCSPLANE_CP1251 0x70f70000 #define MBFL_WCSPLANE_CP866 0x70f80000 #define MBFL_WCSPLANE_KOI8R 0x70f90000 +#define MBFL_WCSPLANE_8859_16 0x70fa0000 /* 00h - FFh */ #define MBFL_WCSGROUP_MASK 0xffffff #define MBFL_WCSGROUP_UCS4MAX 0x70000000 #define MBFL_WCSGROUP_WCHARMAX 0x78000000 diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index 2b9090eb59..9dd27ff595 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -89,6 +89,8 @@ #include "filters/mbfilter_ucs2.h" #include "filters/mbfilter_htmlent.h" +static void mbfl_convert_filter_reset_vtbl(mbfl_convert_filter *filter); + /* hex character table "0123456789ABCDEF" */ static char mbfl_hexchar_table[] = { 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x41,0x42,0x43,0x44,0x45,0x46 @@ -247,7 +249,7 @@ mbfl_convert_filter_new( filter->illegal_substchar = 0x3f; /* '?' */ /* setup the function table */ - mbfl_convert_filter_select_vtbl(filter); + mbfl_convert_filter_reset_vtbl(filter); /* constructor */ (*filter->filter_ctor)(filter); @@ -277,11 +279,8 @@ mbfl_convert_filter_flush(mbfl_convert_filter *filter) return (filter->flush_function ? (*filter->flush_function)(filter->data) : 0); } -void -mbfl_convert_filter_reset( - mbfl_convert_filter *filter, - enum mbfl_no_encoding from, - enum mbfl_no_encoding to) +void mbfl_convert_filter_reset(mbfl_convert_filter *filter, + enum mbfl_no_encoding from, enum mbfl_no_encoding to) { /* destruct old filter */ (*filter->filter_dtor)(filter); @@ -291,7 +290,7 @@ mbfl_convert_filter_reset( filter->to = mbfl_no2encoding(to); /* set the vtbl */ - mbfl_convert_filter_select_vtbl(filter); + mbfl_convert_filter_reset_vtbl(filter); /* construct new filter */ (*filter->filter_ctor)(filter); @@ -434,17 +433,6 @@ mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter) return ret; } -void mbfl_convert_filter_set_vtbl(mbfl_convert_filter *filter, const struct mbfl_convert_vtbl *vtbl) -{ - if (filter && vtbl) { - filter->filter_ctor = vtbl->filter_ctor; - filter->filter_dtor = vtbl->filter_dtor; - filter->filter_function = vtbl->filter_function; - filter->filter_flush = vtbl->filter_flush; - } -} - - const struct mbfl_convert_vtbl * mbfl_convert_filter_get_vtbl(enum mbfl_no_encoding from, enum mbfl_no_encoding to) { const struct mbfl_convert_vtbl *vtbl; @@ -471,7 +459,7 @@ const struct mbfl_convert_vtbl * mbfl_convert_filter_get_vtbl(enum mbfl_no_encod } -void mbfl_convert_filter_select_vtbl(mbfl_convert_filter *filter) +static void mbfl_convert_filter_reset_vtbl(mbfl_convert_filter *filter) { const struct mbfl_convert_vtbl *vtbl; @@ -479,7 +467,11 @@ void mbfl_convert_filter_select_vtbl(mbfl_convert_filter *filter) if (vtbl == NULL) { vtbl = &vtbl_pass; } - mbfl_convert_filter_set_vtbl(filter, vtbl); + + filter->filter_ctor = vtbl->filter_ctor; + filter->filter_dtor = vtbl->filter_dtor; + filter->filter_function = vtbl->filter_function; + filter->filter_flush = vtbl->filter_flush; } /* diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.h b/ext/mbstring/libmbfl/mbfl/mbfl_convert.h index 9499448677..0bc06209c1 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.h @@ -76,7 +76,6 @@ MBFLAPI extern int mbfl_convert_filter_flush(mbfl_convert_filter *filter); MBFLAPI extern void mbfl_convert_filter_reset(mbfl_convert_filter *filter, enum mbfl_no_encoding from, enum mbfl_no_encoding to); MBFLAPI extern void mbfl_convert_filter_copy(mbfl_convert_filter *src, mbfl_convert_filter *dist); MBFLAPI extern int mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter); -MBFLAPI extern void mbfl_convert_filter_select_vtbl(mbfl_convert_filter *filter); MBFLAPI extern const struct mbfl_convert_vtbl * mbfl_convert_filter_get_vtbl(enum mbfl_no_encoding from, enum mbfl_no_encoding to); MBFLAPI extern void mbfl_filt_conv_common_ctor(mbfl_convert_filter *filter); diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c index 7f0dc9ab60..21fb6319db 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c @@ -80,6 +80,7 @@ #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" @@ -163,6 +164,7 @@ static const mbfl_encoding *mbfl_encoding_ptr_list[] = { &mbfl_encoding_8859_13, &mbfl_encoding_8859_14, &mbfl_encoding_8859_15, + &mbfl_encoding_8859_16, &mbfl_encoding_euc_cn, &mbfl_encoding_cp936, &mbfl_encoding_hz, @@ -264,6 +266,12 @@ mbfl_no_encoding2name(enum mbfl_no_encoding no_encoding) } } +const mbfl_encoding ** +mbfl_get_supported_encodings(void) +{ + return mbfl_encoding_ptr_list; +} + const char * mbfl_no2preferred_mime_name(enum mbfl_no_encoding no_encoding) { @@ -289,7 +297,3 @@ mbfl_is_support_encoding(const char *name) return 1; } } - - - - diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index d8df593e7d..c9b51dd360 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -97,6 +97,7 @@ enum mbfl_no_encoding { mbfl_no_encoding_cp1251, mbfl_no_encoding_cp866, mbfl_no_encoding_koi8r, + mbfl_no_encoding_8859_16, mbfl_no_encoding_charset_max }; @@ -117,6 +118,7 @@ typedef struct _mbfl_encoding { MBFLAPI extern const mbfl_encoding * mbfl_name2encoding(const char *name); MBFLAPI extern const mbfl_encoding * mbfl_no2encoding(enum mbfl_no_encoding no_encoding); MBFLAPI extern enum mbfl_no_encoding mbfl_name2no_encoding(const char *name); +MBFLAPI extern const mbfl_encoding ** mbfl_get_supported_encodings(); MBFLAPI extern const char * mbfl_no_encoding2name(enum mbfl_no_encoding no_encoding); MBFLAPI extern const char * mbfl_no2preferred_mime_name(enum mbfl_no_encoding no_encoding); MBFLAPI extern int mbfl_is_support_encoding(const char *name); diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c index 5b581bf566..619b9cfc10 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c @@ -139,16 +139,6 @@ static const struct mbfl_identify_vtbl *mbfl_identify_filter_list[] = { /* * identify filter */ - -void mbfl_identify_filter_set_vtbl(mbfl_identify_filter *filter, const struct mbfl_identify_vtbl *vtbl) -{ - if (filter && vtbl) { - filter->filter_ctor = vtbl->filter_ctor; - filter->filter_dtor = vtbl->filter_dtor; - filter->filter_function = vtbl->filter_function; - } -} - const struct mbfl_identify_vtbl * mbfl_identify_filter_get_vtbl(enum mbfl_no_encoding encoding) { const struct mbfl_identify_vtbl * vtbl; @@ -164,20 +154,9 @@ const struct mbfl_identify_vtbl * mbfl_identify_filter_get_vtbl(enum mbfl_no_enc return vtbl; } -void mbfl_identify_filter_select_vtbl(mbfl_identify_filter *filter) -{ - const struct mbfl_identify_vtbl *vtbl; - - vtbl = mbfl_identify_filter_get_vtbl(filter->encoding->no_encoding); - if (vtbl == NULL) { - vtbl = &vtbl_identify_false; - } - mbfl_identify_filter_set_vtbl(filter, vtbl); -} - mbfl_identify_filter *mbfl_identify_filter_new(enum mbfl_no_encoding encoding) { - mbfl_identify_filter * filter; + mbfl_identify_filter *filter; /* allocate */ filter = (mbfl_identify_filter *)mbfl_malloc(sizeof(mbfl_identify_filter)); @@ -185,6 +164,18 @@ mbfl_identify_filter *mbfl_identify_filter_new(enum mbfl_no_encoding encoding) return NULL; } + if (mbfl_identify_filter_init(filter, encoding)) { + mbfl_free(filter); + return NULL; + } + + return filter; +} + +int mbfl_identify_filter_init(mbfl_identify_filter *filter, enum mbfl_no_encoding encoding) +{ + const struct mbfl_identify_vtbl *vtbl; + /* encoding structure */ filter->encoding = mbfl_no2encoding(encoding); if (filter->encoding == NULL) { @@ -196,20 +187,33 @@ mbfl_identify_filter *mbfl_identify_filter_new(enum mbfl_no_encoding encoding) filter->score = 0; /* setup the function table */ - mbfl_identify_filter_select_vtbl(filter); + vtbl = mbfl_identify_filter_get_vtbl(filter->encoding->no_encoding); + if (vtbl == NULL) { + vtbl = &vtbl_identify_false; + } + filter->filter_ctor = vtbl->filter_ctor; + filter->filter_dtor = vtbl->filter_dtor; + filter->filter_function = vtbl->filter_function; /* constructor */ (*filter->filter_ctor)(filter); - return filter; + return 0; } void mbfl_identify_filter_delete(mbfl_identify_filter *filter) { - if (filter) { - (*filter->filter_dtor)(filter); - mbfl_free((void*)filter); + if (filter == NULL) { + return; } + + mbfl_identify_filter_cleanup(filter); + mbfl_free((void*)filter); +} + +void mbfl_identify_filter_cleanup(mbfl_identify_filter *filter) +{ + (*filter->filter_dtor)(filter); } void mbfl_filt_ident_common_ctor(mbfl_identify_filter *filter) diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.h b/ext/mbstring/libmbfl/mbfl/mbfl_ident.h index e66513bd71..b0721fc413 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.h @@ -56,11 +56,11 @@ struct mbfl_identify_vtbl { int (*filter_function)(int c, mbfl_identify_filter *filter); }; -MBFLAPI extern void mbfl_identify_filter_set_vtbl(mbfl_identify_filter *filter, const struct mbfl_identify_vtbl *vtbl); MBFLAPI extern const struct mbfl_identify_vtbl * mbfl_identify_filter_get_vtbl(enum mbfl_no_encoding encoding); -MBFLAPI extern void mbfl_identify_filter_select_vtbl(mbfl_identify_filter *filter); MBFLAPI extern mbfl_identify_filter * mbfl_identify_filter_new(enum mbfl_no_encoding encoding); MBFLAPI extern void mbfl_identify_filter_delete(mbfl_identify_filter *filter); +MBFLAPI extern int mbfl_identify_filter_init(mbfl_identify_filter *filter, enum mbfl_no_encoding encoding); +MBFLAPI void mbfl_identify_filter_cleanup(mbfl_identify_filter *filter); MBFLAPI extern void mbfl_filt_ident_common_ctor(mbfl_identify_filter *filter); MBFLAPI extern void mbfl_filt_ident_common_dtor(mbfl_identify_filter *filter); diff --git a/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk b/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk index c7deb4cdf5..658ebb931f 100644 --- a/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk +++ b/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk @@ -5,6 +5,28 @@ # Description: a script to generate east asian width table. # +function conv(str) { + if (!match(str, "^0[xX]")) { + return 0 + str + } + + retval = 0 + + for (i = 3; i <= length(str); i++) { + n = index("0123456789abcdefABCDEF", substr(str, i, 1)) - 1 + + if (n < 0) { + return 0 + str; + } else if (n >= 16) { + n -= 6; + } + + retval = retval * 16 + n + } + + return retval +} + BEGIN { prev = -1 comma = 0 @@ -18,7 +40,7 @@ BEGIN { /^[0-9a-fA-F]+;/ { if ($2 == "W" || $2 == "F") { - v = ( "0x" $1 ) + 0 + v = conv("0x" $1) if (prev < 0) { first = v } else if (v - prev > 1) { @@ -44,8 +66,8 @@ BEGIN { /^[0-9a-fA-F]+\.\./ { if ($4 == "W" || $4 == "F") { - vs = ( "0x" $1 ) + 0 - ve = ( "0x" $3 ) + 0 + vs = conv("0x" $1) + ve = conv("0x" $3) if (prev < 0) { first = vs } else if (vs - prev > 1) { diff --git a/ext/mbstring/libmbfl/nls/Makefile.am b/ext/mbstring/libmbfl/nls/Makefile.am index 14ddba733f..ab2ea9d3cc 100644 --- a/ext/mbstring/libmbfl/nls/Makefile.am +++ b/ext/mbstring/libmbfl/nls/Makefile.am @@ -1,3 +1,5 @@ +EXTRA_DIST=Makefile.bcc32 noinst_LTLIBRARIES=libmbfl_nls.la INCLUDES=-I../mbfl -libmbfl_nls_la_SOURCES=nls_ja.c nls_de.c nls_en.c nls_kr.c nls_ru.c nls_zh.c nls_uni.c nls_neutral.c +libmbfl_nls_la_LDFLAGS=-version-info $(SHLIB_VERSION) +libmbfl_nls_la_SOURCES=nls_ja.c nls_de.c nls_en.c nls_kr.c nls_ru.c nls_zh.c nls_uni.c nls_neutral.c nls_ja.h nls_de.h nls_en.h nls_kr.h nls_ru.h nls_zh.h nls_uni.h nls_neutral.h -- 2.50.1