diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tclsqlite.c | 8 | ||||
-rw-r--r-- | src/tokenize.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 9fc5d6cef..8d52ac319 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.100 2004/08/20 18:34:20 drh Exp $ +** $Id: tclsqlite.c,v 1.101 2004/08/24 15:23:34 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -693,9 +693,9 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** that have the same name as the fields extracted by the query. */ case DB_EVAL: { - char const *zSql; - char const *zLeft; - sqlite3_stmt *pStmt; + char const *zSql; /* Next SQL statement to execute */ + char const *zLeft; /* What is left after first stmt in zSql */ + sqlite3_stmt *pStmt; /* Compiled SQL statment */ Tcl_Obj *pArray; /* Name of array into which results are written */ Tcl_Obj *pScript; /* Script to run for each result set */ diff --git a/src/tokenize.c b/src/tokenize.c index b15b0b1b3..ff9c32bee 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -15,7 +15,7 @@ ** individual tokens and sends those tokens one-by-one over to the ** parser for analysis. ** -** $Id: tokenize.c,v 1.82 2004/08/20 16:02:39 drh Exp $ +** $Id: tokenize.c,v 1.83 2004/08/24 15:23:34 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -385,6 +385,7 @@ static int sqliteGetToken(const unsigned char *z, int *tokenType){ } case '$': { int c; + *tokenType = TK_VARIABLE; if( z[1]=='{' ){ int nBrace = 1; for(i=2; (c=z[i])!=0 && nBrace; i++){ @@ -394,7 +395,7 @@ static int sqliteGetToken(const unsigned char *z, int *tokenType){ nBrace--; } } - *tokenType = c!=0 ? TK_VARIABLE : TK_ILLEGAL; + if( c==0 ) *tokenType = TK_ILLEGAL; }else{ int n = 0; for(i=1; (c=z[i])!=0; i++){ @@ -406,7 +407,6 @@ static int sqliteGetToken(const unsigned char *z, int *tokenType){ }while( (c=z[i])!=0 && !isspace(c) && c!=')' ); if( c==')' ){ i++; - *tokenType = TK_VARIABLE; }else{ *tokenType = TK_ILLEGAL; } @@ -414,10 +414,10 @@ static int sqliteGetToken(const unsigned char *z, int *tokenType){ }else if( c==':' && z[i+1]==':' ){ i++; }else{ - *tokenType = n==0 ? TK_ILLEGAL : TK_VARIABLE; break; } } + if( n==0 ) *tokenType = TK_ILLEGAL; } return i; } |