summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/system.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-09-18 16:53:06 +0000
committerpeter <peter@FreeBSD.org>1995-09-18 16:53:06 +0000
commit89e0ab3dba9ef542f52287fd1820072c4de7d393 (patch)
treed8d32666544a3c5d9db7a5472c5fa4292681da66 /usr.sbin/sysinstall/system.c
parentea496cc61fd7886ad990ab3876ac97ea2530a3bd (diff)
downloadFreeBSD-src-89e0ab3dba9ef542f52287fd1820072c4de7d393.zip
FreeBSD-src-89e0ab3dba9ef542f52287fd1820072c4de7d393.tar.gz
This mega-commit brings in Jordan's latest sysinstall version..
This looks like it was developed offline, and is being spammed over the top of the existing. "That's fine by me! I dont really care how you do it, just get it in there..." said Jordan in a conversation a short while ago...
Diffstat (limited to 'usr.sbin/sysinstall/system.c')
-rw-r--r--usr.sbin/sysinstall/system.c68
1 files changed, 4 insertions, 64 deletions
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index 066558b..880dff9 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.43.2.14 1995/06/09 14:33:36 jkh Exp $
+ * $Id: system.c,v 1.44 1995/06/11 19:30:10 rgrimes Exp $
*
* Jordan Hubbard
*
@@ -60,9 +60,6 @@ systemInitialize(int argc, char **argv)
setbuf(stderr, 0);
}
- for(i = 0; i < 256; i++)
- default_scrnmap[i] = i;
-
if (set_termcap() == -1) {
printf("Can't find terminal entry\n");
exit(-1);
@@ -146,63 +143,16 @@ systemDisplayFile(char *file)
char *
systemHelpFile(char *file, char *buf)
{
- char *cp;
- static char oldfile[64]; /* Should be FILENAME_MAX but I don't feel like wasting that much space */
- static char oldlang[64];
- char extract[64], *default_lang = "en_US.ISO8859-1";
- int i;
-
if (!file)
return NULL;
- if ((cp = getenv("LANG")) == NULL)
- cp = default_lang;
-
- for (i = 0; i < 2; i++) {
- snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
- if (file_readable(buf))
- return buf;
- if (*oldfile) {
- int i;
-
- i = unlink(oldfile);
- if (isDebug())
- msgDebug("Unlink(%s) = %d\n", oldfile, i);
- i = rmdir(oldlang);
- if (isDebug())
- msgDebug("rmdir(%s) = %d\n", oldlang, i);
- oldfile[0] = '\0';
- }
- snprintf(extract, 64, "%s/%s", cp, file);
- vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s > /dev/null 2>&1", extract);
- if (file_readable(buf)) {
- strcpy(oldfile, buf);
- sprintf(oldlang, "/stand/%s", cp);
- return buf;
- }
- if (cp == default_lang)
- break;
- cp = default_lang;
- }
+ snprintf(buf, FILENAME_MAX, "/stand/help/%s.hlp", file);
+ if (file_readable(buf))
+ return buf;
return NULL;
}
void
-systemChangeFont(const u_char font[])
-{
- if (OnVTY && ColorDisplay) {
- if (ioctl(0, PIO_FONT8x16, font) < 0)
- msgConfirm("Sorry! Unable to load font for %s", getenv("LANG"));
- }
-}
-
-void
-systemChangeLang(char *lang)
-{
- variable_set2("LANG", lang);
-}
-
-void
systemChangeTerminal(char *color, const u_char c_term[],
char *mono, const u_char m_term[])
{
@@ -231,16 +181,6 @@ systemChangeTerminal(char *color, const u_char c_term[],
dialog_clear();
}
-void
-systemChangeScreenmap(const u_char newmap[])
-{
- if (OnVTY) {
- if (ioctl(0, PIO_SCRNMAP, newmap) < 0)
- msgConfirm("Sorry! Unable to load the screenmap for %s",
- getenv("LANG"));
- }
-}
-
int
vsystem(char *fmt, ...)
{
OpenPOWER on IntegriCloud