diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-12 09:45:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-18 09:38:19 +0100 |
commit | a107c6bd8c40e5a147dcd18d0d9916a27218167b (patch) | |
tree | d0c7b10b77f5079e0b88176f63f207337805fb35 /setup_native/source | |
parent | 5888cb101f63d271870a7a392bb35b90a8461af0 (diff) |
Remove unnecessary macros
Change-Id: I1d7cdea37db59f58ca100489e593b882a951d96a
Diffstat (limited to 'setup_native/source')
-rw-r--r-- | setup_native/source/win32/customactions/sellang/sellang.cxx | 179 |
1 files changed, 86 insertions, 93 deletions
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index e9c4c5781d94..e9b644af93ae 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -60,103 +60,96 @@ langid_to_string( LANGID langid ) * language part is returned in the string. */ switch (PRIMARYLANGID (langid)) { -#define CASE(name, primary) \ - case LANG_##primary: return #name - CASE(af, AFRIKAANS); - CASE(am, AMHARIC); - CASE(ar, ARABIC); - CASE(as, ASSAMESE); - CASE(be, BELARUSIAN); - CASE(bg, BULGARIAN); - CASE(bn, BENGALI); - CASE(br, BRETON); - CASE(ca, CATALAN); - CASE(cs, CZECH); - CASE(cy, WELSH); - CASE(da, DANISH); - CASE(de, GERMAN); - CASE(el, GREEK); - CASE(en, ENGLISH); - CASE(es, SPANISH); - CASE(et, ESTONIAN); - CASE(eu, BASQUE); - CASE(fa, FARSI); - CASE(fi, FINNISH); - CASE(fo, FAEROESE); - CASE(fr, FRENCH); - CASE(ga, IRISH); - CASE(gl, GALICIAN); - CASE(gu, GUJARATI); - CASE(he, HEBREW); - CASE(hi, HINDI); - CASE(hu, HUNGARIAN); - CASE(hy, ARMENIAN); - CASE(id, INDONESIAN); - CASE(is, ICELANDIC); - CASE(it, ITALIAN); - CASE(ja, JAPANESE); - CASE(ka, GEORGIAN); - CASE(km, KHMER); - CASE(kn, KANNADA); - CASE(ko, KOREAN); - CASE(ks, KASHMIRI); - CASE(lo, LAO); - CASE(lt, LITHUANIAN); - CASE(lv, LATVIAN); - CASE(mk, MACEDONIAN); - CASE(ml, MALAYALAM); - CASE(mn, MONGOLIAN); - CASE(mr, MARATHI); - CASE(ms, MALAY); - CASE(mt, MALTESE); - CASE(ne, NEPALI); - CASE(nl, DUTCH); - CASE(ns, SOTHO); - CASE(or, ORIYA); - CASE(pa, PUNJABI); - CASE(pl, POLISH); - CASE(pt, PORTUGUESE); - CASE(rm, ROMANSH); - CASE(ro, ROMANIAN); - CASE(ru, RUSSIAN); - CASE(rw, KINYARWANDA); - CASE(sa, SANSKRIT); - CASE(sb, UPPER_SORBIAN); - CASE(sd, SINDHI); - CASE(sk, SLOVAK); - CASE(sl, SLOVENIAN); - CASE(sq, ALBANIAN); - CASE(sv, SWEDISH); - CASE(sw, SWAHILI); - CASE(ta, TAMIL); - CASE(te, TELUGU); - CASE(tg, TAJIK); - CASE(th, THAI); - CASE(ti, TIGRIGNA); - CASE(tn, TSWANA); - CASE(tr, TURKISH); - CASE(tt, TATAR); - CASE(uk, UKRAINIAN); - CASE(ur, URDU); - CASE(uz, UZBEK); - CASE(vi, VIETNAMESE); - CASE(xh, XHOSA); - CASE(zh, CHINESE); - CASE(zu, ZULU); -#undef CASE + case LANG_AFRIKAANS: return "af"; + case LANG_AMHARIC: return "am"; + case LANG_ARABIC: return "ar"; + case LANG_ASSAMESE: return "as"; + case LANG_BELARUSIAN: return "be"; + case LANG_BULGARIAN: return "bg"; + case LANG_BENGALI: return "bn"; + case LANG_BRETON: return "br"; + case LANG_CATALAN: return "ca"; + case LANG_CZECH: return "cs"; + case LANG_WELSH: return "cy"; + case LANG_DANISH: return "da"; + case LANG_GERMAN: return "de"; + case LANG_GREEK: return "el"; + case LANG_ENGLISH: return "en"; + case LANG_SPANISH: return "es"; + case LANG_ESTONIAN: return "et"; + case LANG_BASQUE: return "eu"; + case LANG_FARSI: return "fa"; + case LANG_FINNISH: return "fi"; + case LANG_FAEROESE: return "fo"; + case LANG_FRENCH: return "fr"; + case LANG_IRISH: return "ga"; + case LANG_GALICIAN: return "gl"; + case LANG_GUJARATI: return "gu"; + case LANG_HEBREW: return "he"; + case LANG_HINDI: return "hi"; + case LANG_HUNGARIAN: return "hu"; + case LANG_ARMENIAN: return "hy"; + case LANG_INDONESIAN: return "id"; + case LANG_ICELANDIC: return "is"; + case LANG_ITALIAN: return "it"; + case LANG_JAPANESE: return "ja"; + case LANG_GEORGIAN: return "ka"; + case LANG_KHMER: return "km"; + case LANG_KANNADA: return "kn"; + case LANG_KOREAN: return "ko"; + case LANG_KASHMIRI: return "ks"; + case LANG_LAO: return "lo"; + case LANG_LITHUANIAN: return "lt"; + case LANG_LATVIAN: return "lv"; + case LANG_MACEDONIAN: return "mk"; + case LANG_MALAYALAM: return "ml"; + case LANG_MONGOLIAN: return "mn"; + case LANG_MARATHI: return "mr"; + case LANG_MALAY: return "ms"; + case LANG_MALTESE: return "mt"; + case LANG_NEPALI: return "ne"; + case LANG_DUTCH: return "nl"; + case LANG_SOTHO: return "ns"; + case LANG_ORIYA: return "or"; + case LANG_PUNJABI: return "pa"; + case LANG_POLISH: return "pl"; + case LANG_PORTUGUESE: return "pt"; + case LANG_ROMANSH: return "rm"; + case LANG_ROMANIAN: return "ro"; + case LANG_RUSSIAN: return "ru"; + case LANG_KINYARWANDA: return "rw"; + case LANG_SANSKRIT: return "sa"; + case LANG_UPPER_SORBIAN: return "sb"; + case LANG_SINDHI: return "sd"; + case LANG_SLOVAK: return "sk"; + case LANG_SLOVENIAN: return "sl"; + case LANG_ALBANIAN: return "sq"; + case LANG_SWEDISH: return "sv"; + case LANG_SWAHILI: return "sw"; + case LANG_TAMIL: return "ta"; + case LANG_TELUGU: return "te"; + case LANG_TAJIK: return "tg"; + case LANG_THAI: return "th"; + case LANG_TIGRIGNA: return "ti"; + case LANG_TSWANA: return "tn"; + case LANG_TURKISH: return "tr"; + case LANG_TATAR: return "tt"; + case LANG_UKRAINIAN: return "uk"; + case LANG_URDU: return "ur"; + case LANG_UZBEK: return "uz"; + case LANG_VIETNAMESE: return "vi"; + case LANG_XHOSA: return "xh"; + case LANG_CHINESE: return "zh"; + case LANG_ZULU: return "zu"; /* Special cases */ default: switch (langid) { case MAKELANGID(LANG_SERBIAN, 0x05): return "bs"; -#define CASE(name, primary, sub) \ - case MAKELANGID(LANG_##primary, SUBLANG_##sub): return #name - - CASE(hr, SERBIAN, DEFAULT); - CASE(nb, NORWEGIAN, NORWEGIAN_BOKMAL); - CASE(nn, NORWEGIAN, NORWEGIAN_NYNORSK); - CASE(sh, SERBIAN, SERBIAN_LATIN); - CASE(sr, SERBIAN, SERBIAN_CYRILLIC); -#undef CASE + case MAKELANGID(LANG_SERBIAN, SUBLANG_DEFAULT): return "hr"; + case MAKELANGID(LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL): return "nb"; + case MAKELANGID(LANG_NORWEGIAN, SUBLANG_NORWEGIAN_NYNORSK): return "nn"; + case MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_LATIN): return "sh"; + case MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC): return "sr"; default: return 0; } } |