]> granicus.if.org Git - php/commitdiff
Don't short-circuit MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 9 Aug 2019 14:33:21 +0000 (16:33 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 9 Aug 2019 14:33:21 +0000 (16:33 +0200)
Make sure we always go through mbfl_filt_conv_illegal_output(), so
that the number of illegal characters gets counted.

54 files changed:
ext/mbstring/libmbfl/filters/mbfilter_armscii8.c
ext/mbstring/libmbfl/filters/mbfilter_ascii.c
ext/mbstring/libmbfl/filters/mbfilter_big5.c
ext/mbstring/libmbfl/filters/mbfilter_cp1251.c
ext/mbstring/libmbfl/filters/mbfilter_cp1252.c
ext/mbstring/libmbfl/filters/mbfilter_cp1254.c
ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c
ext/mbstring/libmbfl/filters/mbfilter_cp51932.c
ext/mbstring/libmbfl/filters/mbfilter_cp850.c
ext/mbstring/libmbfl/filters/mbfilter_cp866.c
ext/mbstring/libmbfl/filters/mbfilter_cp932.c
ext/mbstring/libmbfl/filters/mbfilter_cp936.c
ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c
ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c
ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c
ext/mbstring/libmbfl/filters/mbfilter_euc_kr.c
ext/mbstring/libmbfl/filters/mbfilter_euc_tw.c
ext/mbstring/libmbfl/filters/mbfilter_gb18030.c
ext/mbstring/libmbfl/filters/mbfilter_hz.c
ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c
ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c
ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.c
ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.c
ext/mbstring/libmbfl/filters/mbfilter_jis.c
ext/mbstring/libmbfl/filters/mbfilter_koi8r.c
ext/mbstring/libmbfl/filters/mbfilter_koi8u.c
ext/mbstring/libmbfl/filters/mbfilter_sjis.c
ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c
ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c
ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c
ext/mbstring/libmbfl/filters/mbfilter_ucs2.c
ext/mbstring/libmbfl/filters/mbfilter_ucs4.c
ext/mbstring/libmbfl/filters/mbfilter_uhc.c
ext/mbstring/libmbfl/filters/mbfilter_utf16.c
ext/mbstring/libmbfl/filters/mbfilter_utf32.c
ext/mbstring/libmbfl/filters/mbfilter_utf7.c
ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c
ext/mbstring/libmbfl/filters/mbfilter_utf8.c
ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c
ext/mbstring/libmbfl/mbfl/mbfl_convert.c

