On Sun, May 17, 2020 at 02:20:08PM +1000, Jonathan Gray wrote:
> On Sat, May 16, 2020 at 12:13:37PM -0700, [email protected] wrote:
> > (Not sure if this belongs in tech@ or misc@)
>
> I think tech@ is fine for discussion of code.
>
> >
> > What is the thinking around non-functional code changes that just
> > improve clarity without functionality changes? I can imagine bad
> > experiences with that, but there is certainly room for improvement.
>
> Split out from any functional changes I don't see a problem.
>
> >
> > For instance, in the wsdisplay_emulops structure, there are:
> >
> > int (*alloc_attr)(void *c, int fg, int bg, int flags, long *attrp);
> > void (*unpack_attr)(void *c, long attr, int *fg, int *bg, int *ul);
> >
> > And at the end of the structure is this comment, showing that at
> > least someone (other than me) was confused by it:
> > /* XXX need a free_attr() ??? */
> >
> > I would suggest that alloc_attr should be renamed to pack_attr, but
> > there are 84 matches on alloc_attr across 39 unique files.
>
> While alloc_attr() predates unpack_attr() I agree that pack_attr()
> would be a better name. And yes it seems quite a few drivers
> across multiple architectures would need to be changed.
here is a rename diff
It is clear that alpha tc fbs are not built as we don't have
dev/rcons/raster.h etc in the tree.
diff --git sys/arch/alpha/tc/cfb.c sys/arch/alpha/tc/cfb.c
index e2b9e7bff7a..64b1f3f32f9 100644
--- sys/arch/alpha/tc/cfb.c
+++ sys/arch/alpha/tc/cfb.c
@@ -77,7 +77,7 @@ struct wsdisplay_emulops cfb_emulfuncs = {
rcons_erasecols,
rcons_copyrows,
rcons_eraserows,
- rcons_alloc_attr
+ rcons_pack_attr
};
struct wsscreen_descr cfb_stdscreen = {
@@ -341,7 +341,7 @@ cfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
*cookiep = &sc->sc_dc->dc_rcons; /* one and only for now */
*curxp = 0;
*curyp = 0;
- rcons_alloc_attr(&sc->sc_dc->dc_rcons, 0, 0, 0, &defattr);
+ rcons_pack_attr(&sc->sc_dc->dc_rcons, 0, 0, 0, &defattr);
*attrp = defattr;
sc->nscreens++;
return(0);
@@ -381,7 +381,7 @@ cfb_cnattach(addr)
cfb_getdevconfig(addr, dcp);
- rcons_alloc_attr(&dcp->dc_rcons, 0, 0, 0, &defattr);
+ rcons_pack_attr(&dcp->dc_rcons, 0, 0, 0, &defattr);
wsdisplay_cnattach(&cfb_stdscreen, &dcp->dc_rcons,
0,0, defattr;);
diff --git sys/arch/alpha/tc/sfb.c sys/arch/alpha/tc/sfb.c
index 81b80e09ee8..b491b03d30f 100644
--- sys/arch/alpha/tc/sfb.c
+++ sys/arch/alpha/tc/sfb.c
@@ -77,7 +77,7 @@ struct wsdisplay_emulops sfb_emulfuncs = {
rcons_erasecols,
rcons_copyrows,
rcons_eraserows,
- rcons_alloc_attr
+ rcons_pack_attr
};
struct wsscreen_descr sfb_stdscreen = {
@@ -374,7 +374,7 @@ sfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
*cookiep = &sc->sc_dc->dc_rcons; /* one and only for now */
*curxp = 0;
*curyp = 0;
- rcons_alloc_attr(&sc->sc_dc->dc_rcons, 0, 0, 0, &defattr);
+ rcons_pack_attr(&sc->sc_dc->dc_rcons, 0, 0, 0, &defattr);
*attrp = defattr;
sc->nscreens++;
return (0);
@@ -415,7 +415,7 @@ sfb_cnattach(addr)
sfb_getdevconfig(addr, dcp);
- rcons_alloc_attr(&dcp->dc_rcons, 0, 0, 0, &defattr);
+ rcons_pack_attr(&dcp->dc_rcons, 0, 0, 0, &defattr);
wsdisplay_cnattach(&sfb_stdscreen, &dcp->dc_rcons,
0, 0, defattr);
diff --git sys/arch/amd64/amd64/efifb.c sys/arch/amd64/amd64/efifb.c
index 69d6a01bad4..eb62ae07137 100644
--- sys/arch/amd64/amd64/efifb.c
+++ sys/arch/amd64/amd64/efifb.c
@@ -222,7 +222,7 @@ efifb_attach(struct device *parent, struct device *self,
void *aux)
rasops_init(ri, efifb_std_descr.nrows, efifb_std_descr.ncols);
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&efifb_std_descr, ri->ri_active, ccol, crow,
defattr);
}
@@ -445,7 +445,7 @@ efifb_cnattach_common(void)
efifb_std_descr.fontheight = ri->ri_font->fontheight;
efifb_std_descr.capabilities = ri->ri_caps;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&efifb_std_descr, ri, 0, 0, defattr);
}
diff --git sys/arch/armv7/exynos/exdisplay.c sys/arch/armv7/exynos/exdisplay.c
index a80171fcc2b..41390aeb864 100644
--- sys/arch/armv7/exynos/exdisplay.c
+++ sys/arch/armv7/exynos/exdisplay.c
@@ -152,7 +152,7 @@ exdisplay_attach(struct device *parent, struct device
*self, void *args)
ri->ri_bits = (u_char *)sc->sc_fbioh;
exdisplay_setup_rasops(ri, &exdisplay_stdscreen);
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&exdisplay_stdscreen, ri->ri_active,
0, 0, defattr);
}
@@ -184,7 +184,7 @@ exdisplay_cnattach(bus_space_tag_t iot, bus_addr_t iobase,
size_t size)
exdisplay_setup_rasops(ri, descr);
/* assumes 16 bpp */
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(descr, ri, ri->ri_ccol, ri->ri_crow, defattr);
diff --git sys/arch/armv7/omap/omdisplay.c sys/arch/armv7/omap/omdisplay.c
index 7935b36ce19..01aa0dc4700 100644
--- sys/arch/armv7/omap/omdisplay.c
+++ sys/arch/armv7/omap/omdisplay.c
@@ -1170,7 +1170,7 @@ omdisplay_alloc_screen(void *v, const struct
wsscreen_descr *_type,
omdisplay_setup_rasops(sc, ri);
/* assumes 16 bpp */
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, attrp);
*cookiep = ri;
*curxp = 0;
diff --git sys/arch/loongson/dev/radeonfb.c sys/arch/loongson/dev/radeonfb.c
index 294910452b6..f8e14f2f742 100644
--- sys/arch/loongson/dev/radeonfb.c
+++ sys/arch/loongson/dev/radeonfb.c
@@ -263,7 +263,7 @@ radeonfb_alloc_screen(void *v, const struct wsscreen_descr
*type,
*cookiep = ri;
*curxp = *curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, attrp);
sc->sc_nscr++;
return 0;
@@ -722,7 +722,7 @@ radeonfb_cnattach(bus_space_tag_t memt, bus_space_tag_t
iot, pcitag_t tag,
return rc;
ri = &radeonfbcn.ri;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&radeonfbcn.wsd, ri, 0, 0, defattr);
return 0;
diff --git sys/arch/loongson/dev/sisfb.c sys/arch/loongson/dev/sisfb.c
index 4268ea1d8dc..a8b31f6272e 100644
--- sys/arch/loongson/dev/sisfb.c
+++ sys/arch/loongson/dev/sisfb.c
@@ -278,7 +278,7 @@ sisfb_alloc_screen(void *v, const struct wsscreen_descr
*type, void **cookiep,
*cookiep = ri;
*curxp = *curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, attrp);
sc->sc_nscr++;
return 0;
@@ -652,7 +652,7 @@ sisfb_cnattach(bus_space_tag_t memt, bus_space_tag_t iot,
pcitag_t tag,
return rc;
ri = &sisfbcn.ri;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&sisfbcn.wsd, ri, 0, 0, defattr);
return 0;
diff --git sys/arch/loongson/dev/smfb.c sys/arch/loongson/dev/smfb.c
index cc104bdc234..ff4044864a8 100644
--- sys/arch/loongson/dev/smfb.c
+++ sys/arch/loongson/dev/smfb.c
@@ -251,7 +251,7 @@ smfb_alloc_screen(void *v, const struct wsscreen_descr
*type, void **cookiep,
*cookiep = ri;
*curxp = *curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, attrp);
sc->sc_nscr++;
return 0;
@@ -721,7 +721,7 @@ smfb_cnattach(bus_space_tag_t memt, bus_space_tag_t iot,
pcitag_t tag,
return rc;
ri = &smfbcn.ri;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&smfbcn.wsd, ri, 0, 0, defattr);
return 0;
diff --git sys/arch/luna88k/dev/lunafb.c sys/arch/luna88k/dev/lunafb.c
index 80d39488b9c..926caa96a14 100644
--- sys/arch/luna88k/dev/lunafb.c
+++ sys/arch/luna88k/dev/lunafb.c
@@ -221,7 +221,7 @@ omfb_cnattach(void)
long defattr;
omfb_getdevconfig(OMFB_FB_WADDR, dc);
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&omfb_stdscreen, ri, 0, 0, defattr);
omfb_console = 1;
return (0);
@@ -480,7 +480,7 @@ omfb_alloc_screen(void *v, const struct wsscreen_descr
*type, void **cookiep,
*cookiep = ri;
*curxp = 0;
*curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, attrp);
sc->nscreens++;
return (0);
}
diff --git sys/arch/luna88k/dev/omrasops.c sys/arch/luna88k/dev/omrasops.c
index 5c7cb6f2b15..2e6c5214f97 100644
--- sys/arch/luna88k/dev/omrasops.c
+++ sys/arch/luna88k/dev/omrasops.c
@@ -74,7 +74,7 @@ int om4_windowmove(struct rasops_info *, u_int16_t,
u_int16_t, u_int16_t,
u_int16_t, u_int16_t, u_int16_t, int16_t, int16_t);
/* MI function in src/sys/dev/rasops/rasops.c */
-int rasops_alloc_cattr(void *, int, int, int, long *);
+int rasops_pack_cattr(void *, int, int, int, long *);
static int (*om_windowmove)(struct rasops_info *, u_int16_t, u_int16_t,
u_int16_t, u_int16_t, u_int16_t, u_int16_t, int16_t, int16_t);
@@ -534,8 +534,8 @@ setup_omrasops4(struct rasops_info *ri)
= WSSCREEN_HILIT | WSSCREEN_WSCOLORS | WSSCREEN_REVERSE;
/*
* Since we set ri->ri_depth == 1, rasops_init() set
- * rasops_alloc_mattr for us. But we use the color version,
- * rasops_alloc_cattr, on 4bpp/8bpp frame buffer.
+ * rasops_pack_mattr for us. But we use the color version,
+ * rasops_pack_cattr, on 4bpp/8bpp frame buffer.
*/
- ri->ri_ops.alloc_attr = rasops_alloc_cattr;
+ ri->ri_ops.pack_attr = rasops_pack_cattr;
}
diff --git sys/arch/macppc/macppc/ofw_machdep.c
sys/arch/macppc/macppc/ofw_machdep.c
index ed9232f80c8..76e6c136630 100644
--- sys/arch/macppc/macppc/ofw_machdep.c
+++ sys/arch/macppc/macppc/ofw_machdep.c
@@ -511,7 +511,7 @@ of_display_console(void)
fb->ofw_wsd.fontheight = ri->ri_font->fontheight;
#endif
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&fb->ofw_wsd, ri, 0, 0, defattr);
}
#endif
diff --git sys/arch/macppc/pci/vgafb.c sys/arch/macppc/pci/vgafb.c
index 1e9def6fcca..73a8e90b6c9 100644
--- sys/arch/macppc/pci/vgafb.c
+++ sys/arch/macppc/pci/vgafb.c
@@ -196,7 +196,7 @@ vgafb_console_init(struct vgafb_softc *sc)
sc->sc_wsd.fontwidth = ri->ri_font->fontwidth;
sc->sc_wsd.fontheight = ri->ri_font->fontheight;
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&sc->sc_wsd, ri->ri_active, ri->ri_ccol, ri->ri_crow,
defattr);
diff --git sys/arch/sgi/dev/gbe.c sys/arch/sgi/dev/gbe.c
index fb862387e9c..2b45b927725 100644
--- sys/arch/sgi/dev/gbe.c
+++ sys/arch/sgi/dev/gbe.c
@@ -401,7 +401,7 @@ gbe_attach(struct device *parent, struct device *self, void
*aux)
/* Attach as console if necessary. */
if (strncmp(bios_console, "video", 5) == 0) {
- screen->ri.ri_ops.alloc_attr(&screen->ri, 0, 0, 0, &attr);
+ screen->ri.ri_ops.pack_attr(&screen->ri, 0, 0, 0, &attr);
wsdisplay_cnattach(&gbe_stdscreen, &screen->ri, 0, 0, attr);
gsc->console = 1;
}
@@ -964,7 +964,7 @@ gbe_alloc_screen(void *v, const struct wsscreen_descr
*type, void **cookiep,
*curyp = 0;
/* Correct screen attributes. */
- screen->ri.ri_ops.alloc_attr(&screen->ri, 0, 0, 0, attrp);
+ screen->ri.ri_ops.pack_attr(&screen->ri, 0, 0, 0, attrp);
return (0);
}
@@ -1402,7 +1402,7 @@ gbe_cnattach(bus_space_tag_t iot, bus_addr_t addr)
/*
* Attach wsdisplay.
*/
- gbe_consdata.ri.ri_ops.alloc_attr(&gbe_consdata.ri, 0, 0, 0, &attr);
+ gbe_consdata.ri.ri_ops.pack_attr(&gbe_consdata.ri, 0, 0, 0, &attr);
wsdisplay_cnattach(&gbe_stdscreen, &gbe_consdata.ri, 0, 0, attr);
gbe_console = 1;
diff --git sys/arch/sgi/dev/impact.c sys/arch/sgi/dev/impact.c
index 7c181e267e6..85ce81e2006 100644
--- sys/arch/sgi/dev/impact.c
+++ sys/arch/sgi/dev/impact.c
@@ -448,7 +448,7 @@ impact_alloc_screen(void *v, const struct wsscreen_descr
*type,
*cookiep = ri;
*curxp = 0;
*curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &scr->defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &scr->defattr);
*attrp = scr->defattr;
return 0;
@@ -769,7 +769,7 @@ impact_cnattach_common(bus_space_tag_t iot,
bus_space_handle_t ioh, int has_hq4)
if (rc != 0)
return rc;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &scr->defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &scr->defattr);
wsdisplay_cnattach(&scr->wsd, ri, 0, 0, scr->defattr);
return 0;
diff --git sys/arch/sgi/gio/grtwo.c sys/arch/sgi/gio/grtwo.c
index 85065c79453..ce87c4ce1f3 100644
--- sys/arch/sgi/gio/grtwo.c
+++ sys/arch/sgi/gio/grtwo.c
@@ -469,7 +469,7 @@ grtwo_cnattach(struct gio_attach_args *ga)
if (rc != 0)
return rc;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
cell = grtwo_console_bs;
for (i = ri->ri_cols * ri->ri_rows; i != 0; i--, cell++)
cell->attr = defattr;
@@ -828,7 +828,7 @@ grtwo_alloc_screen(void *v, const struct wsscreen_descr *
type, void **cookiep,
*cookiep = ri;
*curxp = *curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &dc->dc_defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &dc->dc_defattr);
*attrp = dc->dc_defattr;
cell = dc->dc_bs;
diff --git sys/arch/sgi/gio/light.c sys/arch/sgi/gio/light.c
index 39a77a58fe6..6e9ecd17423 100644
--- sys/arch/sgi/gio/light.c
+++ sys/arch/sgi/gio/light.c
@@ -447,7 +447,7 @@ light_cnattach(struct gio_attach_args *ga)
light_attach_common(&light_console_dc, ga);
light_init_screen(&light_console_dc);
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&light_console_dc.dc_wsd, ri, 0, 0, defattr);
return 0;
@@ -743,7 +743,7 @@ light_alloc_screen(void *v, const struct wsscreen_descr
*type, void **cookiep,
*cookiep = ri;
*curxp = *curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &dc->dc_defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &dc->dc_defattr);
*attrp = dc->dc_defattr;
return 0;
diff --git sys/arch/sgi/gio/newport.c sys/arch/sgi/gio/newport.c
index 97e0f43597e..e8e30f14197 100644
--- sys/arch/sgi/gio/newport.c
+++ sys/arch/sgi/gio/newport.c
@@ -588,7 +588,7 @@ newport_cnattach(struct gio_attach_args *ga)
if (rc != 0)
return rc;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&newport_console_dc.dc_wsd, ri, 0, 0, defattr);
return 0;
@@ -823,7 +823,7 @@ newport_alloc_screen(void *v, const struct wsscreen_descr
*type,
*cookiep = ri;
*curxp = *curyp = 0;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &dc->dc_defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &dc->dc_defattr);
*attrp = dc->dc_defattr;
return 0;
diff --git sys/arch/sgi/xbow/odyssey.c sys/arch/sgi/xbow/odyssey.c
index 64c46aee053..7c566c452ab 100644
--- sys/arch/sgi/xbow/odyssey.c
+++ sys/arch/sgi/xbow/odyssey.c
@@ -672,7 +672,7 @@ odyssey_alloc_screen(void *v, const struct wsscreen_descr
*type,
*curyp = 0;
/* Correct screen attributes. */
- screen->ri.ri_ops.alloc_attr(&screen->ri, 0, 0, 0, attrp);
+ screen->ri.ri_ops.pack_attr(&screen->ri, 0, 0, 0, attrp);
screen->attr = *attrp;
return (0);
@@ -1135,7 +1135,7 @@ odyssey_cnattach()
/*
* Attach wsdisplay.
*/
- screen->ri.ri_ops.alloc_attr(&screen->ri, 0, 0, 0, &screen->attr);
+ screen->ri.ri_ops.pack_attr(&screen->ri, 0, 0, 0, &screen->attr);
wsdisplay_cnattach(&odyssey_stdscreen, &screen->ri, 0, 0, screen->attr);
return 0;
diff --git sys/arch/sparc64/dev/creator.c sys/arch/sparc64/dev/creator.c
index 8edeb55c36c..08e72e0ab75 100644
--- sys/arch/sparc64/dev/creator.c
+++ sys/arch/sparc64/dev/creator.c
@@ -248,7 +248,7 @@ creator_ioctl(v, cmd, data, flags, p)
creator_ras_init(sc);
/* Clear screen. */
- ri->ri_ops.alloc_attr(ri,
+ ri->ri_ops.pack_attr(ri,
WSCOL_BLACK, WSCOL_WHITE, WSATTR_WSCOLORS, &attr);
ri->ri_ops.eraserows(ri, 0, ri->ri_rows, attr);
}
diff --git sys/arch/sparc64/dev/fb.c sys/arch/sparc64/dev/fb.c
index 4cc28492c86..c7e69ab8ca3 100644
--- sys/arch/sparc64/dev/fb.c
+++ sys/arch/sparc64/dev/fb.c
@@ -363,10 +363,10 @@ fbwscons_console_init(struct sunfb *sf, int row)
cookie = ri;
if (ISSET(ri->ri_caps, WSSCREEN_WSCOLORS))
- ri->ri_ops.alloc_attr(cookie,
+ ri->ri_ops.pack_attr(cookie,
WSCOL_BLACK, WSCOL_WHITE, WSATTR_WSCOLORS, &defattr);
else
- ri->ri_ops.alloc_attr(cookie, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(cookie, 0, 0, 0, &defattr);
fb_initwsd(sf);
wsdisplay_cnattach(&sf->sf_wsd, cookie,
@@ -462,10 +462,10 @@ fb_alloc_screen(void *v, const struct wsscreen_descr
*type,
*curyp = 0;
*curxp = 0;
if (ISSET(ri->ri_caps, WSSCREEN_WSCOLORS))
- ri->ri_ops.alloc_attr(cookie,
+ ri->ri_ops.pack_attr(cookie,
WSCOL_BLACK, WSCOL_WHITE, WSATTR_WSCOLORS, attrp);
else
- ri->ri_ops.alloc_attr(cookie, 0, 0, 0, attrp);
+ ri->ri_ops.pack_attr(cookie, 0, 0, 0, attrp);
sf->sf_nscreens++;
return (0);
}
diff --git sys/dev/fdt/rkdrm.c sys/dev/fdt/rkdrm.c
index edaec683e4c..cd62c82790c 100644
--- sys/dev/fdt/rkdrm.c
+++ sys/dev/fdt/rkdrm.c
@@ -522,7 +522,7 @@ rkdrm_attachhook(struct device *dev)
rkdrm_stdscreen.fontheight = ri->ri_font->fontheight;
if (console) {
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&rkdrm_stdscreen, ri->ri_active,
ri->ri_ccol, ri->ri_crow, defattr);
}
diff --git sys/dev/fdt/simplefb.c sys/dev/fdt/simplefb.c
index 5f911d74a45..8e6380f9ed0 100644
--- sys/dev/fdt/simplefb.c
+++ sys/dev/fdt/simplefb.c
@@ -177,7 +177,7 @@ simplefb_attach(struct device *parent, struct device *self,
void *aux)
sc->sc_wsl.screens = (const struct wsscreen_descr **)sc->sc_scrlist;
if (console) {
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&sc->sc_wsd, ri->ri_active,
simplefb_ri.ri_ccol, simplefb_ri.ri_crow, defattr);
}
@@ -343,7 +343,7 @@ simplefb_init_cons(bus_space_tag_t iot)
simplefb_wsd.fontwidth = ri->ri_font->fontwidth;
simplefb_wsd.fontheight = ri->ri_font->fontheight;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&simplefb_wsd, ri, 0, 0, defattr);
#if NUKBD > 0
diff --git sys/dev/ic/sti.c sys/dev/ic/sti.c
index 8be71bcdfa2..16a4188460c 100644
--- sys/dev/ic/sti.c
+++ sys/dev/ic/sti.c
@@ -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 sys/dev/ic/vga.c sys/dev/ic/vga.c
index cf8bfbab7a8..1d3546b6d30 100644
--- sys/dev/ic/vga.c
+++ sys/dev/ic/vga.c
@@ -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;
diff --git sys/dev/isa/pcdisplay.c sys/dev/isa/pcdisplay.c
index 8b581588ecb..bd766fbe30f 100644
--- sys/dev/isa/pcdisplay.c
+++ sys/dev/isa/pcdisplay.c
@@ -70,7 +70,7 @@ static int pcdisplay_probe_mono(bus_space_tag_t,
bus_space_tag_t);
static void pcdisplay_init(struct pcdisplay_config *,
bus_space_tag_t, bus_space_tag_t,
int);
-static int pcdisplay_alloc_attr(void *, int, int, int, long *);
+static int pcdisplay_pack_attr(void *, int, int, int, long *);
static void pcdisplay_unpack_attr(void *, long, int *, int *, int *);
struct cfattach pcdisplay_ca = {
@@ -85,7 +85,7 @@ const struct wsdisplay_emulops pcdisplay_emulops = {
pcdisplay_erasecols,
pcdisplay_copyrows,
pcdisplay_eraserows,
- pcdisplay_alloc_attr,
+ pcdisplay_pack_attr,
pcdisplay_unpack_attr
};
@@ -375,7 +375,7 @@ pcdisplay_show_screen(void *v, void *cookie, int waitok,
}
static int
-pcdisplay_alloc_attr(void *id, int fg, int bg, int flags, long *attrp)
+pcdisplay_pack_attr(void *id, int fg, int bg, int flags, long *attrp)
{
if (flags & WSATTR_REVERSE)
*attrp = FG_BLACK | BG_LIGHTGREY;
diff --git sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
index 619e8289840..4d76c319407 100644
--- sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
+++ sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
@@ -1828,7 +1828,7 @@ amdgpu_attachhook(struct device *self)
if (adev->console) {
long defattr;
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&amdgpu_stdscreen, ri->ri_active,
ri->ri_ccol, ri->ri_crow, defattr);
}
diff --git sys/dev/pci/drm/i915/i915_drv.c sys/dev/pci/drm/i915/i915_drv.c
index 78e503090c3..c245e7e058c 100644
--- sys/dev/pci/drm/i915/i915_drv.c
+++ sys/dev/pci/drm/i915/i915_drv.c
@@ -3667,7 +3667,7 @@ inteldrm_attachhook(struct device *self)
if (ri->ri_flg & (RI_ROTATE_CW | RI_ROTATE_CCW))
memset(ri->ri_bits, 0, ri->ri_height * ri->ri_stride);
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&inteldrm_stdscreen, ri->ri_active,
0, 0, defattr);
}
diff --git sys/dev/pci/drm/radeon/radeon_kms.c
sys/dev/pci/drm/radeon/radeon_kms.c
index 9d2fd579380..c942930d6d8 100644
--- sys/dev/pci/drm/radeon/radeon_kms.c
+++ sys/dev/pci/drm/radeon/radeon_kms.c
@@ -797,7 +797,7 @@ radeondrm_attachhook(struct device *self)
if (rdev->console) {
long defattr;
- ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
+ ri->ri_ops.pack_attr(ri->ri_active, 0, 0, 0, &defattr);
wsdisplay_cnattach(&radeondrm_stdscreen, ri->ri_active,
ri->ri_ccol, ri->ri_crow, defattr);
}
diff --git sys/dev/pci/tga.c sys/dev/pci/tga.c
index 94bad789fe5..0fb9d10a4bb 100644
--- sys/dev/pci/tga.c
+++ sys/dev/pci/tga.c
@@ -742,7 +742,7 @@ tga_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
*cookiep = &sc->sc_dc->dc_rinfo; /* one and only for now */
*curxp = 0;
*curyp = 0;
- sc->sc_dc->dc_rinfo.ri_ops.alloc_attr(&sc->sc_dc->dc_rinfo,
+ sc->sc_dc->dc_rinfo.ri_ops.pack_attr(&sc->sc_dc->dc_rinfo,
0, 0, 0, &defattr);
*attrp = defattr;
sc->nscreens++;
@@ -871,7 +871,7 @@ tga_cnattach(iot, memt, pc, bus, device, function)
tga_bt463_rd);
}
}
- dcp->dc_rinfo.ri_ops.alloc_attr(&dcp->dc_rinfo, 0, 0, 0, &defattr);
+ dcp->dc_rinfo.ri_ops.pack_attr(&dcp->dc_rinfo, 0, 0, 0, &defattr);
wsdisplay_cnattach(&tga_stdscreen, &dcp->dc_rinfo, 0, 0, defattr);
return(0);
diff --git sys/dev/pcmcia/cfxga.c sys/dev/pcmcia/cfxga.c
index 318710d9c14..221dd3e0211 100644
--- sys/dev/pcmcia/cfxga.c
+++ sys/dev/pcmcia/cfxga.c
@@ -536,7 +536,7 @@ cfxga_alloc_screen(void *v, const struct wsscreen_descr
*type, void **cookiep,
LIST_INSERT_HEAD(&sc->sc_scr, scr, scr_link);
sc->sc_nscreens++;
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_ops.pack_attr(ri, 0, 0, 0, attrp);
*cookiep = ri;
*curxp = *curyp = 0;
diff --git sys/dev/rasops/rasops.c sys/dev/rasops/rasops.c
index 6bb38705211..9bc3f1748c6 100644
--- sys/dev/rasops/rasops.c
+++ sys/dev/rasops/rasops.c
@@ -151,8 +151,8 @@ int rasops_copycols(void *, int, int, int, int);
int rasops_copyrows(void *, int, int, int);
int rasops_mapchar(void *, int, u_int *);
int rasops_cursor(void *, int, int, int);
-int rasops_alloc_cattr(void *, int, int, int, long *);
-int rasops_alloc_mattr(void *, int, int, int, long *);
+int rasops_pack_cattr(void *, int, int, int, long *);
+int rasops_pack_mattr(void *, int, int, int, long *);
int rasops_do_cursor(struct rasops_info *);
void rasops_init_devcmap(struct rasops_info *);
void rasops_unpack_attr(void *, long, int *, int *, int *);
@@ -187,7 +187,7 @@ int rasops_vcons_copycols(void *, int, int, int, int);
int rasops_vcons_erasecols(void *, int, int, int, long);
int rasops_vcons_copyrows(void *, int, int, int);
int rasops_vcons_eraserows(void *, int, int, long);
-int rasops_vcons_alloc_attr(void *, int, int, int, long *);
+int rasops_vcons_pack_attr(void *, int, int, int, long *);
void rasops_vcons_unpack_attr(void *, long, int *, int *, int *);
int rasops_wronly_putchar(void *, int, int, u_int, long);
@@ -283,7 +283,7 @@ rasops_init(struct rasops_info *ri, int wantrows, int
wantcols)
ri->ri_erasecols = ri->ri_ops.erasecols;
ri->ri_copyrows = ri->ri_ops.copyrows;
ri->ri_eraserows = ri->ri_ops.eraserows;
- ri->ri_alloc_attr = ri->ri_ops.alloc_attr;
+ ri->ri_pack_attr = ri->ri_ops.pack_attr;
if (ri->ri_flg & RI_VCONS) {
void *cookie;
@@ -304,7 +304,7 @@ rasops_init(struct rasops_info *ri, int wantrows, int
wantcols)
ri->ri_ops.erasecols = rasops_vcons_erasecols;
ri->ri_ops.copyrows = rasops_vcons_copyrows;
ri->ri_ops.eraserows = rasops_vcons_eraserows;
- ri->ri_ops.alloc_attr = rasops_vcons_alloc_attr;
+ ri->ri_ops.pack_attr = rasops_vcons_pack_attr;
ri->ri_ops.unpack_attr = rasops_vcons_unpack_attr;
ri->ri_do_cursor = rasops_wronly_do_cursor;
} else if ((ri->ri_flg & RI_WRONLY) && ri->ri_bs != NULL) {
@@ -319,7 +319,7 @@ rasops_init(struct rasops_info *ri, int wantrows, int
wantcols)
ri->ri_do_cursor = rasops_wronly_do_cursor;
if (ri->ri_flg & RI_CLEAR) {
- ri->ri_alloc_attr(ri, 0, 0, 0, &attr);
+ ri->ri_pack_attr(ri, 0, 0, 0, &attr);
for (i = 0; i < ri->ri_rows * ri->ri_cols; i++) {
ri->ri_bs[i].uc = ' ';
ri->ri_bs[i].attr = attr;
@@ -446,10 +446,10 @@ rasops_reconfig(struct rasops_info *ri, int wantrows, int
wantcols)
ri->ri_updatecursor = NULL;
if (ri->ri_depth < 8 || (ri->ri_flg & RI_FORCEMONO) != 0) {
- ri->ri_ops.alloc_attr = rasops_alloc_mattr;
+ ri->ri_ops.pack_attr = rasops_pack_mattr;
ri->ri_caps = WSSCREEN_UNDERLINE | WSSCREEN_REVERSE;
} else {
- ri->ri_ops.alloc_attr = rasops_alloc_cattr;
+ ri->ri_ops.pack_attr = rasops_pack_cattr;
ri->ri_caps = WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
WSSCREEN_WSCOLORS | WSSCREEN_REVERSE;
}
@@ -548,10 +548,10 @@ rasops_mapchar(void *cookie, int c, u_int *cp)
}
/*
- * Allocate a color attribute.
+ * Pack a color attribute.
*/
int
-rasops_alloc_cattr(void *cookie, int fg, int bg, int flg, long *attr)
+rasops_pack_cattr(void *cookie, int fg, int bg, int flg, long *attr)
{
int swap;
@@ -589,10 +589,10 @@ rasops_alloc_cattr(void *cookie, int fg, int bg, int flg,
long *attr)
}
/*
- * Allocate a mono attribute.
+ * Pack a mono attribute.
*/
int
-rasops_alloc_mattr(void *cookie, int fg, int bg, int flg, long *attr)
+rasops_pack_mattr(void *cookie, int fg, int bg, int flg, long *attr)
{
int swap;
@@ -1423,7 +1423,7 @@ rasops_alloc_screen(void *v, void **cookiep,
*cookiep = scr;
*curxp = 0;
*curyp = 0;
- ri->ri_alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_pack_attr(ri, 0, 0, 0, attrp);
scr->rs_ri = ri;
scr->rs_visible = (ri->ri_nscreens == 0);
@@ -1678,11 +1678,11 @@ rasops_vcons_eraserows(void *cookie, int row, int num,
long attr)
}
int
-rasops_vcons_alloc_attr(void *cookie, int fg, int bg, int flg, long *attr)
+rasops_vcons_pack_attr(void *cookie, int fg, int bg, int flg, long *attr)
{
struct rasops_screen *scr = cookie;
- return scr->rs_ri->ri_alloc_attr(scr->rs_ri, fg, bg, flg, attr);
+ return scr->rs_ri->ri_pack_attr(scr->rs_ri, fg, bg, flg, attr);
}
void
diff --git sys/dev/rasops/rasops.h sys/dev/rasops/rasops.h
index 89de261be89..a363ae800a2 100644
--- sys/dev/rasops/rasops.h
+++ sys/dev/rasops/rasops.h
@@ -135,7 +135,7 @@ struct rasops_info {
int (*ri_erasecols)(void *, int, int, int, long);
int (*ri_copyrows)(void *, int, int, int);
int (*ri_eraserows)(void *, int, int, long);
- int (*ri_alloc_attr)(void *, int, int, int, long *);
+ int (*ri_pack_attr)(void *, int, int, int, long *);
};
#define DELTA(p, d, cast) ((p) = (cast)((caddr_t)(p) + (d)))
diff --git sys/dev/usb/udl.c sys/dev/usb/udl.c
index 7c59abc1382..95af7210b7b 100644
--- sys/dev/usb/udl.c
+++ sys/dev/usb/udl.c
@@ -627,7 +627,7 @@ udl_alloc_screen(void *v, const struct wsscreen_descr *type,
sc->sc_ri.ri_ops.putchar = udl_putchar;
sc->sc_ri.ri_do_cursor = udl_do_cursor;
- sc->sc_ri.ri_ops.alloc_attr(&sc->sc_ri, 0, 0, 0, attrp);
+ sc->sc_ri.ri_ops.pack_attr(&sc->sc_ri, 0, 0, 0, attrp);
udl_stdscreen.nrows = sc->sc_ri.ri_rows;
udl_stdscreen.ncols = sc->sc_ri.ri_cols;
diff --git sys/dev/wscons/wsdisplay.c sys/dev/wscons/wsdisplay.c
index 7433d3a0ff4..983d4c967fa 100644
--- sys/dev/wscons/wsdisplay.c
+++ sys/dev/wscons/wsdisplay.c
@@ -2692,7 +2692,7 @@ inverse_char(struct wsscreen *scr, u_int pos)
} else if (dconf->scrdata->capabilities & WSSCREEN_REVERSE) {
flags |= WSATTR_REVERSE;
}
- if ((*dconf->emulops->alloc_attr)(dconf->emulcookie, fg, bg, flags |
+ if ((*dconf->emulops->pack_attr)(dconf->emulcookie, fg, bg, flags |
(ul ? WSATTR_UNDERLINE : 0), &attr) == 0) {
cell.attr = attr;
PUTCHAR(dconf, pos, cell.uc, cell.attr);
diff --git sys/dev/wscons/wsdisplayvar.h sys/dev/wscons/wsdisplayvar.h
index 170180a7363..9465f7af345 100644
--- sys/dev/wscons/wsdisplayvar.h
+++ sys/dev/wscons/wsdisplayvar.h
@@ -79,7 +79,7 @@ struct wsdisplay_emulops {
int (*erasecols)(void *c, int row, int startcol, int ncols, long);
int (*copyrows)(void *c, int srcrow, int dstrow, int nrows);
int (*eraserows)(void *c, int row, int nrows, long attr);
- int (*alloc_attr)(void *c, int fg, int bg, int flags, long *attrp);
+ 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);
/* fg / bg values. Made identical to ANSI terminal color codes. */
#define WSCOL_BLACK 0
@@ -96,7 +96,6 @@ struct wsdisplay_emulops {
#define WSATTR_BLINK 4
#define WSATTR_UNDERLINE 8
#define WSATTR_WSCOLORS 16
- /* XXX need a free_attr() ??? */
};
#define WSSCREEN_NAME_SIZE 16
diff --git sys/dev/wscons/wsemul_sun.c sys/dev/wscons/wsemul_sun.c
index 4d2f02d046a..d511a8dac24 100644
--- sys/dev/wscons/wsemul_sun.c
+++ sys/dev/wscons/wsemul_sun.c
@@ -213,12 +213,12 @@ wsemul_sun_cnattach(const struct wsscreen_descr *type,
void *cookie, int ccol,
#define WS_KERNEL_MONOATTR 0
#endif
if (type->capabilities & WSSCREEN_WSCOLORS)
- res = (*edp->emulops->alloc_attr)(cookie,
+ res = (*edp->emulops->pack_attr)(cookie,
WS_KERNEL_FG, WS_KERNEL_BG,
WS_KERNEL_COLATTR | WSATTR_WSCOLORS,
&edp->kernattr);
else
- res = (*edp->emulops->alloc_attr)(cookie, 0, 0,
+ res = (*edp->emulops->pack_attr)(cookie, 0, 0,
WS_KERNEL_MONOATTR,
&edp->kernattr);
if (res)
@@ -899,7 +899,7 @@ wsemul_sun_selectattribute(struct wsemul_sun_emuldata *edp,
int flags,
flags |= WSATTR_WSCOLORS;
}
- error = (*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol,
+ error = (*edp->emulops->pack_attr)(edp->emulcookie, fgcol, bgcol,
flags & WSATTR_WSCOLORS, bkgdattr);
if (error)
return (error);
@@ -936,7 +936,7 @@ wsemul_sun_selectattribute(struct wsemul_sun_emuldata *edp,
int flags,
flags |= WSATTR_WSCOLORS;
}
}
- error = (*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol,
+ error = (*edp->emulops->pack_attr)(edp->emulcookie, fgcol, bgcol,
flags, attr);
if (error)
return (error);
diff --git sys/dev/wscons/wsemul_vt100.c sys/dev/wscons/wsemul_vt100.c
index 7c032293bb8..b07b2ec2e75 100644
--- sys/dev/wscons/wsemul_vt100.c
+++ sys/dev/wscons/wsemul_vt100.c
@@ -177,11 +177,11 @@ wsemul_vt100_cnattach(const struct wsscreen_descr *type,
void *cookie, int ccol,
#define WS_KERNEL_MONOATTR 0
#endif
if (type->capabilities & WSSCREEN_WSCOLORS)
- res = (*edp->emulops->alloc_attr)(cookie,
+ res = (*edp->emulops->pack_attr)(cookie,
WS_KERNEL_FG, WS_KERNEL_BG,
WS_KERNEL_COLATTR | WSATTR_WSCOLORS, &edp->kernattr);
else
- res = (*edp->emulops->alloc_attr)(cookie, 0, 0,
+ res = (*edp->emulops->pack_attr)(cookie, 0, 0,
WS_KERNEL_MONOATTR, &edp->kernattr);
if (res)
edp->kernattr = defattr;
diff --git sys/dev/wscons/wsemul_vt100_subr.c sys/dev/wscons/wsemul_vt100_subr.c
index bcde0e6f6c9..97208d64645 100644
--- sys/dev/wscons/wsemul_vt100_subr.c
+++ sys/dev/wscons/wsemul_vt100_subr.c
@@ -712,7 +712,7 @@ vt100_selectattribute(struct wsemul_vt100_emuldata *edp,
int flags, int fgcol,
printf("colors ignored (impossible)\n");
#endif
}
- error = (*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol,
+ error = (*edp->emulops->pack_attr)(edp->emulcookie, fgcol, bgcol,
flags & WSATTR_WSCOLORS, bkgdattr);
if (error)
return (error);
@@ -764,7 +764,7 @@ vt100_selectattribute(struct wsemul_vt100_emuldata *edp,
int flags, int fgcol,
#endif
}
}
- error = (*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol,
+ error = (*edp->emulops->pack_attr)(edp->emulcookie, fgcol, bgcol,
flags, attr);
if (error)
return (error);