diff options
author | John Schmidt <john.schmidt.h@gmail.com> | 2014-03-31 00:39:11 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-01 08:08:07 -0300 |
commit | e29e9563480946e13252f5aea6a9d137c9483a61 (patch) | |
tree | b07357c0b6cbbc83e0ef3f9d4b7019b8ffa61dec | |
parent | 2cb026c65c489743b3c5a4955dc9f276a18bd530 (diff) | |
download | rneovim-e29e9563480946e13252f5aea6a9d137c9483a61.tar.gz rneovim-e29e9563480946e13252f5aea6a9d137c9483a61.tar.bz2 rneovim-e29e9563480946e13252f5aea6a9d137c9483a61.zip |
Move after_pathsep from misc2.c
-rw-r--r-- | src/misc2.c | 11 | ||||
-rw-r--r-- | src/misc2.h | 1 | ||||
-rw-r--r-- | src/path.c | 11 | ||||
-rw-r--r-- | src/path.h | 1 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/misc2.c b/src/misc2.c index 646e6e7b48..2ca42fee03 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1614,17 +1614,6 @@ int get_real_state(void) } /* - * Return TRUE if "p" points to just after a path separator. - * Takes care of multi-byte characters. - * "b" must point to the start of the file name - */ -int after_pathsep(char_u *b, char_u *p) -{ - return p > b && vim_ispathsep(p[-1]) - && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0); -} - -/* * Return TRUE if file names "f1" and "f2" are in the same directory. * "f1" may be a short name, "f2" must be a full path. */ diff --git a/src/misc2.h b/src/misc2.h index 265f93a430..abf74db192 100644 --- a/src/misc2.h +++ b/src/misc2.h @@ -68,7 +68,6 @@ void set_fileformat(int t, int opt_flags); int default_fileformat(void); int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg); int get_real_state(void); -int after_pathsep(char_u *b, char_u *p); int same_directory(char_u *f1, char_u *f2); int vim_chdirfile(char_u *fname); int illegal_slash(char *name); diff --git a/src/path.c b/src/path.c index a83f4f3fd9..078c26467a 100644 --- a/src/path.c +++ b/src/path.c @@ -1662,3 +1662,14 @@ char_u *fix_fname(char_u *fname) #endif } +/* + * Return TRUE if "p" points to just after a path separator. + * Takes care of multi-byte characters. + * "b" must point to the start of the file name + */ +int after_pathsep(char_u *b, char_u *p) +{ + return p > b && vim_ispathsep(p[-1]) + && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0); +} + diff --git a/src/path.h b/src/path.h index 18c52694b7..3a5384fbb1 100644 --- a/src/path.h +++ b/src/path.h @@ -31,4 +31,5 @@ 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); char_u *fix_fname(char_u *fname); +int after_pathsep(char_u *b, char_u *p); #endif |