]> git.saurik.com Git - apple/icu.git/blob - icuSources/tools/makeconv/genmbcs.h
ICU-6.2.10.tar.gz
[apple/icu.git] / icuSources / tools / makeconv / genmbcs.h
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2000-2003, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 * file name: genmbcs.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2000jul10
14 * created by: Markus W. Scherer
15 */
16
17 #ifndef __GENMBCS_H__
18 #define __GENMBCS_H__
19
20 #include "makeconv.h"
21
22 enum {
23 MBCS_STAGE_2_BLOCK_SIZE=0x40, /* 64; 64=1<<6 for 6 bits in stage 2 */
24 MBCS_STAGE_2_BLOCK_SIZE_SHIFT=6, /* log2(MBCS_STAGE_2_BLOCK_SIZE) */
25 MBCS_STAGE_1_SIZE=0x440, /* 0x110000>>10, or 17*64 for one entry per 1k code points */
26 MBCS_STAGE_2_SIZE=0xfbc0, /* 0x10000-MBCS_STAGE_1_SIZE */
27 MBCS_MAX_STAGE_2_TOP=MBCS_STAGE_2_SIZE,
28 MBCS_STAGE_2_MAX_BLOCKS=MBCS_STAGE_2_SIZE>>MBCS_STAGE_2_BLOCK_SIZE_SHIFT,
29
30 MBCS_STAGE_2_ALL_UNASSIGNED_INDEX=0, /* stage 1 entry for the all-unassigned stage 2 block */
31 MBCS_STAGE_2_FIRST_ASSIGNED=MBCS_STAGE_2_BLOCK_SIZE, /* start of the first stage 2 block after the all-unassigned one */
32
33 MBCS_STAGE_3_BLOCK_SIZE=16, /* 16; 16=1<<4 for 4 bits in stage 3 */
34 MBCS_STAGE_3_FIRST_ASSIGNED=MBCS_STAGE_3_BLOCK_SIZE, /* start of the first stage 3 block after the all-unassigned one */
35
36 MBCS_MAX_FALLBACK_COUNT=8192
37 };
38
39 U_CFUNC NewConverter *
40 MBCSOpen(UCMFile *ucm);
41
42 U_CFUNC NewConverter *
43 CnvExtOpen(UCMFile *ucm);
44
45 #endif