Lines Matching refs:table
352 ToCEntry *table;
430 /* check that the itemCount fits, then the ToC table, then at least the header of the last item */
441 /* ToC table does not fit */
506 * Allocate the ToC table and, if necessary, a temporary buffer for
516 * not only the ToC table but also the data items themselves.
524 table=(ToCEntry *)uprv_malloc(itemCount*sizeof(ToCEntry)+length+DEFAULT_PADDING_LENGTH);
525 if(table!=NULL) {
526 outBytes=(uint8_t *)(table+itemCount);
533 table=(ToCEntry *)uprv_malloc(itemCount*sizeof(ToCEntry));
535 if(table==NULL) {
545 /* read the ToC table */
547 table[i].nameOffset=ds->readUInt32(inEntries[i].nameOffset);
548 table[i].inOffset=ds->readUInt32(inEntries[i].dataOffset);
550 table[i-1].length=table[i].inOffset-table[i-1].inOffset;
553 table[itemCount-1].length=(uint32_t)length-table[itemCount-1].inOffset;
558 table[i].outOffset=table[i].inOffset;
577 table[itemCount-1].length+=(uint32_t)delta;
581 offset=table[0].inOffset;
583 uprv_sortArray(table, (int32_t)itemCount, (int32_t)sizeof(ToCEntry),
593 table[i].outOffset=offset;
594 offset+=table[i].length;
598 /* write the output ToC table */
600 ds->writeUInt32(&outEntries[i].nameOffset, table[i].nameOffset);
601 ds->writeUInt32(&outEntries[i].dataOffset, table[i].outOffset);
607 uprv_memcpy(outBytes+table[i].outOffset, inBytes+table[i].inOffset, table[i].length);
610 udata_swap(ds, inBytes+table[i].inOffset, (int32_t)table[i].length,
611 outBytes+table[i].outOffset, pErrorCode);
618 (char *)outBytes+table[i].nameOffset,
619 table[i].inOffset, table[i].length, u_errorName(*pErrorCode));
624 table[i].inOffset, table[i].length, u_errorName(*pErrorCode));
628 uprv_memcpy(outBytes+table[i].outOffset, inBytes+table[i].inOffset, table[i].length);
636 uprv_free(table);