code cleanup: remove unnecessary code related to LOPT_CAPS_IN_WORD

translate.h gives two settings to LOPT_CAPS_IN_WORD, but only one of them is actually ever used.
This commit is contained in:
Juho Hiltunen
2020-12-28 11:30:08 +02:00
parent 23172c4f74
commit aafa55cbbc
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -1063,7 +1063,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.stress_rule = STRESSPOSN_2R;
tr->langopts.vowel_pause = 0x20c; // pause before a word which starts with a vowel, or after a word which ends in a consonant
tr->punct_within_word = jbo_punct_within_word;
tr->langopts.param[LOPT_CAPS_IN_WORD] = 2; // capitals indicate stressed syllables
tr->langopts.param[LOPT_CAPS_IN_WORD] = 1; // capitals indicate stressed syllables
SetLetterVowel(tr, 'y');
tr->langopts.max_lengthmod = 368;
}
+2 -2
View File
@@ -2323,8 +2323,8 @@ void TranslateClause(Translator *tr, int *tone_out, char **voice_change)
if (iswupper(c)) {
c = towlower2(c, tr);
if ((j = tr->langopts.param[LOPT_CAPS_IN_WORD]) > 0) {
if ((j == 2) && (syllable_marked == false)) {
if (tr->langopts.param[LOPT_CAPS_IN_WORD]) {
if (syllable_marked == false) {
char_inserted = c;
c = 0x2c8; // stress marker
syllable_marked = true;
+1 -2
View File
@@ -331,8 +331,7 @@ typedef struct {
// change [t] when followed by unstressed vowel
#define LOPT_REDUCE_T 12
// 1 = allow capitals inside a word
// 2 = stressed syllable is indicated by capitals
// 1 = stressed syllable is indicated by capitals
#define LOPT_CAPS_IN_WORD 13
// bit 0=Italian "syntactic doubling" of consoants in the word after a word marked with $double attribute