Commit 12581230 authored by Victor Stinner's avatar Victor Stinner

Issue #12016: Reindent decoders of HK and JP codecs

parent f3f3c464
...@@ -115,14 +115,15 @@ DECODER(big5hkscs) ...@@ -115,14 +115,15 @@ DECODER(big5hkscs)
REQUIRE_INBUF(2) REQUIRE_INBUF(2)
if (0xc6 <= c && c <= 0xc8 && (c >= 0xc7 || IN2 >= 0xa1)) if (0xc6 > c || c > 0xc8 || (c < 0xc7 && IN2 < 0xa1)) {
goto hkscsdec;
TRYMAP_DEC(big5, **outbuf, c, IN2) { TRYMAP_DEC(big5, **outbuf, c, IN2) {
NEXT(2, 1) NEXT(2, 1)
continue;
} }
else }
hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) {
TRYMAP_DEC(big5hkscs, decoded, c, IN2)
{
int s = BH2S(c, IN2); int s = BH2S(c, IN2);
const unsigned char *hintbase; const unsigned char *hintbase;
...@@ -152,8 +153,9 @@ hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) { ...@@ -152,8 +153,9 @@ hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) {
OUT1(decoded) OUT1(decoded)
NEXT(2, 1) NEXT(2, 1)
} }
continue;
} }
else {
switch ((c << 8) | IN2) { switch ((c << 8) | IN2) {
case 0x8862: WRITE2(0x00ca, 0x0304); break; case 0x8862: WRITE2(0x00ca, 0x0304); break;
case 0x8864: WRITE2(0x00ca, 0x030c); break; case 0x8864: WRITE2(0x00ca, 0x030c); break;
...@@ -164,7 +166,6 @@ hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) { ...@@ -164,7 +166,6 @@ hkscsdec: TRYMAP_DEC(big5hkscs, decoded, c, IN2) {
NEXT(2, 2) /* all decoded codepoints are pairs, above. */ NEXT(2, 2) /* all decoded codepoints are pairs, above. */
} }
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment