aboutsummaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
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/ex_cmds.c
parent6d712defa52e58627aca5c875677d14d705300e8 (diff)
downloadrneovim-77bfb6cd990c67e4191d4858af82de42303e1939.tar.gz
rneovim-77bfb6cd990c67e4191d4858af82de42303e1939.tar.bz2
rneovim-77bfb6cd990c67e4191d4858af82de42303e1939.zip
Test and refactor gettail -> path_tail.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index e8eb458f70..2c3bed7143 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1621,8 +1621,8 @@ void write_viminfo(char_u *file, int forceit)
* the same file as the original.
*/
wp = tempname + STRLEN(tempname) - 5;
- if (wp < gettail(tempname)) /* empty file name? */
- wp = gettail(tempname);
+ if (wp < path_tail(tempname)) /* empty file name? */
+ wp = path_tail(tempname);
for (*wp = 'z'; mch_stat((char *)tempname, &st_new) == 0;
--*wp) {
/*
@@ -5193,7 +5193,7 @@ void fix_help_buffer(void)
* In the "help.txt" and "help.abx" file, add the locally added help
* files. This uses the very first line in the help file.
*/
- fname = gettail(curbuf->b_fname);
+ fname = path_tail(curbuf->b_fname);
if (fnamecmp(fname, "help.txt") == 0
|| (fnamencmp(fname, "help.", 5) == 0
&& ASCII_ISALPHA(fname[5])
@@ -5246,11 +5246,11 @@ void fix_help_buffer(void)
continue;
f1 = fnames[i1];
f2 = fnames[i2];
- t1 = gettail(f1);
+ t1 = path_tail(f1);
if (fnamencmp(f1, f2, t1 - f1) != 0)
continue;
e1 = vim_strrchr(t1, '.');
- e2 = vim_strrchr(gettail(f2), '.');
+ e2 = vim_strrchr(path_tail(f2), '.');
if (e1 == NUL || e2 == NUL)
continue;
if (fnamecmp(e1, ".txt") != 0