Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wscons wsdisplay(4): Nix trailing whitespace.



details:   https://anonhg.NetBSD.org/src/rev/4edab7d50d2c
branches:  trunk
changeset: 368515:4edab7d50d2c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Jul 17 10:27:45 2022 +0000

description:
wsdisplay(4): Nix trailing whitespace.

diffstat:

 sys/dev/wscons/wsdisplay_vcons.c |  102 +++++++++++++++++++-------------------
 1 files changed, 51 insertions(+), 51 deletions(-)

diffs (truncated from 376 to 300 lines):

diff -r 0e0e73dd0ce1 -r 4edab7d50d2c sys/dev/wscons/wsdisplay_vcons.c
--- a/sys/dev/wscons/wsdisplay_vcons.c  Sun Jul 17 10:10:45 2022 +0000
+++ b/sys/dev/wscons/wsdisplay_vcons.c  Sun Jul 17 10:27:45 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsdisplay_vcons.c,v 1.54 2022/07/16 10:57:59 mlelstv Exp $ */
+/*     $NetBSD: wsdisplay_vcons.c,v 1.55 2022/07/17 10:27:45 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.54 2022/07/16 10:57:59 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.55 2022/07/17 10:27:45 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,11 +63,11 @@
 #define DPRINTF if (0) printf
 #endif
 
-static void vcons_dummy_init_screen(void *, struct vcons_screen *, int, 
+static void vcons_dummy_init_screen(void *, struct vcons_screen *, int,
            long *);
 
 static int  vcons_ioctl(void *, void *, u_long, void *, int, struct lwp *);
-static int  vcons_alloc_screen(void *, const struct wsscreen_descr *, void **, 
+static int  vcons_alloc_screen(void *, const struct wsscreen_descr *, void **,
            int *, int *, long *);
 static void vcons_free_screen(void *, void *);
 static int  vcons_show_screen(void *, void *, int, void (*)(void *, int, int),
@@ -259,9 +259,9 @@
        int size;
 #endif
 
-       /* 
-        * we allocate both chars and attributes in one chunk, attributes first 
-        * because they have the (potentially) bigger alignment 
+       /*
+        * we allocate both chars and attributes in one chunk, attributes first
+        * because they have the (potentially) bigger alignment
         */
 #ifdef WSDISPLAY_SCROLLSUPPORT
        cnt = (ri->ri_rows + WSDISPLAY_SCROLLBACK_LINES) * ri->ri_cols;
@@ -273,15 +273,15 @@
 #else
        cnt = ri->ri_rows * ri->ri_cols;
 #endif
-       scr->scr_attrs = malloc(cnt * (sizeof(long) + 
+       scr->scr_attrs = malloc(cnt * (sizeof(long) +
            sizeof(uint32_t)), M_DEVBUF, M_WAITOK);
        if (scr->scr_attrs == NULL)
                return ENOMEM;
 
        scr->scr_chars = (uint32_t *)&scr->scr_attrs[cnt];
 
-       /* 
-        * fill the attribute buffer with *defattr, chars with 0x20 
+       /*
+        * fill the attribute buffer with *defattr, chars with 0x20
         * since we don't know if the driver tries to mimic firmware output or
         * reset everything we do nothing to VRAM here, any driver that feels
         * the need to clear screen or something will have to do it on its own
@@ -323,15 +323,15 @@
 
        if (scr->scr_type == NULL)
                scr->scr_type = vd->defaulttype;
-       
+
        /*
         * call the driver-supplied init_screen function which is expected
         * to set up rasops_info, override cursor() and probably others
         */
        vd->init_screen(vd->cookie, scr, existing, defattr);
 
-       /* 
-        * save the non virtual console aware rasops and replace them with 
+       /*
+        * save the non virtual console aware rasops and replace them with
         * our wrappers
         */
        vd->eraserows = ri->ri_ops.eraserows;
@@ -356,8 +356,8 @@
                vd->cursor = ri->ri_ops.cursor;
        }
 
-       ri->ri_ops.eraserows = vcons_eraserows; 
-       ri->ri_ops.erasecols = vcons_erasecols; 
+       ri->ri_ops.eraserows = vcons_eraserows;
+       ri->ri_ops.erasecols = vcons_erasecols;
        ri->ri_ops.putchar   = vcons_putchar;
        ri->ri_ops.cursor    = vcons_cursor;
        ri->ri_ops.copycols  = vcons_copycols;
@@ -381,14 +381,14 @@
                vd->active = scr;
                SCREEN_VISIBLE(scr);
        }
