diff src/message.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 041156ce1d22
children ec1717981acf
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -28,6 +28,7 @@ static void t_puts(int *t_col, char_u *t
 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(c
 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 *longs
     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 */