mirror of
https://github.com/python/cpython.git
synced 2025-10-28 17:13:08 +00:00
(Merge 3.2) Issue #12016: Reindent decoders of HK and JP codecs
This commit is contained in:
commit
2bc6c2ec2f
2 changed files with 49 additions and 48 deletions
|
|
@ -115,14 +115,15 @@ DECODER(big5hkscs)
|
|||
|
||||
REQUIRE_INBUF(2)
|
||||
|
||||
if (0xc6 <= c && c <= 0xc8 && (c >= 0xc7 || IN2 >= 0xa1))
|
||||
goto hkscsdec;
|
||||
|
||||
if (0xc6 > c || c > 0xc8 || (c < 0xc7 && IN2 < 0xa1)) {
|
||||
TRYMAP_DEC(big5, **outbuf, c, IN2) {
|
||||
NEXT(2, 1)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) {
|
||||
}
|
||||
|
||||
TRYMAP_DEC(big5hkscs, decoded, c, IN2)
|
||||
{
|
||||
int s = BH2S(c, IN2);
|
||||
const unsigned char *hintbase;
|
||||
|
||||
|
|
@ -152,8 +153,9 @@ hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) {
|
|||
OUT1(decoded)
|
||||
NEXT(2, 1)
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
|
||||
switch ((c << 8) | IN2) {
|
||||
case 0x8862: WRITE2(0x00ca, 0x0304); break;
|
||||
case 0x8864: WRITE2(0x00ca, 0x030c); break;
|
||||
|
|
@ -164,7 +166,6 @@ hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) {
|
|||
|
||||
NEXT(2, 2) /* all decoded codepoints are pairs, above. */
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue