allow default colours to be overridden by

PCCONS_DEFAULT_FG PCCONS_DEFAULT_SO_FG
	PCCONS_DEFAULT_BG PCCONS_DEFAULT_SO_BG
This commit is contained in:
lukem 2002-04-14 14:20:33 +00:00
parent f33a18bc93
commit fdc8fec66f
1 changed files with 20 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pccons.c,v 1.152 2002/03/17 19:40:42 atatat Exp $ */ /* $NetBSD: pccons.c,v 1.153 2002/04/14 14:20:33 lukem Exp $ */
/*- /*-
* Copyright (c) 1998 The NetBSD Foundation, Inc. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -83,7 +83,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.152 2002/03/17 19:40:42 atatat Exp $"); __KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.153 2002/04/14 14:20:33 lukem Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_xserver.h" #include "opt_xserver.h"
@ -1243,6 +1243,20 @@ pcparam(tp, t)
return (0); return (0);
} }
#ifndef PCCONS_DEFAULT_FG
#define PCCONS_DEFAULT_FG FG_LIGHTGREY
#endif
#ifndef PCCONS_DEFAULT_SO_FG
#define PCCONS_DEFAULT_SO_FG FG_YELLOW
#endif
#ifndef PCCONS_DEFAULT_BG
#define PCCONS_DEFAULT_BG BG_BLACK
#endif
#ifndef PCCONS_DEFAULT_SO_BG
#define PCCONS_DEFAULT_SO_BG BG_BLACK
#endif
void void
pcinit() pcinit()
{ {
@ -1282,12 +1296,12 @@ pcinit()
vs.ncol = COL; vs.ncol = COL;
vs.nrow = ROW; vs.nrow = ROW;
vs.nchr = COL * ROW; vs.nchr = COL * ROW;
vs.at = FG_LIGHTGREY | BG_BLACK;
vs.at = PCCONS_DEFAULT_FG | PCCONS_DEFAULT_BG;
if (vs.color == 0) if (vs.color == 0)
vs.so_at = FG_BLACK | BG_LIGHTGREY; vs.so_at = FG_BLACK | BG_LIGHTGREY;
else else
vs.so_at = FG_YELLOW | BG_BLACK; vs.so_at = PCCONS_DEFAULT_SO_FG | PCCONS_DEFAULT_SO_BG;
fillw((vs.at << 8) | ' ', crtat, vs.nchr - cursorat); fillw((vs.at << 8) | ' ', crtat, vs.nchr - cursorat);
} }
@ -1668,7 +1682,8 @@ sput(cp, n)
case 'x': /* set attributes */ case 'x': /* set attributes */
switch (vs.cx) { switch (vs.cx) {
case 0: case 0:
vs.at = FG_LIGHTGREY | BG_BLACK; vs.at = PCCONS_DEFAULT_FG |
PCCONS_DEFAULT_BG;
break; break;
case 1: case 1:
/* ansi background */ /* ansi background */