diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-24 14:59:04 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-24 14:59:04 +0100 |
commit | 12fd3cdeb491d10f2226c1356058848b19a862cc (patch) | |
tree | 3129cd13d4bbfa2b63809bf618214721299a60c1 /i18n.c | |
parent | 72189b52280e77409f49bcb79c46ba63cb774e2b (diff) | |
download | vdr-12fd3cdeb491d10f2226c1356058848b19a862cc.tar.gz vdr-12fd3cdeb491d10f2226c1356058848b19a862cc.tar.bz2 |
Changed the 'languageCode' members in the descriptor classes of 'libsi' to 'char[4]' and setting the 4th byte to 0 for easier handling
Diffstat (limited to 'i18n.c')
-rw-r--r-- | i18n.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: i18n.c 1.144 2004/01/24 10:02:37 kls Exp $ + * $Id: i18n.c 1.145 2004/01/24 14:58:08 kls Exp $ * * Translations provided by: * @@ -4238,16 +4238,13 @@ const char * I18nLanguageAbbreviation(int Index) return Index < I18nNumLanguages ? Phrases[2][Index] : NULL; } -int I18nLanguageIndex(const char Code[3]) +int I18nLanguageIndex(const char *Code) { - char s[4]; - memcpy(s, Code, 3); - s[3] = 0; for (int i = 0; i < I18nNumLanguages; i++) { - if (strcasestr(Phrases[2][i], s)) + if (strcasestr(Phrases[2][i], Code)) return i; } - //dsyslog("unknown language code: '%s'", s); + //dsyslog("unknown language code: '%s'", Code); return -1; } |