[vlc-devel] commit: Ignore case when comparing ISO-639 language codes (Marian Durkovic )
git version control
git at videolan.org
Fri Sep 12 12:57:55 CEST 2008
vlc | branch: master | Marian Durkovic <md at bts.sk> | Fri Sep 12 13:00:46 2008 +0200| [58b66d49a878ea7814c4080f4fda75afecb2b2c5] | committer: Derk-Jan Hartman
Ignore case when comparing ISO-639 language codes
Signed-off-by: Derk-Jan Hartman <hartman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58b66d49a878ea7814c4080f4fda75afecb2b2c5
---
src/text/iso_lang.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/text/iso_lang.c b/src/text/iso_lang.c
index eaae385..3a28cd9 100644
--- a/src/text/iso_lang.c
+++ b/src/text/iso_lang.c
@@ -49,7 +49,7 @@ const iso639_lang_t * GetLang_1( const char * psz_code )
const iso639_lang_t *p_lang;
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
- if( !strncmp( p_lang->psz_iso639_1, psz_code, 2 ) )
+ if( !strncasecmp( p_lang->psz_iso639_1, psz_code, 2 ) )
return p_lang;
return &unknown_language;
@@ -60,7 +60,7 @@ const iso639_lang_t * GetLang_2T( const char * psz_code )
const iso639_lang_t *p_lang;
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
- if( !strncmp( p_lang->psz_iso639_2T, psz_code, 3 ) )
+ if( !strncasecmp( p_lang->psz_iso639_2T, psz_code, 3 ) )
return p_lang;
return &unknown_language;
@@ -71,7 +71,7 @@ const iso639_lang_t * GetLang_2B( const char * psz_code )
const iso639_lang_t *p_lang;
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
- if( !strncmp( p_lang->psz_iso639_2B, psz_code, 3 ) )
+ if( !strncasecmp( p_lang->psz_iso639_2B, psz_code, 3 ) )
return p_lang;
return &unknown_language;
More information about the vlc-devel
mailing list