Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev make 'name' and 'data' of struct wsdisplay_font cons...
details: https://anonhg.NetBSD.org/src/rev/c81c1c9155eb
branches: trunk
changeset: 542838:c81c1c9155eb
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Feb 09 10:29:35 2003 +0000
description:
make 'name' and 'data' of struct wsdisplay_font const, mark data arrays
in font sources const
diffstat:
sys/dev/ic/vga.c | 21 +++++++++++----------
sys/dev/ic/vga_subr.c | 6 +++---
sys/dev/ic/vgavar.h | 4 ++--
sys/dev/wscons/wsconsio.h | 6 +++---
sys/dev/wsfont/bold8x16.h | 6 +++---
sys/dev/wsfont/gallant12x22.h | 6 +++---
sys/dev/wsfont/lucida16x29.h | 6 +++---
sys/dev/wsfont/omron12x20.h | 6 +++---
sys/dev/wsfont/qvss8x15.h | 6 +++---
sys/dev/wsfont/sony12x24.h | 6 +++---
sys/dev/wsfont/sony8x16.h | 6 +++---
sys/dev/wsfont/vt220iso8x16.h | 6 +++---
sys/dev/wsfont/vt220l8x10.h | 6 +++---
sys/dev/wsfont/vt220l8x16.h | 6 +++---
sys/dev/wsfont/vt220l8x8.h | 6 +++---
sys/dev/wsfont/wsfont.c | 28 ++++++++++++++++------------
sys/dev/wsfont/wsfont.h | 8 ++++----
17 files changed, 72 insertions(+), 67 deletions(-)
diffs (truncated from 544 to 300 lines):
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/ic/vga.c
--- a/sys/dev/ic/vga.c Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/ic/vga.c Sun Feb 09 10:29:35 2003 +0000
@@ -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 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 @@
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 @@
}
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 @@
#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 -r 6bef622b9f00 -r c81c1c9155eb sys/dev/ic/vga_subr.c
--- a/sys/dev/ic/vga_subr.c Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/ic/vga_subr.c Sun Feb 09 10:29:35 2003 +0000
@@ -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 @@
#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 -r 6bef622b9f00 -r c81c1c9155eb sys/dev/ic/vgavar.h
--- a/sys/dev/ic/vgavar.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/ic/vgavar.h Sun Feb 09 10:29:35 2003 +0000
@@ -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 @@
#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 *);
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/wscons/wsconsio.h
--- a/sys/dev/wscons/wsconsio.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/wscons/wsconsio.h Sun Feb 09 10:29:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsconsio.h,v 1.55 2003/01/31 23:28:30 thomas Exp $ */
+/* $NetBSD: wsconsio.h,v 1.56 2003/02/09 10:29:35 jdolecek Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -331,7 +331,7 @@
* XXX to be changed without care about backwards compatibility!
*/
struct wsdisplay_font {
- char *name;
+ const char *name;
int firstchar, numchars;
int encoding;
#define WSDISPLAY_FONTENC_ISO 0
@@ -345,7 +345,7 @@
#define WSDISPLAY_FONTORDER_KNOWN 0 /* i.e, no need to convert */
#define WSDISPLAY_FONTORDER_L2R 1
#define WSDISPLAY_FONTORDER_R2L 2
- void *data;
+ const void *data;
};
#define WSDISPLAYIO_LDFONT _IOW('W', 77, struct wsdisplay_font)
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/wsfont/bold8x16.h
--- a/sys/dev/wsfont/bold8x16.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/wsfont/bold8x16.h Sun Feb 09 10:29:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bold8x16.h,v 1.6 2003/01/12 13:38:27 tsutsui Exp $ */
+/* $NetBSD: bold8x16.h,v 1.7 2003/02/09 10:29:36 jdolecek Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
* This font lives in the public domain. It it a PC font, IBM encoding,
* which was designed for use with syscons.
*/
-extern u_char bold8x16_data[];
+extern const u_char bold8x16_data[];
struct wsdisplay_font bold8x16 = {
"Boldface", /* typeface name */
@@ -55,7 +55,7 @@
bold8x16_data /* data */
};
-static u_char bold8x16_data[] = {
+static const u_char bold8x16_data[] = {
/* 0x01 */
0x00, /* ........ */
0x00, /* ........ */
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/wsfont/gallant12x22.h
--- a/sys/dev/wsfont/gallant12x22.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/wsfont/gallant12x22.h Sun Feb 09 10:29:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gallant12x22.h,v 1.3 2000/01/05 18:44:23 ad Exp $ */
+/* $NetBSD: gallant12x22.h,v 1.4 2003/02/09 10:29:36 jdolecek Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
* Derived from: @(#)gallant19.h 8.1 (Berkeley) 6/11/93
*/
-extern u_char gallant12x22_data[];
+extern const u_char gallant12x22_data[];
struct wsdisplay_font gallant12x22 = {
"Gallant", /* typeface name */
@@ -54,7 +54,7 @@
gallant12x22_data /* data */
};
-static u_char gallant12x22_data[] = {
+static const u_char gallant12x22_data[] = {
/* */
0x00, 0x00, /* ............ */
0x00, 0x00, /* ............ */
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/wsfont/lucida16x29.h
--- a/sys/dev/wsfont/lucida16x29.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/wsfont/lucida16x29.h Sun Feb 09 10:29:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lucida16x29.h,v 1.4 2000/01/05 18:44:24 ad Exp $ */
+/* $NetBSD: lucida16x29.h,v 1.5 2003/02/09 10:29:36 jdolecek Exp $ */
/*
@@ -63,7 +63,7 @@
*/
-extern u_char lucida16x29_data[];
+extern const u_char lucida16x29_data[];
struct wsdisplay_font lucida16x29 = {
"Lucida", /* typeface name */
@@ -78,7 +78,7 @@
lucida16x29_data /* data */
};
-static u_char lucida16x29_data[] = {
+static const u_char lucida16x29_data[] = {
/* */
0x00, 0x00, /* ................ */
0x00, 0x00, /* ................ */
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/wsfont/omron12x20.h
--- a/sys/dev/wsfont/omron12x20.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/wsfont/omron12x20.h Sun Feb 09 10:29:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omron12x20.h,v 1.1 2000/11/24 15:47:15 tsutsui Exp $ */
+/* $NetBSD: omron12x20.h,v 1.2 2003/02/09 10:29:36 jdolecek Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
* Copyright (c) 1992, 1993
@@ -44,7 +44,7 @@
* This file is generated from sys/luna68k/font/font.c in 4.4BSD-Lite2.
*/
-extern u_char omron12x20_data[];
+extern const u_char omron12x20_data[];
struct wsdisplay_font omron12x20 = {
"omron12x20", /* typeface name */
@@ -59,7 +59,7 @@
omron12x20_data /* data */
};
-static u_char omron12x20_data[] = {
+static const u_char omron12x20_data[] = {
/* 0x20 (' ') */
0x00, 0x00, /* ............ */
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/wsfont/qvss8x15.h
--- a/sys/dev/wsfont/qvss8x15.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/wsfont/qvss8x15.h Sun Feb 09 10:29:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qvss8x15.h,v 1.4 2000/01/05 18:44:24 ad Exp $ */
+/* $NetBSD: qvss8x15.h,v 1.5 2003/02/09 10:29:36 jdolecek Exp $ */
/*-
* Copyright (c) 1982, 1986
@@ -72,7 +72,7 @@
* *
************************************************************************/
-extern u_char qvss8x15_data[];
+extern const u_char qvss8x15_data[];
struct wsdisplay_font qvss8x15 = {
"QVSS", /* typeface name */
@@ -87,7 +87,7 @@
qvss8x15_data /* data */
};
-static u_char qvss8x15_data[] = {
+static const u_char qvss8x15_data[] = {
/* */
0x00, /* 0x00000000 */
0x00, /* 0x00000000 */
diff -r 6bef622b9f00 -r c81c1c9155eb sys/dev/wsfont/sony12x24.h
--- a/sys/dev/wsfont/sony12x24.h Sun Feb 09 10:06:16 2003 +0000
+++ b/sys/dev/wsfont/sony12x24.h Sun Feb 09 10:29:35 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sony12x24.h,v 1.3 2001/03/30 13:06:46 tsutsui Exp $ */
+/* $NetBSD: sony12x24.h,v 1.4 2003/02/09 10:29:37 jdolecek Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -41,7 +41,7 @@
/* This font data is generated from sys/arch/newsmips/dev/fnt24.c */
-extern u_char sony12x24_data[];
+extern const u_char sony12x24_data[];
struct wsdisplay_font sony12x24 = {
"sony12x24", /* typeface name */
@@ -56,7 +56,7 @@
sony12x24_data /* data */
};
-static u_char sony12x24_data[] = {
+static const u_char sony12x24_data[] = {
Home |
Main Index |
Thread Index |
Old Index