comparison src/charset.c @ 11127:506f5d8b7d8b v8.0.0451

patch 8.0.0451: some macros are in lower case commit https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 12 19:22:36 2017 +0100 patch 8.0.0451: some macros are in lower case Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice.
author Christian Brabandt <cb@256bit.org>
date Sun, 12 Mar 2017 19:30:05 +0100
parents 778c10516955
children f4ea50924c6d
comparison
equal deleted inserted replaced
11126:48599a3eae0b 11127:506f5d8b7d8b
868 { 868 {
869 colnr_T col = 0; 869 colnr_T col = 0;
870 char_u *s; 870 char_u *s;
871 871
872 for (s = line; *s != NUL && (len == MAXCOL || s < line + len); 872 for (s = line; *s != NUL && (len == MAXCOL || s < line + len);
873 mb_ptr_adv(s)) 873 MB_PTR_ADV(s))
874 col += win_lbr_chartabsize(wp, line, s, col, NULL); 874 col += win_lbr_chartabsize(wp, line, s, col, NULL);
875 return (int)col; 875 return (int)col;
876 } 876 }
877 877
878 /* 878 /*
1024 colnr_T col) 1024 colnr_T col)
1025 { 1025 {
1026 int retval; 1026 int retval;
1027 1027
1028 retval = lbr_chartabsize(line, *s, col); 1028 retval = lbr_chartabsize(line, *s, col);
1029 mb_ptr_adv(*s); 1029 MB_PTR_ADV(*s);
1030 return retval; 1030 return retval;
1031 } 1031 }
1032 1032
1033 /* 1033 /*
1034 * This function is used very often, keep it fast!!!! 1034 * This function is used very often, keep it fast!!!!
1087 /* 1087 /*
1088 * If 'linebreak' set check at a blank before a non-blank if the line 1088 * If 'linebreak' set check at a blank before a non-blank if the line
1089 * needs a break here 1089 * needs a break here
1090 */ 1090 */
1091 if (wp->w_p_lbr 1091 if (wp->w_p_lbr
1092 && vim_isbreak(c) 1092 && VIM_ISBREAK(c)
1093 && !vim_isbreak(s[1]) 1093 && !VIM_ISBREAK(s[1])
1094 && wp->w_p_wrap 1094 && wp->w_p_wrap
1095 # ifdef FEAT_WINDOWS 1095 # ifdef FEAT_WINDOWS
1096 && wp->w_width != 0 1096 && wp->w_width != 0
1097 # endif 1097 # endif
1098 ) 1098 )
1113 } 1113 }
1114 1114
1115 for (;;) 1115 for (;;)
1116 { 1116 {
1117 ps = s; 1117 ps = s;
1118 mb_ptr_adv(s); 1118 MB_PTR_ADV(s);
1119 c = *s; 1119 c = *s;
1120 if (!(c != NUL 1120 if (!(c != NUL
1121 && (vim_isbreak(c) 1121 && (VIM_ISBREAK(c)
1122 || (!vim_isbreak(c) 1122 || (!VIM_ISBREAK(c)
1123 && (col2 == col || !vim_isbreak(*ps)))))) 1123 && (col2 == col || !VIM_ISBREAK(*ps))))))
1124 break; 1124 break;
1125 1125
1126 col2 += win_chartabsize(wp, s, col2); 1126 col2 += win_chartabsize(wp, s, col2);
1127 if (col2 >= colmax) /* doesn't fit */ 1127 if (col2 >= colmax) /* doesn't fit */
1128 { 1128 {
1367 1367
1368 if (posptr != NULL && ptr >= posptr) /* character at pos->col */ 1368 if (posptr != NULL && ptr >= posptr) /* character at pos->col */
1369 break; 1369 break;
1370 1370
1371 vcol += incr; 1371 vcol += incr;
1372 mb_ptr_adv(ptr); 1372 MB_PTR_ADV(ptr);
1373 } 1373 }
1374 } 1374 }
1375 else 1375 else
1376 { 1376 {
1377 for (;;) 1377 for (;;)
1388 1388
1389 if (posptr != NULL && ptr >= posptr) /* character at pos->col */ 1389 if (posptr != NULL && ptr >= posptr) /* character at pos->col */
1390 break; 1390 break;
1391 1391
1392 vcol += incr; 1392 vcol += incr;
1393 mb_ptr_adv(ptr); 1393 MB_PTR_ADV(ptr);
1394 } 1394 }
1395 } 1395 }
1396 if (start != NULL) 1396 if (start != NULL)
1397 *start = vcol + head; 1397 *start = vcol + head;
1398 if (end != NULL) 1398 if (end != NULL)