FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Modules/cjkcodecs/alg_jisx0201.h at pythoncapi · pythoncapi/cpython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
pythoncapi
/
cpython
Public
forked from
python/cpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Modules
/
cjkcodecs
/
alg_jisx0201.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
65 lines (60 loc) · 3.06 KB
Breadcrumbs
cpython
/
Modules
/
cjkcodecs
/
alg_jisx0201.h
Copy path
File metadata and controls
65 lines (60 loc) · 3.06 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#define
JISX0201_R_ENCODE
(
c
,
assi
) \
if ((c) < 0x80 && (c) != 0x5c && (c) != 0x7e) { \
(assi) = (c); \
} \
else if ((c) == 0x00a5) { \
(assi) = 0x5c; \
} \
else if ((c) == 0x203e) { \
(assi) = 0x7e; \
}
#define
JISX0201_K_ENCODE
(
c
,
assi
) \
if ((c) >= 0xff61 && (c) <= 0xff9f) { \
(assi) = (c) - 0xfec0; \
}
#define
JISX0201_ENCODE
(
c
,
assi
) \
JISX0201_R_ENCODE(c, assi) \
else JISX0201_K_ENCODE(c, assi)
#define
JISX0201_R_DECODE_CHAR
(
c
,
assi
) \
if ((c) < 0x5c) { \
(assi) = (c); \
} \
else if ((c) == 0x5c) { \
(assi) = 0x00a5; \
} \
else if ((c) < 0x7e) { \
(assi) = (c); \
} \
else if ((c) == 0x7e) { \
(assi) = 0x203e; \
} \
else if ((c) == 0x7f) { \
(assi) = 0x7f; \
}
#define
JISX0201_R_DECODE
(
c
,
writer
) \
if ((c) < 0x5c) { \
OUTCHAR(c); \
} \
else if ((c) == 0x5c) { \
OUTCHAR(0x00a5); \
} \
else if ((c) < 0x7e) { \
OUTCHAR(c); \
} \
else if ((c) == 0x7e) { \
OUTCHAR(0x203e); \
} \
else if ((c) == 0x7f) { \
OUTCHAR(0x7f); \
}
#define
JISX0201_K_DECODE
(
c
,
writer
) \
if ((c) >= 0xa1 && (c) <= 0xdf) { \
OUTCHAR(0xfec0 + (c)); \
}
#define
JISX0201_K_DECODE_CHAR
(
c
,
assi
) \
if ((c) >= 0xa1 && (c) <= 0xdf) { \
(assi) = 0xfec0 + (c); \
}
#define
JISX0201_DECODE
(
c
,
writer
) \
JISX0201_R_DECODE(c, writer) \
else JISX0201_K_DECODE(c, writer)
Back
|
FazBrowse Home
|
New Git URL