]> git.sesse.net Git - vlc/commitdiff
module: Use PATH_SEP instead of ':'.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 28 Mar 2008 12:30:36 +0000 (13:30 +0100)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 28 Mar 2008 12:30:36 +0000 (13:30 +0100)
include/vlc_common.h
src/libvlc-module.c
src/modules/modules.c

index 1384f90416d246b0e8c6686fdabfc9bc8b580039..0d5f2a6f70e00f70ad1294b3edef0a144cce95a3 100644 (file)
@@ -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
index 3748babda3b587a0b4164cfc9156d3440f55938b..1ba46e5ed1f44c2210193aa6c41220c30db0bc81 100644 (file)
@@ -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_( \
index ddf3f03081d4560cfd239354a41a4f6ba9a76e6d..c7062ab926287441b2fcc88e9e5a9c10c3709580 100644 (file)
@@ -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