From 2a6df95fb533fd451b9b13ec15ae8c1437e048ca Mon Sep 17 00:00:00 2001 From: John Schmidt Date: Mon, 31 Mar 2014 00:39:52 +0200 Subject: Move same_directory from misc2.c --- src/misc2.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/misc2.c') diff --git a/src/misc2.c b/src/misc2.c index 2ca42fee03..1a3d315899 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1613,27 +1613,6 @@ int get_real_state(void) return State; } -/* - * 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. - */ -int same_directory(char_u *f1, char_u *f2) -{ - char_u ffname[MAXPATHL]; - char_u *t1; - char_u *t2; - - /* safety check */ - if (f1 == NULL || f2 == NULL) - return FALSE; - - (void)vim_FullName(f1, ffname, MAXPATHL, FALSE); - t1 = gettail_sep(ffname); - t2 = gettail_sep(f2); - return t1 - ffname == t2 - f2 - && pathcmp((char *)ffname, (char *)f2, (int)(t1 - ffname)) == 0; -} - #if defined(FEAT_SESSION) || defined(MSWIN) || defined(FEAT_GUI_MAC) \ || ((defined(FEAT_GUI_GTK)) \ && ( defined(FEAT_WINDOWS) || defined(FEAT_DND)) ) \ -- cgit