0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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 #4840)
This commit is contained in:
Bram Moolenaar
2019-08-20 20:13:45 +02:00
parent 9a4a8c4d59
commit 5843f5f37b
67 changed files with 162 additions and 178 deletions

View File

@@ -28,6 +28,7 @@ static void t_puts(int *t_col, char_u *t_s, char_u *s, int attr);
static void msg_puts_printf(char_u *str, int maxlen);
static int do_more_prompt(int typed_char);
static void msg_screen_putchar(int c, int attr);
static void msg_moremsg(int full);
static int msg_check_screen(void);
static void redir_write(char_u *s, int maxlen);
#ifdef FEAT_CON_DIALOG
@@ -35,6 +36,7 @@ static char_u *msg_show_console_dialog(char_u *message, char_u *buttons, int dfl
static int confirm_msg_used = FALSE; /* displaying confirm_msg */
static char_u *confirm_msg = NULL; /* ":confirm" message */
static char_u *confirm_msg_tail; /* tail of confirm_msg */
static void display_confirm_msg(void);
#endif
#ifdef FEAT_JOB_CHANNEL
static int emsg_to_channel_log = FALSE;
@@ -513,7 +515,7 @@ msg_source(int attr)
* If "msg" is in 'debug': do error message but without side effects.
* If "emsg_skip" is set: never do error messages.
*/
int
static int
emsg_not_now(void)
{
if ((emsg_off > 0 && vim_strchr(p_debug, 'm') == NULL
@@ -1930,13 +1932,7 @@ msg_puts_title(char *s)
* part in the middle and replace it with "..." when necessary.
* Does not handle multi-byte characters!
*/
void
msg_outtrans_long_attr(char_u *longstr, int attr)
{
msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
}
void
static void
msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
{
int slen = len;
@@ -1952,6 +1948,12 @@ msg_outtrans_long_len_attr(char_u *longstr, int len, int attr)
msg_outtrans_len_attr(longstr + len - slen, slen, attr);
}
void
msg_outtrans_long_attr(char_u *longstr, int attr)
{
msg_outtrans_long_len_attr(longstr, (int)STRLEN(longstr), attr);
}
/*
* Basic function for writing a message with highlight attributes.
*/
@@ -3141,7 +3143,7 @@ msg_screen_putchar(int c, int attr)
}
}
void
static void
msg_moremsg(int full)
{
int attr;
@@ -3882,7 +3884,7 @@ msg_show_console_dialog(
/*
* Display the ":confirm" message. Also called when screen resized.
*/
void
static void
display_confirm_msg(void)
{
/* avoid that 'q' at the more prompt truncates the message here */