Mercurial > vim
comparison src/spell.c @ 1705:5b43a3a9454a v7.2.003
updated for version 7.2-003
author | vimboss |
---|---|
date | Mon, 25 Aug 2008 02:14:05 +0000 |
parents | b9740fb41986 |
children | 5098908178cd |
comparison
equal
deleted
inserted
replaced
1704:421a77b136c2 | 1705:5b43a3a9454a |
---|---|
75 */ | 75 */ |
76 #define RESCORE(word_score, sound_score) ((3 * word_score + sound_score) / 4) | 76 #define RESCORE(word_score, sound_score) ((3 * word_score + sound_score) / 4) |
77 | 77 |
78 /* | 78 /* |
79 * Do the opposite: based on a maximum end score and a known sound score, | 79 * Do the opposite: based on a maximum end score and a known sound score, |
80 * compute the the maximum word score that can be used. | 80 * compute the maximum word score that can be used. |
81 */ | 81 */ |
82 #define MAXSCORE(word_score, sound_score) ((4 * word_score - sound_score) / 3) | 82 #define MAXSCORE(word_score, sound_score) ((4 * word_score - sound_score) / 3) |
83 | 83 |
84 /* | 84 /* |
85 * Vim spell file format: <HEADER> | 85 * Vim spell file format: <HEADER> |
623 #define SUG(ga, i) (((suggest_T *)(ga).ga_data)[i]) | 623 #define SUG(ga, i) (((suggest_T *)(ga).ga_data)[i]) |
624 | 624 |
625 /* TRUE if a word appears in the list of banned words. */ | 625 /* TRUE if a word appears in the list of banned words. */ |
626 #define WAS_BANNED(su, word) (!HASHITEM_EMPTY(hash_find(&su->su_banned, word))) | 626 #define WAS_BANNED(su, word) (!HASHITEM_EMPTY(hash_find(&su->su_banned, word))) |
627 | 627 |
628 /* Number of suggestions kept when cleaning up. we need to keep more than | 628 /* Number of suggestions kept when cleaning up. We need to keep more than |
629 * what is displayed, because when rescore_suggestions() is called the score | 629 * what is displayed, because when rescore_suggestions() is called the score |
630 * may change and wrong suggestions may be removed later. */ | 630 * may change and wrong suggestions may be removed later. */ |
631 #define SUG_CLEAN_COUNT(su) ((su)->su_maxcount < 130 ? 150 : (su)->su_maxcount + 20) | 631 #define SUG_CLEAN_COUNT(su) ((su)->su_maxcount < 130 ? 150 : (su)->su_maxcount + 20) |
632 | 632 |
633 /* Threshold for sorting and cleaning up suggestions. Don't want to keep lots | 633 /* Threshold for sorting and cleaning up suggestions. Don't want to keep lots |
5978 if (spin->si_newcompID == 127 || spin->si_newcompID == 255) | 5978 if (spin->si_newcompID == 127 || spin->si_newcompID == 255) |
5979 MSG(_("Too many postponed prefixes")); | 5979 MSG(_("Too many postponed prefixes")); |
5980 else if (spin->si_newprefID == 0 || spin->si_newprefID == 127) | 5980 else if (spin->si_newprefID == 0 || spin->si_newprefID == 127) |
5981 MSG(_("Too many compound flags")); | 5981 MSG(_("Too many compound flags")); |
5982 else | 5982 else |
5983 MSG(_("Too many posponed prefixes and/or compound flags")); | 5983 MSG(_("Too many postponed prefixes and/or compound flags")); |
5984 } | 5984 } |
5985 | 5985 |
5986 if (syllable != NULL) | 5986 if (syllable != NULL) |
5987 { | 5987 { |
5988 aff_check_string(spin->si_syllable, syllable, "SYLLABLE"); | 5988 aff_check_string(spin->si_syllable, syllable, "SYLLABLE"); |