Date: Tue, 1 Sep 2020 21:29:44 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365088 - in head/sys/dev/syscons: . daemon logo rain warp Message-ID: <202009012129.081LTiNB025477@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Tue Sep 1 21:29:44 2020 New Revision: 365088 URL: https://svnweb.freebsd.org/changeset/base/365088 Log: syscons: clean up empty lines in .c and .h files Modified: head/sys/dev/syscons/daemon/daemon_saver.c head/sys/dev/syscons/logo/logo_saver.c head/sys/dev/syscons/rain/rain_saver.c head/sys/dev/syscons/scgfbrndr.c head/sys/dev/syscons/schistory.c head/sys/dev/syscons/scmouse.c head/sys/dev/syscons/scterm-sc.c head/sys/dev/syscons/scvesactl.c head/sys/dev/syscons/scvgarndr.c head/sys/dev/syscons/scvidctl.c head/sys/dev/syscons/syscons.c head/sys/dev/syscons/sysmouse.c head/sys/dev/syscons/warp/warp_saver.c Modified: head/sys/dev/syscons/daemon/daemon_saver.c ============================================================================== --- head/sys/dev/syscons/daemon/daemon_saver.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/daemon/daemon_saver.c Tue Sep 1 21:29:44 2020 (r365088) @@ -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); Modified: head/sys/dev/syscons/logo/logo_saver.c ============================================================================== --- head/sys/dev/syscons/logo/logo_saver.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/logo/logo_saver.c Tue Sep 1 21:29:44 2020 (r365088) @@ -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); } Modified: head/sys/dev/syscons/rain/rain_saver.c ============================================================================== --- head/sys/dev/syscons/rain/rain_saver.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/rain/rain_saver.c Tue Sep 1 21:29:44 2020 (r365088) @@ -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); } Modified: head/sys/dev/syscons/scgfbrndr.c ============================================================================== --- head/sys/dev/syscons/scgfbrndr.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/scgfbrndr.c Tue Sep 1 21:29:44 2020 (r365088) @@ -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? Modified: head/sys/dev/syscons/schistory.c ============================================================================== --- head/sys/dev/syscons/schistory.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/schistory.c Tue Sep 1 21:29:44 2020 (r365088) @@ -299,7 +299,6 @@ sc_hist_ioctl(struct tty *tp, u_long cmd, caddr_t data int error; switch (cmd) { - case CONS_HISTORY: /* set history size */ scp = SC_STAT(tp); if (*(int *)data <= 0) Modified: head/sys/dev/syscons/scmouse.c ============================================================================== --- head/sys/dev/syscons/scmouse.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/scmouse.c Tue Sep 1 21:29:44 2020 (r365088) @@ -663,7 +663,6 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t dat scp = SC_STAT(tp); switch (cmd) { - case CONS_MOUSECTL: /* control mouse arrow */ case OLD_CONS_MOUSECTL: Modified: head/sys/dev/syscons/scterm-sc.c ============================================================================== --- head/sys/dev/syscons/scterm-sc.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/scterm-sc.c Tue Sep 1 21:29:44 2020 (r365088) @@ -206,7 +206,6 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char 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 } 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 } tcp->num_param = tcp->last_param + 1; switch (c) { - case ';': if (tcp->num_param < MAX_ESC_PAR) return; Modified: head/sys/dev/syscons/scvesactl.c ============================================================================== --- head/sys/dev/syscons/scvesactl.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/scvesactl.c Tue Sep 1 21:29:44 2020 (r365088) @@ -61,7 +61,6 @@ vesa_ioctl(struct tty *tp, u_long cmd, caddr_t data, s 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: Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/scvgarndr.c Tue Sep 1 21:29:44 2020 (r365088) @@ -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, Modified: head/sys/dev/syscons/scvidctl.c ============================================================================== --- head/sys/dev/syscons/scvidctl.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/scvidctl.c Tue Sep 1 21:29:44 2020 (r365088) @@ -491,7 +491,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, return ENODEV; switch (cmd) { - case CONS_CURRENTADP: /* get current adapter index */ case FBIO_ADAPTER: return fb_ioctl(adp, FBIO_ADAPTER, data); Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/syscons.c Tue Sep 1 21:29:44 2020 (r365088) @@ -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 @@ next_code: /* if scroll-lock pressed allow history browsing */ if (!ISGRAPHSC(scp) && scp->history && scp->status & SLKED) { - scp->status &= ~CURSOR_ENABLED; sc_remove_cursor_image(scp); Modified: head/sys/dev/syscons/sysmouse.c ============================================================================== --- head/sys/dev/syscons/sysmouse.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/sysmouse.c Tue Sep 1 21:29:44 2020 (r365088) @@ -137,7 +137,6 @@ smdev_ioctl(struct tty *tp, u_long cmd, caddr_t data, mousemode_t *mode; switch (cmd) { - case MOUSE_GETHWINFO: /* get device information */ hw = (mousehw_t *)data; hw->buttons = 10; /* XXX unknown */ Modified: head/sys/dev/syscons/warp/warp_saver.c ============================================================================== --- head/sys/dev/syscons/warp/warp_saver.c Tue Sep 1 21:29:23 2020 (r365087) +++ head/sys/dev/syscons/warp/warp_saver.c Tue Sep 1 21:29:44 2020 (r365088) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009012129.081LTiNB025477>