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/rasops.c | |
| 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/rasops.c')
| -rw-r--r-- | sys/dev/rasops/rasops.c | 8 |
1 files changed, 5 insertions, 3 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) |
