mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-09 07:52:27 +00:00
Fix GCC -Wnarrowing warnings.
This commit is contained in:
@@ -184,7 +184,8 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = {
|
||||
0, 0
|
||||
};
|
||||
|
||||
const char string_ordinal[] = { 0xc2, 0xba, 0 }; // masculine ordinal character, UTF-8
|
||||
const unsigned char utf8_ordinal[] = { 0xc2, 0xba, 0 }; // masculine ordinal character, UTF-8
|
||||
const unsigned char utf8_null[] = { 0 }; // null string, UTF-8
|
||||
|
||||
static Translator *NewTranslator(void)
|
||||
{
|
||||
@@ -278,7 +279,7 @@ static Translator *NewTranslator(void)
|
||||
tr->langopts.replace_chars = NULL;
|
||||
tr->langopts.ascii_language[0] = 0; // Non-Latin alphabet languages, use this language to speak Latin words, default is English
|
||||
tr->langopts.alt_alphabet_lang = L('e', 'n');
|
||||
tr->langopts.roman_suffix = "";
|
||||
tr->langopts.roman_suffix = utf8_null;
|
||||
|
||||
SetLengthMods(tr, 201);
|
||||
|
||||
@@ -720,7 +721,7 @@ Translator *SelectTranslator(const char *name)
|
||||
tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2;
|
||||
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_ORDINAL;
|
||||
tr->langopts.numbers2 = NUM2_ORDINAL_NO_AND;
|
||||
tr->langopts.roman_suffix = string_ordinal;
|
||||
tr->langopts.roman_suffix = utf8_ordinal;
|
||||
} else if (name2 == L_pap) {
|
||||
// stress last syllable unless word ends with a vowel
|
||||
tr->langopts.stress_rule = STRESSPOSN_1R;
|
||||
|
||||
@@ -541,7 +541,7 @@ typedef struct {
|
||||
int decimal_sep;
|
||||
int max_digits; // max number of digits which can be spoken as an integer number (rather than individual digits)
|
||||
const char *ordinal_indicator; // UTF-8 string
|
||||
const char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an)
|
||||
const unsigned char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an)
|
||||
|
||||
// bit 0, accent name before the letter name, bit 1 "capital" after letter name
|
||||
int accents;
|
||||
|
||||
Reference in New Issue
Block a user