hirokawa Wed, 03 Aug 2011 12:09:28 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314159
Log:
MF PHP_5_4.
Changed paths:
U php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c
U php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h
Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c
===================================================================
--- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c
2011-08-03 11:55:43 UTC (rev 314158)
+++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c
2011-08-03 12:09:28 UTC (rev 314159)
@@ -139,7 +139,7 @@
mbfl_filt_conv_common_ctor,
mbfl_filt_conv_common_dtor,
mbfl_filt_conv_wchar_sjis_mobile,
- mbfl_filt_conv_common_flush
+ mbfl_filt_conv_sjis_mobile_flush
};
const struct mbfl_convert_vtbl vtbl_sjis_kddi_wchar = {
@@ -157,7 +157,7 @@
mbfl_filt_conv_common_ctor,
mbfl_filt_conv_common_dtor,
mbfl_filt_conv_wchar_sjis_mobile,
- mbfl_filt_conv_common_flush
+ mbfl_filt_conv_sjis_mobile_flush
};
const struct mbfl_convert_vtbl vtbl_sjis_sb_wchar = {
@@ -175,7 +175,7 @@
mbfl_filt_conv_common_ctor,
mbfl_filt_conv_common_dtor,
mbfl_filt_conv_wchar_sjis_mobile,
- mbfl_filt_conv_common_flush
+ mbfl_filt_conv_sjis_mobile_flush
};
const struct mbfl_convert_vtbl vtbl_sjis_docomo_pua_wchar = {
@@ -1080,6 +1080,23 @@
return c;
}
+int
+mbfl_filt_conv_sjis_mobile_flush(mbfl_convert_filter *filter)
+{
+ int c1 = filter->cache;
+ if (filter->status == 1 && (c1 == 0x0023 || (c1 >= 0x0030 &&
c1<=0x0039))) {
+ CK((*filter->output_function)(c1, filter->data));
+ }
+ filter->status = 0;
+ filter->cache = 0;
+
+ if (filter->flush_function != NULL) {
+ return (*filter->flush_function)(filter->data);
+ }
+
+ return 0;
+}
+
static int mbfl_filt_ident_sjis_mobile(int c, mbfl_identify_filter *filter)
{
if (filter->status) { /* kanji second char */
Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h
===================================================================
--- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h
2011-08-03 11:55:43 UTC (rev 314158)
+++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.h
2011-08-03 12:09:28 UTC (rev 314159)
@@ -60,5 +60,6 @@
int mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter);
int mbfl_filt_conv_wchar_sjis_mobile(int c, mbfl_convert_filter *filter);
+int mbfl_filt_conv_sjis_mobile_flush(mbfl_convert_filter *filter);
#endif /* MBFL_MBFILTER_SJIS_MOBILE_H */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php