From a895fbfd58345cb86abd960e920f72730f5739e4 Mon Sep 17 00:00:00 2001 From: ad Date: Thu, 22 Apr 1999 00:33:30 +0000 Subject: [PATCH] Define rcons_connect() only if (NFB > 0). Define rcons_connect_native() only if (NPX > 0). Needed for fixed `rasops' config glue. --- sys/arch/pmax/dev/rcons.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/arch/pmax/dev/rcons.c b/sys/arch/pmax/dev/rcons.c index 6becb5f7eb4a..e084ad43a858 100644 --- a/sys/arch/pmax/dev/rcons.c +++ b/sys/arch/pmax/dev/rcons.c @@ -1,4 +1,4 @@ -/* $NetBSD: rcons.c,v 1.22 1999/04/13 18:53:30 ad Exp $ */ +/* $NetBSD: rcons.c,v 1.23 1999/04/22 00:33:30 ad Exp $ */ /* * Copyright (c) 1995 @@ -68,6 +68,7 @@ #include #include #include +#include #include #include @@ -75,6 +76,7 @@ #include #include +#include "fb.h" /* * Console I/O is redirected to the appropriate device, either a screen and @@ -108,12 +110,14 @@ static void rcons_later __P((void*)); * rcons_connect is called by fbconnect when the first frame buffer is * attached. That frame buffer will always be the console frame buffer. */ +#if NFB > 0 void rcons_connect (info) struct fbinfo *info; { static struct rasops_info ri; - + int cookie; + /* TC mfb has special needs; 8-bits per pel, but monochrome */ if (info->fi_type.fb_boardtype == PMAX_FBTYPE_MFB) { ri.ri_depth = 8; @@ -125,10 +129,16 @@ rcons_connect (info) ri.ri_height = info->fi_type.fb_height; ri.ri_stride = info->fi_linebytes; ri.ri_bits = (u_char *)info->fi_pixels; + + wsfont_init(); + /* Choose 'Gallant' font if this is an 8-bit display */ + if (ri.ri_depth == 8 && (cookie = wsfont_find("Gallant", 0, 0, 0)) >= 0) + wsfont_lock(cookie, &ri.ri_font, WSFONT_LITTLE, WSFONT_LITTLE); + /* Get operations set and set framebugger colormap */ rasops_init(&ri, 0, 80, 1, 0); - + if (ri.ri_depth == 8 && info->fi_type.fb_boardtype != PMAX_FBTYPE_MFB) info->fi_driver->fbd_putcmap(info, rasops_cmap, 0, 256); @@ -151,11 +161,13 @@ rcons_connect (info) rc.rc_height = ri.ri_height; rcons_init(&rc); } +#endif /* * Called by drivers which can provide a native 'struct wsdisplay_emulops'. */ +#if NPX > 0 void rcons_connect_native (ops, cookie, width, height, cols, rows) struct wsdisplay_emulops *ops; @@ -186,7 +198,7 @@ rcons_connect_native (ops, cookie, width, height, cols, rows) rc.rc_maxrow = rows; rcons_init(&rc); } - +#endif /* * Hack around the rcons putchar interface not taking a dev_t.