patch 8.1.2021: some global functions can be local to the file

Problem:    Some global functions can be local to the file.
Solution:   Add "static". (Yegappan Lakshmanan, closes #4917)
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 6eafd47..81f2c8f 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -260,7 +260,7 @@
 /*
  * Find a timer by ID.  Returns NULL if not found;
  */
-    timer_T *
+    static timer_T *
 find_timer(long id)
 {
     timer_T *timer;
@@ -291,7 +291,7 @@
     }
 }
 
-    void
+    static void
 stop_all_timers(void)
 {
     timer_T *timer;
@@ -304,7 +304,7 @@
     }
 }
 
-    void
+    static void
 add_timer_info(typval_T *rettv, timer_T *timer)
 {
     list_T	*list = rettv->vval.v_list;
@@ -338,7 +338,7 @@
     }
 }
 
-    void
+    static void
 add_timer_info_all(typval_T *rettv)
 {
     timer_T *timer;
diff --git a/src/filepath.c b/src/filepath.c
index 811682e..5ffb8c9 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -793,7 +793,7 @@
     rettv->vval.v_number = filewritable(tv_get_string(&argvars[0]));
 }
 
-    void
+    static void
 findfilendir(
     typval_T	*argvars UNUSED,
     typval_T	*rettv,
diff --git a/src/hangulin.c b/src/hangulin.c
index 17142da..75e7f6a 100644
--- a/src/hangulin.c
+++ b/src/hangulin.c
@@ -809,7 +809,7 @@
     return len;
 }
 
-    void
+    static void
 hangul_input_clear(void)
 {
     sp = 0;
diff --git a/src/mbyte.c b/src/mbyte.c
index ff23ab6..c214f37 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -144,6 +144,7 @@
 static int dbcs_char2cells(int c);
 static int dbcs_ptr2cells_len(char_u *p, int size);
 static int dbcs_ptr2char(char_u *p);
+static int dbcs_head_off(char_u *base, char_u *p);
 
 /*
  * Lookup table to quickly get the length in bytes of a UTF-8 character from
@@ -3778,7 +3779,7 @@
     return 0;
 }
 
-    int
+    static int
 dbcs_head_off(char_u *base, char_u *p)
 {
     char_u	*q;
diff --git a/src/misc1.c b/src/misc1.c
index 45dcc32..ca5afef 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2761,7 +2761,7 @@
 
 # if defined(FEAT_EVAL) || defined(PROTO)
 
-    void
+    static void
 get_cmd_output_as_rettv(
     typval_T	*argvars,
     typval_T	*rettv,
diff --git a/src/os_unix.c b/src/os_unix.c
index 5efb5d1..2851459 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4276,7 +4276,7 @@
 /*
  * Send SIGINT to a child process if "c" is an interrupt character.
  */
-    void
+    static void
 may_send_sigint(int c UNUSED, pid_t pid UNUSED, pid_t wpid UNUSED)
 {
 # ifdef SIGINT
diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro
index 2ecda16..9f694da 100644
--- a/src/proto/ex_cmds2.pro
+++ b/src/proto/ex_cmds2.pro
@@ -2,11 +2,7 @@
 long proftime_time_left(proftime_T *due, proftime_T *now);
 timer_T *create_timer(long msec, int repeat);
 long check_due_timer(void);
-timer_T *find_timer(long id);
 void stop_timer(timer_T *timer);
-void stop_all_timers(void);
-void add_timer_info(typval_T *rettv, timer_T *timer);
-void add_timer_info_all(typval_T *rettv);
 int set_ref_in_timer(int copyID);
 void timer_free_all(void);
 void f_timer_info(typval_T *argvars, typval_T *rettv);
diff --git a/src/proto/filepath.pro b/src/proto/filepath.pro
index 405c8b5..bfb3ffb 100644
--- a/src/proto/filepath.pro
+++ b/src/proto/filepath.pro
@@ -6,7 +6,6 @@
 void f_exepath(typval_T *argvars, typval_T *rettv);
 void f_filereadable(typval_T *argvars, typval_T *rettv);
 void f_filewritable(typval_T *argvars, typval_T *rettv);
-void findfilendir(typval_T *argvars, typval_T *rettv, int find_what);
 void f_finddir(typval_T *argvars, typval_T *rettv);
 void f_findfile(typval_T *argvars, typval_T *rettv);
 void f_fnamemodify(typval_T *argvars, typval_T *rettv);
diff --git a/src/proto/hangulin.pro b/src/proto/hangulin.pro
index 3aef39d..6509ba8 100644
--- a/src/proto/hangulin.pro
+++ b/src/proto/hangulin.pro
@@ -5,7 +5,6 @@
 void hangul_input_state_toggle(void);
 void hangul_keyboard_set(void);
 int hangul_input_process(char_u *s, int len);
-void hangul_input_clear(void);
 char_u *hangul_string_convert(char_u *buf, int *p_len);
 char_u *hangul_composing_buffer_get(int *p_len);
 /* vim: set ft=c : */
diff --git a/src/proto/mbyte.pro b/src/proto/mbyte.pro
index 86b525c..cbfa909 100644
--- a/src/proto/mbyte.pro
+++ b/src/proto/mbyte.pro
@@ -50,7 +50,6 @@
 int mb_strnicmp(char_u *s1, char_u *s2, size_t nn);
 void show_utf8(void);
 int latin_head_off(char_u *base, char_u *p);
-int dbcs_head_off(char_u *base, char_u *p);
 int dbcs_screen_head_off(char_u *base, char_u *p);
 int utf_head_off(char_u *base, char_u *p);
 void mb_copy_char(char_u **fp, char_u **tp);
diff --git a/src/proto/misc1.pro b/src/proto/misc1.pro
index f0c3783..08eb853 100644
--- a/src/proto/misc1.pro
+++ b/src/proto/misc1.pro
@@ -48,7 +48,6 @@
 void line_breakcheck(void);
 void fast_breakcheck(void);
 char_u *get_cmd_output(char_u *cmd, char_u *infile, int flags, int *ret_len);
-void get_cmd_output_as_rettv(typval_T *argvars, typval_T *rettv, int retlist);
 void f_system(typval_T *argvars, typval_T *rettv);
 void f_systemlist(typval_T *argvars, typval_T *rettv);
 int goto_im(void);
diff --git a/src/proto/os_unix.pro b/src/proto/os_unix.pro
index 449b3e9..86e12a0 100644
--- a/src/proto/os_unix.pro
+++ b/src/proto/os_unix.pro
@@ -59,7 +59,6 @@
 int mch_report_winsize(int fd, int rows, int cols);
 void mch_set_shellsize(void);
 void mch_new_shellsize(void);
-void may_send_sigint(int c, pid_t pid, pid_t wpid);
 int mch_call_shell(char_u *cmd, int options);
 void mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal);
 char *mch_job_status(job_T *job);
diff --git a/src/proto/terminal.pro b/src/proto/terminal.pro
index 996db6d..0527aa8 100644
--- a/src/proto/terminal.pro
+++ b/src/proto/terminal.pro
@@ -56,7 +56,6 @@
 void f_term_wait(typval_T *argvars, typval_T *rettv);
 void term_send_eof(channel_T *ch);
 job_T *term_getjob(term_T *term);
-void term_free_conpty(term_T *term);
 int use_conpty(void);
 int terminal_enabled(void);
 /* vim: set ft=c : */
diff --git a/src/proto/undo.pro b/src/proto/undo.pro
index 93b9909..97dbef3 100644
--- a/src/proto/undo.pro
+++ b/src/proto/undo.pro
@@ -7,7 +7,6 @@
 int undo_allowed(void);
 int u_savecommon(linenr_T top, linenr_T bot, linenr_T newbot, int reload);
 void u_compute_hash(char_u *hash);
-char_u *u_get_undo_file_name(char_u *buf_ffname, int reading);
 void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash);
 void u_read_undo(char_u *name, char_u *hash, char_u *orig_name);
 void u_undo(int count);
