From 58296b6d73194ca2b74290b865c6f20c758f9fd2 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Fri, 28 Mar 2008 13:30:36 +0100 Subject: [PATCH] module: Use PATH_SEP instead of ':'. --- 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 1384f90416..0d5f2a6f70 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 3748babda3..1ba46e5ed1 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 ddf3f03081..c7062ab926 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 -- 2.39.2