-       
+
        if (existing) {
                SCREEN_VISIBLE(scr);
                vd->active = scr;
        } else {
                SCREEN_INVISIBLE(scr);
        }
-       
+
        LIST_INSERT_HEAD(&vd->screens, scr, next);
        return 0;
 }
@@ -453,8 +453,8 @@
                free(scr->scr_attrs, M_DEVBUF);
        /* allocate new buffers */
        vcons_alloc_buffers(vd, scr);
-       
-       /* save the potentially changed ri_ops */ 
+
+       /* save the potentially changed ri_ops */
        vd->eraserows = ri->ri_ops.eraserows;
        vd->erasecols = ri->ri_ops.erasecols;
        scr->putchar   = ri->ri_ops.putchar;
@@ -479,8 +479,8 @@
        }
 
        /* and put our wrappers back */
-       ri->ri_ops.eraserows = vcons_eraserows; 
-       ri->ri_ops.erasecols = vcons_erasecols; 
+       ri->ri_ops.eraserows = vcons_eraserows;
+       ri->ri_ops.erasecols = vcons_erasecols;
        ri->ri_ops.putchar   = vcons_putchar;
        ri->ri_ops.cursor    = vcons_cursor;
        ri->ri_ops.copycols  = vcons_copycols;
@@ -490,11 +490,11 @@
        /* notify things that we're about to redraw */
        if (vd->show_screen_cb != NULL)
                vd->show_screen_cb(scr, vd->show_screen_cookie);
-       
+
 #ifdef VCONS_DRAW_INTR
        /*
         * XXX
-        * Something(tm) craps all over VRAM somewhere up there if we're 
+        * Something(tm) craps all over VRAM somewhere up there if we're
         * using VCONS_DRAW_INTR. Until I figure out what causes it, just
         * redraw the screen for now.
         */
@@ -504,7 +504,7 @@
        /* no need to draw anything, wsdisplay should reset the terminal */
 
        return 0;
-}      
+}
 
 static void
 vcons_do_switch(void *arg)
@@ -520,9 +520,9 @@
        }
        oldscr = vd->active; /* can be NULL! */
 
-       /* 
+       /*
         * if there's an old, visible screen we mark it invisible and wait
-        * until it's not busy so we can safely switch 
+        * until it's not busy so we can safely switch
         */
        if (oldscr != NULL) {
                SCREEN_INVISIBLE(oldscr);
@@ -611,7 +611,7 @@
                        start = -1;
                        for (j = 0; j < ri->ri_cols; j++) {
                                /*
-                                * no need to use the wrapper function - we 
+                                * no need to use the wrapper function - we
                                 * don't change any characters or attributes
                                 * and we already made sure the screen we're
                                 * working on is visible
@@ -622,7 +622,7 @@
                                if (c == ' ') {
                                        /*
                                         * if we already erased the background
-                                        * and if this blank uses the same 
+                                        * and if this blank uses the same
                                         * colour and flags we don't need to do
                                         * anything here
                                         */
@@ -633,14 +633,14 @@
                                         * little bit by drawing stretches of
                                         * blanks using erasecols
                                         */
-                                       
+
                                        if (start == -1) {
                                                start = j;
                                                last_a = acmp;
                                        } else if (acmp != last_a) {
                                                /*
                                                 * different attr, need to
-                                                * flush & restart 
+                                                * flush & restart
                                                 */
                                                vd->erasecols(ri, i, start,
                                                    j - start, last_a);
@@ -653,7 +653,7 @@
                                                    j - start, last_a);
                                                start = -1;
                                        }
-                                                       
+
                                        scr->putchar(ri, i, j, c, a);
                                }
 next:
