Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wscons switch/case KNF.



details:   https://anonhg.NetBSD.org/src/rev/3793a05f1d5d
branches:  trunk
changeset: 533764:3793a05f1d5d
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Tue Jul 09 07:15:21 2002 +0000

description:
switch/case KNF.

diffstat:

 sys/dev/wscons/wsemul_sun.c   |   36 +++---
 sys/dev/wscons/wsemul_vt100.c |  208 +++++++++++++++++++++---------------------
 2 files changed, 122 insertions(+), 122 deletions(-)

diffs (truncated from 615 to 300 lines):

diff -r c3a3f82a78ba -r 3793a05f1d5d sys/dev/wscons/wsemul_sun.c
--- a/sys/dev/wscons/wsemul_sun.c       Tue Jul 09 06:55:09 2002 +0000
+++ b/sys/dev/wscons/wsemul_sun.c       Tue Jul 09 07:15:21 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_sun.c,v 1.15 2002/07/04 14:37:14 junyoung Exp $ */
+/* $NetBSD: wsemul_sun.c,v 1.16 2002/07/09 07:15:21 junyoung Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -33,7 +33,7 @@
 /* XXX DESCRIPTION/SOURCE OF INFORMATION */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.15 2002/07/04 14:37:14 junyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.16 2002/07/09 07:15:21 junyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -566,36 +566,36 @@
        }
 
        switch (in) {
-           case KS_Home:
-           case KS_KP_Home:
-           case KS_KP_Begin:
+       case KS_Home:
+       case KS_KP_Home:
+       case KS_KP_Begin:
                *out = "\033[214z";
                return (6);
-           case KS_Prior:
-           case KS_KP_Prior:
+       case KS_Prior:
+       case KS_KP_Prior:
                *out = "\033[216z";
                return (6);
-           case KS_Next:
-           case KS_KP_Next:
+       case KS_Next:
+       case KS_KP_Next:
                *out = "\033[222z";
                return (6);
-           case KS_Up:
-           case KS_KP_Up:
+       case KS_Up:
+       case KS_KP_Up:
                *out = "\033[A";
                return (3);
-           case KS_Down:
-           case KS_KP_Down:
+       case KS_Down:
+       case KS_KP_Down:
                *out = "\033[B";
                return (3);
-           case KS_Left:
-           case KS_KP_Left:
+       case KS_Left:
+       case KS_KP_Left:
                *out = "\033[D";
                return (3);
-           case KS_Right:
-           case KS_KP_Right:
+       case KS_Right:
+       case KS_KP_Right:
                *out = "\033[C";
                return (3);
-           case KS_KP_Delete:
+       case KS_KP_Delete:
                *out = "\177";
                return (1);
        }
