1 | for ( ; i < buflen ; ) {↵ | | |
|
2 | switch(ival = bytes[i++]) {↵ | | 1 | switch(ival = bytes[i++]) {↵
|
3 | case '0':↵ | | 2 | case '0':↵
|
| | | 3 | // ignore leading zeroes↵
|
| | | 4 | break; // switch↵
|
4 | case '1': case '2': case '3': case '4':↵ | | 5 | case '1': case '2': case '3': case '4':↵
|
5 | case '5': case '6': case '7': case '8': case '9':↵ | | 6 | case '5': case '6': case '7': case '8': case '9':↵
|
6 | chars[offset++] = (char)ival;↵ | | 7 | chars[offset++] = (char)ival;↵
|
7 | lastValidOffset = offset;↵ | | 8 | lastValidOffset = offset;↵
|
8 | break; // switch↵ | | 9 | break; // switch↵
|
9 | case 'e':↵ | | 10 | case '↵
|
10 | case 'E':↵ | | 11 | .':↵
|
11 | state = SEXP_STRICT;↵ | | 12 | state = S↵
|
12 | break states;↵ | | |
|
13 | case '_':↵ | | |
|
14 | if (i >= buflen || bytes[i] < '0' || bytes[i] > '9') {↵ | | |
|
15 | state = SERR_NOT_STRICT;↵ | | 13 | DECDIGIT_STRICT;↵
|
16 | break states;↵ | | 14 | break states;↵
|
17 | }↵ | | 15 | ↵
|
18 | break; //switch↵ | | |
|
19 | default:↵ | | |
|
20 | for ( --i; i < buflen && isWhitespace(bytes[i]); i++) ;↵ | | |
|
21 | state = i < buflen ?↵ | | 16 | default:↵
|
22 | SERR_NOT_STRICT : SCOMPLETE; ↵ | | 17 | state = SERR_NOT_STRICT;↵
|
23 | break states;↵ | | 18 | break states;↵
|
24 | } // switch↵ | | 19 | }
|
25 | } | | | |