[vlc-devel] commit: module: Use PATH_SEP instead of ':'. (Pierre d'Herbemont )

git version control git at videolan.org
Fri Mar 28 13:30:35 CET 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Fri Mar 28 13:30:36 2008 +0100| [58296b6d73194ca2b74290b865c6f20c758f9fd2]

module: Use PATH_SEP instead of ':'.

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

 include/vlc_common.h  |    4 ++++
 src/libvlc-module.c   |    2 +-
 src/modules/modules.c |    6 +++---
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 1384f90..0d5f2a6 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -1074,7 +1074,11 @@ extern vlc_threadvar_t msg_context_global_key;
 #if defined( WIN32 ) || defined( UNDER_CE )
 #   define DIR_SEP_CHAR '\\'
 #   define DIR_SEP "\\"
+#   define PATH_SEP_CHAR ';'
+#   define PATH_SEP ";"
 #else
 #   define DIR_SEP_CHAR '/'
 #   define DIR_SEP "/"
+#   define PATH_SEP_CHAR ':'
+#   define PATH_SEP ":"
 #endif
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 3748bab..1ba46e5 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -986,7 +986,7 @@ static const char *ppsz_clock_descriptions[] =
 #define PLUGIN_PATH_TEXT N_("Modules search path")
 #define PLUGIN_PATH_LONGTEXT N_( \
     "Additional path for VLC to look for its modules. You can add " \
-    "several paths by concatenating them using ':' as separator")
+    "several paths by concatenating them using " PATH_SEP " as separator")
 
 #define VLM_CONF_TEXT N_("VLM configuration file")
 #define VLM_CONF_LONGTEXT N_( \
diff --git a/src/modules/modules.c b/src/modules/modules.c
index ddf3f03..c7062ab 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -938,8 +938,8 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
     {
         char *psz_fullpath;
 
-        /* Look for a ':' */
-        for( psz_iter = ppsz_path; *psz_iter && *psz_iter != ':'; psz_iter++ );
+        /* Look for PATH_SEP_CHAR (a ':' or a ';') */
+        for( psz_iter = ppsz_path; *psz_iter && *psz_iter != PATH_SEP_CHAR; psz_iter++ );
         if( !*psz_iter ) end = true;
         else *psz_iter = 0;
 
@@ -947,7 +947,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
 
         /* Handle relative as well as absolute paths */
 #ifdef WIN32
-        if( ppsz_path[0] != '\\' && ppsz_path[0] != '/' )
+        if( ppsz_path[0] != '\\' && ppsz_path[0] != '/' && ppsz_path[0] != ':' )
 #else
         if( ppsz_path[0] != '/' )
 #endif




More information about the vlc-devel mailing list