aboutsummaryrefslogtreecommitdiff
path: root/src/path.h
diff options
context:
space:
mode:
authorThomas Wienecke <wienecke.t@gmail.com>2014-03-30 13:42:03 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-03 10:32:41 -0300
commit77bfb6cd990c67e4191d4858af82de42303e1939 (patch)
treed7c6fbf45cbe581fbf4e3edabf506d8fcf153037 /src/path.h
parent6d712defa52e58627aca5c875677d14d705300e8 (diff)
downloadrneovim-77bfb6cd990c67e4191d4858af82de42303e1939.tar.gz
rneovim-77bfb6cd990c67e4191d4858af82de42303e1939.tar.bz2
rneovim-77bfb6cd990c67e4191d4858af82de42303e1939.zip
Test and refactor gettail -> path_tail.
Diffstat (limited to 'src/path.h')
-rw-r--r--src/path.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/path.h b/src/path.h
index e4acfa62b2..8ae475a22f 100644
--- a/src/path.h
+++ b/src/path.h
@@ -19,6 +19,16 @@ typedef enum file_comparison {
/// @return Enum of type FileComparison. @see FileComparison.
FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname);
+/// Get the tail of a path:the file name.
+///
+/// @param fname A file path.
+/// @return
+/// - Empty string, if fname is NULL.
+/// - The position of the last path seperator + 1. (i.e. empty string, if
+/// fname ends in a slash).
+/// - Never NULL.
+char_u *path_tail(char_u *fname);
+
int vim_ispathsep(int c);
int vim_ispathsep_nocolon(int c);
int vim_ispathlistsep(int c);
@@ -33,7 +43,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 *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);