From 07c8ad3f7beb5686ce900aee03bbfe2e3b83c091 Mon Sep 17 00:00:00 2001 From: Juho Hiltunen Date: Sat, 26 Dec 2020 20:07:40 +0200 Subject: [PATCH] jbo: remove unnecessary lojban related code in ReadClause() It is enough to have the logic in dictsource/jbo_*. Thanks to xunsku @ irc.freenode.org --- src/libespeak-ng/readclause.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/libespeak-ng/readclause.c b/src/libespeak-ng/readclause.c index b45f4ff2..bfba8e30 100644 --- a/src/libespeak-ng/readclause.c +++ b/src/libespeak-ng/readclause.c @@ -59,7 +59,6 @@ char *namedata = NULL; static int ungot_char2 = 0; espeak_ng_TEXT_DECODER *p_decoder = NULL; static int ungot_char; -static const char *ungot_word = NULL; static bool ignore_text = false; // set during ... to ignore text which has been replaced by an alias static bool audio_text = false; // set during @@ -656,12 +655,6 @@ int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_ *tone_type = 0; *voice_change = 0; - if (ungot_word != NULL) { - strcpy(buf, ungot_word); - ix += strlen(ungot_word); - ungot_word = NULL; - } - if (ungot_char2 != 0) c2 = ungot_char2; else @@ -844,26 +837,6 @@ int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_ if (c1 == 0xf0b) c1 = ' '; // Tibet inter-syllabic mark, ?? replace by space ?? - if (iswspace(c1)) { - char *p_word; - - if (tr->translator_name == 0x6a626f) { - // language jbo : lojban - // treat "i" or ".i" as end-of-sentence - p_word = &buf[ix-1]; - if (p_word[0] == 'i') { - if (p_word[-1] == '.') - p_word--; - if (p_word[-1] == ' ') { - ungot_word = "i "; - UngetC(c2); - p_word[0] = 0; - return CLAUSE_PERIOD; - } - } - } - } - if (c1 == 0xd4d) { // Malayalam virama, check if next character is Zero-width-joiner if (c2 == 0x200d)