X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..374ca955a76ecab1204ca8bfa63ff9238d998416:/icuSources/common/ucmndata.h diff --git a/icuSources/common/ucmndata.h b/icuSources/common/ucmndata.h index 3ee38997..9634ed84 100644 --- a/icuSources/common/ucmndata.h +++ b/icuSources/common/ucmndata.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1999-2001, International Business Machines +* Copyright (C) 1999-2003, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************/ @@ -43,6 +43,33 @@ typedef struct { UDataInfo info; } DataHeader; +typedef struct { + uint32_t nameOffset; + uint32_t dataOffset; +} UDataOffsetTOCEntry; + +typedef struct { + uint32_t count; + UDataOffsetTOCEntry entry[2]; /* Actual size of array is from count. */ +} UDataOffsetTOC; + +/** + * Get the header size from a const DataHeader *udh. + * Handles opposite-endian data. + * + * @internal + */ +U_CFUNC uint16_t +udata_getHeaderSize(const DataHeader *udh); + +/** + * Get the UDataInfo.size from a const UDataInfo *info. + * Handles opposite-endian data. + * + * @internal + */ +U_CFUNC uint16_t +udata_getInfoSize(const UDataInfo *info); /* * "Virtual" functions for data lookup. @@ -54,6 +81,7 @@ typedef struct { typedef const DataHeader * (* LookupFn)(const UDataMemory *pData, const char *tocEntryName, + int32_t *pLength, UErrorCode *pErrorCode); typedef uint32_t