syscons: clean up empty lines in .c and .h files

This commit is contained in:
mjg 2020-09-01 21:29:44 +00:00
parent 00fb68ae4d
commit e3ca1efbba
13 changed files with 17 additions and 30 deletions

View File

@ -359,7 +359,7 @@ daemon_init(video_adapter_t *adp)
for (;;) {
hostlen = strlen(prison0.pr_hostname);
mtx_unlock(&prison0.pr_mtx);
messagelen = hostlen + 3 + strlen(ostype) + 1 +
strlen(osrelease);
message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);

View File

@ -65,11 +65,11 @@ logo_blit(video_adapter_t *adp, int x, int y)
{
int d, l, o, p;
int last_origin = -1;
for (o = 0, p = y * bpsl + x; p > banksize; p -= banksize)
o += banksize;
SET_ORIGIN(adp, o);
for (d = 0; d < logo_img_size; d += logo_w) {
if (p + logo_w < banksize) {
bcopy(logo_img + d, vid + p, logo_w);
@ -94,7 +94,7 @@ logo_update(video_adapter_t *adp)
{
static int xpos = 0, ypos = 0;
static int xinc = 1, yinc = 1;
/* Turn when you hit the edge */
if ((xpos + logo_w + xinc > scrw) || (xpos + xinc < 0))
xinc = -xinc;
@ -102,7 +102,7 @@ logo_update(video_adapter_t *adp)
yinc = -yinc;
xpos += xinc;
ypos += yinc;
/* XXX Relies on margin around logo to erase trail */
logo_blit(adp, xpos, ypos);
}
@ -111,7 +111,7 @@ static int
logo_saver(video_adapter_t *adp, int blank)
{
int pl;
if (blank) {
/* switch to graphics mode */
if (blanked <= 0) {
@ -137,7 +137,7 @@ static int
logo_init(video_adapter_t *adp)
{
video_info_t info;
if (!vidd_get_info(adp, M_VESA_CG800x600, &info)) {
scrmode = M_VESA_CG800x600;
} else if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
@ -148,10 +148,10 @@ logo_init(video_adapter_t *adp)
SAVER_NAME);
return (ENODEV);
}
scrw = info.vi_width;
scrh = info.vi_height;
return (0);
}

View File

@ -142,7 +142,7 @@ rain_init(video_adapter_t *adp)
{
video_info_t info;
int i;
if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
} else {
@ -151,14 +151,14 @@ rain_init(video_adapter_t *adp)
SAVER_NAME);
return (ENODEV);
}
scrw = info.vi_width;
scrh = info.vi_height;
/* intialize the palette */
for (i = 1; i < MAX; i++)
rain_pal[BLUE(i)] = rain_pal[BLUE(i - 1)] + INCREMENT;
return (0);
}

View File

@ -147,7 +147,6 @@ gfb_draw(scr_stat *scp, int from, int count, int flip)
and the number of characters to be displayed...
*/
if (from + count > scp->xsize*scp->ysize) {
/*
Calculate the number of characters past the end of the
visible screen...
@ -177,7 +176,6 @@ gfb_draw(scr_stat *scp, int from, int count, int flip)
all-at-once...
*/
else {
/*
Determine the method by which we are to display characters
(are we going to print forwards or backwards?

View File

@ -299,7 +299,6 @@ sc_hist_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
int error;
switch (cmd) {
case CONS_HISTORY: /* set history size */
scp = SC_STAT(tp);
if (*(int *)data <= 0)

View File

@ -663,7 +663,6 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
scp = SC_STAT(tp);
switch (cmd) {
case CONS_MOUSECTL: /* control mouse arrow */
case OLD_CONS_MOUSECTL:

View File

@ -206,7 +206,6 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
sc = scp->sc;
if (tcp->esc == 1) { /* seen ESC */
switch (c) {
case '7': /* Save cursor position */
tcp->saved_xpos = scp->xpos;
tcp->saved_ypos = scp->ypos;
@ -265,7 +264,6 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
}
tcp->num_param = tcp->last_param + 1;
switch (c) {
case ';':
if (tcp->num_param < MAX_ESC_PAR)
return;
@ -552,7 +550,6 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
}
tcp->num_param = tcp->last_param + 1;
switch (c) {
case ';':
if (tcp->num_param < MAX_ESC_PAR)
return;

View File

@ -61,7 +61,6 @@ vesa_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
scp = SC_STAT(tp);
switch (cmd) {
/* generic text modes */
case SW_TEXT_132x25: case SW_TEXT_132x30:
case SW_TEXT_132x43: case SW_TEXT_132x50:

View File

@ -323,7 +323,7 @@ static const struct mousedata * const mousesmall[] = {
writeb((pos), (uint8_t)(color)); \
} \
} while (0)
static uint32_t vga_palette32[16] = {
0x000000, 0x0000ad, 0x00ad00, 0x00adad,
0xad0000, 0xad00ad, 0xad5200, 0xadadad,

View File

@ -491,7 +491,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
return ENODEV;
switch (cmd) {
case CONS_CURRENTADP: /* get current adapter index */
case FBIO_ADAPTER:
return fb_ioctl(adp, FBIO_ADAPTER, data);

View File

@ -845,7 +845,6 @@ sckbdevent(keyboard_t *thiskbd, int event, void *arg)
* the Xaccel-2.1 keyboard hang, but it can't hurt. XXX
*/
while ((c = scgetc(sc, SCGETC_NONBLOCK, NULL)) != NOKEY) {
cur_tty = SC_DEV(sc, sc->cur_scp->index);
if (!tty_opened_ns(cur_tty))
continue;
@ -3275,7 +3274,6 @@ scinit(int unit, int flags)
}
if (!(sc->flags & SC_INIT_DONE) || (adp != sc->adp)) {
sc->initial_mode = sc->adp->va_initial_mode;
#ifndef SC_NO_FONT_LOADING
@ -3800,7 +3798,6 @@ scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp)
/* if scroll-lock pressed allow history browsing */
if (!ISGRAPHSC(scp) && scp->history && scp->status & SLKED) {
scp->status &= ~CURSOR_ENABLED;
sc_remove_cursor_image(scp);

View File

@ -137,7 +137,6 @@ smdev_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
mousemode_t *mode;
switch (cmd) {
case MOUSE_GETHWINFO: /* get device information */
hw = (mousehw_t *)data;
hw->buttons = 10; /* XXX unknown */

View File

@ -100,7 +100,7 @@ static int
warp_saver(video_adapter_t *adp, int blank)
{
int pl;
if (blank) {
/* switch to graphics mode */
if (blanked <= 0) {
@ -128,7 +128,7 @@ warp_init(video_adapter_t *adp)
{
video_info_t info;
int i;
if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
} else {
@ -137,14 +137,14 @@ warp_init(video_adapter_t *adp)
SAVER_NAME);
return (ENODEV);
}
scrw = info.vi_width;
scrh = info.vi_height;
/* randomize the star field */
for (i = 0; i < STARS; i++)
star[i] = random() % (scrw * scrh);
return (0);
}