le_bool noteMatra(const IndicClassTable *classTable, LEUnicode matra, le_uint32 matraIndex, FeatureMask matraFeatures, le_bool wordStart) { IndicClassTable::CharClass matraClass = classTable->getCharClass(matra); fMatraFeatures = matraFeatures; if (wordStart) { fMatraFeatures |= initFeatureMask; } if (IndicClassTable::isMatra(matraClass)) { if (IndicClassTable::isSplitMatra(matraClass)) { const SplitMatra *splitMatra = classTable->getSplitMatra(matraClass); int i; for (i = 0; i < 3 && (*splitMatra)[i] != 0; i += 1) { LEUnicode piece = (*splitMatra)[i]; IndicClassTable::CharClass pieceClass = classTable->getCharClass(piece); saveMatra(piece, matraIndex, pieceClass); } } else { saveMatra(matra, matraIndex, matraClass); } return TRUE; } return FALSE; }
static gboolean noteMatra(Output *output, const IndicOTClassTable *classTable, gunichar matra) { IndicOTCharClass matraClass = indic_ot_get_char_class(classTable, matra); if (IS_MATRA(matraClass)) { if (IS_SPLIT_MATRA(matraClass)) { const IndicOTSplitMatra *splitMatra = indic_ot_get_split_matra(classTable, matraClass); int i; for (i = 0; i < 3 && (*splitMatra)[i] != 0; i += 1) { gunichar piece = (*splitMatra)[i]; IndicOTCharClass pieceClass = indic_ot_get_char_class(classTable, piece); saveMatra(output, piece, pieceClass); } } else { saveMatra(output, matra, matraClass); } return TRUE; } else return FALSE; }