diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-09-17 11:53:37 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-09-17 11:53:37 -0500 |
commit | e2a4c4bee8d2e468204925a5d822cbec8894a3c0 (patch) | |
tree | 5ab3e2a91fa9bdf4d7fdd8a6d96af64df77e0bfa /src/sim.c | |
parent | 26f15e30a8c3066689d40fb6df7466b9a9124428 (diff) | |
download | ofono-e2a4c4bee8d2e468204925a5d822cbec8894a3c0.tar.bz2 |
Use existing function for converting to iso639
Diffstat (limited to 'src/sim.c')
-rw-r--r-- | src/sim.c | 30 |
1 files changed, 3 insertions, 27 deletions
@@ -679,47 +679,23 @@ static void parse_language_list(char **out_list, int *count, } } -static const char* const dcs_lang_to_iso[0x30] = { - [0x00] = "de", - [0x01] = "en", - [0x02] = "it", - [0x03] = "fr", - [0x04] = "es", - [0x05] = "nl", - [0x06] = "sv", - [0x07] = "da", - [0x08] = "pt", - [0x09] = "fi", - [0x0a] = "no", - [0x0b] = "el", - [0x0c] = "tr", - [0x0d] = "hu", - [0x0e] = "pl", - [0x20] = "cs", - [0x21] = "ar", - [0x22] = "he", - [0x23] = "ar", - [0x24] = "ru", - [0x25] = "is", -}; - static void parse_eflp(char **out_list, int *count, const unsigned char *eflp, int length) { int i, j; - const char *code; + char code[3]; for (i = 0; i < length; i++) { if (eflp[i] >= 0x30) continue; - code = dcs_lang_to_iso[eflp[i]]; - if (!code) + if (iso639_2_from_language(eflp[i], code) == FALSE) continue; for (j = 0; j < *count; j ++) if (!memcmp(out_list[j], code, 2)) break; + if (j < *count) continue; |