Mercurial > vim
comparison src/gui.c @ 17789:0f7ae8010787 v8.1.1891
patch 8.1.1891: functions used in one file are global
commit https://github.com/vim/vim/commit/5843f5f37b0632e2d706abc9014bfd7d98f7b02e
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 20 20:13:45 2019 +0200
patch 8.1.1891: functions used in one file are global
Problem: Functions used in one file are global.
Solution: Add "static". (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4840)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Aug 2019 20:15:07 +0200 |
parents | df340014f9e4 |
children | 59f8948b7590 |
comparison
equal
deleted
inserted
replaced
17788:2cf6b7b53b1d | 17789:0f7ae8010787 |
---|---|
15 | 15 |
16 #if !defined(FEAT_GUI_GTK) | 16 #if !defined(FEAT_GUI_GTK) |
17 static void set_guifontwide(char_u *font_name); | 17 static void set_guifontwide(char_u *font_name); |
18 #endif | 18 #endif |
19 static void gui_check_pos(void); | 19 static void gui_check_pos(void); |
20 static void gui_reset_scroll_region(void); | |
20 static void gui_outstr(char_u *, int); | 21 static void gui_outstr(char_u *, int); |
21 static int gui_screenchar(int off, int flags, guicolor_T fg, guicolor_T bg, int back); | 22 static int gui_screenchar(int off, int flags, guicolor_T fg, guicolor_T bg, int back); |
23 static int gui_outstr_nowrap(char_u *s, int len, int flags, guicolor_T fg, guicolor_T bg, int back); | |
22 static void gui_delete_lines(int row, int count); | 24 static void gui_delete_lines(int row, int count); |
23 static void gui_insert_lines(int row, int count); | 25 static void gui_insert_lines(int row, int count); |
26 static int gui_xy2colrow(int x, int y, int *colp); | |
24 #if defined(FEAT_GUI_TABLINE) || defined(PROTO) | 27 #if defined(FEAT_GUI_TABLINE) || defined(PROTO) |
25 static int gui_has_tabline(void); | 28 static int gui_has_tabline(void); |
26 #endif | 29 #endif |
27 static void gui_do_scrollbar(win_T *wp, int which, int enable); | 30 static void gui_do_scrollbar(win_T *wp, int which, int enable); |
28 static void gui_update_horiz_scrollbar(int); | 31 static void gui_update_horiz_scrollbar(int); |
1048 */ | 1051 */ |
1049 #endif | 1052 #endif |
1050 return OK; | 1053 return OK; |
1051 } | 1054 } |
1052 | 1055 |
1053 void | 1056 static void |
1054 gui_set_cursor(int row, int col) | 1057 gui_set_cursor(int row, int col) |
1055 { | 1058 { |
1056 gui.row = row; | 1059 gui.row = row; |
1057 gui.col = col; | 1060 gui.col = col; |
1058 } | 1061 } |
1711 } | 1714 } |
1712 | 1715 |
1713 /* | 1716 /* |
1714 * Make scroll region cover whole screen. | 1717 * Make scroll region cover whole screen. |
1715 */ | 1718 */ |
1716 void | 1719 static void |
1717 gui_reset_scroll_region(void) | 1720 gui_reset_scroll_region(void) |
1718 { | 1721 { |
1719 gui.scroll_region_top = 0; | 1722 gui.scroll_region_top = 0; |
1720 gui.scroll_region_bot = gui.num_rows - 1; | 1723 gui.scroll_region_bot = gui.num_rows - 1; |
1721 gui.scroll_region_left = 0; | 1724 gui.scroll_region_left = 0; |
1722 gui.scroll_region_right = gui.num_cols - 1; | 1725 gui.scroll_region_right = gui.num_cols - 1; |
1723 } | 1726 } |
1724 | 1727 |
1725 void | 1728 static void |
1726 gui_start_highlight(int mask) | 1729 gui_start_highlight(int mask) |
1727 { | 1730 { |
1728 if (mask > HL_ALL) /* highlight code */ | 1731 if (mask > HL_ALL) /* highlight code */ |
1729 gui.highlight_mask = mask; | 1732 gui.highlight_mask = mask; |
1730 else /* mask */ | 1733 else /* mask */ |
2225 * GUI_MON_NOCLEAR is used to avoid clearing the selection when drawing over | 2228 * GUI_MON_NOCLEAR is used to avoid clearing the selection when drawing over |
2226 * it. | 2229 * it. |
2227 * Returns OK, unless "back" is non-zero and using the bold trick, then return | 2230 * Returns OK, unless "back" is non-zero and using the bold trick, then return |
2228 * FAIL (the caller should start drawing "back" chars back). | 2231 * FAIL (the caller should start drawing "back" chars back). |
2229 */ | 2232 */ |
2230 int | 2233 static int |
2231 gui_outstr_nowrap( | 2234 gui_outstr_nowrap( |
2232 char_u *s, | 2235 char_u *s, |
2233 int len, | 2236 int len, |
2234 int flags, | 2237 int flags, |
2235 guicolor_T fg, /* colors for cursor */ | 2238 guicolor_T fg, /* colors for cursor */ |
3378 /* | 3381 /* |
3379 * Convert x and y coordinate to column and row in text window. | 3382 * Convert x and y coordinate to column and row in text window. |
3380 * Corrects for multi-byte character. | 3383 * Corrects for multi-byte character. |
3381 * returns column in "*colp" and row as return value; | 3384 * returns column in "*colp" and row as return value; |
3382 */ | 3385 */ |
3383 int | 3386 static int |
3384 gui_xy2colrow(int x, int y, int *colp) | 3387 gui_xy2colrow(int x, int y, int *colp) |
3385 { | 3388 { |
3386 int col = check_col(X_2_COL(x)); | 3389 int col = check_col(X_2_COL(x)); |
3387 int row = check_row(Y_2_ROW(y)); | 3390 int row = check_row(Y_2_ROW(y)); |
3388 | 3391 |