• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/ICU-511.35/icuSources/common/

Lines Matching refs:header

87         /* swap the header */
110 UCATableHeader header;
122 * check the length against the header size before reading the size field
124 uprv_memset(&header, 0, sizeof(header));
126 header.size=udata_readInt32(ds, inHeader->size);
127 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
131 header.magic=ds->readUInt32(inHeader->magic);
133 header.magic==UCOL_HEADER_MAGIC &&
147 /* swap a header-less collation binary, inside a resource bundle or ucadata.icu */
157 UCATableHeader header;
180 * check the length against the header size before reading the size field
182 uprv_memset(&header, 0, sizeof(header));
184 header.size=udata_readInt32(ds, inHeader->size);
185 } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
186 udata_printError(ds, "ucol_swapBinary(): too few bytes (%d after header) for collation data\n",
192 header.magic=ds->readUInt32(inHeader->magic);
194 header.magic==UCOL_HEADER_MAGIC &&
199 header.magic,
215 uprv_memcpy(outBytes, inBytes, header.size);
221 header.options= ds->readUInt32(inHeader->options);
222 header.UCAConsts= ds->readUInt32(inHeader->UCAConsts);
223 header.contractionUCACombos= ds->readUInt32(inHeader->contractionUCACombos);
224 header.mappingPosition= ds->readUInt32(inHeader->mappingPosition);
225 header.expansion= ds->readUInt32(inHeader->expansion);
226 header.contractionIndex= ds->readUInt32(inHeader->contractionIndex);
227 header.contractionCEs= ds->readUInt32(inHeader->contractionCEs);
228 header.contractionSize= ds->readUInt32(inHeader->contractionSize);
229 header.endExpansionCE= ds->readUInt32(inHeader->endExpansionCE);
230 header.expansionCESize= ds->readUInt32(inHeader->expansionCESize);
231 header.endExpansionCECount= udata_readInt32(ds, inHeader->endExpansionCECount);
232 header.contractionUCACombosSize=udata_readInt32(ds, inHeader->contractionUCACombosSize);
233 header.scriptToLeadByte= ds->readUInt32(inHeader->scriptToLeadByte);
234 header.leadByteToScript= ds->readUInt32(inHeader->leadByteToScript);
236 /* swap the 32-bit integers in the header */
239 ds->swapArray32(ds, &(inHeader->scriptToLeadByte), sizeof(header.scriptToLeadByte) + sizeof(header.leadByteToScript),
246 if(header.options!=0) {
247 ds->swapArray32(ds, inBytes+header.options, header.expansion-header.options,
248 outBytes+header.options, pErrorCode);
252 if(header.mappingPosition!=0 && header.expansion!=0) {
253 if(header.contractionIndex!=0) {
255 count=header.contractionIndex-header.expansion;
258 count=header.mappingPosition-header.expansion;
260 ds->swapArray32(ds, inBytes+header.expansion, (int32_t)count,
261 outBytes+header.expansion, pErrorCode);
265 if(header.contractionSize!=0) {
267 ds->swapArray16(ds, inBytes+header.contractionIndex, header.contractionSize*2,
268 outBytes+header.contractionIndex, pErrorCode);
271 ds->swapArray32(ds, inBytes+header.contractionCEs, header.contractionSize*4,
272 outBytes+header.contractionCEs, pErrorCode);
276 if(header.mappingPosition!=0) {
277 count=header.endExpansionCE-header.mappingPosition;
278 utrie_swap(ds, inBytes+header.mappingPosition, (int32_t)count,
279 outBytes+header.mappingPosition, pErrorCode);
283 if(header.endExpansionCECount!=0) {
284 ds->swapArray32(ds, inBytes+header.endExpansionCE, header.endExpansionCECount*4,
285 outBytes+header.endExpansionCE, pErrorCode);
291 if(header.UCAConsts!=0) {
296 count=header.contractionUCACombos-header.UCAConsts;
297 ds->swapArray32(ds, inBytes+header.UCAConsts, header.contractionUCACombos-header.UCAConsts,
298 outBytes+header.UCAConsts, pErrorCode);
302 if(header.contractionUCACombosSize!=0) {
303 count=header.contractionUCACombosSize*inHeader->contractionUCACombosWidth*U_SIZEOF_UCHAR;
304 ds->swapArray16(ds, inBytes+header.contractionUCACombos, (int32_t)count,
305 outBytes+header.contractionUCACombos, pErrorCode);
309 if(header.scriptToLeadByte!=0) {
310 int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte))); // each entry = 2 * uint16
311 int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.scriptToLeadByte + 2))); // each entry = uint16
312 ds->swapArray16(ds, inBytes+header.scriptToLeadByte,
314 outBytes+header.scriptToLeadByte, pErrorCode);
318 if(header.leadByteToScript!=0) {
319 int indexCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript))); // each entry = uint16
320 int dataCount = ds->readUInt16(*((uint16_t*)(inBytes+header.leadByteToScript + 2))); // each entry = uint16
321 ds->swapArray16(ds, inBytes+header.leadByteToScript,
323 outBytes+header.leadByteToScript, pErrorCode);
327 return header.size;
388 InverseUCATableHeader header={ 0,0,0,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0} };
424 * check the length against the header size before reading the size field
427 header.byteSize=udata_readInt32(ds, inHeader->byteSize);
430 (uint32_t)(length-headerSize)<(header.byteSize=udata_readInt32(ds, inHeader->byteSize)))
432 udata_printError(ds, "ucol_swapInverseUCA(): too few bytes (%d after header) for inverse UCA collation data\n",
441 uprv_memcpy(outBytes, inBytes, header.byteSize);
447 header.tableSize= ds->readUInt32(inHeader->tableSize);
448 header.contsSize= ds->readUInt32(inHeader->contsSize);
449 header.table= ds->readUInt32(inHeader->table);
450 header.conts= ds->readUInt32(inHeader->conts);
452 /* swap the 32-bit integers in the header */
456 ds->swapArray32(ds, inBytes+header.table, header.tableSize*3*4,
457 outBytes+header.table, pErrorCode);
460 ds->swapArray16(ds, inBytes+header.conts, header.contsSize*U_SIZEOF_UCHAR,
461 outBytes+header.conts, pErrorCode);
464 return headerSize+header.byteSize;