Home | History | Annotate | Download | only in makeconv

Lines Matching full:data

49 initConvData(ConvData *data) {
50 uprv_memset(data, 0, sizeof(ConvData));
51 data->sharedData.structSize=sizeof(UConverterSharedData);
52 data->staticData.structSize=sizeof(UConverterStaticData);
53 data->sharedData.staticData=&data->staticData;
57 cleanupConvData(ConvData *data) {
58 if(data!=NULL) {
59 if(data->cnvData!=NULL) {
60 data->cnvData->close(data->cnvData);
61 data->cnvData=NULL;
63 if(data->extData!=NULL) {
64 data->extData->close(data->extData);
65 data->extData=NULL;
67 ucm_close(data->ucm);
68 data->ucm=NULL;
73 * from ucnvstat.c - static prototypes of data-based converters
84 createConverter(ConvData *data, const char* converterName, UErrorCode *pErrorCode);
90 writeConverterData(ConvData *data, const char *cnvName, const char *cnvDir, UErrorCode *status);
109 writeConverterData(ConvData *data, const char *cnvName, const char *cnvDir, UErrorCode *status)
122 if(data->cnvData!=NULL) {
125 if(data->extData!=NULL) {
146 /* all read only, clean, platform independent data. Mmmm. :) */
147 udata_writeBlock(mem, &data->staticData, sizeof(UConverterStaticData));
151 size += data->cnvData->write(data->cnvData, &data->staticData, mem, tableType);
154 size += data->extData->write(data->extData, &data->staticData, mem, tableType);
192 ConvData data;
326 initConvData(&data);
327 createConverter(&data, arg, &localError);
340 /* Insure the static data name matches the file name */
358 if(uprv_stricmp(p,data.staticData.name))
362 data.staticData.name);
365 uprv_strcpy((char*)data.staticData.name, cnvName);
367 if(!uprv_isInvariantString((char*)data.staticData.name, -1)) {
371 data.staticData.name);
380 writeConverterData(&data, cnvNameWithPkg, destdir, &localError);
399 cleanupConvData(&data);
424 readHeader(ConvData *data,
437 staticData=&data->staticData;
443 if(ucm_parseHeaderLine(data->ucm, line, &key, &value)) {
486 /* copy values from the UCMFile to the static data */
487 staticData->maxBytesPerChar=(int8_t)data->ucm->states.maxCharLength;
488 staticData->minBytesPerChar=(int8_t)data->ucm->states.minCharLength;
489 staticData->conversionType=data->ucm->states.conversionType;
505 if(data->ucm->baseName[0]==0) {
537 if(data->ucm->states.outputType<0) {
538 datadata->ucm->states.maxCharLength-1;
553 readFile(ConvData *data, const char* converterName,
566 data->ucm=ucm_open();
574 readHeader(data, convFile, converterName, pErrorCode);
579 if(data->ucm->baseName[0]==0) {
581 baseStates=&data->ucm->states;
589 ucm_readTable(data->ucm, convFile, dataIsBase, baseStates, pErrorCode);
609 ucm_readTable(data->ucm, convFile, FALSE, baseStates, pErrorCode);
618 if(data->ucm->base->flagsType==UCM_FLAGS_MIXED || data->ucm->ext->flagsType==UCM_FLAGS_MIXED) {
627 createConverter(ConvData *data, const char *converterName, UErrorCode *pErrorCode) {
638 initConvData(data);
640 dataIsBase=readFile(data, converterName, pErrorCode);
645 staticData=&data->staticData;
646 states=&data->ucm->states;
653 data->cnvData=MBCSOpen(data->ucm);
654 if(data->cnvData==NULL) {
657 } else if(!data->cnvData->isValid(data->cnvData,
664 !data->cnvData->isValid(data->cnvData, &staticData->subChar1, 1)
670 data->ucm->ext->mappingsLength>0 &&
671 !ucm_checkBaseExt(states, data->ucm->base, data->ucm->ext, data->ucm->ext, FALSE)
674 } else if(data->ucm->base->flagsType&UCM_FLAGS_EXPLICIT) {
675 /* sort the table so that it can be turned into UTF-8-friendly data */
676 ucm_sortTable(data->ucm->base);
682 !data->cnvData->addTable(data->cnvData, data->ucm->base, &data->staticData)
692 * to be excluded from the extension toUnicode data.
696 ucm_moveMappings(data->ucm->base, data->ucm->ext);
697 ucm_sortTable(data->ucm->ext);
698 if(data->ucm->ext->mappingsLength>0) {
700 data->extData=CnvExtOpen(data->ucm);
701 if(data->extData==NULL) {
704 !data->extData->addTable(data->extData, data->ucm->ext, &data->staticData)
718 /* assemble a path/filename for data->ucm->baseName */
721 uprv_strcpy(basename, data->ucm->baseName);
733 data->extData=CnvExtOpen(data->ucm);
734 if(data->extData==NULL) {
790 !ucm_checkValidity(data->ucm->ext, baseStates) ||
791 !ucm_checkBaseExt(baseStates, baseData.ucm->base, data->ucm->ext, data->ucm->ext, FALSE)
828 ucm_moveMappings(baseData.ucm->base, data->ucm->ext);
829 ucm_sortTable(data->ucm->ext);
832 if(!data->extData->addTable(data->extData, data->ucm->ext, &data->staticData)) {