mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
CJK codecs: add newlines for readability
This commit is contained in:
parent
bd97ac35f7
commit
146a2ed0f2
7 changed files with 188 additions and 91 deletions
|
|
@ -29,8 +29,10 @@ ENCODER(big5)
|
|||
|
||||
REQUIRE_OUTBUF(2)
|
||||
|
||||
if (TRYMAP_ENC(big5, code, c));
|
||||
else return 1;
|
||||
if (TRYMAP_ENC(big5, code, c))
|
||||
;
|
||||
else
|
||||
return 1;
|
||||
|
||||
OUTBYTE1(code >> 8)
|
||||
OUTBYTE2(code & 0xFF)
|
||||
|
|
@ -84,9 +86,12 @@ ENCODER(cp950)
|
|||
return 1;
|
||||
|
||||
REQUIRE_OUTBUF(2)
|
||||
if (TRYMAP_ENC(cp950ext, code, c));
|
||||
else if (TRYMAP_ENC(big5, code, c));
|
||||
else return 1;
|
||||
if (TRYMAP_ENC(cp950ext, code, c))
|
||||
;
|
||||
else if (TRYMAP_ENC(big5, code, c))
|
||||
;
|
||||
else
|
||||
return 1;
|
||||
|
||||
OUTBYTE1(code >> 8)
|
||||
OUTBYTE2(code & 0xFF)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue