From adf3bb9e245c01656b6d2ba7eddda1fb22afc116 Mon Sep 17 00:00:00 2001 From: Vlasta Vesely Date: Mon, 30 Apr 2018 19:22:35 +0200 Subject: [PATCH] =?UTF-8?q?iast-czech:=20shorten=20'=C3=A1'=20on=20end=20o?= =?UTF-8?q?f=20a=20word?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iast-czech.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iast-czech.c b/iast-czech.c index 853047f..e8d9766 100644 --- a/iast-czech.c +++ b/iast-czech.c @@ -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;