Mercurial > mplayer.hg
changeset 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 | c6356454b724 |
children | f4a71b27410b |
files | libmenu/menu_filesel.c stream/stream_file.c subreader.c |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
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, '\\');
--- a/stream/stream_file.c Fri Feb 19 09:12:23 2010 +0000 +++ b/stream/stream_file.c Fri Feb 19 09:14:01 2010 +0000 @@ -130,7 +130,7 @@ return STREAM_ERROR; } -#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) +#if HAVE_DOS_PATHS // extract '/' from '/x:/path' if( filename[ 0 ] == '/' && filename[ 1 ] && filename[ 2 ] == ':' ) filename++;
--- a/subreader.c Fri Feb 19 09:12:23 2010 +0000 +++ b/subreader.c Fri Feb 19 09:14:01 2010 +0000 @@ -1856,7 +1856,7 @@ subcnt = 0; tmp = strrchr(fname,'/'); -#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) +#if HAVE_DOS_PATHS if(!tmp)tmp = strrchr(fname,'\\'); if(!tmp)tmp = strrchr(fname,':'); #endif