Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Make sure that sqlite3_strglob() is available and use it: Less code duplication |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
7829abd8935f2ccf51f95cc512d38ffa |
| User & Date: | jan.nijtmans 2014-01-21 21:42:29.996 |
Context
|
2014-01-22
| ||
| 18:19 | Update the built-in SQLite to a version that supports ORDER BY and LIMIT on WITH RECURSIVE queries (but omits support for the non-standard LEVEL pseudo-column). Rewrite the recursive query that computes ancestors to using ORDER BY and LIMIT and omit the use of LEVEL. ... (check-in: af990795fc user: drh tags: trunk) | |
|
2014-01-21
| ||
| 21:42 | Make sure that sqlite3_strglob() is available and use it: Less code duplication ... (check-in: 7829abd893 user: jan.nijtmans tags: trunk) | |
| 17:43 | merged in rss-cli. ... (check-in: 4d91004271 user: stephan tags: trunk) | |
|
2014-01-07
| ||
| 08:25 | merge trunk ... (Closed-Leaf check-in: f52089d95e user: jan.nijtmans tags: sqlite-min-to-3.7.17) | |
Changes
Changes to auto.def.
| ︙ | ︙ | |||
39 40 41 42 43 44 45 |
# search for the system SQLite once with -ldl, and once without. If
# the library can only be found with $extralibs set to -ldl, then
# the code below will append -ldl to LIBS.
#
foreach extralibs {{} {-ldl}} {
# Locate the system SQLite by searching for sqlite3_open(). Then check
| | | | | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# search for the system SQLite once with -ldl, and once without. If
# the library can only be found with $extralibs set to -ldl, then
# the code below will append -ldl to LIBS.
#
foreach extralibs {{} {-ldl}} {
# Locate the system SQLite by searching for sqlite3_open(). Then check
# if sqlite3_strglob() can be found as well. If we can find open() but
# not strglob(), then the system SQLite is too old to link against
# fossil.
#
if {[cc-check-function-in-lib sqlite3_open sqlite3 $extralibs]} {
if {![cc-check-function-in-lib sqlite3_strglob sqlite3 $extralibs]} {
user-error "system sqlite3 too old (require >= 3.7.17)"
}
# Success. Update symbols and return.
#
define USE_SYSTEM_SQLITE 1
define-append LIBS $extralibs
return
|
| ︙ | ︙ |
Changes to src/glob.c.
| ︙ | ︙ | |||
152 153 154 155 156 157 158 |
**
** [...] Matches one character from the enclosed list of
** characters.
**
** [^...] Matches one character not in the enclosed list.
*/
int strglob(const char *zGlob, const char *z){
| < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
**
** [...] Matches one character from the enclosed list of
** characters.
**
** [^...] Matches one character not in the enclosed list.
*/
int strglob(const char *zGlob, const char *z){
return sqlite3_strglob(zGlob, z)==0;
}
/*
** Return true (non-zero) if zString matches any of the patterns in
** the Glob. The value returned is actually a 1-based index of the pattern
** that matched. Return 0 if none of the patterns match zString.
**
** A NULL glob matches nothing.
*/
int glob_match(Glob *pGlob, const char *zString){
int i;
if( pGlob==0 ) return 0;
for(i=0; i<pGlob->nPattern; i++){
if( sqlite3_strglob(pGlob->azPattern[i], zString)==0 ) return i+1;
}
return 0;
}
/*
** Free all memory associated with the given Glob object
*/
|
| ︙ | ︙ |