1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef __UCONV_TIL_H__
6 #define __UCONV_TIL_H__
11 /*=====================================*/
12 #define PACK(h,l) (int16_t)(( (h) << 8) | (l))
14 #if defined(IS_LITTLE_ENDIAN)
15 #define ShiftInCell(sub,len,min,max) \
16 PACK(len,sub), PACK(max,min)
17 #define ShiftOutCell(sub,len,minh,minl,maxh,maxl) \
18 PACK(len,sub), PACK(minl,minh), PACK(maxl,maxh)
20 #define ShiftInCell(sub,len,min,max) \
21 PACK(sub,len), PACK(min, max)
22 #define ShiftOutCell(sub,len,minh,minl,maxh,maxl) \
23 PACK(sub,len), PACK(minh,minl), PACK(maxh,maxl)
30 u2BytesGRPrefix8FCharset
,
31 u2BytesGRPrefix8EA2Charset
,
32 u2BytesGRPrefix8EA3Charset
,
33 u2BytesGRPrefix8EA4Charset
,
34 u2BytesGRPrefix8EA5Charset
,
35 u2BytesGRPrefix8EA6Charset
,
36 u2BytesGRPrefix8EA7Charset
,
37 uDecomposedHangulCharset
,
40 u4BytesGB18030Charset
,
43 uNumOfCharsetType
= uMultibytesCharset
50 u1BytePrefix8EChar
, /* Used by JIS0201 GR in EUC_JP */
55 unsigned char classID
;
56 unsigned char reserveLen
;
57 unsigned char shiftin_Min
;
58 unsigned char shiftin_Max
;
63 uShiftInCell shiftcell
[1];
64 } uShiftInTableMutable
;
66 typedef const uShiftInTableMutable uShiftInTable
;
69 unsigned char classID
;
70 unsigned char reserveLen
;
71 unsigned char shiftout_MinHB
;
72 unsigned char shiftout_MinLB
;
73 unsigned char shiftout_MaxHB
;
74 unsigned char shiftout_MaxLB
;
79 uShiftOutCell shiftcell
[1];
80 } uShiftOutTableMutable
;
82 typedef const uShiftOutTableMutable uShiftOutTable
;
85 /*=====================================*/
92 /*=====================================*/
94 typedef uint16_t* uMappingTableMutable
;
95 typedef const uint16_t uMappingTable
;