mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-04 15:49:48 +00:00
Add more const qualifiers
This commit is contained in:
@@ -768,7 +768,7 @@ static int isHexDigit(int c)
|
|||||||
static void copy_rule_string(char *string, int *state_out)
|
static void copy_rule_string(char *string, int *state_out)
|
||||||
{
|
{
|
||||||
// state 0: conditional, 1=pre, 2=match, 3=post, 4=phonemes
|
// state 0: conditional, 1=pre, 2=match, 3=post, 4=phonemes
|
||||||
static char *const outbuf[5] = { rule_cond, rule_pre, rule_match, rule_post, rule_phonemes };
|
static char * const outbuf[5] = { rule_cond, rule_pre, rule_match, rule_post, rule_phonemes };
|
||||||
static const int next_state[5] = { 2, 2, 4, 4, 4 };
|
static const int next_state[5] = { 2, 2, 4, 4, 4 };
|
||||||
char *output;
|
char *output;
|
||||||
char *p;
|
char *p;
|
||||||
|
|||||||
@@ -3056,11 +3056,11 @@ int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy)
|
|||||||
char ending[50] = {0};
|
char ending[50] = {0};
|
||||||
|
|
||||||
// these lists are language specific, but are only relevant if the 'e' suffix flag is used
|
// these lists are language specific, but are only relevant if the 'e' suffix flag is used
|
||||||
static const char *add_e_exceptions[] = {
|
static const char * const add_e_exceptions[] = {
|
||||||
"ion", NULL
|
"ion", NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *add_e_additions[] = {
|
static const char * const add_e_additions[] = {
|
||||||
"c", "rs", "ir", "ur", "ath", "ns", "u",
|
"c", "rs", "ir", "ur", "ath", "ns", "u",
|
||||||
"spong", // sponge
|
"spong", // sponge
|
||||||
"rang", // strange
|
"rang", // strange
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ static void SetProsodyParameter(int param_type, const wchar_t *attr1, PARAM_STAC
|
|||||||
{ NULL, -1 }
|
{ NULL, -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const MNEM_TAB *mnem_tabs[5] = {
|
static const MNEM_TAB * const mnem_tabs[5] = {
|
||||||
NULL, mnem_rate, mnem_volume, mnem_pitch, mnem_range
|
NULL, mnem_rate, mnem_volume, mnem_pitch, mnem_range
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -648,7 +648,7 @@ int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int *outix, int n_outbuf, con
|
|||||||
{ NULL, -1 }
|
{ NULL, -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *prosody_attr[5] = {
|
static const char * const prosody_attr[5] = {
|
||||||
NULL, "rate", "volume", "pitch", "range"
|
NULL, "rate", "volume", "pitch", "range"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ int utf8_out(unsigned int c, char *buf)
|
|||||||
int n_bytes;
|
int n_bytes;
|
||||||
int j;
|
int j;
|
||||||
int shift;
|
int shift;
|
||||||
static char unsigned code[4] = { 0, 0xc0, 0xe0, 0xf0 };
|
static const char unsigned code[4] = { 0, 0xc0, 0xe0, 0xf0 };
|
||||||
|
|
||||||
if (c < 0x80) {
|
if (c < 0x80) {
|
||||||
buf[0] = c;
|
buf[0] = c;
|
||||||
|
|||||||
Reference in New Issue
Block a user