diff options
author | Thomas Wienecke <wienecke.t@gmail.com> | 2014-03-30 20:06:04 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-03 10:32:41 -0300 |
commit | 955d6a29496d9f7902e95f4a2cc01fedd56e4a21 (patch) | |
tree | a4f66e7d0572840487e898ebe93df2315bb3ec2c /src/path.h | |
parent | 7021b970b9e8b3f9b9fe71546bfb3aa30851abd2 (diff) | |
download | rneovim-955d6a29496d9f7902e95f4a2cc01fedd56e4a21.tar.gz rneovim-955d6a29496d9f7902e95f4a2cc01fedd56e4a21.tar.bz2 rneovim-955d6a29496d9f7902e95f4a2cc01fedd56e4a21.zip |
Test and refactor getnextcomp -> path_next_component.
Diffstat (limited to 'src/path.h')
-rw-r--r-- | src/path.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/path.h b/src/path.h index 011736f215..a558fc72b3 100644 --- a/src/path.h +++ b/src/path.h @@ -33,13 +33,20 @@ char_u *path_tail(char_u *fname); /// /// Takes care of "c:/" and "//". That means `path_tail_with_seperator("dir///file.txt")` /// will return a pointer to `"///file.txt"`. -/// @param fname A file path. +/// @param fname A file path. (Must be != NULL.) /// @return /// - Pointer to the last path seperator of `fname`, if there is any. /// - `fname` if it contains no path seperator. /// - Never NULL. char_u *path_tail_with_seperator(char_u *fname); +/// Get the next path component of a path name. +/// +/// @param fname A file path. (Must be != NULL.) +/// @return Pointer to first found path seperator + 1. +/// An empty string, if `fname` doesn't contain a path seperator, +char_u *path_next_component(char_u *fname); + int vim_ispathsep(int c); int vim_ispathsep_nocolon(int c); int vim_ispathlistsep(int c); @@ -54,7 +61,6 @@ 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 *getnextcomp(char_u *fname); char_u *get_past_head(char_u *path); char_u *concat_str(char_u *str1, char_u *str2); void add_pathsep(char_u *p); |