diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-08-28 12:48:15 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-08-28 12:48:15 +0000 |
commit | f7cf4d10949f12edbb81d9835b916e5b64a064a4 (patch) | |
tree | 6e8add779a9b52ef82d5b39264f95b539f1a29f0 /sys/dev | |
parent | e141fb7001e71fe81f6968549e363c111add17b2 (diff) |
ansify function definitions, and constify a few arrays while there.
no functional change.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/com.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/pcdisplay_chars.c | 13 | ||||
-rw-r--r-- | sys/dev/ic/pcdisplay_subr.c | 46 | ||||
-rw-r--r-- | sys/dev/ic/pcdisplayvar.h | 16 | ||||
-rw-r--r-- | sys/dev/ic/pckbc.c | 146 | ||||
-rw-r--r-- | sys/dev/ic/vga.c | 143 | ||||
-rw-r--r-- | sys/dev/ic/vga_subr.c | 27 | ||||
-rw-r--r-- | sys/dev/ic/vgavar.h | 35 | ||||
-rw-r--r-- | sys/dev/isa/pcdisplay.c | 72 | ||||
-rw-r--r-- | sys/dev/isa/vga_isa.c | 14 | ||||
-rw-r--r-- | sys/dev/rasops/rasops.c | 86 | ||||
-rw-r--r-- | sys/dev/rasops/rasops1.c | 23 | ||||
-rw-r--r-- | sys/dev/rasops/rasops15.c | 33 | ||||
-rw-r--r-- | sys/dev/rasops/rasops2.c | 33 | ||||
-rw-r--r-- | sys/dev/rasops/rasops24.c | 43 | ||||
-rw-r--r-- | sys/dev/rasops/rasops32.c | 11 | ||||
-rw-r--r-- | sys/dev/rasops/rasops4.c | 39 | ||||
-rw-r--r-- | sys/dev/rasops/rasops8.c | 33 | ||||
-rw-r--r-- | sys/dev/rasops/rasops_bitops.h | 14 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplay_compat_usl.c | 63 | ||||
-rw-r--r-- | sys/dev/wscons/wsemul_dumb.c | 37 | ||||
-rw-r--r-- | sys/dev/wscons/wsemulconf.c | 8 | ||||
-rw-r--r-- | sys/dev/wscons/wskbdutil.c | 41 |
23 files changed, 255 insertions, 729 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 5024189d2e7..e8f51ee8dc8 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.144 2010/08/07 15:50:23 kettenis Exp $ */ +/* $OpenBSD: com.c,v 1.145 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -1553,8 +1553,7 @@ void com_fifo_probe(struct com_softc *); #if defined(COM_CONSOLE) || defined(KGDB) void -com_enable_debugport(sc) - struct com_softc *sc; +com_enable_debugport(struct com_softc *sc) { int s; @@ -1576,8 +1575,7 @@ com_enable_debugport(sc) #endif /* COM_CONSOLE || KGDB */ void -com_attach_subr(sc) - struct com_softc *sc; +com_attach_subr(struct com_softc *sc) { bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; diff --git a/sys/dev/ic/pcdisplay_chars.c b/sys/dev/ic/pcdisplay_chars.c index 153b2a83b5a..2e0c19c4cc4 100644 --- a/sys/dev/ic/pcdisplay_chars.c +++ b/sys/dev/ic/pcdisplay_chars.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcdisplay_chars.c,v 1.4 2004/04/02 04:39:50 deraadt Exp $ */ +/* $OpenBSD: pcdisplay_chars.c,v 1.5 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: pcdisplay_chars.c,v 1.5 2000/06/08 07:01:19 cgd Exp $ */ /* @@ -40,7 +40,7 @@ #define CONTROL 1 /* XXX smiley */ #define NOTPRINTABLE 4 /* diamond XXX watch out - not in ISO part! */ -static u_char isomappings[128] = { +static const u_char isomappings[128] = { CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, @@ -143,7 +143,7 @@ static u_char isomappings[128] = { 0x98, /* 0x00ff LATIN SMALL LETTER Y WITH DIAERESIS */ }; -static struct { +static const struct { u_int16_t uni; u_char ibm; } unimappings[] = { @@ -257,7 +257,7 @@ static struct { {0x266b, 0x0e}, /* BEAMED EIGHTH NOTES */ }; -static struct { +static const struct { u_int16_t uni; u_char ibm; int quality; @@ -326,10 +326,7 @@ static struct { }; int -pcdisplay_mapchar(id, uni, index) - void *id; - int uni; - unsigned int *index; +pcdisplay_mapchar(void *id, int uni, unsigned int *index) { u_int i; diff --git a/sys/dev/ic/pcdisplay_subr.c b/sys/dev/ic/pcdisplay_subr.c index 4b8ad5f68cd..d743fcaac7d 100644 --- a/sys/dev/ic/pcdisplay_subr.c +++ b/sys/dev/ic/pcdisplay_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcdisplay_subr.c,v 1.8 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: pcdisplay_subr.c,v 1.9 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: pcdisplay_subr.c,v 1.16 2000/06/08 07:01:19 cgd Exp $ */ /* @@ -41,8 +41,7 @@ #include <dev/wscons/wsdisplayvar.h> void -pcdisplay_cursor_reset(scr) - struct pcdisplayscreen *scr; +pcdisplay_cursor_reset(struct pcdisplayscreen *scr) { #ifdef PCDISPLAY_SOFTCURSOR pcdisplay_6845_write(scr->hdl, curstart, 0x10); @@ -51,9 +50,7 @@ pcdisplay_cursor_reset(scr) } void -pcdisplay_cursor_init(scr, existing) - struct pcdisplayscreen *scr; - int existing; +pcdisplay_cursor_init(struct pcdisplayscreen *scr, int existing) { #ifdef PCDISPLAY_SOFTCURSOR bus_space_tag_t memt; @@ -84,9 +81,7 @@ pcdisplay_cursor_init(scr, existing) } int -pcdisplay_cursor(id, on, row, col) - void *id; - int on, row, col; +pcdisplay_cursor(void *id, int on, int row, int col) { #ifdef PCDISPLAY_SOFTCURSOR struct pcdisplayscreen *scr = id; @@ -146,9 +141,7 @@ pcdisplay_cursor(id, on, row, col) #if 0 unsigned int -pcdisplay_mapchar_simple(id, uni) - void *id; - int uni; +pcdisplay_mapchar_simple(void *id, int uni) { if (uni < 128) return (uni); @@ -158,11 +151,7 @@ pcdisplay_mapchar_simple(id, uni) #endif int -pcdisplay_putchar(id, row, col, c, attr) - void *id; - int row, col; - u_int c; - long attr; +pcdisplay_putchar(void *id, int row, int col, u_int c, long attr) { struct pcdisplayscreen *scr = id; bus_space_tag_t memt = scr->hdl->ph_memt; @@ -181,10 +170,7 @@ pcdisplay_putchar(id, row, col, c, attr) } int -pcdisplay_getchar(id, row, col, cell) - void *id; - int row, col; - struct wsdisplay_charcell *cell; +pcdisplay_getchar(void *id, int row, int col, struct wsdisplay_charcell *cell) { struct pcdisplayscreen *scr = id; bus_space_tag_t memt = scr->hdl->ph_memt; @@ -208,9 +194,7 @@ pcdisplay_getchar(id, row, col, cell) } int -pcdisplay_copycols(id, row, srccol, dstcol, ncols) - void *id; - int row, srccol, dstcol, ncols; +pcdisplay_copycols(void *id, int row, int srccol, int dstcol, int ncols) { struct pcdisplayscreen *scr = id; bus_space_tag_t memt = scr->hdl->ph_memt; @@ -233,10 +217,7 @@ pcdisplay_copycols(id, row, srccol, dstcol, ncols) } int -pcdisplay_erasecols(id, row, startcol, ncols, fillattr) - void *id; - int row, startcol, ncols; - long fillattr; +pcdisplay_erasecols(void *id, int row, int startcol, int ncols, long fillattr) { struct pcdisplayscreen *scr = id; bus_space_tag_t memt = scr->hdl->ph_memt; @@ -260,9 +241,7 @@ pcdisplay_erasecols(id, row, startcol, ncols, fillattr) } int -pcdisplay_copyrows(id, srcrow, dstrow, nrows) - void *id; - int srcrow, dstrow, nrows; +pcdisplay_copyrows(void *id, int srcrow, int dstrow, int nrows) { struct pcdisplayscreen *scr = id; bus_space_tag_t memt = scr->hdl->ph_memt; @@ -286,10 +265,7 @@ pcdisplay_copyrows(id, srcrow, dstrow, nrows) } int -pcdisplay_eraserows(id, startrow, nrows, fillattr) - void *id; - int startrow, nrows; - long fillattr; +pcdisplay_eraserows(void *id, int startrow, int nrows, long fillattr) { struct pcdisplayscreen *scr = id; bus_space_tag_t memt = scr->hdl->ph_memt; diff --git a/sys/dev/ic/pcdisplayvar.h b/sys/dev/ic/pcdisplayvar.h index e888919a04b..53ef95da600 100644 --- a/sys/dev/ic/pcdisplayvar.h +++ b/sys/dev/ic/pcdisplayvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcdisplayvar.h,v 1.10 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: pcdisplayvar.h,v 1.11 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: pcdisplayvar.h,v 1.8 2000/01/25 02:44:03 ad Exp $ */ /* @@ -50,23 +50,19 @@ struct pcdisplay_handle { bus_space_handle_t ph_ioh_6845, ph_memh; }; -static inline u_int8_t _pcdisplay_6845_read(struct pcdisplay_handle *, - int); +static inline u_int8_t _pcdisplay_6845_read(struct pcdisplay_handle *, int); static inline void _pcdisplay_6845_write(struct pcdisplay_handle *, int, u_int8_t); -static inline u_int8_t _pcdisplay_6845_read(ph, reg) - struct pcdisplay_handle *ph; - int reg; +static inline u_int8_t +_pcdisplay_6845_read(struct pcdisplay_handle *ph, int reg) { bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_INDEX, reg); return (bus_space_read_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA)); } -static inline void _pcdisplay_6845_write(ph, reg, val) - struct pcdisplay_handle *ph; - int reg; - u_int8_t val; +static inline void +_pcdisplay_6845_write(struct pcdisplay_handle *ph, int reg, u_int8_t val) { bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_INDEX, reg); bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA, val); diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c index 7247e30fbb4..dd4a9fe6dd5 100644 --- a/sys/dev/ic/pckbc.c +++ b/sys/dev/ic/pckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc.c,v 1.25 2010/08/08 13:50:24 miod Exp $ */ +/* $OpenBSD: pckbc.c,v 1.26 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */ /* @@ -108,9 +108,7 @@ const char *pckbc_slot_names[] = { "kbd", "aux" }; #define KBD_DELAY DELAY(8) static inline int -pckbc_wait_output(iot, ioh_c) - bus_space_tag_t iot; - bus_space_handle_t ioh_c; +pckbc_wait_output(bus_space_tag_t iot, bus_space_handle_t ioh_c) { u_int i; @@ -123,10 +121,7 @@ pckbc_wait_output(iot, ioh_c) } int -pckbc_send_cmd(iot, ioh_c, val) - bus_space_tag_t iot; - bus_space_handle_t ioh_c; - u_char val; +pckbc_send_cmd(bus_space_tag_t iot, bus_space_handle_t ioh_c, u_char val) { if (!pckbc_wait_output(iot, ioh_c)) return (0); @@ -135,11 +130,8 @@ pckbc_send_cmd(iot, ioh_c, val) } int -pckbc_poll_data1(iot, ioh_d, ioh_c, slot, checkaux) - bus_space_tag_t iot; - bus_space_handle_t ioh_d, ioh_c; - pckbc_slot_t slot; - int checkaux; +pckbc_poll_data1(bus_space_tag_t iot, bus_space_handle_t ioh_d, + bus_space_handle_t ioh_c, pckbc_slot_t slot, int checkaux) { int i; u_char stat; @@ -177,8 +169,7 @@ pckbc_poll_data1(iot, ioh_d, ioh_c, slot, checkaux) * Get the current command byte. */ static int -pckbc_get8042cmd(t) - struct pckbc_internal *t; +pckbc_get8042cmd(struct pckbc_internal *t) { bus_space_tag_t iot = t->t_iot; bus_space_handle_t ioh_d = t->t_ioh_d; @@ -199,8 +190,7 @@ pckbc_get8042cmd(t) * Pass command byte to keyboard controller (8042). */ static int -pckbc_put8042cmd(t) - struct pckbc_internal *t; +pckbc_put8042cmd(struct pckbc_internal *t) { bus_space_tag_t iot = t->t_iot; bus_space_handle_t ioh_d = t->t_ioh_d; @@ -215,10 +205,7 @@ pckbc_put8042cmd(t) } static int -pckbc_send_devcmd(t, slot, val) - struct pckbc_internal *t; - pckbc_slot_t slot; - u_char val; +pckbc_send_devcmd(struct pckbc_internal *t, pckbc_slot_t slot, u_char val) { bus_space_tag_t iot = t->t_iot; bus_space_handle_t ioh_d = t->t_ioh_d; @@ -235,9 +222,7 @@ pckbc_send_devcmd(t, slot, val) } int -pckbc_is_console(iot, addr) - bus_space_tag_t iot; - bus_addr_t addr; +pckbc_is_console(bus_space_tag_t iot, bus_addr_t addr) { if (pckbc_console && !pckbc_console_attached && pckbc_consdata.t_iot == iot && @@ -247,10 +232,7 @@ pckbc_is_console(iot, addr) } int -pckbc_submatch_locators(parent, match, aux) - struct device *parent; - void *match; - void *aux; +pckbc_submatch_locators(struct device *parent, void *match, void *aux) { struct cfdata *cf = match; struct pckbc_attach_args *pa = aux; @@ -262,10 +244,7 @@ pckbc_submatch_locators(parent, match, aux) } int -pckbc_submatch(parent, match, aux) - struct device *parent; - void *match; - void *aux; +pckbc_submatch(struct device *parent, void *match, void *aux) { struct cfdata *cf = match; @@ -275,10 +254,7 @@ pckbc_submatch(parent, match, aux) } int -pckbc_attach_slot(sc, slot, force) - struct pckbc_softc *sc; - pckbc_slot_t slot; - int force; +pckbc_attach_slot(struct pckbc_softc *sc, pckbc_slot_t slot, int force) { struct pckbc_internal *t = sc->id; struct pckbc_attach_args pa; @@ -300,9 +276,7 @@ pckbc_attach_slot(sc, slot, force) } void -pckbc_attach(sc, flags) - struct pckbc_softc *sc; - int flags; +pckbc_attach(struct pckbc_softc *sc, int flags) { struct pckbc_internal *t; bus_space_tag_t iot; @@ -458,9 +432,7 @@ nomouse: } int -pckbcprint(aux, pnp) - void *aux; - const char *pnp; +pckbcprint(void *aux, const char *pnp) { struct pckbc_attach_args *pa = aux; @@ -470,8 +442,7 @@ pckbcprint(aux, pnp) } void -pckbc_init_slotdata(q) - struct pckbc_slotdata *q; +pckbc_init_slotdata(struct pckbc_slotdata *q) { int i; TAILQ_INIT(&q->cmdqueue); @@ -484,9 +455,7 @@ pckbc_init_slotdata(q) } void -pckbc_flush(self, slot) - pckbc_tag_t self; - pckbc_slot_t slot; +pckbc_flush(pckbc_tag_t self, pckbc_slot_t slot) { struct pckbc_internal *t = self; @@ -495,9 +464,7 @@ pckbc_flush(self, slot) } int -pckbc_poll_data(self, slot) - pckbc_tag_t self; - pckbc_slot_t slot; +pckbc_poll_data(pckbc_tag_t self, pckbc_slot_t slot) { struct pckbc_internal *t = self; struct pckbc_slotdata *q = t->t_slotdata[slot]; @@ -519,10 +486,7 @@ pckbc_poll_data(self, slot) * return nonzero on success */ int -pckbc_xt_translation(self, slot, on) - pckbc_tag_t self; - pckbc_slot_t slot; - int on; +pckbc_xt_translation(pckbc_tag_t self, pckbc_slot_t slot, int on) { struct pckbc_internal *t = self; int ison; @@ -565,10 +529,7 @@ static struct pckbc_portcmd { }; void -pckbc_slot_enable(self, slot, on) - pckbc_tag_t self; - pckbc_slot_t slot; - int on; +pckbc_slot_enable(pckbc_tag_t self, pckbc_slot_t slot, int on) { struct pckbc_internal *t = (struct pckbc_internal *)self; struct pckbc_portcmd *cmd; @@ -588,10 +549,7 @@ pckbc_slot_enable(self, slot, on) } void -pckbc_set_poll(self, slot, on) - pckbc_tag_t self; - pckbc_slot_t slot; - int on; +pckbc_set_poll(pckbc_tag_t self, pckbc_slot_t slot, int on) { struct pckbc_internal *t = (struct pckbc_internal *)self; @@ -619,10 +577,8 @@ pckbc_set_poll(self, slot, on) * to be called at spltty() */ static void -pckbc_poll_cmd1(t, slot, cmd) - struct pckbc_internal *t; - pckbc_slot_t slot; - struct pckbc_devcmd *cmd; +pckbc_poll_cmd1(struct pckbc_internal *t, pckbc_slot_t slot, + struct pckbc_devcmd *cmd) { bus_space_tag_t iot = t->t_iot; bus_space_handle_t ioh_d = t->t_ioh_d; @@ -701,13 +657,8 @@ pckbc_poll_cmd1(t, slot, cmd) /* for use in autoconfiguration */ int -pckbc_poll_cmd(self, slot, cmd, len, responselen, respbuf, slow) - pckbc_tag_t self; - pckbc_slot_t slot; - u_char *cmd; - int len, responselen; - u_char *respbuf; - int slow; +pckbc_poll_cmd(pckbc_tag_t self, pckbc_slot_t slot, u_char *cmd, int len, + int responselen, u_char *respbuf, int slow) { struct pckbc_devcmd nc; @@ -732,8 +683,7 @@ pckbc_poll_cmd(self, slot, cmd, len, responselen, respbuf, slow) * Clean up a command queue, throw away everything. */ void -pckbc_cleanqueue(q) - struct pckbc_slotdata *q; +pckbc_cleanqueue(struct pckbc_slotdata *q) { struct pckbc_devcmd *cmd; #ifdef PCKBCDEBUG @@ -757,8 +707,7 @@ pckbc_cleanqueue(q) * XXX could be less invasive. */ void -pckbc_cleanup(self) - void *self; +pckbc_cleanup(void *self) { struct pckbc_internal *t = self; int s; @@ -807,9 +756,7 @@ pckbc_reset(struct pckbc_softc *sc) * to be called at spltty() */ void -pckbc_start(t, slot) - struct pckbc_internal *t; - pckbc_slot_t slot; +pckbc_start(struct pckbc_internal *t, pckbc_slot_t slot) { struct pckbc_slotdata *q = t->t_slotdata[slot]; struct pckbc_devcmd *cmd = TAILQ_FIRST(&q->cmdqueue); @@ -846,10 +793,7 @@ pckbc_start(t, slot) * to be called at spltty() */ int -pckbc_cmdresponse(t, slot, data) - struct pckbc_internal *t; - pckbc_slot_t slot; - u_char data; +pckbc_cmdresponse(struct pckbc_internal *t, pckbc_slot_t slot, u_char data) { struct pckbc_slotdata *q = t->t_slotdata[slot]; struct pckbc_devcmd *cmd = TAILQ_FIRST(&q->cmdqueue); @@ -908,12 +852,8 @@ restart: * Put command into the device's command queue, return zero or errno. */ int -pckbc_enqueue_cmd(self, slot, cmd, len, responselen, sync, respbuf) - pckbc_tag_t self; - pckbc_slot_t slot; - u_char *cmd; - int len, responselen, sync; - u_char *respbuf; +pckbc_enqueue_cmd(pckbc_tag_t self, pckbc_slot_t slot, u_char *cmd, int len, + int responselen, int sync, u_char *respbuf) { struct pckbc_internal *t = self; struct pckbc_slotdata *q = t->t_slotdata[slot]; @@ -978,12 +918,8 @@ pckbc_enqueue_cmd(self, slot, cmd, len, responselen, sync, respbuf) } void -pckbc_set_inputhandler(self, slot, func, arg, name) - pckbc_tag_t self; - pckbc_slot_t slot; - pckbc_inputfcn func; - void *arg; - char *name; +pckbc_set_inputhandler(pckbc_tag_t self, pckbc_slot_t slot, pckbc_inputfcn func, + void *arg, char *name) { struct pckbc_internal *t = (struct pckbc_internal *)self; struct pckbc_softc *sc = t->t_sc; @@ -1002,8 +938,7 @@ pckbc_set_inputhandler(self, slot, func, arg, name) } void -pckbc_poll(v) - void *v; +pckbc_poll(void *v) { struct pckbc_internal *t = v; int s; @@ -1015,8 +950,7 @@ pckbc_poll(v) } int -pckbcintr(vsc) - void *vsc; +pckbcintr(void *vsc) { struct pckbc_softc *sc = (struct pckbc_softc *)vsc; @@ -1024,9 +958,7 @@ pckbcintr(vsc) } int -pckbcintr_internal(t, sc) - struct pckbc_internal *t; - struct pckbc_softc *sc; +pckbcintr_internal(struct pckbc_internal *t, struct pckbc_softc *sc) { u_char stat; pckbc_slot_t slot; @@ -1081,12 +1013,8 @@ pckbcintr_internal(t, sc) } int -pckbc_cnattach(iot, addr, cmd_offset, slot, flags) - bus_space_tag_t iot; - bus_addr_t addr; - bus_size_t cmd_offset; - pckbc_slot_t slot; - int flags; +pckbc_cnattach(bus_space_tag_t iot, bus_addr_t addr, bus_size_t cmd_offset, + pckbc_slot_t slot, int flags) { bus_space_handle_t ioh_d, ioh_c; int res = 0; diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index af6374c1cf1..b71a16c5fcc 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga.c,v 1.53 2010/08/08 17:21:05 miod Exp $ */ +/* $OpenBSD: vga.c,v 1.54 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */ /*- @@ -270,8 +270,7 @@ const struct wsdisplay_accessops vga_accessops = { * and attachment. */ int -vga_common_probe(iot, memt) - bus_space_tag_t iot, memt; +vga_common_probe(bus_space_tag_t iot, bus_space_tag_t memt) { bus_space_handle_t ioh_vga, ioh_6845, memh; u_int8_t regval; @@ -346,10 +345,8 @@ bad: f->encoding == WSDISPLAY_FONTENC_ISO) int -vga_selectfont(vc, scr, name1, name2) - struct vga_config *vc; - struct vgascreen *scr; - const char *name1, *name2; /* NULL: take first found */ +vga_selectfont(struct vga_config *vc, struct vgascreen *scr, const char *name1, + const char *name2) /* NULL: take first found */ { const struct wsscreen_descr *type = scr->pcs.type; struct vgafont *f1, *f2; @@ -400,12 +397,8 @@ vga_selectfont(vc, scr, name1, name2) } void -vga_init_screen(vc, scr, type, existing, attrp) - struct vga_config *vc; - struct vgascreen *scr; - const struct wsscreen_descr *type; - int existing; - long *attrp; +vga_init_screen(struct vga_config *vc, struct vgascreen *scr, + const struct wsscreen_descr *type, int existing, long *attrp) { int cpos; int res; @@ -473,9 +466,7 @@ vga_init_screen(vc, scr, type, existing, attrp) } void -vga_init(vc, iot, memt) - struct vga_config *vc; - bus_space_tag_t iot, memt; +vga_init(struct vga_config *vc, bus_space_tag_t iot, bus_space_tag_t memt) { struct vga_handle *vh = &vc->hdl; u_int8_t mor; @@ -518,20 +509,15 @@ vga_init(vc, iot, memt) } struct vga_config * -vga_common_attach(self, iot, memt, type) - struct device *self; - bus_space_tag_t iot, memt; - int type; +vga_common_attach(struct device *self, bus_space_tag_t iot, + bus_space_tag_t memt, int type) { return vga_extended_attach(self, iot, memt, type, NULL); } struct vga_config * -vga_extended_attach(self, iot, memt, type, map) - struct device *self; - bus_space_tag_t iot, memt; - int type; - paddr_t (*map)(void *, off_t, int); +vga_extended_attach(struct device *self, bus_space_tag_t iot, + bus_space_tag_t memt, int type, paddr_t (*map)(void *, off_t, int)) { int console; struct vga_config *vc; @@ -577,9 +563,7 @@ displaysubmatch(struct device *parent, void *match, void *aux) } int -vga_cnattach(iot, memt, type, check) - bus_space_tag_t iot, memt; - int type, check; +vga_cnattach(bus_space_tag_t iot, bus_space_tag_t memt, int type, int check) { long defattr; const struct wsscreen_descr *scr; @@ -606,9 +590,7 @@ vga_cnattach(iot, memt, type, check) } int -vga_is_console(iot, type) - bus_space_tag_t iot; - int type; +vga_is_console(bus_space_tag_t iot, int type) { if (vgaconsole && !vga_console_attached && @@ -619,12 +601,7 @@ vga_is_console(iot, type) } int -vga_ioctl(v, cmd, data, flag, p) - void *v; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +vga_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) { struct vga_config *vc = v; int mode; @@ -669,26 +646,19 @@ vga_ioctl(v, cmd, data, flag, p) } paddr_t -vga_mmap(v, offset, prot) - void *v; - off_t offset; - int prot; +vga_mmap(void *v, off_t offset, int prot) { struct vga_config *vc = v; if (vc->vc_mmap != NULL) return (*vc->vc_mmap)(v, offset, prot); - return -1; + return (paddr_t)-1; } int -vga_alloc_screen(v, type, cookiep, curxp, curyp, defattrp) - void *v; - const struct wsscreen_descr *type; - void **cookiep; - int *curxp, *curyp; - long *defattrp; +vga_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep, + int *curxp, int *curyp, long *defattrp) { struct vga_config *vc = v; struct vgascreen *scr; @@ -726,9 +696,7 @@ vga_alloc_screen(v, type, cookiep, curxp, curyp, defattrp) } void -vga_free_screen(v, cookie) - void *v; - void *cookie; +vga_free_screen(void *v, void *cookie) { struct vgascreen *vs = cookie; struct vga_config *vc = vs->cfg; @@ -756,9 +724,7 @@ vga_free_screen(v, cookie) } void -vga_setfont(vc, scr) - struct vga_config *vc; - struct vgascreen *scr; +vga_setfont(struct vga_config *vc, struct vgascreen *scr) { int fontslot1, fontslot2; @@ -773,12 +739,8 @@ vga_setfont(vc, scr) } int -vga_show_screen(v, cookie, waitok, cb, cbarg) - void *v; - void *cookie; - int waitok; - void (*cb)(void *, int, int); - void *cbarg; +vga_show_screen(void *v, void *cookie, int waitok, void (*cb)(void *, int, int), + void *cbarg) { struct vgascreen *scr = cookie, *oldscr; struct vga_config *vc = scr->cfg; @@ -803,8 +765,7 @@ vga_show_screen(v, cookie, waitok, cb, cbarg) } void -vga_doswitch(vc) - struct vga_config *vc; +vga_doswitch(struct vga_config *vc) { struct vgascreen *scr, *oldscr; struct vga_handle *vh = &vc->hdl; @@ -876,10 +837,7 @@ vga_doswitch(vc) } int -vga_load_font(v, cookie, data) - void *v; - void *cookie; - struct wsdisplay_font *data; +vga_load_font(void *v, void *cookie, struct wsdisplay_font *data) { struct vga_config *vc = v; struct vgascreen *scr = cookie; @@ -947,10 +905,7 @@ vga_load_font(v, cookie, data) } void -vga_scrollback(v, cookie, lines) - void *v; - void *cookie; - int lines; +vga_scrollback(void *v, void *cookie, int lines) { struct vga_config *vc = v; struct vgascreen *scr = cookie; @@ -992,11 +947,7 @@ vga_scrollback(v, cookie, lines) } int -vga_alloc_attr(id, fg, bg, flags, attrp) - void *id; - int fg, bg; - int flags; - long *attrp; +vga_alloc_attr(void *id, int fg, int bg, int flags, long *attrp) { struct vgascreen *scr = id; struct vga_config *vc = scr->cfg; @@ -1028,10 +979,7 @@ vga_alloc_attr(id, fg, bg, flags, attrp) } void -vga_unpack_attr(id, attr, fg, bg, ul) - void *id; - long attr; - int *fg, *bg, *ul; +vga_unpack_attr(void *id, long attr, int *fg, int *bg, int *ul) { struct vgascreen *scr = id; struct vga_config *vc = scr->cfg; @@ -1052,9 +1000,7 @@ vga_unpack_attr(id, attr, fg, bg, ul) } int -vga_copyrows(id, srcrow, dstrow, nrows) - void *id; - int srcrow, dstrow, nrows; +vga_copyrows(void *id, int srcrow, int dstrow, int nrows) { struct vgascreen *scr = id; bus_space_tag_t memt = scr->pcs.hdl->ph_memt; @@ -1114,7 +1060,7 @@ vga_copyrows(id, srcrow, dstrow, nrows) #ifdef WSCONS_SUPPORT_PCVTFONTS #define NOTYET 0xffff -static u_int16_t pcvt_unichars[0xa0] = { +static const u_int16_t pcvt_unichars[0xa0] = { /* 0 */ _e006U, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, @@ -1231,9 +1177,7 @@ static u_int16_t pcvt_unichars[0xa0] = { int vga_pcvt_mapchar(int, unsigned int *); int -vga_pcvt_mapchar(uni, index) - int uni; - unsigned int *index; +vga_pcvt_mapchar(int uni, unsigned int *index) { int i; @@ -1251,11 +1195,7 @@ vga_pcvt_mapchar(uni, index) int _vga_mapchar(void *, struct vgafont *, int, unsigned int *); int -_vga_mapchar(id, font, uni, index) - void *id; - struct vgafont *font; - int uni; - unsigned int *index; +_vga_mapchar(void *id, struct vgafont *font, int uni, unsigned int *index) { switch (font->encoding) { @@ -1284,10 +1224,7 @@ _vga_mapchar(id, font, uni, index) } int -vga_mapchar(id, uni, index) - void *id; - int uni; - unsigned int *index; +vga_mapchar(void *id, int uni, unsigned int *index) { struct vgascreen *scr = id; unsigned int idx1, idx2; @@ -1311,12 +1248,7 @@ vga_mapchar(id, uni, index) } int -vga_putchar(c, row, col, uc, attr) - void *c; - int row; - int col; - u_int uc; - long attr; +vga_putchar(void *c, int row, int col, u_int uc, long attr) { struct vgascreen *scr = c; @@ -1327,9 +1259,7 @@ vga_putchar(c, row, col, uc, attr) } void -vga_burner(v, on, flags) - void *v; - u_int on, flags; +vga_burner(void *v, u_int on, u_int flags) { struct vga_config *vc = v; struct vga_handle *vh = &vc->hdl; @@ -1356,10 +1286,7 @@ vga_burner(v, on, flags) } int -vga_getchar(c, row, col, cell) - void *c; - int row, col; - struct wsdisplay_charcell *cell; +vga_getchar(void *c, int row, int col, struct wsdisplay_charcell *cell) { struct vga_config *vc = c; diff --git a/sys/dev/ic/vga_subr.c b/sys/dev/ic/vga_subr.c index bff1afc56da..1cec569f1b5 100644 --- a/sys/dev/ic/vga_subr.c +++ b/sys/dev/ic/vga_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_subr.c,v 1.3 2004/04/02 04:39:50 deraadt Exp $ */ +/* $OpenBSD: vga_subr.c,v 1.4 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: vga_subr.c,v 1.6 2000/01/25 02:44:03 ad Exp $ */ /* @@ -44,8 +44,7 @@ static void fontram(struct vga_handle *); static void textram(struct vga_handle *); static void -fontram(vh) - struct vga_handle *vh; +fontram(struct vga_handle *vh) { /* program sequencer to access character generator */ @@ -62,8 +61,7 @@ fontram(vh) } static void -textram(vh) - struct vga_handle *vh; +textram(struct vga_handle *vh) { /* program sequencer to access video ram */ @@ -81,11 +79,8 @@ textram(vh) } void -vga_loadchars(vh, fontset, first, num, lpc, data) - struct vga_handle *vh; - int fontset, first, num; - int lpc; - char *data; +vga_loadchars(struct vga_handle *vh, int fontset, int first, int num, int lpc, + char *data) { int offset, i, j, s; @@ -106,16 +101,14 @@ vga_loadchars(vh, fontset, first, num, lpc, data) } void -vga_setfontset(vh, fontset1, fontset2) - struct vga_handle *vh; - int fontset1, fontset2; +vga_setfontset(struct vga_handle *vh, int fontset1, int fontset2) { u_int8_t cmap; - static u_int8_t cmaptaba[] = { + static const u_int8_t cmaptaba[] = { 0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13 }; - static u_int8_t cmaptabb[] = { + static const u_int8_t cmaptabb[] = { 0x00, 0x20, 0x04, 0x24, 0x08, 0x28, 0x0c, 0x2c }; @@ -127,9 +120,7 @@ vga_setfontset(vh, fontset1, fontset2) } void -vga_setscreentype(vh, type) - struct vga_handle *vh; - const struct wsscreen_descr *type; +vga_setscreentype(struct vga_handle *vh, const struct wsscreen_descr *type) { vga_6845_write(vh, maxrow, type->fontheight - 1); diff --git a/sys/dev/ic/vgavar.h b/sys/dev/ic/vgavar.h index fd36b95ba49..6c770aabb06 100644 --- a/sys/dev/ic/vgavar.h +++ b/sys/dev/ic/vgavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vgavar.h,v 1.10 2010/08/08 17:21:05 miod Exp $ */ +/* $OpenBSD: vgavar.h,v 1.11 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: vgavar.h,v 1.4 2000/06/17 07:11:50 soda Exp $ */ /* @@ -91,9 +91,8 @@ static inline void _vga_gdc_write(struct vga_handle *, int, u_int8_t); #define vga_enable(vh) \ vga_raw_write(vh, 0, 0x20); -static inline u_int8_t _vga_attr_read(vh, reg) - struct vga_handle *vh; - int reg; +static inline u_int8_t +_vga_attr_read(struct vga_handle *vh, int reg) { u_int8_t res; @@ -111,10 +110,8 @@ static inline u_int8_t _vga_attr_read(vh, reg) return (res); } -static inline void _vga_attr_write(vh, reg, val) - struct vga_handle *vh; - int reg; - u_int8_t val; +static inline void +_vga_attr_write(struct vga_handle *vh, int reg, u_int8_t val) { /* reset state */ (void) bus_space_read_1(vh->vh_iot, vh->vh_ioh_6845, 10); @@ -128,35 +125,29 @@ static inline void _vga_attr_write(vh, reg, val) vga_enable(vh); } -static inline u_int8_t _vga_ts_read(vh, reg) - struct vga_handle *vh; - int reg; +static inline u_int8_t +_vga_ts_read(struct vga_handle *vh, int reg) { vga_raw_write(vh, VGA_TS_INDEX, reg); return (vga_raw_read(vh, VGA_TS_DATA)); } -static inline void _vga_ts_write(vh, reg, val) - struct vga_handle *vh; - int reg; - u_int8_t val; +static inline void +_vga_ts_write(struct vga_handle *vh, int reg, u_int8_t val) { vga_raw_write(vh, VGA_TS_INDEX, reg); vga_raw_write(vh, VGA_TS_DATA, val); } -static inline u_int8_t _vga_gdc_read(vh, reg) - struct vga_handle *vh; - int reg; +static inline u_int8_t +_vga_gdc_read(struct vga_handle *vh, int reg) { vga_raw_write(vh, VGA_GDC_INDEX, reg); return (vga_raw_read(vh, VGA_GDC_DATA)); } -static inline void _vga_gdc_write(vh, reg, val) - struct vga_handle *vh; - int reg; - u_int8_t val; +static inline void +_vga_gdc_write(struct vga_handle *vh, int reg, u_int8_t val) { vga_raw_write(vh, VGA_GDC_INDEX, reg); vga_raw_write(vh, VGA_GDC_DATA, val); diff --git a/sys/dev/isa/pcdisplay.c b/sys/dev/isa/pcdisplay.c index 4f7df6e188c..864fb2e4a29 100644 --- a/sys/dev/isa/pcdisplay.c +++ b/sys/dev/isa/pcdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcdisplay.c,v 1.10 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: pcdisplay.c,v 1.11 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: pcdisplay.c,v 1.9.4.1 2000/06/30 16:27:48 simonb Exp $ */ /* @@ -123,8 +123,7 @@ const struct wsdisplay_accessops pcdisplay_accessops = { }; static int -pcdisplay_probe_col(iot, memt) - bus_space_tag_t iot, memt; +pcdisplay_probe_col(bus_space_tag_t iot, bus_space_tag_t memt) { bus_space_handle_t memh, ioh_6845; u_int16_t oldval, val; @@ -147,8 +146,7 @@ pcdisplay_probe_col(iot, memt) } static int -pcdisplay_probe_mono(iot, memt) - bus_space_tag_t iot, memt; +pcdisplay_probe_mono(bus_space_tag_t iot, bus_space_tag_t memt) { bus_space_handle_t memh, ioh_6845; u_int16_t oldval, val; @@ -171,10 +169,8 @@ pcdisplay_probe_mono(iot, memt) } static void -pcdisplay_init(dc, iot, memt, mono) - struct pcdisplay_config *dc; - bus_space_tag_t iot, memt; - int mono; +pcdisplay_init(struct pcdisplay_config *dc, bus_space_tag_t iot, + bus_space_tag_t memt, int mono) { struct pcdisplay_handle *ph = &dc->dc_ph; int cpos; @@ -214,10 +210,7 @@ pcdisplay_init(dc, iot, memt, mono) } int -pcdisplay_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +pcdisplay_match(struct device *parent, void *match, void *aux) { struct isa_attach_args *ia = aux; int mono; @@ -253,9 +246,7 @@ pcdisplay_match(parent, match, aux) } void -pcdisplay_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +pcdisplay_attach(struct device *parent, struct device *self, void *aux) { struct isa_attach_args *ia = aux; struct pcdisplay_softc *sc = (struct pcdisplay_softc *)self; @@ -296,8 +287,7 @@ pcdisplay_attach(parent, self, aux) int -pcdisplay_cnattach(iot, memt) - bus_space_tag_t iot, memt; +pcdisplay_cnattach(bus_space_tag_t iot, bus_space_tag_t memt) { int mono; @@ -320,8 +310,7 @@ pcdisplay_cnattach(iot, memt) } static int -pcdisplay_is_console(iot) - bus_space_tag_t iot; +pcdisplay_is_console(bus_space_tag_t iot) { if (pcdisplayconsole && !pcdisplay_console_attached && @@ -331,12 +320,7 @@ pcdisplay_is_console(iot) } static int -pcdisplay_ioctl(v, cmd, data, flag, p) - void *v; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +pcdisplay_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) { /* * XXX "do something!" @@ -345,21 +329,14 @@ pcdisplay_ioctl(v, cmd, data, flag, p) } static paddr_t -pcdisplay_mmap(v, offset, prot) - void *v; - off_t offset; - int prot; +pcdisplay_mmap(void *v, off_t offset, int prot) { return (-1); } static int -pcdisplay_alloc_screen(v, type, cookiep, curxp, curyp, defattrp) - void *v; - const struct wsscreen_descr *type; - void **cookiep; - int *curxp, *curyp; - long *defattrp; +pcdisplay_alloc_screen(void *v, const struct wsscreen_descr *type, + void **cookiep, int *curxp, int *curyp, long *defattrp) { struct pcdisplay_softc *sc = v; @@ -375,9 +352,7 @@ pcdisplay_alloc_screen(v, type, cookiep, curxp, curyp, defattrp) } static void -pcdisplay_free_screen(v, cookie) - void *v; - void *cookie; +pcdisplay_free_screen(void *v, void *cookie) { struct pcdisplay_softc *sc = v; @@ -388,12 +363,8 @@ pcdisplay_free_screen(v, cookie) } static int -pcdisplay_show_screen(v, cookie, waitok, cb, cbarg) - void *v; - void *cookie; - int waitok; - void (*cb)(void *, int, int); - void *cbarg; +pcdisplay_show_screen(void *v, void *cookie, int waitok, + void (*cb)(void *, int, int), void *cbarg) { #ifdef DIAGNOSTIC struct pcdisplay_softc *sc = v; @@ -405,11 +376,7 @@ pcdisplay_show_screen(v, cookie, waitok, cb, cbarg) } static int -pcdisplay_alloc_attr(id, fg, bg, flags, attrp) - void *id; - int fg, bg; - int flags; - long *attrp; +pcdisplay_alloc_attr(void *id, int fg, int bg, int flags, long *attrp) { if (flags & WSATTR_REVERSE) *attrp = FG_BLACK | BG_LIGHTGREY; @@ -419,10 +386,7 @@ pcdisplay_alloc_attr(id, fg, bg, flags, attrp) } static void -pcdisplay_unpack_attr(id, attr, fg, bg, ul) - void *id; - long attr; - int *fg, *bg, *ul; +pcdisplay_unpack_attr(void *id, long attr, int *fg, int *bg, int *ul) { if (attr == (FG_BLACK | BG_LIGHTGREY)) { *fg = WSCOL_BLACK; diff --git a/sys/dev/isa/vga_isa.c b/sys/dev/isa/vga_isa.c index fe53673f45c..f337f0ddb8a 100644 --- a/sys/dev/isa/vga_isa.c +++ b/sys/dev/isa/vga_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_isa.c,v 1.8 2002/03/14 01:26:56 millert Exp $ */ +/* $OpenBSD: vga_isa.c,v 1.9 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: vga_isa.c,v 1.3 1998/06/12 18:45:48 drochner Exp $ */ /* @@ -60,10 +60,7 @@ struct cfattach vga_isa_ca = { }; int -vga_isa_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +vga_isa_match(struct device *parent, void *match, void *aux) { struct isa_attach_args *ia = aux; @@ -87,9 +84,7 @@ vga_isa_match(parent, match, aux) } void -vga_isa_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +vga_isa_attach(struct device *parent, struct device *self, void *aux) { struct isa_attach_args *ia = aux; #if 0 @@ -103,8 +98,7 @@ vga_isa_attach(parent, self, aux) } int -vga_isa_cnattach(iot, memt) - bus_space_tag_t iot, memt; +vga_isa_cnattach(bus_space_tag_t iot, bus_space_tag_t memt) { return (vga_cnattach(iot, memt, WSDISPLAY_TYPE_ISAVGA, 1)); } diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c index 3867baa5a5e..5de50478603 100644 --- a/sys/dev/rasops/rasops.c +++ b/sys/dev/rasops/rasops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops.c,v 1.21 2010/01/12 00:41:03 chl Exp $ */ +/* $OpenBSD: rasops.c,v 1.22 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */ /*- @@ -167,9 +167,7 @@ struct rotatedfont { * Initialize a 'rasops_info' descriptor. */ int -rasops_init(ri, wantrows, wantcols) - struct rasops_info *ri; - int wantrows, wantcols; +rasops_init(struct rasops_info *ri, int wantrows, int wantcols) { #ifdef _KERNEL @@ -237,9 +235,7 @@ rasops_init(ri, wantrows, wantcols) * Reconfigure (because parameters have changed in some way). */ int -rasops_reconfig(ri, wantrows, wantcols) - struct rasops_info *ri; - int wantrows, wantcols; +rasops_reconfig(struct rasops_info *ri, int wantrows, int wantcols) { int l, bpp, s; @@ -419,10 +415,7 @@ rasops_reconfig(ri, wantrows, wantcols) * Map a character. */ int -rasops_mapchar(cookie, c, cp) - void *cookie; - int c; - u_int *cp; +rasops_mapchar(void *cookie, int c, u_int *cp) { struct rasops_info *ri; @@ -461,10 +454,7 @@ rasops_mapchar(cookie, c, cp) * Allocate a color attribute. */ int -rasops_alloc_cattr(cookie, fg, bg, flg, attr) - void *cookie; - int fg, bg, flg; - long *attr; +rasops_alloc_cattr(void *cookie, int fg, int bg, int flg, long *attr) { int swap; @@ -505,10 +495,7 @@ rasops_alloc_cattr(cookie, fg, bg, flg, attr) * Allocate a mono attribute. */ int -rasops_alloc_mattr(cookie, fg, bg, flg, attr) - void *cookie; - int fg, bg, flg; - long *attr; +rasops_alloc_mattr(void *cookie, int fg, int bg, int flg, long *attr) { int swap; @@ -532,9 +519,7 @@ rasops_alloc_mattr(cookie, fg, bg, flg, attr) * Copy rows. */ int -rasops_copyrows(cookie, src, dst, num) - void *cookie; - int src, dst, num; +rasops_copyrows(void *cookie, int src, int dst, int num) { int32_t *sp, *dp, *srp, *drp; struct rasops_info *ri; @@ -615,9 +600,7 @@ rasops_copyrows(cookie, src, dst, num) * these cases anyway. */ int -rasops_copycols(cookie, row, src, dst, num) - void *cookie; - int row, src, dst, num; +rasops_copycols(void *cookie, int row, int src, int dst, int num) { struct rasops_info *ri; u_char *sp, *dp; @@ -684,9 +667,7 @@ rasops_copycols(cookie, row, src, dst, num) * Turn cursor off/on. */ int -rasops_cursor(cookie, on, row, col) - void *cookie; - int on, row, col; +rasops_cursor(void *cookie, int on, int row, int col) { struct rasops_info *ri; int rc; @@ -734,8 +715,7 @@ rasops_cursor(cookie, on, row, col) * Make the device colormap */ void -rasops_init_devcmap(ri) - struct rasops_info *ri; +rasops_init_devcmap(struct rasops_info *ri) { int i; #if NRASOPS15 > 0 || NRASOPS16 > 0 || NRASOPS24 > 0 || NRASOPS32 > 0 @@ -830,10 +810,7 @@ rasops_init_devcmap(ri) * Unpack a rasops attribute */ void -rasops_unpack_attr(cookie, attr, fg, bg, underline) - void *cookie; - long attr; - int *fg, *bg, *underline; +rasops_unpack_attr(void *cookie, long attr, int *fg, int *bg, int *underline) { *fg = ((u_int)attr >> 24) & 0xf; *bg = ((u_int)attr >> 16) & 0xf; @@ -845,10 +822,7 @@ rasops_unpack_attr(cookie, attr, fg, bg, underline) * Erase rows */ int -rasops_eraserows(cookie, row, num, attr) - void *cookie; - int row, num; - long attr; +rasops_eraserows(void *cookie, int row, int num, long attr) { struct rasops_info *ri; int np, nw, cnt, delta; @@ -920,8 +894,7 @@ rasops_eraserows(cookie, row, num, attr) * rasops_cursor(). */ int -rasops_do_cursor(ri) - struct rasops_info *ri; +rasops_do_cursor(struct rasops_info *ri) { int full1, height, cnt, slop1, slop2, row, col; u_char *dp, *rp; @@ -993,10 +966,7 @@ rasops_do_cursor(ri) * Erase columns. */ int -rasops_erasecols(cookie, row, col, num, attr) - void *cookie; - int row, col, num; - long attr; +rasops_erasecols(void *cookie, int row, int col, int num, long attr) { int n8, height, cnt, slop1, slop2, clr; struct rasops_info *ri; @@ -1159,9 +1129,7 @@ rasops_rotate_font(int *cookie) } void -rasops_copychar(cookie, srcrow, dstrow, srccol, dstcol) - void *cookie; - int srcrow, dstrow, srccol, dstcol; +rasops_copychar(void *cookie, int srcrow, int dstrow, int srccol, int dstcol) { struct rasops_info *ri; u_char *sp, *dp; @@ -1201,11 +1169,7 @@ rasops_copychar(cookie, srcrow, dstrow, srccol, dstcol) } int -rasops_putchar_rotated(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops_putchar_rotated(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; u_char *rp; @@ -1239,10 +1203,7 @@ rasops_putchar_rotated(cookie, row, col, uc, attr) } int -rasops_erasecols_rotated(cookie, row, col, num, attr) - void *cookie; - int row, col, num; - long attr; +rasops_erasecols_rotated(void *cookie, int row, int col, int num, long attr) { struct rasops_info *ri; int i; @@ -1261,9 +1222,7 @@ rasops_erasecols_rotated(cookie, row, col, num, attr) /* XXX: these could likely be optimised somewhat. */ int -rasops_copyrows_rotated(cookie, src, dst, num) - void *cookie; - int src, dst, num; +rasops_copyrows_rotated(void *cookie, int src, int dst, int num) { struct rasops_info *ri = (struct rasops_info *)cookie; int col, roff; @@ -1284,9 +1243,7 @@ rasops_copyrows_rotated(cookie, src, dst, num) } int -rasops_copycols_rotated(cookie, row, src, dst, num) - void *cookie; - int row, src, dst, num; +rasops_copycols_rotated(void *cookie, int row, int src, int dst, int num) { int coff; @@ -1304,10 +1261,7 @@ rasops_copycols_rotated(cookie, row, src, dst, num) } int -rasops_eraserows_rotated(cookie, row, num, attr) - void *cookie; - int row, num; - long attr; +rasops_eraserows_rotated(void *cookie, int row, int num, long attr) { struct rasops_info *ri; int col, rn; diff --git a/sys/dev/rasops/rasops1.c b/sys/dev/rasops/rasops1.c index bbca6a6369c..0b2a0ada397 100644 --- a/sys/dev/rasops/rasops1.c +++ b/sys/dev/rasops/rasops1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops1.c,v 1.7 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops1.c,v 1.8 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops1.c,v 1.11 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -53,8 +53,7 @@ int rasops1_putchar16(void *, int, int col, u_int, long); * Initialize rasops_info struct for this colordepth. */ void -rasops1_init(ri) - struct rasops_info *ri; +rasops1_init(struct rasops_info *ri) { rasops_masks_init(); @@ -83,11 +82,7 @@ rasops1_init(ri) * Paint a single character. This is the generic version, this is ugly. */ int -rasops1_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops1_putchar(void *cookie, int row, int col, u_int uc, long attr) { u_int fs, rs, fb, bg, fg, lmask, rmask; u_int32_t height, width; @@ -233,11 +228,7 @@ rasops1_putchar(cookie, row, col, uc, attr) * Paint a single character. This is for 8-pixel wide fonts. */ int -rasops1_putchar8(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops1_putchar8(void *cookie, int row, int col, u_int uc, long attr) { int height, fs, rs, bg, fg; struct rasops_info *ri; @@ -300,11 +291,7 @@ rasops1_putchar8(cookie, row, col, uc, attr) * Paint a single character. This is for 16-pixel wide fonts. */ int -rasops1_putchar16(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops1_putchar16(void *cookie, int row, int col, u_int uc, long attr) { int height, fs, rs, bg, fg; struct rasops_info *ri; diff --git a/sys/dev/rasops/rasops15.c b/sys/dev/rasops/rasops15.c index 66a2dc95ea4..800dfdc57e5 100644 --- a/sys/dev/rasops/rasops15.c +++ b/sys/dev/rasops/rasops15.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops15.c,v 1.7 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops15.c,v 1.8 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops15.c,v 1.7 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -69,8 +69,7 @@ static int stamp_mutex; /* XXX see note in readme */ * Initialize rasops_info struct for this colordepth. */ void -rasops15_init(ri) - struct rasops_info *ri; +rasops15_init(struct rasops_info *ri) { switch (ri->ri_font->fontwidth) { @@ -106,11 +105,7 @@ rasops15_init(ri) * Paint a single character. */ int -rasops15_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops15_putchar(void *cookie, int row, int col, u_int uc, long attr) { int fb, width, height, cnt, clr[2]; struct rasops_info *ri; @@ -182,9 +177,7 @@ rasops15_putchar(cookie, row, col, uc, attr) * Recompute the (2x2)x1 blitting stamp. */ void -rasops15_makestamp(ri, attr) - struct rasops_info *ri; - long attr; +rasops15_makestamp(struct rasops_info *ri, long attr) { int32_t fg, bg; int i; @@ -212,11 +205,7 @@ rasops15_makestamp(ri, attr) * Paint a single character. This is for 8-pixel wide fonts. */ int -rasops15_putchar8(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops15_putchar8(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, so, fs; @@ -292,11 +281,7 @@ rasops15_putchar8(cookie, row, col, uc, attr) * Paint a single character. This is for 12-pixel wide fonts. */ int -rasops15_putchar12(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops15_putchar12(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, so, fs; @@ -376,11 +361,7 @@ rasops15_putchar12(cookie, row, col, uc, attr) * Paint a single character. This is for 16-pixel wide fonts. */ int -rasops15_putchar16(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops15_putchar16(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, so, fs; diff --git a/sys/dev/rasops/rasops2.c b/sys/dev/rasops/rasops2.c index 1b2546aedf9..32ef47aa89e 100644 --- a/sys/dev/rasops/rasops2.c +++ b/sys/dev/rasops/rasops2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops2.c,v 1.9 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops2.c,v 1.10 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops2.c,v 1.5 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -63,8 +63,7 @@ static int stamp_mutex; /* XXX see note in README */ * Initialize rasops_info struct for this colordepth. */ void -rasops2_init(ri) - struct rasops_info *ri; +rasops2_init(struct rasops_info *ri) { rasops_masks_init(); @@ -117,11 +116,7 @@ rasops2_mergebits(u_char *fr, int fg, int bg) * Paint a single character. This is the generic version, this is ugly. */ int -rasops2_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops2_putchar(void *cookie, int row, int col, u_int uc, long attr) { int height, width, fs, rs, bg, fg, lmask, rmask; u_int fb; @@ -234,9 +229,7 @@ rasops2_putchar(cookie, row, col, uc, attr) * Recompute the blitting stamp. */ void -rasops2_makestamp(ri, attr) - struct rasops_info *ri; - long attr; +rasops2_makestamp(struct rasops_info *ri, long attr) { int i, fg, bg; @@ -256,11 +249,7 @@ rasops2_makestamp(ri, attr) * Put a single character. This is for 8-pixel wide fonts. */ int -rasops2_putchar8(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops2_putchar8(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs, rs; @@ -327,11 +316,7 @@ rasops2_putchar8(cookie, row, col, uc, attr) * Put a single character. This is for 12-pixel wide fonts. */ int -rasops2_putchar12(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops2_putchar12(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs, rs; @@ -401,11 +386,7 @@ rasops2_putchar12(cookie, row, col, uc, attr) * Put a single character. This is for 16-pixel wide fonts. */ int -rasops2_putchar16(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops2_putchar16(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs, rs; diff --git a/sys/dev/rasops/rasops24.c b/sys/dev/rasops/rasops24.c index 0847f7295fb..788c36e6679 100644 --- a/sys/dev/rasops/rasops24.c +++ b/sys/dev/rasops/rasops24.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops24.c,v 1.8 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops24.c,v 1.9 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops24.c,v 1.12 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -74,8 +74,7 @@ static int stamp_mutex; /* XXX see note in readme */ * Initialize rasops_info struct for this colordepth. */ void -rasops24_init(ri) - struct rasops_info *ri; +rasops24_init(struct rasops_info *ri) { switch (ri->ri_font->fontwidth) { @@ -113,11 +112,7 @@ rasops24_init(ri) * XXX this bites - we should use masks. */ int -rasops24_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops24_putchar(void *cookie, int row, int col, u_int uc, long attr) { int fb, width, height, cnt, clr[2]; struct rasops_info *ri; @@ -196,9 +191,7 @@ rasops24_putchar(cookie, row, col, uc, attr) * Recompute the blitting stamp. */ void -rasops24_makestamp(ri, attr) - struct rasops_info *ri; - long attr; +rasops24_makestamp(struct rasops_info *ri, long attr) { u_int fg, bg, c1, c2, c3, c4; int i; @@ -239,11 +232,7 @@ rasops24_makestamp(ri, attr) * Put a single character. This is for 8-pixel wide fonts. */ int -rasops24_putchar8(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops24_putchar8(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, so, fs; @@ -321,11 +310,7 @@ rasops24_putchar8(cookie, row, col, uc, attr) * Put a single character. This is for 12-pixel wide fonts. */ int -rasops24_putchar12(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops24_putchar12(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, so, fs; @@ -410,11 +395,7 @@ rasops24_putchar12(cookie, row, col, uc, attr) * Put a single character. This is for 16-pixel wide fonts. */ int -rasops24_putchar16(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops24_putchar16(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, so, fs; @@ -507,10 +488,7 @@ rasops24_putchar16(cookie, row, col, uc, attr) * Erase rows. This is nice and easy due to alignment. */ int -rasops24_eraserows(cookie, row, num, attr) - void *cookie; - int row, num; - long attr; +rasops24_eraserows(void *cookie, int row, int num, long attr) { int n9, n3, n1, cnt, stride, delta; u_int32_t *dp, clr, stamp[3]; @@ -611,10 +589,7 @@ rasops24_eraserows(cookie, row, num, attr) * Erase columns. */ int -rasops24_erasecols(cookie, row, col, num, attr) - void *cookie; - int row, col, num; - long attr; +rasops24_erasecols(void *cookie, int row, int col, int num, long attr) { int n12, n4, height, cnt, slop, clr, stamp[3]; struct rasops_info *ri; diff --git a/sys/dev/rasops/rasops32.c b/sys/dev/rasops/rasops32.c index 7884b9dd094..60719ea4537 100644 --- a/sys/dev/rasops/rasops32.c +++ b/sys/dev/rasops/rasops32.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops32.c,v 1.6 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops32.c,v 1.7 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops32.c,v 1.7 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -44,8 +44,7 @@ int rasops32_putchar(void *, int, int, u_int, long); * Initialize a 'rasops_info' descriptor for this depth. */ void -rasops32_init(ri) - struct rasops_info *ri; +rasops32_init(struct rasops_info *ri) { if (ri->ri_rnum == 0) { @@ -64,11 +63,7 @@ rasops32_init(ri) * Paint a single character. */ int -rasops32_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops32_putchar(void *cookie, int row, int col, u_int uc, long attr) { int width, height, cnt, fs, fb, clr[2]; struct rasops_info *ri; diff --git a/sys/dev/rasops/rasops4.c b/sys/dev/rasops/rasops4.c index 856bb20117b..de5405055b1 100644 --- a/sys/dev/rasops/rasops4.c +++ b/sys/dev/rasops/rasops4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops4.c,v 1.9 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops4.c,v 1.10 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops4.c,v 1.4 2001/11/15 09:48:15 lukem Exp $ */ /*- @@ -62,8 +62,7 @@ static int stamp_mutex; /* XXX see note in README */ * Initialize rasops_info struct for this colordepth. */ void -rasops4_init(ri) - struct rasops_info *ri; +rasops4_init(struct rasops_info *ri) { rasops_masks_init(); @@ -97,11 +96,7 @@ rasops4_init(ri) * Paint a single character. This is the generic version, this is ugly. */ int -rasops4_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops4_putchar(void *cookie, int row, int col, u_int uc, long attr) { int height, width, fs, rs, fb, bg, fg, lmask, rmask; struct rasops_info *ri; @@ -214,11 +209,7 @@ rasops4_putchar(cookie, row, col, uc, attr) * Put a single character. This is the generic version. */ int -rasops4_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops4_putchar(void *cookie, int row, int col, u_int uc, long attr) { /* XXX punt */ @@ -230,9 +221,7 @@ rasops4_putchar(cookie, row, col, uc, attr) * Recompute the blitting stamp. */ void -rasops4_makestamp(ri, attr) - struct rasops_info *ri; - long attr; +rasops4_makestamp(struct rasops_info *ri, long attr) { int i, fg, bg; @@ -259,11 +248,7 @@ rasops4_makestamp(ri, attr) * Put a single character. This is for 8-pixel wide fonts. */ int -rasops4_putchar8(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops4_putchar8(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs, rs; @@ -335,11 +320,7 @@ rasops4_putchar8(cookie, row, col, uc, attr) * Put a single character. This is for 12-pixel wide fonts. */ int -rasops4_putchar12(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops4_putchar12(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs, rs; @@ -414,11 +395,7 @@ rasops4_putchar12(cookie, row, col, uc, attr) * Put a single character. This is for 16-pixel wide fonts. */ int -rasops4_putchar16(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops4_putchar16(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs, rs; diff --git a/sys/dev/rasops/rasops8.c b/sys/dev/rasops/rasops8.c index 4a728c2a7c9..c7905ccc68d 100644 --- a/sys/dev/rasops/rasops8.c +++ b/sys/dev/rasops/rasops8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops8.c,v 1.9 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops8.c,v 1.10 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops8.c,v 1.8 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -68,8 +68,7 @@ static int stamp_mutex; /* XXX see note in README */ * Initialize a 'rasops_info' descriptor for this depth. */ void -rasops8_init(ri) - struct rasops_info *ri; +rasops8_init(struct rasops_info *ri) { switch (ri->ri_font->fontwidth) { @@ -94,11 +93,7 @@ rasops8_init(ri) * Put a single character. */ int -rasops8_putchar(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops8_putchar(void *cookie, int row, int col, u_int uc, long attr) { int width, height, cnt, fs, fb; u_char *dp, *rp, *fr, clr[2]; @@ -167,9 +162,7 @@ rasops8_putchar(cookie, row, col, uc, attr) * Recompute the 4x1 blitting stamp. */ void -rasops8_makestamp(ri, attr) - struct rasops_info *ri; - long attr; +rasops8_makestamp(struct rasops_info *ri, long attr) { int32_t fg, bg; int i; @@ -201,11 +194,7 @@ rasops8_makestamp(ri, attr) * Put a single character. This is for 8-pixel wide fonts. */ int -rasops8_putchar8(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops8_putchar8(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs; @@ -273,11 +262,7 @@ rasops8_putchar8(cookie, row, col, uc, attr) * Put a single character. This is for 12-pixel wide fonts. */ int -rasops8_putchar12(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops8_putchar12(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs; @@ -348,11 +333,7 @@ rasops8_putchar12(cookie, row, col, uc, attr) * Put a single character. This is for 16-pixel wide fonts. */ int -rasops8_putchar16(cookie, row, col, uc, attr) - void *cookie; - int row, col; - u_int uc; - long attr; +rasops8_putchar16(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; int height, fs; diff --git a/sys/dev/rasops/rasops_bitops.h b/sys/dev/rasops/rasops_bitops.h index 77206aae4ab..f7ca9e39ff0 100644 --- a/sys/dev/rasops/rasops_bitops.h +++ b/sys/dev/rasops/rasops_bitops.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops_bitops.h,v 1.5 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: rasops_bitops.h,v 1.6 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: rasops_bitops.h,v 1.6 2000/04/12 14:22:30 pk Exp $ */ /*- @@ -37,10 +37,7 @@ * Erase columns. */ int -NAME(erasecols)(cookie, row, col, num, attr) - void *cookie; - int row, col, num; - long attr; +NAME(erasecols)(void *cookie, int row, int col, int num, long attr) { int lmask, rmask, lclr, rclr, clr; struct rasops_info *ri; @@ -116,8 +113,7 @@ NAME(erasecols)(cookie, row, col, num, attr) * Actually paint the cursor. */ int -NAME(do_cursor)(ri) - struct rasops_info *ri; +NAME(do_cursor)(struct rasops_info *ri) { int lmask, rmask, height, row, col, num; int32_t *dp, *rp; @@ -159,9 +155,7 @@ NAME(do_cursor)(ri) * Copy columns. Ick! */ int -NAME(copycols)(cookie, row, src, dst, num) - void *cookie; - int row, src, dst, num; +NAME(copycols)(void *cookie, int row, int src, int dst, int num) { int tmp, lmask, rmask, height, lnum, rnum, sb, db, cnt, full; int32_t *sp, *dp, *srp, *drp; diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c index c5a5378b464..66235d97e56 100644 --- a/sys/dev/wscons/wsdisplay_compat_usl.c +++ b/sys/dev/wscons/wsdisplay_compat_usl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay_compat_usl.c,v 1.20 2008/09/10 14:01:23 blambert Exp $ */ +/* $OpenBSD: wsdisplay_compat_usl.c,v 1.21 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: wsdisplay_compat_usl.c,v 1.12 2000/03/23 07:01:47 thorpej Exp $ */ /* @@ -92,11 +92,8 @@ static const struct wscons_syncops usl_syncops = { static int wscompat_usl_synctimeout = WSCOMPAT_USL_SYNCTIMEOUT; int -usl_sync_init(scr, sdp, p, acqsig, relsig, frsig) - struct wsscreen *scr; - struct usl_syncdata **sdp; - struct proc *p; - int acqsig, relsig, frsig; +usl_sync_init(struct wsscreen *scr, struct usl_syncdata **sdp, struct proc *p, + int acqsig, int relsig, int frsig) { struct usl_syncdata *sd; int res; @@ -126,8 +123,7 @@ usl_sync_init(scr, sdp, p, acqsig, relsig, frsig) } void -usl_sync_done(sd) - struct usl_syncdata *sd; +usl_sync_done(struct usl_syncdata *sd) { if (sd->s_flags & SF_DETACHPENDING) { timeout_del(&sd->s_detach_ch); @@ -142,8 +138,7 @@ usl_sync_done(sd) } int -usl_sync_check(sd) - struct usl_syncdata *sd; +usl_sync_check(struct usl_syncdata *sd) { if (sd->s_proc == pfind(sd->s_pid)) return (1); @@ -153,8 +148,7 @@ usl_sync_check(sd) } struct usl_syncdata * -usl_sync_get(scr) - struct wsscreen *scr; +usl_sync_get(struct wsscreen *scr) { struct usl_syncdata *sd; @@ -164,11 +158,8 @@ usl_sync_get(scr) } int -usl_detachproc(cookie, waitok, callback, cbarg) - void *cookie; - int waitok; - void (*callback)(void *, int, int); - void *cbarg; +usl_detachproc(void *cookie, int waitok, void (*callback)(void *, int, int), + void *cbarg) { struct usl_syncdata *sd = cookie; @@ -194,9 +185,7 @@ usl_detachproc(cookie, waitok, callback, cbarg) } int -usl_detachack(sd, ack) - struct usl_syncdata *sd; - int ack; +usl_detachack(struct usl_syncdata *sd, int ack) { if (!(sd->s_flags & SF_DETACHPENDING)) { DPRINTF(("usl_detachack: not detaching\n")); @@ -213,8 +202,7 @@ usl_detachack(sd, ack) } void -usl_detachtimeout(arg) - void *arg; +usl_detachtimeout(void *arg) { struct usl_syncdata *sd = arg; @@ -234,11 +222,8 @@ usl_detachtimeout(arg) } int -usl_attachproc(cookie, waitok, callback, cbarg) - void *cookie; - int waitok; - void (*callback)(void *, int, int); - void *cbarg; +usl_attachproc(void *cookie, int waitok, void (*callback)(void *, int, int), + void *cbarg) { struct usl_syncdata *sd = cookie; @@ -259,9 +244,7 @@ usl_attachproc(cookie, waitok, callback, cbarg) } int -usl_attachack(sd, ack) - struct usl_syncdata *sd; - int ack; +usl_attachack(struct usl_syncdata *sd, int ack) { if (!(sd->s_flags & SF_ATTACHPENDING)) { DPRINTF(("usl_attachack: not attaching\n")); @@ -278,8 +261,7 @@ usl_attachack(sd, ack) } void -usl_attachtimeout(arg) - void *arg; +usl_attachtimeout(void *arg) { struct usl_syncdata *sd = arg; @@ -299,12 +281,8 @@ usl_attachtimeout(arg) } int -wsdisplay_usl_ioctl1(sc, cmd, data, flag, p) - struct wsdisplay_softc *sc; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +wsdisplay_usl_ioctl1(struct wsdisplay_softc *sc, u_long cmd, caddr_t data, + int flag, struct proc *p) { int idx, maxidx; @@ -367,13 +345,8 @@ wsdisplay_usl_ioctl1(sc, cmd, data, flag, p) } int -wsdisplay_usl_ioctl2(sc, scr, cmd, data, flag, p) - struct wsdisplay_softc *sc; - struct wsscreen *scr; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +wsdisplay_usl_ioctl2(struct wsdisplay_softc *sc, struct wsscreen *scr, + u_long cmd, caddr_t data, int flag, struct proc *p) { int intarg, res; u_long req; diff --git a/sys/dev/wscons/wsemul_dumb.c b/sys/dev/wscons/wsemul_dumb.c index 08358d122a9..86010f0666a 100644 --- a/sys/dev/wscons/wsemul_dumb.c +++ b/sys/dev/wscons/wsemul_dumb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_dumb.c,v 1.9 2009/09/05 14:49:20 miod Exp $ */ +/* $OpenBSD: wsemul_dumb.c,v 1.10 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: wsemul_dumb.c,v 1.7 2000/01/05 11:19:36 drochner Exp $ */ /* @@ -74,11 +74,8 @@ struct wsemul_dumb_emuldata { struct wsemul_dumb_emuldata wsemul_dumb_console_emuldata; void * -wsemul_dumb_cnattach(type, cookie, ccol, crow, defattr) - const struct wsscreen_descr *type; - void *cookie; - int ccol, crow; - long defattr; +wsemul_dumb_cnattach(const struct wsscreen_descr *type, void *cookie, int ccol, + int crow, long defattr) { struct wsemul_dumb_emuldata *edp; const struct wsdisplay_emulops *emulops; @@ -102,13 +99,8 @@ wsemul_dumb_cnattach(type, cookie, ccol, crow, defattr) } void * -wsemul_dumb_attach(console, type, cookie, ccol, crow, cbcookie, defattr) - int console; - const struct wsscreen_descr *type; - void *cookie; - int ccol, crow; - void *cbcookie; - long defattr; +wsemul_dumb_attach(int console, const struct wsscreen_descr *type, void *cookie, + int ccol, int crow, void *cbcookie, long defattr) { struct wsemul_dumb_emuldata *edp; @@ -133,11 +125,7 @@ wsemul_dumb_attach(console, type, cookie, ccol, crow, cbcookie, defattr) } u_int -wsemul_dumb_output(cookie, data, count, kernel) - void *cookie; - const u_char *data; - u_int count; - int kernel; /* ignored */ +wsemul_dumb_output(void *cookie, const u_char *data, u_int count, int kernel) { struct wsemul_dumb_emuldata *edp = cookie; u_int processed = 0; @@ -297,18 +285,13 @@ wsemul_dumb_output(cookie, data, count, kernel) } int -wsemul_dumb_translate(cookie, in, out) - void *cookie; - keysym_t in; - const char **out; +wsemul_dumb_translate(void *cookie, keysym_t in, const char **out) { return (0); } void -wsemul_dumb_detach(cookie, crowp, ccolp) - void *cookie; - u_int *crowp, *ccolp; +wsemul_dumb_detach(void *cookie, u_int *crowp, u_int *ccolp) { struct wsemul_dumb_emuldata *edp = cookie; @@ -319,9 +302,7 @@ wsemul_dumb_detach(cookie, crowp, ccolp) } void -wsemul_dumb_resetop(cookie, op) - void *cookie; - enum wsemul_resetops op; +wsemul_dumb_resetop(void *cookie, enum wsemul_resetops op) { struct wsemul_dumb_emuldata *edp = cookie; diff --git a/sys/dev/wscons/wsemulconf.c b/sys/dev/wscons/wsemulconf.c index d95834b31f9..d5b7820cbc0 100644 --- a/sys/dev/wscons/wsemulconf.c +++ b/sys/dev/wscons/wsemulconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemulconf.c,v 1.7 2010/07/01 02:33:06 maja Exp $ */ +/* $OpenBSD: wsemulconf.c,v 1.8 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: wsemulconf.c,v 1.4 2000/01/05 11:19:37 drochner Exp $ */ /* @@ -56,8 +56,7 @@ static const struct wsemul_ops *wsemul_conf[] = { }; const struct wsemul_ops * -wsemul_pick(name) - const char *name; +wsemul_pick(const char *name) { const struct wsemul_ops **ops; @@ -78,8 +77,7 @@ wsemul_pick(name) } const char * -wsemul_getname(idx) - int idx; +wsemul_getname(int idx) { if (idx >= nitems(wsemul_conf) - 1) return (NULL); diff --git a/sys/dev/wscons/wskbdutil.c b/sys/dev/wscons/wskbdutil.c index afeea7ef45e..da902602df8 100644 --- a/sys/dev/wscons/wskbdutil.c +++ b/sys/dev/wscons/wskbdutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbdutil.c,v 1.8 2009/12/10 16:35:28 oga Exp $ */ +/* $OpenBSD: wskbdutil.c,v 1.9 2010/08/28 12:48:14 miod Exp $ */ /* $NetBSD: wskbdutil.c,v 1.7 1999/12/21 11:59:13 drochner Exp $ */ /*- @@ -178,14 +178,12 @@ static struct compose_tab_s { static int compose_tab_inorder = 0; -inline int compose_tab_cmp(struct compose_tab_s *, - struct compose_tab_s *); +inline int compose_tab_cmp(struct compose_tab_s *, struct compose_tab_s *); keysym_t ksym_upcase(keysym_t); void fillmapentry(const keysym_t *, int, struct wscons_keymap *); inline int -compose_tab_cmp(i, j) - struct compose_tab_s *i, *j; +compose_tab_cmp(struct compose_tab_s *i, struct compose_tab_s *j) { if (i->elem[0] == j->elem[0]) return(i->elem[1] - j->elem[1]); @@ -194,18 +192,18 @@ compose_tab_cmp(i, j) } keysym_t -wskbd_compose_value(compose_buf) - keysym_t *compose_buf; +wskbd_compose_value(keysym_t *compose_buf) { int i, j, r; struct compose_tab_s v; - if (! compose_tab_inorder) { + if (!compose_tab_inorder) { /* Insertion sort. */ for (i = 1; i < COMPOSE_SIZE; i++) { v = compose_tab[i]; /* find correct slot, moving others up */ - for (j = i; --j >= 0 && compose_tab_cmp(& v, & compose_tab[j]) < 0; ) + for (j = i; --j >= 0 && + compose_tab_cmp(&v, &compose_tab[j]) < 0;) compose_tab[j + 1] = compose_tab[j]; compose_tab[j + 1] = v; } @@ -265,8 +263,7 @@ static const u_char latin1_to_upper[256] = { }; keysym_t -ksym_upcase(ksym) - keysym_t ksym; +ksym_upcase(keysym_t ksym) { if (ksym >= KS_f1 && ksym <= KS_f20) return(KS_F1 - KS_f1 + ksym); @@ -279,10 +276,7 @@ ksym_upcase(ksym) } void -fillmapentry(kp, len, mapentry) - const keysym_t *kp; - int len; - struct wscons_keymap *mapentry; +fillmapentry(const keysym_t *kp, int len, struct wscons_keymap *mapentry) { switch (len) { case 0: @@ -324,10 +318,8 @@ fillmapentry(kp, len, mapentry) } void -wskbd_get_mapentry(mapdata, kc, mapentry) - const struct wskbd_mapdata *mapdata; - int kc; - struct wscons_keymap *mapentry; +wskbd_get_mapentry(const struct wskbd_mapdata *mapdata, int kc, + struct wscons_keymap *mapentry) { kbd_t cur; const keysym_t *kp; @@ -382,10 +374,7 @@ wskbd_get_mapentry(mapdata, kc, mapentry) } void -wskbd_init_keymap(newlen, map, maplen) - int newlen; - struct wscons_keymap **map; - int *maplen; +wskbd_init_keymap(int newlen, struct wscons_keymap **map, int *maplen) { int i; @@ -407,10 +396,8 @@ wskbd_init_keymap(newlen, map, maplen) } int -wskbd_load_keymap(mapdata, map, maplen) - const struct wskbd_mapdata *mapdata; - struct wscons_keymap **map; - int *maplen; +wskbd_load_keymap(const struct wskbd_mapdata *mapdata, + struct wscons_keymap **map, int *maplen) { int i, s, kc, stack_ptr; const keysym_t *kp; |