File: emu_jisx0213_2000.h

package info (click to toggle)
python2.4 2.4.6-1%2Blenny1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 44,888 kB
  • ctags: 86,995
  • sloc: ansic: 306,391; python: 271,931; sh: 10,210; makefile: 4,248; perl: 3,736; lisp: 3,678; xml: 894; objc: 756; cpp: 7; sed: 2
file content (45 lines) | stat: -rw-r--r-- 1,654 bytes parent folder | download | duplicates (4)
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
/* $CJKCodecs: emu_jisx0213_2000.h,v 1.3 2004/07/08 02:53:37 perky Exp $ */

/* These routines may be quite inefficient, but it's used only to emulate old
 * standards. */

#ifndef EMULATE_JISX0213_2000_ENCODE_INVALID
#define EMULATE_JISX0213_2000_ENCODE_INVALID 1
#endif

#define EMULATE_JISX0213_2000_ENCODE_BMP(assi, c)			\
	if (config == (void *)2000 && (					\
			(c) == 0x9B1C || (c) == 0x4FF1 ||		\
			(c) == 0x525D || (c) == 0x541E ||		\
			(c) == 0x5653 || (c) == 0x59F8 ||		\
			(c) == 0x5C5B || (c) == 0x5E77 ||		\
			(c) == 0x7626 || (c) == 0x7E6B))		\
		return EMULATE_JISX0213_2000_ENCODE_INVALID;		\
	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;

#ifndef EMULATE_JISX0213_2000_DECODE_INVALID
#define EMULATE_JISX0213_2000_DECODE_INVALID 2
#endif

#define EMULATE_JISX0213_2000_DECODE_PLANE1(assi, c1, c2)		\
	if (config == (void *)2000 &&					\
			(((c1) == 0x2E && (c2) == 0x21) ||		\
			 ((c1) == 0x2F && (c2) == 0x7E) ||		\
			 ((c1) == 0x4F && (c2) == 0x54) ||		\
			 ((c1) == 0x4F && (c2) == 0x7E) ||		\
			 ((c1) == 0x74 && (c2) == 0x27) ||		\
			 ((c1) == 0x7E && (c2) == 0x7A) ||		\
			 ((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(assi, c1, c2)		\
	if (config == (void *)2000 && (c1) == 0x7D && (c2) == 0x3B)	\
		(assi) = 0x9B1D;