OLD | NEW |
1 diff --git a/source/common/ucmndata.h b/source/common/ucmndata.h | 1 diff --git a/source/common/ucmndata.h b/source/common/ucmndata.h |
2 index 36163c5..413a2f8 100644 | 2 index 9e87fad..206ddbf 100644 |
3 --- a/source/common/ucmndata.h | 3 --- a/source/common/ucmndata.h |
4 +++ b/source/common/ucmndata.h | 4 +++ b/source/common/ucmndata.h |
5 @@ -44,6 +44,20 @@ typedef struct { | 5 @@ -46,6 +46,20 @@ typedef struct { |
6 } DataHeader; | 6 } DataHeader; |
7 | 7 |
8 typedef struct { | 8 typedef struct { |
9 + DataHeader hdr; | 9 + DataHeader hdr; |
10 + char padding[8]; | 10 + char padding[8]; |
11 + uint32_t count, reserved; | 11 + uint32_t count, reserved; |
12 + /* | 12 + /* |
13 + const struct { | 13 + const struct { |
14 + const char *const name; | 14 + const char *const name; |
15 + const void *const data; | 15 + const void *const data; |
16 + } toc[1]; | 16 + } toc[1]; |
17 + */ | 17 + */ |
18 + int fakeNameAndData[4]; /* TODO: Change this header type from */ | 18 + int fakeNameAndData[4]; /* TODO: Change this header type from */ |
19 + /* pointerTOC to OffsetTOC. */ | 19 + /* pointerTOC to OffsetTOC. */ |
20 +} ICU_Data_Header; | 20 +} ICU_Data_Header; |
21 + | 21 + |
22 +typedef struct { | 22 +typedef struct { |
23 uint32_t nameOffset; | 23 uint32_t nameOffset; |
24 uint32_t dataOffset; | 24 uint32_t dataOffset; |
25 } UDataOffsetTOCEntry; | 25 } UDataOffsetTOCEntry; |
26 diff --git a/source/common/udata.cpp b/source/common/udata.cpp | 26 diff --git a/source/common/udata.cpp b/source/common/udata.cpp |
27 index d32023b..80bea06 100644 | 27 index ec72a0c..9460746 100644 |
28 --- a/source/common/udata.cpp | 28 --- a/source/common/udata.cpp |
29 +++ b/source/common/udata.cpp | 29 +++ b/source/common/udata.cpp |
30 @@ -624,7 +624,7 @@ U_NAMESPACE_END | 30 @@ -624,7 +624,7 @@ U_NAMESPACE_END |
31 * our common data. * | 31 * our common data. * |
32 * * | 32 * * |
33 *----------------------------------------------------------------------*/ | 33 *----------------------------------------------------------------------*/ |
34 -extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; | 34 -extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; |
35 +extern "C" const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT; | 35 +extern "C" const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT; |
36 | 36 |
37 /* | 37 /* |
(...skipping 10 matching lines...) Expand all Loading... |
48 @@ -694,7 +694,7 @@ openCommonData(const char *path, /* Path from Open
Choice? */ | 48 @@ -694,7 +694,7 @@ openCommonData(const char *path, /* Path from Open
Choice? */ |
49 setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pError
Code); | 49 setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pError
Code); |
50 } | 50 } |
51 */ | 51 */ |
52 - setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); | 52 - setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); |
53 + setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT.hdr, FALSE, pErrorCode); | 53 + setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT.hdr, FALSE, pErrorCode); |
54 { | 54 { |
55 Mutex lock; | 55 Mutex lock; |
56 return gCommonICUDataArray[commonDataIndex]; | 56 return gCommonICUDataArray[commonDataIndex]; |
57 diff --git a/source/stubdata/stubdata.c b/source/stubdata/stubdata.c | 57 diff --git a/source/stubdata/stubdata.c b/source/stubdata/stubdata.c |
58 index 69a5876..1426497 100644 | 58 index 6493ac4..ba644b2 100644 |
59 --- a/source/stubdata/stubdata.c | 59 --- a/source/stubdata/stubdata.c |
60 +++ b/source/stubdata/stubdata.c | 60 +++ b/source/stubdata/stubdata.c |
61 @@ -20,45 +20,34 @@ | 61 @@ -22,45 +22,34 @@ |
62 #include "unicode/utypes.h" | 62 #include "unicode/utypes.h" |
63 #include "unicode/udata.h" | 63 #include "unicode/udata.h" |
64 #include "unicode/uversion.h" | 64 #include "unicode/uversion.h" |
65 +#include "ucmndata.h" | 65 +#include "ucmndata.h" |
66 | 66 |
67 | 67 |
68 -typedef struct { | 68 -typedef struct { |
69 - uint16_t headerSize; | 69 - uint16_t headerSize; |
70 - uint8_t magic1, magic2; | 70 - uint8_t magic1, magic2; |
71 - UDataInfo info; | 71 - UDataInfo info; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 + sizeof(UChar), | 117 + sizeof(UChar), |
118 + 0, /* reserved */ | 118 + 0, /* reserved */ |
119 + { /* data format identifier */ | 119 + { /* data format identifier */ |
120 + 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ | 120 + 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ |
121 + {1, 0, 0, 0}, /* format version major, minor, milli, micro */ | 121 + {1, 0, 0, 0}, /* format version major, minor, milli, micro */ |
122 + {0, 0, 0, 0} /* dataVersion */ | 122 + {0, 0, 0, 0} /* dataVersion */ |
123 + }, | 123 + }, |
124 }, | 124 }, |
125 {0,0,0,0,0,0,0,0}, /* Padding[8] */ | 125 {0,0,0,0,0,0,0,0}, /* Padding[8] */ |
126 0, /* count */ | 126 0, /* count */ |
OLD | NEW |