Mercurial > vim
comparison src/ops.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 | 8d9ecf09183a |
comparison
equal
deleted
inserted
replaced
11128:23154628ab7f | 11129:f4ea50924c6d |
---|---|
427 } | 427 } |
428 else | 428 else |
429 #endif | 429 #endif |
430 ++bd.textstart; | 430 ++bd.textstart; |
431 } | 431 } |
432 for ( ; vim_iswhite(*bd.textstart); ) | 432 for ( ; VIM_ISWHITE(*bd.textstart); ) |
433 { | 433 { |
434 /* TODO: is passing bd.textstart for start of the line OK? */ | 434 /* TODO: is passing bd.textstart for start of the line OK? */ |
435 incr = lbr_chartabsize_adv(bd.textstart, &bd.textstart, | 435 incr = lbr_chartabsize_adv(bd.textstart, &bd.textstart, |
436 (colnr_T)(bd.start_vcol)); | 436 (colnr_T)(bd.start_vcol)); |
437 total += incr; | 437 total += incr; |
489 MB_PTR_ADV(non_white); | 489 MB_PTR_ADV(non_white); |
490 | 490 |
491 /* The character's column is in "bd.start_vcol". */ | 491 /* The character's column is in "bd.start_vcol". */ |
492 non_white_col = bd.start_vcol; | 492 non_white_col = bd.start_vcol; |
493 | 493 |
494 while (vim_iswhite(*non_white)) | 494 while (VIM_ISWHITE(*non_white)) |
495 { | 495 { |
496 incr = lbr_chartabsize_adv(bd.textstart, &non_white, non_white_col); | 496 incr = lbr_chartabsize_adv(bd.textstart, &non_white, non_white_col); |
497 non_white_col += incr; | 497 non_white_col += incr; |
498 } | 498 } |
499 | 499 |
4653 * The first line has to be saved, only one line can be locked at a time. | 4653 * The first line has to be saved, only one line can be locked at a time. |
4654 */ | 4654 */ |
4655 line1 = vim_strsave(ml_get(lnum)); | 4655 line1 = vim_strsave(ml_get(lnum)); |
4656 if (line1 != NULL) | 4656 if (line1 != NULL) |
4657 { | 4657 { |
4658 for (idx1 = 0; vim_iswhite(line1[idx1]); ++idx1) | 4658 for (idx1 = 0; VIM_ISWHITE(line1[idx1]); ++idx1) |
4659 ; | 4659 ; |
4660 line2 = ml_get(lnum + 1); | 4660 line2 = ml_get(lnum + 1); |
4661 for (idx2 = 0; idx2 < leader2_len; ++idx2) | 4661 for (idx2 = 0; idx2 < leader2_len; ++idx2) |
4662 { | 4662 { |
4663 if (!vim_iswhite(line2[idx2])) | 4663 if (!VIM_ISWHITE(line2[idx2])) |
4664 { | 4664 { |
4665 if (line1[idx1++] != line2[idx2]) | 4665 if (line1[idx1++] != line2[idx2]) |
4666 break; | 4666 break; |
4667 } | 4667 } |
4668 else | 4668 else |
4669 while (vim_iswhite(line1[idx1])) | 4669 while (VIM_ISWHITE(line1[idx1])) |
4670 ++idx1; | 4670 ++idx1; |
4671 } | 4671 } |
4672 vim_free(line1); | 4672 vim_free(line1); |
4673 } | 4673 } |
4674 return (idx2 == leader2_len && idx1 == leader1_len); | 4674 return (idx2 == leader2_len && idx1 == leader1_len); |
5090 char_u *s = ml_get(lnum); | 5090 char_u *s = ml_get(lnum); |
5091 size_t l; | 5091 size_t l; |
5092 | 5092 |
5093 if (*s == NUL) | 5093 if (*s == NUL) |
5094 return FALSE; | 5094 return FALSE; |
5095 /* Don't use STRLEN() inside vim_iswhite(), SAS/C complains: "macro | 5095 /* Don't use STRLEN() inside VIM_ISWHITE(), SAS/C complains: "macro |
5096 * invocation may call function multiple times". */ | 5096 * invocation may call function multiple times". */ |
5097 l = STRLEN(s) - 1; | 5097 l = STRLEN(s) - 1; |
5098 return vim_iswhite(s[l]); | 5098 return VIM_ISWHITE(s[l]); |
5099 } | 5099 } |
5100 | 5100 |
5101 /* | 5101 /* |
5102 * Blank lines, and lines containing only the comment leader, are left | 5102 * Blank lines, and lines containing only the comment leader, are left |
5103 * untouched by the formatting. The function returns TRUE in this | 5103 * untouched by the formatting. The function returns TRUE in this |
5248 { | 5248 { |
5249 /* Count a tab for what it's worth (if list mode not on) */ | 5249 /* Count a tab for what it's worth (if list mode not on) */ |
5250 incr = lbr_chartabsize(line, pstart, (colnr_T)bdp->start_vcol); | 5250 incr = lbr_chartabsize(line, pstart, (colnr_T)bdp->start_vcol); |
5251 bdp->start_vcol += incr; | 5251 bdp->start_vcol += incr; |
5252 #ifdef FEAT_VISUALEXTRA | 5252 #ifdef FEAT_VISUALEXTRA |
5253 if (vim_iswhite(*pstart)) | 5253 if (VIM_ISWHITE(*pstart)) |
5254 { | 5254 { |
5255 bdp->pre_whitesp += incr; | 5255 bdp->pre_whitesp += incr; |
5256 bdp->pre_whitesp_c++; | 5256 bdp->pre_whitesp_c++; |
5257 } | 5257 } |
5258 else | 5258 else |