1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/stubdata/stubdata.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,74 @@ 1.4 +/****************************************************************************** 1.5 +* 1.6 +* Copyright (C) 2001, International Business Machines 1.7 +* Corporation and others. All Rights Reserved. 1.8 +* 1.9 +******************************************************************************* 1.10 +* file name: stubdata.c 1.11 +* 1.12 +* Define initialized data that will build into a valid, but empty 1.13 +* ICU data library. Used to bootstrap the ICU build, which has these 1.14 +* dependencies: 1.15 +* ICU Common library depends on ICU data 1.16 +* ICU data requires data building tools. 1.17 +* ICU data building tools require the ICU common library. 1.18 +* 1.19 +* The stub data library (for which this file is the source) is sufficient 1.20 +* for running the data building tools. 1.21 +* 1.22 +*/ 1.23 +#include "unicode/utypes.h" 1.24 +#include "unicode/udata.h" 1.25 +#include "unicode/uversion.h" 1.26 + 1.27 + 1.28 +typedef struct { 1.29 + uint16_t headerSize; 1.30 + uint8_t magic1, magic2; 1.31 + UDataInfo info; 1.32 + char padding[8]; 1.33 + uint32_t count, reserved; 1.34 + /* 1.35 + const struct { 1.36 + const char *const name; 1.37 + const void *const data; 1.38 + } toc[1]; 1.39 + */ 1.40 + int fakeNameAndData[4]; /* TODO: Change this header type from */ 1.41 + /* pointerTOC to OffsetTOC. */ 1.42 +} ICU_Data_Header; 1.43 + 1.44 +U_EXPORT const ICU_Data_Header U_ICUDATA_ENTRY_POINT = { 1.45 + 32, /* headerSize */ 1.46 + 0xda, /* magic1, (see struct MappedData in udata.c) */ 1.47 + 0x27, /* magic2 */ 1.48 + { /*UDataInfo */ 1.49 + sizeof(UDataInfo), /* size */ 1.50 + 0, /* reserved */ 1.51 + 1.52 +#if U_IS_BIG_ENDIAN 1.53 + 1, 1.54 +#else 1.55 + 0, 1.56 +#endif 1.57 + 1.58 + U_CHARSET_FAMILY, 1.59 + sizeof(UChar), 1.60 + 0, /* reserved */ 1.61 + { /* data format identifier */ 1.62 + 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ 1.63 + {1, 0, 0, 0}, /* format version major, minor, milli, micro */ 1.64 + {0, 0, 0, 0} /* dataVersion */ 1.65 + }, 1.66 + {0,0,0,0,0,0,0,0}, /* Padding[8] */ 1.67 + 0, /* count */ 1.68 + 0, /* Reserved */ 1.69 + { /* TOC structure */ 1.70 +/* { */ 1.71 + 0 , 0 , 0, 0 /* name and data entries. Count says there are none, */ 1.72 + /* but put one in just in case. */ 1.73 +/* } */ 1.74 + } 1.75 +}; 1.76 + 1.77 +