From fdc8fec66f042d51d80752077de5e876522b1a48 Mon Sep 17 00:00:00 2001 From: lukem Date: Sun, 14 Apr 2002 14:20:33 +0000 Subject: [PATCH] allow default colours to be overridden by PCCONS_DEFAULT_FG PCCONS_DEFAULT_SO_FG PCCONS_DEFAULT_BG PCCONS_DEFAULT_SO_BG --- sys/arch/i386/isa/pccons.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c index 2127bb21cfc6..5fa099895a19 100644 --- a/sys/arch/i386/isa/pccons.c +++ b/sys/arch/i386/isa/pccons.c @@ -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. @@ -83,7 +83,7 @@ */ #include -__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_xserver.h" @@ -1243,6 +1243,20 @@ pcparam(tp, t) 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 pcinit() { @@ -1282,12 +1296,12 @@ pcinit() vs.ncol = COL; vs.nrow = ROW; vs.nchr = COL * ROW; - vs.at = FG_LIGHTGREY | BG_BLACK; + vs.at = PCCONS_DEFAULT_FG | PCCONS_DEFAULT_BG; if (vs.color == 0) vs.so_at = FG_BLACK | BG_LIGHTGREY; 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); } @@ -1668,7 +1682,8 @@ sput(cp, n) case 'x': /* set attributes */ switch (vs.cx) { case 0: - vs.at = FG_LIGHTGREY | BG_BLACK; + vs.at = PCCONS_DEFAULT_FG | + PCCONS_DEFAULT_BG; break; case 1: /* ansi background */