comparison src/charset.c @ 12477:68d7bc045dbe v8.0.1118

patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs commit https://github.com/vim/vim/commit/4033c55eca575777718c0701e26635a0cc47d907 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 16 20:54:51 2017 +0200 patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always enabled and only adds 7% to the binary size of the tiny build. Solution: Graduate FEAT_WINDOWS.
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Sep 2017 21:00:06 +0200
parents 4dba3e4f3b01
children 972ea22c946f
comparison
equal deleted inserted replaced
12476:2516383741e6 12477:68d7bc045dbe
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((int)s[1]) 1093 && !VIM_ISBREAK((int)s[1])
1094 && wp->w_p_wrap 1094 && wp->w_p_wrap
1095 # ifdef FEAT_WINDOWS 1095 && wp->w_width != 0)
1096 && wp->w_width != 0
1097 # endif
1098 )
1099 { 1096 {
1100 /* 1097 /*
1101 * Count all characters from first non-blank after a blank up to next 1098 * Count all characters from first non-blank after a blank up to next
1102 * non-blank after a blank. 1099 * non-blank after a blank.
1103 */ 1100 */
1247 in_win_border(win_T *wp, colnr_T vcol) 1244 in_win_border(win_T *wp, colnr_T vcol)
1248 { 1245 {
1249 int width1; /* width of first line (after line number) */ 1246 int width1; /* width of first line (after line number) */
1250 int width2; /* width of further lines */ 1247 int width2; /* width of further lines */
1251 1248
1252 # ifdef FEAT_WINDOWS
1253 if (wp->w_width == 0) /* there is no border */ 1249 if (wp->w_width == 0) /* there is no border */
1254 return FALSE; 1250 return FALSE;
1255 # endif
1256 width1 = W_WIDTH(wp) - win_col_off(wp); 1251 width1 = W_WIDTH(wp) - win_col_off(wp);
1257 if ((int)vcol < width1 - 1) 1252 if ((int)vcol < width1 - 1)
1258 return FALSE; 1253 return FALSE;
1259 if ((int)vcol == width1 - 1) 1254 if ((int)vcol == width1 - 1)
1260 return TRUE; 1255 return TRUE;
2027 if (c >= 'A' && c <= 'F') 2022 if (c >= 'A' && c <= 'F')
2028 return c - 'A' + 10; 2023 return c - 'A' + 10;
2029 return c - '0'; 2024 return c - '0';
2030 } 2025 }
2031 2026
2032 #if defined(FEAT_TERMRESPONSE) \ 2027 #if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) || defined(PROTO)
2033 || (defined(FEAT_GUI_GTK) && defined(FEAT_WINDOWS)) || defined(PROTO)
2034 /* 2028 /*
2035 * Convert two hex characters to a byte. 2029 * Convert two hex characters to a byte.
2036 * Return -1 if one of the characters is not hex. 2030 * Return -1 if one of the characters is not hex.
2037 */ 2031 */
2038 int 2032 int