msi: Remove extraneous braces from switch statement.

This commit is contained in:
Andrew Talbot 2011-11-05 20:53:52 +00:00 committed by Alexandre Julliard
parent d5ad5ca91c
commit 3358b541ac
1 changed files with 9 additions and 18 deletions

View File

@ -193,16 +193,14 @@ static const char isIdChar[] = {
int sqliteGetToken(const WCHAR *z, int *tokenType){
int i;
switch( *z ){
case ' ': case '\t': case '\n': case '\f': {
case ' ': case '\t': case '\n': case '\f':
for(i=1; isspace(z[i]) && z[i] != '\r'; i++){}
*tokenType = TK_SPACE;
return i;
}
case '-': {
case '-':
if( z[1]==0 ) return -1;
*tokenType = TK_MINUS;
return 1;
}
case '(':
*tokenType = TK_LP;
return 1;
@ -215,7 +213,7 @@ int sqliteGetToken(const WCHAR *z, int *tokenType){
case '=':
*tokenType = TK_EQ;
return 1;
case '<': {
case '<':
if( z[1]=='=' ){
*tokenType = TK_LE;
return 2;
@ -226,8 +224,7 @@ int sqliteGetToken(const WCHAR *z, int *tokenType){
*tokenType = TK_LT;
return 1;
}
}
case '>': {
case '>':
if( z[1]=='=' ){
*tokenType = TK_GE;
return 2;
@ -235,8 +232,7 @@ int sqliteGetToken(const WCHAR *z, int *tokenType){
*tokenType = TK_GT;
return 1;
}
}
case '!': {
case '!':
if( z[1]!='=' ){
*tokenType = TK_ILLEGAL;
return 2;
@ -244,7 +240,6 @@ int sqliteGetToken(const WCHAR *z, int *tokenType){
*tokenType = TK_NE;
return 2;
}
}
case '?':
*tokenType = TK_WILDCARD;
return 1;
@ -264,32 +259,28 @@ int sqliteGetToken(const WCHAR *z, int *tokenType){
*tokenType = TK_STRING;
return i;
}
case '.': {
case '.':
if( !isdigit(z[1]) ){
*tokenType = TK_DOT;
return 1;
}
/* Fall thru into the next case */
}
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9': {
case '5': case '6': case '7': case '8': case '9':
*tokenType = TK_INTEGER;
for(i=1; isdigit(z[i]); i++){}
return i;
}
case '[': {
case '[':
for(i=1; z[i] && z[i-1]!=']'; i++){}
*tokenType = TK_ID;
return i;
}
default: {
default:
if( !isIdChar[*z] ){
break;
}
for(i=1; isIdChar[z[i]]; i++){}
*tokenType = sqliteKeywordCode(z, i);
return i;
}
}
*tokenType = TK_ILLEGAL;
return 1;