diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-04 20:59:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-04 20:59:15 +0200 |
commit | 26262f87770d3a1a68b09a70152d75c2e2ae186f (patch) | |
tree | a051b686adb302a8d050a85007aa335787ced0b4 /src/proto | |
parent | 3f4f3d8e7e6fc0494d00cfb75669a554c8e67c8b (diff) |
patch 8.1.1985: code for dealing with paths is spread outv8.1.1985
Problem: Code for dealing with paths is spread out.
Solution: Move path related functions from misc1.c to filepath.c.
Remove NO_EXPANDPATH.
Diffstat (limited to 'src/proto')
-rw-r--r-- | src/proto/filepath.pro | 27 | ||||
-rw-r--r-- | src/proto/misc1.pro | 30 | ||||
-rw-r--r-- | src/proto/misc2.pro | 1 | ||||
-rw-r--r-- | src/proto/scriptfile.pro | 1 |
4 files changed, 31 insertions, 28 deletions
diff --git a/src/proto/filepath.pro b/src/proto/filepath.pro index f17ce1da99..a3df123854 100644 --- a/src/proto/filepath.pro +++ b/src/proto/filepath.pro @@ -28,4 +28,31 @@ void f_writefile(typval_T *argvars, typval_T *rettv); char_u *do_browse(int flags, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter, buf_T *buf); void f_browse(typval_T *argvars, typval_T *rettv); void f_browsedir(typval_T *argvars, typval_T *rettv); +void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen, int one); +char_u *home_replace_save(buf_T *buf, char_u *src); +int fullpathcmp(char_u *s1, char_u *s2, int checkname, int expandenv); +char_u *gettail(char_u *fname); +char_u *gettail_sep(char_u *fname); +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); +void shorten_dir(char_u *str); +int dir_of_file_exists(char_u *fname); +int vim_fnamecmp(char_u *x, char_u *y); +int vim_fnamencmp(char_u *x, char_u *y, size_t len); +char_u *concat_fnames(char_u *fname1, char_u *fname2, int sep); +void add_pathsep(char_u *p); +char_u *FullName_save(char_u *fname, int force); +int vim_fexists(char_u *fname); +int expand_wildcards_eval(char_u **pat, int *num_file, char_u ***file, int flags); +int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files, int flags); +int match_suffix(char_u *fname); +int unix_expandpath(garray_T *gap, char_u *path, int wildoff, int flags, int didstar); +int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, int flags); +void addfile(garray_T *gap, char_u *f, int flags); +void FreeWild(int count, char_u **files); +int pathcmp(const char *p, const char *q, int maxlen); +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/misc1.pro b/src/proto/misc1.pro index cdeaa2869f..f0c37838b6 100644 --- a/src/proto/misc1.pro +++ b/src/proto/misc1.pro @@ -43,40 +43,16 @@ void vim_setenv(char_u *name, char_u *val); char_u *get_env_name(expand_T *xp, int idx); char_u *get_users(expand_T *xp, int idx); int match_user(char_u *name); -void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen, int one); -char_u *home_replace_save(buf_T *buf, char_u *src); -int fullpathcmp(char_u *s1, char_u *s2, int checkname, int expandenv); -char_u *gettail(char_u *fname); -char_u *gettail_sep(char_u *fname); -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); -void shorten_dir(char_u *str); -int dir_of_file_exists(char_u *fname); -int vim_fnamecmp(char_u *x, char_u *y); -int vim_fnamencmp(char_u *x, char_u *y, size_t len); -char_u *concat_fnames(char_u *fname1, char_u *fname2, int sep); char_u *concat_str(char_u *str1, char_u *str2); -void add_pathsep(char_u *p); -char_u *FullName_save(char_u *fname, int force); void preserve_exit(void); -int vim_fexists(char_u *fname); void line_breakcheck(void); void fast_breakcheck(void); -int expand_wildcards_eval(char_u **pat, int *num_file, char_u ***file, int flags); -int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files, int flags); -int match_suffix(char_u *fname); -int unix_expandpath(garray_T *gap, char_u *path, int wildoff, int flags, int didstar); -void remove_duplicates(garray_T *gap); -int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, int flags); -void addfile(garray_T *gap, char_u *f, int flags); char_u *get_cmd_output(char_u *cmd, char_u *infile, int flags, int *ret_len); -void FreeWild(int count, char_u **files); +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); 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 6987517925..300e8be876 100644 --- a/src/proto/misc2.pro +++ b/src/proto/misc2.pro @@ -92,7 +92,6 @@ void update_mouseshape(int shape_idx); int vim_chdir(char_u *new_dir); int get_user_name(char_u *buf, int len); void sort_strings(char_u **files, int count); -int pathcmp(const char *p, const char *q, int maxlen); int filewritable(char_u *fname); int get2c(FILE *fd); int get3c(FILE *fd); diff --git a/src/proto/scriptfile.pro b/src/proto/scriptfile.pro index c56b1c6c13..8104b27d3c 100644 --- a/src/proto/scriptfile.pro +++ b/src/proto/scriptfile.pro @@ -8,6 +8,7 @@ void add_pack_start_dirs(void); void load_start_packages(void); void ex_packloadall(exarg_T *eap); void ex_packadd(exarg_T *eap); +void remove_duplicates(garray_T *gap); int ExpandRTDir(char_u *pat, int flags, int *num_file, char_u ***file, char *dirnames[]); int ExpandPackAddDir(char_u *pat, int *num_file, char_u ***file); void ex_source(exarg_T *eap); |