Merge branch 'master' into android

This commit is contained in:
Reece H. Dunn
2013-07-27 11:16:46 +01:00
65 changed files with 5928 additions and 3744 deletions
+11 -6
View File
@@ -1739,7 +1739,8 @@ int SetTranslator2(const char *new_language)
translator2->phoneme_tab_ix = new_phoneme_tab;
}
}
translator2->phonemes_repeat[0] = 0;
if(translator2 != NULL)
translator2->phonemes_repeat[0] = 0;
return(new_phoneme_tab);
} // end of SetTranslator2
@@ -2562,6 +2563,7 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
int dict_flags = 0; // returned from dictionary lookup
int word_flags; // set here
int next_word_flags;
int new_sentence2;
int embedded_count = 0;
int letter_count = 0;
int space_inserted = 0;
@@ -2642,16 +2644,19 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
if(clause_pause < 0)
clause_pause = 0;
terminator &= ~CLAUSE_BIT_SENTENCE; // clear sentence bit
if(new_sentence)
terminator |= CLAUSE_BIT_SENTENCE; // carry forward an end-of-sentence indicator
max_clause_pause += clause_pause;
new_sentence2 = 0;
}
else
{
max_clause_pause = clause_pause;
new_sentence2 = new_sentence;
}
tr->clause_terminator = terminator;
if(new_sentence)
if(new_sentence2)
{
count_sentences++;
if(skip_sentences > 0)
@@ -3040,7 +3045,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
c = ' ';
pre_pause_add = 4;
}
else if((prev_out == ' ') && IsAlpha(sbuf[ix-2]) && !IsAlpha(prev_in))
else if((prev_out == ' ') && IsAlpha(prev_out2) && !IsAlpha(prev_in))
{
// insert extra space between a word + space + hyphen, to distinguish 'a -2' from 'a-2'
sbuf[ix++] = ' ';
@@ -3138,7 +3143,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
decimal_sep_count = 1;
}
}
else if((prev_out == ' ') && IsAlpha(sbuf[ix-2]) && !IsAlpha(prev_in))
else if((prev_out == ' ') && IsAlpha(prev_out2) && !IsAlpha(prev_in))
{
// insert extra space between a word and a number, to distinguish 'a 2' from 'a2'
sbuf[ix++] = ' ';
@@ -3462,7 +3467,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
clause_pause = 10;
}
MakePhonemeList(tr, clause_pause, new_sentence);
MakePhonemeList(tr, clause_pause, new_sentence2);
phoneme_list[N_PHONEME_LIST].ph = NULL; // recognize end of phoneme_list array, in Generate()
phoneme_list[N_PHONEME_LIST].sourceix = 1;