OLD | NEW |
1 /****************************************************************************** | 1 /****************************************************************************** |
2 * | 2 * |
3 * Copyright (C) 2001, International Business Machines | 3 * Copyright (C) 2001, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 * | 5 * |
6 ******************************************************************************* | 6 ******************************************************************************* |
7 * file name: stubdata.c | 7 * file name: stubdata.c |
8 * | 8 * |
9 * Define initialized data that will build into a valid, but empty | 9 * Define initialized data that will build into a valid, but empty |
10 * ICU data library. Used to bootstrap the ICU build, which has these | 10 * ICU data library. Used to bootstrap the ICU build, which has these |
11 * dependencies: | 11 * dependencies: |
12 * ICU Common library depends on ICU data | 12 * ICU Common library depends on ICU data |
13 * ICU data requires data building tools. | 13 * ICU data requires data building tools. |
14 * ICU data building tools require the ICU common library. | 14 * ICU data building tools require the ICU common library. |
15 * | 15 * |
16 * The stub data library (for which this file is the source) is sufficient | 16 * The stub data library (for which this file is the source) is sufficient |
17 * for running the data building tools. | 17 * for running the data building tools. |
18 * | 18 * |
19 */ | 19 */ |
20 #include "unicode/utypes.h" | 20 #include "unicode/utypes.h" |
21 #include "unicode/udata.h" | 21 #include "unicode/udata.h" |
22 #include "unicode/uversion.h" | 22 #include "unicode/uversion.h" |
23 #include "ucmndata.h" | |
24 | 23 |
25 | 24 |
| 25 typedef struct { |
| 26 uint16_t headerSize; |
| 27 uint8_t magic1, magic2; |
| 28 UDataInfo info; |
| 29 char padding[8]; |
| 30 uint32_t count, reserved; |
| 31 /* |
| 32 const struct { |
| 33 const char *const name; |
| 34 const void *const data; |
| 35 } toc[1]; |
| 36 */ |
| 37 int fakeNameAndData[4]; /* TODO: Change this header type from */ |
| 38 /* pointerTOC to OffsetTOC. */ |
| 39 } ICU_Data_Header; |
| 40 |
26 U_EXPORT const ICU_Data_Header U_ICUDATA_ENTRY_POINT = { | 41 U_EXPORT const ICU_Data_Header U_ICUDATA_ENTRY_POINT = { |
27 { /* DataHeader */ | 42 32, /* headerSize */ |
28 { /* MappedData */ | 43 0xda, /* magic1, (see struct MappedData in udata.c) */ |
29 32, /* headerSize */ | 44 0x27, /* magic2 */ |
30 0xda, /* magic1, (see struct MappedData in udata.c) */ | 45 { /*UDataInfo */ |
31 0x27, /* magic2 */ | 46 sizeof(UDataInfo), /* size */ |
32 }, | 47 0, /* reserved */ |
33 { /*UDataInfo */ | |
34 sizeof(UDataInfo), /* size */ | |
35 0, /* reserved */ | |
36 | 48 |
37 #if U_IS_BIG_ENDIAN | 49 #if U_IS_BIG_ENDIAN |
38 1, | 50 1, |
39 #else | 51 #else |
40 0, | 52 0, |
41 #endif | 53 #endif |
42 | 54 |
43 U_CHARSET_FAMILY, | 55 U_CHARSET_FAMILY, |
44 sizeof(UChar), | 56 sizeof(UChar), |
45 0, /* reserved */ | 57 0, /* reserved */ |
46 { /* data format identifier */ | 58 { /* data format identifier */ |
47 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ | 59 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ |
48 {1, 0, 0, 0}, /* format version major, minor, milli, micro */ | 60 {1, 0, 0, 0}, /* format version major, minor, milli, micro */ |
49 {0, 0, 0, 0} /* dataVersion */ | 61 {0, 0, 0, 0} /* dataVersion */ |
50 }, | |
51 }, | 62 }, |
52 {0,0,0,0,0,0,0,0}, /* Padding[8] */ | 63 {0,0,0,0,0,0,0,0}, /* Padding[8] */ |
53 0, /* count */ | 64 0, /* count */ |
54 0, /* Reserved */ | 65 0, /* Reserved */ |
55 { /* TOC structure */ | 66 { /* TOC structure */ |
56 /* { */ | 67 /* { */ |
57 0 , 0 , 0, 0 /* name and data entries. Count says there are none, *
/ | 68 0 , 0 , 0, 0 /* name and data entries. Count says there are none, *
/ |
58 /* but put one in just in case. *
/ | 69 /* but put one in just in case. *
/ |
59 /* } */ | 70 /* } */ |
60 } | 71 } |
61 }; | 72 }; |
62 | 73 |
63 | 74 |
OLD | NEW |