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