mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 05:46:19 +00:00
Merge branch 'master' into android
Conflicts: platforms/windows/make_espeakedit.iss
This commit is contained in:
+7
-6
@@ -378,6 +378,7 @@ void SetLengthMods(Translator *tr, int value)
|
||||
}
|
||||
|
||||
|
||||
|
||||
int IsAlpha(unsigned int c)
|
||||
{//========================
|
||||
// Replacement for iswalph() which also checks for some in-word symbols
|
||||
@@ -433,8 +434,8 @@ int IsAlpha(unsigned int c)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int IsDigit09(unsigned int c)
|
||||
{//=========================
|
||||
int IsDigit09(unsigned int c)
|
||||
{//============================
|
||||
if((c >= '0') && (c <= '9'))
|
||||
return(1);
|
||||
return(0);
|
||||
@@ -971,7 +972,7 @@ int TranslateWord(Translator *tr, char *word_start, int next_pause, WORD_TAB *wt
|
||||
}
|
||||
}
|
||||
}
|
||||
else if((found==0) && (dictionary_flags[0] & FLAG_SKIPWORDS))
|
||||
else if((found==0) && (dictionary_flags[0] & FLAG_SKIPWORDS) && !(dictionary_flags[0] & FLAG_ABBREV))
|
||||
{
|
||||
// grouped words, but no translation. Join the words with hyphens.
|
||||
wordx = word1;
|
||||
@@ -2315,10 +2316,10 @@ static int EmbeddedCommand(unsigned int &source_index)
|
||||
source_index++;
|
||||
}
|
||||
|
||||
if(isdigit(source[source_index]))
|
||||
if(IsDigit09(source[source_index]))
|
||||
{
|
||||
value = atoi(&source[source_index]);
|
||||
while(isdigit(source[source_index]))
|
||||
while(IsDigit09(source[source_index]))
|
||||
source_index++;
|
||||
}
|
||||
|
||||
@@ -3335,7 +3336,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
|
||||
|
||||
while(pn < &number_buf[sizeof(number_buf)-20])
|
||||
{
|
||||
if(!isdigit(c = *pw++) && (c != tr->langopts.decimal_sep))
|
||||
if(!IsDigit09(c = *pw++) && (c != tr->langopts.decimal_sep))
|
||||
break;
|
||||
|
||||
*pn++ = c;
|
||||
|
||||
Reference in New Issue
Block a user