Browse Source

code cleanup: remove ununsed ctrl_embedded

It's a duplicate of CTRL_EMBEDDED.
master
Juho Hiltunen 5 years ago
parent
commit
0352616de9
3 changed files with 4 additions and 6 deletions
  1. 3
    3
      src/libespeak-ng/readclause.c
  2. 1
    2
      src/libespeak-ng/translate.c
  3. 0
    1
      src/libespeak-ng/translate.h

+ 3
- 3
src/libespeak-ng/readclause.c View File

return terminator; return terminator;
} }


if ((c1 == CTRL_EMBEDDED) || (c1 == ctrl_embedded)) { if (c1 == CTRL_EMBEDDED) {
// an embedded command. If it's a voice change, end the clause // an embedded command. If it's a voice change, end the clause
if (c2 == 'V') { if (c2 == 'V') {
buf[ix++] = 0; // end the clause at this point buf[ix++] = 0; // end the clause at this point
while (!iswspace(c1 = GetC()) && !Eof() && (ix < (n_buf-1))) while (!iswspace(c1 = GetC()) && !Eof() && (ix < (n_buf-1)))
continue; continue;
} }


if ((iswspace(c2) || (punct_data & CLAUSE_OPTIONAL_SPACE_AFTER) || IsBracket(c2) || (c2 == '?') || Eof() || (c2 == ctrl_embedded))) { // don't check for '-' because it prevents recognizing ':-)' if (iswspace(c2) || (punct_data & CLAUSE_OPTIONAL_SPACE_AFTER) || IsBracket(c2) || (c2 == '?') || Eof() || c2 == CTRL_EMBEDDED) { // don't check for '-' because it prevents recognizing ':-)'
// note: (c2='?') is for when a smart-quote has been replaced by '?' // note: (c2='?') is for when a smart-quote has been replaced by '?'
is_end_clause = true; is_end_clause = true;
} }

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

PHONEME_LIST2 ph_list2[N_PHONEME_LIST]; // first stage of text->phonemes PHONEME_LIST2 ph_list2[N_PHONEME_LIST]; // first stage of text->phonemes


wchar_t option_punctlist[N_PUNCTLIST] = { 0 }; wchar_t option_punctlist[N_PUNCTLIST] = { 0 };
char ctrl_embedded = '\001'; // to allow an alternative CTRL for embedded commands


// these are overridden by defaults set in the "speak" file // these are overridden by defaults set in the "speak" file
int option_linelength = 0; int option_linelength = 0;
c = ' '; c = ' ';
} }


if ((c == CTRL_EMBEDDED) || (c == ctrl_embedded)) { if (c == CTRL_EMBEDDED) {
// start of embedded command in the text // start of embedded command in the text
int srcix = source_index-1; int srcix = source_index-1;



+ 0
- 1
src/libespeak-ng/translate.h View File

extern Translator *translator; extern Translator *translator;
extern Translator *translator2; extern Translator *translator2;
extern char dictionary_name[40]; extern char dictionary_name[40];
extern char ctrl_embedded; // to allow an alternative CTRL for embedded commands
extern espeak_ng_TEXT_DECODER *p_decoder; extern espeak_ng_TEXT_DECODER *p_decoder;
extern int dictionary_skipwords; extern int dictionary_skipwords;



Loading…
Cancel
Save