- Squash a few stylish nits.
- Move font flags to wsfont.h. There is a point to this. I'll remember soon.
This commit is contained in:
parent
977e07ff58
commit
a8112faedb
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsfont.c,v 1.9 1999/12/04 13:35:42 ad Exp $ */
|
||||
/* $NetBSD: wsfont.c,v 1.10 1999/12/14 22:35:17 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.9 1999/12/04 13:35:42 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.10 1999/12/14 22:35:17 ad Exp $");
|
||||
|
||||
#include "opt_wsfont.h"
|
||||
|
||||
@ -100,9 +100,6 @@ struct font {
|
||||
u_char byteorder; /* XXX move to wsdisplay_font */
|
||||
};
|
||||
|
||||
#define WSFONT_BUILTIN (0x01)
|
||||
#define WSFONT_STATIC (0x02)
|
||||
|
||||
/* Our list of built-in fonts */
|
||||
static struct font *list, builtin_fonts[] = {
|
||||
#ifdef FONT_BOLD8x16
|
||||
@ -380,13 +377,13 @@ wsfont_remove(cookie)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if ((ent->flg & WSFONT_BUILTIN) || ent->lockcount != 0) {
|
||||
if ((ent->flg & WSFONT_BUILTIN) != 0 || ent->lockcount != 0) {
|
||||
splx(s);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Don't free statically allocated font data */
|
||||
if (!(ent->flg & WSFONT_STATIC)) {
|
||||
if ((ent->flg & WSFONT_STATIC) != 0) {
|
||||
FREE(ent->font->data, M_DEVBUF);
|
||||
FREE(ent->font, M_DEVBUF);
|
||||
}
|
||||
@ -482,7 +479,6 @@ wsfont_unlock(cookie)
|
||||
if ((ent = wsfont_find0(cookie)) != NULL) {
|
||||
if (ent->lockcount == 0)
|
||||
panic("wsfont_unlock: font not locked\n");
|
||||
|
||||
lc = --ent->lockcount;
|
||||
} else
|
||||
lc = -1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsfont.h,v 1.7 1999/12/04 13:35:43 ad Exp $ */
|
||||
/* $NetBSD: wsfont.h,v 1.8 1999/12/14 22:35:17 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -68,13 +68,18 @@ struct wsdisplay_font;
|
||||
#define WSFONT_L2R (1)
|
||||
#define WSFONT_R2L (2)
|
||||
|
||||
/* For wsfont_add() */
|
||||
#define WSFONT_BUILTIN (0x01)
|
||||
#define WSFONT_STATIC (0x02)
|
||||
|
||||
/* wsfont.c */
|
||||
void wsfont_init __P((void));
|
||||
int wsfont_find __P((char *name, int width, int height, int stride));
|
||||
int wsfont_add __P((struct wsdisplay_font *font, int copy));
|
||||
int wsfont_remove __P((int cookie));
|
||||
void wsfont_enum __P((void (*func) __P((char *n, int w, int h, int s))));
|
||||
int wsfont_lock __P((int cookie, struct wsdisplay_font **font, int, int));
|
||||
int wsfont_unlock __P((int cookie));
|
||||
int wsfont_getflg __P((int cookie, int *flg, int *lockcount));
|
||||
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 *));
|
||||
|
||||
#endif /* !_WSFONT_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user