summaryrefslogtreecommitdiffstats
path: root/src/proto
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-13 23:13:28 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-13 23:13:28 +0100
commit5fd0f5052f9a312bb4cfe7b4176b1211d45127ee (patch)
treeb82e59bfdcf65662e44803dabbfa77c11010bb70 /src/proto
parent688b3983d8b321e0d32dd51914fa474a0988daf6 (diff)
patch 8.1.0914: code related to findfile() is spread outv8.1.0914
Problem: Code related to findfile() is spread out. Solution: Put findfile() related code into a new source file. (Yegappan Lakshmanan, closes #3934)
Diffstat (limited to 'src/proto')
-rw-r--r--src/proto/findfile.pro18
-rw-r--r--src/proto/misc1.pro5
-rw-r--r--src/proto/misc2.pro8
-rw-r--r--src/proto/window.pro7
4 files changed, 22 insertions, 16 deletions
diff --git a/src/proto/findfile.pro b/src/proto/findfile.pro
new file mode 100644
index 0000000000..5b80b83c69
--- /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 1e50f8acd7..6a2a5f1142 100644
--- a/src/proto/misc1.pro
+++ b/src/proto/misc1.pro
@@ -74,7 +74,6 @@ char_u *getnextcomp(char_u *fname);
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 @@ char_u *get_cmd_output(char_u *cmd, char_u *infile, int flags, int *ret_len);
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 7d33de8b65..3c88efb3a0 100644
--- a/src/proto/misc2.pro
+++ b/src/proto/misc2.pro
@@ -90,14 +90,6 @@ int vim_stat(const char *name, stat_T *stp);
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 27f77c4758..0efff64eb3 100644
--- a/src/proto/window.pro
+++ b/src/proto/window.pro
@@ -65,13 +65,6 @@ void win_comp_scroll(win_T *wp);
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);