summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wsdisplayvar.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-05-25 09:55:50 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-05-25 09:55:50 +0000
commit9e5735df00975584d6cf6bc08dbd76eabfee6fac (patch)
treeb53b6f9533ffd09189205a870c4acea54dbed001 /sys/dev/wscons/wsdisplayvar.h
parent2c743ea363c5f913f013bb5b9402bcbea962c0a3 (diff)
change wsdisplay attribute type from long to uint32_t
miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
Diffstat (limited to 'sys/dev/wscons/wsdisplayvar.h')
-rw-r--r--sys/dev/wscons/wsdisplayvar.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h
index c98824f564d..a84bbc35ed2 100644
--- a/sys/dev/wscons/wsdisplayvar.h
+++ b/sys/dev/wscons/wsdisplayvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplayvar.h,v 1.36 2020/05/25 06:45:26 jsg Exp $ */
+/* $OpenBSD: wsdisplayvar.h,v 1.37 2020/05/25 09:55:49 jsg Exp $ */
/* $NetBSD: wsdisplayvar.h,v 1.30 2005/02/04 02:10:49 perry Exp $ */
/*
@@ -73,14 +73,17 @@ struct device;
struct wsdisplay_emulops {
int (*cursor)(void *c, int on, int row, int col);
int (*mapchar)(void *, int, unsigned int *);
- int (*putchar)(void *c, int row, int col, u_int uc, long attr);
+ int (*putchar)(void *c, int row, int col, u_int uc, uint32_t attr);
int (*copycols)(void *c, int row, int srccol, int dstcol,
int ncols);
- int (*erasecols)(void *c, int row, int startcol, int ncols, long);
+ int (*erasecols)(void *c, int row, int startcol, int ncols,
+ uint32_t);
int (*copyrows)(void *c, int srcrow, int dstrow, int nrows);
- int (*eraserows)(void *c, int row, int nrows, long attr);
- int (*pack_attr)(void *c, int fg, int bg, int flags, long *attrp);
- void (*unpack_attr)(void *c, long attr, int *fg, int *bg, int *ul);
+ int (*eraserows)(void *c, int row, int nrows, uint32_t attr);
+ int (*pack_attr)(void *c, int fg, int bg, int flags,
+ uint32_t *attrp);
+ void (*unpack_attr)(void *c, uint32_t attr, int *fg, int *bg,
+ int *ul);
/* fg / bg values. Made identical to ANSI terminal color codes. */
#define WSCOL_BLACK 0
#define WSCOL_RED 1
@@ -117,8 +120,8 @@ struct wsscreen_descr {
* Character cell description (for emulation mode).
*/
struct wsdisplay_charcell {
- u_int uc;
- long attr;
+ u_int uc;
+ uint32_t attr;
};
struct wsdisplay_font;
@@ -134,7 +137,7 @@ struct wsdisplay_accessops {
struct proc *p);
paddr_t (*mmap)(void *v, off_t off, int prot);
int (*alloc_screen)(void *, const struct wsscreen_descr *,
- void **, int *, int *, long *);
+ void **, int *, int *, uint32_t *);
void (*free_screen)(void *, void *);
int (*show_screen)(void *, void *, int,
void (*) (void *, int, int), void *);
@@ -188,7 +191,7 @@ struct wscons_syncops {
* Autoconfiguration helper functions.
*/
void wsdisplay_cnattach(const struct wsscreen_descr *, void *,
- int, int, long);
+ int, int, uint32_t);
int wsemuldisplaydevprint(void *, const char *);
int wsemuldisplaydevsubmatch(struct device *, void *, void *);