[vlc-devel] commit: Ignore case when comparing ISO-639 language codes (Marian Durkovic )
git version control
git at videolan.org
Fri Sep 12 13:04:26 CEST 2008
vlc | branch: 0.9-bugfix | Marian Durkovic <md at bts.sk> | Fri Sep 12 13:00:46 2008 +0200| [8ad8bb3d21e79c4cc24557a86adf7afe64308143] | committer: Derk-Jan Hartman
Ignore case when comparing ISO-639 language codes
Signed-off-by: Derk-Jan Hartman <hartman at videolan.org>
(cherry picked from commit 58b66d49a878ea7814c4080f4fda75afecb2b2c5)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ad8bb3d21e79c4cc24557a86adf7afe64308143
---
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