vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Aug 19 17:40:25 2012 +0300| [0dd263ce48fcbf50eabdcfea0409837cf82ad520] | committer: Rémi Denis-Courmont
vlc_UrlIsNotEncoded: remove dead function > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0dd263ce48fcbf50eabdcfea0409837cf82ad520 --- include/vlc_url.h | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/include/vlc_url.h b/include/vlc_url.h index 6ac2a30..a5e9438 100644 --- a/include/vlc_url.h +++ b/include/vlc_url.h @@ -193,34 +193,4 @@ static inline void vlc_UrlClean( vlc_url_t *url ) url->psz_buffer = NULL; } - -#include <ctype.h> - -/** Check whether a given string is not a valid URL and must hence be - * encoded */ -static inline int vlc_UrlIsNotEncoded( const char *psz_url ) -{ - const char *ptr; - - for( ptr = psz_url; *ptr; ptr++ ) - { - unsigned char c = *ptr; - - if( c == '%' ) - { - if( !isxdigit( (unsigned char)ptr[1] ) - || !isxdigit( (unsigned char)ptr[2] ) ) - return 1; /* not encoded */ - ptr += 2; - } - else - if( ( (unsigned char)( c - 'a' ) < 26 ) - || ( (unsigned char)( c - 'A' ) < 26 ) - || ( (unsigned char)( c - '0' ) < 10 ) - || ( strchr( "-_.", c ) != NULL ) ) - return 1; - } - return 0; /* looks fine - but maybe it is not encoded */ -} - #endif _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
