summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-02 01:03:55 +0000
committerjkh <jkh@FreeBSD.org>1996-07-02 01:03:55 +0000
commit0b35a3052f560b66a1a6b9a802eefbac4787de8c (patch)
treeae36131c09377afa0eedda7cb96ed5b08b6ddf8f
parent911873413ded35d32e63a68d50af02c3fcc5982c (diff)
downloadFreeBSD-src-0b35a3052f560b66a1a6b9a802eefbac4787de8c.zip
FreeBSD-src-0b35a3052f560b66a1a6b9a802eefbac4787de8c.tar.gz
Make it plainer how to exit.
-rw-r--r--release/sysinstall/disks.c6
-rw-r--r--release/sysinstall/dist.c10
-rw-r--r--release/sysinstall/dmenu.c22
-rw-r--r--release/sysinstall/doc.c4
-rw-r--r--release/sysinstall/floppy.c4
-rw-r--r--release/sysinstall/install.c16
-rw-r--r--release/sysinstall/installUpgrade.c8
-rw-r--r--release/sysinstall/main.c4
-rw-r--r--release/sysinstall/media.c14
-rw-r--r--release/sysinstall/menus.c11
-rw-r--r--release/sysinstall/samba.c4
-rw-r--r--release/sysinstall/sysinstall.h6
-rw-r--r--release/sysinstall/tcpip.c4
-rw-r--r--usr.sbin/sade/disks.c6
-rw-r--r--usr.sbin/sade/dmenu.c22
-rw-r--r--usr.sbin/sade/install.c16
-rw-r--r--usr.sbin/sade/main.c4
-rw-r--r--usr.sbin/sade/menus.c11
-rw-r--r--usr.sbin/sade/sade.h6
-rw-r--r--usr.sbin/sysinstall/disks.c6
-rw-r--r--usr.sbin/sysinstall/dist.c10
-rw-r--r--usr.sbin/sysinstall/dmenu.c22
-rw-r--r--usr.sbin/sysinstall/doc.c4
-rw-r--r--usr.sbin/sysinstall/floppy.c4
-rw-r--r--usr.sbin/sysinstall/install.c16
-rw-r--r--usr.sbin/sysinstall/installUpgrade.c8
-rw-r--r--usr.sbin/sysinstall/main.c4
-rw-r--r--usr.sbin/sysinstall/media.c14
-rw-r--r--usr.sbin/sysinstall/menus.c11
-rw-r--r--usr.sbin/sysinstall/sysinstall.h6
-rw-r--r--usr.sbin/sysinstall/tcpip.c4
31 files changed, 151 insertions, 136 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index cf8ee98..c8eebd3 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.51 1996/06/11 13:07:57 jkh Exp $
+ * $Id: disks.c,v 1.52 1996/06/25 18:41:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -139,7 +139,7 @@ getBootMgr(char *dname)
/* Figure out what kind of MBR the user wants */
sprintf(str, "Install Boot Manager for drive %s?", dname);
MenuMBRType.title = str;
- i = dmenuOpenSimple(&MenuMBRType);
+ i = dmenuOpenSimple(&MenuMBRType, FALSE);
}
else {
if (!strncmp(cp, "boot", 4))
@@ -494,7 +494,7 @@ diskPartitionEditor(dialogMenuItem *self)
i = DITEM_FAILURE;
}
else {
- i = dmenuOpenSimple(menu) ? DITEM_SUCCESS : DITEM_FAILURE;
+ i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
free(menu);
}
i = i | DITEM_RESTORE | DITEM_RECREATE;
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index 04d98eb..71de1d0 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.58 1996/06/12 14:02:03 jkh Exp $
+ * $Id: dist.c,v 1.59 1996/06/13 13:45:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -246,7 +246,7 @@ distSetDES(dialogMenuItem *self)
{
int i = DITEM_SUCCESS;
- if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (dmenuOpenSimple(&MenuDESDistributions, FALSE)) {
if (DESDists) {
if (DESDists & DIST_DES_KERBEROS)
DESDists |= DIST_DES_DES;
@@ -276,7 +276,7 @@ distMaybeSetDES(dialogMenuItem *self)
"DES distribution from the U.S. server then switch your media type to\n"
"point to an international FTP server, using the Custom installation\n"
"option to select and extract the DES distribution in a second pass.")) {
- if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (dmenuOpenSimple(&MenuDESDistributions, FALSE)) {
if (DESDists) {
if (DESDists & DIST_DES_KERBEROS)
DESDists |= DIST_DES_DES;
@@ -295,7 +295,7 @@ distSetSrc(dialogMenuItem *self)
{
int i = DITEM_SUCCESS;
- if (dmenuOpenSimple(&MenuSrcDistributions)) {
+ if (dmenuOpenSimple(&MenuSrcDistributions, FALSE)) {
if (SrcDists) {
Dists |= DIST_SRC;
msgDebug("SetSrc Masks: Srcs: %0x, Dists: %0x\n", SrcDists, Dists);
@@ -311,7 +311,7 @@ distSetXF86(dialogMenuItem *self)
{
int i = DITEM_SUCCESS;
- if (dmenuOpenSimple(&MenuXF86Select)) {
+ if (dmenuOpenSimple(&MenuXF86Select, FALSE)) {
if (XF86ServerDists)
XF86Dists |= DIST_XF86_SERVER;
if (XF86FontDists)
diff --git a/release/sysinstall/dmenu.c b/release/sysinstall/dmenu.c
index ee2b2e5..57cd535 100644
--- a/release/sysinstall/dmenu.c
+++ b/release/sysinstall/dmenu.c
@@ -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.19 1996/04/28 00:37:31 jkh Exp $
+ * $Id: dmenu.c,v 1.20 1996/06/12 14:02:05 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -51,7 +51,7 @@ dmenuDisplayFile(dialogMenuItem *tmp)
int
dmenuSubmenu(dialogMenuItem *tmp)
{
- return (dmenuOpenSimple((DMenu *)(tmp->data)) ? DITEM_SUCCESS : DITEM_FAILURE) |
+ return (dmenuOpenSimple((DMenu *)(tmp->data), FALSE) ? DITEM_SUCCESS : DITEM_FAILURE) |
DITEM_RESTORE | DITEM_RECREATE;
}
@@ -121,12 +121,12 @@ dmenuSetValue(dialogMenuItem *tmp)
/* Traverse menu but give user no control over positioning */
Boolean
-dmenuOpenSimple(DMenu *menu)
+dmenuOpenSimple(DMenu *menu, Boolean buttons)
{
int choice, scroll, curr, max;
choice = scroll = curr = max = 0;
- return dmenuOpen(menu, &choice, &scroll, &curr, &max);
+ return dmenuOpen(menu, &choice, &scroll, &curr, &max, buttons);
}
/* Work functions for the state hook */
@@ -180,12 +180,16 @@ menu_height(DMenu *menu, int n)
/* Traverse over an internal menu */
Boolean
-dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
+dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons)
{
int n, rval = 0;
+ dialogMenuItem *items;
+ items = menu->items;
+ if (buttons)
+ items += 2;
/* Count up all the items */
- for (n = 0; menu->items[n].title; n++);
+ for (n = 0; items[n].title; n++);
while (1) {
char buf[FILENAME_MAX];
@@ -198,15 +202,15 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
dialog_clear();
if (menu->type & DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL, choice, scroll);
+ menu_height(menu, n), -n, items, (char *)buttons, choice, scroll);
else if (menu->type & DMENU_RADIO_TYPE)
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL);
+ menu_height(menu, n), -n, items, (char *)buttons);
else if (menu->type & DMENU_CHECKLIST_TYPE)
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL);
+ menu_height(menu, n), -n, items, (char *)buttons);
else
msgFatal("Menu: `%s' is of an unknown type\n", menu->title);
clearok(stdscr, TRUE);
diff --git a/release/sysinstall/doc.c b/release/sysinstall/doc.c
index 68e9e71..9f85935 100644
--- a/release/sysinstall/doc.c
+++ b/release/sysinstall/doc.c
@@ -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: doc.c,v 1.15 1996/04/28 03:26:52 jkh Exp $
+ * $Id: doc.c,v 1.16 1996/05/16 11:47:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -75,7 +75,7 @@ docBrowser(dialogMenuItem *self)
}
/* Run browser on the appropriate doc */
- if (dmenuOpenSimple(&MenuHTMLDoc))
+ if (dmenuOpenSimple(&MenuHTMLDoc, FALSE))
return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE;
else
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
diff --git a/release/sysinstall/floppy.c b/release/sysinstall/floppy.c
index e3cb41e..a8dc384 100644
--- a/release/sysinstall/floppy.c
+++ b/release/sysinstall/floppy.c
@@ -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: floppy.c,v 1.11 1996/04/23 01:29:20 jkh Exp $
+ * $Id: floppy.c,v 1.12 1996/05/09 09:42:05 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -95,7 +95,7 @@ getRootFloppy(void)
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook, NULL);
menu->title = "Please insert the ROOT floppy";
- ret = dmenuOpenSimple(menu);
+ ret = dmenuOpenSimple(menu, FALSE);
restorescr(save);
if (!ret)
return -1;
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 5cf76f6..9ddd97f 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.103 1996/06/25 18:41:09 jkh Exp $
+ * $Id: install.c,v 1.104 1996/06/29 03:49:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -298,13 +298,13 @@ installExpress(dialogMenuItem *self)
if (!Dists) {
dialog_clear();
- if (!dmenuOpenSimple(&MenuDistributions) && !Dists)
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (!mediaDevice) {
dialog_clear();
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -356,7 +356,7 @@ installNovice(dialogMenuItem *self)
"X11 developer oriented configurations. You can also select a custom set\n"
"of distributions if none of the provided ones are suitable.");
while (1) {
- if (!dmenuOpenSimple(&MenuDistributions) && !Dists)
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
@@ -366,7 +366,7 @@ installNovice(dialogMenuItem *self)
if (!mediaDevice) {
dialog_clear();
msgConfirm("Finally, you must specify an installation medium.");
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -423,7 +423,7 @@ installNovice(dialogMenuItem *self)
if (!msgYesNo("Would you like to customize your system console settings?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuSyscons);
+ dmenuOpenSimple(&MenuSyscons, FALSE);
restorescr(w);
}
@@ -438,7 +438,7 @@ installNovice(dialogMenuItem *self)
if (!msgYesNo("Does this system have a mouse attached to it?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuMouse);
+ dmenuOpenSimple(&MenuMouse, FALSE);
restorescr(w);
}
@@ -554,7 +554,7 @@ installConfigure(void)
"any last options?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuConfigure);
+ dmenuOpenSimple(&MenuConfigure, FALSE);
restorescr(w);
}
}
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c
index 30bb6f4..d686080 100644
--- a/release/sysinstall/installUpgrade.c
+++ b/release/sysinstall/installUpgrade.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installUpgrade.c,v 1.25 1996/05/16 11:47:32 jkh Exp $
+ * $Id: installUpgrade.c,v 1.26 1996/05/29 01:35:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -197,7 +197,7 @@ installUpgrade(dialogMenuItem *self)
"been selected. In the next screen, we'll go to the Distributions menu\n"
"to select those portions of 2.1 you wish to install on top of your 2.0.5\n"
"system.");
- if (!dmenuOpenSimple(&MenuDistributions))
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE))
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -207,7 +207,7 @@ installUpgrade(dialogMenuItem *self)
"This one is pretty vital to a successful 2.1 upgrade. Are you SURE you don't\n"
"want to select the bin distribution? Chose _No_ to bring up the Distributions\n"
"menu.")) {
- (void)dmenuOpenSimple(&MenuDistributions);
+ (void)dmenuOpenSimple(&MenuDistributions, FALSE);
}
}
@@ -217,7 +217,7 @@ installUpgrade(dialogMenuItem *self)
if (!mediaDevice) {
msgConfirm("Now you must specify an installation medium for the upgrade.");
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
diff --git a/release/sysinstall/main.c b/release/sysinstall/main.c
index c74a867..8c20589 100644
--- a/release/sysinstall/main.c
+++ b/release/sysinstall/main.c
@@ -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: main.c,v 1.21 1996/06/08 07:02:20 jkh Exp $
+ * $Id: main.c,v 1.22 1996/06/26 09:09:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -112,7 +112,7 @@ main(int argc, char **argv)
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;
- dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
+ dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE);
if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? The system will reboot\n"
"(be sure to remove any floppies from the drives)."))
break;
diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c
index 81adf4f..95fede1 100644
--- a/release/sysinstall/media.c
+++ b/release/sysinstall/media.c
@@ -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: media.c,v 1.42 1996/06/17 23:04:22 jkh Exp $
+ * $Id: media.c,v 1.43 1996/06/25 04:28:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -105,7 +105,7 @@ mediaSetCDROM(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaCDROM, DEVICE_TYPE_CDROM, cdromHook, NULL);
if (!menu)
msgFatal("Unable to create CDROM menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -146,7 +146,7 @@ mediaSetFloppy(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyHook, NULL);
if (!menu)
msgFatal("Unable to create Floppy menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -185,7 +185,7 @@ mediaSetDOS(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook, NULL);
if (!menu)
msgFatal("Unable to create DOS menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -226,7 +226,7 @@ mediaSetTape(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook, NULL);
if (!menu)
msgFatal("Unable to create tape drive menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -261,7 +261,7 @@ mediaSetFTP(dialogMenuItem *self)
extern int FtpPort;
dialog_clear();
- if (!dmenuOpenSimple(&MenuMediaFTP))
+ if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
else
cp = variable_get(VAR_FTP_PATH);
@@ -563,7 +563,7 @@ mediaGetType(dialogMenuItem *self)
{
int i;
- i = dmenuOpenSimple(&MenuMedia) ? DITEM_SUCCESS : DITEM_FAILURE;
+ i = dmenuOpenSimple(&MenuMedia, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
return i | DITEM_RESTORE | DITEM_RECREATE;
}
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 0ee8a9c..b56f013 100644
--- a/release/sysinstall/menus.c
+++ b/release/sysinstall/menus.c
@@ -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.74 1996/06/29 02:22:44 jkh Exp $
+ * $Id: menus.c,v 1.76 1996/06/29 03:43:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -279,14 +279,15 @@ DMenu MenuIndex = {
DMenu MenuInitial = {
DMENU_NORMAL_TYPE,
"Welcome to FreeBSD!", /* title */
- "This is the main menu of the FreeBSD installation system. Please\n"
+ "This is the main menu of the FreeBSD installation system. Please\n" /* prompt */
"select one of the options below by using the arrow keys or typing the\n"
"first character of the option name you're interested in. Invoke an\n"
- "option by pressing [ENTER]. Exit the installation by selecting\n"
- "Cancel [TAB-ENTER].", /* prompt */
+ "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.",
"Press F1 for Installation Guide", /* help line */
"install", /* help file */
- { { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
+ { { "Select" },
+ { "Exit Install", NULL, NULL, dmenuExit },
+ { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
{ "2 Doc", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
{ "3 Options", "Go to the options editor", NULL, optionsEditor },
{ "4 Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
diff --git a/release/sysinstall/samba.c b/release/sysinstall/samba.c
index 8b803f8..a254678 100644
--- a/release/sysinstall/samba.c
+++ b/release/sysinstall/samba.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: samba.c,v 1.3 1996/04/29 18:06:08 jkh Exp $
+ * $Id: samba.c,v 1.4 1996/06/15 16:09:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard & Coranth Gryphon. All rights reserved.
@@ -60,7 +60,7 @@ configSamba(dialogMenuItem *self)
int i = DITEM_SUCCESS;
WINDOW *w = savescr();
- if (!dmenuOpenSimple(&MenuSamba))
+ if (!dmenuOpenSimple(&MenuSamba, FALSE))
i = DITEM_FAILURE;
else if (DITEM_STATUS(package_add("samba-1.9.15p8")) != DITEM_SUCCESS)
i = DITEM_FAILURE;
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 81a3831..ae01247 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -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.65 1996/06/29 02:22:48 jkh Exp $
+ * $Id: sysinstall.h,v 1.67 1996/06/29 03:43:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -423,8 +423,8 @@ extern int dmenuSetVariable(dialogMenuItem *tmp);
extern int dmenuToggleVariable(dialogMenuItem *tmp);
extern int dmenuSetFlag(dialogMenuItem *tmp);
extern int dmenuSetValue(dialogMenuItem *tmp);
-extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
-extern Boolean dmenuOpenSimple(DMenu *menu);
+extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
+extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
extern int dmenuVarCheck(dialogMenuItem *item);
extern int dmenuFlagCheck(dialogMenuItem *item);
extern int dmenuRadioCheck(dialogMenuItem *item);
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index 7e4f073..8b53324 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -1,5 +1,5 @@
/*
- * $Id: tcpip.c,v 1.41 1996/06/13 17:07:41 jkh Exp $
+ * $Id: tcpip.c,v 1.42 1996/06/17 23:04:24 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@@ -556,7 +556,7 @@ tcpDeviceSelect(void)
menu = deviceCreateMenu(&MenuNetworkDevice, DEVICE_TYPE_NETWORK, netHook, NULL);
if (!menu)
msgFatal("Unable to create network device menu! Argh!");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
}
return status;
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index cf8ee98..c8eebd3 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.51 1996/06/11 13:07:57 jkh Exp $
+ * $Id: disks.c,v 1.52 1996/06/25 18:41:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -139,7 +139,7 @@ getBootMgr(char *dname)
/* Figure out what kind of MBR the user wants */
sprintf(str, "Install Boot Manager for drive %s?", dname);
MenuMBRType.title = str;
- i = dmenuOpenSimple(&MenuMBRType);
+ i = dmenuOpenSimple(&MenuMBRType, FALSE);
}
else {
if (!strncmp(cp, "boot", 4))
@@ -494,7 +494,7 @@ diskPartitionEditor(dialogMenuItem *self)
i = DITEM_FAILURE;
}
else {
- i = dmenuOpenSimple(menu) ? DITEM_SUCCESS : DITEM_FAILURE;
+ i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
free(menu);
}
i = i | DITEM_RESTORE | DITEM_RECREATE;
diff --git a/usr.sbin/sade/dmenu.c b/usr.sbin/sade/dmenu.c
index ee2b2e5..57cd535 100644
--- a/usr.sbin/sade/dmenu.c
+++ b/usr.sbin/sade/dmenu.c
@@ -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.19 1996/04/28 00:37:31 jkh Exp $
+ * $Id: dmenu.c,v 1.20 1996/06/12 14:02:05 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -51,7 +51,7 @@ dmenuDisplayFile(dialogMenuItem *tmp)
int
dmenuSubmenu(dialogMenuItem *tmp)
{
- return (dmenuOpenSimple((DMenu *)(tmp->data)) ? DITEM_SUCCESS : DITEM_FAILURE) |
+ return (dmenuOpenSimple((DMenu *)(tmp->data), FALSE) ? DITEM_SUCCESS : DITEM_FAILURE) |
DITEM_RESTORE | DITEM_RECREATE;
}
@@ -121,12 +121,12 @@ dmenuSetValue(dialogMenuItem *tmp)
/* Traverse menu but give user no control over positioning */
Boolean
-dmenuOpenSimple(DMenu *menu)
+dmenuOpenSimple(DMenu *menu, Boolean buttons)
{
int choice, scroll, curr, max;
choice = scroll = curr = max = 0;
- return dmenuOpen(menu, &choice, &scroll, &curr, &max);
+ return dmenuOpen(menu, &choice, &scroll, &curr, &max, buttons);
}
/* Work functions for the state hook */
@@ -180,12 +180,16 @@ menu_height(DMenu *menu, int n)
/* Traverse over an internal menu */
Boolean
-dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
+dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons)
{
int n, rval = 0;
+ dialogMenuItem *items;
+ items = menu->items;
+ if (buttons)
+ items += 2;
/* Count up all the items */
- for (n = 0; menu->items[n].title; n++);
+ for (n = 0; items[n].title; n++);
while (1) {
char buf[FILENAME_MAX];
@@ -198,15 +202,15 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
dialog_clear();
if (menu->type & DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL, choice, scroll);
+ menu_height(menu, n), -n, items, (char *)buttons, choice, scroll);
else if (menu->type & DMENU_RADIO_TYPE)
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL);
+ menu_height(menu, n), -n, items, (char *)buttons);
else if (menu->type & DMENU_CHECKLIST_TYPE)
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL);
+ menu_height(menu, n), -n, items, (char *)buttons);
else
msgFatal("Menu: `%s' is of an unknown type\n", menu->title);
clearok(stdscr, TRUE);
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 5cf76f6..9ddd97f 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.103 1996/06/25 18:41:09 jkh Exp $
+ * $Id: install.c,v 1.104 1996/06/29 03:49:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -298,13 +298,13 @@ installExpress(dialogMenuItem *self)
if (!Dists) {
dialog_clear();
- if (!dmenuOpenSimple(&MenuDistributions) && !Dists)
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (!mediaDevice) {
dialog_clear();
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -356,7 +356,7 @@ installNovice(dialogMenuItem *self)
"X11 developer oriented configurations. You can also select a custom set\n"
"of distributions if none of the provided ones are suitable.");
while (1) {
- if (!dmenuOpenSimple(&MenuDistributions) && !Dists)
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
@@ -366,7 +366,7 @@ installNovice(dialogMenuItem *self)
if (!mediaDevice) {
dialog_clear();
msgConfirm("Finally, you must specify an installation medium.");
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -423,7 +423,7 @@ installNovice(dialogMenuItem *self)
if (!msgYesNo("Would you like to customize your system console settings?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuSyscons);
+ dmenuOpenSimple(&MenuSyscons, FALSE);
restorescr(w);
}
@@ -438,7 +438,7 @@ installNovice(dialogMenuItem *self)
if (!msgYesNo("Does this system have a mouse attached to it?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuMouse);
+ dmenuOpenSimple(&MenuMouse, FALSE);
restorescr(w);
}
@@ -554,7 +554,7 @@ installConfigure(void)
"any last options?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuConfigure);
+ dmenuOpenSimple(&MenuConfigure, FALSE);
restorescr(w);
}
}
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index c74a867..8c20589 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -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: main.c,v 1.21 1996/06/08 07:02:20 jkh Exp $
+ * $Id: main.c,v 1.22 1996/06/26 09:09:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -112,7 +112,7 @@ main(int argc, char **argv)
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;
- dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
+ dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE);
if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? The system will reboot\n"
"(be sure to remove any floppies from the drives)."))
break;
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 0ee8a9c..b56f013 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -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.74 1996/06/29 02:22:44 jkh Exp $
+ * $Id: menus.c,v 1.76 1996/06/29 03:43:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -279,14 +279,15 @@ DMenu MenuIndex = {
DMenu MenuInitial = {
DMENU_NORMAL_TYPE,
"Welcome to FreeBSD!", /* title */
- "This is the main menu of the FreeBSD installation system. Please\n"
+ "This is the main menu of the FreeBSD installation system. Please\n" /* prompt */
"select one of the options below by using the arrow keys or typing the\n"
"first character of the option name you're interested in. Invoke an\n"
- "option by pressing [ENTER]. Exit the installation by selecting\n"
- "Cancel [TAB-ENTER].", /* prompt */
+ "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.",
"Press F1 for Installation Guide", /* help line */
"install", /* help file */
- { { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
+ { { "Select" },
+ { "Exit Install", NULL, NULL, dmenuExit },
+ { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
{ "2 Doc", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
{ "3 Options", "Go to the options editor", NULL, optionsEditor },
{ "4 Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 81a3831..ae01247 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -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.65 1996/06/29 02:22:48 jkh Exp $
+ * $Id: sysinstall.h,v 1.67 1996/06/29 03:43:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -423,8 +423,8 @@ extern int dmenuSetVariable(dialogMenuItem *tmp);
extern int dmenuToggleVariable(dialogMenuItem *tmp);
extern int dmenuSetFlag(dialogMenuItem *tmp);
extern int dmenuSetValue(dialogMenuItem *tmp);
-extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
-extern Boolean dmenuOpenSimple(DMenu *menu);
+extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
+extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
extern int dmenuVarCheck(dialogMenuItem *item);
extern int dmenuFlagCheck(dialogMenuItem *item);
extern int dmenuRadioCheck(dialogMenuItem *item);
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index cf8ee98..c8eebd3 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.51 1996/06/11 13:07:57 jkh Exp $
+ * $Id: disks.c,v 1.52 1996/06/25 18:41:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -139,7 +139,7 @@ getBootMgr(char *dname)
/* Figure out what kind of MBR the user wants */
sprintf(str, "Install Boot Manager for drive %s?", dname);
MenuMBRType.title = str;
- i = dmenuOpenSimple(&MenuMBRType);
+ i = dmenuOpenSimple(&MenuMBRType, FALSE);
}
else {
if (!strncmp(cp, "boot", 4))
@@ -494,7 +494,7 @@ diskPartitionEditor(dialogMenuItem *self)
i = DITEM_FAILURE;
}
else {
- i = dmenuOpenSimple(menu) ? DITEM_SUCCESS : DITEM_FAILURE;
+ i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
free(menu);
}
i = i | DITEM_RESTORE | DITEM_RECREATE;
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 04d98eb..71de1d0 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.58 1996/06/12 14:02:03 jkh Exp $
+ * $Id: dist.c,v 1.59 1996/06/13 13:45:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -246,7 +246,7 @@ distSetDES(dialogMenuItem *self)
{
int i = DITEM_SUCCESS;
- if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (dmenuOpenSimple(&MenuDESDistributions, FALSE)) {
if (DESDists) {
if (DESDists & DIST_DES_KERBEROS)
DESDists |= DIST_DES_DES;
@@ -276,7 +276,7 @@ distMaybeSetDES(dialogMenuItem *self)
"DES distribution from the U.S. server then switch your media type to\n"
"point to an international FTP server, using the Custom installation\n"
"option to select and extract the DES distribution in a second pass.")) {
- if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (dmenuOpenSimple(&MenuDESDistributions, FALSE)) {
if (DESDists) {
if (DESDists & DIST_DES_KERBEROS)
DESDists |= DIST_DES_DES;
@@ -295,7 +295,7 @@ distSetSrc(dialogMenuItem *self)
{
int i = DITEM_SUCCESS;
- if (dmenuOpenSimple(&MenuSrcDistributions)) {
+ if (dmenuOpenSimple(&MenuSrcDistributions, FALSE)) {
if (SrcDists) {
Dists |= DIST_SRC;
msgDebug("SetSrc Masks: Srcs: %0x, Dists: %0x\n", SrcDists, Dists);
@@ -311,7 +311,7 @@ distSetXF86(dialogMenuItem *self)
{
int i = DITEM_SUCCESS;
- if (dmenuOpenSimple(&MenuXF86Select)) {
+ if (dmenuOpenSimple(&MenuXF86Select, FALSE)) {
if (XF86ServerDists)
XF86Dists |= DIST_XF86_SERVER;
if (XF86FontDists)
diff --git a/usr.sbin/sysinstall/dmenu.c b/usr.sbin/sysinstall/dmenu.c
index ee2b2e5..57cd535 100644
--- a/usr.sbin/sysinstall/dmenu.c
+++ b/usr.sbin/sysinstall/dmenu.c
@@ -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.19 1996/04/28 00:37:31 jkh Exp $
+ * $Id: dmenu.c,v 1.20 1996/06/12 14:02:05 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -51,7 +51,7 @@ dmenuDisplayFile(dialogMenuItem *tmp)
int
dmenuSubmenu(dialogMenuItem *tmp)
{
- return (dmenuOpenSimple((DMenu *)(tmp->data)) ? DITEM_SUCCESS : DITEM_FAILURE) |
+ return (dmenuOpenSimple((DMenu *)(tmp->data), FALSE) ? DITEM_SUCCESS : DITEM_FAILURE) |
DITEM_RESTORE | DITEM_RECREATE;
}
@@ -121,12 +121,12 @@ dmenuSetValue(dialogMenuItem *tmp)
/* Traverse menu but give user no control over positioning */
Boolean
-dmenuOpenSimple(DMenu *menu)
+dmenuOpenSimple(DMenu *menu, Boolean buttons)
{
int choice, scroll, curr, max;
choice = scroll = curr = max = 0;
- return dmenuOpen(menu, &choice, &scroll, &curr, &max);
+ return dmenuOpen(menu, &choice, &scroll, &curr, &max, buttons);
}
/* Work functions for the state hook */
@@ -180,12 +180,16 @@ menu_height(DMenu *menu, int n)
/* Traverse over an internal menu */
Boolean
-dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
+dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons)
{
int n, rval = 0;
+ dialogMenuItem *items;
+ items = menu->items;
+ if (buttons)
+ items += 2;
/* Count up all the items */
- for (n = 0; menu->items[n].title; n++);
+ for (n = 0; items[n].title; n++);
while (1) {
char buf[FILENAME_MAX];
@@ -198,15 +202,15 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
dialog_clear();
if (menu->type & DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL, choice, scroll);
+ menu_height(menu, n), -n, items, (char *)buttons, choice, scroll);
else if (menu->type & DMENU_RADIO_TYPE)
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL);
+ menu_height(menu, n), -n, items, (char *)buttons);
else if (menu->type & DMENU_CHECKLIST_TYPE)
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), -n, menu->items, NULL);
+ menu_height(menu, n), -n, items, (char *)buttons);
else
msgFatal("Menu: `%s' is of an unknown type\n", menu->title);
clearok(stdscr, TRUE);
diff --git a/usr.sbin/sysinstall/doc.c b/usr.sbin/sysinstall/doc.c
index 68e9e71..9f85935 100644
--- a/usr.sbin/sysinstall/doc.c
+++ b/usr.sbin/sysinstall/doc.c
@@ -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: doc.c,v 1.15 1996/04/28 03:26:52 jkh Exp $
+ * $Id: doc.c,v 1.16 1996/05/16 11:47:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -75,7 +75,7 @@ docBrowser(dialogMenuItem *self)
}
/* Run browser on the appropriate doc */
- if (dmenuOpenSimple(&MenuHTMLDoc))
+ if (dmenuOpenSimple(&MenuHTMLDoc, FALSE))
return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE;
else
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
diff --git a/usr.sbin/sysinstall/floppy.c b/usr.sbin/sysinstall/floppy.c
index e3cb41e..a8dc384 100644
--- a/usr.sbin/sysinstall/floppy.c
+++ b/usr.sbin/sysinstall/floppy.c
@@ -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: floppy.c,v 1.11 1996/04/23 01:29:20 jkh Exp $
+ * $Id: floppy.c,v 1.12 1996/05/09 09:42:05 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -95,7 +95,7 @@ getRootFloppy(void)
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook, NULL);
menu->title = "Please insert the ROOT floppy";
- ret = dmenuOpenSimple(menu);
+ ret = dmenuOpenSimple(menu, FALSE);
restorescr(save);
if (!ret)
return -1;
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 5cf76f6..9ddd97f 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.103 1996/06/25 18:41:09 jkh Exp $
+ * $Id: install.c,v 1.104 1996/06/29 03:49:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -298,13 +298,13 @@ installExpress(dialogMenuItem *self)
if (!Dists) {
dialog_clear();
- if (!dmenuOpenSimple(&MenuDistributions) && !Dists)
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (!mediaDevice) {
dialog_clear();
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -356,7 +356,7 @@ installNovice(dialogMenuItem *self)
"X11 developer oriented configurations. You can also select a custom set\n"
"of distributions if none of the provided ones are suitable.");
while (1) {
- if (!dmenuOpenSimple(&MenuDistributions) && !Dists)
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
@@ -366,7 +366,7 @@ installNovice(dialogMenuItem *self)
if (!mediaDevice) {
dialog_clear();
msgConfirm("Finally, you must specify an installation medium.");
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -423,7 +423,7 @@ installNovice(dialogMenuItem *self)
if (!msgYesNo("Would you like to customize your system console settings?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuSyscons);
+ dmenuOpenSimple(&MenuSyscons, FALSE);
restorescr(w);
}
@@ -438,7 +438,7 @@ installNovice(dialogMenuItem *self)
if (!msgYesNo("Does this system have a mouse attached to it?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuMouse);
+ dmenuOpenSimple(&MenuMouse, FALSE);
restorescr(w);
}
@@ -554,7 +554,7 @@ installConfigure(void)
"any last options?")) {
WINDOW *w = savescr();
- dmenuOpenSimple(&MenuConfigure);
+ dmenuOpenSimple(&MenuConfigure, FALSE);
restorescr(w);
}
}
diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c
index 30bb6f4..d686080 100644
--- a/usr.sbin/sysinstall/installUpgrade.c
+++ b/usr.sbin/sysinstall/installUpgrade.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installUpgrade.c,v 1.25 1996/05/16 11:47:32 jkh Exp $
+ * $Id: installUpgrade.c,v 1.26 1996/05/29 01:35:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -197,7 +197,7 @@ installUpgrade(dialogMenuItem *self)
"been selected. In the next screen, we'll go to the Distributions menu\n"
"to select those portions of 2.1 you wish to install on top of your 2.0.5\n"
"system.");
- if (!dmenuOpenSimple(&MenuDistributions))
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE))
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
@@ -207,7 +207,7 @@ installUpgrade(dialogMenuItem *self)
"This one is pretty vital to a successful 2.1 upgrade. Are you SURE you don't\n"
"want to select the bin distribution? Chose _No_ to bring up the Distributions\n"
"menu.")) {
- (void)dmenuOpenSimple(&MenuDistributions);
+ (void)dmenuOpenSimple(&MenuDistributions, FALSE);
}
}
@@ -217,7 +217,7 @@ installUpgrade(dialogMenuItem *self)
if (!mediaDevice) {
msgConfirm("Now you must specify an installation medium for the upgrade.");
- if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index c74a867..8c20589 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.c
@@ -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: main.c,v 1.21 1996/06/08 07:02:20 jkh Exp $
+ * $Id: main.c,v 1.22 1996/06/26 09:09:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -112,7 +112,7 @@ main(int argc, char **argv)
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;
- dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
+ dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE);
if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? The system will reboot\n"
"(be sure to remove any floppies from the drives)."))
break;
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index 81adf4f..95fede1 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/sysinstall/media.c
@@ -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: media.c,v 1.42 1996/06/17 23:04:22 jkh Exp $
+ * $Id: media.c,v 1.43 1996/06/25 04:28:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -105,7 +105,7 @@ mediaSetCDROM(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaCDROM, DEVICE_TYPE_CDROM, cdromHook, NULL);
if (!menu)
msgFatal("Unable to create CDROM menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -146,7 +146,7 @@ mediaSetFloppy(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyHook, NULL);
if (!menu)
msgFatal("Unable to create Floppy menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -185,7 +185,7 @@ mediaSetDOS(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook, NULL);
if (!menu)
msgFatal("Unable to create DOS menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -226,7 +226,7 @@ mediaSetTape(dialogMenuItem *self)
menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook, NULL);
if (!menu)
msgFatal("Unable to create tape drive menu! Something is seriously wrong.");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
if (!status)
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
@@ -261,7 +261,7 @@ mediaSetFTP(dialogMenuItem *self)
extern int FtpPort;
dialog_clear();
- if (!dmenuOpenSimple(&MenuMediaFTP))
+ if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
else
cp = variable_get(VAR_FTP_PATH);
@@ -563,7 +563,7 @@ mediaGetType(dialogMenuItem *self)
{
int i;
- i = dmenuOpenSimple(&MenuMedia) ? DITEM_SUCCESS : DITEM_FAILURE;
+ i = dmenuOpenSimple(&MenuMedia, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
return i | DITEM_RESTORE | DITEM_RECREATE;
}
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 0ee8a9c..b56f013 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -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.74 1996/06/29 02:22:44 jkh Exp $
+ * $Id: menus.c,v 1.76 1996/06/29 03:43:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -279,14 +279,15 @@ DMenu MenuIndex = {
DMenu MenuInitial = {
DMENU_NORMAL_TYPE,
"Welcome to FreeBSD!", /* title */
- "This is the main menu of the FreeBSD installation system. Please\n"
+ "This is the main menu of the FreeBSD installation system. Please\n" /* prompt */
"select one of the options below by using the arrow keys or typing the\n"
"first character of the option name you're interested in. Invoke an\n"
- "option by pressing [ENTER]. Exit the installation by selecting\n"
- "Cancel [TAB-ENTER].", /* prompt */
+ "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.",
"Press F1 for Installation Guide", /* help line */
"install", /* help file */
- { { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
+ { { "Select" },
+ { "Exit Install", NULL, NULL, dmenuExit },
+ { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
{ "2 Doc", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
{ "3 Options", "Go to the options editor", NULL, optionsEditor },
{ "4 Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 81a3831..ae01247 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -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.65 1996/06/29 02:22:48 jkh Exp $
+ * $Id: sysinstall.h,v 1.67 1996/06/29 03:43:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -423,8 +423,8 @@ extern int dmenuSetVariable(dialogMenuItem *tmp);
extern int dmenuToggleVariable(dialogMenuItem *tmp);
extern int dmenuSetFlag(dialogMenuItem *tmp);
extern int dmenuSetValue(dialogMenuItem *tmp);
-extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
-extern Boolean dmenuOpenSimple(DMenu *menu);
+extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
+extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
extern int dmenuVarCheck(dialogMenuItem *item);
extern int dmenuFlagCheck(dialogMenuItem *item);
extern int dmenuRadioCheck(dialogMenuItem *item);
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index 7e4f073..8b53324 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -1,5 +1,5 @@
/*
- * $Id: tcpip.c,v 1.41 1996/06/13 17:07:41 jkh Exp $
+ * $Id: tcpip.c,v 1.42 1996/06/17 23:04:24 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@@ -556,7 +556,7 @@ tcpDeviceSelect(void)
menu = deviceCreateMenu(&MenuNetworkDevice, DEVICE_TYPE_NETWORK, netHook, NULL);
if (!menu)
msgFatal("Unable to create network device menu! Argh!");
- status = dmenuOpenSimple(menu);
+ status = dmenuOpenSimple(menu, FALSE);
free(menu);
}
return status;
OpenPOWER on IntegriCloud