index bfe3763f18042c22154eef32f059820519829d12..599c1485fbb299ed15eb2ae6d2ec209800591cbb 100644 (file)
@@ -133,9 +133,7 @@ int mbfl_filt_conv_wchar_armscii8(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index b3c1161d32c11648fb51cadea80428d1b6f89f28..71bd5b46fa198a5875dd494c6185b7337cf9923a 100644 (file)
@@ -94,9 +94,7 @@ int mbfl_filt_conv_wchar_ascii(int c, mbfl_convert_filter *filter)
        if (c >= 0 && c < 0x80) {
                CK((*filter->output_function)(c, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index c2cb9a1005bf9b00660d9364c5e18357d15e34e0..0fc57d62b1bb388155e3f1abee2707a1457e28d0 100644 (file)
@@ -319,9 +319,7 @@ mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 13a2b222ed2d131117065f127461895072094d63..fec1b6f807a2e4256136bbf0f5e991a2d2f3d443 100644 (file)
@@ -133,9 +133,7 @@ mbfl_filt_conv_wchar_cp1251(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 7c628da2f34b31a6b23a9f1a0b590b881419d2b4..a668364a5b8a3614ca9115ac51aede5f073ad5d3 100644 (file)
@@ -106,9 +106,7 @@ int mbfl_filt_conv_wchar_cp1252(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
        return c;
 }
index ae63aed6e1c42b8daf4eb5f7501f5c69537862b5..89fc4b6f59a037758c38fdf13dc8801111ed737e 100644 (file)
@@ -105,9 +105,7 @@ mbfl_filt_conv_wchar_cp1254(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index c6012ff682b9e1ef6f1f8abf1009a15422fbe745..dd3d1949fa45dcb1a26d64917e35d9b4416161d9 100644 (file)
@@ -563,9 +563,7 @@ mbfl_filt_conv_wchar_jis_ms(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
@@ -776,9 +774,7 @@ mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)((s >> 8) & 0x7f, filter->data));
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                } else if (s < 0x10000) { /* X0212 */
-                       if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                               CK(mbfl_filt_conv_illegal_output(c, filter));
-                       }
+                       CK(mbfl_filt_conv_illegal_output(c, filter));
                } else { /* X 0201 latin */
                        if ((filter->status & 0xff00) != 0x400) {
                                CK((*filter->output_function)(0x1b, filter->data));             /* ESC */
@@ -789,9 +785,7 @@ mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
@@ -928,9 +922,7 @@ mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)((s >> 8) & 0x7f, filter->data));
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                } else if (s < 0x10000) { /* X0212 */
-                       if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                               CK(mbfl_filt_conv_illegal_output(c, filter));
-                       }
+                       CK(mbfl_filt_conv_illegal_output(c, filter));
                } else { /* X 0201 latin */
                        if ((filter->status & 0xff00) == 0x500) {
                                CK((*filter->output_function)(0x0f, filter->data));             /* SO */
@@ -945,9 +937,7 @@ mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 8b931ba6d0dcba531003ecefac7b286496d13a5e..189feb2141c1651982a750ccc776ead320aca94c 100644 (file)
@@ -294,14 +294,10 @@ mbfl_filt_conv_wchar_cp51932(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(((s1 >> 8) & 0xff) | 0x80, filter->data));
                        CK((*filter->output_function)((s1 & 0xff) | 0x80, filter->data));
                } else {
-                 if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
                    CK(mbfl_filt_conv_illegal_output(c, filter));
-                 }
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 9f47664fbe9958198b6bf0fa4c341d3e9e09e4da..38f42b8695991bcc138d3aa6ff70d1ac8a2e82e9 100644 (file)
@@ -129,9 +129,7 @@ mbfl_filt_conv_wchar_cp850(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index c4668dcd5728c32c6bc92631b12e06b229ffc68f..6f2d602112f36693013e7258ffdde65fc91c1547 100644 (file)
@@ -133,9 +133,7 @@ mbfl_filt_conv_wchar_cp866(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index d4936d9dcda0bcdd254cb7b2b481ef02f89ae114..dcadc4eaa71de40a58abcff0f69facfd3df4e207 100644 (file)
@@ -321,9 +321,7 @@ mbfl_filt_conv_wchar_cp932(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s2, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 047eb62a140234611975765624054c410c09d982..95eb6e801514df0c5180fa6b97e17d6683a4198a 100644 (file)
@@ -281,9 +281,7 @@ mbfl_filt_conv_wchar_cp936(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 08be6f329864c92b027bb6e9a7d8ba76a873d96a..13a14855ec1897178954034463faa7ee41d3c101 100644 (file)
@@ -207,9 +207,7 @@ mbfl_filt_conv_wchar_euccn(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 1d98873976494531f3e1b1c1979d75930032a531..aeeac851e44bc2cf6b35bbf6aa212e7ba444ca2f 100644 (file)
@@ -269,9 +269,7 @@ mbfl_filt_conv_wchar_eucjp(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)((s & 0xff) | 0x80, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 20e065155480f7b63de4c6e2b6cad8a3979a23c9..4c26e38fa869951501dd3e3ac4ecfdf1de0a3ba1 100644 (file)
@@ -373,9 +373,7 @@ mbfl_filt_conv_wchar_eucjpwin(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)((s1 & 0xff) | 0x80, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index ee8dc926f08655e89d53d44d1852c7f005aa611c..8509ef4dd2ca027c9e8eefee51705a13f5028c15 100644 (file)
@@ -221,9 +221,7 @@ mbfl_filt_conv_wchar_euckr(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 141a2fee7c5df6f24d31c7319c2d5baf1a718182..290d8b83fbddfeb99177e095c08e06f6073f73f7 100644 (file)
@@ -270,9 +270,7 @@ mbfl_filt_conv_wchar_euctw(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
        return c;
 }
index 6369542e2e469105f47d6f7304a85622953a517d..f8d2e1954a8d1ec57d40cdc0dd04f96c53e03e06 100644 (file)
@@ -412,9 +412,7 @@ mbfl_filt_conv_wchar_gb18030(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 570fcb4fffbb16a42efc776763105208dfff7fdf..0e360726ed0e2f4fe1bc44602c0569558fbcd53f 100644 (file)
@@ -211,9 +211,7 @@ mbfl_filt_conv_wchar_hz(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 4e8b974923dedd5b7c090106a9f479861d36abc5..cec21c26f2ae1aa257040e4bbe06bb8c031fe59d 100644 (file)
@@ -408,9 +408,7 @@ mbfl_filt_conv_wchar_2022jpms(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s1 & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index cc0e3653f2e75d5d5a86a431e9d9965dffd72eef..bd1227e6a56270ac7eec7aad2b095b135d537ed6 100644 (file)
@@ -263,9 +263,7 @@ mbfl_filt_conv_wchar_2022kr(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 3847f78aa16c929df6bda9fefbc42180ba5168ae..11307682d637342216af0edcf16f0ffb99d3c167 100644 (file)
@@ -426,9 +426,7 @@ mbfl_filt_conv_wchar_2022jp_mobile(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s1 & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 9279fe8713408a30eaaaee1fc85b8dfc63109c21..2b75b51e58ce8eb40bb81e8f588edd76ded75b08 100644 (file)
@@ -91,9 +91,7 @@ int mbfl_filt_conv_wchar_8859_1(int c, mbfl_convert_filter *filter)
        if (c >= 0 && c < 0x100) {
                CK((*filter->output_function)(c, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index f6c6297151fc73f678f863aeb44aca4094faea0e..bb050df3286ff466aabe1da82c83f08a644b9c21 100644 (file)
@@ -129,9 +129,7 @@ int mbfl_filt_conv_wchar_8859_10(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index fc039892e092e108e79d1eb54729e6547009865f..5398abd4f7b033325a25821a10fc444704de8714 100644 (file)
@@ -129,9 +129,7 @@ int mbfl_filt_conv_wchar_8859_13(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index db16cd6a7b8076ea9b1a943861c63307fbc0f78d..bd07ac7b61109ae38e8fc94e1f2e639a0211bfb1 100644 (file)
@@ -129,9 +129,7 @@ int mbfl_filt_conv_wchar_8859_14(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 74e5a2dde7375cb17748a60ab07f68c75c9d0ba7..a564ac4fcf122a700f7e0f50750f5706a4033216 100644 (file)
@@ -129,9 +129,7 @@ int mbfl_filt_conv_wchar_8859_15(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 68da24f5339f27e731380b1353479583122a0d50..26008220066eee791d1d864b7f39cb556f623e24 100644 (file)
@@ -129,9 +129,7 @@ int mbfl_filt_conv_wchar_8859_16(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index dcc05a00d17c62d9693301c08b2b574f2e3b5c6e..245cc914dc617e15450312f8805824fa57ff0227 100644 (file)
@@ -130,9 +130,7 @@ int mbfl_filt_conv_wchar_8859_2(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 61fbde6f4c89dcb3066dd5d103bde976ac0dfd15..557983b7a7ca699235ad2a6fd3633bcd32040a18 100644 (file)
@@ -130,9 +130,7 @@ int mbfl_filt_conv_wchar_8859_3(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index f5a8aa730784987d91cceeb7770fbd807a3baa35..f481e01465799ca3cd4393319a8b43bb942d07e2 100644 (file)
@@ -128,9 +128,7 @@ int mbfl_filt_conv_wchar_8859_4(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 629caa1081e7819fa9e2df64df2f3f745832ab57..d00a0afff472679487e65d24fd17dc11c1aca17c 100644 (file)
@@ -130,9 +130,7 @@ int mbfl_filt_conv_wchar_8859_5(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index d3f5f559f28a94535d8736ee45080d2c855624b5..45120cf487f67ea379183974105e22e8213e93af 100644 (file)
@@ -130,9 +130,7 @@ int mbfl_filt_conv_wchar_8859_6(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index a11d1f57fffb5fe397091db5a5c5099909b0b758..79fe4d75099bc098a80dea7f6da0b43519d51893 100644 (file)
@@ -130,9 +130,7 @@ int mbfl_filt_conv_wchar_8859_7(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index fb4020a4ad59e6022b80465fc254828c269c0fb3..a7124d3e4ea7f7c23e4137debd9509218e9d938b 100644 (file)
@@ -129,9 +129,7 @@ int mbfl_filt_conv_wchar_8859_8(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 1e368ba5b6a31d8c1cd9bf11ea69e78abe77085c..ba71bfd6a4f2fc0859d150fe3c293aa98db4700d 100644 (file)
@@ -129,9 +129,7 @@ int mbfl_filt_conv_wchar_8859_9(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 8985456d722b002f86e6de6536fee193036def90..f3bd3f814129d14a4f293eae63caa92890602724 100644 (file)
@@ -381,9 +381,7 @@ mbfl_filt_conv_wchar_jis(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
@@ -464,9 +462,7 @@ mbfl_filt_conv_wchar_2022jp(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0x7f, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 101b3f1c85bf2a2e834a893869b61148c1ef5452..a9a4479aed2185bec6b3ae63f3f42212c7b0f91a 100644 (file)
@@ -133,9 +133,7 @@ mbfl_filt_conv_wchar_koi8r(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 25174326f703f52eaf0944e5dd8e6af1494945f7..675ea03955d3a503c0efccd15becf89201375ba9 100644 (file)
@@ -130,9 +130,7 @@ mbfl_filt_conv_wchar_koi8u(int c, mbfl_convert_filter *filter)
        if (s >= 0) {
                CK((*filter->output_function)(s, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 5dab2bcbb65fdc3cb911a8a63749bae67429d61e..73ded6c7043e563500d29a07e908a4cbc17b5a40 100644 (file)
@@ -270,9 +270,7 @@ mbfl_filt_conv_wchar_sjis(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s2, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index da25160b4d0d7386bda4f431e1c1079c8acc436d..ac476b3e19af82b5d40c4b19eeebc690db42f016 100644 (file)
@@ -668,9 +668,7 @@ retry:
                        CK((*filter->output_function)(s2, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index a1cfa7252138a856685daba413b9222721f8460c..8bc8e6e68f747218d04198f2c3684049072c86e0 100644 (file)
@@ -364,9 +364,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
                                CK((*filter->output_function)(s1 & 0xff, filter->data));
                        }
                } else {
-                       if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                               CK(mbfl_filt_conv_illegal_output(c, filter));
-                       }
+                       CK(mbfl_filt_conv_illegal_output(c, filter));
                }
 
                if (s2 <= 0 || s1 == -1) {
@@ -488,9 +486,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
                                CK((*filter->output_function)(s2, filter->data));
                        }
                } else {
-                       if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                               CK(mbfl_filt_conv_illegal_output(c, filter));
-                       }
+                       CK(mbfl_filt_conv_illegal_output(c, filter));
                }
                break;
 
@@ -525,7 +521,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
                        }
                }
 
-               if (filter->status == 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
+               if (filter->status == 0) {
                        CK(mbfl_filt_conv_illegal_output(c1, filter));
                        CK(mbfl_filt_conv_illegal_output(c, filter));
                }
@@ -556,7 +552,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
                                CK((*filter->output_function)(s2, filter->data));
                        }
 
-                       if (s1 <= 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
+                       if (s1 <= 0) {
                                CK(mbfl_filt_conv_illegal_output(0xf860, filter));
                                CK(mbfl_filt_conv_illegal_output(c1, filter));
                                CK(mbfl_filt_conv_illegal_output(c, filter));
@@ -605,7 +601,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
                                CK((*filter->output_function)(s2, filter->data));
                        }
 
-                       if (s1 <= 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
+                       if (s1 <= 0) {
                                CK(mbfl_filt_conv_illegal_output(0xf861, filter));
                                for (i=0; i<3; i++) {
                                        if (c1 == code_tbl_m[i+5][3]) {
@@ -651,7 +647,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
                                CK((*filter->output_function)(s2, filter->data));
                        }
 
-                       if (s1 <= 0 && filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
+                       if (s1 <= 0) {
                                CK(mbfl_filt_conv_illegal_output(0xf862, filter));
                                for (i=0; i<4; i++) {
                                        if (c1 == code_tbl_m[i+8][4]) {
index 3dd2e213c6de4deaf81605d6582f5131d5c28e09..316250ddb2133cc79c0848d5d1a9bc1019bd42a8 100644 (file)
@@ -905,9 +905,7 @@ mbfl_filt_conv_wchar_sjis_mobile(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s2, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index fcf2953108609113eb4bb489491c66a11b5d141b..855b6eda8b8dc4d20e7c71fd9763e16c45a58e51 100644 (file)
@@ -321,9 +321,7 @@ mbfl_filt_conv_wchar_sjis_open(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s2, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 76886695dd71c83ced970a49beb98e38e7af9181..da42ef10f527f409168bdc4df0b84ae768016f95 100644 (file)
@@ -195,9 +195,7 @@ int mbfl_filt_conv_wchar_ucs2be(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
                CK((*filter->output_function)(c & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
@@ -232,9 +230,7 @@ int mbfl_filt_conv_wchar_ucs2le(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)(c & 0xff, filter->data));
                CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 0b85a6f3395cbaa2d4434c62c4cc2de9c32d0e7d..26ae5d47ccb873444e340e80c1ac458a0696430e 100644 (file)
@@ -224,9 +224,7 @@ int mbfl_filt_conv_wchar_ucs4be(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
                CK((*filter->output_function)(c & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
@@ -270,9 +268,7 @@ int mbfl_filt_conv_wchar_ucs4le(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)((c >> 16) & 0xff, filter->data));
                CK((*filter->output_function)((c >> 24) & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 1c1db5f42a0718d13572f4ec2c934fd0db10f766..7995c812c257821cff19ad7c2df5267089d6bd24 100644 (file)
@@ -218,9 +218,7 @@ mbfl_filt_conv_wchar_uhc(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)(s & 0xff, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 8772d8d5be4a3d62ca29db5748c1ed8ba0fa9c24..961bfdcaf3a1da8175d548b951b160f22bc8036f 100644 (file)
@@ -245,9 +245,7 @@ int mbfl_filt_conv_wchar_utf16be(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)((n >> 8) & 0xff, filter->data));
                CK((*filter->output_function)(n & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
@@ -310,9 +308,7 @@ int mbfl_filt_conv_wchar_utf16le(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)(n & 0xff, filter->data));
                CK((*filter->output_function)((n >> 8) & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index b1b41331eb69ed138f814f95d038e6209792a024..9f7ddf1deaf0aacc17a20c484bb34114ee394a51 100644 (file)
@@ -233,9 +233,7 @@ int mbfl_filt_conv_wchar_utf32be(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
                CK((*filter->output_function)(c & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
@@ -284,9 +282,7 @@ int mbfl_filt_conv_wchar_utf32le(int c, mbfl_convert_filter *filter)
                CK((*filter->output_function)((c >> 16) & 0xff, filter->data));
                CK((*filter->output_function)((c >> 24) & 0xff, filter->data));
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 5c13e45b8efa51252643b902a64f60248d756906..901c1a4a8b2be08324a89dd9040bb51978d9cd38 100644 (file)
@@ -296,9 +296,7 @@ int mbfl_filt_conv_wchar_utf7(int c, mbfl_convert_filter *filter)
                CK((*filter->filter_function)(s, filter));
                return c;
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
                return c;
        }
 
index c4d2b5c42d170077598c3c09abe54e70863e8012..4203124cc3ce4acf5faa6ef3fba9d77e4eb22a66 100644 (file)
@@ -251,9 +251,7 @@ int mbfl_filt_conv_wchar_utf7imap(int c, mbfl_convert_filter *filter)
                CK((*filter->filter_function)(s, filter));
                return c;
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
                return c;
        }
 
index 1e2ad5b9599a7a5bb963176d1cec731759d10e56..05815bbdb04d15029d584c71e75380f544ee5ca4 100644 (file)
@@ -234,9 +234,7 @@ int mbfl_filt_conv_wchar_utf8(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index 060cd90860fbc0672737b261d8e0c90ecf7ef7ce..3e166609e750bf7271ac51b181d03cc8b1b017e3 100644 (file)
@@ -339,9 +339,7 @@ int mbfl_filt_conv_wchar_utf8_mobile(int c, mbfl_convert_filter *filter)
                        CK((*filter->output_function)((c & 0x3f) | 0x80, filter->data));
                }
        } else {
-               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
-                       CK(mbfl_filt_conv_illegal_output(c, filter));
-               }
+               CK(mbfl_filt_conv_illegal_output(c, filter));
        }
 
        return c;
index e13838f4ca21281479f838deb37a18ee7c229de5..04e0a13de9e0f3f592092fe38510f9572668f4ff 100644 (file)
@@ -427,6 +427,7 @@ mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter)
                        }
                }
                break;
+       case MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE:
        default:
                break;
        }