Mercurial > mplayer.hg
diff libmenu/menu_filesel.c @ 30608:c05fbacce55f
Replace platform preprocessor check by HAVE_DOS_PATHS.
This is both more elegant and more portable.
author | komh |
---|---|
date | Fri, 19 Feb 2010 09:14:01 +0000 |
parents | 0f1b5b68af32 |
children | 9fc9d1e788aa |
line wrap: on
line diff
--- a/libmenu/menu_filesel.c Fri Feb 19 09:12:23 2010 +0000 +++ b/libmenu/menu_filesel.c Fri Feb 19 09:14:01 2010 +0000 @@ -147,14 +147,14 @@ char *slash; l -= 3; strcpy(s, dir); -#if defined(__MINGW32__) || defined(__CYGWIN__) +#if HAVE_DOS_PATHS if (s[l] == '/' || s[l] == '\\') #else if (s[l] == '/') #endif s[l] = '\0'; slash = strrchr(s, '/'); -#if defined(__MINGW32__) || defined(__CYGWIN__) +#if HAVE_DOS_PATHS if (!slash) slash = strrchr(s,'\\'); #endif @@ -356,7 +356,7 @@ if(l <= 1) break; mpriv->dir[l-1] = '\0'; slash = strrchr(mpriv->dir,'/'); -#if defined(__MINGW32__) || defined(__CYGWIN__) +#if HAVE_DOS_PATHS if (!slash) slash = strrchr(mpriv->dir,'\\'); #endif @@ -456,7 +456,7 @@ char *slash = NULL; if (filename && !strstr(filename, "://") && (path=realpath(filename, b))) { slash = strrchr(path, '/'); -#if defined(__MINGW32__) || defined(__CYGWIN__) +#if HAVE_DOS_PATHS // FIXME: Do we need and can convert all '\\' in path to '/' on win32? if (!slash) slash = strrchr(path, '\\');