[MPlayer-cvslog] r30650 - in trunk: libmenu/menu_filesel.c stream/stream_file.c subreader.c

komh subversion at mplayerhq.hu
Fri Feb 19 10:14:01 CET 2010


Author: komh
Date: Fri Feb 19 10:14:01 2010
New Revision: 30650

Log:
It would be better to use HAVE_DOS_PATHS than to check platforms

Modified:
   trunk/libmenu/menu_filesel.c
   trunk/stream/stream_file.c
   trunk/subreader.c

Modified: trunk/libmenu/menu_filesel.c
==============================================================================
--- trunk/libmenu/menu_filesel.c	Fri Feb 19 10:12:23 2010	(r30649)
+++ trunk/libmenu/menu_filesel.c	Fri Feb 19 10:14:01 2010	(r30650)
@@ -147,14 +147,14 @@ static int mylstat(char *dir, char *file
     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 @@ static void read_cmd(menu_t* menu,int cm
 	  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 @@ static int open_fs(menu_t* menu, char* a
     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, '\\');

Modified: trunk/stream/stream_file.c
==============================================================================
--- trunk/stream/stream_file.c	Fri Feb 19 10:12:23 2010	(r30649)
+++ trunk/stream/stream_file.c	Fri Feb 19 10:14:01 2010	(r30650)
@@ -130,7 +130,7 @@ static int open_f(stream_t *stream,int m
     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++;

Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c	Fri Feb 19 10:12:23 2010	(r30649)
+++ trunk/subreader.c	Fri Feb 19 10:14:01 2010	(r30650)
@@ -1856,7 +1856,7 @@ char** sub_filenames(const char* path, c
     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


More information about the MPlayer-cvslog mailing list