@@ -667,7 +667,7 @@
                        /* end of the line - draw all defered blanks, if any */
                        if (start != -1) {
                                vd->erasecols(ri, i, start, j - start, last_a);
-                       }                       
+                       }
                }
                ri->ri_flg &= ~RI_CURSOR;
                scr->scr_vd->cursor(ri, 1, ri->ri_crow, ri->ri_ccol);
@@ -709,14 +709,14 @@
                for (i = 0; i < ri->ri_rows; i++) {
                        for (j = 0; j < ri->ri_cols; j++) {
                                /*
-                                * no need to use the wrapper function - we 
+                                * no need to use the wrapper function - we
                                 * don't change any characters or attributes
                                 * and we already made sure the screen we're
                                 * working on is visible
                                 */
                                if ((vd->chars[boffset] != charptr[offset]) ||
                                    (vd->attrs[boffset] != attrptr[offset])) {
-                                       scr->putchar(ri, i, j, 
+                                       scr->putchar(ri, i, j,
                                           charptr[offset], attrptr[offset]);
                                        vd->chars[boffset] = charptr[offset];
                                        vd->attrs[boffset] = attrptr[offset];
@@ -789,7 +789,7 @@
        if (scr == NULL)
                return ENOMEM;
 
-       scr->scr_flags = 0;             
+       scr->scr_flags = 0;
        scr->scr_status = 0;
        scr->scr_busy = 0;
        scr->scr_type = __UNCONST(type);
@@ -947,7 +947,7 @@
 #ifdef VCONS_DRAW_INTR
                        if ((scr->scr_chars[pos] != vd->chars[ppos]) ||
                            (scr->scr_attrs[pos] != vd->attrs[ppos])) {
-                               scr->putchar(cookie, row, c, 
+                               scr->putchar(cookie, row, c,
                                   scr->scr_chars[pos], scr->scr_attrs[pos]);
                                vd->chars[ppos] = scr->scr_chars[pos];
                                vd->attrs[ppos] = scr->scr_attrs[pos];
@@ -959,7 +959,7 @@
                        pos++;
                        ppos++;
                }
-               if (ri->ri_crow == row && 
+               if (ri->ri_crow == row &&
                   (ri->ri_ccol >= dstcol && ri->ri_ccol < (dstcol + ncols )))
                        ri->ri_flg &= ~RI_CURSOR;
        }
@@ -1027,11 +1027,11 @@
        vcons_lock(scr);
        if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
 #ifdef VCONS_DRAW_INTR
-               vcons_erasecols_cached(cookie, row, startcol, ncols, 
+               vcons_erasecols_cached(cookie, row, startcol, ncols,
                    fillattr);
 #else
                scr->scr_vd->erasecols(cookie, row, startcol, ncols, fillattr);
-#endif 
+#endif
        }
        vcons_unlock(scr);
 }
@@ -1059,8 +1059,8 @@
        }
        from = ri->ri_cols * srcrow + offset;
        to = ri->ri_cols * dstrow + offset;
-       len = ri->ri_cols * nrows;              
-               
+       len = ri->ri_cols * nrows;
+
 #else
        from = ri->ri_cols * srcrow;
        to = ri->ri_cols * dstrow;
@@ -1124,7 +1124,7 @@
 #ifdef VCONS_DRAW_INTR
                                if ((scr->scr_chars[pos] != vd->chars[ppos]) ||
                                    (scr->scr_attrs[pos] != vd->attrs[ppos])) {
-                                       scr->putchar(cookie, l, c, 
+                                       scr->putchar(cookie, l, c,
                                           scr->scr_chars[pos], scr->scr_attrs[pos]);
                                        vd->chars[ppos] = scr->scr_chars[pos];
                                        vd->attrs[ppos] = scr->scr_attrs[pos];
@@ -1218,19 +1218,19 @@



Home | Main Index | Thread Index | Old Index