From a1bfde73e45a9f9838a9587157f93eee47ee4be0 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 19 May 1995 02:19:15 +0000 Subject: [PATCH] Big Sigh. Both A_BOLD and A_UNDERLINE do not appear to work with syscons (and/or cons25) at all. This code looked just fine running on an xterm, but on a console the attributes are all wrong. I now have to sacrifice some screen real-estate to pring cheesy `-' characters to accomplish the same thing. --- release/sysinstall/label.c | 32 +++++++++++--------------------- usr.sbin/sade/label.c | 32 +++++++++++--------------------- usr.sbin/sysinstall/label.c | 32 +++++++++++--------------------- 3 files changed, 33 insertions(+), 63 deletions(-) diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c index 0526de6497ca..a86f39425991 100644 --- a/release/sysinstall/label.c +++ b/release/sysinstall/label.c @@ -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.8 1995/05/18 18:02:31 jkh Exp $ + * $Id: label.c,v 1.9 1995/05/19 02:09:02 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -64,7 +64,7 @@ /* Where to start printing the freebsd slices */ #define CHUNK_SLICE_START_ROW 2 -#define CHUNK_PART_START_ROW 10 +#define CHUNK_PART_START_ROW 11 /* The smallest filesystem we're willing to create */ #define FS_MIN_SIZE 2048 @@ -271,7 +271,7 @@ getNewfsCmd(PartInfo *p) #define PART_OFF 38 /* How many mounted partitions to display in column before going to next */ -#define CHUNK_COLUMN_MAX 6 +#define CHUNK_COLUMN_MAX 5 /* stick this all up on the screen */ static void @@ -285,30 +285,20 @@ print_label_chunks(void) attrset(A_REVERSE); mvaddstr(0, 25, "FreeBSD Disklabel Editor"); attrset(A_NORMAL); - label_attr = A_BOLD; /* A_UNDERLINE is *BROKEN* in syscons! */ for (i = 0; i < 2; i++) { - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_PART_COL + (i * PART_OFF), - "Part"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_PART_COL + (i * PART_OFF), "Part"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_PART_COL + (i * PART_OFF), "----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_MOUNT_COL + (i * PART_OFF), - "Mount"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_MOUNT_COL + (i * PART_OFF), "Mount"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_MOUNT_COL + (i * PART_OFF), "-----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2, - "Size"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_SIZE_COL + (i * PART_OFF) + 2, "Size"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2, "----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF), - "Newfs"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_NEWFS_COL + (i * PART_OFF), "Newfs"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF), "-----"); } - srow = CHUNK_SLICE_START_ROW; prow = CHUNK_PART_START_ROW; pcol = 0; diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index 0526de6497ca..a86f39425991 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -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.8 1995/05/18 18:02:31 jkh Exp $ + * $Id: label.c,v 1.9 1995/05/19 02:09:02 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -64,7 +64,7 @@ /* Where to start printing the freebsd slices */ #define CHUNK_SLICE_START_ROW 2 -#define CHUNK_PART_START_ROW 10 +#define CHUNK_PART_START_ROW 11 /* The smallest filesystem we're willing to create */ #define FS_MIN_SIZE 2048 @@ -271,7 +271,7 @@ getNewfsCmd(PartInfo *p) #define PART_OFF 38 /* How many mounted partitions to display in column before going to next */ -#define CHUNK_COLUMN_MAX 6 +#define CHUNK_COLUMN_MAX 5 /* stick this all up on the screen */ static void @@ -285,30 +285,20 @@ print_label_chunks(void) attrset(A_REVERSE); mvaddstr(0, 25, "FreeBSD Disklabel Editor"); attrset(A_NORMAL); - label_attr = A_BOLD; /* A_UNDERLINE is *BROKEN* in syscons! */ for (i = 0; i < 2; i++) { - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_PART_COL + (i * PART_OFF), - "Part"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_PART_COL + (i * PART_OFF), "Part"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_PART_COL + (i * PART_OFF), "----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_MOUNT_COL + (i * PART_OFF), - "Mount"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_MOUNT_COL + (i * PART_OFF), "Mount"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_MOUNT_COL + (i * PART_OFF), "-----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2, - "Size"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_SIZE_COL + (i * PART_OFF) + 2, "Size"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2, "----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF), - "Newfs"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_NEWFS_COL + (i * PART_OFF), "Newfs"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF), "-----"); } - srow = CHUNK_SLICE_START_ROW; prow = CHUNK_PART_START_ROW; pcol = 0; diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index 0526de6497ca..a86f39425991 100644 --- a/usr.sbin/sysinstall/label.c +++ b/usr.sbin/sysinstall/label.c @@ -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.8 1995/05/18 18:02:31 jkh Exp $ + * $Id: label.c,v 1.9 1995/05/19 02:09:02 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -64,7 +64,7 @@ /* Where to start printing the freebsd slices */ #define CHUNK_SLICE_START_ROW 2 -#define CHUNK_PART_START_ROW 10 +#define CHUNK_PART_START_ROW 11 /* The smallest filesystem we're willing to create */ #define FS_MIN_SIZE 2048 @@ -271,7 +271,7 @@ getNewfsCmd(PartInfo *p) #define PART_OFF 38 /* How many mounted partitions to display in column before going to next */ -#define CHUNK_COLUMN_MAX 6 +#define CHUNK_COLUMN_MAX 5 /* stick this all up on the screen */ static void @@ -285,30 +285,20 @@ print_label_chunks(void) attrset(A_REVERSE); mvaddstr(0, 25, "FreeBSD Disklabel Editor"); attrset(A_NORMAL); - label_attr = A_BOLD; /* A_UNDERLINE is *BROKEN* in syscons! */ for (i = 0; i < 2; i++) { - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_PART_COL + (i * PART_OFF), - "Part"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_PART_COL + (i * PART_OFF), "Part"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_PART_COL + (i * PART_OFF), "----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_MOUNT_COL + (i * PART_OFF), - "Mount"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_MOUNT_COL + (i * PART_OFF), "Mount"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_MOUNT_COL + (i * PART_OFF), "-----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2, - "Size"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_SIZE_COL + (i * PART_OFF) + 2, "Size"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_SIZE_COL + (i * PART_OFF) + 2, "----"); - attrset(label_attr); - mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF), - "Newfs"); - attrset(A_NORMAL); + mvaddstr(CHUNK_PART_START_ROW - 2, PART_NEWFS_COL + (i * PART_OFF), "Newfs"); + mvaddstr(CHUNK_PART_START_ROW - 1, PART_NEWFS_COL + (i * PART_OFF), "-----"); } - srow = CHUNK_SLICE_START_ROW; prow = CHUNK_PART_START_ROW; pcol = 0;