diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-25 06:45:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-25 06:45:27 +0000 |
commit | 3e39b250169e8ef15507000e9603f0a5558e90da (patch) | |
tree | bc7d06cc23253bebf59e60d5313c9eab983e0364 /sys/dev/ic | |
parent | 1d7dc5e6a2e9035f5991e4762929b6cf6ec25621 (diff) |
rename wsdisplay alloc_attr() to pack_attr()
Suggested by John Carmack. miod agrees a rename would make sense and
explained it was initially thought drivers may need to allocate storage
but in practice they don't need more than 32 bits for an attribute.
ok mpi@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/sti.c | 12 | ||||
-rw-r--r-- | sys/dev/ic/vga.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index 8be71bcdfa2..098e0da5962 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sti.c,v 1.78 2017/06/11 02:06:36 deraadt Exp $ */ +/* $OpenBSD: sti.c,v 1.79 2020/05/25 06:45:26 jsg Exp $ */ /* * Copyright (c) 2000-2003 Michael Shalayeff @@ -53,7 +53,7 @@ struct cfdriver sti_cd = { NULL, "sti", DV_DULL }; -int sti_alloc_attr(void *, int, int, int, long *); +int sti_pack_attr(void *, int, int, int, long *); int sti_copycols(void *, int, int, int, int); int sti_copyrows(void *, int, int, int); int sti_cursor(void *, int, int, int); @@ -71,7 +71,7 @@ struct wsdisplay_emulops sti_emulops = { .erasecols = sti_erasecols, .copyrows = sti_copyrows, .eraserows = sti_eraserows, - .alloc_attr = sti_alloc_attr, + .pack_attr = sti_pack_attr, .unpack_attr = sti_unpack_attr }; @@ -772,7 +772,7 @@ sti_end_attach_screen(struct sti_softc *sc, struct sti_screen *scr, int console) if (console && !ISSET(sc->sc_flags, STI_ATTACHED)) { long defattr; - sti_alloc_attr(scr, 0, 0, 0, &defattr); + sti_pack_attr(scr, 0, 0, 0, &defattr); wsdisplay_cnattach(&scr->scr_wsd, scr, 0, scr->scr_wsd.nrows - 1, defattr); sc->sc_flags |= STI_ATTACHED; @@ -1205,7 +1205,7 @@ sti_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep, *cookiep = scr; *cxp = 0; *cyp = 0; - sti_alloc_attr(scr, 0, 0, 0, defattr); + sti_pack_attr(scr, 0, 0, 0, defattr); scr->scr_nscreens++; return 0; } @@ -1419,7 +1419,7 @@ sti_eraserows(void *v, int srcrow, int nrows, long attr) } int -sti_alloc_attr(void *v, int fg, int bg, int flags, long *pattr) +sti_pack_attr(void *v, int fg, int bg, int flags, long *pattr) { #if 0 struct sti_screen *scr = (struct sti_screen *)v; diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index cf8bfbab7a8..8e35b14b164 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga.c,v 1.71 2020/05/17 14:06:02 jsg Exp $ */ +/* $OpenBSD: vga.c,v 1.72 2020/05/25 06:45:26 jsg Exp $ */ /* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */ /*- @@ -113,7 +113,7 @@ void vga_pick_monitor_type(struct vga_config *); int vga_mapchar(void *, int, unsigned int *); int vga_putchar(void *, int, int, u_int, long); -int vga_alloc_attr(void *, int, int, int, long *); +int vga_pack_attr(void *, int, int, int, long *); int vga_copyrows(void *, int, int, int); void vga_unpack_attr(void *, long, int *, int *, int *); @@ -125,7 +125,7 @@ static const struct wsdisplay_emulops vga_emulops = { pcdisplay_erasecols, vga_copyrows, pcdisplay_eraserows, - vga_alloc_attr, + vga_pack_attr, vga_unpack_attr }; @@ -439,11 +439,11 @@ vga_init_screen(struct vga_config *vc, struct vgascreen *scr, /* * DEC firmware uses a blue background. */ - res = vga_alloc_attr(scr, WSCOL_WHITE, WSCOL_BLUE, + res = vga_pack_attr(scr, WSCOL_WHITE, WSCOL_BLUE, WSATTR_WSCOLORS, attrp); else #endif - res = vga_alloc_attr(scr, 0, 0, 0, attrp); + res = vga_pack_attr(scr, 0, 0, 0, attrp); #ifdef DIAGNOSTIC if (res) panic("vga_init_screen: attribute botch"); @@ -985,7 +985,7 @@ vga_scrollback(void *v, void *cookie, int lines) } int -vga_alloc_attr(void *id, int fg, int bg, int flags, long *attrp) +vga_pack_attr(void *id, int fg, int bg, int flags, long *attrp) { struct vgascreen *scr = id; struct vga_config *vc = scr->cfg; |