@@ -27,7 +26,6 @@
 int anyBufIsChanged(void);
 int bufIsChangedNotTerm(buf_T *buf);
 int curbufIsChanged(void);
-void u_eval_tree(u_header_T *first_uhp, list_T *list);
 void f_undofile(typval_T *argvars, typval_T *rettv);
 void f_undotree(typval_T *argvars, typval_T *rettv);
 /* vim: set ft=c : */
diff --git a/src/pty.c b/src/pty.c
index 7a9e693..a2162e2 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -347,7 +347,7 @@
 #define PTY_DONE
 
 #ifdef _IBMR2
-int aixhack = -1;
+static int aixhack = -1;
 #endif
 
     int
diff --git a/src/terminal.c b/src/terminal.c
index 6d9fb24..3d66bbb 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -875,7 +875,7 @@
 
 
 // Terminals that need to be freed soon.
-term_T	*terminals_to_free = NULL;
+static term_T	*terminals_to_free = NULL;
 
 /*
  * Free a terminal and everything it refers to.
@@ -6024,7 +6024,7 @@
     pResizePseudoConsole(term->tl_conpty, consize);
 }
 
-    void
+    static void
 term_free_conpty(term_T *term)
 {
     if (term->tl_siex.lpAttributeList != NULL)
diff --git a/src/undo.c b/src/undo.c
index 8145af0..732efab 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -775,7 +775,7 @@
  * When "reading" is FALSE use the first name where the directory exists.
  * Returns NULL when there is no place to write or no file to read.
  */
-    char_u *
+    static char_u *
 u_get_undo_file_name(char_u *buf_ffname, int reading)
 {
     char_u	*dirp;
@@ -3590,7 +3590,7 @@
  * For undotree(): Append the list of undo blocks at "first_uhp" to "list".
  * Recursive.
  */
-    void
+    static void
 u_eval_tree(u_header_T *first_uhp, list_T *list)
 {
     u_header_T  *uhp = first_uhp;
diff --git a/src/version.c b/src/version.c
index 44b6a51..7ac3920 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2021,
+/**/
     2020,
 /**/
     2019,