Revise the amalgamation so that all symbols have file scope except those

that begin with "sqlite3_".  Ticket #2554. (CVS 4197)

FossilOrigin-Name: 73db545289a1a99bd48b22895d2a3ee86540f107
This commit is contained in:
drh 2007-08-07 17:04:59 +00:00
parent e6e4d6bb1a
commit 0a0e131c7e
6 changed files with 36 additions and 23 deletions

View File

@ -1,5 +1,5 @@
C Fix\ssome\scompiler\swarnings.\s(CVS\s4196)
D 2007-08-05T23:52:05
C Revise\sthe\samalgamation\sso\sthat\sall\ssymbols\shave\sfile\sscope\sexcept\sthose\nthat\sbegin\swith\s"sqlite3_".\s\sTicket\s#2554.\s(CVS\s4197)
D 2007-08-07T17:04:59
F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -77,7 +77,7 @@ F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675
F src/date.c 6049db7d5a8fdf2c677ff7d58fa31d4f6593c988
F src/delete.c 5c0d89b3ef7d48fe1f5124bfe8341f982747fe29
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
F src/expr.c d39d87cf15da59ab87028278d92e3e3064d54605
F src/expr.c ef4af51136d98c74abf4ff17c2999a7d36519db9
F src/func.c 28daebcddce30030f167afb3a7ed881a043b98b0
F src/hash.c 67b23e14f0257b69a3e8aa663e4eeadc1a2b6fd5
F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
@ -111,7 +111,7 @@ F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
F src/shell.c ac29402b538515fa4697282387be9c1205e6e9eb
F src/sqlite.h.in 8164526b1658a6dad472953ea91239849f913d45
F src/sqlite3ext.h a27bedc222df5e5f0f458ac99726d0483b953a91
F src/sqliteInt.h 74ada10135dcfa78d86dd8707968fc5500665909
F src/sqliteInt.h b31440f39ce978f2397209e0c99653d0b6f235cb
F src/sqliteLimit.h f14609c27636ebc217c9603ade26dbdd7d0f6afa
F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d
F src/tclsqlite.c 0d3370e01cd3b313ed29ed6b0ba00423b4329de0
@ -137,7 +137,7 @@ F src/test_tclvar.c ea4500a60d663f7fdf18fd3210efc112e0c6e7f0
F src/tokenize.c e959754c67bbd0cf0b03520f7344a536a7ac2915
F src/trigger.c 420192efe3e6f03addf7897c60c3c8bf913d3493
F src/update.c 6b10becb6235ea314ed245fbfbf8b38755e3166e
F src/utf.c c152f99ddccc5e0214a9817aa07ab1b208b43f14
F src/utf.c 68873142d65d686e59af4886073c0a67a1230171
F src/util.c 9e81d417fc60bd2fe156f8f2317aa4845bc6cc90
F src/vacuum.c 8bd895d29e7074e78d4e80f948e35ddc9cf2beef
F src/vdbe.c cf973bd1af5fbda845b0f759bb06eb19ff42e215
@ -454,7 +454,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 5d8ed832629acd4f75d088dd0c647dc12c48b1b0
F tool/mksqlite3c.tcl d7b03011caa20dc685c67b2eae1eda523e85d571
F tool/mksqlite3internalh.tcl 47737a925fb02fce43e2c0a14b3cc17574a4d44a
F tool/omittest.tcl e6b3d6a1285f9813bc1dea53bb522b4b72774710
F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
@ -523,7 +523,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P e526817f158883f617720fd389741a29454ad483
R 120f8d4073349b0dabe5d1dc028d9275
P 6cc15409ad6baefbe6e2214a4ac1cb3a0433f922
R 6e0675c36cb06d5dc2c18a2cd081b84f
U drh
Z d9ed6baaa0c4fdc93345dbb1dbea7133
Z 192cea5741a9a7e1a096dd8a55907dd3

View File

@ -1 +1 @@
6cc15409ad6baefbe6e2214a4ac1cb3a0433f922
73db545289a1a99bd48b22895d2a3ee86540f107

View File

@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.301 2007/07/23 22:51:15 drh Exp $
** $Id: expr.c,v 1.302 2007/08/07 17:04:59 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -177,7 +177,7 @@ static int binaryCompareP1(Expr *pExpr1, Expr *pExpr2, int jumpIfNull){
** Argument pRight (but not pLeft) may be a null pointer. In this case,
** it is not considered.
*/
CollSeq* sqlite3BinaryCompareCollSeq(
CollSeq *sqlite3BinaryCompareCollSeq(
Parse *pParse,
Expr *pLeft,
Expr *pRight

View File

@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.581 2007/08/05 23:52:05 drh Exp $
** @(#) $Id: sqliteInt.h,v 1.582 2007/08/07 17:04:59 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@ -1922,7 +1922,7 @@ FuncDef *sqlite3VtabOverloadFunction(FuncDef*, int nArg, Expr*);
void sqlite3InvalidFunction(sqlite3_context*,int,sqlite3_value**);
int sqlite3Reprepare(Vdbe*);
void sqlite3ExprListCheckLength(Parse*, ExprList*, int, const char*);
CollSeq* sqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);
CollSeq *sqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);
#if SQLITE_MAX_EXPR_DEPTH>0
void sqlite3ExprSetHeight(Expr *);

View File

@ -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.52 2007/07/23 19:12:42 drh Exp $
** $Id: utf.c,v 1.53 2007/08/07 17:04:59 drh Exp $
**
** Notes on UTF-8:
**
@ -49,7 +49,7 @@ const int sqlite3one = 1;
** This lookup table is used to help decode the first byte of
** a multi-byte UTF8 character.
*/
const unsigned char sqlite3UtfTrans1[] = {
static const unsigned char sqlite3UtfTrans1[] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,

View File

@ -129,6 +129,7 @@ proc copy_file {filename} {
set tail [file tail $filename]
section_comment "Begin file $tail"
set in [open $filename r]
set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+ \*?(sqlite3[a-zA-Z0-9]+)([[;]| =)}
if {[file extension $filename]==".h"} {
set declpattern {^ *[a-zA-Z][a-zA-Z_0-9 ]+ \*?(sqlite3[_A-Z][a-zA-Z0-9]+)\(}
} else {
@ -154,14 +155,26 @@ proc copy_file {filename} {
puts $out "#if 0"
} elseif {[regexp {^#line} $line]} {
# Skip #line directives.
} elseif {$addstatic && [regexp $declpattern $line all funcname]
&& ![regexp {^static} $line]} {
# Add the SQLITE_PRIVATE or SQLITE_API keyword before functions.
# so that linkage can be modified at compile-time.
if {[regexp {^sqlite3_} $funcname]} {
puts $out "SQLITE_API $line"
} elseif {$addstatic && ![regexp {^static} $line]} {
if {[regexp $declpattern $line all funcname]} {
# Add the SQLITE_PRIVATE or SQLITE_API keyword before functions.
# so that linkage can be modified at compile-time.
if {[regexp {^sqlite3_} $funcname]} {
puts $out "SQLITE_API $line"
} else {
puts $out "SQLITE_PRIVATE $line"
}
} elseif {[regexp $varpattern $line all varname]} {
# Add the SQLITE_PRIVATE before variable declarations or
# definitions for internal use
if {![regexp {^sqlite3_} $varname]} {
regsub {^extern } $line {} line
puts $out "SQLITE_PRIVATE $line"
} else {
puts $out $line
}
} else {
puts $out "SQLITE_PRIVATE $line"
puts $out $line
}
} else {
puts $out $line