mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Minor formatting tweaks in mbfilter_euc_kr.c
This commit is contained in:
parent
958ef47d2b
commit
b1ab76f742
1 changed files with 8 additions and 17 deletions
|
@ -83,12 +83,8 @@ const struct mbfl_convert_vtbl vtbl_wchar_euckr = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
|
||||
#define CK(statement) do { if ((statement) < 0) return (-1); } while (0)
|
||||
|
||||
/*
|
||||
* EUC-KR => wchar
|
||||
*/
|
||||
int
|
||||
mbfl_filt_conv_euckr_wchar(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
|
@ -158,15 +154,10 @@ mbfl_filt_conv_euckr_wchar(int c, mbfl_convert_filter *filter)
|
|||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* wchar => EUC-KR
|
||||
*/
|
||||
int
|
||||
mbfl_filt_conv_wchar_euckr(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
int c1, c2, s;
|
||||
|
||||
s = 0;
|
||||
int c1, c2, s = 0;
|
||||
|
||||
if (c >= ucs_a1_uhc_table_min && c < ucs_a1_uhc_table_max) {
|
||||
s = ucs_a1_uhc_table[c - ucs_a1_uhc_table_min];
|
||||
|
@ -186,8 +177,8 @@ mbfl_filt_conv_wchar_euckr(int c, mbfl_convert_filter *filter)
|
|||
|
||||
c1 = (s >> 8) & 0xff;
|
||||
c2 = s & 0xff;
|
||||
/* exclude UHC extension area */
|
||||
if (c1 < 0xa1 || c2 < 0xa1){
|
||||
/* exclude UHC extension area (although we are using the UHC conversion tables) */
|
||||
if (c1 < 0xa1 || c2 < 0xa1) {
|
||||
s = c;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue