Lines Matching refs:norm
40 int32_t ExtraData::writeMapping(UChar32 c, const Norm &norm, UnicodeString &dataString) { in writeMapping() argument
41 UnicodeString &m=*norm.mapping; in writeMapping()
44 int32_t firstUnit=length|(norm.trailCC<<8); in writeMapping()
46 if(norm.rawMapping!=NULL) { in writeMapping()
47 UnicodeString &rm=*norm.rawMapping; in writeMapping()
79 int32_t cccLccc=norm.cc|(norm.leadCC<<8); in writeMapping()
90 int32_t ExtraData::writeNoNoMapping(UChar32 c, const Norm &norm, in writeNoNoMapping() argument
94 int32_t offset=writeMapping(c, norm, newMapping); in writeNoNoMapping()
110 UBool ExtraData::setNoNoDelta(UChar32 c, Norm &norm) const { in setNoNoDelta()
113 if(norm.mappingCP>=0 && in setNoNoDelta()
114 !(c<=0x7f && norm.mappingCP>0x7f) && in setNoNoDelta()
115 norms.getNormRef(norm.mappingCP).type<Norm::NO_NO_COMP_YES) { in setNoNoDelta()
116 int32_t delta=norm.mappingCP-c; in setNoNoDelta()
118 norm.type=Norm::NO_NO_DELTA; in setNoNoDelta()
119 norm.offset=delta; in setNoNoDelta()
126 void ExtraData::writeCompositions(UChar32 c, const Norm &norm, UnicodeString &dataString) { in writeCompositions() argument
127 if(norm.cc!=0) { in writeCompositions()
135 const CompositionPair *pairs=norm.getCompositionPairs(length); in writeCompositions()
174 void ExtraData::rangeHandler(UChar32 start, UChar32 end, Norm &norm) { in rangeHandler() argument
182 if(norm.error!=nullptr) { in rangeHandler()
183 fprintf(stderr, "gennorm2 error: U+%04lX %s\n", (long)start, norm.error); in rangeHandler()
186 writeExtraData(start, norm); in rangeHandler()
194 void ExtraData::writeExtraData(UChar32 c, Norm &norm) { in writeExtraData() argument
195 switch(norm.type) { in writeExtraData()
199 norm.offset=yesYesCompositions.length(); in writeExtraData()
200 writeCompositions(c, norm, yesYesCompositions); in writeExtraData()
203 norm.offset=yesNoMappingsAndCompositions.length()+ in writeExtraData()
204 writeMapping(c, norm, yesNoMappingsAndCompositions); in writeExtraData()
205 writeCompositions(c, norm, yesNoMappingsAndCompositions); in writeExtraData()
208 norm.offset=yesNoMappingsOnly.length()+ in writeExtraData()
209 writeMapping(c, norm, yesNoMappingsOnly); in writeExtraData()
212 if(!optimizeFast && setNoNoDelta(c, norm)) { in writeExtraData()
215 norm.offset=writeNoNoMapping(c, norm, noNoMappingsCompYes, previousNoNoMappingsCompYes); in writeExtraData()
218 if(!optimizeFast && setNoNoDelta(c, norm)) { in writeExtraData()
221 norm.offset=writeNoNoMapping( in writeExtraData()
222 c, norm, noNoMappingsCompBoundaryBefore, previousNoNoMappingsCompBoundaryBefore); in writeExtraData()
225 norm.offset=writeNoNoMapping( in writeExtraData()
226 c, norm, noNoMappingsCompNoMaybeCC, previousNoNoMappingsCompNoMaybeCC); in writeExtraData()
231 norm.offset=writeNoNoMapping(c, norm, noNoMappingsEmpty, previousNoNoMappingsEmpty); in writeExtraData()
234 norm.offset=maybeYesCompositions.length(); in writeExtraData()
235 writeCompositions(c, norm, maybeYesCompositions); in writeExtraData()