iast-czech: shorten 'á' on end of a word
This commit is contained in:
parent
ff2e16891b
commit
adf3bb9e24
1 changed files with 7 additions and 0 deletions
|
@ -137,6 +137,7 @@ static void nasal_consonants_filter(struct syllable *chain)
|
|||
static void end_of_word_filter(struct syllable *chain)
|
||||
{
|
||||
struct syllable *syllable = chain;
|
||||
unsigned int n;
|
||||
|
||||
while (syllable) {
|
||||
if (syllable->next == NULL || isspace(syllable->next->data[0])) {
|
||||
|
@ -144,6 +145,12 @@ static void end_of_word_filter(struct syllable *chain)
|
|||
free(syllable->data);
|
||||
syllable->data = strdup("");
|
||||
}
|
||||
|
||||
n = strlen(syllable->data);
|
||||
if (!strcmp(syllable->data + n - 2, "á")) {
|
||||
syllable->data[n - 2] = 'a';
|
||||
syllable->data[n - 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
syllable = syllable->next;
|
||||
|
|
Loading…
Add table
Reference in a new issue