diff options
author | 2006-11-29 19:08:19 +0000 | |
---|---|---|
committer | 2006-11-29 19:08:19 +0000 | |
commit | a31602381b164e46427917bf9f2a8c1ee13f45d2 (patch) | |
tree | 7153aee065223483a4a3a94738823f3fc6f195c7 /sys/dev/rasops | |
parent | Limit the number of openings to 1 for now, there're still bugs. (diff) | |
download | wireguard-openbsd-a31602381b164e46427917bf9f2a8c1ee13f45d2.tar.xz wireguard-openbsd-a31602381b164e46427917bf9f2a8c1ee13f45d2.zip |
Add an unpack_attr function to struct wsdisplay_emulops, to match the
existing alloc_attr function. This allows rasops_unpack_attr to be kept
private to rasops, yet available to the screen drivers.
Diffstat (limited to 'sys/dev/rasops')
-rw-r--r-- | sys/dev/rasops/rasops.c | 8 | ||||
-rw-r--r-- | sys/dev/rasops/rasops.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c index 4f73593796c..7e2ca53c5ac 100644 --- a/sys/dev/rasops/rasops.c +++ b/sys/dev/rasops/rasops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops.c,v 1.14 2006/03/10 20:03:38 miod Exp $ */ +/* $OpenBSD: rasops.c,v 1.15 2006/11/29 19:08:22 miod Exp $ */ /* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */ /*- @@ -146,6 +146,7 @@ int rasops_alloc_cattr(void *, int, int, int, long *); int rasops_alloc_mattr(void *, int, int, int, long *); void rasops_do_cursor(struct rasops_info *); void rasops_init_devcmap(struct rasops_info *); +void rasops_unpack_attr(void *, long, int *, int *, int *); #if NRASOPS_ROTATION > 0 void rasops_copychar(void *, int, int, int, int); @@ -347,6 +348,7 @@ rasops_reconfig(ri, wantrows, wantcols) ri->ri_ops.erasecols = rasops_erasecols; ri->ri_ops.eraserows = rasops_eraserows; ri->ri_ops.cursor = rasops_cursor; + ri->ri_ops.unpack_attr = rasops_unpack_attr; ri->ri_do_cursor = rasops_do_cursor; ri->ri_updatecursor = NULL; @@ -808,11 +810,11 @@ rasops_init_devcmap(ri) * Unpack a rasops attribute */ void -rasops_unpack_attr(attr, fg, bg, underline) +rasops_unpack_attr(cookie, attr, fg, bg, underline) + void *cookie; long attr; int *fg, *bg, *underline; { - *fg = ((u_int)attr >> 24) & 0xf; *bg = ((u_int)attr >> 16) & 0xf; if (underline != NULL) diff --git a/sys/dev/rasops/rasops.h b/sys/dev/rasops/rasops.h index a26db058326..35fc997b44c 100644 --- a/sys/dev/rasops/rasops.h +++ b/sys/dev/rasops/rasops.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops.h,v 1.7 2005/09/15 20:23:10 miod Exp $ */ +/* $OpenBSD: rasops.h,v 1.8 2006/11/29 19:08:22 miod Exp $ */ /* $NetBSD: rasops.h,v 1.13 2000/06/13 13:36:54 ad Exp $ */ /*- @@ -152,7 +152,6 @@ void rasops32_init(struct rasops_info *); /* rasops.c */ int rasops_init(struct rasops_info *, int, int); int rasops_reconfig(struct rasops_info *, int, int); -void rasops_unpack_attr(long, int *, int *, int *); void rasops_eraserows(void *, int, int, long); void rasops_erasecols(void *, int, int, int, long); |