summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2014-04-04 22:32:14 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-04-04 22:32:52 +0200
commitfe0231ba14d8597b0d78bf6121dd15a82bbab34a (patch)
tree0a2c3e1db9d4aa148248c5a8cb3277cc41cd2c11 /i386/i386at
parent2aa14940b85cd3a38eff6ad4471ebf40a0074cb2 (diff)
Convert from K&R to ANSI
Convert from K&R style function definitions to ANSI style function definitions. * ddb/db_access.c: Convert function prototypes from K&R to ANSI. * ddb/db_aout.c: Likewise. * ddb/db_break.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_examine.c: Likewise. * ddb/db_expr.c: Likewise. * ddb/db_ext_symtab.c: Likewise. * ddb/db_input.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_mp.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_run.c: Likewise. * ddb/db_sym.c: Likewise. * ddb/db_task_thread.c: Likewise. * ddb/db_trap.c: Likewise. * ddb/db_variables.c: Likewise. * ddb/db_watch.c: Likewise. * device/blkio.c: Likewise. * device/chario.c: Likewise. * device/dev_lookup.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/loose_ends.c: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/phys.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386/user_ldt.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/kd_queue.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386at/rtc.c: Likewise. * i386/intel/pmap.c: Likewise. * i386/intel/read_fault.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_right.c: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/act.c: Likewise. * kern/exception.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/lock_mon.c: Likewise. * kern/mach_clock.c: Likewise. * kern/machine.c: Likewise. * kern/printf.c: Likewise. * kern/priority.c: Likewise. * kern/startup.c: Likewise. * kern/syscall_emulation.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread_swap.c: Likewise. * kern/time_stamp.c: Likewise. * kern/timer.c: Likewise. * kern/xpr.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_external.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_user.c: Likewise.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/com.c30
-rw-r--r--i386/i386at/kd.c186
-rw-r--r--i386/i386at/kd_event.c53
-rw-r--r--i386/i386at/kd_mouse.c78
-rw-r--r--i386/i386at/kd_queue.c6
-rw-r--r--i386/i386at/lpr.c22
-rw-r--r--i386/i386at/model_dep.c9
-rw-r--r--i386/i386at/rtc.c18
8 files changed, 177 insertions, 225 deletions
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index 07521f9..5e65ad8 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -464,11 +464,11 @@ natural_t *count; /* out */
}
io_return_t
-comsetstat(dev, flavor, data, count)
-dev_t dev;
-int flavor;
-int * data;
-natural_t count;
+comsetstat(
+ dev_t dev,
+ int flavor,
+ int * data,
+ natural_t count)
{
io_return_t result = D_SUCCESS;
int unit = minor(dev);
@@ -494,8 +494,7 @@ natural_t count;
}
void
-comintr(unit)
-int unit;
+comintr(int unit)
{
struct tty *tp = &com_tty[unit];
u_short addr = cominfo[unit]->address;
@@ -545,8 +544,7 @@ int unit;
}
static void
-comparam(unit)
-int unit;
+comparam(int unit)
{
struct tty *tp = &com_tty[unit];
u_short addr = (int)tp->t_addr;
@@ -615,8 +613,7 @@ comparm(int unit, int baud, int intr, int mode, int modem)
int comst_1, comst_2, comst_3, comst_4, comst_5 = 14;
void
-comstart(tp)
-struct tty *tp;
+comstart(struct tty *tp)
{
int nch;
#if 0
@@ -698,8 +695,9 @@ printf("Tty %p was stuck\n", tp);
* Set receive modem state from modem status register.
*/
void
-fix_modem_state(unit, modem_stat)
-int unit, modem_stat;
+fix_modem_state(
+ int unit,
+ int modem_stat)
{
int stat = 0;
@@ -817,9 +815,9 @@ commctl(
}
void
-comstop(tp, flags)
-struct tty *tp;
-int flags;
+comstop(
+ struct tty *tp,
+ int flags)
{
if ((tp->t_state & TS_BUSY) && (tp->t_state & TS_TTSTOP) == 0)
tp->t_state |= TS_FLUSH;
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 0de1e50..9f9faf4 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -383,9 +383,9 @@ pause(void)
* one column to the left, etc.
*/
void
-kd_debug_put(loc, c)
-int loc;
-char c;
+kd_debug_put(
+ int loc,
+ char c)
{
csrpos_t pos = ONE_PAGE - (loc+1) * ONE_SPACE;
@@ -398,8 +398,7 @@ extern boolean_t mouse_in_use;
int old_kb_mode;
void
-cnpollc(on)
-boolean_t on;
+cnpollc(boolean_t on)
{
if (mouse_in_use) {
if (on) {
@@ -440,10 +439,10 @@ boolean_t on;
*
*/
int
-kdopen(dev, flag, ior)
- dev_t dev;
- int flag;
- io_req_t ior;
+kdopen(
+ dev_t dev,
+ int flag,
+ io_req_t ior)
{
struct tty *tp;
spl_t o_pri;
@@ -569,19 +568,19 @@ kdmmap(dev, off, prot)
}
int
-kdportdeath(dev, port)
- dev_t dev;
- mach_port_t port;
+kdportdeath(
+ dev_t dev,
+ mach_port_t port)
{
return (tty_portdeath(&kd_tty, (ipc_port_t)port));
}
/*ARGSUSED*/
-io_return_t kdgetstat(dev, flavor, data, count)
- dev_t dev;
- int flavor;
- int * data; /* pointer to OUT array */
- natural_t *count; /* OUT */
+io_return_t kdgetstat(
+ dev_t dev,
+ int flavor,
+ int * data, /* pointer to OUT array */
+ natural_t *count) /* OUT */
{
io_return_t result;
@@ -607,11 +606,11 @@ io_return_t kdgetstat(dev, flavor, data, count)
}
/*ARGSUSED*/
-io_return_t kdsetstat(dev, flavor, data, count)
- dev_t dev;
- int flavor;
- int * data;
- natural_t count;
+io_return_t kdsetstat(
+ dev_t dev,
+ int flavor,
+ int * data,
+ natural_t count)
{
io_return_t result;
@@ -644,13 +643,12 @@ io_return_t kdsetstat(dev, flavor, data, count)
* on/off value.
*/
int
-kdsetbell(val, flags)
-int val; /* on or off */
-int flags; /* flags set for console */
+kdsetbell(
+ int val, /* on or off */
+ int flags) /* flags set for console */
{
int err = 0;
-
if (val == KD_BELLON)
kd_bellon();
else if (val == KD_BELLOFF)
@@ -661,15 +659,13 @@ int flags; /* flags set for console */
return(err);
}
-
/*
* kdgetkbent:
*
* Get entry from key mapping table. Returns error code, if any.
*/
int
-kdgetkbent(kbent)
-struct kbentry * kbent;
+kdgetkbent(struct kbentry *kbent)
{
u_char *cp;
spl_t o_pri = SPLKD(); /* probably superfluous */
@@ -689,9 +685,9 @@ struct kbentry * kbent;
* Set entry in key mapping table. Return error code, if any.
*/
int
-kdsetkbent(kbent, flags)
-struct kbentry * kbent;
-int flags; /* flags set for console */
+kdsetkbent(
+ struct kbentry *kbent,
+ int flags) /* flags set for console */
{
u_char *cp;
spl_t o_pri;
@@ -721,8 +717,7 @@ int flags; /* flags set for console */
*/
/*ARGSUSED*/
void
-kdintr(vec)
-int vec;
+kdintr(int vec)
{
struct tty *tp;
unsigned char c;
@@ -909,10 +904,10 @@ kd_resend(void)
* output: the new state
*/
int
-do_modifier(state, c, up)
-int state;
-Scancode c;
-boolean_t up;
+do_modifier(
+ int state,
+ Scancode c,
+ boolean_t up)
{
switch (c) {
case (K_ALTSC):
@@ -974,8 +969,7 @@ boolean_t up;
* are still held down.
*/
boolean_t
-kdcheckmagic(scancode)
-Scancode scancode;
+kdcheckmagic(Scancode scancode)
{
static int magic_state = KS_NORMAL; /* like kd_state */
boolean_t up = FALSE;
@@ -1070,8 +1064,7 @@ boolean_t extended;
* ASSUMES that it is never called from interrupt-driven code.
*/
void
-kdstart(tp)
-struct tty *tp;
+kdstart(struct tty *tp)
{
spl_t o_pri;
int ch;
@@ -1121,9 +1114,9 @@ struct tty *tp;
/*ARGSUSED*/
void
-kdstop(tp, flags)
- struct tty *tp;
- int flags;
+kdstop(
+ struct tty *tp,
+ int flags)
{
/*
* do nothing - all characters are output by one call to
@@ -1266,8 +1259,7 @@ kd_bellon(void)
int sit_for_0 = 1;
void
-kd_putc(ch)
-u_char ch;
+kd_putc(u_char ch)
{
if ((!ch) && sit_for_0)
return;
@@ -1320,8 +1312,7 @@ u_char ch;
*
*/
void
-kd_setpos(newpos)
-csrpos_t newpos;
+kd_setpos(csrpos_t newpos)
{
if (newpos > ONE_PAGE) {
kd_scrollup();
@@ -1483,8 +1474,7 @@ unsigned char color_table[] = { 0, 4, 2, 6, 1, 5, 3, 7,
*
*/
void
-kd_parserest(cp)
-u_char *cp;
+kd_parserest(u_char *cp)
{
int number[16], npar = 0, i;
csrpos_t newpos;
@@ -1990,8 +1980,7 @@ kd_clfrbcur(void)
*
*/
void
-kd_delln(number)
-int number;
+kd_delln(int number)
{
csrpos_t to;
csrpos_t from;
@@ -2029,8 +2018,7 @@ int number;
*
*/
void
-kd_insln(number)
-int number;
+kd_insln(int number)
{
csrpos_t to;
csrpos_t from;
@@ -2069,8 +2057,7 @@ int number;
*
*/
void
-kd_delch(number)
-int number;
+kd_delch(int number)
{
int count; /* num words moved/filled */
int delbytes; /* bytes to delete */
@@ -2111,8 +2098,7 @@ int number;
*
*/
void
-kd_erase(number)
-int number;
+kd_erase(int number)
{
csrpos_t i;
csrpos_t stop;
@@ -2161,8 +2147,7 @@ kd_eraseln(void)
*
*/
void
-kd_insch(number)
-int number;
+kd_insch(int number)
{
csrpos_t to;
csrpos_t from;
@@ -2203,8 +2188,7 @@ int number;
*
*/
boolean_t
-kd_isupper(c)
-u_char c;
+kd_isupper(u_char c)
{
if (('A' <= c) && (c <= 'Z'))
return(TRUE);
@@ -2212,8 +2196,7 @@ u_char c;
}
boolean_t
-kd_islower(c)
-u_char c;
+kd_islower(u_char c)
{
if (('a' <= c) && (c <= 'z'))
return(TRUE);
@@ -2230,8 +2213,7 @@ u_char c;
*
*/
void
-kd_senddata(ch)
-unsigned char ch;
+kd_senddata(unsigned char ch)
{
while (inb(K_STATUS) & K_IBUF_FUL)
;
@@ -2249,8 +2231,7 @@ unsigned char ch;
*
*/
void
-kd_sendcmd(ch)
-unsigned char ch;
+kd_sendcmd(unsigned char ch)
{
while (inb(K_STATUS) & K_IBUF_FUL)
;
@@ -2318,8 +2299,7 @@ kd_mouse_drain(void)
* Set kd_state and update the keyboard status LEDs.
*/
void
-set_kd_state(newstate)
-int newstate;
+set_kd_state(int newstate)
{
kd_state = newstate;
kd_setleds1(state2leds(newstate));
@@ -2332,8 +2312,7 @@ int newstate;
* a state vector.
*/
u_char
-state2leds(state)
-int state;
+state2leds(int state)
{
u_char result = 0;
@@ -2350,8 +2329,7 @@ int state;
* Set the keyboard LEDs according to the given byte.
*/
void
-kd_setleds1(val)
-u_char val;
+kd_setleds1(u_char val)
{
if (kd_ack != NOT_WAITING) {
#ifdef MACH_KBD
@@ -2380,8 +2358,7 @@ kd_setleds2(void)
* lock anyway.
*/
void
-cnsetleds(val)
-u_char val;
+cnsetleds(u_char val)
{
kd_senddata(K_CMD_LEDS);
(void)kd_getdata(); /* XXX - assume is ACK */
@@ -2712,9 +2689,10 @@ kd_noopreset(void)
*/
void
-bmpput(pos, ch, chattr)
-csrpos_t pos;
-char ch, chattr;
+bmpput(
+ csrpos_t pos,
+ char ch,
+ char chattr)
{
short xbit, ybit; /* u/l corner of char pos */
u_char *to, *from;
@@ -2740,8 +2718,9 @@ char ch, chattr;
* another.
*/
void
-bmpcp1char(from, to)
-csrpos_t from, to;
+bmpcp1char(
+ csrpos_t from,
+ csrpos_t to)
{
short from_xbit, from_ybit;
short to_xbit, to_ybit;
@@ -2766,9 +2745,10 @@ csrpos_t from, to;
* bmpvmup: Copy a block of character positions upwards.
*/
void
-bmpmvup(from, to, count)
-csrpos_t from, to;
-int count;
+bmpmvup(
+ csrpos_t from,
+ csrpos_t to,
+ int count)
{
short from_xbit, from_ybit;
short to_xbit, to_ybit;
@@ -2801,9 +2781,10 @@ int count;
* bmpmvdown: copy a block of characters down.
*/
void
-bmpmvdown(from, to, count)
-csrpos_t from, to;
-int count;
+bmpmvdown(
+ csrpos_t from,
+ csrpos_t to,
+ int count)
{
short from_xbit, from_ybit;
short to_xbit, to_ybit;
@@ -2839,10 +2820,10 @@ int count;
* bmpclear: clear one or more character positions.
*/
void
-bmpclear(to, count, chattr)
-csrpos_t to; /* 1st char */
-int count; /* num chars */
-char chattr; /* reverse or normal */
+bmpclear(
+ csrpos_t to, /* 1st char */
+ int count, /* num chars */
+ char chattr) /* reverse or normal */
{
short i;
u_short clearval;
@@ -2865,8 +2846,7 @@ char chattr; /* reverse or normal */
* bmpsetcursor: update the display and set the logical cursor.
*/
void
-bmpsetcursor(pos)
-csrpos_t pos;
+bmpsetcursor(csrpos_t pos)
{
/* erase old cursor & paint new one */
bmppaintcsr(kd_curpos, char_black);
@@ -2878,9 +2858,9 @@ csrpos_t pos;
* bmppaintcsr: paint cursor bits.
*/
void
-bmppaintcsr(pos, val)
-csrpos_t pos;
-u_char val;
+bmppaintcsr(
+ csrpos_t pos,
+ u_char val)
{
short xbit, ybit;
u_char *cp;
@@ -2901,9 +2881,10 @@ u_char val;
* (0, 0) is the upper left corner.
*/
void
-bmpch2bit(pos, xb, yb)
-csrpos_t pos;
-short *xb, *yb; /* x, y bit positions, u/l corner */
+bmpch2bit(
+ csrpos_t pos,
+ short *xb,
+ short *yb) /* x, y bit positions, u/l corner */
{
short xch, ych;
@@ -2920,8 +2901,9 @@ short *xb, *yb; /* x, y bit positions, u/l corner */
* byte.
*/
u_char *
-bit2fbptr(xb, yb)
-short xb, yb;
+bit2fbptr(
+ short xb,
+ short yb)
{
return(vid_start + yb * fb_byte_width + xb/8);
}
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index 2a75f95..b60118e 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -131,9 +131,9 @@ kbdopen(dev, flags, ior)
/*ARGSUSED*/
void
-kbdclose(dev, flags)
- dev_t dev;
- int flags;
+kbdclose(
+ dev_t dev,
+ int flags)
{
spl_t s = SPLKD();
@@ -143,11 +143,11 @@ kbdclose(dev, flags)
}
-io_return_t kbdgetstat(dev, flavor, data, count)
- dev_t dev;
- int flavor;
- int * data; /* pointer to OUT array */
- unsigned int *count; /* OUT */
+io_return_t kbdgetstat(
+ dev_t dev,
+ int flavor,
+ int * data, /* pointer to OUT array */
+ unsigned int *count) /* OUT */
{
switch (flavor) {
case KDGKBDTYPE:
@@ -165,11 +165,11 @@ io_return_t kbdgetstat(dev, flavor, data, count)
return (D_SUCCESS);
}
-io_return_t kbdsetstat(dev, flavor, data, count)
- dev_t dev;
- int flavor;
- int * data;
- unsigned int count;
+io_return_t kbdsetstat(
+ dev_t dev,
+ int flavor,
+ int * data,
+ unsigned int count)
{
switch (flavor) {
case KDSKBDMODE:
@@ -198,9 +198,9 @@ io_return_t kbdsetstat(dev, flavor, data, count)
* kbdread - dequeue and return any queued events.
*/
int
-kbdread(dev, ior)
- dev_t dev;
- io_req_t ior;
+kbdread(
+ dev_t dev,
+ io_req_t ior)
{
int err, count;
spl_t s;
@@ -237,8 +237,7 @@ kbdread(dev, ior)
return (D_SUCCESS);
}
-boolean_t kbd_read_done(ior)
- io_req_t ior;
+boolean_t kbd_read_done(io_req_t ior)
{
int count;
spl_t s;
@@ -274,8 +273,7 @@ boolean_t kbd_read_done(ior)
*/
void
-kd_enqsc(sc)
- Scancode sc;
+kd_enqsc(Scancode sc)
{
kd_event ev;
@@ -292,8 +290,7 @@ kd_enqsc(sc)
*/
void
-kbd_enqueue(ev)
- kd_event *ev;
+kbd_enqueue(kd_event *ev)
{
if (kdq_full(&kbd_queue))
printf("kbd: queue full\n");
@@ -366,9 +363,9 @@ X_kdb_exit(void)
}
io_return_t
-X_kdb_enter_init(data, count)
- u_int *data;
- u_int count;
+X_kdb_enter_init(
+ u_int *data,
+ u_int count)
{
if (count * sizeof X_kdb_enter_str[0] > sizeof X_kdb_enter_str)
return D_INVALID_OPERATION;
@@ -379,9 +376,9 @@ X_kdb_enter_init(data, count)
}
io_return_t
-X_kdb_exit_init(data, count)
- u_int *data;
- u_int count;
+X_kdb_exit_init(
+ u_int *data,
+ u_int count)
{
if (count * sizeof X_kdb_exit_str[0] > sizeof X_kdb_exit_str)
return D_INVALID_OPERATION;
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 8b1222d..16241ef 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -198,8 +198,7 @@ mouseopen(dev, flags, ior)
}
void
-serial_mouse_open(dev)
- dev_t dev;
+serial_mouse_open(dev_t dev)
{
int unit = minor(dev) & 0x7;
int mouse_pic = cominfo[unit]->sysdep1;
@@ -219,9 +218,9 @@ serial_mouse_open(dev)
int mouse_packets = 0;
void
-kd_mouse_open(dev, mouse_pic)
- dev_t dev;
- int mouse_pic;
+kd_mouse_open(
+ dev_t dev,
+ int mouse_pic)
{
spl_t s = splhi(); /* disable interrupts */
@@ -238,9 +237,9 @@ kd_mouse_open(dev, mouse_pic)
* and restore the serial port interrupt vector.
*/
void
-mouseclose(dev, flags)
- dev_t dev;
- int flags;
+mouseclose(
+ dev_t dev,
+ int flags)
{
switch (mouse_type) {
case MICROSOFT_MOUSE:
@@ -265,9 +264,9 @@ mouseclose(dev, flags)
/*ARGSUSED*/
void
-serial_mouse_close(dev, flags)
- dev_t dev;
- int flags;
+serial_mouse_close(
+ dev_t dev,
+ int flags)
{
spl_t o_pri = splhi(); /* mutex with open() */
int unit = minor(dev) & 0x7;
@@ -284,9 +283,9 @@ serial_mouse_close(dev, flags)
}
void
-kd_mouse_close(dev, mouse_pic)
- dev_t dev;
- int mouse_pic;
+kd_mouse_close(
+ dev_t dev,
+ int mouse_pic)
{
spl_t s = splhi();
@@ -296,11 +295,11 @@ kd_mouse_close(dev, mouse_pic)
splx(s);
}
-io_return_t mousegetstat(dev, flavor, data, count)
- dev_t dev;
- int flavor;
- int * data; /* pointer to OUT array */
- unsigned int *count; /* OUT */
+io_return_t mousegetstat(
+ dev_t dev,
+ int flavor,
+ int * data, /* pointer to OUT array */
+ unsigned int *count) /* OUT */
{
switch (flavor) {
case DEV_GET_SIZE:
@@ -319,9 +318,9 @@ io_return_t mousegetstat(dev, flavor, data, count)
* mouseread - dequeue and return any queued events.
*/
int
-mouseread(dev, ior)
- dev_t dev;
- io_req_t ior;
+mouseread(
+ dev_t dev,
+ io_req_t ior)
{
int err, count;
spl_t s;
@@ -358,8 +357,7 @@ mouseread(dev, ior)
return (D_SUCCESS);
}
-boolean_t mouse_read_done(ior)
- io_req_t ior;
+boolean_t mouse_read_done(io_req_t ior)
{
int count;
spl_t s;
@@ -442,8 +440,7 @@ int middlegitech = 0; /* what should the middle button be */
static u_char mousebuf[MOUSEBUFSIZE]; /* 5-byte packet from mouse */
void
-mouse_handle_byte(ch)
- u_char ch;
+mouse_handle_byte(u_char ch)
{
if (show_mouse_byte) {
printf("%x(%c) ", ch, ch);
@@ -524,8 +521,7 @@ mouse_handle_byte(ch)
}
void
-mouse_packet_mouse_system_mouse(mousebuf)
-u_char mousebuf[MOUSEBUFSIZE];
+mouse_packet_mouse_system_mouse(u_char mousebuf[MOUSEBUFSIZE])
{
u_char buttons, buttonchanges;
struct mouse_motion moved;
@@ -560,8 +556,7 @@ u_char mousebuf[MOUSEBUFSIZE];
*
*/
void
-mouse_packet_microsoft_mouse(mousebuf)
-u_char mousebuf[MOUSEBUFSIZE];
+mouse_packet_microsoft_mouse(u_char mousebuf[MOUSEBUFSIZE])
{
u_char buttons, buttonchanges;
struct mouse_motion moved;
@@ -653,8 +648,7 @@ void kd_mouse_read_reset(void)
}
void
-ibm_ps2_mouse_open(dev)
- dev_t dev;
+ibm_ps2_mouse_open(dev_t dev)
{
spl_t s = spltty();
@@ -697,8 +691,7 @@ ibm_ps2_mouse_open(dev)
}
void
-ibm_ps2_mouse_close(dev)
- dev_t dev;
+ibm_ps2_mouse_close(dev_t dev)
{
spl_t s = spltty();
@@ -729,8 +722,7 @@ ibm_ps2_mouse_close(dev)
*
*/
void
-mouse_packet_ibm_ps2_mouse(mousebuf)
-u_char mousebuf[MOUSEBUFSIZE];
+mouse_packet_ibm_ps2_mouse(u_char mousebuf[MOUSEBUFSIZE])
{
u_char buttons, buttonchanges;
struct mouse_motion moved;
@@ -762,8 +754,7 @@ u_char mousebuf[MOUSEBUFSIZE];
* Enqueue a mouse-motion event. Called at SPLKD.
*/
void
-mouse_moved(where)
- struct mouse_motion where;
+mouse_moved(struct mouse_motion where)
{
kd_event ev;
@@ -773,14 +764,13 @@ mouse_moved(where)
mouse_enqueue(&ev);
}
-
/*
* Enqueue an event for mouse button press or release. Called at SPLKD.
*/
void
-mouse_button(which, direction)
- kev_type which;
- u_char direction;
+mouse_button(
+ kev_type which,
+ u_char direction)
{
kd_event ev;
@@ -790,15 +780,13 @@ mouse_button(which, direction)
mouse_enqueue(&ev);
}
-
/*
* mouse_enqueue - enqueue an event and wake up selecting processes, if
* any. Called at SPLKD.
*/
void
-mouse_enqueue(ev)
- kd_event *ev;
+mouse_enqueue(kd_event *ev)
{
if (kdq_full(&mouse_queue))
printf("mouse: queue full\n");
diff --git a/i386/i386at/kd_queue.c b/i386/i386at/kd_queue.c
index 2086eb1..57d6fbf 100644
--- a/i386/i386at/kd_queue.c
+++ b/i386/i386at/kd_queue.c
@@ -98,8 +98,7 @@ kdq_put(q, ev)
}
kd_event *
-kdq_get(q)
- kd_event_queue *q;
+kdq_get(kd_event_queue *q)
{
kd_event *result = q->events + q->firstout;
@@ -108,8 +107,7 @@ kdq_get(q)
}
void
-kdq_reset(q)
- kd_event_queue *q;
+kdq_reset(kd_event_queue *q)
{
q->firstout = q->firstfree = 0;
}
diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
index 1f95a3f..5c16b15 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -192,11 +192,11 @@ natural_t *count; /* out */
}
io_return_t
-lprsetstat(dev, flavor, data, count)
-dev_t dev;
-int flavor;
-int * data;
-natural_t count;
+lprsetstat(
+ dev_t dev,
+ int flavor,
+ int * data,
+ natural_t count)
{
io_return_t result = D_SUCCESS;
int unit = minor(dev);
@@ -211,8 +211,7 @@ natural_t count;
return (D_SUCCESS);
}
-void lprintr(unit)
-int unit;
+void lprintr(int unit)
{
struct tty *tp = &lpr_tty[unit];
@@ -226,8 +225,7 @@ int unit;
lprstart(tp);
}
-void lprstart(tp)
-struct tty *tp;
+void lprstart(struct tty *tp)
{
spl_t s = spltty();
u_short addr = (natural_t) tp->t_addr;
@@ -267,9 +265,9 @@ struct tty *tp;
}
void
-lprstop(tp, flags)
-struct tty *tp;
-int flags;
+lprstop(
+ struct tty *tp,
+ int flags)
{
if ((tp->t_state & TS_BUSY) && (tp->t_state & TS_TTSTOP) == 0)
tp->t_state |= TS_FLUSH;
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 128f250..7d138be 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -218,8 +218,7 @@ void halt_cpu(void)
/*
* Halt the system or reboot.
*/
-void halt_all_cpus(reboot)
- boolean_t reboot;
+void halt_all_cpus(boolean_t reboot)
{
if (reboot) {
#ifdef MACH_HYP
@@ -834,8 +833,7 @@ init_alloc_aligned(vm_size_t size, vm_offset_t *addrp)
return TRUE;
}
-boolean_t pmap_next_page(addrp)
- vm_offset_t *addrp;
+boolean_t pmap_next_page(vm_offset_t *addrp)
{
return init_alloc_aligned(PAGE_SIZE, addrp);
}
@@ -852,8 +850,7 @@ pmap_grab_page(void)
return addr;
}
-boolean_t pmap_valid_page(x)
- vm_offset_t x;
+boolean_t pmap_valid_page(vm_offset_t x)
{
/* XXX is this OK? What does it matter for? */
return (((phys_first_addr <= x) && (x < phys_last_addr))
diff --git a/i386/i386at/rtc.c b/i386/i386at/rtc.c
index ff4309b..946f08f 100644
--- a/i386/i386at/rtc.c
+++ b/i386/i386at/rtc.c
@@ -66,8 +66,7 @@ rtcinit(void)
int
-rtcget(regs)
-unsigned char *regs;
+rtcget(unsigned char *regs)
{
if (first_rtcopen_ever) {
rtcinit();
@@ -83,8 +82,7 @@ unsigned char *regs;
}
void
-rtcput(regs)
-unsigned char *regs;
+rtcput(unsigned char *regs)
{
unsigned char x;
@@ -107,29 +105,25 @@ extern struct timeval time;
static int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int
-yeartoday(year)
-int year;
+yeartoday(int year)
{
return((year%4) ? 365 : 366);
}
int
-hexdectodec(n)
-char n;
+hexdectodec(char n)
{
return(((n>>4)&0x0F)*10 + (n&0x0F));
}
char
-dectohexdec(n)
-int n;
+dectohexdec(int n)
{
return((char)(((n/10)<<4)&0xF0) | ((n%10)&0x0F));
}
int
-readtodc(tp)
- u_int *tp;
+readtodc(u_int *tp)
{
struct rtc_st rtclk;
time_t n;