comparison src/spell.c @ 11129:f4ea50924c6d v8.0.0452

patch 8.0.0452: some macros are in lower case commit https://github.com/vim/vim/commit/1c46544412382db8b3203d6c78e550df885540bd Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 12 20:10:05 2017 +0100 patch 8.0.0452: some macros are in lower case Problem: Some macros are in lower case. Solution: Make a few more macros upper case.
author Christian Brabandt <cb@256bit.org>
date Sun, 12 Mar 2017 20:15:06 +0100
parents 506f5d8b7d8b
children 121d29004998
comparison
equal deleted inserted replaced
11128:23154628ab7f 11129:f4ea50924c6d
4526 if (flags & WF_NOSUGGEST) 4526 if (flags & WF_NOSUGGEST)
4527 break; 4527 break;
4528 4528
4529 fword_ends = (fword[sp->ts_fidx] == NUL 4529 fword_ends = (fword[sp->ts_fidx] == NUL
4530 || (soundfold 4530 || (soundfold
4531 ? vim_iswhite(fword[sp->ts_fidx]) 4531 ? VIM_ISWHITE(fword[sp->ts_fidx])
4532 : !spell_iswordp(fword + sp->ts_fidx, curwin))); 4532 : !spell_iswordp(fword + sp->ts_fidx, curwin)));
4533 tword[sp->ts_twordlen] = NUL; 4533 tword[sp->ts_twordlen] = NUL;
4534 4534
4535 if (sp->ts_prefixdepth <= PFD_NOTSPECIAL 4535 if (sp->ts_prefixdepth <= PFD_NOTSPECIAL
4536 && (sp->ts_flags & TSF_PREFIXOK) == 0) 4536 && (sp->ts_flags & TSF_PREFIXOK) == 0)
6229 6229
6230 /* When joining two words the sound often changes a lot. E.g., "t he" 6230 /* When joining two words the sound often changes a lot. E.g., "t he"
6231 * sounds like "t h" while "the" sounds like "@". Avoid that by 6231 * sounds like "t h" while "the" sounds like "@". Avoid that by
6232 * removing the space. Don't do it when the good word also contains a 6232 * removing the space. Don't do it when the good word also contains a
6233 * space. */ 6233 * space. */
6234 if (vim_iswhite(su->su_badptr[su->su_badlen]) 6234 if (VIM_ISWHITE(su->su_badptr[su->su_badlen])
6235 && *skiptowhite(stp->st_word) == NUL) 6235 && *skiptowhite(stp->st_word) == NUL)
6236 for (p = fword; *(p = skiptowhite(p)) != NUL; ) 6236 for (p = fword; *(p = skiptowhite(p)) != NUL; )
6237 STRMOVE(p, p + 1); 6237 STRMOVE(p, p + 1);
6238 6238
6239 spell_soundfold(slang, fword, TRUE, badsound2); 6239 spell_soundfold(slang, fword, TRUE, badsound2);
7104 /* The sl_sal_first[] table contains the translation for chars up to 7104 /* The sl_sal_first[] table contains the translation for chars up to
7105 * 255, sl_sal the rest. */ 7105 * 255, sl_sal the rest. */
7106 for (s = inword; *s != NUL; ) 7106 for (s = inword; *s != NUL; )
7107 { 7107 {
7108 c = mb_cptr2char_adv(&s); 7108 c = mb_cptr2char_adv(&s);
7109 if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c)) 7109 if (enc_utf8 ? utf_class(c) == 0 : VIM_ISWHITE(c))
7110 c = ' '; 7110 c = ' ';
7111 else if (c < 256) 7111 else if (c < 256)
7112 c = slang->sl_sal_first[c]; 7112 c = slang->sl_sal_first[c];
7113 else 7113 else
7114 { 7114 {
7145 #endif 7145 #endif
7146 { 7146 {
7147 /* The sl_sal_first[] table contains the translation. */ 7147 /* The sl_sal_first[] table contains the translation. */
7148 for (s = inword; (c = *s) != NUL; ++s) 7148 for (s = inword; (c = *s) != NUL; ++s)
7149 { 7149 {
7150 if (vim_iswhite(c)) 7150 if (VIM_ISWHITE(c))
7151 c = ' '; 7151 c = ' ';
7152 else 7152 else
7153 c = slang->sl_sal_first[c]; 7153 c = slang->sl_sal_first[c];
7154 if (c != NUL && (ri == 0 || res[ri - 1] != c)) 7154 if (c != NUL && (ri == 0 || res[ri - 1] != c))
7155 res[ri++] = c; 7155 res[ri++] = c;
7183 if (slang->sl_rem_accents) 7183 if (slang->sl_rem_accents)
7184 { 7184 {
7185 t = word; 7185 t = word;
7186 while (*s != NUL) 7186 while (*s != NUL)
7187 { 7187 {
7188 if (vim_iswhite(*s)) 7188 if (VIM_ISWHITE(*s))
7189 { 7189 {
7190 *t++ = ' '; 7190 *t++ = ' ';
7191 s = skipwhite(s); 7191 s = skipwhite(s);
7192 } 7192 }
7193 else 7193 else
7407 } 7407 }
7408 break; 7408 break;
7409 } 7409 }
7410 } 7410 }
7411 } 7411 }
7412 else if (vim_iswhite(c)) 7412 else if (VIM_ISWHITE(c))
7413 { 7413 {
7414 c = ' '; 7414 c = ' ';
7415 k = 1; 7415 k = 1;
7416 } 7416 }
7417 7417
7472 { 7472 {
7473 t = s; 7473 t = s;
7474 c = mb_cptr2char_adv(&s); 7474 c = mb_cptr2char_adv(&s);
7475 if (slang->sl_rem_accents) 7475 if (slang->sl_rem_accents)
7476 { 7476 {
7477 if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c)) 7477 if (enc_utf8 ? utf_class(c) == 0 : VIM_ISWHITE(c))
7478 { 7478 {
7479 if (did_white) 7479 if (did_white)
7480 continue; 7480 continue;
7481 c = ' '; 7481 c = ' ';
7482 did_white = TRUE; 7482 did_white = TRUE;
7713 } 7713 }
7714 break; 7714 break;
7715 } 7715 }
7716 } 7716 }
7717 } 7717 }
7718 else if (vim_iswhite(c)) 7718 else if (VIM_ISWHITE(c))
7719 { 7719 {
7720 c = ' '; 7720 c = ' ';
7721 k = 1; 7721 k = 1;
7722 } 7722 }
7723 7723