CJK codecs: use less magic and more readable macros, write explicit if

This commit is contained in:
Victor Stinner 2013-10-28 23:54:13 +01:00
parent 0a6e2c59d3
commit bd97ac35f7
7 changed files with 32 additions and 34 deletions

View file

@ -29,7 +29,7 @@ ENCODER(big5)
REQUIRE_OUTBUF(2)
TRYMAP_ENC(big5, code, c);
if (TRYMAP_ENC(big5, code, c));
else return 1;
OUTBYTE1(code >> 8)
@ -84,8 +84,8 @@ ENCODER(cp950)
return 1;
REQUIRE_OUTBUF(2)
TRYMAP_ENC(cp950ext, code, c);
else TRYMAP_ENC(big5, code, c);
if (TRYMAP_ENC(cp950ext, code, c));
else if (TRYMAP_ENC(big5, code, c));
else return 1;
OUTBYTE1(code >> 8)