LEFT | RIGHT |
(no file at all) | |
1 // © 2016 and later: Unicode, Inc. and others. | 1 // © 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 UDataInfo info; | 45 UDataInfo info; |
46 } DataHeader; | 46 } DataHeader; |
47 | 47 |
48 typedef struct { | 48 typedef struct { |
49 uint32_t nameOffset; | 49 uint32_t nameOffset; |
50 uint32_t dataOffset; | 50 uint32_t dataOffset; |
51 } UDataOffsetTOCEntry; | 51 } UDataOffsetTOCEntry; |
52 | 52 |
53 typedef struct { | 53 typedef struct { |
54 uint32_t count; | 54 uint32_t count; |
55 UDataOffsetTOCEntry entry[2]; /* Actual size of array is from count. */ | 55 /** |
| 56 * Variable-length array declared with length 1 to disable bounds checkers. |
| 57 * The actual array length is in the count field. |
| 58 */ |
| 59 UDataOffsetTOCEntry entry[1]; |
56 } UDataOffsetTOC; | 60 } UDataOffsetTOC; |
57 | 61 |
58 /** | 62 /** |
59 * Get the header size from a const DataHeader *udh. | 63 * Get the header size from a const DataHeader *udh. |
60 * Handles opposite-endian data. | 64 * Handles opposite-endian data. |
61 * | 65 * |
62 * @internal | 66 * @internal |
63 */ | 67 */ |
64 U_CFUNC uint16_t | 68 U_CFUNC uint16_t |
65 udata_getHeaderSize(const DataHeader *udh); | 69 udata_getHeaderSize(const DataHeader *udh); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 * | 108 * |
105 * If a valid header and TOC are found, | 109 * If a valid header and TOC are found, |
106 * set the CommonDataFuncs function dispatch vector in the UDataMemory | 110 * set the CommonDataFuncs function dispatch vector in the UDataMemory |
107 * to point to the right functions for the TOC type. | 111 * to point to the right functions for the TOC type. |
108 * otherwise | 112 * otherwise |
109 * set an errorcode. | 113 * set an errorcode. |
110 */ | 114 */ |
111 U_CFUNC void udata_checkCommonData(UDataMemory *pData, UErrorCode *pErrorCode); | 115 U_CFUNC void udata_checkCommonData(UDataMemory *pData, UErrorCode *pErrorCode); |
112 | 116 |
113 #endif | 117 #endif |
LEFT | RIGHT |