|
32 | 32 |
|
33 | 33 | #include "unicode_table_big5.h"
|
34 | 34 |
|
35 |
| -static int mbfl_filt_ident_big5(int c, mbfl_identify_filter *filter); |
36 |
| - |
37 | 35 | static const unsigned char mblen_table_big5[] = { /* 0x81-0xFE */
|
38 | 36 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
39 | 37 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
@@ -77,18 +75,6 @@ const mbfl_encoding mbfl_encoding_cp950 = {
|
77 | 75 | &vtbl_wchar_cp950
|
78 | 76 | };
|
79 | 77 |
|
80 |
| -const struct mbfl_identify_vtbl vtbl_identify_big5 = { |
81 |
| - mbfl_no_encoding_big5, |
82 |
| - mbfl_filt_ident_common_ctor, |
83 |
| - mbfl_filt_ident_big5 |
84 |
| -}; |
85 |
| - |
86 |
| -const struct mbfl_identify_vtbl vtbl_identify_cp950 = { |
87 |
| - mbfl_no_encoding_cp950, |
88 |
| - mbfl_filt_ident_common_ctor, |
89 |
| - mbfl_filt_ident_big5 |
90 |
| -}; |
91 |
| - |
92 | 78 | const struct mbfl_convert_vtbl vtbl_big5_wchar = {
|
93 | 79 | mbfl_no_encoding_big5,
|
94 | 80 | mbfl_no_encoding_wchar,
|
@@ -322,28 +308,3 @@ mbfl_filt_conv_wchar_big5(int c, mbfl_convert_filter *filter)
|
322 | 308 |
|
323 | 309 | return c;
|
324 | 310 | }
|
325 |
| - |
326 |
| -static int mbfl_filt_ident_big5(int c, mbfl_identify_filter *filter) |
327 |
| -{ |
328 |
| - int c1; |
329 |
| - if (filter->encoding->no_encoding == mbfl_no_encoding_cp950) { |
330 |
| - c1 = 0x80; |
331 |
| - } else { |
332 |
| - c1 = 0xa0; |
333 |
| - } |
334 |
| - |
335 |
| - if (filter->status) { /* kanji second char */ |
336 |
| - if (c < 0x40 || (c > 0x7e && c < 0xa1) ||c > 0xfe) { /* bad */ |
337 |
| - filter->flag = 1; |
338 |
| - } |
339 |
| - filter->status = 0; |
340 |
| - } else if (c >= 0 && c < 0x80) { /* latin ok */ |
341 |
| - ; |
342 |
| - } else if (c > c1 && c < 0xff) { /* DBCS lead byte */ |
343 |
| - filter->status = 1; |
344 |
| - } else { /* bad */ |
345 |
| - filter->flag = 1; |
346 |
| - } |
347 |
| - |
348 |
| - return c; |
349 |
| -} |
0 commit comments