diff options
author | jkh <jkh@FreeBSD.org> | 1996-06-08 09:08:51 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-06-08 09:08:51 +0000 |
commit | c75ddabf834905387953a28a6e531a55d0af665c (patch) | |
tree | 9c79cadaf8043fe23e3ee5bb76acf09cc334595e /usr.sbin | |
parent | 11d257651da74ba5cbe2ef53e48cb48b442da014 (diff) | |
download | FreeBSD-src-c75ddabf834905387953a28a6e531a55d0af665c.zip FreeBSD-src-c75ddabf834905387953a28a6e531a55d0af665c.tar.gz |
Implement selective text attributes for the syscons vty / vt100 emulator
selection since an attribute which looks good on a color console doesn't
necessarily look good in an xterm.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/disks.c | 4 | ||||
-rw-r--r-- | usr.sbin/sade/dispatch.c | 5 | ||||
-rw-r--r-- | usr.sbin/sade/label.c | 6 | ||||
-rw-r--r-- | usr.sbin/sade/msg.c | 10 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 7 | ||||
-rw-r--r-- | usr.sbin/sade/termcap.c | 1 | ||||
-rw-r--r-- | usr.sbin/sysinstall/disks.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/dispatch.c | 5 | ||||
-rw-r--r-- | usr.sbin/sysinstall/label.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/msg.c | 10 | ||||
-rw-r--r-- | usr.sbin/sysinstall/options.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 7 | ||||
-rw-r--r-- | usr.sbin/sysinstall/termcap.c | 1 |
13 files changed, 34 insertions, 36 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index 5db2fcf..87be0c9 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.48 1996/05/09 09:42:03 jkh Exp $ + * $Id: disks.c,v 1.49 1996/06/08 08:01:43 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(tag_attr); + attrset(ATTR_SELECTED); 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, diff --git a/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c index 886165b..8a51ade 100644 --- a/usr.sbin/sade/dispatch.c +++ b/usr.sbin/sade/dispatch.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id$ + * $Id: dispatch.c,v 1.1 1996/05/16 11:47:27 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -82,6 +82,7 @@ static struct _word { { "mediaSetFtpUserPass", mediaSetFtpUserPass }, { "mediaSetCPIOVerbosity", mediaSetCPIOVerbosity }, { "mediaGetType", mediaGetType }, + { "optionsEditor", optionsEditor }, { NULL, NULL }, }; @@ -119,7 +120,5 @@ dispatchCommand(char *str) msgConfirm("No such command: %s", str); return DITEM_FAILURE; } - else if (DITEM_STATUS(i) != DITEM_SUCCESS) - msgConfirm("Command `%s' returned an error status."); return i; } diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index 0870a81..09c5a56 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.48 1996/05/09 09:42:08 jkh Exp $ + * $Id: label.c,v 1.49 1996/06/08 08:01:51 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(tag_attr); + attrset(ATTR_SELECTED); 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, tag_attr); + wattrset(ChunkWin, ATTR_SELECTED); mvwaddstr(ChunkWin, prow, pcol, onestr); wattrset(ChunkWin, A_NORMAL); wrefresh(ChunkWin); diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c index 4d01088..4d25758 100644 --- a/usr.sbin/sade/msg.c +++ b/usr.sbin/sade/msg.c @@ -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.33 1996/05/16 11:47:40 jkh Exp $ + * $Id: msg.c,v 1.34 1996/05/23 16:34:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -99,7 +99,7 @@ msgInfo(char *fmt, ...) break; } line[80] = '\0'; - attrset(item_attr); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, line); attrset(attrs); move(OnVTY ? VTY_STATLINE : TTY_STATLINE, 79); @@ -121,7 +121,7 @@ msgWarn(char *fmt, ...) va_end(args); attrs = getattrs(stdscr); beep(); - attrset(A_REVERSE); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr); attrset(attrs); refresh(); @@ -144,7 +144,7 @@ msgError(char *fmt, ...) va_end(args); beep(); attrs = getattrs(stdscr); - attrset(A_REVERSE); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr); attrset(attrs); refresh(); @@ -167,7 +167,7 @@ msgFatal(char *fmt, ...) va_end(args); beep(); attrs = getattrs(stdscr); - attrset(A_REVERSE); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr); addstr(" - "); addstr("PRESS ANY KEY TO "); diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 84e3738..fccc382 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.56 1996/05/16 11:47:44 jkh Exp $ + * $Id: sysinstall.h,v 1.57 1996/05/29 01:35:30 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -129,6 +129,9 @@ /* One MB worth of blocks */ #define ONE_MEG 2048 +/* Which selection attributes to use */ +#define ATTR_SELECTED (OnVTY ? item_selected_attr : item_attr) + /*** Types ***/ typedef unsigned int Boolean; typedef struct disk Disk; @@ -279,8 +282,6 @@ extern unsigned int XF86Dists; /* Which XFree86 dists we want */ extern unsigned int XF86ServerDists; /* The XFree86 servers we want */ extern unsigned int XF86FontDists; /* The XFree86 fonts we want */ extern int BootMgr; /* Which boot manager to use */ - - extern DMenu MenuInitial; /* Initial installation menu */ extern DMenu MenuFixit; /* Fixit repair menu */ extern DMenu MenuMBRType; /* Type of MBR to write on the disk */ diff --git a/usr.sbin/sade/termcap.c b/usr.sbin/sade/termcap.c index 1f25ab1..a6b643b 100644 --- a/usr.sbin/sade/termcap.c +++ b/usr.sbin/sade/termcap.c @@ -30,7 +30,6 @@ set_termcap(void) int stat; OnVTY = FALSE; - term = getenv("TERM"); stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay); diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index 5db2fcf..87be0c9 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.48 1996/05/09 09:42:03 jkh Exp $ + * $Id: disks.c,v 1.49 1996/06/08 08:01:43 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(tag_attr); + attrset(ATTR_SELECTED); 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, diff --git a/usr.sbin/sysinstall/dispatch.c b/usr.sbin/sysinstall/dispatch.c index 886165b..8a51ade 100644 --- a/usr.sbin/sysinstall/dispatch.c +++ b/usr.sbin/sysinstall/dispatch.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id$ + * $Id: dispatch.c,v 1.1 1996/05/16 11:47:27 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -82,6 +82,7 @@ static struct _word { { "mediaSetFtpUserPass", mediaSetFtpUserPass }, { "mediaSetCPIOVerbosity", mediaSetCPIOVerbosity }, { "mediaGetType", mediaGetType }, + { "optionsEditor", optionsEditor }, { NULL, NULL }, }; @@ -119,7 +120,5 @@ dispatchCommand(char *str) msgConfirm("No such command: %s", str); return DITEM_FAILURE; } - else if (DITEM_STATUS(i) != DITEM_SUCCESS) - msgConfirm("Command `%s' returned an error status."); return i; } diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index 0870a81..09c5a56 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.48 1996/05/09 09:42:08 jkh Exp $ + * $Id: label.c,v 1.49 1996/06/08 08:01:51 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(tag_attr); + attrset(ATTR_SELECTED); 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, tag_attr); + wattrset(ChunkWin, ATTR_SELECTED); mvwaddstr(ChunkWin, prow, pcol, onestr); wattrset(ChunkWin, A_NORMAL); wrefresh(ChunkWin); diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c index 4d01088..4d25758 100644 --- a/usr.sbin/sysinstall/msg.c +++ b/usr.sbin/sysinstall/msg.c @@ -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.33 1996/05/16 11:47:40 jkh Exp $ + * $Id: msg.c,v 1.34 1996/05/23 16:34:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -99,7 +99,7 @@ msgInfo(char *fmt, ...) break; } line[80] = '\0'; - attrset(item_attr); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, line); attrset(attrs); move(OnVTY ? VTY_STATLINE : TTY_STATLINE, 79); @@ -121,7 +121,7 @@ msgWarn(char *fmt, ...) va_end(args); attrs = getattrs(stdscr); beep(); - attrset(A_REVERSE); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr); attrset(attrs); refresh(); @@ -144,7 +144,7 @@ msgError(char *fmt, ...) va_end(args); beep(); attrs = getattrs(stdscr); - attrset(A_REVERSE); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr); attrset(attrs); refresh(); @@ -167,7 +167,7 @@ msgFatal(char *fmt, ...) va_end(args); beep(); attrs = getattrs(stdscr); - attrset(A_REVERSE); + attrset(title_attr); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr); addstr(" - "); addstr("PRESS ANY KEY TO "); diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c index df6743c..3c01928 100644 --- a/usr.sbin/sysinstall/options.c +++ b/usr.sbin/sysinstall/options.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: options.c,v 1.36 1996/05/09 09:42:17 jkh Exp $ + * $Id: options.c,v 1.37 1996/06/08 08:01:52 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(tag_attr); + attrset(ATTR_SELECTED); mvprintw(optrow++, OPT_VALUE_COL + optcol, value_of(Options[i])); if (currOpt == i) attrset(A_NORMAL); diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 84e3738..fccc382 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.56 1996/05/16 11:47:44 jkh Exp $ + * $Id: sysinstall.h,v 1.57 1996/05/29 01:35:30 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -129,6 +129,9 @@ /* One MB worth of blocks */ #define ONE_MEG 2048 +/* Which selection attributes to use */ +#define ATTR_SELECTED (OnVTY ? item_selected_attr : item_attr) + /*** Types ***/ typedef unsigned int Boolean; typedef struct disk Disk; @@ -279,8 +282,6 @@ extern unsigned int XF86Dists; /* Which XFree86 dists we want */ extern unsigned int XF86ServerDists; /* The XFree86 servers we want */ extern unsigned int XF86FontDists; /* The XFree86 fonts we want */ extern int BootMgr; /* Which boot manager to use */ - - extern DMenu MenuInitial; /* Initial installation menu */ extern DMenu MenuFixit; /* Fixit repair menu */ extern DMenu MenuMBRType; /* Type of MBR to write on the disk */ diff --git a/usr.sbin/sysinstall/termcap.c b/usr.sbin/sysinstall/termcap.c index 1f25ab1..a6b643b 100644 --- a/usr.sbin/sysinstall/termcap.c +++ b/usr.sbin/sysinstall/termcap.c @@ -30,7 +30,6 @@ set_termcap(void) int stat; OnVTY = FALSE; - term = getenv("TERM"); stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay); |