1 /* These routines may be quite inefficient, but it's used only to emulate old 2 * standards. */ 3 4 #ifndef EMULATE_JISX0213_2000_ENCODE_INVALID 5 # define EMULATE_JISX0213_2000_ENCODE_INVALID 1 6 #endif 7 8 #define EMULATE_JISX0213_2000_ENCODE_BMP(assi, c) \ 9 if (config == (void *)2000 && ( \ 10 (c) == 0x9B1C || (c) == 0x4FF1 || \ 11 (c) == 0x525D || (c) == 0x541E || \ 12 (c) == 0x5653 || (c) == 0x59F8 || \ 13 (c) == 0x5C5B || (c) == 0x5E77 || \ 14 (c) == 0x7626 || (c) == 0x7E6B)) { \ 15 return EMULATE_JISX0213_2000_ENCODE_INVALID; \ 16 } \ 17 else if (config == (void *)2000 && (c) == 0x9B1D) { \ 18 (assi) = 0x8000 | 0x7d3b; \ 19 } 20 21 #define EMULATE_JISX0213_2000_ENCODE_EMP(assi, c) \ 22 if (config == (void *)2000 && (c) == 0x20B9F) { \ 23 return EMULATE_JISX0213_2000_ENCODE_INVALID; \ 24 } 25 26 #ifndef EMULATE_JISX0213_2000_DECODE_INVALID 27 # define EMULATE_JISX0213_2000_DECODE_INVALID 2 28 #endif 29 30 #define EMULATE_JISX0213_2000_DECODE_PLANE1(assi, c1, c2) \ 31 if (config == (void *)2000 && \ 32 (((c1) == 0x2E && (c2) == 0x21) || \ 33 ((c1) == 0x2F && (c2) == 0x7E) || \ 34 ((c1) == 0x4F && (c2) == 0x54) || \ 35 ((c1) == 0x4F && (c2) == 0x7E) || \ 36 ((c1) == 0x74 && (c2) == 0x27) || \ 37 ((c1) == 0x7E && (c2) == 0x7A) || \ 38 ((c1) == 0x7E && (c2) == 0x7B) || \ 39 ((c1) == 0x7E && (c2) == 0x7C) || \ 40 ((c1) == 0x7E && (c2) == 0x7D) || \ 41 ((c1) == 0x7E && (c2) == 0x7E))) { \ 42 return EMULATE_JISX0213_2000_DECODE_INVALID; \ 43 } 44 45 #define EMULATE_JISX0213_2000_DECODE_PLANE2(writer, c1, c2) \ 46 if (config == (void *)2000 && (c1) == 0x7D && (c2) == 0x3B) { \ 47 OUTCHAR(0x9B1D); \ 48 } 49 50 #define EMULATE_JISX0213_2000_DECODE_PLANE2_CHAR(assi, c1, c2) \ 51 if (config == (void *)2000 && (c1) == 0x7D && (c2) == 0x3B) { \ 52 (assi) = 0x9B1D; \ 53 } 54 55