]> granicus.if.org Git - php/commitdiff
- Upgrade libmbfl (fixers bug #28220, #30549 and #31911).
authorMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 21 Feb 2005 07:10:14 +0000 (07:10 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 21 Feb 2005 07:10:14 +0000 (07:10 +0000)
43 files changed:
NEWS
ext/mbstring/config.m4
ext/mbstring/libmbfl/AUTHORS
ext/mbstring/libmbfl/Makefile.am
ext/mbstring/libmbfl/Makefile.bcc32
ext/mbstring/libmbfl/README
ext/mbstring/libmbfl/config.h.in
ext/mbstring/libmbfl/configure.in
ext/mbstring/libmbfl/filters/Makefile.am
ext/mbstring/libmbfl/filters/Makefile.bcc32
ext/mbstring/libmbfl/filters/html_entities.c
ext/mbstring/libmbfl/filters/html_entities.h
ext/mbstring/libmbfl/filters/mbfilter_htmlent.c
ext/mbstring/libmbfl/filters/mbfilter_qprint.c
ext/mbstring/libmbfl/filters/mk_sb_tbl.awk
ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_13.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_14.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_15.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_3.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_4.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_5.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_6.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_7.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_8.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_9.h
ext/mbstring/libmbfl/libmbfl.dsp
ext/mbstring/libmbfl/mbfl/Makefile.am
ext/mbstring/libmbfl/mbfl/mbfilter.c
ext/mbstring/libmbfl/mbfl/mbfilter.h
ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h
ext/mbstring/libmbfl/mbfl/mbfilter_pass.h
ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h
ext/mbstring/libmbfl/mbfl/mbfl_consts.h
ext/mbstring/libmbfl/mbfl/mbfl_convert.c
ext/mbstring/libmbfl/mbfl/mbfl_convert.h
ext/mbstring/libmbfl/mbfl/mbfl_encoding.c
ext/mbstring/libmbfl/mbfl/mbfl_encoding.h
ext/mbstring/libmbfl/mbfl/mbfl_ident.c
ext/mbstring/libmbfl/mbfl/mbfl_ident.h
ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk
ext/mbstring/libmbfl/nls/Makefile.am

diff --git a/NEWS b/NEWS
index 26b98ae7d07c29b7847b8d9dc6008b4b1bbe9117..314bf942365e8916eed5ab66292e49e472849ca9 100644 (file)
--- 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)
index 371bf8c07f6d070a939c0ee7619ae414ea5deae9..4d71a04450d17ca3e81f3b71b2966bd6c04c588b 100644 (file)
@@ -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
index 8e6eb49264a817283331312834a01f0d01b71362..e6062315182a91970d888bdec8cff7fc5a14ecb2 100644 (file)
@@ -1,8 +1,10 @@
+Den V. Tsopa <tdv@edisoft.ru>
 Hironori Sato <satoh@jpnnet.com>
+Marcus Boerger <helly@php.net>
+Moriyoshi Koizumi <moriyoshi@php.net>
+Rui Hirokawa <hirokawa@php.net>
 Shigeru Kanemoto <sgk@happysize.co.jp>
 Tsukada Takuya <tsukada@fminn.nagano.nagano.jp>
-U. Kenkichi <kenkichi@axes.co.jp>
 Tateyama  <tateyan@amy.hi-ho.ne.jp>
-Moriyoshi Koizumi <moriyoshi@php.net>
-Rui Hirokawa <hirokawa@php.net>
-Other gracious contributors
+U. Kenkichi <kenkichi@axes.co.jp>
+Wez Furlong <wez@thebrainroom.com>
index 72c855eec616e7494d6b60bcb6e55bb2cbce3f44..7f60683435c741b4d4a1a81554c033f8d094b511 100644 (file)
@@ -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
index a740f256ed001a0f389b24690798b51fcbcff678..6dde6b8384f44a6d45060fccf09f073581690e8a 100644 (file)
@@ -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
index d8debc67507c6269e48d1a4eb80291d2c3db9ba8..5a3255560e8dac47d7e47c99891995d8d8a33abd 100644 (file)
@@ -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$
index 17458c857bf8ab818b9d4509554f78fd9ff42b8b..8e7493257e7c552a044baa53003f20288dcd3eb3 100644 (file)
@@ -3,6 +3,9 @@
 /* Define to 1 if you have the <assert.h> header file. */
 #undef HAVE_ASSERT_H
 
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
@@ -47,6 +50,9 @@
 /* Define to 1 if you have the <unistd.h> 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
 
index 96da1e85a3a7206f57c9ecb111ce7fe9d667b804..25d2e59373c998062f56c90698cbbaaf71724283 100644 (file)
@@ -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
index b8d8b7926a3f59e67e7277ee2f4d386bbebc1af2..aab009b9d5d2f7763f73cd684160a4f519f7c850 100644 (file)
@@ -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
index 4219ed9061dd2613e765059f5c34ad904af177f9..32bd161093c801fad0beb1345158c94055efe924 100644 (file)
@@ -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)
 
index 0fc0476b9f5c290a6019e9644f74547e6cad0646..59eb1818d08aace9a10dd0526678443487c04115 100644 (file)
 #endif
 
 #include "mbfilter.h"
-#include <string.h>
+#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},
index 99dbfe263075b08206556bad27d4618780f7db44..a73b9d5bbd62996517a66fa1a0ff0669ac7d178b 100644 (file)
 #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 */
 
index 789f5c6bff04221c39db84c7cbd2ec9053d676ef..2eaa09cf7405346312b2ae7820ac6b41262679c4 100644 (file)
 #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;
index 9b18a1cb2b99e553a7cbcc65c8ea0426c03bd667..188d088ed0a117c0eecf74a97b28c5def5d8288e 100644 (file)
@@ -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;
index ae090b5aa55583d8efbd6c76a6e23472e6857d0f..1ca7324c8495bf0e928f00295c900ca6e3fbab82 100755 (executable)
@@ -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;
                }
        }       
