Lines Matching refs:ds

33 utrie_swap(const UDataSwapper *ds,
44 if(ds==NULL || inData==NULL || (length>=0 && outData==NULL)) {
56 trie.signature=ds->readUInt32(inTrie->signature);
57 trie.options=ds->readUInt32(inTrie->options);
58 trie.indexLength=udata_readInt32(ds, inTrie->indexLength);
59 trie.dataLength=udata_readInt32(ds, inTrie->dataLength);
88 ds->swapArray32(ds, inTrie, sizeof(UTrieHeader), outTrie, pErrorCode);
92 ds->swapArray16(ds, inTrie+1, trie.indexLength*2, outTrie+1, pErrorCode);
93 ds->swapArray32(ds, (const uint16_t *)(inTrie+1)+trie.indexLength, trie.dataLength*4,
96 ds->swapArray16(ds, inTrie+1, (trie.indexLength+trie.dataLength)*2, outTrie+1, pErrorCode);
107 ucol_looksLikeCollationBinary(const UDataSwapper *ds,
112 if(ds==NULL || inData==NULL || length<-1) {
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);
140 if(inHeader->isBigEndian!=ds->inIsBigEndian || inHeader->charSetFamily!=ds->inCharset) {
149 ucol_swapBinary(const UDataSwapper *ds,
165 if(ds==NULL || inData==NULL || length<-1 || (length>0 && outData==NULL)) {
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);
198 udata_printError(ds, "ucol_swapBinary(): magic 0x%08x or format version %02x.%02x is not a collation binary\n",
205 if(inHeader->isBigEndian!=ds->inIsBigEndian || inHeader->charSetFamily!=ds->inCharset) {
206 udata_printError(ds, "ucol_swapBinary(): endianness %d or charset %d does not match the swapper\n",
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);
237 ds->swapArray32(ds, inHeader, (int32_t)((const char *)&inHeader->jamoSpecial-(const char *)inHeader),
239 ds->swapArray32(ds, &(inHeader->scriptToLeadByte), sizeof(header.scriptToLeadByte) + sizeof(header.leadByteToScript),
242 outHeader->isBigEndian=ds->outIsBigEndian;
243 outHeader->charSetFamily=ds->outCharset;
247 ds->swapArray32(ds, inBytes+header.options, header.expansion-header.options,
260 ds->swapArray32(ds, inBytes+header.expansion, (int32_t)count,
267 ds->swapArray16(ds, inBytes+header.contractionIndex, header.contractionSize*2,
271 ds->swapArray32(ds, inBytes+header.contractionCEs, header.contractionSize*4,
278 utrie_swap(ds, inBytes+header.mappingPosition, (int32_t)count,
284 ds->swapArray32(ds, inBytes+header.endExpansionCE, header.endExpansionCECount*4,
297 ds->swapArray32(ds, inBytes+header.UCAConsts, header.contractionUCACombos-header.UCAConsts,
304 ds->swapArray16(ds, inBytes+header.contractionUCACombos, (int32_t)count,
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,
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,
332 ucol_swap(const UDataSwapper *ds,
340 headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
355 udata_printError(ds, "ucol_swap(): data format %02x.%02x.%02x.%02x (format version %02x.%02x) is not a collation file\n",
363 collationSize=ucol_swapBinary(ds,
377 ucol_swapInverseUCA(const UDataSwapper *ds,
391 headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
406 udata_printError(ds, "ucol_swapInverseUCA(): data format %02x.%02x.%02x.%02x (format version %02x.%02x) is not an inverse UCA collation file\n",
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",
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);
453 ds->swapArray32(ds, inHeader, 5*4, outHeader, pErrorCode);
456 ds->swapArray32(ds, inBytes+header.table, header.tableSize*3*4,
460 ds->swapArray16(ds, inBytes+header.conts, header.contsSize*U_SIZEOF_UCHAR,