From e3ca1efbba5b790d281255375b81611f8de306d2 Mon Sep 17 00:00:00 2001 From: mjg Date: Tue, 1 Sep 2020 21:29:44 +0000 Subject: [PATCH] syscons: clean up empty lines in .c and .h files --- sys/dev/syscons/daemon/daemon_saver.c | 2 +- sys/dev/syscons/logo/logo_saver.c | 16 ++++++++-------- sys/dev/syscons/rain/rain_saver.c | 6 +++--- sys/dev/syscons/scgfbrndr.c | 2 -- sys/dev/syscons/schistory.c | 1 - sys/dev/syscons/scmouse.c | 1 - sys/dev/syscons/scterm-sc.c | 3 --- sys/dev/syscons/scvesactl.c | 1 - sys/dev/syscons/scvgarndr.c | 2 +- sys/dev/syscons/scvidctl.c | 1 - sys/dev/syscons/syscons.c | 3 --- sys/dev/syscons/sysmouse.c | 1 - sys/dev/syscons/warp/warp_saver.c | 8 ++++---- 13 files changed, 17 insertions(+), 30 deletions(-) diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c index ddcaeea091f5..5fcc3d942118 100644 --- a/sys/dev/syscons/daemon/daemon_saver.c +++ b/sys/dev/syscons/daemon/daemon_saver.c @@ -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); diff --git a/sys/dev/syscons/logo/logo_saver.c b/sys/dev/syscons/logo/logo_saver.c index 81626d5d5bf6..7211db4303de 100644 --- a/sys/dev/syscons/logo/logo_saver.c +++ b/sys/dev/syscons/logo/logo_saver.c @@ -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); } diff --git a/sys/dev/syscons/rain/rain_saver.c b/sys/dev/syscons/rain/rain_saver.c index c71002e55d36..5b3a93dc56d4 100644 --- a/sys/dev/syscons/rain/rain_saver.c +++ b/sys/dev/syscons/rain/rain_saver.c @@ -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); } diff --git a/sys/dev/syscons/scgfbrndr.c b/sys/dev/syscons/scgfbrndr.c index 2dc4f503854e..c2e87361bf76 100644 --- a/sys/dev/syscons/scgfbrndr.c +++ b/sys/dev/syscons/scgfbrndr.c @@ -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? diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c index 64f662b5a7f4..efb5d5bf6765 100644 --- a/sys/dev/syscons/schistory.c +++ b/sys/dev/syscons/schistory.c @@ -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) diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index 03daba3ebfab..a4b467637c2a 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -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: diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c index de46827b5837..684638f41120 100644 --- a/sys/dev/syscons/scterm-sc.c +++ b/sys/dev/syscons/scterm-sc.c @@ -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; diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c index 74e7428eefb3..9827476629fc 100644 --- a/sys/dev/syscons/scvesactl.c +++ b/sys/dev/syscons/scvesactl.c @@ -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: diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index f7b66bbf76f6..990c12f8f89d 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -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, diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c index 78c11817dd92..07566e64a212 100644 --- a/sys/dev/syscons/scvidctl.c +++ b/sys/dev/syscons/scvidctl.c @@ -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); diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 70565675fe29..6a389604d3ab 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -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); diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index 6197a50d0d0e..ef851058a6ef 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -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 */ diff --git a/sys/dev/syscons/warp/warp_saver.c b/sys/dev/syscons/warp/warp_saver.c index 6e186edacd3f..b92f95f405b5 100644 --- a/sys/dev/syscons/warp/warp_saver.c +++ b/sys/dev/syscons/warp/warp_saver.c @@ -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); }