patch 8.2.3252: duplicated code for adding buffer lines

Problem:    Duplicated code for adding buffer lines.
Solution:   Move code to a common function.  Also move map functions to map.c.
            (Yegappan Lakshmanan, closes #8665)
diff --git a/src/proto/map.pro b/src/proto/map.pro
index 6da455a..3592623 100644
--- a/src/proto/map.pro
+++ b/src/proto/map.pro
@@ -17,7 +17,8 @@
 int put_escstr(FILE *fd, char_u *strstart, int what);
 void check_map_keycodes(void);
 char_u *check_map(char_u *keys, int mode, int exact, int ign_mod, int abbr, mapblock_T **mp_ptr, int *local_ptr);
-void get_maparg(typval_T *argvars, typval_T *rettv, int exact);
+void f_maparg(typval_T *argvars, typval_T *rettv);
+void f_mapcheck(typval_T *argvars, typval_T *rettv);
 void f_mapset(typval_T *argvars, typval_T *rettv);
 void init_mappings(void);
 void add_map(char_u *map, int mode);