- } else if(uprv_strcmp(key, "uconv_class")==0) {
- const UConverterStaticData *prototype;
-
- if(uprv_strcmp(value, "DBCS")==0) {
- staticData->conversionType=UCNV_DBCS;
- } else if(uprv_strcmp(value, "SBCS")==0) {
- staticData->conversionType = UCNV_SBCS;
- } else if(uprv_strcmp(value, "MBCS")==0) {
- staticData->conversionType = UCNV_MBCS;
- } else if(uprv_strcmp(value, "EBCDIC_STATEFUL")==0) {
- staticData->conversionType = UCNV_EBCDIC_STATEFUL;
- } else {
- fprintf(stderr, "error: unknown <uconv_class> %s\n", value);
- *pErrorCode=U_INVALID_TABLE_FORMAT;
- return;
- }
-
- /* Now that we know the type, copy any 'default' values from the table. */
- prototype=ucnv_converterStaticData[staticData->conversionType];
- if(prototype!=NULL) {
- if(staticData->name[0]==0) {
- uprv_strcpy((char*)staticData->name, prototype->name);
- }
-
- if(staticData->codepage==0) {
- staticData->codepage = prototype->codepage;
- }
-
- if(staticData->platform==0) {
- staticData->platform = prototype->platform;
- }
-
- if(staticData->minBytesPerChar==0) {
- staticData->minBytesPerChar = prototype->minBytesPerChar;
- }
-
- if(staticData->maxBytesPerChar==0) {
- staticData->maxBytesPerChar = prototype->maxBytesPerChar;
- }
-
- if(staticData->subCharLen==0) {
- staticData->subCharLen=prototype->subCharLen;
- if(prototype->subCharLen>0) {
- uprv_memcpy(staticData->subChar, prototype->subChar, prototype->subCharLen);
- }
- }
- }
- } else if(uprv_strcmp(key, "mb_cur_max")==0) {
- if('1'<=*value && *value<='4' && value[1]==0) {
- staticData->maxBytesPerChar=(int8_t)(*value-'0');
- } else {
- fprintf(stderr, "error: illegal <mb_cur_max> %s\n", value);
- *pErrorCode=U_INVALID_TABLE_FORMAT;
- return;
- }
- } else if(uprv_strcmp(key, "mb_cur_min")==0) {
- if('1'<=*value && *value<='4' && value[1]==0) {
- staticData->minBytesPerChar=(int8_t)(*value-'0');
- } else {
- fprintf(stderr, "error: illegal <mb_cur_min> %s\n", value);
- *pErrorCode=U_INVALID_TABLE_FORMAT;
- return;
- }