• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Index: source/common/udata.c
2===================================================================
3--- source/common/udata.c	(revision 22653)
4+++ source/common/udata.c	(working copy)
5@@ -709,7 +709,7 @@
6  *      our common data.                                                *
7  *                                                                      *
8  *----------------------------------------------------------------------*/
9-extern  const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT;
10+extern  const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT;
11
12
13 /*----------------------------------------------------------------------*
14@@ -745,7 +745,7 @@
15             return gCommonICUData;
16         }
17
18-        tData.pHeader = &U_ICUDATA_ENTRY_POINT;
19+        tData.pHeader = &U_ICUDATA_ENTRY_POINT.hdr;
20         udata_checkCommonData(&tData, pErrorCode);
21         setCommonICUData(&tData, NULL, FALSE, pErrorCode);
22         return gCommonICUData;
23Index: source/common/ucmndata.h
24===================================================================
25--- source/common/ucmndata.h	(revision 22653)
26+++ source/common/ucmndata.h	(working copy)
27@@ -44,6 +44,20 @@
28 } DataHeader;
29
30 typedef struct {
31+    DataHeader hdr;
32+    char padding[8];
33+    uint32_t count, reserved;
34+    /*
35+    const struct {
36+    const char *const name;
37+    const void *const data;
38+    } toc[1];
39+    */
40+   int   fakeNameAndData[4];       /* TODO:  Change this header type from */
41+                                   /*        pointerTOC to OffsetTOC.     */
42+} ICU_Data_Header;
43+
44+typedef struct {
45     uint32_t nameOffset;
46     uint32_t dataOffset;
47 } UDataOffsetTOCEntry;
48Index: source/stubdata/stubdata.c
49===================================================================
50--- source/stubdata/stubdata.c	(revision 22653)
51+++ source/stubdata/stubdata.c	(working copy)
52@@ -20,45 +20,34 @@
53 #include "unicode/utypes.h"
54 #include "unicode/udata.h"
55 #include "unicode/uversion.h"
56+#include "ucmndata.h"
57
58
59-typedef struct {
60-    uint16_t headerSize;
61-    uint8_t magic1, magic2;
62-    UDataInfo info;
63-    char padding[8];
64-    uint32_t count, reserved;
65-    /*
66-    const struct {
67-    const char *const name;
68-    const void *const data;
69-    } toc[1];
70-    */
71-   int   fakeNameAndData[4];       /* TODO:  Change this header type from */
72-                                   /*        pointerTOC to OffsetTOC.     */
73-} ICU_Data_Header;
74-
75 U_EXPORT const ICU_Data_Header U_ICUDATA_ENTRY_POINT = {
76-    32,          /* headerSize */
77-    0xda,        /* magic1,  (see struct MappedData in udata.c)  */
78-    0x27,        /* magic2     */
79-    {            /*UDataInfo   */
80-        sizeof(UDataInfo),      /* size        */
81-        0,                      /* reserved    */
82+    {            /* DataHeader */
83+        {            /* MappedData */
84+            32,          /* headerSize */
85+            0xda,        /* magic1,  (see struct MappedData in udata.c)  */
86+            0x27,        /* magic2     */
87+        },
88+        {            /*UDataInfo   */
89+            sizeof(UDataInfo),      /* size        */
90+            0,                      /* reserved    */
91
92 #if U_IS_BIG_ENDIAN
93-        1,
94+            1,
95 #else
96-        0,
97+            0,
98 #endif
99
100-        U_CHARSET_FAMILY,
101-        sizeof(UChar),
102-        0,               /* reserved      */
103-        {                /* data format identifier */
104-           0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */
105-           {1, 0, 0, 0},   /* format version major, minor, milli, micro */
106-           {0, 0, 0, 0}    /* dataVersion   */
107+            U_CHARSET_FAMILY,
108+            sizeof(UChar),
109+            0,               /* reserved      */
110+            {                /* data format identifier */
111+               0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */
112+               {1, 0, 0, 0},   /* format version major, minor, milli, micro */
113+               {0, 0, 0, 0}    /* dataVersion   */
114+        },
115     },
116     {0,0,0,0,0,0,0,0},  /* Padding[8]   */
117     0,                  /* count        */
118