[php-i18n-commits] cvs commit: php4/ext/mbstring filter.c mbfilter_cn.c mbfilter_kr.c mbfilter_tw.c

Zurück zum Archiv-Index

Tsukada ttsuk****@users*****
2002年 8月 10日 (土) 11:42:30 JST


ttsukada    02/08/10 11:42:30

  Modified:    ext/mbstring filter.c mbfilter_cn.c mbfilter_kr.c
                        mbfilter_tw.c
  Log:
  improved convert table structure
  
  Revision  Changes    Path
  1.8       +2 -4      php4/ext/mbstring/filter.c
  
  Index: filter.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/php4/ext/mbstring/filter.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- filter.c	10 Jun 2002 11:32:39 -0000	1.7
  +++ filter.c	10 Aug 2002 02:42:30 -0000	1.8
  @@ -107,8 +107,7 @@
   	filter->filter_dtor = convert_collection->function->filter_dtor;
   	filter->filter_function = convert_collection->function->filter_function;
   	filter->filter_flush = convert_collection->function->filter_flush;
  -	filter->pair_table_list = convert_collection->pair_table_list;
  -	filter->lookup_table_list = convert_collection->lookup_table_list;
  +	filter->table_list = convert_collection->table_list;
   	filter->flush_function = flush_function;
   	filter->stream_resource = stream_resource;
   	filter->mode = MBSTRG(filter_mode_r);
  @@ -177,8 +176,7 @@
   	filter->filter_dtor = convert_collection->function->filter_dtor;
   	filter->filter_function = convert_collection->function->filter_function;
   	filter->filter_flush = convert_collection->function->filter_flush;
  -	filter->pair_table_list = convert_collection->pair_table_list;
  -	filter->lookup_table_list = convert_collection->lookup_table_list;
  +	filter->table_list = convert_collection->table_list;
   
   	/* construct new filter */
   	(*filter->filter_ctor)(filter);
  
  
  
  1.5       +21 -29    php4/ext/mbstring/mbfilter_cn.c
  
  Index: mbfilter_cn.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/php4/ext/mbstring/mbfilter_cn.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mbfilter_cn.c	26 May 2002 09:28:21 -0000	1.4
  +++ mbfilter_cn.c	10 Aug 2002 02:42:30 -0000	1.5
  @@ -408,7 +408,7 @@
   /*
    * convert filter function
    */
  -static const mbfl_convert_function cvfn_euccn_wchar = {
  +static mbfl_convert_function cvfn_euccn_wchar = {
   	"euccn_wchar",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -417,7 +417,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_wchar_euccn = {
  +static mbfl_convert_function cvfn_wchar_euccn = {
   	"wchar_euccn",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -426,7 +426,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_cp936_wchar = {
  +static mbfl_convert_function cvfn_cp936_wchar = {
   	"cp936_wchar",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -435,7 +435,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_wchar_cp936 = {
  +static mbfl_convert_function cvfn_wchar_cp936 = {
   	"wchar_cp936",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -444,7 +444,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_hz_wchar = {
  +static mbfl_convert_function cvfn_hz_wchar = {
   	"hz_wchar",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -453,7 +453,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_wchar_hz = {
  +static mbfl_convert_function cvfn_wchar_hz = {
   	"wchar_hz",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -466,63 +466,57 @@
   /*
    * convert filter collection
    */
  -static const mbfl_convert_collection conv_euccn_wchar = {
  +static mbfl_convert_collection conv_euccn_wchar = {
   	"euccn_wchar",
   	php_mb_encid_euc_cn,
   	php_mb_encid_wchar,
   	&cvfn_euccn_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_wchar_euccn = {
  +static mbfl_convert_collection conv_wchar_euccn = {
   	"wchar_euccn",
   	php_mb_encid_wchar,
   	php_mb_encid_euc_cn,
   	&cvfn_wchar_euccn,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_cp936_wchar = {
  +static mbfl_convert_collection conv_cp936_wchar = {
   	"cp936_wchar",
   	php_mb_encid_cp936,
   	php_mb_encid_wchar,
   	&cvfn_cp936_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_wchar_cp936 = {
  +static mbfl_convert_collection conv_wchar_cp936 = {
   	"wchar_cp936",
   	php_mb_encid_wchar,
   	php_mb_encid_cp936,
   	&cvfn_wchar_cp936,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_hz_wchar = {
  +static mbfl_convert_collection conv_hz_wchar = {
   	"hz_wchar",
   	php_mb_encid_hz,
   	php_mb_encid_wchar,
   	&cvfn_hz_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_wchar_hz = {
  +static mbfl_convert_collection conv_wchar_hz = {
   	"wchar_hz",
   	php_mb_encid_wchar,
   	php_mb_encid_hz,
   	&cvfn_euccn_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  @@ -531,8 +525,7 @@
   /*
    * filter list
    */
  -#if 0
  -const mbfl_convert_function * mbfl_convert_function_list_cn[] = {
  +mbfl_convert_function * mbfl_convert_function_list_cn[] = {
   	&cvfn_euccn_wchar,
   	&cvfn_wchar_euccn,
   	&cvfn_cp936_wchar,
  @@ -541,9 +534,8 @@
   	&cvfn_wchar_hz,
   	NULL
   };
  -#endif
   
  -const mbfl_convert_collection * mbfl_convert_collection_list_cn[] = {
  +mbfl_convert_collection * mbfl_convert_collection_list_cn[] = {
   	&conv_euccn_wchar,
   	&conv_wchar_euccn,
   	&conv_cp936_wchar,
  @@ -554,7 +546,7 @@
   };
   
   
  -const mbfl_identify_function * mbfl_identify_function_list_cn[] = {
  +mbfl_identify_function * mbfl_identify_function_list_cn[] = {
   	NULL
   };
   
  
  
  
  1.4       +15 -21    php4/ext/mbstring/mbfilter_kr.c
  
  Index: mbfilter_kr.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/php4/ext/mbstring/mbfilter_kr.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mbfilter_kr.c	26 May 2002 09:29:25 -0000	1.3
  +++ mbfilter_kr.c	10 Aug 2002 02:42:30 -0000	1.4
  @@ -315,7 +315,7 @@
   /*
    * convert filter function
    */
  -static const mbfl_convert_function cvfn_euckr_wchar = {
  +static mbfl_convert_function cvfn_euckr_wchar = {
   	"euckr_wchar",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -324,7 +324,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_wchar_euckr = {
  +static mbfl_convert_function cvfn_wchar_euckr = {
   	"wchar_euckr",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -333,7 +333,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_uhc_wchar = {
  +static mbfl_convert_function cvfn_uhc_wchar = {
   	"uhc_wchar",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -342,7 +342,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_wchar_uhc = {
  +static mbfl_convert_function cvfn_wchar_uhc = {
   	"wchar_uhc",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -355,43 +355,39 @@
   /*
    * convert filter collection
    */
  -static const mbfl_convert_collection conv_euckr_wchar = {
  +static mbfl_convert_collection conv_euckr_wchar = {
   	"euckr_wchar",
   	php_mb_encid_euc_kr,
   	php_mb_encid_wchar,
   	&cvfn_euckr_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_wchar_euckr = {
  +static mbfl_convert_collection conv_wchar_euckr = {
   	"wchar_euckr",
   	php_mb_encid_wchar,
   	php_mb_encid_euc_kr,
   	&cvfn_wchar_euckr,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_uhc_wchar = {
  +static mbfl_convert_collection conv_uhc_wchar = {
   	"uhc_wchar",
   	php_mb_encid_uhc,
   	php_mb_encid_wchar,
   	&cvfn_uhc_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_wchar_uhc = {
  +static mbfl_convert_collection conv_wchar_uhc = {
   	"wchar_uhc",
   	php_mb_encid_wchar,
   	php_mb_encid_uhc,
   	&cvfn_wchar_uhc,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  @@ -400,17 +396,15 @@
   /*
    * filter list
    */
  -#if 0
  -const mbfl_convert_function * mbfl_convert_function_list_kr[] = {
  +mbfl_convert_function * mbfl_convert_function_list_kr[] = {
   	&cvfn_euckr_wchar,
   	&cvfn_wchar_euckr,
   	&cvfn_uhc_wchar,
   	&cvfn_wchar_uhc,
   	NULL
   };
  -#endif
   
  -const mbfl_convert_collection * mbfl_convert_collection_list_kr[] = {
  +mbfl_convert_collection * mbfl_convert_collection_list_kr[] = {
   	&conv_euckr_wchar,
   	&conv_wchar_euckr,
   	&conv_uhc_wchar,
  @@ -419,7 +413,7 @@
   };
   
   
  -const mbfl_identify_function * mbfl_identify_function_list_kr[] = {
  +mbfl_identify_function * mbfl_identify_function_list_kr[] = {
   	NULL
   };
   
  
  
  
  1.6       +15 -21    php4/ext/mbstring/mbfilter_tw.c
  
  Index: mbfilter_tw.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/php4/ext/mbstring/mbfilter_tw.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mbfilter_tw.c	2 Jun 2002 17:47:15 -0000	1.5
  +++ mbfilter_tw.c	10 Aug 2002 02:42:30 -0000	1.6
  @@ -327,7 +327,7 @@
   /*
    * convert filter function
    */
  -static const mbfl_convert_function cvfn_euctw_wchar = {
  +static mbfl_convert_function cvfn_euctw_wchar = {
   	"euctw_wchar",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -336,7 +336,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_wchar_euctw = {
  +static mbfl_convert_function cvfn_wchar_euctw = {
   	"wchar_euctw",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -345,7 +345,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_big5_wchar = {
  +static mbfl_convert_function cvfn_big5_wchar = {
   	"big5_wchar",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -354,7 +354,7 @@
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_function cvfn_wchar_big5 = {
  +static mbfl_convert_function cvfn_wchar_big5 = {
   	"wchar_big5",
   	mbfl_filt_conv_common_ctor,
   	mbfl_filt_conv_common_dtor,
  @@ -367,43 +367,39 @@
   /*
    * convert filter collection
    */
  -static const mbfl_convert_collection conv_euctw_wchar = {
  +static mbfl_convert_collection conv_euctw_wchar = {
   	"euctw_wchar",
   	php_mb_encid_euc_tw,
   	php_mb_encid_wchar,
   	&cvfn_euctw_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_wchar_euctw = {
  +static mbfl_convert_collection conv_wchar_euctw = {
   	"wchar_euctw",
   	php_mb_encid_wchar,
   	php_mb_encid_euc_tw,
   	&cvfn_wchar_euctw,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_big5_wchar = {
  +static mbfl_convert_collection conv_big5_wchar = {
   	"big5_wchar",
   	php_mb_encid_big5,
   	php_mb_encid_wchar,
   	&cvfn_big5_wchar,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  -static const mbfl_convert_collection conv_wchar_big5 = {
  +static mbfl_convert_collection conv_wchar_big5 = {
   	"wchar_big5",
   	php_mb_encid_wchar,
   	php_mb_encid_big5,
   	&cvfn_wchar_big5,
  -	NULL,
  -	NULL,
  +	mbfl_convert_table_list_empty,
   	MBFL_MEMORY_TYPE_CONST
   };
   
  @@ -412,17 +408,15 @@
   /*
    * filter list
    */
  -#if 0
  -const mbfl_convert_function * mbfl_convert_function_list_tw[] = {
  +mbfl_convert_function * mbfl_convert_function_list_tw[] = {
   	&cvfn_euctw_wchar,
   	&cvfn_wchar_euctw,
   	&cvfn_big5_wchar,
   	&cvfn_wchar_big5,
   	NULL
   };
  -#endif
   
  -const mbfl_convert_collection * mbfl_convert_collection_list_tw[] = {
  +mbfl_convert_collection * mbfl_convert_collection_list_tw[] = {
   	&conv_euctw_wchar,
   	&conv_wchar_euctw,
   	&conv_big5_wchar,
  @@ -431,7 +425,7 @@
   };
   
   
  -const mbfl_identify_function * mbfl_identify_function_list_tw[] = {
  +mbfl_identify_function * mbfl_identify_function_list_tw[] = {
   	NULL
   };
   
  
  
  



php-i18n-commits メーリングリストの案内
Zurück zum Archiv-Index