patch 8.1.0914: code related to findfile() is spread out
Problem: Code related to findfile() is spread out.
Solution: Put findfile() related code into a new source file. (Yegappan
Lakshmanan, closes #3934)
diff --git a/src/proto/findfile.pro b/src/proto/findfile.pro
new file mode 100644
index 0000000..5b80b83
--- /dev/null
+++ b/src/proto/findfile.pro
@@ -0,0 +1,18 @@
+/* findfile.c */
+void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
+char_u *vim_findfile_stopdir(char_u *buf);
+void vim_findfile_cleanup(void *ctx);
+char_u *vim_findfile(void *search_ctx_arg);
+void vim_findfile_free_visited(void *search_ctx_arg);
+char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname);
+void free_findfile(void);
+char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname);
+char_u *find_file_in_path_option(char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes);
+char_u *grab_file_name(long count, linenr_T *file_lnum);
+char_u *file_name_at_cursor(int options, long count, linenr_T *file_lnum);
+char_u *file_name_in_line(char_u *line, int col, int options, long count, char_u *rel_fname, linenr_T *file_lnum);
+char_u *find_file_name_in_path(char_u *ptr, int len, int options, long count, char_u *rel_fname);
+int vim_ispathlistsep(int c);
+void uniquefy_paths(garray_T *gap, char_u *pattern);
+int expand_in_path(garray_T *gap, char_u *pattern, int flags);
+/* vim: set ft=c : */
diff --git a/src/proto/misc1.pro b/src/proto/misc1.pro
index 1e50f8a..6a2a5f1 100644
--- a/src/proto/misc1.pro
+++ b/src/proto/misc1.pro
@@ -74,7 +74,6 @@
char_u *get_past_head(char_u *path);
int vim_ispathsep(int c);
int vim_ispathsep_nocolon(int c);
-int vim_ispathlistsep(int c);
void shorten_dir(char_u *str);
int dir_of_file_exists(char_u *fname);
int vim_fnamecmp(char_u *x, char_u *y);
@@ -99,4 +98,8 @@
void FreeWild(int count, char_u **files);
int goto_im(void);
char_u *get_isolated_shell_name(void);
+int path_is_url(char_u *p);
+int path_with_url(char_u *fname);
+int vim_isAbsName(char_u *name);
+int vim_FullName(char_u *fname, char_u *buf, int len, int force);
/* vim: set ft=c : */
diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro
index 7d33de8..3c88efb 100644
--- a/src/proto/misc2.pro
+++ b/src/proto/misc2.pro
@@ -90,14 +90,6 @@
char *parse_shape_opt(int what);
int get_shape_idx(int mouse);
void update_mouseshape(int shape_idx);
-void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
-char_u *vim_findfile_stopdir(char_u *buf);
-void vim_findfile_cleanup(void *ctx);
-char_u *vim_findfile(void *search_ctx_arg);
-void vim_findfile_free_visited(void *search_ctx_arg);
-char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname);
-char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname);
-char_u *find_file_in_path_option(char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes);
int vim_chdir(char_u *new_dir);
int get_user_name(char_u *buf, int len);
void sort_strings(char_u **files, int count);
diff --git a/src/proto/window.pro b/src/proto/window.pro
index 27f77c4..0efff64 100644
--- a/src/proto/window.pro
+++ b/src/proto/window.pro
@@ -65,13 +65,6 @@
void command_height(void);
void last_status(int morewin);
int tabline_height(void);
-char_u *grab_file_name(long count, linenr_T *file_lnum);
-char_u *file_name_at_cursor(int options, long count, linenr_T *file_lnum);
-char_u *file_name_in_line(char_u *line, int col, int options, long count, char_u *rel_fname, linenr_T *file_lnum);
-char_u *find_file_name_in_path(char_u *ptr, int len, int options, long count, char_u *rel_fname);
-int path_with_url(char_u *fname);
-int vim_isAbsName(char_u *name);
-int vim_FullName(char_u *fname, char_u *buf, int len, int force);
int min_rows(void);
int only_one_window(void);
void check_lnums(int do_curwin);