Add back spaces around ellipses in case statements
authorH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:25:40 +0000 (15:25 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:25:40 +0000 (15:25 -0700)
GNU C allows the ellipsis (...) to be used in case statements to
indicate a range.  However, it requires spaces around it to be valid.
Nindent stripped those off, put them back.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/lib/sys/ansi.c
com32/lib/vsscanf.c

index a11a715..7d58085 100644 (file)
@@ -77,7 +77,7 @@ void __ansi_putchar(const struct term_info *ti, uint8_t ch)
     switch (st->state) {
     case st_init:
        switch (ch) {
-       case 1...5:
+       case 1 ... 5:
            st->state = st_tbl;
            st->parms[0] = ch;
            break;
@@ -339,7 +339,7 @@ void __ansi_putchar(const struct term_info *ti, uint8_t ch)
                            case 27:
                                st->reverse = 0;
                                break;
-                           case 30...37:
+                           case 30 ... 37:
                                st->fg = ansi2pc[a - 30];
                                break;
                            case 38:
@@ -350,7 +350,7 @@ void __ansi_putchar(const struct term_info *ti, uint8_t ch)
                                st->fg = 7;
                                st->underline = 0;
                                break;
-                           case 40...47:
+                           case 40 ... 47:
                                st->bg = ansi2pc[a - 40];
                                break;
                            case 49:
index 3c016db..153dbbd 100644 (file)
@@ -116,7 +116,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
            case '*':
                flags |= FL_SPLAT;
                break;
-           case '0'...'9':
+           case '0' ... '9':
                width = (ch - '0');
                state = st_width;
                flags |= FL_WIDTH;