Don't munge keystrokes.

This commit is contained in:
jkh 1996-07-31 09:29:35 +00:00
parent 78821ab874
commit efa3bb0eb3
12 changed files with 81 additions and 60 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: disks.c,v 1.56 1996/07/31 06:20:54 jkh Exp $
* $Id: disks.c,v 1.57 1996/07/31 09:10:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -188,7 +188,9 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
}
key = toupper(getch());
key = getch();
if (islower(key))
key = toupper(key);
switch (key) {
case '\014': /* ^L */

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: install.c,v 1.115 1996/07/16 17:11:41 jkh Exp $
* $Id: install.c,v 1.116 1996/07/31 06:20:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -56,7 +56,7 @@ static void create_termcap(void);
static void installConfigure(void);
Boolean
checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
{
Device **devs;
Boolean status;
@ -86,8 +86,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
if (c2->flags & CHUNK_IS_ROOT) {
if (rootdev) {
msgConfirm("WARNING: You have more than one root device set?!\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one root device set?!\n"
"Using the first one found.");
continue;
}
else {
@ -98,8 +99,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/usr")) {
if (usrdev) {
msgConfirm("WARNING: You have more than one /usr filesystem.\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one /usr filesystem.\n"
"Using the first one found.");
continue;
}
else {
@ -110,8 +112,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/var")) {
if (vardev) {
msgConfirm("WARNING: You have more than one /var filesystem.\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one /var filesystem.\n"
"Using the first one found.");
continue;
}
else {
@ -154,23 +157,23 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
*udev = usrdev;
*vdev = vardev;
if (!rootdev) {
if (!rootdev && whinge) {
msgConfirm("No root device found - you must label a partition as /\n"
"in the label editor.");
status = FALSE;
}
if (!swapdev) {
if (!swapdev && whinge) {
msgConfirm("No swap devices found - you must create at least one\n"
"swap partition.");
status = FALSE;
}
if (!usrdev) {
if (!usrdev && whinge) {
msgConfirm("WARNING: No /usr filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to mount your /usr filesystem over NFS), but it may otherwise\n"
"cause you trouble if you're not exactly sure what you are doing!");
}
if (!vardev) {
if (!vardev && whinge) {
msgConfirm("WARNING: No /var filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to link /var to someplace else), but it may otherwise\n"
@ -676,7 +679,7 @@ installFilesystems(dialogMenuItem *self)
str = variable_get(SYSTEM_STATE);
if (!checkLabels(&rootdev, &swapdev, &usrdev, &vardev))
if (!checkLabels(TRUE, &rootdev, &swapdev, &usrdev, &vardev))
return DITEM_FAILURE;
if (rootdev)

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: label.c,v 1.53 1996/07/14 01:54:39 jkh Exp $
* $Id: label.c,v 1.54 1996/07/31 06:20:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -497,7 +497,9 @@ diskLabel(char *str)
move(23, 0);
clrtoeol();
}
key = toupper(getch());
key = getch();
if (islower(key))
key = toupper(key);
switch (key) {
int i;
static char _msg[40];
@ -554,7 +556,7 @@ diskLabel(char *str)
char *cp;
Chunk *rootdev, *swapdev, *usrdev, *vardev;
(void)checkLabels(&rootdev, &swapdev, &usrdev, &vardev);
(void)checkLabels(FALSE, &rootdev, &swapdev, &usrdev, &vardev);
if (!rootdev) {
cp = variable_get(VAR_ROOT_SIZE);
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk, label_chunk_info[here].c,

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.75 1996/07/16 17:11:45 jkh Exp $
* $Id: sysinstall.h,v 1.76 1996/07/31 06:20:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -466,7 +466,7 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
extern Boolean checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern int installCommit(dialogMenuItem *self);
extern int installCustomCommit(dialogMenuItem *self);
extern int installExpress(dialogMenuItem *self);

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: disks.c,v 1.56 1996/07/31 06:20:54 jkh Exp $
* $Id: disks.c,v 1.57 1996/07/31 09:10:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -188,7 +188,9 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
}
key = toupper(getch());
key = getch();
if (islower(key))
key = toupper(key);
switch (key) {
case '\014': /* ^L */

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: install.c,v 1.115 1996/07/16 17:11:41 jkh Exp $
* $Id: install.c,v 1.116 1996/07/31 06:20:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -56,7 +56,7 @@ static void create_termcap(void);
static void installConfigure(void);
Boolean
checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
{
Device **devs;
Boolean status;
@ -86,8 +86,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
if (c2->flags & CHUNK_IS_ROOT) {
if (rootdev) {
msgConfirm("WARNING: You have more than one root device set?!\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one root device set?!\n"
"Using the first one found.");
continue;
}
else {
@ -98,8 +99,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/usr")) {
if (usrdev) {
msgConfirm("WARNING: You have more than one /usr filesystem.\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one /usr filesystem.\n"
"Using the first one found.");
continue;
}
else {
@ -110,8 +112,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/var")) {
if (vardev) {
msgConfirm("WARNING: You have more than one /var filesystem.\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one /var filesystem.\n"
"Using the first one found.");
continue;
}
else {
@ -154,23 +157,23 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
*udev = usrdev;
*vdev = vardev;
if (!rootdev) {
if (!rootdev && whinge) {
msgConfirm("No root device found - you must label a partition as /\n"
"in the label editor.");
status = FALSE;
}
if (!swapdev) {
if (!swapdev && whinge) {
msgConfirm("No swap devices found - you must create at least one\n"
"swap partition.");
status = FALSE;
}
if (!usrdev) {
if (!usrdev && whinge) {
msgConfirm("WARNING: No /usr filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to mount your /usr filesystem over NFS), but it may otherwise\n"
"cause you trouble if you're not exactly sure what you are doing!");
}
if (!vardev) {
if (!vardev && whinge) {
msgConfirm("WARNING: No /var filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to link /var to someplace else), but it may otherwise\n"
@ -676,7 +679,7 @@ installFilesystems(dialogMenuItem *self)
str = variable_get(SYSTEM_STATE);
if (!checkLabels(&rootdev, &swapdev, &usrdev, &vardev))
if (!checkLabels(TRUE, &rootdev, &swapdev, &usrdev, &vardev))
return DITEM_FAILURE;
if (rootdev)

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: label.c,v 1.53 1996/07/14 01:54:39 jkh Exp $
* $Id: label.c,v 1.54 1996/07/31 06:20:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -497,7 +497,9 @@ diskLabel(char *str)
move(23, 0);
clrtoeol();
}
key = toupper(getch());
key = getch();
if (islower(key))
key = toupper(key);
switch (key) {
int i;
static char _msg[40];
@ -554,7 +556,7 @@ diskLabel(char *str)
char *cp;
Chunk *rootdev, *swapdev, *usrdev, *vardev;
(void)checkLabels(&rootdev, &swapdev, &usrdev, &vardev);
(void)checkLabels(FALSE, &rootdev, &swapdev, &usrdev, &vardev);
if (!rootdev) {
cp = variable_get(VAR_ROOT_SIZE);
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk, label_chunk_info[here].c,

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.75 1996/07/16 17:11:45 jkh Exp $
* $Id: sysinstall.h,v 1.76 1996/07/31 06:20:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -466,7 +466,7 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
extern Boolean checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern int installCommit(dialogMenuItem *self);
extern int installCustomCommit(dialogMenuItem *self);
extern int installExpress(dialogMenuItem *self);

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: disks.c,v 1.56 1996/07/31 06:20:54 jkh Exp $
* $Id: disks.c,v 1.57 1996/07/31 09:10:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -188,7 +188,9 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
}
key = toupper(getch());
key = getch();
if (islower(key))
key = toupper(key);
switch (key) {
case '\014': /* ^L */

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: install.c,v 1.115 1996/07/16 17:11:41 jkh Exp $
* $Id: install.c,v 1.116 1996/07/31 06:20:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -56,7 +56,7 @@ static void create_termcap(void);
static void installConfigure(void);
Boolean
checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
{
Device **devs;
Boolean status;
@ -86,8 +86,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
if (c2->flags & CHUNK_IS_ROOT) {
if (rootdev) {
msgConfirm("WARNING: You have more than one root device set?!\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one root device set?!\n"
"Using the first one found.");
continue;
}
else {
@ -98,8 +99,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/usr")) {
if (usrdev) {
msgConfirm("WARNING: You have more than one /usr filesystem.\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one /usr filesystem.\n"
"Using the first one found.");
continue;
}
else {
@ -110,8 +112,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/var")) {
if (vardev) {
msgConfirm("WARNING: You have more than one /var filesystem.\n"
"Using the first one found.");
if (whinge)
msgConfirm("WARNING: You have more than one /var filesystem.\n"
"Using the first one found.");
continue;
}
else {
@ -154,23 +157,23 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
*udev = usrdev;
*vdev = vardev;
if (!rootdev) {
if (!rootdev && whinge) {
msgConfirm("No root device found - you must label a partition as /\n"
"in the label editor.");
status = FALSE;
}
if (!swapdev) {
if (!swapdev && whinge) {
msgConfirm("No swap devices found - you must create at least one\n"
"swap partition.");
status = FALSE;
}
if (!usrdev) {
if (!usrdev && whinge) {
msgConfirm("WARNING: No /usr filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to mount your /usr filesystem over NFS), but it may otherwise\n"
"cause you trouble if you're not exactly sure what you are doing!");
}
if (!vardev) {
if (!vardev && whinge) {
msgConfirm("WARNING: No /var filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to link /var to someplace else), but it may otherwise\n"
@ -676,7 +679,7 @@ installFilesystems(dialogMenuItem *self)
str = variable_get(SYSTEM_STATE);
if (!checkLabels(&rootdev, &swapdev, &usrdev, &vardev))
if (!checkLabels(TRUE, &rootdev, &swapdev, &usrdev, &vardev))
return DITEM_FAILURE;
if (rootdev)

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: label.c,v 1.53 1996/07/14 01:54:39 jkh Exp $
* $Id: label.c,v 1.54 1996/07/31 06:20:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -497,7 +497,9 @@ diskLabel(char *str)
move(23, 0);
clrtoeol();
}
key = toupper(getch());
key = getch();
if (islower(key))
key = toupper(key);
switch (key) {
int i;
static char _msg[40];
@ -554,7 +556,7 @@ diskLabel(char *str)
char *cp;
Chunk *rootdev, *swapdev, *usrdev, *vardev;
(void)checkLabels(&rootdev, &swapdev, &usrdev, &vardev);
(void)checkLabels(FALSE, &rootdev, &swapdev, &usrdev, &vardev);
if (!rootdev) {
cp = variable_get(VAR_ROOT_SIZE);
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk, label_chunk_info[here].c,

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.75 1996/07/16 17:11:45 jkh Exp $
* $Id: sysinstall.h,v 1.76 1996/07/31 06:20:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -466,7 +466,7 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
extern Boolean checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern int installCommit(dialogMenuItem *self);
extern int installCustomCommit(dialogMenuItem *self);
extern int installExpress(dialogMenuItem *self);