diff -r c3a3f82a78ba -r 3793a05f1d5d sys/dev/wscons/wsemul_vt100.c
--- a/sys/dev/wscons/wsemul_vt100.c     Tue Jul 09 06:55:09 2002 +0000
+++ b/sys/dev/wscons/wsemul_vt100.c     Tue Jul 09 07:15:21 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.18 2002/07/04 14:37:14 junyoung Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.19 2002/07/09 07:15:21 junyoung Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.18 2002/07/04 14:37:14 junyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.19 2002/07/09 07:15:21 junyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -348,24 +348,24 @@
        u_int n;
 
        switch (c) {
-           case ASCII_NUL:
-           default:
+       case ASCII_NUL:
+       default:
                /* ignore */
                break;
-           case ASCII_BEL:
+       case ASCII_BEL:
                wsdisplay_emulbell(edp->cbcookie);
                break;
-           case ASCII_BS:
+       case ASCII_BS:
                if (edp->ccol > 0) {
                        edp->ccol--;
                        edp->flags &= ~VTFL_LASTCHAR;
                }
                break;
-           case ASCII_CR:
+       case ASCII_CR:
                edp->ccol = 0;
                edp->flags &= ~VTFL_LASTCHAR;
                break;
-           case ASCII_HT:
+       case ASCII_HT:
                if (edp->tabs) {
                        if (!COLS_LEFT)
                                break;
@@ -377,13 +377,13 @@
                }
                edp->ccol = n;
                break;
-           case ASCII_SO: /* LS1 */
+       case ASCII_SO: /* LS1 */
                edp->chartab0 = 1;
                break;
-           case ASCII_SI: /* LS0 */
+       case ASCII_SI: /* LS0 */
                edp->chartab0 = 0;
                break;
-           case ASCII_ESC:
+       case ASCII_ESC:
                if (kernel) {
                        printf("wsemul_vt100_output_c0c1: ESC in kernel output ignored\n");
                        break;  /* ignore the ESC */
@@ -398,27 +398,27 @@
                }
                break;
 #if 0
-           case CSI: /* 8-bit */
+       case CSI: /* 8-bit */
                /* XXX cancel current escape sequence */
                edp->nargs = 0;
                memset(edp->args, 0, sizeof (edp->args));
                edp->modif1 = edp->modif2 = '\0';
                edp->state = VT100_EMUL_STATE_CSI;
                break;
-           case DCS: /* 8-bit */
+       case DCS: /* 8-bit */
                /* XXX cancel current escape sequence */
                edp->nargs = 0;
                memset(edp->args, 0, sizeof (edp->args));
                edp->state = VT100_EMUL_STATE_DCS;
                break;
-           case ST: /* string end 8-bit */
+       case ST: /* string end 8-bit */
                /* XXX only in VT100_EMUL_STATE_STRING */
                wsemul_vt100_handle_dcs(edp);
                return (VT100_EMUL_STATE_NORMAL);
 #endif
-           case ASCII_LF:
-           case ASCII_VT:
-           case ASCII_FF:
+       case ASCII_LF:
+       case ASCII_VT:
+       case ASCII_FF:
                if (ROWS_BELOW > 0) {
                        edp->crow++;
                        CHECK_DW;
@@ -435,13 +435,13 @@
        int i;
 
        switch (c) {
-           case '[': /* CSI */
+       case '[': /* CSI */
                edp->nargs = 0;
                memset(edp->args, 0, sizeof (edp->args));
                edp->modif1 = edp->modif2 = '\0';
                newstate = VT100_EMUL_STATE_CSI;
                break;
-           case '7': /* DECSC */
+       case '7': /* DECSC */
                edp->savedcursor_row = edp->crow;
                edp->savedcursor_col = edp->ccol;
                edp->savedattr = edp->curattr;
@@ -454,7 +454,7 @@
                edp->savedchartab0 = edp->chartab0;
                edp->savedchartab1 = edp->chartab1;
                break;
-           case '8': /* DECRC */
+       case '8': /* DECRC */
                edp->crow = edp->savedcursor_row;
                edp->ccol = edp->savedcursor_col;
                edp->curattr = edp->savedattr;
@@ -467,16 +467,16 @@
                edp->chartab0 = edp->savedchartab0;
                edp->chartab1 = edp->savedchartab1;
                break;
-           case '=': /* DECKPAM application mode */
+       case '=': /* DECKPAM application mode */
                edp->flags |= VTFL_APPLKEYPAD;
                break;
-           case '>': /* DECKPNM numeric mode */
+       case '>': /* DECKPNM numeric mode */
                edp->flags &= ~VTFL_APPLKEYPAD;
                break;
-           case 'E': /* NEL */
+       case 'E': /* NEL */
                edp->ccol = 0;
                /* FALLTHRU */
-           case 'D': /* IND */
+       case 'D': /* IND */
                if (ROWS_BELOW > 0) {
                        edp->crow++;
                        CHECK_DW;
@@ -484,32 +484,32 @@
                }
                wsemul_vt100_scrollup(edp, 1);
                break;
-           case 'H': /* HTS */
+       case 'H': /* HTS */
                KASSERT(edp->tabs != 0);
                edp->tabs[edp->ccol] = 1;
                break;
-           case '~': /* LS1R */
+       case '~': /* LS1R */
                edp->chartab1 = 1;
                break;
-           case 'n': /* LS2 */
+       case 'n': /* LS2 */
                edp->chartab0 = 2;
                break;
-           case '}': /* LS2R */
+       case '}': /* LS2R */
                edp->chartab1 = 2;
                break;
-           case 'o': /* LS3 */
+       case 'o': /* LS3 */
                edp->chartab0 = 3;
                break;
-           case '|': /* LS3R */
+       case '|': /* LS3R */
                edp->chartab1 = 3;
                break;
-           case 'N': /* SS2 */
+       case 'N': /* SS2 */
                edp->sschartab = 2;
                break;
-           case 'O': /* SS3 */
+       case 'O': /* SS3 */
                edp->sschartab = 3;
                break;
-           case 'M': /* RI */
+       case 'M': /* RI */
                if (ROWS_ABOVE > 0) {
                        edp->crow--;
                        CHECK_DW;
@@ -517,39 +517,39 @@
                }
                wsemul_vt100_scrolldown(edp, 1);
                break;
-           case 'P': /* DCS */
+       case 'P': /* DCS */
                edp->nargs = 0;
                memset(edp->args, 0, sizeof (edp->args));
                newstate = VT100_EMUL_STATE_DCS;
                break;
-           case 'c': /* RIS */
+       case 'c': /* RIS */
                wsemul_vt100_reset(edp);
                wsemul_vt100_ed(edp, 2);
                edp->ccol = edp->crow = 0;
                break;
-           case '(': case ')': case '*': case '+': /* SCS */
+       case '(': case ')': case '*': case '+': /* SCS */
                edp->designating = c - '(';
                newstate = VT100_EMUL_STATE_SCS94;
                break;
-           case '-': case '.': case '/': /* SCS */
+       case '-': case '.': case '/': /* SCS */
                edp->designating = c - '-' + 1;
                newstate = VT100_EMUL_STATE_SCS96;
                break;
-           case '#':
+       case '#':
                newstate = VT100_EMUL_STATE_ESC_HASH;
                break;
-           case ' ': /* 7/8 bit */
+       case ' ': /* 7/8 bit */
                newstate = VT100_EMUL_STATE_ESC_SPC;
                break;
-           case ']': /* OSC operating system command */
-           case '^': /* PM privacy message */
-           case '_': /* APC application program command */
+       case ']': /* OSC operating system command */
+       case '^': /* PM privacy message */
+       case '_': /* APC application program command */
                /* ignored */



Home | Main Index | Thread Index | Old Index