]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.10/Modules/cjkcodecs/alg_jisx0201.h
AppPkg/Applications/Python/Python-2.7.10: Initial Checkin part 2/5.
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Modules / cjkcodecs / alg_jisx0201.h
CommitLineData
7eb75bcc
DM
1#define JISX0201_R_ENCODE(c, assi) \\r
2 if ((c) < 0x80 && (c) != 0x5c && (c) != 0x7e) \\r
3 (assi) = (c); \\r
4 else if ((c) == 0x00a5) (assi) = 0x5c; \\r
5 else if ((c) == 0x203e) (assi) = 0x7e;\r
6#define JISX0201_K_ENCODE(c, assi) \\r
7 if ((c) >= 0xff61 && (c) <= 0xff9f) \\r
8 (assi) = (c) - 0xfec0;\r
9#define JISX0201_ENCODE(c, assi) \\r
10 JISX0201_R_ENCODE(c, assi) \\r
11 else JISX0201_K_ENCODE(c, assi)\r
12\r
13#define JISX0201_R_DECODE(c, assi) \\r
14 if ((c) < 0x5c) (assi) = (c); \\r
15 else if ((c) == 0x5c) (assi) = 0x00a5; \\r
16 else if ((c) < 0x7e) (assi) = (c); \\r
17 else if ((c) == 0x7e) (assi) = 0x203e; \\r
18 else if ((c) == 0x7f) (assi) = 0x7f;\r
19#define JISX0201_K_DECODE(c, assi) \\r
20 if ((c) >= 0xa1 && (c) <= 0xdf) \\r
21 (assi) = 0xfec0 + (c);\r
22#define JISX0201_DECODE(c, assi) \\r
23 JISX0201_R_DECODE(c, assi) \\r
24 else JISX0201_K_DECODE(c, assi)\r