| 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 * | 5 * |
| 6 * Copyright (C) 1999-2011, International Business Machines | 6 * Copyright (C) 1999-2011, International Business Machines |
| 7 * Corporation and others. All Rights Reserved. | 7 * Corporation and others. All Rights Reserved. |
| 8 * | 8 * |
| 9 ******************************************************************************/ | 9 ******************************************************************************/ |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 uint8_t magic2; | 39 uint8_t magic2; |
| 40 } MappedData; | 40 } MappedData; |
| 41 | 41 |
| 42 | 42 |
| 43 typedef struct { | 43 typedef struct { |
| 44 MappedData dataHeader; | 44 MappedData dataHeader; |
| 45 UDataInfo info; | 45 UDataInfo info; |
| 46 } DataHeader; | 46 } DataHeader; |
| 47 | 47 |
| 48 typedef struct { | 48 typedef struct { |
| 49 DataHeader hdr; |
| 50 char padding[8]; |
| 51 uint32_t count, reserved; |
| 52 /* |
| 53 const struct { |
| 54 const char *const name; |
| 55 const void *const data; |
| 56 } toc[1]; |
| 57 */ |
| 58 int fakeNameAndData[4]; /* TODO: Change this header type from */ |
| 59 /* pointerTOC to OffsetTOC. */ |
| 60 } ICU_Data_Header; |
| 61 |
| 62 typedef struct { |
| 49 uint32_t nameOffset; | 63 uint32_t nameOffset; |
| 50 uint32_t dataOffset; | 64 uint32_t dataOffset; |
| 51 } UDataOffsetTOCEntry; | 65 } UDataOffsetTOCEntry; |
| 52 | 66 |
| 53 typedef struct { | 67 typedef struct { |
| 54 uint32_t count; | 68 uint32_t count; |
| 55 UDataOffsetTOCEntry entry[2]; /* Actual size of array is from count. */ | 69 UDataOffsetTOCEntry entry[2]; /* Actual size of array is from count. */ |
| 56 } UDataOffsetTOC; | 70 } UDataOffsetTOC; |
| 57 | 71 |
| 58 /** | 72 /** |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 * | 118 * |
| 105 * If a valid header and TOC are found, | 119 * If a valid header and TOC are found, |
| 106 * set the CommonDataFuncs function dispatch vector in the UDataMemory | 120 * set the CommonDataFuncs function dispatch vector in the UDataMemory |
| 107 * to point to the right functions for the TOC type. | 121 * to point to the right functions for the TOC type. |
| 108 * otherwise | 122 * otherwise |
| 109 * set an errorcode. | 123 * set an errorcode. |
| 110 */ | 124 */ |
| 111 U_CFUNC void udata_checkCommonData(UDataMemory *pData, UErrorCode *pErrorCode); | 125 U_CFUNC void udata_checkCommonData(UDataMemory *pData, UErrorCode *pErrorCode); |
| 112 | 126 |
| 113 #endif | 127 #endif |
| OLD | NEW |