/* -> starting from the end of the syllable, move backwards */
i = end;
+ unsigned int limit = start + (info[start].indic_category() == OT_Ra ? 2 : 0);
do {
i--;
/* -> until a consonant is found */
break;
}
- /* TODO: or that is not a pre-base reordering Ra, */
-
- /* -> or arrive at the first consonant. The consonant stopped at will be the base. */
+ /* -> or that is not a pre-base reordering Ra,
+ *
+ * o If the syllable starts with Ra + Halant (in a script that has Reph)
+ * and has more than one consonant, Ra is excluded from candidates for
+ * base consonants.
+ *
+ * IMPLEMENTATION NOTES:
+ *
+ * We do this by adjusting limit accordingly before entering the loop.
+ */
+
+ /* -> or arrive at the first consonant. The consonant stopped at will
+ * be the base. */
base = i;
}
- } while (i > start);
+ } while (i > limit);
if (base < start)
base = start; /* Just in case... */
- /* TODO
- * If the syllable starts with Ra + Halant (in a script that has Reph)
- * and has more than one consonant, Ra is excluded from candidates for
- * base consonants. */
-
/* 2. Decompose and reorder Matras:
*