Put back some changes I inadvertantly spammed with a cvs update.

This commit is contained in:
Jordan K. Hubbard 1996-06-08 08:01:52 +00:00
parent 58fa43d11f
commit bb707f6d7e
10 changed files with 107 additions and 45 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.47 1996/04/30 05:23:45 jkh Exp $
* $Id: disks.c,v 1.48 1996/05/09 09:42:03 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -101,7 +101,7 @@ print_chunks(Disk *d)
"Subtype", "Flags");
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(row, 2, "%10ld %10lu %10lu %8s %8d %8s %8d\t%-6s",
chunk_info[i]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name,
@ -271,18 +271,36 @@ diskPartition(Device *dev, Disk *d)
msg = "Partition in use, delete it first or move to an unused one.";
else {
char *val, tmp[20], *cp;
int size;
int size, subtype;
chunk_e partitiontype;
snprintf(tmp, 20, "%d", chunk_info[current_chunk]->size);
val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks, or append\n"
"a trailing `M' for megabytes (e.g. 20M).");
val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks\n"
"or append a trailing `M' for megabytes (e.g. 20M).");
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
size *= ONE_MEG;
Create_Chunk(d, chunk_info[current_chunk]->offset, size, freebsd, 3,
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
"partition (type 165). You can choose other types, 6 for a\n"
"DOS partition or 131 for a Linux partition, for example.\n\n"
"Note: If you choose a non-FreeBSD partition type, it will not\n"
"be formatted or otherwise prepared, it will simply reserve space\n"
"for you to use another tool, such as DOS FORMAT, to later format\n"
"and use the partition.");
if (val && (subtype = strtol(val, NULL, 0)) > 0) {
if (subtype==165)
partitiontype=freebsd;
else if (subtype==6)
partitiontype=fat;
else
partitiontype=unknown;
Create_Chunk(d, chunk_info[current_chunk]->offset, size, partitiontype, subtype,
(chunk_info[current_chunk]->flags & CHUNK_ALIGN));
variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);
}
}
}
break;

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: index.c,v 1.31 1996/06/08 07:02:19 jkh Exp $
* $Id: index.c,v 1.32 1996/06/08 07:15:48 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -383,9 +383,11 @@ int
pkg_checked(dialogMenuItem *self)
{
PkgNodePtr kp = self->data, plist = (PkgNodePtr)self->aux;
int i;
i = index_search(plist, kp->name, NULL) ? TRUE : FALSE;
if (kp->type == PACKAGE && plist)
return index_search(plist, kp->name, NULL) ? TRUE : FALSE;
return i || (!RunningAsInit && package_exists(kp->name));
else
return FALSE;
}
@ -402,12 +404,14 @@ pkg_fire(dialogMenuItem *self)
sp = index_search(plist, kp->name, NULL);
/* Not already selected? */
if (!sp) {
PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode));
if (!RunningAsInit && !package_exists(kp->name)) {
PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode));
*np = *kp;
np->next = plist->kids;
plist->kids = np;
msgInfo("Added %s to selection list", kp->name);
*np = *kp;
np->next = plist->kids;
plist->kids = np;
msgInfo("Added %s to selection list", kp->name);
}
}
else if (sp) {
msgInfo("Removed %s from selection list", kp->name);

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.47 1996/04/29 05:09:23 jkh Exp $
* $Id: label.c,v 1.48 1996/05/09 09:42:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -400,7 +400,7 @@ print_label_chunks(void)
if (label_chunk_info[i].type == PART_SLICE) {
sz = space_free(label_chunk_info[i].c);
if (i == here)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(srow++, 0, "Disk: %s\tPartition name: %s\tFree: %d blocks (%dMB)",
label_chunk_info[i].c->disk->name, label_chunk_info[i].c->name, sz, (sz / ONE_MEG));
attrset(A_NORMAL);
@ -447,7 +447,7 @@ print_label_chunks(void)
memcpy(onestr + PART_NEWFS_COL, newfs, strlen(newfs));
onestr[PART_NEWFS_COL + strlen(newfs)] = '\0';
if (i == here)
wattrset(ChunkWin, item_selected_attr);
wattrset(ChunkWin, tag_attr);
mvwaddstr(ChunkWin, prow, pcol, onestr);
wattrset(ChunkWin, A_NORMAL);
wrefresh(ChunkWin);

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.35 1996/04/25 17:31:25 jkh Exp $
* $Id: options.c,v 1.36 1996/05/09 09:42:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -218,7 +218,7 @@ optionsEditor(dialogMenuItem *self)
/* Names are painted somewhat gratuitously each time, but it's easier this way */
mvprintw(optrow, OPT_NAME_COL + optcol, Options[i].name);
if (currOpt == i)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(optrow++, OPT_VALUE_COL + optcol, value_of(Options[i]));
if (currOpt == i)
attrset(A_NORMAL);

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.47 1996/04/30 05:23:45 jkh Exp $
* $Id: disks.c,v 1.48 1996/05/09 09:42:03 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -101,7 +101,7 @@ print_chunks(Disk *d)
"Subtype", "Flags");
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(row, 2, "%10ld %10lu %10lu %8s %8d %8s %8d\t%-6s",
chunk_info[i]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name,
@ -271,18 +271,36 @@ diskPartition(Device *dev, Disk *d)
msg = "Partition in use, delete it first or move to an unused one.";
else {
char *val, tmp[20], *cp;
int size;
int size, subtype;
chunk_e partitiontype;
snprintf(tmp, 20, "%d", chunk_info[current_chunk]->size);
val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks, or append\n"
"a trailing `M' for megabytes (e.g. 20M).");
val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks\n"
"or append a trailing `M' for megabytes (e.g. 20M).");
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
size *= ONE_MEG;
Create_Chunk(d, chunk_info[current_chunk]->offset, size, freebsd, 3,
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
"partition (type 165). You can choose other types, 6 for a\n"
"DOS partition or 131 for a Linux partition, for example.\n\n"
"Note: If you choose a non-FreeBSD partition type, it will not\n"
"be formatted or otherwise prepared, it will simply reserve space\n"
"for you to use another tool, such as DOS FORMAT, to later format\n"
"and use the partition.");
if (val && (subtype = strtol(val, NULL, 0)) > 0) {
if (subtype==165)
partitiontype=freebsd;
else if (subtype==6)
partitiontype=fat;
else
partitiontype=unknown;
Create_Chunk(d, chunk_info[current_chunk]->offset, size, partitiontype, subtype,
(chunk_info[current_chunk]->flags & CHUNK_ALIGN));
variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);
}
}
}
break;

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.47 1996/04/29 05:09:23 jkh Exp $
* $Id: label.c,v 1.48 1996/05/09 09:42:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -400,7 +400,7 @@ print_label_chunks(void)
if (label_chunk_info[i].type == PART_SLICE) {
sz = space_free(label_chunk_info[i].c);
if (i == here)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(srow++, 0, "Disk: %s\tPartition name: %s\tFree: %d blocks (%dMB)",
label_chunk_info[i].c->disk->name, label_chunk_info[i].c->name, sz, (sz / ONE_MEG));
attrset(A_NORMAL);
@ -447,7 +447,7 @@ print_label_chunks(void)
memcpy(onestr + PART_NEWFS_COL, newfs, strlen(newfs));
onestr[PART_NEWFS_COL + strlen(newfs)] = '\0';
if (i == here)
wattrset(ChunkWin, item_selected_attr);
wattrset(ChunkWin, tag_attr);
mvwaddstr(ChunkWin, prow, pcol, onestr);
wattrset(ChunkWin, A_NORMAL);
wrefresh(ChunkWin);

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.47 1996/04/30 05:23:45 jkh Exp $
* $Id: disks.c,v 1.48 1996/05/09 09:42:03 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -101,7 +101,7 @@ print_chunks(Disk *d)
"Subtype", "Flags");
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(row, 2, "%10ld %10lu %10lu %8s %8d %8s %8d\t%-6s",
chunk_info[i]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name,
@ -271,18 +271,36 @@ diskPartition(Device *dev, Disk *d)
msg = "Partition in use, delete it first or move to an unused one.";
else {
char *val, tmp[20], *cp;
int size;
int size, subtype;
chunk_e partitiontype;
snprintf(tmp, 20, "%d", chunk_info[current_chunk]->size);
val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks, or append\n"
"a trailing `M' for megabytes (e.g. 20M).");
val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks\n"
"or append a trailing `M' for megabytes (e.g. 20M).");
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
size *= ONE_MEG;
Create_Chunk(d, chunk_info[current_chunk]->offset, size, freebsd, 3,
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
"partition (type 165). You can choose other types, 6 for a\n"
"DOS partition or 131 for a Linux partition, for example.\n\n"
"Note: If you choose a non-FreeBSD partition type, it will not\n"
"be formatted or otherwise prepared, it will simply reserve space\n"
"for you to use another tool, such as DOS FORMAT, to later format\n"
"and use the partition.");
if (val && (subtype = strtol(val, NULL, 0)) > 0) {
if (subtype==165)
partitiontype=freebsd;
else if (subtype==6)
partitiontype=fat;
else
partitiontype=unknown;
Create_Chunk(d, chunk_info[current_chunk]->offset, size, partitiontype, subtype,
(chunk_info[current_chunk]->flags & CHUNK_ALIGN));
variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);
}
}
}
break;

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: index.c,v 1.31 1996/06/08 07:02:19 jkh Exp $
* $Id: index.c,v 1.32 1996/06/08 07:15:48 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -383,9 +383,11 @@ int
pkg_checked(dialogMenuItem *self)
{
PkgNodePtr kp = self->data, plist = (PkgNodePtr)self->aux;
int i;
i = index_search(plist, kp->name, NULL) ? TRUE : FALSE;
if (kp->type == PACKAGE && plist)
return index_search(plist, kp->name, NULL) ? TRUE : FALSE;
return i || (!RunningAsInit && package_exists(kp->name));
else
return FALSE;
}
@ -402,12 +404,14 @@ pkg_fire(dialogMenuItem *self)
sp = index_search(plist, kp->name, NULL);
/* Not already selected? */
if (!sp) {
PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode));
if (!RunningAsInit && !package_exists(kp->name)) {
PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode));
*np = *kp;
np->next = plist->kids;
plist->kids = np;
msgInfo("Added %s to selection list", kp->name);
*np = *kp;
np->next = plist->kids;
plist->kids = np;
msgInfo("Added %s to selection list", kp->name);
}
}
else if (sp) {
msgInfo("Removed %s from selection list", kp->name);

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.47 1996/04/29 05:09:23 jkh Exp $
* $Id: label.c,v 1.48 1996/05/09 09:42:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -400,7 +400,7 @@ print_label_chunks(void)
if (label_chunk_info[i].type == PART_SLICE) {
sz = space_free(label_chunk_info[i].c);
if (i == here)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(srow++, 0, "Disk: %s\tPartition name: %s\tFree: %d blocks (%dMB)",
label_chunk_info[i].c->disk->name, label_chunk_info[i].c->name, sz, (sz / ONE_MEG));
attrset(A_NORMAL);
@ -447,7 +447,7 @@ print_label_chunks(void)
memcpy(onestr + PART_NEWFS_COL, newfs, strlen(newfs));
onestr[PART_NEWFS_COL + strlen(newfs)] = '\0';
if (i == here)
wattrset(ChunkWin, item_selected_attr);
wattrset(ChunkWin, tag_attr);
mvwaddstr(ChunkWin, prow, pcol, onestr);
wattrset(ChunkWin, A_NORMAL);
wrefresh(ChunkWin);

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.35 1996/04/25 17:31:25 jkh Exp $
* $Id: options.c,v 1.36 1996/05/09 09:42:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -218,7 +218,7 @@ optionsEditor(dialogMenuItem *self)
/* Names are painted somewhat gratuitously each time, but it's easier this way */
mvprintw(optrow, OPT_NAME_COL + optcol, Options[i].name);
if (currOpt == i)
attrset(item_selected_attr);
attrset(tag_attr);
mvprintw(optrow++, OPT_VALUE_COL + optcol, value_of(Options[i]));
if (currOpt == i)
attrset(A_NORMAL);