Lines Matching refs:header

137     UCATableHeader header;  in ucol_looksLikeCollationBinary()  local
138 uprv_memset(&header, 0, sizeof(header)); in ucol_looksLikeCollationBinary()
140 header.size=udata_readInt32(ds, inHeader->size); in ucol_looksLikeCollationBinary()
141 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) { in ucol_looksLikeCollationBinary()
145 header.magic=ds->readUInt32(inHeader->magic); in ucol_looksLikeCollationBinary()
147 header.magic==UCOL_HEADER_MAGIC && in ucol_looksLikeCollationBinary()
173 UCATableHeader header; in swapFormatVersion3() local
198 uprv_memset(&header, 0, sizeof(header)); in swapFormatVersion3()
200 header.size=udata_readInt32(ds, inHeader->size); in swapFormatVersion3()
201 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) { in swapFormatVersion3()
208 header.magic=ds->readUInt32(inHeader->magic); in swapFormatVersion3()
210 header.magic==UCOL_HEADER_MAGIC && in swapFormatVersion3()
215 header.magic, in swapFormatVersion3()
231 uprv_memcpy(outBytes, inBytes, header.size); in swapFormatVersion3()
237 header.options= ds->readUInt32(inHeader->options); in swapFormatVersion3()
238 header.UCAConsts= ds->readUInt32(inHeader->UCAConsts); in swapFormatVersion3()
239 header.contractionUCACombos= ds->readUInt32(inHeader->contractionUCACombos); in swapFormatVersion3()
240 header.mappingPosition= ds->readUInt32(inHeader->mappingPosition); in swapFormatVersion3()
241 header.expansion= ds->readUInt32(inHeader->expansion); in swapFormatVersion3()
242 header.contractionIndex= ds->readUInt32(inHeader->contractionIndex); in swapFormatVersion3()
243 header.contractionCEs= ds->readUInt32(inHeader->contractionCEs); in swapFormatVersion3()
244 header.contractionSize= ds->readUInt32(inHeader->contractionSize); in swapFormatVersion3()
245 header.endExpansionCE= ds->readUInt32(inHeader->endExpansionCE); in swapFormatVersion3()
246 header.expansionCESize= ds->readUInt32(inHeader->expansionCESize); in swapFormatVersion3()
247 header.endExpansionCECount= udata_readInt32(ds, inHeader->endExpansionCECount); in swapFormatVersion3()
248 header.contractionUCACombosSize=udata_readInt32(ds, inHeader->contractionUCACombosSize); in swapFormatVersion3()
249 header.scriptToLeadByte= ds->readUInt32(inHeader->scriptToLeadByte); in swapFormatVersion3()
250 header.leadByteToScript= ds->readUInt32(inHeader->leadByteToScript); in swapFormatVersion3()
255 …->swapArray32(ds, &(inHeader->scriptToLeadByte), sizeof(header.scriptToLeadByte) + sizeof(header.l… in swapFormatVersion3()
262 if(header.options!=0) { in swapFormatVersion3()
263 ds->swapArray32(ds, inBytes+header.options, header.expansion-header.options, in swapFormatVersion3()
264 outBytes+header.options, pErrorCode); in swapFormatVersion3()
268 if(header.mappingPosition!=0 && header.expansion!=0) { in swapFormatVersion3()
269 if(header.contractionIndex!=0) { in swapFormatVersion3()
271 count=header.contractionIndex-header.expansion; in swapFormatVersion3()
274 count=header.mappingPosition-header.expansion; in swapFormatVersion3()
276 ds->swapArray32(ds, inBytes+header.expansion, (int32_t)count, in swapFormatVersion3()
277 outBytes+header.expansion, pErrorCode); in swapFormatVersion3()
281 if(header.contractionSize!=0) { in swapFormatVersion3()
283 ds->swapArray16(ds, inBytes+header.contractionIndex, header.contractionSize*2, in swapFormatVersion3()
284 outBytes+header.contractionIndex, pErrorCode); in swapFormatVersion3()
287 ds->swapArray32(ds, inBytes+header.contractionCEs, header.contractionSize*4, in swapFormatVersion3()
288 outBytes+header.contractionCEs, pErrorCode); in swapFormatVersion3()
292 if(header.mappingPosition!=0) { in swapFormatVersion3()
293 count=header.endExpansionCE-header.mappingPosition; in swapFormatVersion3()
294 utrie_swap(ds, inBytes+header.mappingPosition, (int32_t)count, in swapFormatVersion3()
295 outBytes+header.mappingPosition, pErrorCode); in swapFormatVersion3()
299 if(header.endExpansionCECount!=0) { in swapFormatVersion3()
300 ds->swapArray32(ds, inBytes+header.endExpansionCE, header.endExpansionCECount*4, in swapFormatVersion3()
301 outBytes+header.endExpansionCE, pErrorCode); in swapFormatVersion3()
307 if(header.UCAConsts!=0) { in swapFormatVersion3()
312 … ds->swapArray32(ds, inBytes+header.UCAConsts, header.contractionUCACombos-header.UCAConsts, in swapFormatVersion3()
313 outBytes+header.UCAConsts, pErrorCode); in swapFormatVersion3()
317 if(header.contractionUCACombosSize!=0) { in swapFormatVersion3()
318 … count=header.contractionUCACombosSize*inHeader->contractionUCACombosWidth*U_SIZEOF_UCHAR; in swapFormatVersion3()
319 ds->swapArray16(ds, inBytes+header.contractionUCACombos, (int32_t)count, in swapFormatVersion3()
320 outBytes+header.contractionUCACombos, pErrorCode); in swapFormatVersion3()
324 if(header.scriptToLeadByte!=0) { in swapFormatVersion3()
325 …int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte))); // each entry = … in swapFormatVersion3()
326 …int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte + 2))); // each entry… in swapFormatVersion3()
327 ds->swapArray16(ds, inBytes+header.scriptToLeadByte, in swapFormatVersion3()
329 outBytes+header.scriptToLeadByte, pErrorCode); in swapFormatVersion3()
333 if(header.leadByteToScript!=0) { in swapFormatVersion3()
334 …int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript))); // each entry = … in swapFormatVersion3()
335 …int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript + 2))); // each entry… in swapFormatVersion3()
336 ds->swapArray16(ds, inBytes+header.leadByteToScript, in swapFormatVersion3()
338 outBytes+header.leadByteToScript, pErrorCode); in swapFormatVersion3()
342 return header.size; in swapFormatVersion3()
611 InverseUCATableHeader header={ 0,0,0,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0} }; in ucol_swapInverseUCA() local
650 header.byteSize=udata_readInt32(ds, inHeader->byteSize); in ucol_swapInverseUCA()
653 (uint32_t)(length-headerSize)<(header.byteSize=udata_readInt32(ds, inHeader->byteSize))) in ucol_swapInverseUCA()
664 uprv_memcpy(outBytes, inBytes, header.byteSize); in ucol_swapInverseUCA()
670 header.tableSize= ds->readUInt32(inHeader->tableSize); in ucol_swapInverseUCA()
671 header.contsSize= ds->readUInt32(inHeader->contsSize); in ucol_swapInverseUCA()
672 header.table= ds->readUInt32(inHeader->table); in ucol_swapInverseUCA()
673 header.conts= ds->readUInt32(inHeader->conts); in ucol_swapInverseUCA()
679 ds->swapArray32(ds, inBytes+header.table, header.tableSize*3*4, in ucol_swapInverseUCA()
680 outBytes+header.table, pErrorCode); in ucol_swapInverseUCA()
683 ds->swapArray16(ds, inBytes+header.conts, header.contsSize*U_SIZEOF_UCHAR, in ucol_swapInverseUCA()
684 outBytes+header.conts, pErrorCode); in ucol_swapInverseUCA()
687 return headerSize+header.byteSize; in ucol_swapInverseUCA()