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
85 createConverter(ConvData *data, const char* converterName, UErrorCode *pErrorCode);
91 writeConverterData(ConvData *data, const char *cnvName, const char *cnvDir, UErrorCode *status);
110 writeConverterData(ConvData *data, const char *cnvName, const char *cnvDir, UErrorCode *status)
123 if(data->cnvData!=NULL) {
126 if(data->extData!=NULL) {
147 /* all read only, clean, platform independent data. Mmmm. :) */
148 udata_writeBlock(mem, &data->staticData, sizeof(UConverterStaticData));
152 size += data->cnvData->write(data->cnvData, &data->staticData, mem, tableType);
155 size += data->extData->write(data->extData, &data->staticData, mem, tableType);
195 ConvData data;
334 initConvData(&data);
335 createConverter(&data, arg, &localError);
348 /* Insure the static data name matches the file name */
366 if(uprv_stricmp(p,data.staticData.name))
370 data.staticData.name);
373 uprv_strcpy((char*)data.staticData.name, cnvName);
375 if(!uprv_isInvariantString((char*)data.staticData.name, -1)) {
379 data.staticData.name);
388 writeConverterData(&data, cnvNameWithPkg, destdir, &localError);
407 cleanupConvData(&data);
432 readHeader(ConvData *data,
445 staticData=&data->staticData;
451 if(ucm_parseHeaderLine(data->ucm, line, &key, &value)) {
494 /* copy values from the UCMFile to the static data */
495 staticData->maxBytesPerChar=(int8_t)data->ucm->states.maxCharLength;
496 staticData->minBytesPerChar=(int8_t)data->ucm->states.minCharLength;
497 staticData->conversionType=data->ucm->states.conversionType;
513 if(data->ucm->baseName[0]==0) {
545 if(data->ucm->states.outputType<0) {
546 data->ucm->states.outputType=(int8_t)data->ucm->states.maxCharLength-1;
561 readFile(ConvData *data, const char* converterName,
574 data->ucm=ucm_open();
582 readHeader(data, convFile, converterName, pErrorCode);
587 if(data->ucm->baseName[0]==0) {
589 baseStates=&data->ucm->states;
597 ucm_readTable(data->ucm, convFile, dataIsBase, baseStates, pErrorCode);
617 ucm_readTable(data->ucm, convFile, FALSE, baseStates, pErrorCode);
626 if(data->ucm->base->flagsType==UCM_FLAGS_MIXED || data->ucm->ext->flagsType==UCM_FLAGS_MIXED) {
635 createConverter(ConvData *data, const char *converterName, UErrorCode *pErrorCode) {
646 initConvData(data);
648 dataIsBase=readFile(data, converterName, pErrorCode);
653 staticData=&data->staticData;
654 states=&data->ucm->states;
661 data->cnvData=MBCSOpen(data->ucm);
662 if(data->cnvData==NULL) {
665 } else if(!data->cnvData->isValid(data->cnvData,
672 !data->cnvData->isValid(data->cnvData, &staticData->subChar1, 1)
678 data->ucm->ext->mappingsLength>0 &&
679 !ucm_checkBaseExt(states, data->ucm->base, data->ucm->ext, data->ucm->ext, FALSE)
682 } else if(data->ucm->base->flagsType&UCM_FLAGS_EXPLICIT) {
683 /* sort the table so that it can be turned into UTF-8-friendly data */
684 ucm_sortTable(data->ucm->base);
690 !data->cnvData->addTable(data->cnvData, data->ucm->base, &data->staticData)
700 * to be excluded from the extension toUnicode data.
704 ucm_moveMappings(data->ucm->base, data->ucm->ext);
705 ucm_sortTable(data->ucm->ext);
706 if(data->ucm->ext->mappingsLength>0) {
708 data->extData=CnvExtOpen(data->ucm);
709 if(data->extData==NULL) {
712 !data->extData->addTable(data->extData, data->ucm->ext, &data->staticData)
726 /* assemble a path/filename for data->ucm->baseName */
729 uprv_strcpy(basename, data->ucm->baseName);
741 data->extData=CnvExtOpen(data->ucm);
742 if(data->extData==NULL) {
798 !ucm_checkValidity(data->ucm->ext, baseStates) ||
799 !ucm_checkBaseExt(baseStates, baseData.ucm->base, data->ucm->ext, data->ucm->ext, FALSE)
836 ucm_moveMappings(baseData.ucm->base, data->ucm->ext);
837 ucm_sortTable(data->ucm->ext);
840 if(!data->extData->addTable(data->extData, data->ucm->ext, &data->staticData)) {