diff --git a/main.mk b/main.mk index 3bf102cb7b..3a46292520 100644 --- a/main.mk +++ b/main.mk @@ -58,7 +58,8 @@ LIBOBJ = attach.o auth.o btree.o build.o date.o delete.o \ expr.o func.o hash.o insert.o \ main.o opcodes.o os_mac.o os_unix.o os_win.o \ pager.o parse.o pragma.o printf.o random.o \ - select.o table.o tokenize.o trigger.o update.o util.o vacuum.o \ + select.o table.o tclsqlite.o tokenize.o trigger.o \ + update.o util.o vacuum.o \ vdbe.o vdbeapi.o vdbeaux.o vdbemem.o \ where.o utf.o legacy.o @@ -118,11 +119,13 @@ TESTSRC = \ $(TOP)/src/os_unix.c \ $(TOP)/src/os_win.c \ $(TOP)/src/pager.c \ + $(TOP)/src/printf.c \ $(TOP)/src/test1.c \ $(TOP)/src/test2.c \ $(TOP)/src/test3.c \ $(TOP)/src/test4.c \ $(TOP)/src/test5.c \ + $(TOP)/src/utf.c \ $(TOP)/src/vdbe.c \ $(TOP)/src/md5.c diff --git a/manifest b/manifest index a91a6757e1..d303a54d53 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\stypos\sin\sdocumentation.\s\sFix\spublish.sh\sso\sthat\sit\scorrectly\sbuilds\sthe\nZIP\sarchive\sof\spreprocesses\ssource\scode.\s(CVS\s1620) -D 2004-06-18T15:13:48 +C Changes\sto\sallow\slibsqlite3.a\sand\slibsqlite.a\sto\sbe\sboth\slinked\sinto\sthe\nsame\sprogram\sat\sthe\ssame\stime.\s(CVS\s1621) +D 2004-06-18T17:10:16 F Makefile.in 5125bd6b92fca76275a6fc6c6ff425484b8cec0a F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -17,7 +17,7 @@ F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538 F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 F ltmain.sh f6b283068efa69f06eb8aa1fe4bddfdbdeb35826 -F main.mk 6004a81e05581a6b51e4f37a62ed45db089c47cf +F main.mk 0a9048137bc0783acde5a9a032a44ec2510da576 F mkdll.sh 68d34a961a1fdfa15ef27fc4f4740be583112124 F publish.sh 5bc5e493fa1773a3c0d9712182de0f5abd494903 F spec.template a38492f1c1dd349fc24cb0565e08afc53045304b @@ -38,38 +38,38 @@ F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb F src/insert.c 1428887f4a7515a7d34e82aaeb76297c79ba378b F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f -F src/main.c a7cee3b75b74aec795e26175cd3070fe0909b297 +F src/main.c bbb19c7ad47bbb433a5467a39347ddd49eb5eefe F src/md5.c d77a389955759c8329bb357e3d71bac3d6eb710b F src/os.h 1cb5f0293a30288451fe3c0c73815cf208212ed1 F src/os_common.h ba1b7306e16e2091718f2c48db0fe6c1d7a31bb8 F src/os_mac.c 3d31e26be1411acfb7961033098631b4f3486fdf F src/os_mac.h 51d2445f47e182ed32d3bd6937f81070c6fd9bd4 -F src/os_unix.c add5af1cc4ff726297338e4e96ac36d1a5658d2c +F src/os_unix.c 47176c8e9b90ba751b2c110b6384936572ff3abc F src/os_unix.h 1cd6133cf66dea704b8646b70b2dfdcbdd9b3738 F src/os_win.c 337e973ee77797aaab4787e3477a5945fcd97266 F src/os_win.h 004eec47b1780fcaf07420ddc2072294b698d48c F src/pager.c 453099416c10669365ca70f12f13e67e6ef11000 F src/pager.h bc58d32a9dee464f7268fb68652c130a4216e438 F src/parse.y 097438674976355a10cf177bd97326c548820b86 -F src/pragma.c 83b86b2942d7f1b202644ac4e2559965e23a8a7b -F src/printf.c 7e7f83a747bbd0601dcb4ee2885fb3ce3e994a9f +F src/pragma.c c11121c2c0659c37deebae3668db6db5e2be43b1 +F src/printf.c 823b6a5cbedb6971a9e62f5d83204fe9b0be7c1b F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3 F src/select.c 91570af7f13d1c5584f3b711676e1226ee12194e F src/shell.c ca519519dcbbc582f6d88f7d0e7583b857fd3469 F src/sqlite.h.in eacd23af3280603cd8b48979c6f9297b3ac2935c -F src/sqliteInt.h 7d8145b6828826683f44b8c40930c34c8ec1f3c3 +F src/sqliteInt.h e1f3a90e9efced7a5f610a390b2cae6150fc025e F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2 -F src/tclsqlite.c 6f88be282a3617c6739c043fd13571b5f2fe9922 +F src/tclsqlite.c e1e9d89ce93e0372c519cc88d4a3f4df9ce5ff03 F src/test1.c 963f4417d1770f5238672ff5b817a9103842eeb7 F src/test2.c db0a0c30b59f1639cb8c2572be06439402833cc8 F src/test3.c 7247090d15a5a43823079b6fd8dad1ed3cccdedf F src/test4.c a921a69821fd30209589228e64f94e9f715b6fe2 F src/test5.c 1b7c275b2929dbd034a567255d2aca339410d1d6 F src/tokenize.c 900374b6b37f04748bcd48c2d29a41c251542935 -F src/trigger.c 3325207ea41d2d429e70370ce2ff987fd49b7ada +F src/trigger.c b05699cf40e99a330649eabfb1cece05ff73e469 F src/update.c f9a03233577e0c3d57234d1957963875fc941da2 -F src/utf.c 7464315fd4b627b96801444f3671f3e9930879c6 -F src/util.c 9d9ef854e9a8744a7ebaee02ee26eb0aaa8a9987 +F src/utf.c 3a2596013e4b9582d075ca742de7f067ff7dee95 +F src/util.c e59ee2afc6650bd62466b8d26560794c844ff66d F src/vacuum.c f9561c8095407a970af4e6a304b77c4083433d3e F src/vdbe.c 2a0e908e46ea6822f215cb0f35ec31f5c2832629 F src/vdbe.h 46f74444a213129bc4b5ce40124dd8ed613b0cde @@ -225,7 +225,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/version3.tcl af528563442e3039928f9018327a18157e53a44f F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P 8b409aaae42cc36d96536531da41f05bd0cdd29c -R 06705682ecc02465bea573b58c16c9a3 +P fee0c5e308c3de1937185e2060c8757e605ab3a2 +R 1639c59e9612ce2bf73d0c536753921b U drh -Z 797649997def2a974837df56baf38e92 +Z e30013f7bf26f9cf3901cd1c03fa41f3 diff --git a/manifest.uuid b/manifest.uuid index 3b47d0a506..86f25d1411 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -fee0c5e308c3de1937185e2060c8757e605ab3a2 \ No newline at end of file +2590fffcaa92adc619f7a927d2b5169d8dfef50a \ No newline at end of file diff --git a/src/main.c b/src/main.c index b7022d72e0..4bcf33fa38 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.225 2004/06/18 04:24:54 danielk1977 Exp $ +** $Id: main.c,v 1.226 2004/06/18 17:10:17 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -398,7 +398,7 @@ int sqlite3ReadSchema(sqlite *db, char **pzErrMsg){ /* ** The version of the library */ -const char rcsid[] = "@(#) \044Id: SQLite version " SQLITE_VERSION " $"; +const char rcsid3[] = "@(#) \044Id: SQLite version " SQLITE_VERSION " $"; const char sqlite3_version[] = SQLITE_VERSION; /* diff --git a/src/os_unix.c b/src/os_unix.c index e2cae01d3e..c434007a35 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -241,7 +241,7 @@ static void releaseOpenCnt(struct openCnt *pOpen){ ** ** Return the number of errors. */ -int findLockInfo( +static int findLockInfo( int fd, /* The file descriptor used in the key */ struct lockInfo **ppLock, /* Return the lockInfo structure here */ struct openCnt **ppOpen /* Return the openCnt structure here */ diff --git a/src/pragma.c b/src/pragma.c index 2b5f91ca39..3c79c8da73 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to implement the PRAGMA command. ** -** $Id: pragma.c,v 1.46 2004/06/17 19:04:17 drh Exp $ +** $Id: pragma.c,v 1.47 2004/06/18 17:10:17 drh Exp $ */ #include "sqliteInt.h" #include @@ -377,9 +377,9 @@ void sqlite3Pragma(Parse *pParse, Token *pLeft, Token *pRight, int minusFlag){ #ifndef NDEBUG if( sqlite3StrICmp(zLeft, "trigger_overhead_test")==0 ){ if( getBoolean(zRight) ){ - always_code_trigger_setup = 1; + sqlite3_always_code_trigger_setup = 1; }else{ - always_code_trigger_setup = 0; + sqlite3_always_code_trigger_setup = 0; } }else #endif diff --git a/src/printf.c b/src/printf.c index 13d4e116f3..6d1059655e 100644 --- a/src/printf.c +++ b/src/printf.c @@ -800,7 +800,7 @@ char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ return z; } -#ifndef NDEBUG +#if defined(SQLITE_TEST) /* ** A version of printf() that understands %lld. Used for debugging. ** The printf() built into some versions of windows does not understand %lld diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 05f51304ea..0674a9d8da 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.287 2004/06/18 04:24:54 danielk1977 Exp $ +** @(#) $Id: sqliteInt.h,v 1.288 2004/06/18 17:10:17 drh Exp $ */ #include "config.h" #include "sqlite3.h" @@ -194,10 +194,15 @@ extern const int sqlite3one; # define sqliteStrNDup(X,Y) sqlite3StrNDup_(X,Y,__FILE__,__LINE__) void sqlite3StrRealloc(char**); #else -# define sqlite3FreeX sqliteFree -# define sqlite3Realloc_(X,Y) sqliteRealloc(X,Y) +# define sqliteFree sqlite3FreeX +# define sqliteMalloc sqlite3Malloc +# define sqliteMallocRaw sqlite3MallocRaw +# define sqliteRealloc sqlite3Realloc +/* # define sqliteRealloc_(X,Y) sqlite3Realloc(X,Y) */ # define sqlite3StrRealloc(X) #endif +#define sqliteStrDup sqlite3StrDup +#define sqliteStrNDup sqlite3StrNDup /* ** This variable gets set if malloc() ever fails. After it gets set, @@ -1198,7 +1203,7 @@ struct DbFixer { * SQLite will perform the overhead of building new and old trigger references * even when no triggers exist */ -extern int always_code_trigger_setup; +extern int sqlite3_always_code_trigger_setup; /* ** Internal function prototypes diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 866c805863..869e8c0e35 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.86 2004/06/14 11:43:46 danielk1977 Exp $ +** $Id: tclsqlite.c,v 1.87 2004/06/18 17:10:17 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -1109,22 +1109,22 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** used to open a new SQLite database. See the DbMain() routine above ** for additional information. */ -int Sqlite_Init(Tcl_Interp *interp){ +int Sqlite3_Init(Tcl_Interp *interp){ Tcl_InitStubs(interp, "8.0", 0); Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0); Tcl_PkgProvide(interp, "sqlite", "2.0"); return TCL_OK; } -int Tclsqlite_Init(Tcl_Interp *interp){ +int Tclsqlite3_Init(Tcl_Interp *interp){ Tcl_InitStubs(interp, "8.0", 0); Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0); Tcl_PkgProvide(interp, "sqlite", "2.0"); return TCL_OK; } -int Sqlite_SafeInit(Tcl_Interp *interp){ +int Sqlite3_SafeInit(Tcl_Interp *interp){ return TCL_OK; } -int Tclsqlite_SafeInit(Tcl_Interp *interp){ +int Tclsqlite3_SafeInit(Tcl_Interp *interp){ return TCL_OK; } @@ -1134,7 +1134,7 @@ int Tclsqlite_SafeInit(Tcl_Interp *interp){ ** everything. */ int Et_AppInit(Tcl_Interp *interp){ - return Sqlite_Init(interp); + return Sqlite3_Init(interp); } #endif @@ -1171,7 +1171,7 @@ int TCLSH_MAIN(int argc, char **argv){ Tcl_Interp *interp; Tcl_FindExecutable(argv[0]); interp = Tcl_CreateInterp(); - Sqlite_Init(interp); + Sqlite3_Init(interp); #ifdef SQLITE_TEST { extern int Sqlitetest1_Init(Tcl_Interp*); diff --git a/src/trigger.c b/src/trigger.c index a1b3979381..ddb7b97f5c 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -551,7 +551,7 @@ static int checkColumnOverLap(IdList *pIdList, ExprList *pEList){ * The pragma is not documented since it is not really part of the interface * to SQLite, just the test procedure. */ -int always_code_trigger_setup = 0; +int sqlite3_always_code_trigger_setup = 0; /* * Returns true if a trigger matching op, tr_tm and foreach that is NOT already @@ -568,7 +568,7 @@ int sqlite3TriggersExist( ){ Trigger * pTriggerCursor; - if( always_code_trigger_setup ){ + if( sqlite3_always_code_trigger_setup ){ return 1; } diff --git a/src/utf.c b/src/utf.c index 98e13abf4e..3c10425020 100644 --- a/src/utf.c +++ b/src/utf.c @@ -12,7 +12,7 @@ ** This file contains routines used to translate between UTF-8, ** UTF-16, UTF-16BE, and UTF-16LE. ** -** $Id: utf.c,v 1.21 2004/06/18 04:24:55 danielk1977 Exp $ +** $Id: utf.c,v 1.22 2004/06/18 17:10:17 drh Exp $ ** ** Notes on UTF-8: ** @@ -498,7 +498,7 @@ int sqlite3utf8LikeCompare( return *zString==0; } -#ifndef NDEBUG +#if defined(SQLITE_TEST) /* ** This routine is called from the TCL test function "translate_selftest". ** It checks that the primitives for serializing and deserializing @@ -542,5 +542,3 @@ void sqlite3utfSelfTest(){ } } #endif - - diff --git a/src/util.c b/src/util.c index 29cd561126..55b82357ee 100644 --- a/src/util.c +++ b/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.103 2004/06/18 04:24:55 danielk1977 Exp $ +** $Id: util.c,v 1.104 2004/06/18 17:10:17 drh Exp $ */ #include "sqliteInt.h" #include @@ -275,7 +275,7 @@ void sqlite3FreeX(void *p){ ** Allocate new memory and set it to zero. Return NULL if ** no memory is available. See also sqliteMallocRaw(). */ -void *sqliteMalloc(int n){ +void *sqlite3Malloc(int n){ void *p; if( (p = malloc(n))==0 ){ if( n>0 ) sqlite3_malloc_failed++; @@ -289,7 +289,7 @@ void *sqliteMalloc(int n){ ** Allocate new memory but do not set it to zero. Return NULL if ** no memory is available. See also sqliteMalloc(). */ -void *sqliteMallocRaw(int n){ +void *sqlite3MallocRaw(int n){ void *p; if( (p = malloc(n))==0 ){ if( n>0 ) sqlite3_malloc_failed++; @@ -300,7 +300,7 @@ void *sqliteMallocRaw(int n){ /* ** Free memory previously obtained from sqliteMalloc() */ -void sqliteFree(void *p){ +void sqlite3FreeX(void *p){ if( p ){ free(p); } @@ -311,7 +311,7 @@ void sqliteFree(void *p){ ** works just like sqliteMalloc(). If n==0, then this routine ** works just like sqliteFree(). */ -void *sqliteRealloc(void *p, int n){ +void *sqlite3Realloc(void *p, int n){ void *p2; if( p==0 ){ return sqliteMalloc(n); @@ -330,14 +330,14 @@ void *sqliteRealloc(void *p, int n){ /* ** Make a copy of a string in memory obtained from sqliteMalloc() */ -char *sqliteStrDup(const char *z){ +char *sqlite3StrDup(const char *z){ char *zNew; if( z==0 ) return 0; zNew = sqliteMallocRaw(strlen(z)+1); if( zNew ) strcpy(zNew, z); return zNew; } -char *sqliteStrNDup(const char *z, int n){ +char *sqlite3StrNDup(const char *z, int n){ char *zNew; if( z==0 ) return 0; zNew = sqliteMallocRaw(n+1);