summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2002-12-14 19:38:13 +0000
committerMatt Wilson <msw@redhat.com>2002-12-14 19:38:13 +0000
commitbd06ab78490f3de123468cb3ff2bb1ed95da74d0 (patch)
tree6bd816cd401e4abbe64ef0a3c48e7d46632f8295
parent9991deb6ea8ba671871bd6d5390f6270b52570f2 (diff)
downloadanaconda-bd06ab78490f3de123468cb3ff2bb1ed95da74d0.tar.gz
anaconda-bd06ab78490f3de123468cb3ff2bb1ed95da74d0.tar.xz
anaconda-bd06ab78490f3de123468cb3ff2bb1ed95da74d0.zip
start adding bterm startup code, disabled until complete
-rw-r--r--lang-table8
-rw-r--r--loader2/dietstubs.c13
-rw-r--r--loader2/lang.c47
3 files changed, 41 insertions, 27 deletions
diff --git a/lang-table b/lang-table
index 185a47310..2eeee6120 100644
--- a/lang-table
+++ b/lang-table
@@ -1,5 +1,5 @@
-Chinese(Simplified) zh_CN Bterm None zh_CN.GB18030 us Asia/Shanghai
-Chinese(Traditional) zh_TW Bterm None zh_TW.Big5 us Asia/Taipei
+Chinese(Simplified) zh_CN bterm None zh_CN.GB18030 us Asia/Shanghai
+Chinese(Traditional) zh_TW bterm None zh_TW.Big5 us Asia/Taipei
Czech cs latarcyrheb-sun16 iso02 cs_CZ.UTF-8 cz-lat2 Europe/Prague
Danish da latarcyrheb-sun16 iso15 da_DK.UTF-8 us Europe/Copenhagen
English en latarcyrheb-sun16 iso01 en_US.UTF-8 us America/New_York
@@ -7,8 +7,8 @@ French fr latarcyrheb-sun16 iso15 fr_FR.UTF-8 fr-latin1 Europe/Paris
German de latarcyrheb-sun16 iso09 de_DE.UTF-8 de-latin1-nodeadkeys Europe/Berlin
Icelandic is latarcyrheb-sun16 iso15 is_IS.UTF-8 is-latin1 Atlantic/Reykjavik
Italian it latarcyrheb-sun16 iso15 it_IT.UTF-8 it Europe/Rome
-Japanese ja Bterm None ja_JP.eucJP jp106 Asia/Tokyo
-Korean ko Bterm None ko_KR.eucKR us Asia/Seoul
+Japanese ja bterm None ja_JP.eucJP jp106 Asia/Tokyo
+Korean ko bterm None ko_KR.eucKR us Asia/Seoul
Dutch nl latarcyrheb-sun16 iso15 nl_NL.UTF-8 us Europe/Amsterdam
Norwegian no latarcyrheb-sun16 iso15 no_NO.UTF-8 no-latin1 Europe/Oslo
Portuguese pt latarcyrheb-sun16 iso15 pt_PT.UTF-8@euro pt-latin1 Europe/Lisbon
diff --git a/loader2/dietstubs.c b/loader2/dietstubs.c
index 90b2af092..49bef28b0 100644
--- a/loader2/dietstubs.c
+++ b/loader2/dietstubs.c
@@ -191,3 +191,16 @@ char *setlocale (int category, const char *locale) {
return "en_US.UTF-8";
return 0;
}
+
+void *gzopen(const char *file) {
+ return gunzip_open(file);
+}
+
+int gzread(void *str, void * buf, int bytes) {
+ return gunzip_read(str, buf, bytes);
+}
+
+int gzclose(void *str) {
+ return gunzip_close(str);
+}
+
diff --git a/loader2/lang.c b/loader2/lang.c
index e848b3ec0..e54ee4b58 100644
--- a/loader2/lang.c
+++ b/loader2/lang.c
@@ -116,6 +116,7 @@ static void loadLanguageList(int flags) {
numLanguages++;
}
}
+ fclose(f);
}
int getLangInfo(struct langInfo ** langs, int flags) {
@@ -215,6 +216,19 @@ void setLanguage (char * key, int flags) {
}
}
+/* returns 0 on success, 1 on failure */
+extern int bterm_main(int argc, char **argv);
+int startBterm(int flags) {
+ char *args[4] = { "bterm", "-s", "-f", "/usr/lib/bogl/font.bgf.gz" };
+ int rc;
+
+ stopNewt();
+ rc = bterm_main(4, args);
+ logMessage("returning, rc is %d", rc);
+ startNewt(flags);
+ return rc;
+}
+
int chooseLanguage(char ** lang, int flags) {
int choice = 0;
char ** langs;
@@ -226,8 +240,6 @@ int chooseLanguage(char ** lang, int flags) {
char * langPicked;
char * buf;
- /* JKFIXME: I ripped out some of the wacky Kon stuff. it might need
- * to come back for bterm */
if (!languages) loadLanguageList(flags);
langs = alloca(sizeof(*langs) * (numLanguages + 1));
@@ -285,29 +297,18 @@ int chooseLanguage(char ** lang, int flags) {
return 0;
}
- /* only set the environment variables when we actually have a way
- to display the language */
- if (strcmp(languages[choice].font, "None")) {
- setenv("LANG", languages[choice].lc_all, 1);
- setenv("LANGKEY", languages[choice].key, 1);
- setenv("LC_ALL", languages[choice].lc_all, 1);
- setenv("LINGUAS", languages[choice].lc_all, 1);
- }
-
- if (strings) {
- free(strings), strings = NULL;
- numStrings = allocedStrings = 0;
- }
-
/* load the language only if it is displayable */
- if (!strcmp(languages[choice].font, "None")) {
- newtWinMessage("Language Unavailable", "OK",
- "%s display is unavailable in text mode. The "
- "installation will continue in English until the "
- "display of %s is possible.", languages[choice].lang,
- languages[choice].lang);
+ /* disable until working */
+ if (1 || !strcmp(languages[choice].font, "bterm") && startBterm(flags)) {
+ newtWinMessage("Language Unavailable", "OK",
+ "%s display is unavailable in text mode. The "
+ "installation will continue in English until the "
+ "display of %s is possible.", languages[choice].lang,
+ languages[choice].lang);
+ return 0;
} else {
- loadLanguage (NULL, flags);
+ setLanguage (languages[choice].key, flags);
+ loadLanguage (NULL, flags);
}
buf = sdupprintf(_(topLineWelcome), PRODUCTNAME);