* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
- if(extData!=NULL) {
- uprv_memset(extData, 0, sizeof(CnvExtData));
+ if(extData==NULL) {
+ printf("out of memory\n");
+ exit(U_MEMORY_ALLOCATION_ERROR);
+ }
+ uprv_memset(extData, 0, sizeof(CnvExtData));
- extData->newConverter.close=CnvExtClose;
- extData->newConverter.isValid=CnvExtIsValid;
- extData->newConverter.addTable=CnvExtAddTable;
- extData->newConverter.write=CnvExtWrite;
- }
+ extData->newConverter.close=CnvExtClose;
+ extData->newConverter.isValid=CnvExtIsValid;
+ extData->newConverter.addTable=CnvExtAddTable;
+ extData->newConverter.write=CnvExtWrite;
header.flags=(uint32_t)((headerSize<<8)|MBCS_OUTPUT_EXT_ONLY);
/* write the header and the base table name */
header.flags=(uint32_t)((headerSize<<8)|MBCS_OUTPUT_EXT_ONLY);
/* write the header and the base table name */
/*
* for the root table and for fairly full tables:
* allocate for direct, linear array access
* by keeping count, to write an entry for each unit value
* from low to high
/*
* for the root table and for fairly full tables:
* allocate for direct, linear array access
* by keeping count, to write an entry for each unit value
* from low to high
/* allocate the section: 1 entry for the header + count for the items */
section=(uint32_t *)utm_allocN(extData->toUTable, 1+count);
/* allocate the section: 1 entry for the header + count for the items */
section=(uint32_t *)utm_allocN(extData->toUTable, 1+count);
/*
* Remove toUnicode fallbacks and non-<subchar1> SUB mappings
* which are irrelevant for the fromUnicode extension table.
/*
* Remove toUnicode fallbacks and non-<subchar1> SUB mappings
* which are irrelevant for the fromUnicode extension table.
* Overwrite the reverseMap with an index array to the relevant mappings.
* Modify the code point sequences to a generator-friendly format where
* the first code points remains unchanged but the following are recoded
* Overwrite the reverseMap with an index array to the relevant mappings.
* Modify the code point sequences to a generator-friendly format where
* the first code points remains unchanged but the following are recoded