summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-01-24 14:59:04 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-01-24 14:59:04 +0100
commit12fd3cdeb491d10f2226c1356058848b19a862cc (patch)
tree3129cd13d4bbfa2b63809bf618214721299a60c1 /i18n.c
parent72189b52280e77409f49bcb79c46ba63cb774e2b (diff)
downloadvdr-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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/i18n.c b/i18n.c
index e9aec99d..6a5060ff 100644
--- a/i18n.c
+++ b/i18n.c
@@ -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;
}