From 0d6e29b832d35005d3b49e9caea07871296f2445 Mon Sep 17 00:00:00 2001 From: shess Date: Tue, 10 Oct 2006 23:22:40 +0000 Subject: [PATCH] Fix leaky symbols. With this change, fts1 and fts2 can both be statically linked. (CVS 3472) FossilOrigin-Name: 5e8bbb85c1493e3ab2d807d24c68294f26838e49 --- ext/fts1/fts1.c | 17 +++++++++-------- ext/fts1/fts1_porter.c | 2 +- ext/fts2/fts2.c | 17 +++++++++-------- ext/fts2/fts2_porter.c | 2 +- manifest | 18 +++++++++--------- manifest.uuid | 2 +- 6 files changed, 30 insertions(+), 28 deletions(-) diff --git a/ext/fts1/fts1.c b/ext/fts1/fts1.c index b4cac85d9a..b758265d1d 100644 --- a/ext/fts1/fts1.c +++ b/ext/fts1/fts1.c @@ -50,14 +50,14 @@ typedef struct StringBuffer { char *s; /* Content of the string */ } StringBuffer; -void initStringBuffer(StringBuffer *sb){ +static void initStringBuffer(StringBuffer *sb){ sb->len = 0; sb->alloced = 100; sb->s = malloc(100); sb->s[0] = '\0'; } -void nappend(StringBuffer *sb, const char *zFrom, int nFrom){ +static void nappend(StringBuffer *sb, const char *zFrom, int nFrom){ if( sb->len + nFrom >= sb->alloced ){ sb->alloced = sb->len + nFrom + 100; sb->s = realloc(sb->s, sb->alloced+1); @@ -70,7 +70,7 @@ void nappend(StringBuffer *sb, const char *zFrom, int nFrom){ sb->len += nFrom; sb->s[sb->len] = 0; } -void append(StringBuffer *sb, const char *zFrom){ +static void append(StringBuffer *sb, const char *zFrom){ nappend(sb, zFrom, strlen(zFrom)); } @@ -1242,7 +1242,7 @@ static int content_update(fulltext_vtab *v, sqlite3_value **pValues, return sql_single_step_statement(v, CONTENT_UPDATE_STMT, &s); } -void freeStringArray(int nString, const char **pString){ +static void freeStringArray(int nString, const char **pString){ int i; for (i=0 ; i < nString ; ++i) { @@ -1634,7 +1634,7 @@ static char **tokenizeString(const char *z, int *pnToken){ ** [pqr] becomes pqr ** `mno` becomes mno */ -void dequoteString(char *z){ +static void dequoteString(char *z){ int quote; int i, j; if( z==0 ) return; @@ -1676,7 +1676,7 @@ void dequoteString(char *z){ ** input: delimiters ( '[' , ']' , '...' ) ** output: [ ] ... */ -void tokenListToIdList(char **azIn){ +static void tokenListToIdList(char **azIn){ int i, j; if( azIn ){ for(i=0, j=-1; azIn[i]; i++){ @@ -1753,7 +1753,7 @@ typedef struct TableSpec { /* ** Reclaim all of the memory used by a TableSpec */ -void clearTableSpec(TableSpec *p) { +static void clearTableSpec(TableSpec *p) { free(p->azColumn); free(p->azContentColumn); free(p->azTokenizer); @@ -1767,7 +1767,8 @@ void clearTableSpec(TableSpec *p) { * We return parsed information in a TableSpec structure. * */ -int parseSpec(TableSpec *pSpec, int argc, const char *const*argv, char**pzErr){ +static int parseSpec(TableSpec *pSpec, int argc, const char *const*argv, + char**pzErr){ int i, j, n; char *z, *zDummy; char **azArg; diff --git a/ext/fts1/fts1_porter.c b/ext/fts1/fts1_porter.c index c5bc7bd6b1..a581ae8220 100644 --- a/ext/fts1/fts1_porter.c +++ b/ext/fts1/fts1_porter.c @@ -563,7 +563,7 @@ static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){ ** part of a token. In other words, delimiters all must have ** values of 0x7f or lower. */ -const char isIdChar[] = { +static const char isIdChar[] = { /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 3x */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 4x */ diff --git a/ext/fts2/fts2.c b/ext/fts2/fts2.c index e3fb5b3daa..7c01cd2263 100644 --- a/ext/fts2/fts2.c +++ b/ext/fts2/fts2.c @@ -50,14 +50,14 @@ typedef struct StringBuffer { char *s; /* Content of the string */ } StringBuffer; -void initStringBuffer(StringBuffer *sb){ +static void initStringBuffer(StringBuffer *sb){ sb->len = 0; sb->alloced = 100; sb->s = malloc(100); sb->s[0] = '\0'; } -void nappend(StringBuffer *sb, const char *zFrom, int nFrom){ +static void nappend(StringBuffer *sb, const char *zFrom, int nFrom){ if( sb->len + nFrom >= sb->alloced ){ sb->alloced = sb->len + nFrom + 100; sb->s = realloc(sb->s, sb->alloced+1); @@ -70,7 +70,7 @@ void nappend(StringBuffer *sb, const char *zFrom, int nFrom){ sb->len += nFrom; sb->s[sb->len] = 0; } -void append(StringBuffer *sb, const char *zFrom){ +static void append(StringBuffer *sb, const char *zFrom){ nappend(sb, zFrom, strlen(zFrom)); } @@ -1242,7 +1242,7 @@ static int content_update(fulltext_vtab *v, sqlite3_value **pValues, return sql_single_step_statement(v, CONTENT_UPDATE_STMT, &s); } -void freeStringArray(int nString, const char **pString){ +static void freeStringArray(int nString, const char **pString){ int i; for (i=0 ; i < nString ; ++i) { @@ -1634,7 +1634,7 @@ static char **tokenizeString(const char *z, int *pnToken){ ** [pqr] becomes pqr ** `mno` becomes mno */ -void dequoteString(char *z){ +static void dequoteString(char *z){ int quote; int i, j; if( z==0 ) return; @@ -1676,7 +1676,7 @@ void dequoteString(char *z){ ** input: delimiters ( '[' , ']' , '...' ) ** output: [ ] ... */ -void tokenListToIdList(char **azIn){ +static void tokenListToIdList(char **azIn){ int i, j; if( azIn ){ for(i=0, j=-1; azIn[i]; i++){ @@ -1753,7 +1753,7 @@ typedef struct TableSpec { /* ** Reclaim all of the memory used by a TableSpec */ -void clearTableSpec(TableSpec *p) { +static void clearTableSpec(TableSpec *p) { free(p->azColumn); free(p->azContentColumn); free(p->azTokenizer); @@ -1767,7 +1767,8 @@ void clearTableSpec(TableSpec *p) { * We return parsed information in a TableSpec structure. * */ -int parseSpec(TableSpec *pSpec, int argc, const char *const*argv, char**pzErr){ +static int parseSpec(TableSpec *pSpec, int argc, const char *const*argv, + char**pzErr){ int i, j, n; char *z, *zDummy; char **azArg; diff --git a/ext/fts2/fts2_porter.c b/ext/fts2/fts2_porter.c index 2372b966bb..66d003367b 100644 --- a/ext/fts2/fts2_porter.c +++ b/ext/fts2/fts2_porter.c @@ -563,7 +563,7 @@ static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){ ** part of a token. In other words, delimiters all must have ** values of 0x7f or lower. */ -const char isIdChar[] = { +static const char isIdChar[] = { /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 3x */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 4x */ diff --git a/manifest b/manifest index e5c91e8b82..910d34e310 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Copy\sfts1/\sto\sfts2/,\schanging\sreference\sfrom\sfts1\sto\sfts2.\s\sFor\sfuture\nreference,\sthe\ssource\sversions\scopied\swere:\n\nREADME.txt\sr1.1\nfts1.c\sr1.37\nfts1.h\sr1.2\nfts1_hash.c\sr1.1\nfts1_hash.h\sr1.1\nfts1_porter.c\sr1.1\nfts1_tokenizer.h\sr1.4\nfts1_tokenizer1.c\sr1.6\s(CVS\s3471) -D 2006-10-10T17:37:14 +C Fix\sleaky\ssymbols.\s\sWith\sthis\schange,\sfts1\sand\sfts2\scan\sboth\sbe\nstatically\slinked.\s(CVS\s3472) +D 2006-10-10T23:22:41 F Makefile.in 4379c909d46b38b8c5db3533084601621d4f14b2 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -21,11 +21,11 @@ F ext/README.txt 913a7bd3f4837ab14d7e063304181787658b14e1 F ext/fts1/README.txt 20ac73b006a70bcfd80069bdaf59214b6cf1db5e F ext/fts1/ft_hash.c 3927bd880e65329bdc6f506555b228b28924921b F ext/fts1/ft_hash.h 1a35e654a235c2c662d3ca0dfc3138ad60b8b7d5 -F ext/fts1/fts1.c fc8ce4713c32ec013eddba7fda9b661556bbe0c5 +F ext/fts1/fts1.c 10ab0ca252f71eb6bd855686b43e70b9fd105fb0 F ext/fts1/fts1.h 6060b8f62c1d925ea8356cb1a6598073eb9159a6 F ext/fts1/fts1_hash.c 3196cee866edbebb1c0521e21672e6d599965114 F ext/fts1/fts1_hash.h 957d378355ed29f672cd5add012ce8b088a5e089 -F ext/fts1/fts1_porter.c 18ec3c9f8e76598db135dbcc8692f1e5b0c1186b +F ext/fts1/fts1_porter.c 05cd59c0ffdfea8f3d8c78ee28b550c5e4d732ab F ext/fts1/fts1_tokenizer.h fdea722c38a9f82ed921642981234f666e47919c F ext/fts1/fts1_tokenizer1.c 98c2bb9f1feb97294256850bd84baac6799168b8 F ext/fts1/fulltext.c d935e600d87bc86b7d64f55c7520ea41d6034c5c @@ -33,11 +33,11 @@ F ext/fts1/fulltext.h 08525a47852d1d62a0be81d3fc3fe2d23b094efd F ext/fts1/simple_tokenizer.c 1844d72f7194c3fd3d7e4173053911bf0661b70d F ext/fts1/tokenizer.h 0c53421b832366d20d720d21ea3e1f6e66a36ef9 F ext/fts2/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d -F ext/fts2/fts2.c 1052f03493701fd11abdc904efd3190915091bfe +F ext/fts2/fts2.c ba2b9e96fe561268d91ab9be3d8670df053ec347 F ext/fts2/fts2.h bbdab26d34f91974d5b9ade8b7836c140a7c4ce1 F ext/fts2/fts2_hash.c b3f22116d4ef0bc8f2da6e3fdc435c86d0951a9b F ext/fts2/fts2_hash.h e283308156018329f042816eb09334df714e105e -F ext/fts2/fts2_porter.c 5602fce9579831a070356f8d1956705baf3f1279 +F ext/fts2/fts2_porter.c f9ea84b1f25226c819be3e59bd3e1e2640bcb109 F ext/fts2/fts2_tokenizer.h 4c5ffe31d63622869eb6eec1503df7f6996fd1bd F ext/fts2/fts2_tokenizer1.c b26f0d2fae967fbe5722f82d08506d35f10ac4e7 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 @@ -410,7 +410,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P b743429dd54e2dcae213ec1993e9e916a9ba678d -R 3877f9d9a9169301026353cdbbc79a36 +P d0d1e7cdcc1dd085f1e359ce35c441699d517b02 +R bb5d7ffc9ea0e3031b5ebad6ff92ccca U shess -Z b8a5c53e502283405abefca3dadf33fe +Z 402d261f0b21be9565ead2c74242015c diff --git a/manifest.uuid b/manifest.uuid index 108f8b98a1..e89d2af64a 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d0d1e7cdcc1dd085f1e359ce35c441699d517b02 \ No newline at end of file +5e8bbb85c1493e3ab2d807d24c68294f26838e49 \ No newline at end of file