1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Added braces around initializsers and in if-statements.

Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
This commit is contained in:
KATO Takenori 1999-02-02 17:26:03 +00:00
parent 524d2ab047
commit f19a38101a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43539
2 changed files with 172 additions and 172 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.78 1999/01/28 11:24:36 kato Exp $
* $Id: sio.c,v 1.79 1999/01/30 12:17:37 phk Exp $
*/
#include "opt_comconsole.h"
@ -561,97 +561,97 @@ static int pc98_set_ioport __P((struct com_s *com, int id_flags));
pc98_i8251_clear_cmd(com,CMD8251_SBRK)
static struct speedtab pc98speedtab[] = { /* internal RS232C interface */
0, 0,
50, 50,
75, 75,
150, 150,
200, 200,
300, 300,
600, 600,
1200, 1200,
2400, 2400,
4800, 4800,
9600, 9600,
19200, 19200,
38400, 38400,
51200, 51200,
76800, 76800,
20800, 20800,
31200, 31200,
41600, 41600,
62400, 62400,
-1, -1
{ 0, 0, },
{ 50, 50, },
{ 75, 75, },
{ 150, 150, },
{ 200, 200, },
{ 300, 300, },
{ 600, 600, },
{ 1200, 1200, },
{ 2400, 2400, },
{ 4800, 4800, },
{ 9600, 9600, },
{ 19200, 19200, },
{ 38400, 38400, },
{ 51200, 51200, },
{ 76800, 76800, },
{ 20800, 20800, },
{ 31200, 31200, },
{ 41600, 41600, },
{ 62400, 62400, },
{ -1, -1 }
};
static struct speedtab pc98fast_speedtab[] = {
9600, 0x80 | COMBRD(9600),
19200, 0x80 | COMBRD(19200),
38400, 0x80 | COMBRD(38400),
57600, 0x80 | COMBRD(57600),
115200, 0x80 | COMBRD(115200),
-1, -1
{ 9600, 0x80 | COMBRD(9600), },
{ 19200, 0x80 | COMBRD(19200), },
{ 38400, 0x80 | COMBRD(38400), },
{ 57600, 0x80 | COMBRD(57600), },
{ 115200, 0x80 | COMBRD(115200), },
{ -1, -1 }
};
static struct speedtab comspeedtab_pio9032b[] = {
300, 6,
600, 5,
1200, 4,
2400, 3,
4800, 2,
9600, 1,
19200, 0,
38400, 7,
-1, -1
{ 300, 6, },
{ 600, 5, },
{ 1200, 4, },
{ 2400, 3, },
{ 4800, 2, },
{ 9600, 1, },
{ 19200, 0, },
{ 38400, 7, },
{ -1, -1 }
};
static struct speedtab comspeedtab_b98_01[] = {
75, 11,
150, 10,
300, 9,
600, 8,
1200, 7,
2400, 6,
4800, 5,
9600, 4,
19200, 3,
38400, 2,
76800, 1,
153600, 0,
-1, -1
{ 75, 11, },
{ 150, 10, },
{ 300, 9, },
{ 600, 8, },
{ 1200, 7, },
{ 2400, 6, },
{ 4800, 5, },
{ 9600, 4, },
{ 19200, 3, },
{ 38400, 2, },
{ 76800, 1, },
{ 153600, 0, },
{ -1, -1 }
};
static struct speedtab comspeedtab_mc16550[] = {
300, 1536,
600, 768,
1200, 384,
2400, 192,
4800, 96,
9600, 48,
19200, 24,
38400, 12,
57600, 8,
115200, 4,
153600, 3,
230400, 2,
460800, 1,
-1, -1
{ 300, 1536, },
{ 600, 768, },
{ 1200, 384, },
{ 2400, 192, },
{ 4800, 96, },
{ 9600, 48, },
{ 19200, 24, },
{ 38400, 12, },
{ 57600, 8, },
{ 115200, 4, },
{ 153600, 3, },
{ 230400, 2, },
{ 460800, 1, },
{ -1, -1 }
};
static struct speedtab comspeedtab_rsb384[] = {
300, 3840,
600, 1920,
1200, 960,
2400, 480,
4800, 240,
9600, 120,
19200, 60,
38400, 30,
57600, 20,
115200, 10,
128000, 9,
144000, 8,
192000, 6,
230400, 5,
288000, 4,
384000, 3,
576000, 2,
1152000, 1,
-1, -1
{ 300, 3840, },
{ 600, 1920, },
{ 1200, 960, },
{ 2400, 480, },
{ 4800, 240, },
{ 9600, 120, },
{ 19200, 60, },
{ 38400, 30, },
{ 57600, 20, },
{ 115200, 10, },
{ 128000, 9, },
{ 144000, 8, },
{ 192000, 6, },
{ 230400, 5, },
{ 288000, 4, },
{ 384000, 3, },
{ 576000, 2, },
{ 1152000, 1, },
{ -1, -1 }
};
static struct speedtab comspeedtab_rsa[] = {
{ 0, 0 },
@ -2302,9 +2302,9 @@ siobusycheck(chan)
if (com->state & CS_BUSY)
com->extra_state &= ~CSE_BUSYCHECK; /* False alarm. */
#ifdef PC98
else if (IS_8251(com->pc98_if_type) &&
else if ((IS_8251(com->pc98_if_type) &&
(inb(com->sts_port) & (STS8251_TxRDY | STS8251_TxEMP))
== (STS8251_TxRDY | STS8251_TxEMP) ||
== (STS8251_TxRDY | STS8251_TxEMP)) ||
(inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY))
== (LSR_TSRE | LSR_TXRDY)) {
#else
@ -4292,8 +4292,8 @@ pc98_check_msr(void* chan)
if ( -- com->modem_car_chg_timer )
msr ^= TIOCM_CAR;
} else {
if ( com->modem_car_chg_timer = ( msr & TIOCM_CAR ) ?
DCD_ON_RECOGNITION : DCD_OFF_TOLERANCE )
if ((com->modem_car_chg_timer = (msr & TIOCM_CAR) ?
DCD_ON_RECOGNITION : DCD_OFF_TOLERANCE) != 0)
msr ^= TIOCM_CAR;
}
} else

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.78 1999/01/28 11:24:36 kato Exp $
* $Id: sio.c,v 1.79 1999/01/30 12:17:37 phk Exp $
*/
#include "opt_comconsole.h"
@ -561,97 +561,97 @@ static int pc98_set_ioport __P((struct com_s *com, int id_flags));
pc98_i8251_clear_cmd(com,CMD8251_SBRK)
static struct speedtab pc98speedtab[] = { /* internal RS232C interface */
0, 0,
50, 50,
75, 75,
150, 150,
200, 200,
300, 300,
600, 600,
1200, 1200,
2400, 2400,
4800, 4800,
9600, 9600,
19200, 19200,
38400, 38400,
51200, 51200,
76800, 76800,
20800, 20800,
31200, 31200,
41600, 41600,
62400, 62400,
-1, -1
{ 0, 0, },
{ 50, 50, },
{ 75, 75, },
{ 150, 150, },
{ 200, 200, },
{ 300, 300, },
{ 600, 600, },
{ 1200, 1200, },
{ 2400, 2400, },
{ 4800, 4800, },
{ 9600, 9600, },
{ 19200, 19200, },
{ 38400, 38400, },
{ 51200, 51200, },
{ 76800, 76800, },
{ 20800, 20800, },
{ 31200, 31200, },
{ 41600, 41600, },
{ 62400, 62400, },
{ -1, -1 }
};
static struct speedtab pc98fast_speedtab[] = {
9600, 0x80 | COMBRD(9600),
19200, 0x80 | COMBRD(19200),
38400, 0x80 | COMBRD(38400),
57600, 0x80 | COMBRD(57600),
115200, 0x80 | COMBRD(115200),
-1, -1
{ 9600, 0x80 | COMBRD(9600), },
{ 19200, 0x80 | COMBRD(19200), },
{ 38400, 0x80 | COMBRD(38400), },
{ 57600, 0x80 | COMBRD(57600), },
{ 115200, 0x80 | COMBRD(115200), },
{ -1, -1 }
};
static struct speedtab comspeedtab_pio9032b[] = {
300, 6,
600, 5,
1200, 4,
2400, 3,
4800, 2,
9600, 1,
19200, 0,
38400, 7,
-1, -1
{ 300, 6, },
{ 600, 5, },
{ 1200, 4, },
{ 2400, 3, },
{ 4800, 2, },
{ 9600, 1, },
{ 19200, 0, },
{ 38400, 7, },
{ -1, -1 }
};
static struct speedtab comspeedtab_b98_01[] = {
75, 11,
150, 10,
300, 9,
600, 8,
1200, 7,
2400, 6,
4800, 5,
9600, 4,
19200, 3,
38400, 2,
76800, 1,
153600, 0,
-1, -1
{ 75, 11, },
{ 150, 10, },
{ 300, 9, },
{ 600, 8, },
{ 1200, 7, },
{ 2400, 6, },
{ 4800, 5, },
{ 9600, 4, },
{ 19200, 3, },
{ 38400, 2, },
{ 76800, 1, },
{ 153600, 0, },
{ -1, -1 }
};
static struct speedtab comspeedtab_mc16550[] = {
300, 1536,
600, 768,
1200, 384,
2400, 192,
4800, 96,
9600, 48,
19200, 24,
38400, 12,
57600, 8,
115200, 4,
153600, 3,
230400, 2,
460800, 1,
-1, -1
{ 300, 1536, },
{ 600, 768, },
{ 1200, 384, },
{ 2400, 192, },
{ 4800, 96, },
{ 9600, 48, },
{ 19200, 24, },
{ 38400, 12, },
{ 57600, 8, },
{ 115200, 4, },
{ 153600, 3, },
{ 230400, 2, },
{ 460800, 1, },
{ -1, -1 }
};
static struct speedtab comspeedtab_rsb384[] = {
300, 3840,
600, 1920,
1200, 960,
2400, 480,
4800, 240,
9600, 120,
19200, 60,
38400, 30,
57600, 20,
115200, 10,
128000, 9,
144000, 8,
192000, 6,
230400, 5,
288000, 4,
384000, 3,
576000, 2,
1152000, 1,
-1, -1
{ 300, 3840, },
{ 600, 1920, },
{ 1200, 960, },
{ 2400, 480, },
{ 4800, 240, },
{ 9600, 120, },
{ 19200, 60, },
{ 38400, 30, },
{ 57600, 20, },
{ 115200, 10, },
{ 128000, 9, },
{ 144000, 8, },
{ 192000, 6, },
{ 230400, 5, },
{ 288000, 4, },
{ 384000, 3, },
{ 576000, 2, },
{ 1152000, 1, },
{ -1, -1 }
};
static struct speedtab comspeedtab_rsa[] = {
{ 0, 0 },
@ -2302,9 +2302,9 @@ siobusycheck(chan)
if (com->state & CS_BUSY)
com->extra_state &= ~CSE_BUSYCHECK; /* False alarm. */
#ifdef PC98
else if (IS_8251(com->pc98_if_type) &&
else if ((IS_8251(com->pc98_if_type) &&
(inb(com->sts_port) & (STS8251_TxRDY | STS8251_TxEMP))
== (STS8251_TxRDY | STS8251_TxEMP) ||
== (STS8251_TxRDY | STS8251_TxEMP)) ||
(inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY))
== (LSR_TSRE | LSR_TXRDY)) {
#else
@ -4292,8 +4292,8 @@ pc98_check_msr(void* chan)
if ( -- com->modem_car_chg_timer )
msr ^= TIOCM_CAR;
} else {
if ( com->modem_car_chg_timer = ( msr & TIOCM_CAR ) ?
DCD_ON_RECOGNITION : DCD_OFF_TOLERANCE )
if ((com->modem_car_chg_timer = (msr & TIOCM_CAR) ?
DCD_ON_RECOGNITION : DCD_OFF_TOLERANCE) != 0)
msr ^= TIOCM_CAR;
}
} else