Correct a few ordering errors in how the partitions were being displayed.

This commit is contained in:
Jordan K. Hubbard 1995-05-07 03:38:03 +00:00
parent 64330cc768
commit 133231e4aa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8314
15 changed files with 111 additions and 96 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: devices.c,v 1.5 1995/05/05 23:47:38 jkh Exp $
* $Id: devices.c,v 1.6 1995/05/06 09:34:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -102,11 +102,10 @@ print_chunks(struct disk *d)
{
int row;
int i;
int b_attr = ColorDisplay ? A_BOLD : A_UNDERLINE;
attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t");
attrset(b_attr); addstr(d->name); attrset(A_NORMAL);
attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL);
attrset(A_REVERSE); mvaddstr(0, 55, "Master Partition Editor"); attrset(A_NORMAL);
mvprintw(1, 0,
"BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors",
@ -116,7 +115,7 @@ print_chunks(struct disk *d)
"Subtype", "Flags");
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(b_attr);
attrset(A_REVERSE);
mvprintw(row, 2, "%10lu %10lu %10lu %8s %8d %8s %8d %6lx",
chunk_info[i]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name,
@ -130,14 +129,12 @@ print_chunks(struct disk *d)
static void
print_command_summary()
{
int b_attr = ColorDisplay ? A_BOLD : A_UNDERLINE;
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
mvprintw(17, 0, "D = Delete Partition G = Set BIOS Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes W = `Wizard' Mode ESC = Proceed to next screen");
mvprintw(20, 0, "The currently selected partition is displayed in ");
attrset(b_attr); addstr(ColorDisplay ? "bold" : "underline"); attrset(A_NORMAL);
attrset(A_REVERSE); addstr("reverse video"); attrset(A_NORMAL);
move(0, 0);
}

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.3 1995/05/06 09:34:11 jkh Exp $
* $Id: disks.c,v 1.4 1995/05/07 02:04:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,15 +135,22 @@ record_fbsd_chunks(struct disk **disks)
if (!disks[i]->chunks)
msgFatal("No chunk list found for %s!", disks[i]->name);
c1 = disks[i]->chunks->part;
while (c1) {
if (c1->type == freebsd) {
struct chunk *c2 = c1->part;
/* Put the freebsd chunks first */
for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
fbsd_chunk_info[j].type = PART_SLICE;
fbsd_chunk_info[j].d = disks[i];
fbsd_chunk_info[j].c = c1;
fbsd_chunk_info[j++].p = NULL;
}
}
/* Then buzz through and pick up the partitions */
for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
struct chunk *c2 = c1->part;
while (c2) {
if (c2->type == part) {
if (c2->subtype == FS_SWAP)
@ -157,7 +164,6 @@ record_fbsd_chunks(struct disk **disks)
c2 = c2->next;
}
}
c1 = c1->next;
}
}
fbsd_chunk_info[j].d = NULL;
@ -227,7 +233,7 @@ get_partition_type(struct chunk *c)
static void
print_fbsd_chunks(void)
{
int i, srow, prow, pcol;
int i, j, srow, prow, pcol;
int sz;
attrset(A_REVERSE);
@ -246,8 +252,9 @@ print_fbsd_chunks(void)
attrset(A_NORMAL);
attrset(A_UNDERLINE);
mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF),
mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2,
"Size");
attrset(A_NORMAL);
attrset(A_UNDERLINE);
mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF),
@ -260,7 +267,7 @@ print_fbsd_chunks(void)
for (i = 0; fbsd_chunk_info[i].d; i++) {
if (i == current_chunk)
attrset(ColorDisplay ? A_BOLD : A_UNDERLINE);
attrset(A_REVERSE);
/* Is it a slice entry displayed at the top? */
if (fbsd_chunk_info[i].type == PART_SLICE) {
sz = space_free(fbsd_chunk_info[i].c);
@ -293,8 +300,8 @@ print_fbsd_chunks(void)
mountpoint = "swap";
newfs = " ";
}
for (i = 0; i < MAX_MOUNT_NAME && mountpoint[i]; i++)
mvaddch(prow, pcol + PART_MOUNT_COL + i, mountpoint[i]);
for (j = 0; j < MAX_MOUNT_NAME && mountpoint[j]; j++)
mvaddch(prow, pcol + PART_MOUNT_COL + j, mountpoint[j]);
mvprintw(prow, pcol + PART_SIZE_COL, "%4dMB",
fbsd_chunk_info[i].c->size ?
fbsd_chunk_info[i].c->size / 2048 : 0);
@ -309,16 +316,14 @@ print_fbsd_chunks(void)
static void
print_command_summary()
{
int attrs = ColorDisplay ? A_BOLD : A_UNDERLINE;
mvprintw(19, 0,
"The following commands are valid here (upper or lower case):");
mvprintw(20, 0, "C = Create FreeBSD Partition D = Delete Partition");
mvprintw(21, 0, "M = Mount Partition (no newfs) ESC = Proceed to summary screen");
mvprintw(22, 0, "The default target will be displayed in ");
attrset(attrs);
addstr(ColorDisplay ? "bold" : "underline");
attrset(A_REVERSE);
addstr("reverse video");
attrset(A_NORMAL);
move(0, 0);
}

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: main.c,v 1.2 1995/05/04 03:51:17 jkh Exp $
* $Id: main.c,v 1.4 1995/05/05 23:47:42 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -60,6 +60,9 @@ main(int argc, char **argv)
/* Welcome user to FreeBSD */
systemWelcome();
/* Default to English */
/* lang_set_English(NULL); */
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;

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: msg.c,v 1.3 1995/05/04 03:51:21 jkh Exp $
* $Id: msg.c,v 1.6 1995/05/05 23:47:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -58,7 +58,7 @@ msgYap(char *fmt, ...)
vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
va_end(args);
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -101,7 +101,7 @@ msgWarn(char *fmt, ...)
va_end(args);
attrs = getattrs(stdscr);
beep();
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -123,7 +123,7 @@ msgError(char *fmt, ...)
va_end(args);
beep();
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -145,7 +145,7 @@ msgFatal(char *fmt, ...)
va_end(args);
beep();
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
addstr(" - ");
addstr("PRESS ANY KEY TO ");

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: system.c,v 1.5 1995/05/05 23:47:46 jkh Exp $
* $Id: system.c,v 1.6 1995/05/06 09:34:22 jkh Exp $
*
* Jordan Hubbard
*
@ -201,7 +201,7 @@ systemHelpFile(char *file, char *buf)
fname = buf;
}
}
else {
if (!fname) {
snprintf(buf, FILENAME_MAX, "help/en_US.ISO8859-1/%s", file);
if (file_readable(buf))
fname = buf;
@ -238,12 +238,12 @@ systemChangeTerminal(char *color, const u_char c_term[],
if (ColorDisplay) {
setenv("TERM", color, 1);
setenv("TERMCAP", c_term, 1);
setterm(color);
/* setterm(color); */
}
else {
setenv("TERM", mono, 1);
setenv("TERMCAP", m_term, 1);
setterm(mono);
/* setterm(mono); */
}
}
}

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: devices.c,v 1.5 1995/05/05 23:47:38 jkh Exp $
* $Id: devices.c,v 1.6 1995/05/06 09:34:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -102,11 +102,10 @@ print_chunks(struct disk *d)
{
int row;
int i;
int b_attr = ColorDisplay ? A_BOLD : A_UNDERLINE;
attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t");
attrset(b_attr); addstr(d->name); attrset(A_NORMAL);
attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL);
attrset(A_REVERSE); mvaddstr(0, 55, "Master Partition Editor"); attrset(A_NORMAL);
mvprintw(1, 0,
"BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors",
@ -116,7 +115,7 @@ print_chunks(struct disk *d)
"Subtype", "Flags");
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(b_attr);
attrset(A_REVERSE);
mvprintw(row, 2, "%10lu %10lu %10lu %8s %8d %8s %8d %6lx",
chunk_info[i]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name,
@ -130,14 +129,12 @@ print_chunks(struct disk *d)
static void
print_command_summary()
{
int b_attr = ColorDisplay ? A_BOLD : A_UNDERLINE;
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
mvprintw(17, 0, "D = Delete Partition G = Set BIOS Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes W = `Wizard' Mode ESC = Proceed to next screen");
mvprintw(20, 0, "The currently selected partition is displayed in ");
attrset(b_attr); addstr(ColorDisplay ? "bold" : "underline"); attrset(A_NORMAL);
attrset(A_REVERSE); addstr("reverse video"); attrset(A_NORMAL);
move(0, 0);
}

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.3 1995/05/06 09:34:11 jkh Exp $
* $Id: disks.c,v 1.4 1995/05/07 02:04:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,15 +135,22 @@ record_fbsd_chunks(struct disk **disks)
if (!disks[i]->chunks)
msgFatal("No chunk list found for %s!", disks[i]->name);
c1 = disks[i]->chunks->part;
while (c1) {
if (c1->type == freebsd) {
struct chunk *c2 = c1->part;
/* Put the freebsd chunks first */
for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
fbsd_chunk_info[j].type = PART_SLICE;
fbsd_chunk_info[j].d = disks[i];
fbsd_chunk_info[j].c = c1;
fbsd_chunk_info[j++].p = NULL;
}
}
/* Then buzz through and pick up the partitions */
for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
struct chunk *c2 = c1->part;
while (c2) {
if (c2->type == part) {
if (c2->subtype == FS_SWAP)
@ -157,7 +164,6 @@ record_fbsd_chunks(struct disk **disks)
c2 = c2->next;
}
}
c1 = c1->next;
}
}
fbsd_chunk_info[j].d = NULL;
@ -227,7 +233,7 @@ get_partition_type(struct chunk *c)
static void
print_fbsd_chunks(void)
{
int i, srow, prow, pcol;
int i, j, srow, prow, pcol;
int sz;
attrset(A_REVERSE);
@ -246,8 +252,9 @@ print_fbsd_chunks(void)
attrset(A_NORMAL);
attrset(A_UNDERLINE);
mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF),
mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2,
"Size");
attrset(A_NORMAL);
attrset(A_UNDERLINE);
mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF),
@ -260,7 +267,7 @@ print_fbsd_chunks(void)
for (i = 0; fbsd_chunk_info[i].d; i++) {
if (i == current_chunk)
attrset(ColorDisplay ? A_BOLD : A_UNDERLINE);
attrset(A_REVERSE);
/* Is it a slice entry displayed at the top? */
if (fbsd_chunk_info[i].type == PART_SLICE) {
sz = space_free(fbsd_chunk_info[i].c);
@ -293,8 +300,8 @@ print_fbsd_chunks(void)
mountpoint = "swap";
newfs = " ";
}
for (i = 0; i < MAX_MOUNT_NAME && mountpoint[i]; i++)
mvaddch(prow, pcol + PART_MOUNT_COL + i, mountpoint[i]);
for (j = 0; j < MAX_MOUNT_NAME && mountpoint[j]; j++)
mvaddch(prow, pcol + PART_MOUNT_COL + j, mountpoint[j]);
mvprintw(prow, pcol + PART_SIZE_COL, "%4dMB",
fbsd_chunk_info[i].c->size ?
fbsd_chunk_info[i].c->size / 2048 : 0);
@ -309,16 +316,14 @@ print_fbsd_chunks(void)
static void
print_command_summary()
{
int attrs = ColorDisplay ? A_BOLD : A_UNDERLINE;
mvprintw(19, 0,
"The following commands are valid here (upper or lower case):");
mvprintw(20, 0, "C = Create FreeBSD Partition D = Delete Partition");
mvprintw(21, 0, "M = Mount Partition (no newfs) ESC = Proceed to summary screen");
mvprintw(22, 0, "The default target will be displayed in ");
attrset(attrs);
addstr(ColorDisplay ? "bold" : "underline");
attrset(A_REVERSE);
addstr("reverse video");
attrset(A_NORMAL);
move(0, 0);
}

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: main.c,v 1.2 1995/05/04 03:51:17 jkh Exp $
* $Id: main.c,v 1.4 1995/05/05 23:47:42 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -60,6 +60,9 @@ main(int argc, char **argv)
/* Welcome user to FreeBSD */
systemWelcome();
/* Default to English */
/* lang_set_English(NULL); */
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;

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: msg.c,v 1.3 1995/05/04 03:51:21 jkh Exp $
* $Id: msg.c,v 1.6 1995/05/05 23:47:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -58,7 +58,7 @@ msgYap(char *fmt, ...)
vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
va_end(args);
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -101,7 +101,7 @@ msgWarn(char *fmt, ...)
va_end(args);
attrs = getattrs(stdscr);
beep();
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -123,7 +123,7 @@ msgError(char *fmt, ...)
va_end(args);
beep();
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -145,7 +145,7 @@ msgFatal(char *fmt, ...)
va_end(args);
beep();
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
addstr(" - ");
addstr("PRESS ANY KEY TO ");

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: system.c,v 1.5 1995/05/05 23:47:46 jkh Exp $
* $Id: system.c,v 1.6 1995/05/06 09:34:22 jkh Exp $
*
* Jordan Hubbard
*
@ -201,7 +201,7 @@ systemHelpFile(char *file, char *buf)
fname = buf;
}
}
else {
if (!fname) {
snprintf(buf, FILENAME_MAX, "help/en_US.ISO8859-1/%s", file);
if (file_readable(buf))
fname = buf;
@ -238,12 +238,12 @@ systemChangeTerminal(char *color, const u_char c_term[],
if (ColorDisplay) {
setenv("TERM", color, 1);
setenv("TERMCAP", c_term, 1);
setterm(color);
/* setterm(color); */
}
else {
setenv("TERM", mono, 1);
setenv("TERMCAP", m_term, 1);
setterm(mono);
/* setterm(mono); */
}
}
}

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: devices.c,v 1.5 1995/05/05 23:47:38 jkh Exp $
* $Id: devices.c,v 1.6 1995/05/06 09:34:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -102,11 +102,10 @@ print_chunks(struct disk *d)
{
int row;
int i;
int b_attr = ColorDisplay ? A_BOLD : A_UNDERLINE;
attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t");
attrset(b_attr); addstr(d->name); attrset(A_NORMAL);
attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL);
attrset(A_REVERSE); mvaddstr(0, 55, "Master Partition Editor"); attrset(A_NORMAL);
mvprintw(1, 0,
"BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors",
@ -116,7 +115,7 @@ print_chunks(struct disk *d)
"Subtype", "Flags");
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(b_attr);
attrset(A_REVERSE);
mvprintw(row, 2, "%10lu %10lu %10lu %8s %8d %8s %8d %6lx",
chunk_info[i]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name,
@ -130,14 +129,12 @@ print_chunks(struct disk *d)
static void
print_command_summary()
{
int b_attr = ColorDisplay ? A_BOLD : A_UNDERLINE;
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
mvprintw(17, 0, "D = Delete Partition G = Set BIOS Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes W = `Wizard' Mode ESC = Proceed to next screen");
mvprintw(20, 0, "The currently selected partition is displayed in ");
attrset(b_attr); addstr(ColorDisplay ? "bold" : "underline"); attrset(A_NORMAL);
attrset(A_REVERSE); addstr("reverse video"); attrset(A_NORMAL);
move(0, 0);
}

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.3 1995/05/06 09:34:11 jkh Exp $
* $Id: disks.c,v 1.4 1995/05/07 02:04:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,15 +135,22 @@ record_fbsd_chunks(struct disk **disks)
if (!disks[i]->chunks)
msgFatal("No chunk list found for %s!", disks[i]->name);
c1 = disks[i]->chunks->part;
while (c1) {
if (c1->type == freebsd) {
struct chunk *c2 = c1->part;
/* Put the freebsd chunks first */
for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
fbsd_chunk_info[j].type = PART_SLICE;
fbsd_chunk_info[j].d = disks[i];
fbsd_chunk_info[j].c = c1;
fbsd_chunk_info[j++].p = NULL;
}
}
/* Then buzz through and pick up the partitions */
for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
struct chunk *c2 = c1->part;
while (c2) {
if (c2->type == part) {
if (c2->subtype == FS_SWAP)
@ -157,7 +164,6 @@ record_fbsd_chunks(struct disk **disks)
c2 = c2->next;
}
}
c1 = c1->next;
}
}
fbsd_chunk_info[j].d = NULL;
@ -227,7 +233,7 @@ get_partition_type(struct chunk *c)
static void
print_fbsd_chunks(void)
{
int i, srow, prow, pcol;
int i, j, srow, prow, pcol;
int sz;
attrset(A_REVERSE);
@ -246,8 +252,9 @@ print_fbsd_chunks(void)
attrset(A_NORMAL);
attrset(A_UNDERLINE);
mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF),
mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2,
"Size");
attrset(A_NORMAL);
attrset(A_UNDERLINE);
mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF),
@ -260,7 +267,7 @@ print_fbsd_chunks(void)
for (i = 0; fbsd_chunk_info[i].d; i++) {
if (i == current_chunk)
attrset(ColorDisplay ? A_BOLD : A_UNDERLINE);
attrset(A_REVERSE);
/* Is it a slice entry displayed at the top? */
if (fbsd_chunk_info[i].type == PART_SLICE) {
sz = space_free(fbsd_chunk_info[i].c);
@ -293,8 +300,8 @@ print_fbsd_chunks(void)
mountpoint = "swap";
newfs = " ";
}
for (i = 0; i < MAX_MOUNT_NAME && mountpoint[i]; i++)
mvaddch(prow, pcol + PART_MOUNT_COL + i, mountpoint[i]);
for (j = 0; j < MAX_MOUNT_NAME && mountpoint[j]; j++)
mvaddch(prow, pcol + PART_MOUNT_COL + j, mountpoint[j]);
mvprintw(prow, pcol + PART_SIZE_COL, "%4dMB",
fbsd_chunk_info[i].c->size ?
fbsd_chunk_info[i].c->size / 2048 : 0);
@ -309,16 +316,14 @@ print_fbsd_chunks(void)
static void
print_command_summary()
{
int attrs = ColorDisplay ? A_BOLD : A_UNDERLINE;
mvprintw(19, 0,
"The following commands are valid here (upper or lower case):");
mvprintw(20, 0, "C = Create FreeBSD Partition D = Delete Partition");
mvprintw(21, 0, "M = Mount Partition (no newfs) ESC = Proceed to summary screen");
mvprintw(22, 0, "The default target will be displayed in ");
attrset(attrs);
addstr(ColorDisplay ? "bold" : "underline");
attrset(A_REVERSE);
addstr("reverse video");
attrset(A_NORMAL);
move(0, 0);
}

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: main.c,v 1.2 1995/05/04 03:51:17 jkh Exp $
* $Id: main.c,v 1.4 1995/05/05 23:47:42 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -60,6 +60,9 @@ main(int argc, char **argv)
/* Welcome user to FreeBSD */
systemWelcome();
/* Default to English */
/* lang_set_English(NULL); */
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;

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: msg.c,v 1.3 1995/05/04 03:51:21 jkh Exp $
* $Id: msg.c,v 1.6 1995/05/05 23:47:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -58,7 +58,7 @@ msgYap(char *fmt, ...)
vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args);
va_end(args);
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -101,7 +101,7 @@ msgWarn(char *fmt, ...)
va_end(args);
attrs = getattrs(stdscr);
beep();
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -123,7 +123,7 @@ msgError(char *fmt, ...)
va_end(args);
beep();
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
attrset(attrs);
refresh();
@ -145,7 +145,7 @@ msgFatal(char *fmt, ...)
va_end(args);
beep();
attrs = getattrs(stdscr);
attrset(A_BOLD);
attrset(A_REVERSE);
mvaddstr(23, 0, errstr);
addstr(" - ");
addstr("PRESS ANY KEY TO ");

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: system.c,v 1.5 1995/05/05 23:47:46 jkh Exp $
* $Id: system.c,v 1.6 1995/05/06 09:34:22 jkh Exp $
*
* Jordan Hubbard
*
@ -201,7 +201,7 @@ systemHelpFile(char *file, char *buf)
fname = buf;
}
}
else {
if (!fname) {
snprintf(buf, FILENAME_MAX, "help/en_US.ISO8859-1/%s", file);
if (file_readable(buf))
fname = buf;
@ -238,12 +238,12 @@ systemChangeTerminal(char *color, const u_char c_term[],
if (ColorDisplay) {
setenv("TERM", color, 1);
setenv("TERMCAP", c_term, 1);
setterm(color);
/* setterm(color); */
}
else {
setenv("TERM", mono, 1);
setenv("TERMCAP", m_term, 1);
setterm(mono);
/* setterm(mono); */
}
}
}