Commit a74a8625 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Hide vlc_fix_readdir_charset. It is now integrated in the UTF-8 wrappers.

Though there is not an useless lock and iconv handler
in the Darwin specific stuff.
parent bd3fbc76
...@@ -63,8 +63,9 @@ static inline char *FromWide( const wchar_t *in ) ...@@ -63,8 +63,9 @@ static inline char *FromWide( const wchar_t *in )
} }
VLC_EXPORT( char *, __vlc_fix_readdir_charset, ( vlc_object_t *, const char * ) ); #if !defined (__PLUGIN__)
#define vlc_fix_readdir_charset(a,b) __vlc_fix_readdir_charset(VLC_OBJECT(a),b) extern char *vlc_fix_readdir ( const char * );
#endif
VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) ); VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) );
......
...@@ -390,7 +390,7 @@ struct module_symbols_t ...@@ -390,7 +390,7 @@ struct module_symbols_t
void (*LocaleFree_inner) (const char *); void (*LocaleFree_inner) (const char *);
char * (*ToLocale_inner) (const char *); char * (*ToLocale_inner) (const char *);
char * (*EnsureUTF8_inner) (char *); char * (*EnsureUTF8_inner) (char *);
char * (*__vlc_fix_readdir_charset_inner) (vlc_object_t *, const char *); void *__vlc_fix_readdir_charset_deprecated;
int (*vlc_scandir_inner) (const char *name, struct dirent ***namelist, int (*filter) ( const struct dirent * ), int (*compar) ( const struct dirent **, const struct dirent ** )); int (*vlc_scandir_inner) (const char *name, struct dirent ***namelist, int (*filter) ( const struct dirent * ), int (*compar) ( const struct dirent **, const struct dirent ** ));
int (*vlc_alphasort_inner) (const struct dirent **a, const struct dirent **b); int (*vlc_alphasort_inner) (const struct dirent **a, const struct dirent **b);
osd_state_t * (*__osd_StateChange_inner) (osd_state_t *, const int); osd_state_t * (*__osd_StateChange_inner) (osd_state_t *, const int);
...@@ -898,7 +898,6 @@ struct module_symbols_t ...@@ -898,7 +898,6 @@ struct module_symbols_t
# define LocaleFree (p_symbols)->LocaleFree_inner # define LocaleFree (p_symbols)->LocaleFree_inner
# define ToLocale (p_symbols)->ToLocale_inner # define ToLocale (p_symbols)->ToLocale_inner
# define EnsureUTF8 (p_symbols)->EnsureUTF8_inner # define EnsureUTF8 (p_symbols)->EnsureUTF8_inner
# define __vlc_fix_readdir_charset (p_symbols)->__vlc_fix_readdir_charset_inner
# define vlc_scandir (p_symbols)->vlc_scandir_inner # define vlc_scandir (p_symbols)->vlc_scandir_inner
# define vlc_alphasort (p_symbols)->vlc_alphasort_inner # define vlc_alphasort (p_symbols)->vlc_alphasort_inner
# define __osd_StateChange (p_symbols)->__osd_StateChange_inner # define __osd_StateChange (p_symbols)->__osd_StateChange_inner
...@@ -1381,7 +1380,6 @@ struct module_symbols_t ...@@ -1381,7 +1380,6 @@ struct module_symbols_t
((p_symbols)->LocaleFree_inner) = LocaleFree; \ ((p_symbols)->LocaleFree_inner) = LocaleFree; \
((p_symbols)->ToLocale_inner) = ToLocale; \ ((p_symbols)->ToLocale_inner) = ToLocale; \
((p_symbols)->EnsureUTF8_inner) = EnsureUTF8; \ ((p_symbols)->EnsureUTF8_inner) = EnsureUTF8; \
((p_symbols)->__vlc_fix_readdir_charset_inner) = __vlc_fix_readdir_charset; \
((p_symbols)->vlc_scandir_inner) = vlc_scandir; \ ((p_symbols)->vlc_scandir_inner) = vlc_scandir; \
((p_symbols)->vlc_alphasort_inner) = vlc_alphasort; \ ((p_symbols)->vlc_alphasort_inner) = vlc_alphasort; \
((p_symbols)->__osd_StateChange_inner) = __osd_StateChange; \ ((p_symbols)->__osd_StateChange_inner) = __osd_StateChange; \
...@@ -1552,6 +1550,7 @@ struct module_symbols_t ...@@ -1552,6 +1550,7 @@ struct module_symbols_t
(p_symbols)->playlist_Move_deprecated = NULL; \ (p_symbols)->playlist_Move_deprecated = NULL; \
(p_symbols)->playlist_NodeGroup_deprecated = NULL; \ (p_symbols)->playlist_NodeGroup_deprecated = NULL; \
(p_symbols)->playlist_NodeRemoveParent_deprecated = NULL; \ (p_symbols)->playlist_NodeRemoveParent_deprecated = NULL; \
(p_symbols)->__vlc_fix_readdir_charset_deprecated = NULL; \
(p_symbols)->__intf_Interact_deprecated = NULL; \ (p_symbols)->__intf_Interact_deprecated = NULL; \
(p_symbols)->__intf_UserProgress_deprecated = NULL; \ (p_symbols)->__intf_UserProgress_deprecated = NULL; \
(p_symbols)->__intf_UserProgressUpdate_deprecated = NULL; \ (p_symbols)->__intf_UserProgressUpdate_deprecated = NULL; \
......
...@@ -340,10 +340,9 @@ vlc_bool_t vlc_current_charset( char **psz_charset ) ...@@ -340,10 +340,9 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
return VLC_FALSE; return VLC_FALSE;
} }
char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string )
{
(void)p_this;
char *vlc_fix_readdir( const char *psz_string )
{
#ifdef __APPLE__ #ifdef __APPLE__
vlc_iconv_t hd = vlc_iconv_open( "UTF-8", "UTF-8-MAC" ); vlc_iconv_t hd = vlc_iconv_open( "UTF-8", "UTF-8-MAC" );
...@@ -366,10 +365,12 @@ char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string ) ...@@ -366,10 +365,12 @@ char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string )
*psz_out = '\0'; *psz_out = '\0';
return psz_utf8; return psz_utf8;
} }
#endif #else
return strdup( psz_string ); return strdup( psz_string );
#endif
} }
static inline int locale_match (const char *tab, const char *locale) static inline int locale_match (const char *tab, const char *locale)
{ {
for (;*tab; tab += 2) for (;*tab; tab += 2)
......
...@@ -471,8 +471,6 @@ void *utf8_opendir( const char *dirname ) ...@@ -471,8 +471,6 @@ void *utf8_opendir( const char *dirname )
} }
#define darwin_readdir_fix( a ) __vlc_fix_readdir_charset (NULL, a)
char *utf8_readdir( void *dir ) char *utf8_readdir( void *dir )
{ {
struct dirent *ent; struct dirent *ent;
...@@ -481,11 +479,7 @@ char *utf8_readdir( void *dir ) ...@@ -481,11 +479,7 @@ char *utf8_readdir( void *dir )
if( ent == NULL ) if( ent == NULL )
return NULL; return NULL;
#ifdef __APPLE__ return vlc_fix_readdir( ent->d_name );
return darwin_readdir_fix( ent->d_name );
#else
return strdup( ent->d_name );
#endif
} }
static int dummy_select( const char *str ) static int dummy_select( const char *str )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment