iast-czech: remove ending '-m' suffix

This commit is contained in:
Vlasta Vesely 2018-04-30 18:51:50 +02:00
parent e325a8d102
commit 470e6d8d2f

View file

@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "iast-czech.h"
#include "transliteration.h"
@ -133,8 +134,25 @@ static void nasal_consonants_filter(struct syllable *chain)
}
}
static void end_of_word_filter(struct syllable *chain)
{
struct syllable *syllable = chain;
while (syllable) {
if (syllable->next == NULL || isspace(syllable->next->data[0])) {
if (!strcmp(syllable->data, "m")) {
free(syllable->data);
syllable->data = strdup("");
}
}
syllable = syllable->next;
}
}
static const transliteration_filter_t filters[] = {
nasal_consonants_filter,
end_of_word_filter,
NULL
};