From 63a19c881d6d3793a7e7bceb11ccf5adeb361061 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 1 Jul 2002 13:17:48 +0000 Subject: [PATCH] more cleanups from Julio Merino. --- sys/dev/ic/pcdisplay_subr.c | 8 ++++++-- sys/dev/ic/vga.c | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sys/dev/ic/pcdisplay_subr.c b/sys/dev/ic/pcdisplay_subr.c index e07e218d3cc1..ed5f923f68ab 100644 --- a/sys/dev/ic/pcdisplay_subr.c +++ b/sys/dev/ic/pcdisplay_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcdisplay_subr.c,v 1.21 2002/06/26 23:05:33 christos Exp $ */ +/* $NetBSD: pcdisplay_subr.c,v 1.22 2002/07/01 13:17:48 christos Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcdisplay_subr.c,v 1.21 2002/06/26 23:05:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcdisplay_subr.c,v 1.22 2002/07/01 13:17:48 christos Exp $"); #include #include @@ -41,6 +41,8 @@ __KERNEL_RCSID(0, "$NetBSD: pcdisplay_subr.c,v 1.21 2002/06/26 23:05:33 christos #include +#include "opt_wsdisplay_compat.h" /* for WSDISPLAY_CHARFUNCS */ + void pcdisplay_cursor_init(scr, existing) struct pcdisplayscreen *scr; @@ -274,6 +276,7 @@ pcdisplay_eraserows(id, startrow, nrows, fillattr) scr->mem[off + i] = val; } +#ifdef WSDISPLAY_CHARFUNCS int pcdisplay_getwschar(id, wschar) void *id; @@ -338,3 +341,4 @@ pcdisplay_putwschar(id, wschar) return 0; } +#endif /* WSDISPLAY_CHARFUNCS */ diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index f80c61c2211b..69f20b8ba797 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.56 2002/06/28 22:24:11 drochner Exp $ */ +/* $NetBSD: vga.c,v 1.57 2002/07/01 13:17:48 christos Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.56 2002/06/28 22:24:11 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.57 2002/07/01 13:17:48 christos Exp $"); #include #include @@ -51,7 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.56 2002/06/28 22:24:11 drochner Exp $"); #include -#include "opt_wsdisplay_compat.h" /* for WSCONS_SUPPORT_PCVTFONTS */ +/* for WSCONS_SUPPORT_PCVTFONTS and WSDISPLAY_CHARFUNCS */ +#include "opt_wsdisplay_compat.h" #include "opt_vga.h" static struct wsdisplay_font _vga_builtinfont = { @@ -248,8 +249,10 @@ static void vga_free_screen(void *, void *); static int vga_show_screen(void *, void *, int, void (*)(void *, int, int), void *); static int vga_load_font(void *, void *, struct wsdisplay_font *); +#ifdef WSDISPLAY_CHARFUNCS static int vga_getwschar(void *, struct wsdisplay_char *); static int vga_putwschar(void *, struct wsdisplay_char *); +#endif /* WSDISPLAY_CHARFUNCS */ void vga_doswitch(struct vga_config *); @@ -261,8 +264,13 @@ const struct wsdisplay_accessops vga_accessops = { vga_show_screen, vga_load_font, NULL, +#ifdef WSDISPLAY_CHARFUNCS vga_getwschar, vga_putwschar +#else /* WSDISPLAY_CHARFUNCS */ + NULL, + NULL +#endif /* WSDISPLAY_CHARFUNCS */ }; /* @@ -1324,6 +1332,7 @@ vga_mapchar(void *id, int uni, u_int *index) return (res1); } +#ifdef WSDISPLAY_CHARFUNCS int vga_getwschar(void *cookie, struct wsdisplay_char *wschar) { @@ -1341,3 +1350,4 @@ vga_putwschar(void *cookie, struct wsdisplay_char *wschar) if (scr == NULL) return 0; return (pcdisplay_putwschar(&scr->pcs, wschar)); } +#endif /* WSDISPLAY_CHARFUNCS */