From 3a00f907a9f37c9f2e0f1e8d49c67fe072b4320b Mon Sep 17 00:00:00 2001 From: mlcreech Date: Tue, 4 Mar 2008 17:45:01 +0000 Subject: [PATCH] Various renames & cleanups to limit exported symbols on amalgamation build (CVS 4819) FossilOrigin-Name: 9c6694bb61a8ecdbfb2d05e5e05a8cc97b792240 --- Makefile.in | 4 ++-- manifest | 42 +++++++++++++++++++++--------------------- manifest.uuid | 2 +- src/btree.c | 4 ++-- src/btreeInt.h | 6 +++--- src/loadext.c | 6 +++--- src/main.c | 4 ++-- src/os_common.h | 16 ++++++++-------- src/prepare.c | 4 ++-- src/select.c | 8 ++++---- src/shell.c | 12 ++++++------ src/sqliteInt.h | 8 ++++---- src/test1.c | 20 ++++++++++---------- src/test3.c | 6 +++--- src/vdbeaux.c | 12 ++++++------ src/where.c | 10 +++++----- tool/mksqlite3c.tcl | 5 +++-- 17 files changed, 85 insertions(+), 84 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4ce02c7fcd..e03cae27ca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -120,8 +120,8 @@ TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1 # Object files for the SQLite library. # -LIBOBJ = alter.lo analyze.lo attach.lo auth.lo bitvec.lo btmutex.lo btree.lo build.lo \ - callback.lo complete.lo date.lo \ +LIBOBJ = alter.lo analyze.lo attach.lo auth.lo bitvec.lo btmutex.lo btree.lo \ + build.lo callback.lo complete.lo date.lo \ delete.lo expr.lo fault.lo func.lo \ hash.lo journal.lo insert.lo loadext.lo \ main.lo malloc.lo mem1.lo mem2.lo mem3.lo mem4.lo mem5.lo mutex.lo \ diff --git a/manifest b/manifest index e3c9540634..c9f2e06c5f 100644 --- a/manifest +++ b/manifest @@ -1,7 +1,7 @@ -C Additional\sdocumentation\sand\stests\smaking\sit\sclear\sthat\swhenever\nsqlite3_prepare()\sfails\sit\ssets\s*ppStmt\sto\sNULL.\s(CVS\s4818) -D 2008-03-03T18:47:28 +C Various\srenames\s&\scleanups\sto\slimit\sexported\ssymbols\son\samalgamation\sbuild\s(CVS\s4819) +D 2008-03-04T17:45:01 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 -F Makefile.in 671087b1907a3c3f2afa18d4fd9e8d180d28adfc +F Makefile.in 189c76bd261ed4e378904a3d81fc4bc12e23cddc F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 F VERSION 2e206fc9458bf10a8c3ba2d13bf521a04ef441c6 @@ -84,9 +84,9 @@ F src/attach.c e13d62597e8725075b27186817f7e745122af24e F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627 F src/bitvec.c bc5b52a590dc38a48fdded1f098b84af673448c9 F src/btmutex.c 483ced3c52205b04b97df69161fadbf87f4f1ea2 -F src/btree.c 134a152a27e049ba6093333aa22e5f6d5013d7ae +F src/btree.c 439e2684892d2b70996dc3c5fba25e07949e1d84 F src/btree.h 19dcf5ad23c17b98855da548e9a8e3eb4429d5eb -F src/btreeInt.h 97a68823481e769874f9a61ef43719c856c71860 +F src/btreeInt.h d7d2f4d9d7f2e72c455326d48b2b478b842a81f6 F src/build.c 7d93ee565b5676746d014acdc638adee87cfd27e F src/callback.c 77b302b0d41468dcda78c70e706e5b84577f0fa0 F src/complete.c 4cf68fd75d60257524cbe74f87351b9848399131 @@ -102,8 +102,8 @@ F src/insert.c b313f5ecadf82dda15b1aa6780b0310eceb9e776 F src/journal.c 807bed7a158979ac8d63953e1774e8d85bff65e2 F src/legacy.c cb1939fdeb91ea88fb44fbd2768a10e14bc44650 F src/limits.h 71ab25f17e35e0a9f3f6f234b8ed49cc56731d35 -F src/loadext.c d17a0f760d6866aacf5262f97d8efaaad379cdd7 -F src/main.c 75314b1c347cf343ac9212e3d108bf558bfddd17 +F src/loadext.c eceaebcff9807519ed9494056648d0d879f93ed3 +F src/main.c 4f2a8a889e65d359fca0a032536438f587f79f25 F src/malloc.c 60e392a4c12c839517f9b0db7b995f825444fb35 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217 F src/mem1.c 62a821702d3292809ca78e7c55c3ca04b05a3757 @@ -118,7 +118,7 @@ F src/mutex_unix.c a6e111947a3cdaa2cda394ed060d7f496fcb4af8 F src/mutex_w32.c 6e197765f283815496193e78e9548b5d0e53b68e F src/os.c 2f2753b8d33f79d169c43d6bb0b25b3c58fd33de F src/os.h d04706d54a072c7a30ab9e346ad916ef28c842d5 -F src/os_common.h 98862f120ca6bf7a48ce8b16f158b77d00bc9d2f +F src/os_common.h a66179e3b9a2686ba0f17a26d065d3e29202b7b8 F src/os_os2.c 10b23539e0050bdfc9f136242086a5c18c70c6f8 F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c @@ -131,21 +131,21 @@ F src/pager.c d09885bb88e9868a5c322a0181d4022cf294d98b F src/pager.h 8174615ffd14ccc2cad2b081b919a398fa95e3f9 F src/parse.y 00f2698c8ae84f315be5e3f10b63c94f531fdd6d F src/pragma.c e3f39f8576234887ecd0c1de43dc51af5855930c -F src/prepare.c 98c763fb124769473c6dc1622803db2d45fbff4e +F src/prepare.c ead778d792ea09d5b990e460a14bddae150b2a39 F src/printf.c eb27822ba2eec669161409ca31279a24c26ac910 F src/random.c 02ef38b469237482f1ea14a78b2087cfbaec48bd -F src/select.c aef06a4b157cc7defe8f99255f9a13cf693c8f13 +F src/select.c d0a1e01a2a6c05bd60324e843c7e4581d3605950 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96 -F src/shell.c c1ef4eb7872afb7417e52d6ec3f2d15be90cba8a +F src/shell.c 22297fffa6f00a6c6d44020fa13b1184a1bb372d F src/sqlite.h.in b8158aa606f0b39426d63132ae0530d91c021abb F src/sqlite3ext.h 50c70a894ffe8e6ada5948c89b91db0a80a6b2a7 -F src/sqliteInt.h 073801285d2650b22033a20c2389241c5e0361d6 +F src/sqliteInt.h f3c82850bc70531e5a01f915f85954dcf0d5db27 F src/sqliteLimit.h ee4430f88f69bf63527967bb35ca52af7b0ccb1e F src/table.c 46ccf9b7892a86f57420ae7bac69ecd5e72d26b5 F src/tclsqlite.c d95e0e74c7167b2807f9f4f73bf45f7c58096297 -F src/test1.c 88d409c4cfdc0740936ed29dbe1e3354a724a59b +F src/test1.c c3d43a6bd299f3c115f6617af6715004819ca5cb F src/test2.c 355d5693ca3ee705548fa7f795592a37b2372b70 -F src/test3.c 4557ee13c6e5921eb28979ff77cdbd913bfde6be +F src/test3.c 5c7452038ab27aa698070799b10132f26cdd2a80 F src/test4.c c2c0f5dc907f1346f5d4b65eb5799f11eb9e4071 F src/test5.c 3a6a5717a149d7ca2e6d14f5be72cf7555d54dc4 F src/test6.c f8b34a6ff04937092327798ddf0ab46863535bc5 @@ -176,12 +176,12 @@ F src/vdbe.c a172f5134d19ae910134e28987bf7906523c9b6f F src/vdbe.h 58a7d931ffb704e034b2a725981cfa5bd406fad9 F src/vdbeInt.h 76c81d057a39813de0fda3cad1498655d53ec69d F src/vdbeapi.c cf9fc963efae3cdf5de08e2a9718b487059c7fc5 -F src/vdbeaux.c bf20bbb4ac744eb716d66786593dc7b269502dca +F src/vdbeaux.c 376b9926a43866f426e515cfa8f0ca77928e1830 F src/vdbeblob.c 63c750acc7b5012479f508c0e9627372a82cb65d F src/vdbefifo.c a30c237b2a3577e1415fb6e288cbb6b8ed1e5736 F src/vdbemem.c 2d87d65430519dfb2103498b76bf15e4038b12b0 F src/vtab.c dc8947c9c79780b19ee6d6bae4ea624a2a303353 -F src/where.c f899a98f9823b965730d94b1c7c425f9ba914c12 +F src/where.c c5eaca1f2d9caa20c5c7096434ccde2be03b325c F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/all.test d12210212bada2bde6d5aeb90969b86c1aa977d2 @@ -551,7 +551,7 @@ F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8 F tool/memleak3.tcl 7707006ee908cffff210c98158788d85bb3fcdbf F tool/mkkeywordhash.c ef93810fc41fb3d3dbacf9a33a29be88ea99ffa9 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x -F tool/mksqlite3c.tcl a50378947f5bdad7b2d2d08960a0c7c52b7c47c1 +F tool/mksqlite3c.tcl 81561092633403228c3fdbf04a995ef08fdd9a8c F tool/mksqlite3internalh.tcl 47737a925fb02fce43e2c0a14b3cc17574a4d44a F tool/omittest.tcl 7d1fdf469e2f4d175f70c36e469db64a1626fabb F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c @@ -621,7 +621,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 89666f94906c0ad651a444800dcf8ac886fe0c22 -R e97d51235ba5646643ee97dc2217d740 -U drh -Z 9cd6c366577fcadd7704c59f2f60a3cb +P 39769f00c5d9ea20ad5d1c0569464529e953fa9d +R 989d1372e5046c9b4e9419504e12ed31 +U mlcreech +Z a5aa8288c3332a3814c7c41240628252 diff --git a/manifest.uuid b/manifest.uuid index da8d085e32..d9dcfe3106 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -39769f00c5d9ea20ad5d1c0569464529e953fa9d \ No newline at end of file +9c6694bb61a8ecdbfb2d05e5e05a8cc97b792240 \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 6b56cb4c6a..82085eb3af 100644 --- a/src/btree.c +++ b/src/btree.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.439 2008/02/19 14:59:35 drh Exp $ +** $Id: btree.c,v 1.440 2008/03/04 17:45:01 mlcreech Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. @@ -28,7 +28,7 @@ static const char zMagicHeader[] = SQLITE_FILE_HEADER; ** macro. */ #if SQLITE_TEST -int sqlite3_btree_trace=0; /* True to enable tracing */ +int sqlite3BtreeTrace=0; /* True to enable tracing */ #endif diff --git a/src/btreeInt.h b/src/btreeInt.h index 57924fcf13..90a5bdcb1b 100644 --- a/src/btreeInt.h +++ b/src/btreeInt.h @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btreeInt.h,v 1.16 2008/02/19 14:59:35 drh Exp $ +** $Id: btreeInt.h,v 1.17 2008/03/04 17:45:01 mlcreech Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to @@ -484,11 +484,11 @@ struct BtCursor { /* ** The TRACE macro will print high-level status information about the -** btree operation when the global variable sqlite3_btree_trace is +** btree operation when the global variable sqlite3BtreeTrace is ** enabled. */ #if SQLITE_TEST -# define TRACE(X) if( sqlite3_btree_trace ){ printf X; fflush(stdout); } +# define TRACE(X) if( sqlite3BtreeTrace ){ printf X; fflush(stdout); } #else # define TRACE(X) #endif diff --git a/src/loadext.c b/src/loadext.c index 8293486996..b18d317374 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -119,7 +119,7 @@ ** also check to make sure that the pointer to the function is ** not NULL before calling it. */ -const sqlite3_api_routines sqlite3_apis = { +const sqlite3_api_routines sqlite3Apis = { sqlite3_aggregate_context, sqlite3_aggregate_count, sqlite3_bind_blob, @@ -360,7 +360,7 @@ static int sqlite3LoadExtension( sqlite3OsDlClose(pVfs, handle); } return SQLITE_ERROR; - }else if( xInit(db, &zErrmsg, &sqlite3_apis) ){ + }else if( xInit(db, &zErrmsg, &sqlite3Apis) ){ if( pzErrMsg ){ *pzErrMsg = sqlite3_mprintf("error during initialization: %s", zErrmsg); } @@ -504,7 +504,7 @@ int sqlite3AutoLoadExtensions(sqlite3 *db){ autoext.aExt[i]; } sqlite3_mutex_leave(mutex); - if( xInit && xInit(db, &zErrmsg, &sqlite3_apis) ){ + if( xInit && xInit(db, &zErrmsg, &sqlite3Apis) ){ sqlite3Error(db, SQLITE_ERROR, "automatic extension loading failed: %s", zErrmsg); go = 0; diff --git a/src/main.c b/src/main.c index 2b6837340c..29526d3087 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.419 2008/02/21 02:09:45 drh Exp $ +** $Id: main.c,v 1.420 2008/03/04 17:45:01 mlcreech Exp $ */ #include "sqliteInt.h" #include @@ -36,7 +36,7 @@ int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } ** I/O active are written using this function. These messages ** are intended for debugging activity only. */ -void (*sqlite3_io_trace)(const char*, ...) = 0; +void (*sqlite3IoTrace)(const char*, ...) = 0; /* ** If the following global variable points to a string which is the diff --git a/src/os_common.h b/src/os_common.h index 8de4be9718..1efc61c53e 100644 --- a/src/os_common.h +++ b/src/os_common.h @@ -37,16 +37,16 @@ unsigned int sqlite3_pending_byte = 0x40000000; #endif #ifdef SQLITE_DEBUG -int sqlite3_os_trace = 0; -#define OSTRACE1(X) if( sqlite3_os_trace ) sqlite3DebugPrintf(X) -#define OSTRACE2(X,Y) if( sqlite3_os_trace ) sqlite3DebugPrintf(X,Y) -#define OSTRACE3(X,Y,Z) if( sqlite3_os_trace ) sqlite3DebugPrintf(X,Y,Z) -#define OSTRACE4(X,Y,Z,A) if( sqlite3_os_trace ) sqlite3DebugPrintf(X,Y,Z,A) -#define OSTRACE5(X,Y,Z,A,B) if( sqlite3_os_trace ) sqlite3DebugPrintf(X,Y,Z,A,B) +int sqlite3OSTrace = 0; +#define OSTRACE1(X) if( sqlite3OSTrace ) sqlite3DebugPrintf(X) +#define OSTRACE2(X,Y) if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y) +#define OSTRACE3(X,Y,Z) if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z) +#define OSTRACE4(X,Y,Z,A) if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A) +#define OSTRACE5(X,Y,Z,A,B) if( sqlite3OSTrace ) sqlite3DebugPrintf(X,Y,Z,A,B) #define OSTRACE6(X,Y,Z,A,B,C) \ - if(sqlite3_os_trace) sqlite3DebugPrintf(X,Y,Z,A,B,C) + if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C) #define OSTRACE7(X,Y,Z,A,B,C,D) \ - if(sqlite3_os_trace) sqlite3DebugPrintf(X,Y,Z,A,B,C,D) + if(sqlite3OSTrace) sqlite3DebugPrintf(X,Y,Z,A,B,C,D) #else #define OSTRACE1(X) #define OSTRACE2(X,Y) diff --git a/src/prepare.c b/src/prepare.c index 5a05591b6d..99ac90409a 100644 --- a/src/prepare.c +++ b/src/prepare.c @@ -13,7 +13,7 @@ ** interface, and routines that contribute to loading the database schema ** from disk. ** -** $Id: prepare.c,v 1.76 2008/03/03 18:47:28 drh Exp $ +** $Id: prepare.c,v 1.77 2008/03/04 17:45:01 mlcreech Exp $ */ #include "sqliteInt.h" #include @@ -491,7 +491,7 @@ int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){ /* ** Compile the UTF-8 encoded SQL statement zSql into a statement handle. */ -int sqlite3Prepare( +static int sqlite3Prepare( sqlite3 *db, /* Database handle. */ const char *zSql, /* UTF-8 encoded SQL statement. */ int nBytes, /* Length of zSql in bytes. */ diff --git a/src/select.c b/src/select.c index 856f1f057a..44803a5267 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.414 2008/02/15 14:33:04 drh Exp $ +** $Id: select.c,v 1.415 2008/03/04 17:45:01 mlcreech Exp $ */ #include "sqliteInt.h" @@ -3612,7 +3612,7 @@ select_end: ** code base. Then are intended to be called from within the debugger ** or from temporary "printf" statements inserted for debugging. */ -void sqlite3PrintExpr(Expr *p){ +static void sqlite3PrintExpr(Expr *p){ if( p->token.z && p->token.n>0 ){ sqlite3DebugPrintf("(%.*s", p->token.n, p->token.z); }else{ @@ -3628,7 +3628,7 @@ void sqlite3PrintExpr(Expr *p){ } sqlite3DebugPrintf(")"); } -void sqlite3PrintExprList(ExprList *pList){ +static void sqlite3PrintExprList(ExprList *pList){ int i; for(i=0; inExpr; i++){ sqlite3PrintExpr(pList->a[i].pExpr); @@ -3637,7 +3637,7 @@ void sqlite3PrintExprList(ExprList *pList){ } } } -void sqlite3PrintSelect(Select *p, int indent){ +static void sqlite3PrintSelect(Select *p, int indent){ sqlite3DebugPrintf("%*sSELECT(%p) ", indent, "", p); sqlite3PrintExprList(p->pEList); sqlite3DebugPrintf("\n"); diff --git a/src/shell.c b/src/shell.c index a72cf3ac2f..467917960d 100644 --- a/src/shell.c +++ b/src/shell.c @@ -12,7 +12,7 @@ ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. ** -** $Id: shell.c,v 1.175 2008/02/15 17:38:06 drh Exp $ +** $Id: shell.c,v 1.176 2008/03/04 17:45:01 mlcreech Exp $ */ #include #include @@ -1311,21 +1311,21 @@ static int do_meta_command(char *zLine, struct callback_data *p){ #ifdef SQLITE_ENABLE_IOTRACE if( c=='i' && strncmp(azArg[0], "iotrace", n)==0 ){ - extern void (*sqlite3_io_trace)(const char*, ...); + extern void (*sqlite3IoTrace)(const char*, ...); if( iotrace && iotrace!=stdout ) fclose(iotrace); iotrace = 0; if( nArg<2 ){ - sqlite3_io_trace = 0; + sqlite3IoTrace = 0; }else if( strcmp(azArg[1], "-")==0 ){ - sqlite3_io_trace = iotracePrintf; + sqlite3IoTrace = iotracePrintf; iotrace = stdout; }else{ iotrace = fopen(azArg[1], "w"); if( iotrace==0 ){ fprintf(stderr, "cannot open \"%s\"\n", azArg[1]); - sqlite3_io_trace = 0; + sqlite3IoTrace = 0; }else{ - sqlite3_io_trace = iotracePrintf; + sqlite3IoTrace = iotracePrintf; } } }else diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 3de750c36d..7afec6704a 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.664 2008/02/18 22:24:58 drh Exp $ +** @(#) $Id: sqliteInt.h,v 1.665 2008/03/04 17:45:01 mlcreech Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -2118,16 +2118,16 @@ void sqlite3Put4byte(u8*, u32); /* ** If the SQLITE_ENABLE IOTRACE exists then the global variable -** sqlite3_io_trace is a pointer to a printf-like routine used to +** sqlite3IoTrace is a pointer to a printf-like routine used to ** print I/O tracing messages. */ #ifdef SQLITE_ENABLE_IOTRACE -# define IOTRACE(A) if( sqlite3_io_trace ){ sqlite3_io_trace A; } +# define IOTRACE(A) if( sqlite3IoTrace ){ sqlite3IoTrace A; } void sqlite3VdbeIOTraceSql(Vdbe*); #else # define IOTRACE(A) # define sqlite3VdbeIOTraceSql(X) #endif -SQLITE_EXTERN void (*sqlite3_io_trace)(const char*,...); +SQLITE_EXTERN void (*sqlite3IoTrace)(const char*,...); #endif diff --git a/src/test1.c b/src/test1.c index 4b7b045104..d531891d16 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.291 2008/02/21 02:09:45 drh Exp $ +** $Id: test1.c,v 1.292 2008/03/04 17:45:02 mlcreech Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -257,7 +257,7 @@ static int test_io_trace( fclose(iotrace_file); } iotrace_file = 0; - sqlite3_io_trace = 0; + sqlite3IoTrace = 0; } if( argv[1][0] ){ if( strcmp(argv[1],"stdout")==0 ){ @@ -267,7 +267,7 @@ static int test_io_trace( }else{ iotrace_file = fopen(argv[1], "w"); } - sqlite3_io_trace = io_trace_callback; + sqlite3IoTrace = io_trace_callback; } return SQLITE_OK; } @@ -4412,7 +4412,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ { "sqlite3_stack_used", (Tcl_CmdProc*)test_stack_used }, { "sqlite3_busy_timeout", (Tcl_CmdProc*)test_busy_timeout }, { "printf", (Tcl_CmdProc*)test_printf }, - { "sqlite3_io_trace", (Tcl_CmdProc*)test_io_trace }, + { "sqlite3IoTrace", (Tcl_CmdProc*)test_io_trace }, }; static struct { char *zName; @@ -4550,9 +4550,9 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ extern int sqlite3_os_type; #endif #ifdef SQLITE_DEBUG - extern int sqlite3_where_trace; - extern int sqlite3_os_trace; - extern int sqlite3_vdbe_addop_trace; + extern int sqlite3WhereTrace; + extern int sqlite3OSTrace; + extern int sqlite3VdbeAddopTrace; #endif #ifdef SQLITE_TEST extern int sqlite3_enable_in_opt; @@ -4613,11 +4613,11 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ #endif #ifdef SQLITE_DEBUG Tcl_LinkVar(interp, "sqlite_addop_trace", - (char*)&sqlite3_vdbe_addop_trace, TCL_LINK_INT); + (char*)&sqlite3VdbeAddopTrace, TCL_LINK_INT); Tcl_LinkVar(interp, "sqlite_where_trace", - (char*)&sqlite3_where_trace, TCL_LINK_INT); + (char*)&sqlite3WhereTrace, TCL_LINK_INT); Tcl_LinkVar(interp, "sqlite_os_trace", - (char*)&sqlite3_os_trace, TCL_LINK_INT); + (char*)&sqlite3OSTrace, TCL_LINK_INT); #endif #ifndef SQLITE_OMIT_DISKIO Tcl_LinkVar(interp, "sqlite_opentemp_count", diff --git a/src/test3.c b/src/test3.c index c7121d165a..f578e2607d 100644 --- a/src/test3.c +++ b/src/test3.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test3.c,v 1.90 2008/02/02 20:47:38 drh Exp $ +** $Id: test3.c,v 1.91 2008/03/04 17:45:02 mlcreech Exp $ */ #include "sqliteInt.h" #include "btreeInt.h" @@ -1605,7 +1605,7 @@ static int btree_set_cache_size( ** Register commands with the TCL interpreter. */ int Sqlitetest3_Init(Tcl_Interp *interp){ - extern int sqlite3_btree_trace; + extern int sqlite3BtreeTrace; static struct { char *zName; Tcl_CmdProc *xProc; @@ -1656,7 +1656,7 @@ int Sqlitetest3_Init(Tcl_Interp *interp){ for(i=0; ip4type = P4_NOTUSED; p->expired = 0; #ifdef SQLITE_DEBUG - if( sqlite3_vdbe_addop_trace ) sqlite3VdbePrintOp(0, i, &p->aOp[i]); + if( sqlite3VdbeAddopTrace ) sqlite3VdbePrintOp(0, i, &p->aOp[i]); #endif return i; } @@ -360,7 +360,7 @@ int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp){ pOut->p4.p = 0; pOut->p5 = 0; #ifdef SQLITE_DEBUG - if( sqlite3_vdbe_addop_trace ){ + if( sqlite3VdbeAddopTrace ){ sqlite3VdbePrintOp(0, i+addr, &p->aOp[i+addr]); } #endif @@ -899,7 +899,7 @@ void sqlite3VdbePrintSql(Vdbe *p){ void sqlite3VdbeIOTraceSql(Vdbe *p){ int nOp = p->nOp; VdbeOp *pOp; - if( sqlite3_io_trace==0 ) return; + if( sqlite3IoTrace==0 ) return; if( nOp<1 ) return; pOp = &p->aOp[0]; if( pOp->opcode==OP_Trace && pOp->p4.z!=0 ){ @@ -917,7 +917,7 @@ void sqlite3VdbeIOTraceSql(Vdbe *p){ } } z[j] = 0; - sqlite3_io_trace("SQL %s\n", z); + sqlite3IoTrace("SQL %s\n", z); } } #endif /* !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE */ diff --git a/src/where.c b/src/where.c index 0c222204c5..f97f902eac 100644 --- a/src/where.c +++ b/src/where.c @@ -16,7 +16,7 @@ ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** -** $Id: where.c,v 1.287 2008/02/23 21:55:40 drh Exp $ +** $Id: where.c,v 1.288 2008/03/04 17:45:02 mlcreech Exp $ */ #include "sqliteInt.h" @@ -29,8 +29,8 @@ ** Trace output macros */ #if defined(SQLITE_TEST) || defined(SQLITE_DEBUG) -int sqlite3_where_trace = 0; -# define WHERETRACE(X) if(sqlite3_where_trace) sqlite3DebugPrintf X +int sqlite3WhereTrace = 0; +# define WHERETRACE(X) if(sqlite3WhereTrace) sqlite3DebugPrintf X #else # define WHERETRACE(X) #endif @@ -1176,7 +1176,7 @@ static double estLog(double N){ #if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_DEBUG) static void TRACE_IDX_INPUTS(sqlite3_index_info *p){ int i; - if( !sqlite3_where_trace ) return; + if( !sqlite3WhereTrace ) return; for(i=0; inConstraint; i++){ sqlite3DebugPrintf(" constraint[%d]: col=%d termid=%d op=%d usabled=%d\n", i, @@ -1194,7 +1194,7 @@ static void TRACE_IDX_INPUTS(sqlite3_index_info *p){ } static void TRACE_IDX_OUTPUTS(sqlite3_index_info *p){ int i; - if( !sqlite3_where_trace ) return; + if( !sqlite3WhereTrace ) return; for(i=0; inConstraint; i++){ sqlite3DebugPrintf(" usage[%d]: argvIdx=%d omit=%d\n", i, diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index 81ddd35a08..314c011f51 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -180,8 +180,9 @@ proc copy_file {filename} { } else { puts $out $line } - } elseif {[regexp {^void \(\*sqlite3_io_trace\)} $line]} { - puts $out "SQLITE_API $line" + } elseif {[regexp {^(SQLITE_EXTERN )?void \(\*sqlite3IoTrace\)} $line]} { + regsub {^SQLITE_EXTERN } $line {} line + puts $out "SQLITE_PRIVATE $line" } else { puts $out $line }