summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2003-02-09 10:29:35 +0000
committerjdolecek <jdolecek@NetBSD.org>2003-02-09 10:29:35 +0000
commit998befbc32df5d8196d3c534ac9d99c174fbfbb3 (patch)
treeafee7730bd43a342385976a4e03d286245b960fd /sys/dev/ic
parent1677386f89e73ca586c44d5decd7c2f3c92ef871 (diff)
make 'name' and 'data' of struct wsdisplay_font const, mark data arrays
in font sources const
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/vga.c21
-rw-r--r--sys/dev/ic/vga_subr.c6
-rw-r--r--sys/dev/ic/vgavar.h4
3 files changed, 16 insertions, 15 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index a910ecca5f0..10e00fb3c96 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.68 2003/01/31 21:57:25 tsutsui Exp $ */
+/* $NetBSD: vga.c,v 1.69 2003/02/09 10:29:35 jdolecek Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.68 2003/01/31 21:57:25 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.69 2003/02/09 10:29:35 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -106,10 +106,11 @@ static struct vgascreen vga_console_screen;
static struct vga_config vga_console_vc;
struct egavga_font *egavga_getfont(struct vga_config *, struct vgascreen *,
- char *, int);
+ const char *, int);
void egavga_unreffont(struct vga_config *, struct egavga_font *);
-int vga_selectfont(struct vga_config *, struct vgascreen *, char *, char *);
+int vga_selectfont(struct vga_config *, struct vgascreen *, const char *,
+ const char *);
void vga_init_screen(struct vga_config *, struct vgascreen *,
const struct wsscreen_descr *, int, long *);
void vga_init(struct vga_config *, bus_space_tag_t, bus_space_tag_t);
@@ -288,7 +289,7 @@ const struct wsdisplay_accessops vga_accessops = {
f->wsfont->encoding == WSDISPLAY_FONTENC_ISO7)
struct egavga_font *
-egavga_getfont(struct vga_config *vc, struct vgascreen *scr, char *name,
+egavga_getfont(struct vga_config *vc, struct vgascreen *scr, const char *name,
int primary)
{
struct egavga_font *f;
@@ -371,8 +372,8 @@ egavga_unreffont(struct vga_config *vc, struct egavga_font *f)
}
int
-vga_selectfont(struct vga_config *vc, struct vgascreen *scr, char *name1,
- char *name2)
+vga_selectfont(struct vga_config *vc, struct vgascreen *scr, const char *name1,
+ const char *name2)
{
const struct wsscreen_descr *type = scr->pcs.type;
struct egavga_font *f1, *f2;
@@ -603,12 +604,12 @@ vga_common_attach(struct vga_softc *sc, bus_space_tag_t iot,
#define BUILTINFONTLOC (0)
#endif
if (!vga_no_builtinfont) {
- vga_builtinfont.wsfont->data =
+ char *data =
malloc(256 * vga_builtinfont.wsfont->fontheight,
M_DEVBUF, M_WAITOK);
vga_readoutchars(&vc->hdl, BUILTINFONTLOC, 0, 256,
- vga_builtinfont.wsfont->fontheight,
- vga_builtinfont.wsfont->data);
+ vga_builtinfont.wsfont->fontheight, data);
+ vga_builtinfont.wsfont->data = data;
}
vc->vc_type = type;
diff --git a/sys/dev/ic/vga_subr.c b/sys/dev/ic/vga_subr.c
index 575cc63e56b..b9d4afda705 100644
--- a/sys/dev/ic/vga_subr.c
+++ b/sys/dev/ic/vga_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_subr.c,v 1.14 2003/01/31 21:57:26 tsutsui Exp $ */
+/* $NetBSD: vga_subr.c,v 1.15 2003/02/09 10:29:36 jdolecek Exp $ */
/*
* Copyright (c) 1998
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_subr.c,v 1.14 2003/01/31 21:57:26 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_subr.c,v 1.15 2003/02/09 10:29:36 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,7 +95,7 @@ textram(struct vga_handle *vh)
#ifndef VGA_RASTERCONSOLE
void
vga_loadchars(struct vga_handle *vh, int fontset, int first, int num, int lpc,
- char *data)
+ const char *data)
{
int offset, i, j, s;
diff --git a/sys/dev/ic/vgavar.h b/sys/dev/ic/vgavar.h
index ab86092e846..2e11e0f4f9b 100644
--- a/sys/dev/ic/vgavar.h
+++ b/sys/dev/ic/vgavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vgavar.h,v 1.18 2003/01/31 21:57:27 tsutsui Exp $ */
+/* $NetBSD: vgavar.h,v 1.19 2003/02/09 10:29:36 jdolecek Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -193,7 +193,7 @@ int vga_cnattach(bus_space_tag_t, bus_space_tag_t, int, int);
#ifndef VGA_RASTERCONSOLE
struct wsscreen_descr;
-void vga_loadchars(struct vga_handle *, int, int, int, int, char *);
+void vga_loadchars(struct vga_handle *, int, int, int, int, const char *);
void vga_readoutchars(struct vga_handle *, int, int, int, int, char *);
#ifdef VGA_CONSOLE_ATI_BROKEN_FONTSEL
void vga_copyfont01(struct vga_handle *);