Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0352616d authored by Juho Hiltunen's avatar Juho Hiltunen
Browse files

code cleanup: remove ununsed ctrl_embedded

It's a duplicate of CTRL_EMBEDDED.
parent 725bdda5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -821,7 +821,7 @@ int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_
			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
			if (c2 == 'V') {
				buf[ix++] = 0; // end the clause at this point
@@ -1020,7 +1020,7 @@ int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_
					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 '?'
					is_end_clause = true;
				}
+1 −2
Original line number Diff line number Diff line
@@ -88,7 +88,6 @@ int n_ph_list2;
PHONEME_LIST2 ph_list2[N_PHONEME_LIST]; // first stage of text->phonemes

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
int option_linelength = 0;
@@ -2162,7 +2161,7 @@ void TranslateClause(Translator *tr, int *tone_out, char **voice_change)
			c = ' ';
		}

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

+0 −1
Original line number Diff line number Diff line
@@ -649,7 +649,6 @@ extern wchar_t option_punctlist[N_PUNCTLIST]; // which punctuation characters t
extern Translator *translator;
extern Translator *translator2;
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 int dictionary_skipwords;