Browse Source

Add more const qualifiers

master
Samuel Thibault 3 years ago
parent
commit
f4133364d1

+ 1
- 1
src/libespeak-ng/compiledict.c View File

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;

+ 2
- 2
src/libespeak-ng/dictionary.c View File

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

+ 2
- 2
src/libespeak-ng/ssml.c View File

{ 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
}; };


{ 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"
}; };



+ 1
- 1
src/libespeak-ng/translate.c View File

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;

Loading…
Cancel
Save