mirror of
https://github.com/videolan/vlc.git
synced 2024-11-24 18:33:38 +08:00
Remove DecodeLanguage (dead code)
This commit is contained in:
parent
885bc36a82
commit
ebe615077b
@ -41,7 +41,6 @@ extern "C" {
|
||||
VLC_EXPORT( const iso639_lang_t *, GetLang_1, ( const char * ) );
|
||||
VLC_EXPORT( const iso639_lang_t *, GetLang_2T, ( const char * ) );
|
||||
VLC_EXPORT( const iso639_lang_t *, GetLang_2B, ( const char * ) );
|
||||
VLC_EXPORT( const char *, DecodeLanguage, ( uint16_t ) );
|
||||
#if defined( __cplusplus )
|
||||
}
|
||||
#endif
|
||||
|
@ -43,37 +43,6 @@
|
||||
static const iso639_lang_t unknown_language =
|
||||
{ "Unknown", "Unknown", "??", "???", "???" };
|
||||
|
||||
/*****************************************************************************
|
||||
* DecodeLanguage: gives the long language name from the two-letter
|
||||
* ISO-639 code
|
||||
*****************************************************************************/
|
||||
const char * DecodeLanguage( uint16_t i_code )
|
||||
{
|
||||
const iso639_lang_t * p_lang;
|
||||
uint8_t psz_code[3];
|
||||
|
||||
psz_code[0] = i_code >> 8;
|
||||
psz_code[1] = i_code & 0xff;
|
||||
psz_code[2] = '\0';
|
||||
|
||||
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
|
||||
{
|
||||
if( !memcmp( p_lang->psz_iso639_1, psz_code, 2 ) )
|
||||
{
|
||||
# if 0
|
||||
if( *p_lang->psz_native_name )
|
||||
{
|
||||
return p_lang->psz_native_name;
|
||||
}
|
||||
#endif
|
||||
|
||||
return _( p_lang->psz_eng_name );
|
||||
}
|
||||
}
|
||||
|
||||
return _( "Unknown" );
|
||||
}
|
||||
|
||||
const iso639_lang_t * GetLang_1( const char * psz_code )
|
||||
{
|
||||
const iso639_lang_t *p_lang;
|
||||
|
Loading…
Reference in New Issue
Block a user