Lines Matching refs:header
111 UCATableHeader header; in ucol_looksLikeCollationBinary() local
126 uprv_memset(&header, 0, sizeof(header)); in ucol_looksLikeCollationBinary()
128 header.size=udata_readInt32(ds, inHeader->size); in ucol_looksLikeCollationBinary()
129 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) { in ucol_looksLikeCollationBinary()
133 header.magic=ds->readUInt32(inHeader->magic); in ucol_looksLikeCollationBinary()
135 header.magic==UCOL_HEADER_MAGIC && in ucol_looksLikeCollationBinary()
159 UCATableHeader header; in ucol_swapBinary() local
184 uprv_memset(&header, 0, sizeof(header)); in ucol_swapBinary()
186 header.size=udata_readInt32(ds, inHeader->size); in ucol_swapBinary()
187 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) { in ucol_swapBinary()
194 header.magic=ds->readUInt32(inHeader->magic); in ucol_swapBinary()
196 header.magic==UCOL_HEADER_MAGIC && in ucol_swapBinary()
201 header.magic, in ucol_swapBinary()
217 uprv_memcpy(outBytes, inBytes, header.size); in ucol_swapBinary()
223 header.options= ds->readUInt32(inHeader->options); in ucol_swapBinary()
224 header.UCAConsts= ds->readUInt32(inHeader->UCAConsts); in ucol_swapBinary()
225 header.contractionUCACombos= ds->readUInt32(inHeader->contractionUCACombos); in ucol_swapBinary()
226 header.mappingPosition= ds->readUInt32(inHeader->mappingPosition); in ucol_swapBinary()
227 header.expansion= ds->readUInt32(inHeader->expansion); in ucol_swapBinary()
228 header.contractionIndex= ds->readUInt32(inHeader->contractionIndex); in ucol_swapBinary()
229 header.contractionCEs= ds->readUInt32(inHeader->contractionCEs); in ucol_swapBinary()
230 header.contractionSize= ds->readUInt32(inHeader->contractionSize); in ucol_swapBinary()
231 header.endExpansionCE= ds->readUInt32(inHeader->endExpansionCE); in ucol_swapBinary()
232 header.expansionCESize= ds->readUInt32(inHeader->expansionCESize); in ucol_swapBinary()
233 header.endExpansionCECount= udata_readInt32(ds, inHeader->endExpansionCECount); in ucol_swapBinary()
234 header.contractionUCACombosSize=udata_readInt32(ds, inHeader->contractionUCACombosSize); in ucol_swapBinary()
235 header.scriptToLeadByte= ds->readUInt32(inHeader->scriptToLeadByte); in ucol_swapBinary()
236 header.leadByteToScript= ds->readUInt32(inHeader->leadByteToScript); in ucol_swapBinary()
241 …->swapArray32(ds, &(inHeader->scriptToLeadByte), sizeof(header.scriptToLeadByte) + sizeof(header.l… in ucol_swapBinary()
248 if(header.options!=0) { in ucol_swapBinary()
249 ds->swapArray32(ds, inBytes+header.options, header.expansion-header.options, in ucol_swapBinary()
250 outBytes+header.options, pErrorCode); in ucol_swapBinary()
254 if(header.mappingPosition!=0 && header.expansion!=0) { in ucol_swapBinary()
255 if(header.contractionIndex!=0) { in ucol_swapBinary()
257 count=header.contractionIndex-header.expansion; in ucol_swapBinary()
260 count=header.mappingPosition-header.expansion; in ucol_swapBinary()
262 ds->swapArray32(ds, inBytes+header.expansion, (int32_t)count, in ucol_swapBinary()
263 outBytes+header.expansion, pErrorCode); in ucol_swapBinary()
267 if(header.contractionSize!=0) { in ucol_swapBinary()
269 ds->swapArray16(ds, inBytes+header.contractionIndex, header.contractionSize*2, in ucol_swapBinary()
270 outBytes+header.contractionIndex, pErrorCode); in ucol_swapBinary()
273 ds->swapArray32(ds, inBytes+header.contractionCEs, header.contractionSize*4, in ucol_swapBinary()
274 outBytes+header.contractionCEs, pErrorCode); in ucol_swapBinary()
278 if(header.mappingPosition!=0) { in ucol_swapBinary()
279 count=header.endExpansionCE-header.mappingPosition; in ucol_swapBinary()
280 utrie_swap(ds, inBytes+header.mappingPosition, (int32_t)count, in ucol_swapBinary()
281 outBytes+header.mappingPosition, pErrorCode); in ucol_swapBinary()
285 if(header.endExpansionCECount!=0) { in ucol_swapBinary()
286 ds->swapArray32(ds, inBytes+header.endExpansionCE, header.endExpansionCECount*4, in ucol_swapBinary()
287 outBytes+header.endExpansionCE, pErrorCode); in ucol_swapBinary()
293 if(header.UCAConsts!=0) { in ucol_swapBinary()
298 count=header.contractionUCACombos-header.UCAConsts; in ucol_swapBinary()
299 … ds->swapArray32(ds, inBytes+header.UCAConsts, header.contractionUCACombos-header.UCAConsts, in ucol_swapBinary()
300 outBytes+header.UCAConsts, pErrorCode); in ucol_swapBinary()
304 if(header.contractionUCACombosSize!=0) { in ucol_swapBinary()
305 … count=header.contractionUCACombosSize*inHeader->contractionUCACombosWidth*U_SIZEOF_UCHAR; in ucol_swapBinary()
306 ds->swapArray16(ds, inBytes+header.contractionUCACombos, (int32_t)count, in ucol_swapBinary()
307 outBytes+header.contractionUCACombos, pErrorCode); in ucol_swapBinary()
311 if(header.scriptToLeadByte!=0) { in ucol_swapBinary()
312 …int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte))); // each entry = … in ucol_swapBinary()
313 …int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte + 2))); // each entry… in ucol_swapBinary()
314 ds->swapArray16(ds, inBytes+header.scriptToLeadByte, in ucol_swapBinary()
316 outBytes+header.scriptToLeadByte, pErrorCode); in ucol_swapBinary()
320 if(header.leadByteToScript!=0) { in ucol_swapBinary()
321 …int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript))); // each entry = … in ucol_swapBinary()
322 …int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript + 2))); // each entry… in ucol_swapBinary()
323 ds->swapArray16(ds, inBytes+header.leadByteToScript, in ucol_swapBinary()
325 outBytes+header.leadByteToScript, pErrorCode); in ucol_swapBinary()
329 return header.size; in ucol_swapBinary()
390 InverseUCATableHeader header={ 0,0,0,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0} }; in ucol_swapInverseUCA() local
429 header.byteSize=udata_readInt32(ds, inHeader->byteSize); in ucol_swapInverseUCA()
432 (uint32_t)(length-headerSize)<(header.byteSize=udata_readInt32(ds, inHeader->byteSize))) in ucol_swapInverseUCA()
443 uprv_memcpy(outBytes, inBytes, header.byteSize); in ucol_swapInverseUCA()
449 header.tableSize= ds->readUInt32(inHeader->tableSize); in ucol_swapInverseUCA()
450 header.contsSize= ds->readUInt32(inHeader->contsSize); in ucol_swapInverseUCA()
451 header.table= ds->readUInt32(inHeader->table); in ucol_swapInverseUCA()
452 header.conts= ds->readUInt32(inHeader->conts); in ucol_swapInverseUCA()
458 ds->swapArray32(ds, inBytes+header.table, header.tableSize*3*4, in ucol_swapInverseUCA()
459 outBytes+header.table, pErrorCode); in ucol_swapInverseUCA()
462 ds->swapArray16(ds, inBytes+header.conts, header.contsSize*U_SIZEOF_UCHAR, in ucol_swapInverseUCA()
463 outBytes+header.conts, pErrorCode); in ucol_swapInverseUCA()
466 return headerSize+header.byteSize; in ucol_swapInverseUCA()