}
static bool boolValue(const char *value) {
- return ( !strcmp(value, "1") ||
+ return ( !strcmp(value, "1") ||
!strcasecmp(value, "true") ||
!strcasecmp(value, "yes") );
}
{
if( i_type == REG_SZ )
{
- strcat( p_data, "\\plugins" );
+ strcat( p_data, "\\plugins000" );
ppsz_argv[ppsz_argc++] = "--plugin-path";
ppsz_argv[ppsz_argc++] = p_data;
}
}
ppsz_argv[ppsz_argc++] = "--no-one-instance";
-#if 0
+#if 1
ppsz_argv[0] = "C:\\Cygwin\\home\\damienf\\vlc-trunk\\vlc";
#endif
{
// validate protocol header
const char *start = url;
- while( start != end ) {
- char c = tolower(*start);
- if( (c < 'a') || (c > 'z') )
- // not valid protocol header, assume relative URL
- goto relativeurl;
+ char c = *start;
+ if( isalpha(c) )
+ {
++start;
+ while( start != end )
+ {
+ c = *start;
+ if( ! (isalnum(c)
+ || ('-' == c)
+ || ('+' == c)
+ || ('.' == c)
+ || ('/' == c)) ) /* VLC uses / to allow user to specify a demuxer */
+ // not valid protocol header, assume relative URL
+ goto relativeurl;
+ ++start;
+ }
+ /* we have a protocol header, therefore URL is absolute */
+ return strdup(url);
}
- /* we have a protocol header, therefore URL is absolute */
- return strdup(url);
+ // not a valid protocol header, assume relative URL
}
relativeurl:
return href;
}
- /* find last path component and replace it */
+ /* find last path component and replace it */
while( '/' != *pathend)
--pathend;
url = ++p;
continue;
}
- if( '.' != *p )
+ if( '.' != *p )
break;
++p;
if( '\0' == *p )
}
else
{
- if( '/' != *p )
+ if( '/' != *p )
break;
/* relative url starts with '../' */
++p;