Index: src/shell.c ================================================================== --- src/shell.c +++ src/shell.c @@ -1483,10 +1483,16 @@ #ifdef SQLITE_ENABLE_REGEXP { extern int sqlite3_add_regexp_func(sqlite3*); sqlite3_add_regexp_func(db); } +#endif +#ifdef SQLITE_ENABLE_SPELLFIX + { + extern int sqlite3_spellfix1_register(sqlite3*); + sqlite3_spellfix1_register(db); + } #endif } } /* Index: src/test8.c ================================================================== --- src/test8.c +++ src/test8.c @@ -1387,11 +1387,11 @@ Tcl_WrongNumArgs(interp, 1, objv, "DB"); return TCL_ERROR; } if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR; - sqlite3Spellfix1Register(db); + sqlite3_spellfix1_register(db); return TCL_OK; } #endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ Index: src/test_spellfix.c ================================================================== --- src/test_spellfix.c +++ src/test_spellfix.c @@ -19,10 +19,15 @@ #else # include # include # include # include "sqlite3ext.h" +# include +# define ALWAYS(X) 1 +# define NEVER(X) 0 + typedef unsigned char u8; + typedef unsigned short u16; SQLITE_EXTENSION_INIT1 #endif /* !SQLITE_CORE */ #include /* @@ -2807,24 +2812,24 @@ #if SQLITE_CORE || defined(SQLITE_TEST) /* ** Register the spellfix1 virtual table and its associated functions. */ -int sqlite3Spellfix1Register(sqlite3 *db){ +int sqlite3_spellfix1_register(sqlite3 *db){ return spellfix1Register(db); } #endif #if !SQLITE_CORE /* ** Extension load function. */ -int sqlite3_extension_init( +int sqlite3_spellfix1_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi ){ SQLITE_EXTENSION_INIT2(pApi); return spellfix1Register(db); } #endif /* !SQLITE_CORE */ Index: tool/build-shell.sh ================================================================== --- tool/build-shell.sh +++ tool/build-shell.sh @@ -14,10 +14,13 @@ -DSQLITE_ENABLE_VFSTRACE \ -DSQLITE_ENABLE_STAT3 \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_RTREE \ -DSQLITE_ENABLE_REGEXP \ + -DSQLITE_ENABLE_SPELLFIX -DSQLITE_CORE=1 \ -DHAVE_READLINE \ -DHAVE_USLEEP=1 \ - ../sqlite/src/shell.c ../sqlite/src/test_vfstrace.c \ + ../sqlite/src/shell.c \ ../sqlite/src/test_regexp.c \ + ../sqlite/src/test_spellfix.c \ + ../sqlite/src/test_vfstrace.c \ sqlite3.c -ldl -lreadline -lncurses