extensions/sqlite/sqlite-source/complete.c
changeset 1645 27307df4d711
parent 1203 633c25ce6405
     1.1 --- a/extensions/sqlite/sqlite-source/complete.c	Sun Oct 28 05:06:12 2007 +0000
     1.2 +++ b/extensions/sqlite/sqlite-source/complete.c	Sun Oct 28 05:48:06 2007 +0000
     1.3 @@ -24,8 +24,16 @@
     1.4  /*
     1.5  ** This is defined in tokenize.c.  We just have to import the definition.
     1.6  */
     1.7 -extern const char sqlite3IsIdChar[];
     1.8 -#define IdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsIdChar[c-0x20]))
     1.9 +#ifndef SQLITE_AMALGAMATION
    1.10 +#ifdef SQLITE_ASCII
    1.11 +extern const char sqlite3IsAsciiIdChar[];
    1.12 +#define IdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))
    1.13 +#endif
    1.14 +#ifdef SQLITE_EBCDIC
    1.15 +extern const char sqlite3IsEbcdicIdChar[];
    1.16 +#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
    1.17 +#endif
    1.18 +#endif /* SQLITE_AMALGAMATION */
    1.19  
    1.20  
    1.21  /*
    1.22 @@ -248,9 +256,9 @@
    1.23  int sqlite3_complete16(const void *zSql){
    1.24    sqlite3_value *pVal;
    1.25    char const *zSql8;
    1.26 -  int rc = 0;
    1.27 +  int rc = SQLITE_NOMEM;
    1.28  
    1.29 -  pVal = sqlite3ValueNew();
    1.30 +  pVal = sqlite3ValueNew(0);
    1.31    sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
    1.32    zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
    1.33    if( zSql8 ){