summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs/emu_jisx0213_2000.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-10-28 23:19:27 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-10-28 23:19:27 (GMT)
commit14c9fea60aa6884586c0a87046b308c2af76d38d (patch)
tree81c61ca9de204a341e7b1e21b4ffa11bb4785e81 /Modules/cjkcodecs/emu_jisx0213_2000.h
parent146a2ed0f29a338abe7ea954604ee0f68b35c37f (diff)
downloadcpython-14c9fea60aa6884586c0a87046b308c2af76d38d.zip
cpython-14c9fea60aa6884586c0a87046b308c2af76d38d.tar.gz
cpython-14c9fea60aa6884586c0a87046b308c2af76d38d.tar.bz2
CJK codecs: less magic macros, require explicit semicolon
Diffstat (limited to 'Modules/cjkcodecs/emu_jisx0213_2000.h')
-rw-r--r--Modules/cjkcodecs/emu_jisx0213_2000.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/Modules/cjkcodecs/emu_jisx0213_2000.h b/Modules/cjkcodecs/emu_jisx0213_2000.h
index 877337e..672eb06 100644
--- a/Modules/cjkcodecs/emu_jisx0213_2000.h
+++ b/Modules/cjkcodecs/emu_jisx0213_2000.h
@@ -11,17 +11,20 @@
(c) == 0x525D || (c) == 0x541E || \
(c) == 0x5653 || (c) == 0x59F8 || \
(c) == 0x5C5B || (c) == 0x5E77 || \
- (c) == 0x7626 || (c) == 0x7E6B)) \
+ (c) == 0x7626 || (c) == 0x7E6B)) { \
return EMULATE_JISX0213_2000_ENCODE_INVALID; \
- else if (config == (void *)2000 && (c) == 0x9B1D) \
+ } \
+ else if (config == (void *)2000 && (c) == 0x9B1D) { \
(assi) = 0x8000 | 0x7d3b; \
+ }
#define EMULATE_JISX0213_2000_ENCODE_EMP(assi, c) \
- if (config == (void *)2000 && (c) == 0x20B9F) \
- return EMULATE_JISX0213_2000_ENCODE_INVALID;
+ if (config == (void *)2000 && (c) == 0x20B9F) { \
+ return EMULATE_JISX0213_2000_ENCODE_INVALID; \
+ }
#ifndef EMULATE_JISX0213_2000_DECODE_INVALID
-#define EMULATE_JISX0213_2000_DECODE_INVALID 2
+# define EMULATE_JISX0213_2000_DECODE_INVALID 2
#endif
#define EMULATE_JISX0213_2000_DECODE_PLANE1(assi, c1, c2) \
@@ -35,12 +38,17 @@
((c1) == 0x7E && (c2) == 0x7B) || \
((c1) == 0x7E && (c2) == 0x7C) || \
((c1) == 0x7E && (c2) == 0x7D) || \
- ((c1) == 0x7E && (c2) == 0x7E))) \
- return EMULATE_JISX0213_2000_DECODE_INVALID;
-
-#define EMULATE_JISX0213_2000_DECODE_PLANE2(writer, c1, c2) \
- if (config == (void *)2000 && (c1) == 0x7D && (c2) == 0x3B) \
- OUTCHAR(0x9B1D);
-#define EMULATE_JISX0213_2000_DECODE_PLANE2_CHAR(assi, c1, c2) \
- if (config == (void *)2000 && (c1) == 0x7D && (c2) == 0x3B) \
- (assi) = 0x9B1D;
+ ((c1) == 0x7E && (c2) == 0x7E))) { \
+ return EMULATE_JISX0213_2000_DECODE_INVALID; \
+ }
+
+#define EMULATE_JISX0213_2000_DECODE_PLANE2(writer, c1, c2) \
+ if (config == (void *)2000 && (c1) == 0x7D && (c2) == 0x3B) { \
+ OUTCHAR(0x9B1D); \
+ }
+
+#define EMULATE_JISX0213_2000_DECODE_PLANE2_CHAR(assi, c1, c2) \
+ if (config == (void *)2000 && (c1) == 0x7D && (c2) == 0x3B) { \
+ (assi) = 0x9B1D; \
+ }
+