Browse Source

Implementation for feature #489

When .replace rule is used and -X switch is passed in runtime,
replaced characters should be shown in trace output.
master
Valdis Vitolins 7 years ago
parent
commit
bf3bb39fb0
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      src/libespeak-ng/translate.c

+ 13
- 0
src/libespeak-ng/translate.c View File

@@ -1845,6 +1845,19 @@ static int SubstituteChar(Translator *tr, unsigned int c, unsigned int next_in,
new_c = ucd_toupper(new_c);

*wordflags |= FLAG_CHAR_REPLACED;
if (option_phonemes & espeakPHONEMES_TRACE) {
char msg[21] = {'R','e','p','l','a','c','e',':',' '};
char *index = &msg;
index +=9;
index += utf8_out(c, index);
*index++ = ' ';
*index++ = '>';
*index++ = ' ';
index += utf8_out(new_c, index);
index += utf8_out(c2, index);
*index = 0;
fprintf(f_trans, "%s\n", msg);
}
return new_c;
}


Loading…
Cancel
Save