summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs/tweak_gbk.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/cjkcodecs/tweak_gbk.h')
-rw-r--r--Modules/cjkcodecs/tweak_gbk.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/cjkcodecs/tweak_gbk.h b/Modules/cjkcodecs/tweak_gbk.h
new file mode 100644
index 0000000..f3a58e3
--- /dev/null
+++ b/Modules/cjkcodecs/tweak_gbk.h
@@ -0,0 +1,11 @@
+/* $CJKCodecs: tweak_gbk.h,v 1.1.1.1 2003/09/24 17:47:00 perky Exp $ */
+
+#define GBK_PREDECODE(dc1, dc2, assi) \
+ if ((dc1) == 0xa1 && (dc2) == 0xaa) (assi) = 0x2014; \
+ else if ((dc1) == 0xa8 && (dc2) == 0x44) (assi) = 0x2015; \
+ else if ((dc1) == 0xa1 && (dc2) == 0xa4) (assi) = 0x00b7;
+#define GBK_PREENCODE(code, assi) \
+ if ((code) == 0x2014) (assi) = 0xa1aa; \
+ else if ((code) == 0x2015) (assi) = 0xa844; \
+ else if ((code) == 0x00b7) (assi) = 0xa1a4;
+