Joerg's changes to add screen font and screenmap setting.

Some changes of my own to make screen saver configuration a little
more sane, and also make it easier to get to the keyboard/screen
setup from the options menu.
This commit is contained in:
Jordan K. Hubbard 1996-11-07 08:03:29 +00:00
parent ebcf5ea509
commit 663b45cb90
16 changed files with 330 additions and 51 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.52 1996/11/04 12:56:17 jkh Exp $
* $Id: config.c,v 1.53 1996/11/04 17:42:04 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -335,13 +335,8 @@ configSaver(dialogMenuItem *self)
int
configSaverTimeout(dialogMenuItem *self)
{
if (variable_get(VAR_BLANKTIME)) {
variable_unset(VAR_BLANKTIME);
return DITEM_SUCCESS | DITEM_REDRAW;
}
else
return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver")
? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE;
return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ?
DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE;
}
int
@ -380,7 +375,7 @@ configResolv(void)
FILE *fp;
char *cp, *dp, *hp;
if (!RunningAsInit && file_readable("/etc/resolv.conf"))
if (!RunningAsInit || file_readable("/etc/resolv.conf"))
return;
if (Mkdir("/etc")) {

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: dmenu.c,v 1.24 1996/08/01 10:58:50 jkh Exp $
* $Id: dmenu.c,v 1.25 1996/08/03 10:10:52 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -92,6 +92,22 @@ dmenuSetVariable(dialogMenuItem *tmp)
return DITEM_SUCCESS;
}
int
dmenuSetVariables(dialogMenuItem *tmp)
{
char *cp1, *cp2;
char *copy = strdup((char *)tmp->data);
for (cp1 = copy; cp1 != NULL;) {
cp2 = index(cp1, ',');
if (cp2 != NULL) *cp2++ = '\0';
variable_set(cp1);
cp1 = cp2;
}
free(copy);
return DITEM_SUCCESS;
}
int
dmenuToggleVariable(dialogMenuItem *tmp)
{
@ -139,7 +155,7 @@ dmenuFlagCheck(dialogMenuItem *item)
int
dmenuVarCheck(dialogMenuItem *item)
{
char *w, *cp, *cp2, tmp[256];
char *w, *cp, *cp2, *cp3, tmp[256];
w = (char *)item->aux;
if (!w)
@ -149,6 +165,8 @@ dmenuVarCheck(dialogMenuItem *item)
strncpy(tmp, w, 256);
if ((cp = index(tmp, '=')) != NULL) {
*(cp++) = '\0';
if ((cp3 = index(cp, ',')) != NULL)
*cp3 = '\0';
cp2 = getenv(tmp);
if (cp2)
return !strcmp(cp, cp2);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.91 1996/11/04 17:42:14 jkh Exp $
* $Id: menus.c,v 1.92 1996/11/06 19:15:30 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -261,9 +261,11 @@ DMenu MenuIndex = {
{ "Router", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router" },
{ "Samba", "Configure Samba for LanManager access.", dmenuVarCheck, configSamba, NULL, "samba" },
{ "Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
{ "Syscons, Font", "The console screen font.", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
{ "Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ "Syscons, Keyrate", "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ "Syscons, Saver", "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
{ "Syscons, Screenmap", "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ "Time Zone", "Set the system's time zone.", NULL, dmenuSystemCommand, NULL, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup" },
{ "Upgrade", "Upgrade an existing system.", NULL, installUpgrade },
{ "Usage", "Quick start - How to use this menu system.", NULL, dmenuDisplayFile, NULL, "usage" },
@ -1148,9 +1150,11 @@ your preference.\n\n\
When you are done setting configuration options, select Cancel.",
"Configure your system console settings",
NULL,
{ { "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ { "Font", "Choose an alternate screen font", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
{ "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ "Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ "Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
{ "Screenmap", "Choose an alternate screenmap", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
{ NULL } },
};
@ -1211,6 +1215,60 @@ probably enable one of these screen savers to prevent phosphor burn-in.",
{ "Star", "A \"twinkling stars\" effect",
dmenuVarCheck, configSaver, NULL, "saver=star" },
{ "Timeout", "Set the screen saver timeout interval",
dmenuVarCheck, configSaverTimeout, NULL, "blanktime" },
NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
DMenu MenuSysconsScrnmap = {
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Screenmap",
"Unless you load a specific font, most PC hardware defaults to\n"
"displaying characters in the IBM 437 character set. However,\n"
"in the Unix world, this character set is very rarely used. Most\n"
"Western European countries, for example, prefer ISO 8859-1.\n"
"American users won't notice the difference since the bottom half\n"
"of all these character sets is ANSI anyway.\n"
"If your hardware is capable of downloading a new display font,\n"
"you should probably choose that option. However, for hardware\n"
"where this is not possible (e.g. monochrome adapters), a screen\n"
"map will give you the best approximation that your hardware can\n"
"display at all.",
"Choose a screen map",
NULL,
{ { "None", "No screenmap, use default font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
{ "KOI8-R to IBM866", "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
{ "ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
{ NULL } },
};
DMenu MenuSysconsFont = {
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Font",
"Most PC hardware defaults to displaying characters in the\n"
"IBM 437 character set. However, in the Unix world, this\n"
"character set is very rarely used. Most Western European\n"
"countries, for example, prefer ISO 8859-1.\n"
"American users won't notice the difference since the bottom half\n"
"of all these charactersets is ANSI anyway. However, they might\n"
"want to load a font anyway to use the 30- or 50-line displays.\n"
"If your hardware is capable of downloading a new display font,\n"
"you can select the appropriate font below.",
"Choose a font",
NULL,
{ { "None", "Use default font", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=NO,font8x14=NO,font8x16=NO" },
{ "IBM 437", "English", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
{ "IBM 850", "Western Europe, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
{ "IBM 865", "Norwegian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
{ "IBM 866", "Russian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866-8x16" },
{ "ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
{ "KOI8-R", "Russian, KOI8-R encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=koi8-r-8x8,font8x14=koi8-r-8x14,font8x16=koi8-r-8x16" },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: options.c,v 1.43 1996/10/01 12:13:22 jkh Exp $
* $Id: options.c,v 1.44 1996/10/02 01:30:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -93,6 +93,31 @@ mediaCheck(Option opt)
return "<not yet set>";
}
static char *
consoleCheck(Option opt)
{
static char opts[40];
char *cp;
opts[0] = '\0';
cp = variable_get("saver");
sprintf(&opts[strlen(opts)], "%s/", cp ?: "std");
cp = variable_get("scrnmap");
sprintf(&opts[strlen(opts)], "%s/", cp ?: "std");
cp = variable_get("font8x8");
sprintf(&opts[strlen(opts)], "%s", cp ?: "std");
return opts;
}
static int
consoleGetType(dialogMenuItem *self)
{
int i;
i = dmenuOpenSimple(&MenuSyscons, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
return i | DITEM_RECREATE;
}
#define TAPE_PROMPT "Please enter the tape block size in 512 byte blocks:"
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"none\" for a generic release install:"
#define BPKG_PROMPT "Please specify the name of the HTML browser package:"
@ -128,6 +153,8 @@ static Option Options[] = {
OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
{ "Media Type", "The current installation media type.",
OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck },
{ "Console Config", "Keyboard and font configuration.",
OPT_IS_FUNC, consoleGetType, "System console", consoleCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
{ "Use Defaults", "Reset all values to startup defaults",

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.83 1996/11/04 12:56:33 jkh Exp $
* $Id: sysinstall.h,v 1.84 1996/11/04 17:42:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -323,9 +323,11 @@ extern DMenu MenuMediaTape; /* Tape media menu */
extern DMenu MenuNetworkDevice; /* Network device menu */
extern DMenu MenuNTP; /* NTP time server menu */
extern DMenu MenuSyscons; /* System console configuration menu */
extern DMenu MenuSysconsFont; /* System console font configuration menu */
extern DMenu MenuSysconsKeymap; /* System console keymap configuration menu */
extern DMenu MenuSysconsKeyrate; /* System console keyrate configuration menu */
extern DMenu MenuSysconsSaver; /* System console saver configuration menu */
extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu */
extern DMenu MenuNetworking; /* Network configuration menu */
extern DMenu MenuInstallCustom; /* Custom Installation menu */
extern DMenu MenuDistributions; /* Distribution menu */
@ -380,6 +382,7 @@ extern int configSamba(dialogMenuItem *self);
extern int configPCNFSD(dialogMenuItem *self);
extern int configNFSServer(dialogMenuItem *self);
extern int configNovell(dialogMenuItem *self);
extern int configWriteSysconfig(dialogMenuItem *self);
/* crc.c */
extern int crc(int, unsigned long *, unsigned long *);
@ -430,6 +433,7 @@ extern int dmenuSystemCommand(dialogMenuItem *tmp);
extern int dmenuSystemCommandBox(dialogMenuItem *tmp);
extern int dmenuExit(dialogMenuItem *tmp);
extern int dmenuSetVariable(dialogMenuItem *tmp);
extern int dmenuSetVariables(dialogMenuItem *tmp);
extern int dmenuToggleVariable(dialogMenuItem *tmp);
extern int dmenuSetFlag(dialogMenuItem *tmp);
extern int dmenuSetValue(dialogMenuItem *tmp);

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.47 1996/10/05 12:16:49 jkh Exp $
* $Id: tcpip.c,v 1.48 1996/10/05 16:33:04 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -489,6 +489,7 @@ tcpOpenDialog(Device *devp)
if (ipaddr[0])
variable_set2(VAR_IPADDR, ipaddr);
restorescr(save);
configResolv(); /* XXX this will do it on the MFS copy XXX */
return DITEM_SUCCESS;
}
restorescr(save);
@ -546,6 +547,5 @@ int
tcpMenuSelect(dialogMenuItem *self)
{
(void)tcpDeviceSelect();
configResolv();
return DITEM_SUCCESS | DITEM_RECREATE | DITEM_RESTORE;
}

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.52 1996/11/04 12:56:17 jkh Exp $
* $Id: config.c,v 1.53 1996/11/04 17:42:04 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -335,13 +335,8 @@ configSaver(dialogMenuItem *self)
int
configSaverTimeout(dialogMenuItem *self)
{
if (variable_get(VAR_BLANKTIME)) {
variable_unset(VAR_BLANKTIME);
return DITEM_SUCCESS | DITEM_REDRAW;
}
else
return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver")
? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE;
return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ?
DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE;
}
int
@ -380,7 +375,7 @@ configResolv(void)
FILE *fp;
char *cp, *dp, *hp;
if (!RunningAsInit && file_readable("/etc/resolv.conf"))
if (!RunningAsInit || file_readable("/etc/resolv.conf"))
return;
if (Mkdir("/etc")) {

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: dmenu.c,v 1.24 1996/08/01 10:58:50 jkh Exp $
* $Id: dmenu.c,v 1.25 1996/08/03 10:10:52 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -92,6 +92,22 @@ dmenuSetVariable(dialogMenuItem *tmp)
return DITEM_SUCCESS;
}
int
dmenuSetVariables(dialogMenuItem *tmp)
{
char *cp1, *cp2;
char *copy = strdup((char *)tmp->data);
for (cp1 = copy; cp1 != NULL;) {
cp2 = index(cp1, ',');
if (cp2 != NULL) *cp2++ = '\0';
variable_set(cp1);
cp1 = cp2;
}
free(copy);
return DITEM_SUCCESS;
}
int
dmenuToggleVariable(dialogMenuItem *tmp)
{
@ -139,7 +155,7 @@ dmenuFlagCheck(dialogMenuItem *item)
int
dmenuVarCheck(dialogMenuItem *item)
{
char *w, *cp, *cp2, tmp[256];
char *w, *cp, *cp2, *cp3, tmp[256];
w = (char *)item->aux;
if (!w)
@ -149,6 +165,8 @@ dmenuVarCheck(dialogMenuItem *item)
strncpy(tmp, w, 256);
if ((cp = index(tmp, '=')) != NULL) {
*(cp++) = '\0';
if ((cp3 = index(cp, ',')) != NULL)
*cp3 = '\0';
cp2 = getenv(tmp);
if (cp2)
return !strcmp(cp, cp2);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.91 1996/11/04 17:42:14 jkh Exp $
* $Id: menus.c,v 1.92 1996/11/06 19:15:30 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -261,9 +261,11 @@ DMenu MenuIndex = {
{ "Router", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router" },
{ "Samba", "Configure Samba for LanManager access.", dmenuVarCheck, configSamba, NULL, "samba" },
{ "Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
{ "Syscons, Font", "The console screen font.", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
{ "Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ "Syscons, Keyrate", "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ "Syscons, Saver", "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
{ "Syscons, Screenmap", "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ "Time Zone", "Set the system's time zone.", NULL, dmenuSystemCommand, NULL, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup" },
{ "Upgrade", "Upgrade an existing system.", NULL, installUpgrade },
{ "Usage", "Quick start - How to use this menu system.", NULL, dmenuDisplayFile, NULL, "usage" },
@ -1148,9 +1150,11 @@ your preference.\n\n\
When you are done setting configuration options, select Cancel.",
"Configure your system console settings",
NULL,
{ { "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ { "Font", "Choose an alternate screen font", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
{ "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ "Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ "Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
{ "Screenmap", "Choose an alternate screenmap", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
{ NULL } },
};
@ -1211,6 +1215,60 @@ probably enable one of these screen savers to prevent phosphor burn-in.",
{ "Star", "A \"twinkling stars\" effect",
dmenuVarCheck, configSaver, NULL, "saver=star" },
{ "Timeout", "Set the screen saver timeout interval",
dmenuVarCheck, configSaverTimeout, NULL, "blanktime" },
NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
DMenu MenuSysconsScrnmap = {
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Screenmap",
"Unless you load a specific font, most PC hardware defaults to\n"
"displaying characters in the IBM 437 character set. However,\n"
"in the Unix world, this character set is very rarely used. Most\n"
"Western European countries, for example, prefer ISO 8859-1.\n"
"American users won't notice the difference since the bottom half\n"
"of all these character sets is ANSI anyway.\n"
"If your hardware is capable of downloading a new display font,\n"
"you should probably choose that option. However, for hardware\n"
"where this is not possible (e.g. monochrome adapters), a screen\n"
"map will give you the best approximation that your hardware can\n"
"display at all.",
"Choose a screen map",
NULL,
{ { "None", "No screenmap, use default font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
{ "KOI8-R to IBM866", "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
{ "ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
{ NULL } },
};
DMenu MenuSysconsFont = {
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Font",
"Most PC hardware defaults to displaying characters in the\n"
"IBM 437 character set. However, in the Unix world, this\n"
"character set is very rarely used. Most Western European\n"
"countries, for example, prefer ISO 8859-1.\n"
"American users won't notice the difference since the bottom half\n"
"of all these charactersets is ANSI anyway. However, they might\n"
"want to load a font anyway to use the 30- or 50-line displays.\n"
"If your hardware is capable of downloading a new display font,\n"
"you can select the appropriate font below.",
"Choose a font",
NULL,
{ { "None", "Use default font", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=NO,font8x14=NO,font8x16=NO" },
{ "IBM 437", "English", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
{ "IBM 850", "Western Europe, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
{ "IBM 865", "Norwegian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
{ "IBM 866", "Russian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866-8x16" },
{ "ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
{ "KOI8-R", "Russian, KOI8-R encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=koi8-r-8x8,font8x14=koi8-r-8x14,font8x16=koi8-r-8x16" },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.83 1996/11/04 12:56:33 jkh Exp $
* $Id: sysinstall.h,v 1.84 1996/11/04 17:42:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -323,9 +323,11 @@ extern DMenu MenuMediaTape; /* Tape media menu */
extern DMenu MenuNetworkDevice; /* Network device menu */
extern DMenu MenuNTP; /* NTP time server menu */
extern DMenu MenuSyscons; /* System console configuration menu */
extern DMenu MenuSysconsFont; /* System console font configuration menu */
extern DMenu MenuSysconsKeymap; /* System console keymap configuration menu */
extern DMenu MenuSysconsKeyrate; /* System console keyrate configuration menu */
extern DMenu MenuSysconsSaver; /* System console saver configuration menu */
extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu */
extern DMenu MenuNetworking; /* Network configuration menu */
extern DMenu MenuInstallCustom; /* Custom Installation menu */
extern DMenu MenuDistributions; /* Distribution menu */
@ -380,6 +382,7 @@ extern int configSamba(dialogMenuItem *self);
extern int configPCNFSD(dialogMenuItem *self);
extern int configNFSServer(dialogMenuItem *self);
extern int configNovell(dialogMenuItem *self);
extern int configWriteSysconfig(dialogMenuItem *self);
/* crc.c */
extern int crc(int, unsigned long *, unsigned long *);
@ -430,6 +433,7 @@ extern int dmenuSystemCommand(dialogMenuItem *tmp);
extern int dmenuSystemCommandBox(dialogMenuItem *tmp);
extern int dmenuExit(dialogMenuItem *tmp);
extern int dmenuSetVariable(dialogMenuItem *tmp);
extern int dmenuSetVariables(dialogMenuItem *tmp);
extern int dmenuToggleVariable(dialogMenuItem *tmp);
extern int dmenuSetFlag(dialogMenuItem *tmp);
extern int dmenuSetValue(dialogMenuItem *tmp);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.52 1996/11/04 12:56:17 jkh Exp $
* $Id: config.c,v 1.53 1996/11/04 17:42:04 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -335,13 +335,8 @@ configSaver(dialogMenuItem *self)
int
configSaverTimeout(dialogMenuItem *self)
{
if (variable_get(VAR_BLANKTIME)) {
variable_unset(VAR_BLANKTIME);
return DITEM_SUCCESS | DITEM_REDRAW;
}
else
return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver")
? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE;
return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ?
DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE;
}
int
@ -380,7 +375,7 @@ configResolv(void)
FILE *fp;
char *cp, *dp, *hp;
if (!RunningAsInit && file_readable("/etc/resolv.conf"))
if (!RunningAsInit || file_readable("/etc/resolv.conf"))
return;
if (Mkdir("/etc")) {

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: dmenu.c,v 1.24 1996/08/01 10:58:50 jkh Exp $
* $Id: dmenu.c,v 1.25 1996/08/03 10:10:52 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -92,6 +92,22 @@ dmenuSetVariable(dialogMenuItem *tmp)
return DITEM_SUCCESS;
}
int
dmenuSetVariables(dialogMenuItem *tmp)
{
char *cp1, *cp2;
char *copy = strdup((char *)tmp->data);
for (cp1 = copy; cp1 != NULL;) {
cp2 = index(cp1, ',');
if (cp2 != NULL) *cp2++ = '\0';
variable_set(cp1);
cp1 = cp2;
}
free(copy);
return DITEM_SUCCESS;
}
int
dmenuToggleVariable(dialogMenuItem *tmp)
{
@ -139,7 +155,7 @@ dmenuFlagCheck(dialogMenuItem *item)
int
dmenuVarCheck(dialogMenuItem *item)
{
char *w, *cp, *cp2, tmp[256];
char *w, *cp, *cp2, *cp3, tmp[256];
w = (char *)item->aux;
if (!w)
@ -149,6 +165,8 @@ dmenuVarCheck(dialogMenuItem *item)
strncpy(tmp, w, 256);
if ((cp = index(tmp, '=')) != NULL) {
*(cp++) = '\0';
if ((cp3 = index(cp, ',')) != NULL)
*cp3 = '\0';
cp2 = getenv(tmp);
if (cp2)
return !strcmp(cp, cp2);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.91 1996/11/04 17:42:14 jkh Exp $
* $Id: menus.c,v 1.92 1996/11/06 19:15:30 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -261,9 +261,11 @@ DMenu MenuIndex = {
{ "Router", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router" },
{ "Samba", "Configure Samba for LanManager access.", dmenuVarCheck, configSamba, NULL, "samba" },
{ "Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
{ "Syscons, Font", "The console screen font.", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
{ "Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ "Syscons, Keyrate", "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ "Syscons, Saver", "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
{ "Syscons, Screenmap", "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ "Time Zone", "Set the system's time zone.", NULL, dmenuSystemCommand, NULL, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup" },
{ "Upgrade", "Upgrade an existing system.", NULL, installUpgrade },
{ "Usage", "Quick start - How to use this menu system.", NULL, dmenuDisplayFile, NULL, "usage" },
@ -1148,9 +1150,11 @@ your preference.\n\n\
When you are done setting configuration options, select Cancel.",
"Configure your system console settings",
NULL,
{ { "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ { "Font", "Choose an alternate screen font", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
{ "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
{ "Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
{ "Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
{ "Screenmap", "Choose an alternate screenmap", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
{ "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
{ NULL } },
};
@ -1211,6 +1215,60 @@ probably enable one of these screen savers to prevent phosphor burn-in.",
{ "Star", "A \"twinkling stars\" effect",
dmenuVarCheck, configSaver, NULL, "saver=star" },
{ "Timeout", "Set the screen saver timeout interval",
dmenuVarCheck, configSaverTimeout, NULL, "blanktime" },
NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
DMenu MenuSysconsScrnmap = {
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Screenmap",
"Unless you load a specific font, most PC hardware defaults to\n"
"displaying characters in the IBM 437 character set. However,\n"
"in the Unix world, this character set is very rarely used. Most\n"
"Western European countries, for example, prefer ISO 8859-1.\n"
"American users won't notice the difference since the bottom half\n"
"of all these character sets is ANSI anyway.\n"
"If your hardware is capable of downloading a new display font,\n"
"you should probably choose that option. However, for hardware\n"
"where this is not possible (e.g. monochrome adapters), a screen\n"
"map will give you the best approximation that your hardware can\n"
"display at all.",
"Choose a screen map",
NULL,
{ { "None", "No screenmap, use default font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
{ "KOI8-R to IBM866", "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
{ "ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
{ NULL } },
};
DMenu MenuSysconsFont = {
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Font",
"Most PC hardware defaults to displaying characters in the\n"
"IBM 437 character set. However, in the Unix world, this\n"
"character set is very rarely used. Most Western European\n"
"countries, for example, prefer ISO 8859-1.\n"
"American users won't notice the difference since the bottom half\n"
"of all these charactersets is ANSI anyway. However, they might\n"
"want to load a font anyway to use the 30- or 50-line displays.\n"
"If your hardware is capable of downloading a new display font,\n"
"you can select the appropriate font below.",
"Choose a font",
NULL,
{ { "None", "Use default font", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=NO,font8x14=NO,font8x16=NO" },
{ "IBM 437", "English", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
{ "IBM 850", "Western Europe, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
{ "IBM 865", "Norwegian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
{ "IBM 866", "Russian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866-8x16" },
{ "ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
{ "KOI8-R", "Russian, KOI8-R encoding", dmenuVarCheck, dmenuSetVariables, NULL,
"font8x8=koi8-r-8x8,font8x14=koi8-r-8x14,font8x16=koi8-r-8x16" },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: options.c,v 1.43 1996/10/01 12:13:22 jkh Exp $
* $Id: options.c,v 1.44 1996/10/02 01:30:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -93,6 +93,31 @@ mediaCheck(Option opt)
return "<not yet set>";
}
static char *
consoleCheck(Option opt)
{
static char opts[40];
char *cp;
opts[0] = '\0';
cp = variable_get("saver");
sprintf(&opts[strlen(opts)], "%s/", cp ?: "std");
cp = variable_get("scrnmap");
sprintf(&opts[strlen(opts)], "%s/", cp ?: "std");
cp = variable_get("font8x8");
sprintf(&opts[strlen(opts)], "%s", cp ?: "std");
return opts;
}
static int
consoleGetType(dialogMenuItem *self)
{
int i;
i = dmenuOpenSimple(&MenuSyscons, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
return i | DITEM_RECREATE;
}
#define TAPE_PROMPT "Please enter the tape block size in 512 byte blocks:"
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"none\" for a generic release install:"
#define BPKG_PROMPT "Please specify the name of the HTML browser package:"
@ -128,6 +153,8 @@ static Option Options[] = {
OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
{ "Media Type", "The current installation media type.",
OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck },
{ "Console Config", "Keyboard and font configuration.",
OPT_IS_FUNC, consoleGetType, "System console", consoleCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
{ "Use Defaults", "Reset all values to startup defaults",

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.83 1996/11/04 12:56:33 jkh Exp $
* $Id: sysinstall.h,v 1.84 1996/11/04 17:42:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -323,9 +323,11 @@ extern DMenu MenuMediaTape; /* Tape media menu */
extern DMenu MenuNetworkDevice; /* Network device menu */
extern DMenu MenuNTP; /* NTP time server menu */
extern DMenu MenuSyscons; /* System console configuration menu */
extern DMenu MenuSysconsFont; /* System console font configuration menu */
extern DMenu MenuSysconsKeymap; /* System console keymap configuration menu */
extern DMenu MenuSysconsKeyrate; /* System console keyrate configuration menu */
extern DMenu MenuSysconsSaver; /* System console saver configuration menu */
extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu */
extern DMenu MenuNetworking; /* Network configuration menu */
extern DMenu MenuInstallCustom; /* Custom Installation menu */
extern DMenu MenuDistributions; /* Distribution menu */
@ -380,6 +382,7 @@ extern int configSamba(dialogMenuItem *self);
extern int configPCNFSD(dialogMenuItem *self);
extern int configNFSServer(dialogMenuItem *self);
extern int configNovell(dialogMenuItem *self);
extern int configWriteSysconfig(dialogMenuItem *self);
/* crc.c */
extern int crc(int, unsigned long *, unsigned long *);
@ -430,6 +433,7 @@ extern int dmenuSystemCommand(dialogMenuItem *tmp);
extern int dmenuSystemCommandBox(dialogMenuItem *tmp);
extern int dmenuExit(dialogMenuItem *tmp);
extern int dmenuSetVariable(dialogMenuItem *tmp);
extern int dmenuSetVariables(dialogMenuItem *tmp);
extern int dmenuToggleVariable(dialogMenuItem *tmp);
extern int dmenuSetFlag(dialogMenuItem *tmp);
extern int dmenuSetValue(dialogMenuItem *tmp);

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.47 1996/10/05 12:16:49 jkh Exp $
* $Id: tcpip.c,v 1.48 1996/10/05 16:33:04 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -489,6 +489,7 @@ tcpOpenDialog(Device *devp)
if (ipaddr[0])
variable_set2(VAR_IPADDR, ipaddr);
restorescr(save);
configResolv(); /* XXX this will do it on the MFS copy XXX */
return DITEM_SUCCESS;
}
restorescr(save);
@ -546,6 +547,5 @@ int
tcpMenuSelect(dialogMenuItem *self)
{
(void)tcpDeviceSelect();
configResolv();
return DITEM_SUCCESS | DITEM_RECREATE | DITEM_RESTORE;
}