Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wsfont ANSIfy.
details: https://anonhg.NetBSD.org/src/rev/099beb2dd2b8
branches: trunk
changeset: 516015:099beb2dd2b8
user: augustss <augustss%NetBSD.org@localhost>
date: Sat Oct 13 16:05:42 2001 +0000
description:
ANSIfy.
diffstat:
sys/dev/wsfont/wsfont.c | 55 +++++++++++++++------------------------------
sys/dev/wsfont/wsfont.h | 26 ++++++++++----------
sys/dev/wsfont/wsfontdev.c | 22 ++++--------------
3 files changed, 37 insertions(+), 66 deletions(-)
diffs (253 lines):
diff -r 0413399bf006 -r 099beb2dd2b8 sys/dev/wsfont/wsfont.c
--- a/sys/dev/wsfont/wsfont.c Sat Oct 13 15:59:01 2001 +0000
+++ b/sys/dev/wsfont/wsfont.c Sat Oct 13 16:05:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfont.c,v 1.21 2001/09/03 17:04:11 drochner Exp $ */
+/* $NetBSD: wsfont.c,v 1.22 2001/10/13 16:05:42 augustss Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.21 2001/09/03 17:04:11 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.22 2001/10/13 16:05:42 augustss Exp $");
#include "opt_wsfont.h"
@@ -187,16 +187,15 @@
0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
};
-static struct font *wsfont_find0 __P((int));
-static void wsfont_revbit __P((struct wsdisplay_font *));
-static void wsfont_revbyte __P((struct wsdisplay_font *));
+static struct font *wsfont_find0(int);
+static void wsfont_revbit(struct wsdisplay_font *);
+static void wsfont_revbyte(struct wsdisplay_font *);
/*
* Reverse the bit order of a font
*/
static void
-wsfont_revbit(font)
- struct wsdisplay_font *font;
+wsfont_revbit(struct wsdisplay_font *font)
{
u_char *p, *m;
@@ -211,8 +210,7 @@
* Reverse the byte order of a font
*/
static void
-wsfont_revbyte(font)
- struct wsdisplay_font *font;
+wsfont_revbyte(struct wsdisplay_font *font)
{
int x, l, r, nr;
u_char *rp;
@@ -242,8 +240,7 @@
* Enumarate the list of fonts
*/
void
-wsfont_enum(cb)
- void (*cb) __P((char *, int, int, int));
+wsfont_enum(void (*cb)(char *, int, int, int))
{
struct wsdisplay_font *f;
struct font *ent;
@@ -282,8 +279,7 @@
* Find a font by cookie. Called at splhigh.
*/
static struct font *
-wsfont_find0(cookie)
- int cookie;
+wsfont_find0(int cookie)
{
struct font *ent;
@@ -295,10 +291,8 @@
}
int
-wsfont_matches(font, name, width, height, stride)
- struct wsdisplay_font *font;
- char *name;
- int width, height, stride;
+wsfont_matches(struct wsdisplay_font *font, char *name,
+ int width, int height, int stride)
{
if (height != 0 && font->fontheight != height)
@@ -320,9 +314,7 @@
* Find a font.
*/
int
-wsfont_find(name, width, height, stride)
- char *name;
- int width, height, stride;
+wsfont_find(char *name, int width, int height, int stride)
{
struct font *ent;
int s;
@@ -344,9 +336,7 @@
* Add a font to the list.
*/
int
-wsfont_add(font, copy)
- struct wsdisplay_font *font;
- int copy;
+wsfont_add(struct wsdisplay_font *font, int copy)
{
static int cookiegen = 666;
struct font *ent;
@@ -398,8 +388,7 @@
* Remove a font.
*/
int
-wsfont_remove(cookie)
- int cookie;
+wsfont_remove(int cookie)
{
struct font *ent;
int s;
@@ -443,10 +432,8 @@
* requested by the caller differs.
*/
int
-wsfont_lock(cookie, ptr, bitorder, byteorder)
- int cookie;
- struct wsdisplay_font **ptr;
- int bitorder, byteorder;
+wsfont_lock(int cookie, struct wsdisplay_font **ptr,
+ int bitorder, int byteorder)
{
struct font *ent;
int s, lc;
@@ -485,8 +472,7 @@
* Get font flags and lockcount.
*/
int
-wsfont_getflg(cookie, flg, lc)
- int cookie, *flg, *lc;
+wsfont_getflg(int cookie, int *flg, int *lc)
{
struct font *ent;
int s;
@@ -506,8 +492,7 @@
* Unlock a given font and return new lockcount.
*/
int
-wsfont_unlock(cookie)
- int cookie;
+wsfont_unlock(int cookie)
{
struct font *ent;
int s, lc;
@@ -706,9 +691,7 @@
* Remap Unicode character to glyph
*/
int
-wsfont_map_unichar(font, c)
- struct wsdisplay_font *font;
- int c;
+wsfont_map_unichar(struct wsdisplay_font *font, int c)
{
if (font->encoding == WSDISPLAY_FONTENC_ISO) {
diff -r 0413399bf006 -r 099beb2dd2b8 sys/dev/wsfont/wsfont.h
--- a/sys/dev/wsfont/wsfont.h Sat Oct 13 15:59:01 2001 +0000
+++ b/sys/dev/wsfont/wsfont.h Sat Oct 13 16:05:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfont.h,v 1.14 2001/09/03 17:04:11 drochner Exp $ */
+/* $NetBSD: wsfont.h,v 1.15 2001/10/13 16:05:42 augustss Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -72,17 +72,17 @@
#define WSFONT_RDONLY (0x04)
/* wsfont.c */
-void wsfont_init __P((void));
-int wsfont_matches __P((struct wsdisplay_font *, char *, int, int, int));
-int wsfont_find __P((char *, int, int, int));
-int wsfont_add __P((struct wsdisplay_font *, int));
-int wsfont_remove __P((int));
-void wsfont_enum __P((void (*) __P((char *, int, int, int))));
-int wsfont_lock __P((int, struct wsdisplay_font **, int, int));
-int wsfont_unlock __P((int));
-int wsfont_getflg __P((int, int *, int *));
-int wsfont_map_unichar __P((struct wsdisplay_font *, int));
-int wsfont_add __P((struct wsdisplay_font *, int));
-int wsfont_remove __P((int));
+void wsfont_init(void);
+int wsfont_matches(struct wsdisplay_font *, char *, int, int, int);
+int wsfont_find(char *, int, int, int);
+int wsfont_add(struct wsdisplay_font *, int);
+int wsfont_remove(int);
+void wsfont_enum(void (*)(char *, int, int, int));
+int wsfont_lock(int, struct wsdisplay_font **, int, int);
+int wsfont_unlock(int);
+int wsfont_getflg(int, int *, int *);
+int wsfont_map_unichar(struct wsdisplay_font *, int);
+int wsfont_add(struct wsdisplay_font *, int);
+int wsfont_remove(int);
#endif /* !_WSFONT_H_ */
diff -r 0413399bf006 -r 099beb2dd2b8 sys/dev/wsfont/wsfontdev.c
--- a/sys/dev/wsfont/wsfontdev.c Sat Oct 13 15:59:01 2001 +0000
+++ b/sys/dev/wsfont/wsfontdev.c Sat Oct 13 16:05:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfontdev.c,v 1.1 2001/09/03 17:05:20 drochner Exp $ */
+/* $NetBSD: wsfontdev.c,v 1.2 2001/10/13 16:05:42 augustss Exp $ */
/*
* Copyright (c) 2001
@@ -41,18 +41,14 @@
static int wsfont_isopen;
void
-wsfontattach(n)
- int n;
+wsfontattach(int n)
{
wsfont_init();
}
int
-wsfontopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+wsfontopen(dev_t dev, int flag, int mode, struct proc *p)
{
if (wsfont_isopen)
@@ -62,10 +58,7 @@
}
int
-wsfontclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+wsfontclose(dev_t dev, int flag, int mode, struct proc *p)
{
wsfont_isopen = 0;
@@ -73,12 +66,7 @@
}
int
-wsfontioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+wsfontioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
char nbuf[16];
void *buf;
Home |
Main Index |
Thread Index |
Old Index