Lines Matching refs:header
135 UCATableHeader header; in ucol_looksLikeCollationBinary() local
136 uprv_memset(&header, 0, sizeof(header)); in ucol_looksLikeCollationBinary()
138 header.size=udata_readInt32(ds, inHeader->size); in ucol_looksLikeCollationBinary()
139 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) { in ucol_looksLikeCollationBinary()
143 header.magic=ds->readUInt32(inHeader->magic); in ucol_looksLikeCollationBinary()
145 header.magic==UCOL_HEADER_MAGIC && in ucol_looksLikeCollationBinary()
171 UCATableHeader header; in swapFormatVersion3() local
196 uprv_memset(&header, 0, sizeof(header)); in swapFormatVersion3()
198 header.size=udata_readInt32(ds, inHeader->size); in swapFormatVersion3()
199 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) { in swapFormatVersion3()
206 header.magic=ds->readUInt32(inHeader->magic); in swapFormatVersion3()
208 header.magic==UCOL_HEADER_MAGIC && in swapFormatVersion3()
213 header.magic, in swapFormatVersion3()
229 uprv_memcpy(outBytes, inBytes, header.size); in swapFormatVersion3()
235 header.options= ds->readUInt32(inHeader->options); in swapFormatVersion3()
236 header.UCAConsts= ds->readUInt32(inHeader->UCAConsts); in swapFormatVersion3()
237 header.contractionUCACombos= ds->readUInt32(inHeader->contractionUCACombos); in swapFormatVersion3()
238 header.mappingPosition= ds->readUInt32(inHeader->mappingPosition); in swapFormatVersion3()
239 header.expansion= ds->readUInt32(inHeader->expansion); in swapFormatVersion3()
240 header.contractionIndex= ds->readUInt32(inHeader->contractionIndex); in swapFormatVersion3()
241 header.contractionCEs= ds->readUInt32(inHeader->contractionCEs); in swapFormatVersion3()
242 header.contractionSize= ds->readUInt32(inHeader->contractionSize); in swapFormatVersion3()
243 header.endExpansionCE= ds->readUInt32(inHeader->endExpansionCE); in swapFormatVersion3()
244 header.expansionCESize= ds->readUInt32(inHeader->expansionCESize); in swapFormatVersion3()
245 header.endExpansionCECount= udata_readInt32(ds, inHeader->endExpansionCECount); in swapFormatVersion3()
246 header.contractionUCACombosSize=udata_readInt32(ds, inHeader->contractionUCACombosSize); in swapFormatVersion3()
247 header.scriptToLeadByte= ds->readUInt32(inHeader->scriptToLeadByte); in swapFormatVersion3()
248 header.leadByteToScript= ds->readUInt32(inHeader->leadByteToScript); in swapFormatVersion3()
253 …->swapArray32(ds, &(inHeader->scriptToLeadByte), sizeof(header.scriptToLeadByte) + sizeof(header.l… in swapFormatVersion3()
260 if(header.options!=0) { in swapFormatVersion3()
261 ds->swapArray32(ds, inBytes+header.options, header.expansion-header.options, in swapFormatVersion3()
262 outBytes+header.options, pErrorCode); in swapFormatVersion3()
266 if(header.mappingPosition!=0 && header.expansion!=0) { in swapFormatVersion3()
267 if(header.contractionIndex!=0) { in swapFormatVersion3()
269 count=header.contractionIndex-header.expansion; in swapFormatVersion3()
272 count=header.mappingPosition-header.expansion; in swapFormatVersion3()
274 ds->swapArray32(ds, inBytes+header.expansion, (int32_t)count, in swapFormatVersion3()
275 outBytes+header.expansion, pErrorCode); in swapFormatVersion3()
279 if(header.contractionSize!=0) { in swapFormatVersion3()
281 ds->swapArray16(ds, inBytes+header.contractionIndex, header.contractionSize*2, in swapFormatVersion3()
282 outBytes+header.contractionIndex, pErrorCode); in swapFormatVersion3()
285 ds->swapArray32(ds, inBytes+header.contractionCEs, header.contractionSize*4, in swapFormatVersion3()
286 outBytes+header.contractionCEs, pErrorCode); in swapFormatVersion3()
290 if(header.mappingPosition!=0) { in swapFormatVersion3()
291 count=header.endExpansionCE-header.mappingPosition; in swapFormatVersion3()
292 utrie_swap(ds, inBytes+header.mappingPosition, (int32_t)count, in swapFormatVersion3()
293 outBytes+header.mappingPosition, pErrorCode); in swapFormatVersion3()
297 if(header.endExpansionCECount!=0) { in swapFormatVersion3()
298 ds->swapArray32(ds, inBytes+header.endExpansionCE, header.endExpansionCECount*4, in swapFormatVersion3()
299 outBytes+header.endExpansionCE, pErrorCode); in swapFormatVersion3()
305 if(header.UCAConsts!=0) { in swapFormatVersion3()
310 … ds->swapArray32(ds, inBytes+header.UCAConsts, header.contractionUCACombos-header.UCAConsts, in swapFormatVersion3()
311 outBytes+header.UCAConsts, pErrorCode); in swapFormatVersion3()
315 if(header.contractionUCACombosSize!=0) { in swapFormatVersion3()
316 … count=header.contractionUCACombosSize*inHeader->contractionUCACombosWidth*U_SIZEOF_UCHAR; in swapFormatVersion3()
317 ds->swapArray16(ds, inBytes+header.contractionUCACombos, (int32_t)count, in swapFormatVersion3()
318 outBytes+header.contractionUCACombos, pErrorCode); in swapFormatVersion3()
322 if(header.scriptToLeadByte!=0) { in swapFormatVersion3()
323 …int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte))); // each entry = … in swapFormatVersion3()
324 …int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte + 2))); // each entry… in swapFormatVersion3()
325 ds->swapArray16(ds, inBytes+header.scriptToLeadByte, in swapFormatVersion3()
327 outBytes+header.scriptToLeadByte, pErrorCode); in swapFormatVersion3()
331 if(header.leadByteToScript!=0) { in swapFormatVersion3()
332 …int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript))); // each entry = … in swapFormatVersion3()
333 …int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript + 2))); // each entry… in swapFormatVersion3()
334 ds->swapArray16(ds, inBytes+header.leadByteToScript, in swapFormatVersion3()
336 outBytes+header.leadByteToScript, pErrorCode); in swapFormatVersion3()
340 return header.size; in swapFormatVersion3()
609 InverseUCATableHeader header={ 0,0,0,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0} }; in ucol_swapInverseUCA() local
648 header.byteSize=udata_readInt32(ds, inHeader->byteSize); in ucol_swapInverseUCA()
651 (uint32_t)(length-headerSize)<(header.byteSize=udata_readInt32(ds, inHeader->byteSize))) in ucol_swapInverseUCA()
662 uprv_memcpy(outBytes, inBytes, header.byteSize); in ucol_swapInverseUCA()
668 header.tableSize= ds->readUInt32(inHeader->tableSize); in ucol_swapInverseUCA()
669 header.contsSize= ds->readUInt32(inHeader->contsSize); in ucol_swapInverseUCA()
670 header.table= ds->readUInt32(inHeader->table); in ucol_swapInverseUCA()
671 header.conts= ds->readUInt32(inHeader->conts); in ucol_swapInverseUCA()
677 ds->swapArray32(ds, inBytes+header.table, header.tableSize*3*4, in ucol_swapInverseUCA()
678 outBytes+header.table, pErrorCode); in ucol_swapInverseUCA()
681 ds->swapArray16(ds, inBytes+header.conts, header.contsSize*U_SIZEOF_UCHAR, in ucol_swapInverseUCA()
682 outBytes+header.conts, pErrorCode); in ucol_swapInverseUCA()
685 return headerSize+header.byteSize; in ucol_swapInverseUCA()