[vlc-devel] commit: mkv: use DIR_SEP_CHAR when applicable. ( Rémi Duraffort )

git version control git at videolan.org
Tue May 26 17:36:44 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue May 26 17:20:55 2009 +0200| [3bc0ec07775f821db69f0f0498fd1e06d5673798] | committer: Rémi Duraffort 

mkv: use DIR_SEP_CHAR when applicable.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3bc0ec07775f821db69f0f0498fd1e06d5673798
---

 modules/demux/mkv/mkv.cpp |    8 ++++----
 modules/demux/mkv/mkv.hpp |   10 ----------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index f6b9f69..c56fe0b 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -145,15 +145,15 @@ static int Open( vlc_object_t * p_this )
             // assume it's a regular file
             // get the directory path
             s_path = p_demux->psz_path;
-            if (s_path.at(s_path.length() - 1) == DIRECTORY_SEPARATOR)
+            if (s_path.at(s_path.length() - 1) == DIR_SEP_CHAR)
             {
                 s_path = s_path.substr(0,s_path.length()-1);
             }
             else
             {
-                if (s_path.find_last_of(DIRECTORY_SEPARATOR) > 0)
+                if (s_path.find_last_of(DIR_SEP_CHAR) > 0)
                 {
-                    s_path = s_path.substr(0,s_path.find_last_of(DIRECTORY_SEPARATOR));
+                    s_path = s_path.substr(0,s_path.find_last_of(DIR_SEP_CHAR));
                 }
             }
 
@@ -166,7 +166,7 @@ static int Open( vlc_object_t * p_this )
                 {
                     if (strlen(psz_file) > 4)
                     {
-                        s_filename = s_path + DIRECTORY_SEPARATOR + psz_file;
+                        s_filename = s_path + DIR_SEP_CHAR + psz_file;
 
 #ifdef WIN32
                         if (!strcasecmp(s_filename.c_str(), p_demux->psz_path))
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index c01e5ff..49119ad 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -119,16 +119,6 @@ extern "C" {
 
 #define MKVD_TIMECODESCALE 1000000
 
-/**
- * What's between a directory and a filename?
- */
-#if defined( WIN32 )
-    #define DIRECTORY_SEPARATOR '\\'
-#else
-    #define DIRECTORY_SEPARATOR '/'
-#endif
-
-
 #define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId )
 
 




More information about the vlc-devel mailing list