1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-19 21:43:15 +03:00

Add the '%ifdef' capability to lemon. Other minor changes. (CVS 1836)

FossilOrigin-Name: 522ff721ccc33c4b89072fed4e451f0df82e8140
This commit is contained in:
drh
2004-07-20 12:45:22 +00:00
parent cf55b7aef7
commit 6d08b4d647
8 changed files with 115 additions and 35 deletions

View File

@@ -23,7 +23,7 @@
** ROLLBACK
** PRAGMA
**
** $Id: build.c,v 1.238 2004/07/19 17:25:25 drh Exp $
** $Id: build.c,v 1.239 2004/07/20 12:45:22 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -951,18 +951,9 @@ CollSeq *sqlite3FindCollSeq(
int create
){
CollSeq *pColl = findCollSeqEntry(db, zName, nName, create);
if( pColl ) switch( enc ){
case SQLITE_UTF8:
break;
case SQLITE_UTF16LE:
pColl = &pColl[1];
break;
case SQLITE_UTF16BE:
pColl = &pColl[2];
break;
default:
assert(!"Cannot happen");
}
assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
if( pColl ) pColl += enc-1;
return pColl;
}