Merge pull request #1130

This commit is contained in:
Valdis Vitolins
2022-03-23 19:37:15 +02:00
+10 -1
View File
@@ -1817,6 +1817,7 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
failed = 1;
break;
case RULE_DOLLAR:
post_ptr--;
command = *rule++;
if (command == DOLLAR_UNPR)
match.end_type = SUFX_UNPRON; // $unpron
@@ -1913,9 +1914,11 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
}
break;
case RULE_INC_SCORE:
post_ptr--;
add_points = 20; // force an increase in points
break;
case RULE_DEC_SCORE:
post_ptr--;
add_points = -20; // force an decrease in points
break;
case RULE_DEL_FWD:
@@ -1944,8 +1947,10 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
case RULE_NO_SUFFIX:
if (word_flags & FLAG_SUFFIX_REMOVED)
failed = 1; // a suffix has been removed
else
else {
post_ptr--;
add_points = 1;
}
break;
default:
if (letter == rb) {
@@ -2026,6 +2031,7 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
failed = 1;
break;
case RULE_DOLLAR:
pre_ptr++;
command = *rule++;
if ((command == DOLLAR_LIST) || ((command & 0xf0) == 0x20)) {
// $list or $p_alt
@@ -2057,6 +2063,7 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
failed = 1;
break;
case RULE_STRESSED:
pre_ptr++;
if (tr->word_stressed_count > 0)
add_points = 19;
else
@@ -2077,12 +2084,14 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
}
break;
case RULE_IFVERB:
pre_ptr++;
if (tr->expect_verb)
add_points = 1;
else
failed = 1;
break;
case RULE_CAPITAL:
pre_ptr++;
if (word_flags & FLAG_FIRST_UPPER)
add_points = 1;
else