jdk/src/share/classes/sun/tools/java/ScannerInputReader.java
author ntoda
Thu, 31 Jul 2014 17:01:24 -0700
changeset 25799 1afc4675dc75
parent 5506 202f599c92aa
permissions -rw-r--r--
8044867: Fix raw and unchecked lint warnings in sun.tools.* Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.tools.java;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.io.IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.io.InputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.io.InputStreamReader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.BufferedReader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.io.FilterReader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.io.UnsupportedEncodingException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * An input stream for java programs. The stream treats either "\n", "\r"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * or "\r\n" as the end of a line, it always returns \n. It also parses
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * UNICODE characters expressed as \uffff. However, if it sees "\\", the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * second slash cannot begin a unicode sequence. It keeps track of the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * position in the input stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * WARNING: The contents of this source file are not part of any
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * supported API.  Code that depends on them does so at its own risk:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * they are subject to change or removal without notice.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * @author      Arthur van Hoff
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
public
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
class ScannerInputReader extends FilterReader implements Constants {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    // A note.  This class does not really properly subclass FilterReader.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    // Since this class only overrides the single character read method,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    // and not the multi-character read method, any use of the latter
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    // will not work properly.  Any attempt to use this code outside of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    // the compiler should take that into account.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    // For efficiency, it might be worth moving this code to Scanner and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    // getting rid of this class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    Environment env;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    long pos;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    private long chpos;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    private int pushBack = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    public ScannerInputReader(Environment env, InputStream in)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        throws UnsupportedEncodingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        // ScannerInputStream has been modified to no longer use
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        // BufferedReader.  It now does its own buffering for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        // performance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        super(env.getCharacterEncoding() != null ?
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
              new InputStreamReader(in, env.getCharacterEncoding()) :
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
              new InputStreamReader(in));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        // Start out the buffer empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        currentIndex = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        numChars = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        this.env = env;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        chpos = Scanner.LINEINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    //------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    // Buffering code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    // The size of our buffer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    private static final int BUFFERLEN = 10 * 1024;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    // A character buffer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    private final char[] buffer = new char[BUFFERLEN];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    // The index of the next character to be "read" from the buffer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    private int currentIndex;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    // The number of characters in the buffer.  -1 if EOF is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    private int numChars;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * Get the next character from our buffer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * Note: this method has been inlined by hand in the `read' method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * below.  Any changes made to this method should be equally applied
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * to that code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    private int getNextChar() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        // Check to see if we have either run out of characters in our
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        // buffer or gotten to EOF on a previous call.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        if (currentIndex >= numChars) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            numChars = in.read(buffer);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            if (numChars == -1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                // We have reached EOF.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                return -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
            // No EOF.  currentIndex points to first char in buffer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            currentIndex = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        return buffer[currentIndex++];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    //------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    public int read(char[] buffer, int off, int len) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        throw new CompilerError(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                   "ScannerInputReader is not a fully implemented reader.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    public int read() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        pos = chpos;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        chpos += Scanner.OFFSETINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        int c = pushBack;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        if (c == -1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        getchar: try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                // Here the call...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
                //     c = getNextChar();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                // has been inlined by hand for performance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                if (currentIndex >= numChars) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                    numChars = in.read(buffer);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                    if (numChars == -1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                        // We have reached EOF.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                        c = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
                        break getchar;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                    // No EOF.  currentIndex points to first char in buffer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
                    currentIndex = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                c = buffer[currentIndex++];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
            } catch (java.io.CharConversionException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
                env.error(pos, "invalid.encoding.char");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
                // this is fatal error
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                return -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
            pushBack = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        // parse special characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        switch (c) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
          case -2:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
            // -2 is a special code indicating a pushback of a backslash that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            // definitely isn't the start of a unicode sequence.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
            return '\\';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
          case '\\':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
            if ((c = getNextChar()) != 'u') {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                pushBack = (c == '\\' ? -2 : c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                return '\\';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
            // we have a unicode sequence
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
            chpos += Scanner.OFFSETINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
            while ((c = getNextChar()) == 'u') {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                chpos += Scanner.OFFSETINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
            // unicode escape sequence
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            int d = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            for (int i = 0 ; i < 4 ; i++, chpos += Scanner.OFFSETINC, c = getNextChar()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                switch (c) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                  case '0': case '1': case '2': case '3': case '4':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                  case '5': case '6': case '7': case '8': case '9':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
                    d = (d << 4) + c - '0';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                    break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
                  case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
                    d = (d << 4) + 10 + c - 'a';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                    break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                  case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                    d = (d << 4) + 10 + c - 'A';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                    break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                  default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                    env.error(pos, "invalid.escape.char");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                    pushBack = c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
                    return d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
            pushBack = c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
            // To read the following line, switch \ and /...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
            // Handle /u000a, /u000A, /u000d, /u000D properly as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
            // line terminators as per JLS 3.4, even though they are encoded
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
            // (this properly respects the order given in JLS 3.2).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
            switch (d) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
                case '\n':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                   chpos += Scanner.LINEINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
                    return '\n';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
                case '\r':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                    if ((c = getNextChar()) != '\n') {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                        pushBack = c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                    } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                        chpos += Scanner.OFFSETINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
                    chpos += Scanner.LINEINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
                    return '\n';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
                default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                    return d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
          case '\n':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
            chpos += Scanner.LINEINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
            return '\n';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
          case '\r':
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
            if ((c = getNextChar()) != '\n') {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
                pushBack = c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
                chpos += Scanner.OFFSETINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
            chpos += Scanner.LINEINC;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
            return '\n';
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
          default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
            return c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
}