1c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.orgIndex: source/common/udata.cpp 2c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org=================================================================== 34dfa619cf375ebb67b7b9311487d19a4129f742fjshin@chromium.org--- source/common/udata.cpp (revision 259715) 4c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+++ source/common/udata.cpp (working copy) 54dfa619cf375ebb67b7b9311487d19a4129f742fjshin@chromium.org@@ -621,7 +621,7 @@ 6c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org * our common data. * 7c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org * * 8c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org *----------------------------------------------------------------------*/ 9c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org-extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; 10c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+extern "C" const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT; 11c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org 12c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org /* 13c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org * This would be a good place for weak-linkage declarations of 144dfa619cf375ebb67b7b9311487d19a4129f742fjshin@chromium.org@@ -667,7 +667,7 @@ 15c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org if(gCommonICUDataArray[commonDataIndex] == NULL) { 16c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org int32_t i; 17c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org for(i = 0; i < commonDataIndex; ++i) { 18c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) { 19c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT.hdr) { 20c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org /* The linked-in data is already in the list. */ 21c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org return NULL; 22c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org } 234dfa619cf375ebb67b7b9311487d19a4129f742fjshin@chromium.org@@ -686,7 +686,7 @@ 24c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pErrorCode); 25c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org } 26c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org */ 27c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); 28c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT.hdr, FALSE, pErrorCode); 29c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org } 30c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org return gCommonICUDataArray[commonDataIndex]; 31c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org } 32c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.orgIndex: source/common/ucmndata.h 33c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org=================================================================== 34c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org--- source/common/ucmndata.h (revision 68397) 35c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+++ source/common/ucmndata.h (working copy) 36c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org@@ -44,6 +44,20 @@ 37c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org } DataHeader; 38c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org 39c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org typedef struct { 40c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ DataHeader hdr; 41c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ char padding[8]; 42c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ uint32_t count, reserved; 43c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ /* 44c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ const struct { 45c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ const char *const name; 46c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ const void *const data; 47c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ } toc[1]; 48c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ */ 49c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ int fakeNameAndData[4]; /* TODO: Change this header type from */ 50c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ /* pointerTOC to OffsetTOC. */ 51c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+} ICU_Data_Header; 52c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 53c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+typedef struct { 54c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org uint32_t nameOffset; 55c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org uint32_t dataOffset; 56c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org } UDataOffsetTOCEntry; 57c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.orgIndex: source/stubdata/stubdata.c 58c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org=================================================================== 59c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org--- source/stubdata/stubdata.c (revision 68397) 60c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+++ source/stubdata/stubdata.c (working copy) 61c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org@@ -20,45 +20,34 @@ 62c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org #include "unicode/utypes.h" 63c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org #include "unicode/udata.h" 64c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org #include "unicode/uversion.h" 65c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+#include "ucmndata.h" 66c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org 67c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org 68c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org-typedef struct { 69c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- uint16_t headerSize; 70c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- uint8_t magic1, magic2; 71c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- UDataInfo info; 72c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- char padding[8]; 73c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- uint32_t count, reserved; 74c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- /* 75c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- const struct { 76c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- const char *const name; 77c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- const void *const data; 78c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- } toc[1]; 79c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- */ 80c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- int fakeNameAndData[4]; /* TODO: Change this header type from */ 81c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- /* pointerTOC to OffsetTOC. */ 82c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org-} ICU_Data_Header; 83c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 84c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org U_EXPORT const ICU_Data_Header U_ICUDATA_ENTRY_POINT = { 85c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 32, /* headerSize */ 86c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 0xda, /* magic1, (see struct MappedData in udata.c) */ 87c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 0x27, /* magic2 */ 88c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- { /*UDataInfo */ 89c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- sizeof(UDataInfo), /* size */ 90c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 0, /* reserved */ 91c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ { /* DataHeader */ 92c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ { /* MappedData */ 93c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 32, /* headerSize */ 94c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 0xda, /* magic1, (see struct MappedData in udata.c) */ 95c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 0x27, /* magic2 */ 96c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ }, 97c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ { /*UDataInfo */ 98c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ sizeof(UDataInfo), /* size */ 99c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 0, /* reserved */ 100c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org 101c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org #if U_IS_BIG_ENDIAN 102c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 1, 103c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 1, 104c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org #else 105c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 0, 106c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 0, 107c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org #endif 108c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org 109c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- U_CHARSET_FAMILY, 110c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- sizeof(UChar), 111c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 0, /* reserved */ 112c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- { /* data format identifier */ 113c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ 114c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- {1, 0, 0, 0}, /* format version major, minor, milli, micro */ 115c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org- {0, 0, 0, 0} /* dataVersion */ 116c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ U_CHARSET_FAMILY, 117c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ sizeof(UChar), 118c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 0, /* reserved */ 119c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ { /* data format identifier */ 120c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ 121c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ {1, 0, 0, 0}, /* format version major, minor, milli, micro */ 122c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ {0, 0, 0, 0} /* dataVersion */ 123c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org+ }, 124c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org }, 125c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org {0,0,0,0,0,0,0,0}, /* Padding[8] */ 126c1025d04fbfadd4bd1f371558fd79311d6d47b61jshin@chromium.org 0, /* count */ 127