summaryrefslogtreecommitdiffstats
path: root/loader2/lang.c
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-03-30 18:35:00 +0000
committerChris Lumens <clumens@redhat.com>2005-03-30 18:35:00 +0000
commit007d59c5621bd0e132258e7575e2b4e2c0e64120 (patch)
tree3df37f4272163c2c13ee432111ba54cf0896db1d /loader2/lang.c
parent6f48f2f9180bfed02bb89c4bcfa01558a3c9f211 (diff)
downloadanaconda-007d59c5621bd0e132258e7575e2b4e2c0e64120.tar.gz
anaconda-007d59c5621bd0e132258e7575e2b4e2c0e64120.tar.xz
anaconda-007d59c5621bd0e132258e7575e2b4e2c0e64120.zip
Set $LANG to a setting instead of the language's name, and change what
sscanf looks for to compensate for spaces in lang-table fields.
Diffstat (limited to 'loader2/lang.c')
-rw-r--r--loader2/lang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/loader2/lang.c b/loader2/lang.c
index 6cb22284e..8b1316450 100644
--- a/loader2/lang.c
+++ b/loader2/lang.c
@@ -108,8 +108,8 @@ static void loadLanguageList(int flags) {
while (fgets(line, sizeof(line), f)) {
lineNum++;
languages = realloc(languages, sizeof(*languages) * (numLanguages + 1));
- if (sscanf(line, "%s\t%s\t%s\t%s\t%s\t%s\n", name, key, font,
- code, keyboard, timezone) != 6) {
+ if (sscanf(line, "%[^\t]\t%[^\t]\t%[^\t]\t%[^\t]\t%[^\t]\t%[^\t]\n",
+ name, key, font, code, keyboard, timezone) != 6) {
printf("bad line %d in lang-table", lineNum);
logMessage("bad line %d in lang-table", lineNum);
} else {
@@ -215,7 +215,7 @@ static void setLangEnv (int i, int flags) {
if (!strcmp(languages[i].font, "None"))
return;
- setenv("LANG", languages[i].lang, 1);
+ setenv("LANG", languages[i].lc_all, 1);
setenv("LANGKEY", languages[i].key, 1);
setenv("LINGUAS", languages[i].lang, 1);
loadLanguage (NULL, flags);