index 0de0d17eb47fb01ff85c7a319bc2d880fdaeaa62..48b1301b729489747c8b657401d2b29f31a96b56 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index ee69310bdb79eb27357d991b855fe4dacee74945..e7991f8e2848b85931ffbd1b609f2eb886185f52 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index f0633963ff252639644df464cccd4820cca94407..8c0bfe133ae3c7e2d10b5fb18656d92f4819b712 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index ab2f1a82b632b2f5e5b1f02d50cd67ec02dfffad..82743da2b5eb76f86c2e60fbd9826db3eaa31c7b 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index 148fdbfff52788e9bd8d79b4d0334e3f65d90d14..ab1ca6eea83df5a9b0e0eb16843f83e69ef4285b 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index 40aa5d635a12a08173ecaff5129c0c97db2974d5..f0501787e3dd58902b09f35f15f1c5b671ea5b70 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
+/* 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 */
index 4aaa276c00d6bb3d9160a7b8a85f5113a6e71be1..01f90fb3e9d418d32f0846015e52d397d4a899de 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index 58fc0e2adaa6efbbb52ddaf1cf2c23212234aae1..70c9f38c5e8cc6121cb737b61e8632e3eeefaf7f 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index 9dba3ad895a9af8fca04226dd91229e9e3f547d4..c9d66243370ee5f5278a37bc374a9f49f8116a26 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index 0dfde9bb84e763dccdd917d84fbd2ca0cb747629..4961c30f928c6c4a2e43cc61f1d30eb43c990f38 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index 756004f913e768ec01abb3a254ef0113c58a8b13..3a52badb36b170bb8fa24337e5f4fca8ddde212d 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index f39e83f45ee77083f7eb5a153056a16f386a4a29..eaac8c6723d397046ab405c7026cc90e7f80ca05 100644 (file)
@@ -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 é‡‘本 茂 <sgk@happysize.co.jp>.
- *
- */
-
+/* 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 */
index bf3fe065571227083b22375de76baa121cfe8294..e041df02c5365eb02dabbe6f95deca551bee5501 100644 (file)
@@ -199,6 +199,10 @@ SOURCE=.\filters\mbfilter_iso8859_15.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\filters\mbfilter_iso8859_16.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\filters\mbfilter_iso8859_2.c\r
 # End Source File\r
 # Begin Source File\r
@@ -500,6 +504,10 @@ SOURCE=.\filters\mbfilter_iso8859_15.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\filters\mbfilter_iso8859_16.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\filters\mbfilter_iso8859_2.h\r
 # End Source File\r
 # Begin Source File\r
@@ -708,6 +716,10 @@ SOURCE=.\filters\unicode_table_iso8859_15.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\filters\unicode_table_iso8859_16.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\filters\unicode_table_iso8859_2.h\r
 # End Source File\r
 # Begin Source File\r
index 1b9bdcada10796986167202322d45cb5e180b433..25d67345416806c0c6e3b63397db498e738f51f9 100644 (file)
@@ -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)`
index 640100f0c40251294b7924a025d65f66bc059a77..ea2ca5632d52510f10cc446ceea9809bba7b3c9b 100644 (file)
 #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;
index 949a5e626c882a644da6c4bdd6009e989c01181b..eadae7b3f4fdb8c6e1f7adaedad9cff35e90a1e7 100644 (file)
@@ -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 */
index 4fc89226059e3b8c82f6f9257c57bb8e59fc733e..a87c5646162ce97f0f3ac14ca50b34051043e385 100644 (file)
@@ -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 */
index 087aa2c3be5aaab6251db2770e42544197abbb49..49d169c66899d6a86b3b5861b1abfc65ec5e0abf 100644 (file)
@@ -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);
 
index 24bf7473c134f1f393db30fef84fea0a3266a46f..9e9396a77f716662586a7097cc0247c1a557538c 100644 (file)
@@ -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 */
index d907512ec201b71254fa5238f6ed5edef054a110..d20b3ceea96a346ca46456fcbf792c806724ce7a 100644 (file)
@@ -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
index 2b9090eb59e6884c0a6e06c5719714a501d9261e..9dd27ff5956ad79e8644f43e303612a4ae21a1f6 100644 (file)
@@ -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;
 }
 
 /*
index 9499448677e1c40b91a2507a278df4cc84fcdfb6..0bc06209c178c83e211f950757e37f034358a4b7 100644 (file)
@@ -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);
index 7f0dc9ab603438cab08d6080fd4a07704682014a..21fb6319db78982f34a43604e0ff6ecc62ceebe8 100644 (file)
@@ -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;
        }
 }
-
-
-
-
index d8df593e7dee00e814d659ebecaeeae781d22d74..c9b51dd3608d2e52a6f876685e7e452daa05d73a 100644 (file)
@@ -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);
index 5b581bf5669f53183e926bfb5dc9f921a5ff2940..619b9cfc109b2cf8437b9dc37499542c38a02d7e 100644 (file)
@@ -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)
index e66513bd7181b92b00729f8146d3c1bbe19371f7..b0721fc41309ad69fa48ee19c45d2efc533d0978 100644 (file)
@@ -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);
index c7deb4cdf5af40b226a9aa56f7dae8b512641e3c..658ebb931f94481403d896c9fbf3ee959851b6f0 100644 (file)
@@ -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) {
index 14ddba733ff8436c9bf768365778f5372d88323f..ab2ea9d3cc6c10bcf89178fc58af8b9ff09d8032 100644 (file)
@@ -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