Fossil SCM

Merge updates from trunk. Fix compiler warnings.

mistachkin 2016-01-28 20:54 baruch_timeline_fixes merge
Commit cfd3a5b944ea15f479ed3e7fee4e7fe54ac67a2c
--- src/checkin.c
+++ src/checkin.c
@@ -396,10 +396,12 @@
396396
if( zRev!=0 ){
397397
db_find_and_open_repository(0, 0);
398398
verify_all_options();
399399
ls_cmd_rev(zRev,verboseFlag,showAge,timeOrder);
400400
return;
401
+ }else if( find_option("R",0,1)!=0 ){
402
+ fossil_fatal("the -r is required in addition to -R");
401403
}
402404
403405
db_must_be_within_tree();
404406
vid = db_lget_int("checkout", 0);
405407
if( timeOrder ){
406408
--- src/checkin.c
+++ src/checkin.c
@@ -396,10 +396,12 @@
396 if( zRev!=0 ){
397 db_find_and_open_repository(0, 0);
398 verify_all_options();
399 ls_cmd_rev(zRev,verboseFlag,showAge,timeOrder);
400 return;
 
 
401 }
402
403 db_must_be_within_tree();
404 vid = db_lget_int("checkout", 0);
405 if( timeOrder ){
406
--- src/checkin.c
+++ src/checkin.c
@@ -396,10 +396,12 @@
396 if( zRev!=0 ){
397 db_find_and_open_repository(0, 0);
398 verify_all_options();
399 ls_cmd_rev(zRev,verboseFlag,showAge,timeOrder);
400 return;
401 }else if( find_option("R",0,1)!=0 ){
402 fossil_fatal("the -r is required in addition to -R");
403 }
404
405 db_must_be_within_tree();
406 vid = db_lget_int("checkout", 0);
407 if( timeOrder ){
408
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -617,11 +617,11 @@
617617
#### The directories where the OpenSSL include and library files are located.
618618
# The recommended usage here is to use the Sysinternals junction tool
619619
# to create a hard link between an "openssl-1.x" sub-directory of the
620620
# Fossil source code directory and the target OpenSSL source directory.
621621
#
622
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e
622
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f
623623
OPENSSLINCDIR = $(OPENSSLDIR)/include
624624
OPENSSLLIBDIR = $(OPENSSLDIR)
625625
626626
#### Either the directory where the Tcl library is installed or the Tcl
627627
# source code directory resides (depending on the value of the macro
@@ -1406,11 +1406,11 @@
14061406
!ifndef FOSSIL_ENABLE_WINXP
14071407
FOSSIL_ENABLE_WINXP = 0
14081408
!endif
14091409
14101410
!if $(FOSSIL_ENABLE_SSL)!=0
1411
-SSLDIR = $(B)\compat\openssl-1.0.2e
1411
+SSLDIR = $(B)\compat\openssl-1.0.2f
14121412
SSLINCDIR = $(SSLDIR)\inc32
14131413
!if $(FOSSIL_DYNAMIC_BUILD)!=0
14141414
SSLLIBDIR = $(SSLDIR)\out32dll
14151415
!else
14161416
SSLLIBDIR = $(SSLDIR)\out32
14171417
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -617,11 +617,11 @@
617 #### The directories where the OpenSSL include and library files are located.
618 # The recommended usage here is to use the Sysinternals junction tool
619 # to create a hard link between an "openssl-1.x" sub-directory of the
620 # Fossil source code directory and the target OpenSSL source directory.
621 #
622 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e
623 OPENSSLINCDIR = $(OPENSSLDIR)/include
624 OPENSSLLIBDIR = $(OPENSSLDIR)
625
626 #### Either the directory where the Tcl library is installed or the Tcl
627 # source code directory resides (depending on the value of the macro
@@ -1406,11 +1406,11 @@
1406 !ifndef FOSSIL_ENABLE_WINXP
1407 FOSSIL_ENABLE_WINXP = 0
1408 !endif
1409
1410 !if $(FOSSIL_ENABLE_SSL)!=0
1411 SSLDIR = $(B)\compat\openssl-1.0.2e
1412 SSLINCDIR = $(SSLDIR)\inc32
1413 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1414 SSLLIBDIR = $(SSLDIR)\out32dll
1415 !else
1416 SSLLIBDIR = $(SSLDIR)\out32
1417
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -617,11 +617,11 @@
617 #### The directories where the OpenSSL include and library files are located.
618 # The recommended usage here is to use the Sysinternals junction tool
619 # to create a hard link between an "openssl-1.x" sub-directory of the
620 # Fossil source code directory and the target OpenSSL source directory.
621 #
622 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f
623 OPENSSLINCDIR = $(OPENSSLDIR)/include
624 OPENSSLLIBDIR = $(OPENSSLDIR)
625
626 #### Either the directory where the Tcl library is installed or the Tcl
627 # source code directory resides (depending on the value of the macro
@@ -1406,11 +1406,11 @@
1406 !ifndef FOSSIL_ENABLE_WINXP
1407 FOSSIL_ENABLE_WINXP = 0
1408 !endif
1409
1410 !if $(FOSSIL_ENABLE_SSL)!=0
1411 SSLDIR = $(B)\compat\openssl-1.0.2f
1412 SSLINCDIR = $(SSLDIR)\inc32
1413 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1414 SSLLIBDIR = $(SSLDIR)\out32dll
1415 !else
1416 SSLLIBDIR = $(SSLDIR)\out32
1417
+1 -9
--- src/printf.c
+++ src/printf.c
@@ -232,19 +232,11 @@
232232
233233
/*
234234
** The root program. All variations call this core.
235235
**
236236
** INPUTS:
237
-** func This is a pointer to a function taking three arguments
238
-** 1. A pointer to anything. Same as the "arg" parameter.
239
-** 2. A pointer to the list of characters to be output
240
-** (Note, this list is NOT null terminated.)
241
-** 3. An integer number of characters to be output.
242
-** (Note: This number might be zero.)
243
-**
244
-** arg This is the pointer to anything which will be passed as the
245
-** first argument to "func". Use it for whatever you like.
237
+** pBlob This is the blob where the output will be built.
246238
**
247239
** fmt This is the format string, as in the usual print.
248240
**
249241
** ap This is a pointer to a list of arguments. Same as in
250242
** vfprint.
251243
--- src/printf.c
+++ src/printf.c
@@ -232,19 +232,11 @@
232
233 /*
234 ** The root program. All variations call this core.
235 **
236 ** INPUTS:
237 ** func This is a pointer to a function taking three arguments
238 ** 1. A pointer to anything. Same as the "arg" parameter.
239 ** 2. A pointer to the list of characters to be output
240 ** (Note, this list is NOT null terminated.)
241 ** 3. An integer number of characters to be output.
242 ** (Note: This number might be zero.)
243 **
244 ** arg This is the pointer to anything which will be passed as the
245 ** first argument to "func". Use it for whatever you like.
246 **
247 ** fmt This is the format string, as in the usual print.
248 **
249 ** ap This is a pointer to a list of arguments. Same as in
250 ** vfprint.
251
--- src/printf.c
+++ src/printf.c
@@ -232,19 +232,11 @@
232
233 /*
234 ** The root program. All variations call this core.
235 **
236 ** INPUTS:
237 ** pBlob This is the blob where the output will be built.
 
 
 
 
 
 
 
 
238 **
239 ** fmt This is the format string, as in the usual print.
240 **
241 ** ap This is a pointer to a list of arguments. Same as in
242 ** vfprint.
243
+36 -27
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -327,11 +327,11 @@
327327
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
328328
** [sqlite_version()] and [sqlite_source_id()].
329329
*/
330330
#define SQLITE_VERSION "3.11.0"
331331
#define SQLITE_VERSION_NUMBER 3011000
332
-#define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5"
332
+#define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1"
333333
334334
/*
335335
** CAPI3REF: Run-Time Library Version Numbers
336336
** KEYWORDS: sqlite3_version, sqlite3_sourceid
337337
**
@@ -13663,11 +13663,11 @@
1366313663
** each recursion. The boundary between these two regions is determined
1366413664
** using offsetof(Parse,nVar) so the nVar field must be the first field
1366513665
** in the recursive region.
1366613666
************************************************************************/
1366713667
13668
- int nVar; /* Number of '?' variables seen in the SQL so far */
13668
+ ynVar nVar; /* Number of '?' variables seen in the SQL so far */
1366913669
int nzVar; /* Number of available slots in azVar[] */
1367013670
u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */
1367113671
u8 explain; /* True if the EXPLAIN flag is found on the query */
1367213672
#ifndef SQLITE_OMIT_VIRTUALTABLE
1367313673
u8 declareVtab; /* True if inside sqlite3_declare_vtab() */
@@ -13945,14 +13945,14 @@
1394513945
1394613946
/*
1394713947
** Context pointer passed down through the tree-walk.
1394813948
*/
1394913949
struct Walker {
13950
+ Parse *pParse; /* Parser context. */
1395013951
int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */
1395113952
int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */
1395213953
void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */
13953
- Parse *pParse; /* Parser context. */
1395413954
int walkerDepth; /* Number of subqueries */
1395513955
u8 eCode; /* A small processing code */
1395613956
union { /* Extra data for callback */
1395713957
NameContext *pNC; /* Naming context */
1395813958
int n; /* A counter */
@@ -22394,12 +22394,13 @@
2239422394
}
2239522395
return p;
2239622396
}
2239722397
2239822398
/*
22399
-** Allocate and zero memory. If the allocation fails, make
22400
-** the mallocFailed flag in the connection pointer.
22399
+** Allocate memory, either lookaside (if possible) or heap.
22400
+** If the allocation fails, set the mallocFailed flag in
22401
+** the connection pointer.
2240122402
**
2240222403
** If db!=0 and db->mallocFailed is true (indicating a prior malloc
2240322404
** failure on the same database connection) then always return 0.
2240422405
** Hence for a particular database connection, once malloc starts
2240522406
** failing, it fails consistently until mallocFailed is reset.
@@ -22411,12 +22412,12 @@
2241122412
** if( b ) a[10] = 9;
2241222413
**
2241322414
** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
2241422415
** that all prior mallocs (ex: "a") worked too.
2241522416
*/
22417
+static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n);
2241622418
SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){
22417
- void *p;
2241822419
assert( db==0 || sqlite3_mutex_held(db->mutex) );
2241922420
assert( db==0 || db->pnBytesFreed==0 );
2242022421
#ifndef SQLITE_OMIT_LOOKASIDE
2242122422
if( db ){
2242222423
LookasideSlot *pBuf;
@@ -22442,11 +22443,14 @@
2244222443
#else
2244322444
if( db && db->mallocFailed ){
2244422445
return 0;
2244522446
}
2244622447
#endif
22447
- p = sqlite3Malloc(n);
22448
+ return dbMallocRawFinish(db, n);
22449
+}
22450
+static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){
22451
+ void *p = sqlite3Malloc(n);
2244822452
if( !p && db ){
2244922453
db->mallocFailed = 1;
2245022454
}
2245122455
sqlite3MemdebugSetType(p,
2245222456
(db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
@@ -62524,13 +62528,12 @@
6252462528
** This must be done in advance. Once the balance starts, the cell
6252562529
** offset section of the btree page will be overwritten and we will no
6252662530
** long be able to find the cells if a pointer to each cell is not saved
6252762531
** first.
6252862532
*/
62529
- memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit);
62533
+ memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
6253062534
if( pOld->nOverflow>0 ){
62531
- memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow);
6253262535
limit = pOld->aiOvfl[0];
6253362536
for(j=0; j<limit; j++){
6253462537
b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
6253562538
piCell += 2;
6253662539
b.nCell++;
@@ -68390,11 +68393,12 @@
6839068393
VdbeOp *pOp;
6839168394
if( p->db->mallocFailed ) return 0;
6839268395
assert( addr>=0 && addr<p->nOp );
6839368396
pOp = &p->aOp[addr];
6839468397
freeP4(p->db, pOp->p4type, pOp->p4.p);
68395
- memset(pOp, 0, sizeof(pOp[0]));
68398
+ pOp->p4type = P4_NOTUSED;
68399
+ pOp->p4.z = 0;
6839668400
pOp->opcode = OP_Noop;
6839768401
return 1;
6839868402
}
6839968403
6840068404
/*
@@ -69438,11 +69442,10 @@
6943869442
do {
6943969443
nByte = 0;
6944069444
p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), zCsr, &nFree, &nByte);
6944169445
p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), zCsr, &nFree, &nByte);
6944269446
p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), zCsr, &nFree, &nByte);
69443
- p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), zCsr, &nFree, &nByte);
6944469447
p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*),
6944569448
zCsr, &nFree, &nByte);
6944669449
p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, zCsr, &nFree, &nByte);
6944769450
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
6944869451
p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), zCsr, &nFree, &nByte);
@@ -69461,15 +69464,14 @@
6946169464
for(n=0; n<nVar; n++){
6946269465
p->aVar[n].flags = MEM_Null;
6946369466
p->aVar[n].db = db;
6946469467
}
6946569468
}
69466
- if( p->azVar && pParse->nzVar>0 ){
69467
- p->nzVar = pParse->nzVar;
69468
- memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0]));
69469
- memset(pParse->azVar, 0, pParse->nzVar*sizeof(pParse->azVar[0]));
69470
- }
69469
+ p->nzVar = pParse->nzVar;
69470
+ p->azVar = pParse->azVar;
69471
+ pParse->nzVar = 0;
69472
+ pParse->azVar = 0;
6947169473
if( p->aMem ){
6947269474
p->aMem--; /* aMem[] goes from 1..nMem */
6947369475
p->nMem = nMem; /* not from 0..nMem-1 */
6947469476
for(n=1; n<=nMem; n++){
6947569477
p->aMem[n].flags = MEM_Undefined;
@@ -70452,10 +70454,11 @@
7045270454
pNext = pSub->pNext;
7045370455
vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
7045470456
sqlite3DbFree(db, pSub);
7045570457
}
7045670458
for(i=p->nzVar-1; i>=0; i--) sqlite3DbFree(db, p->azVar[i]);
70459
+ sqlite3DbFree(db, p->azVar);
7045770460
vdbeFreeOpArray(db, p->aOp, p->nOp);
7045870461
sqlite3DbFree(db, p->aColName);
7045970462
sqlite3DbFree(db, p->zSql);
7046070463
sqlite3DbFree(db, p->pFree);
7046170464
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
@@ -71196,13 +71199,13 @@
7119671199
v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
7119771200
n1 = v1==0 ? 0 : c1.n;
7119871201
v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
7119971202
n2 = v2==0 ? 0 : c2.n;
7120071203
rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2);
71204
+ if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM;
7120171205
sqlite3VdbeMemRelease(&c1);
7120271206
sqlite3VdbeMemRelease(&c2);
71203
- if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM;
7120471207
return rc;
7120571208
}
7120671209
}
7120771210
7120871211
/*
@@ -71986,15 +71989,17 @@
7198671989
** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
7198771990
** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
7198871991
** in memory obtained from sqlite3DbMalloc).
7198971992
*/
7199071993
SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){
71991
- sqlite3 *db = p->db;
71992
- sqlite3DbFree(db, p->zErrMsg);
71993
- p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
71994
- sqlite3_free(pVtab->zErrMsg);
71995
- pVtab->zErrMsg = 0;
71994
+ if( pVtab->zErrMsg ){
71995
+ sqlite3 *db = p->db;
71996
+ sqlite3DbFree(db, p->zErrMsg);
71997
+ p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
71998
+ sqlite3_free(pVtab->zErrMsg);
71999
+ pVtab->zErrMsg = 0;
72000
+ }
7199672001
}
7199772002
#endif /* SQLITE_OMIT_VIRTUALTABLE */
7199872003
7199972004
/************** End of vdbeaux.c *********************************************/
7200072005
/************** Begin file vdbeapi.c *****************************************/
@@ -86034,14 +86039,16 @@
8603486039
pParse->nHeight += pExpr->nHeight;
8603586040
}
8603686041
#endif
8603786042
savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg);
8603886043
pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg);
86039
- memset(&w, 0, sizeof(w));
86044
+ w.pParse = pNC->pParse;
8604086045
w.xExprCallback = resolveExprStep;
8604186046
w.xSelectCallback = resolveSelectStep;
86042
- w.pParse = pNC->pParse;
86047
+ w.xSelectCallback2 = 0;
86048
+ w.walkerDepth = 0;
86049
+ w.eCode = 0;
8604386050
w.u.pNC = pNC;
8604486051
sqlite3WalkExpr(&w, pExpr);
8604586052
#if SQLITE_MAX_EXPR_DEPTH>0
8604686053
pNC->pParse->nHeight -= pExpr->nHeight;
8604786054
#endif
@@ -100498,11 +100505,11 @@
100498100505
continue;
100499100506
}
100500100507
}
100501100508
c2 = Utf8Read(zString);
100502100509
if( c==c2 ) continue;
100503
- if( noCase && sqlite3Tolower(c)==sqlite3Tolower(c2) ){
100510
+ if( noCase && c<0x80 && c2<0x80 && sqlite3Tolower(c)==sqlite3Tolower(c2) ){
100504100511
continue;
100505100512
}
100506100513
if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue;
100507100514
return 0;
100508100515
}
@@ -121631,10 +121638,11 @@
121631121638
int cnt; /* Number of non-wildcard prefix characters */
121632121639
char wc[3]; /* Wildcard characters */
121633121640
sqlite3 *db = pParse->db; /* Database connection */
121634121641
sqlite3_value *pVal = 0;
121635121642
int op; /* Opcode of pRight */
121643
+ int rc; /* Result code to return */
121636121644
121637121645
if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){
121638121646
return 0;
121639121647
}
121640121648
#ifdef SQLITE_EBCDIC
@@ -121696,12 +121704,13 @@
121696121704
}else{
121697121705
z = 0;
121698121706
}
121699121707
}
121700121708
121709
+ rc = (z!=0);
121701121710
sqlite3ValueFree(pVal);
121702
- return (z!=0);
121711
+ return rc;
121703121712
}
121704121713
#endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
121705121714
121706121715
121707121716
#ifndef SQLITE_OMIT_VIRTUALTABLE
@@ -183596,11 +183605,11 @@
183596183605
sqlite3_context *pCtx, /* Function call context */
183597183606
int nArg, /* Number of args */
183598183607
sqlite3_value **apVal /* Function arguments */
183599183608
){
183600183609
assert( nArg==0 );
183601
- sqlite3_result_text(pCtx, "fts5: 2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5", -1, SQLITE_TRANSIENT);
183610
+ sqlite3_result_text(pCtx, "fts5: 2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1", -1, SQLITE_TRANSIENT);
183602183611
}
183603183612
183604183613
static int fts5Init(sqlite3 *db){
183605183614
static const sqlite3_module fts5Mod = {
183606183615
/* iVersion */ 2,
183607183616
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -327,11 +327,11 @@
327 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
328 ** [sqlite_version()] and [sqlite_source_id()].
329 */
330 #define SQLITE_VERSION "3.11.0"
331 #define SQLITE_VERSION_NUMBER 3011000
332 #define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5"
333
334 /*
335 ** CAPI3REF: Run-Time Library Version Numbers
336 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
337 **
@@ -13663,11 +13663,11 @@
13663 ** each recursion. The boundary between these two regions is determined
13664 ** using offsetof(Parse,nVar) so the nVar field must be the first field
13665 ** in the recursive region.
13666 ************************************************************************/
13667
13668 int nVar; /* Number of '?' variables seen in the SQL so far */
13669 int nzVar; /* Number of available slots in azVar[] */
13670 u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */
13671 u8 explain; /* True if the EXPLAIN flag is found on the query */
13672 #ifndef SQLITE_OMIT_VIRTUALTABLE
13673 u8 declareVtab; /* True if inside sqlite3_declare_vtab() */
@@ -13945,14 +13945,14 @@
13945
13946 /*
13947 ** Context pointer passed down through the tree-walk.
13948 */
13949 struct Walker {
 
13950 int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */
13951 int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */
13952 void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */
13953 Parse *pParse; /* Parser context. */
13954 int walkerDepth; /* Number of subqueries */
13955 u8 eCode; /* A small processing code */
13956 union { /* Extra data for callback */
13957 NameContext *pNC; /* Naming context */
13958 int n; /* A counter */
@@ -22394,12 +22394,13 @@
22394 }
22395 return p;
22396 }
22397
22398 /*
22399 ** Allocate and zero memory. If the allocation fails, make
22400 ** the mallocFailed flag in the connection pointer.
 
22401 **
22402 ** If db!=0 and db->mallocFailed is true (indicating a prior malloc
22403 ** failure on the same database connection) then always return 0.
22404 ** Hence for a particular database connection, once malloc starts
22405 ** failing, it fails consistently until mallocFailed is reset.
@@ -22411,12 +22412,12 @@
22411 ** if( b ) a[10] = 9;
22412 **
22413 ** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
22414 ** that all prior mallocs (ex: "a") worked too.
22415 */
 
22416 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){
22417 void *p;
22418 assert( db==0 || sqlite3_mutex_held(db->mutex) );
22419 assert( db==0 || db->pnBytesFreed==0 );
22420 #ifndef SQLITE_OMIT_LOOKASIDE
22421 if( db ){
22422 LookasideSlot *pBuf;
@@ -22442,11 +22443,14 @@
22442 #else
22443 if( db && db->mallocFailed ){
22444 return 0;
22445 }
22446 #endif
22447 p = sqlite3Malloc(n);
 
 
 
22448 if( !p && db ){
22449 db->mallocFailed = 1;
22450 }
22451 sqlite3MemdebugSetType(p,
22452 (db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
@@ -62524,13 +62528,12 @@
62524 ** This must be done in advance. Once the balance starts, the cell
62525 ** offset section of the btree page will be overwritten and we will no
62526 ** long be able to find the cells if a pointer to each cell is not saved
62527 ** first.
62528 */
62529 memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit);
62530 if( pOld->nOverflow>0 ){
62531 memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow);
62532 limit = pOld->aiOvfl[0];
62533 for(j=0; j<limit; j++){
62534 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
62535 piCell += 2;
62536 b.nCell++;
@@ -68390,11 +68393,12 @@
68390 VdbeOp *pOp;
68391 if( p->db->mallocFailed ) return 0;
68392 assert( addr>=0 && addr<p->nOp );
68393 pOp = &p->aOp[addr];
68394 freeP4(p->db, pOp->p4type, pOp->p4.p);
68395 memset(pOp, 0, sizeof(pOp[0]));
 
68396 pOp->opcode = OP_Noop;
68397 return 1;
68398 }
68399
68400 /*
@@ -69438,11 +69442,10 @@
69438 do {
69439 nByte = 0;
69440 p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), zCsr, &nFree, &nByte);
69441 p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), zCsr, &nFree, &nByte);
69442 p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), zCsr, &nFree, &nByte);
69443 p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), zCsr, &nFree, &nByte);
69444 p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*),
69445 zCsr, &nFree, &nByte);
69446 p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, zCsr, &nFree, &nByte);
69447 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
69448 p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), zCsr, &nFree, &nByte);
@@ -69461,15 +69464,14 @@
69461 for(n=0; n<nVar; n++){
69462 p->aVar[n].flags = MEM_Null;
69463 p->aVar[n].db = db;
69464 }
69465 }
69466 if( p->azVar && pParse->nzVar>0 ){
69467 p->nzVar = pParse->nzVar;
69468 memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0]));
69469 memset(pParse->azVar, 0, pParse->nzVar*sizeof(pParse->azVar[0]));
69470 }
69471 if( p->aMem ){
69472 p->aMem--; /* aMem[] goes from 1..nMem */
69473 p->nMem = nMem; /* not from 0..nMem-1 */
69474 for(n=1; n<=nMem; n++){
69475 p->aMem[n].flags = MEM_Undefined;
@@ -70452,10 +70454,11 @@
70452 pNext = pSub->pNext;
70453 vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
70454 sqlite3DbFree(db, pSub);
70455 }
70456 for(i=p->nzVar-1; i>=0; i--) sqlite3DbFree(db, p->azVar[i]);
 
70457 vdbeFreeOpArray(db, p->aOp, p->nOp);
70458 sqlite3DbFree(db, p->aColName);
70459 sqlite3DbFree(db, p->zSql);
70460 sqlite3DbFree(db, p->pFree);
70461 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
@@ -71196,13 +71199,13 @@
71196 v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
71197 n1 = v1==0 ? 0 : c1.n;
71198 v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
71199 n2 = v2==0 ? 0 : c2.n;
71200 rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2);
 
71201 sqlite3VdbeMemRelease(&c1);
71202 sqlite3VdbeMemRelease(&c2);
71203 if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM;
71204 return rc;
71205 }
71206 }
71207
71208 /*
@@ -71986,15 +71989,17 @@
71986 ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
71987 ** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
71988 ** in memory obtained from sqlite3DbMalloc).
71989 */
71990 SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){
71991 sqlite3 *db = p->db;
71992 sqlite3DbFree(db, p->zErrMsg);
71993 p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
71994 sqlite3_free(pVtab->zErrMsg);
71995 pVtab->zErrMsg = 0;
 
 
71996 }
71997 #endif /* SQLITE_OMIT_VIRTUALTABLE */
71998
71999 /************** End of vdbeaux.c *********************************************/
72000 /************** Begin file vdbeapi.c *****************************************/
@@ -86034,14 +86039,16 @@
86034 pParse->nHeight += pExpr->nHeight;
86035 }
86036 #endif
86037 savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg);
86038 pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg);
86039 memset(&w, 0, sizeof(w));
86040 w.xExprCallback = resolveExprStep;
86041 w.xSelectCallback = resolveSelectStep;
86042 w.pParse = pNC->pParse;
 
 
86043 w.u.pNC = pNC;
86044 sqlite3WalkExpr(&w, pExpr);
86045 #if SQLITE_MAX_EXPR_DEPTH>0
86046 pNC->pParse->nHeight -= pExpr->nHeight;
86047 #endif
@@ -100498,11 +100505,11 @@
100498 continue;
100499 }
100500 }
100501 c2 = Utf8Read(zString);
100502 if( c==c2 ) continue;
100503 if( noCase && sqlite3Tolower(c)==sqlite3Tolower(c2) ){
100504 continue;
100505 }
100506 if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue;
100507 return 0;
100508 }
@@ -121631,10 +121638,11 @@
121631 int cnt; /* Number of non-wildcard prefix characters */
121632 char wc[3]; /* Wildcard characters */
121633 sqlite3 *db = pParse->db; /* Database connection */
121634 sqlite3_value *pVal = 0;
121635 int op; /* Opcode of pRight */
 
121636
121637 if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){
121638 return 0;
121639 }
121640 #ifdef SQLITE_EBCDIC
@@ -121696,12 +121704,13 @@
121696 }else{
121697 z = 0;
121698 }
121699 }
121700
 
121701 sqlite3ValueFree(pVal);
121702 return (z!=0);
121703 }
121704 #endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
121705
121706
121707 #ifndef SQLITE_OMIT_VIRTUALTABLE
@@ -183596,11 +183605,11 @@
183596 sqlite3_context *pCtx, /* Function call context */
183597 int nArg, /* Number of args */
183598 sqlite3_value **apVal /* Function arguments */
183599 ){
183600 assert( nArg==0 );
183601 sqlite3_result_text(pCtx, "fts5: 2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5", -1, SQLITE_TRANSIENT);
183602 }
183603
183604 static int fts5Init(sqlite3 *db){
183605 static const sqlite3_module fts5Mod = {
183606 /* iVersion */ 2,
183607
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -327,11 +327,11 @@
327 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
328 ** [sqlite_version()] and [sqlite_source_id()].
329 */
330 #define SQLITE_VERSION "3.11.0"
331 #define SQLITE_VERSION_NUMBER 3011000
332 #define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1"
333
334 /*
335 ** CAPI3REF: Run-Time Library Version Numbers
336 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
337 **
@@ -13663,11 +13663,11 @@
13663 ** each recursion. The boundary between these two regions is determined
13664 ** using offsetof(Parse,nVar) so the nVar field must be the first field
13665 ** in the recursive region.
13666 ************************************************************************/
13667
13668 ynVar nVar; /* Number of '?' variables seen in the SQL so far */
13669 int nzVar; /* Number of available slots in azVar[] */
13670 u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */
13671 u8 explain; /* True if the EXPLAIN flag is found on the query */
13672 #ifndef SQLITE_OMIT_VIRTUALTABLE
13673 u8 declareVtab; /* True if inside sqlite3_declare_vtab() */
@@ -13945,14 +13945,14 @@
13945
13946 /*
13947 ** Context pointer passed down through the tree-walk.
13948 */
13949 struct Walker {
13950 Parse *pParse; /* Parser context. */
13951 int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */
13952 int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */
13953 void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */
 
13954 int walkerDepth; /* Number of subqueries */
13955 u8 eCode; /* A small processing code */
13956 union { /* Extra data for callback */
13957 NameContext *pNC; /* Naming context */
13958 int n; /* A counter */
@@ -22394,12 +22394,13 @@
22394 }
22395 return p;
22396 }
22397
22398 /*
22399 ** Allocate memory, either lookaside (if possible) or heap.
22400 ** If the allocation fails, set the mallocFailed flag in
22401 ** the connection pointer.
22402 **
22403 ** If db!=0 and db->mallocFailed is true (indicating a prior malloc
22404 ** failure on the same database connection) then always return 0.
22405 ** Hence for a particular database connection, once malloc starts
22406 ** failing, it fails consistently until mallocFailed is reset.
@@ -22411,12 +22412,12 @@
22412 ** if( b ) a[10] = 9;
22413 **
22414 ** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
22415 ** that all prior mallocs (ex: "a") worked too.
22416 */
22417 static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n);
22418 SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){
 
22419 assert( db==0 || sqlite3_mutex_held(db->mutex) );
22420 assert( db==0 || db->pnBytesFreed==0 );
22421 #ifndef SQLITE_OMIT_LOOKASIDE
22422 if( db ){
22423 LookasideSlot *pBuf;
@@ -22442,11 +22443,14 @@
22443 #else
22444 if( db && db->mallocFailed ){
22445 return 0;
22446 }
22447 #endif
22448 return dbMallocRawFinish(db, n);
22449 }
22450 static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){
22451 void *p = sqlite3Malloc(n);
22452 if( !p && db ){
22453 db->mallocFailed = 1;
22454 }
22455 sqlite3MemdebugSetType(p,
22456 (db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
@@ -62524,13 +62528,12 @@
62528 ** This must be done in advance. Once the balance starts, the cell
62529 ** offset section of the btree page will be overwritten and we will no
62530 ** long be able to find the cells if a pointer to each cell is not saved
62531 ** first.
62532 */
62533 memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
62534 if( pOld->nOverflow>0 ){
 
62535 limit = pOld->aiOvfl[0];
62536 for(j=0; j<limit; j++){
62537 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
62538 piCell += 2;
62539 b.nCell++;
@@ -68390,11 +68393,12 @@
68393 VdbeOp *pOp;
68394 if( p->db->mallocFailed ) return 0;
68395 assert( addr>=0 && addr<p->nOp );
68396 pOp = &p->aOp[addr];
68397 freeP4(p->db, pOp->p4type, pOp->p4.p);
68398 pOp->p4type = P4_NOTUSED;
68399 pOp->p4.z = 0;
68400 pOp->opcode = OP_Noop;
68401 return 1;
68402 }
68403
68404 /*
@@ -69438,11 +69442,10 @@
69442 do {
69443 nByte = 0;
69444 p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), zCsr, &nFree, &nByte);
69445 p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), zCsr, &nFree, &nByte);
69446 p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), zCsr, &nFree, &nByte);
 
69447 p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*),
69448 zCsr, &nFree, &nByte);
69449 p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, zCsr, &nFree, &nByte);
69450 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
69451 p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), zCsr, &nFree, &nByte);
@@ -69461,15 +69464,14 @@
69464 for(n=0; n<nVar; n++){
69465 p->aVar[n].flags = MEM_Null;
69466 p->aVar[n].db = db;
69467 }
69468 }
69469 p->nzVar = pParse->nzVar;
69470 p->azVar = pParse->azVar;
69471 pParse->nzVar = 0;
69472 pParse->azVar = 0;
 
69473 if( p->aMem ){
69474 p->aMem--; /* aMem[] goes from 1..nMem */
69475 p->nMem = nMem; /* not from 0..nMem-1 */
69476 for(n=1; n<=nMem; n++){
69477 p->aMem[n].flags = MEM_Undefined;
@@ -70452,10 +70454,11 @@
70454 pNext = pSub->pNext;
70455 vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
70456 sqlite3DbFree(db, pSub);
70457 }
70458 for(i=p->nzVar-1; i>=0; i--) sqlite3DbFree(db, p->azVar[i]);
70459 sqlite3DbFree(db, p->azVar);
70460 vdbeFreeOpArray(db, p->aOp, p->nOp);
70461 sqlite3DbFree(db, p->aColName);
70462 sqlite3DbFree(db, p->zSql);
70463 sqlite3DbFree(db, p->pFree);
70464 #ifdef SQLITE_ENABLE_STMT_SCANSTATUS
@@ -71196,13 +71199,13 @@
71199 v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
71200 n1 = v1==0 ? 0 : c1.n;
71201 v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
71202 n2 = v2==0 ? 0 : c2.n;
71203 rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2);
71204 if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM;
71205 sqlite3VdbeMemRelease(&c1);
71206 sqlite3VdbeMemRelease(&c2);
 
71207 return rc;
71208 }
71209 }
71210
71211 /*
@@ -71986,15 +71989,17 @@
71989 ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
71990 ** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
71991 ** in memory obtained from sqlite3DbMalloc).
71992 */
71993 SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){
71994 if( pVtab->zErrMsg ){
71995 sqlite3 *db = p->db;
71996 sqlite3DbFree(db, p->zErrMsg);
71997 p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
71998 sqlite3_free(pVtab->zErrMsg);
71999 pVtab->zErrMsg = 0;
72000 }
72001 }
72002 #endif /* SQLITE_OMIT_VIRTUALTABLE */
72003
72004 /************** End of vdbeaux.c *********************************************/
72005 /************** Begin file vdbeapi.c *****************************************/
@@ -86034,14 +86039,16 @@
86039 pParse->nHeight += pExpr->nHeight;
86040 }
86041 #endif
86042 savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg);
86043 pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg);
86044 w.pParse = pNC->pParse;
86045 w.xExprCallback = resolveExprStep;
86046 w.xSelectCallback = resolveSelectStep;
86047 w.xSelectCallback2 = 0;
86048 w.walkerDepth = 0;
86049 w.eCode = 0;
86050 w.u.pNC = pNC;
86051 sqlite3WalkExpr(&w, pExpr);
86052 #if SQLITE_MAX_EXPR_DEPTH>0
86053 pNC->pParse->nHeight -= pExpr->nHeight;
86054 #endif
@@ -100498,11 +100505,11 @@
100505 continue;
100506 }
100507 }
100508 c2 = Utf8Read(zString);
100509 if( c==c2 ) continue;
100510 if( noCase && c<0x80 && c2<0x80 && sqlite3Tolower(c)==sqlite3Tolower(c2) ){
100511 continue;
100512 }
100513 if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue;
100514 return 0;
100515 }
@@ -121631,10 +121638,11 @@
121638 int cnt; /* Number of non-wildcard prefix characters */
121639 char wc[3]; /* Wildcard characters */
121640 sqlite3 *db = pParse->db; /* Database connection */
121641 sqlite3_value *pVal = 0;
121642 int op; /* Opcode of pRight */
121643 int rc; /* Result code to return */
121644
121645 if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){
121646 return 0;
121647 }
121648 #ifdef SQLITE_EBCDIC
@@ -121696,12 +121704,13 @@
121704 }else{
121705 z = 0;
121706 }
121707 }
121708
121709 rc = (z!=0);
121710 sqlite3ValueFree(pVal);
121711 return rc;
121712 }
121713 #endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
121714
121715
121716 #ifndef SQLITE_OMIT_VIRTUALTABLE
@@ -183596,11 +183605,11 @@
183605 sqlite3_context *pCtx, /* Function call context */
183606 int nArg, /* Number of args */
183607 sqlite3_value **apVal /* Function arguments */
183608 ){
183609 assert( nArg==0 );
183610 sqlite3_result_text(pCtx, "fts5: 2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1", -1, SQLITE_TRANSIENT);
183611 }
183612
183613 static int fts5Init(sqlite3 *db){
183614 static const sqlite3_module fts5Mod = {
183615 /* iVersion */ 2,
183616
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111111
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112112
** [sqlite_version()] and [sqlite_source_id()].
113113
*/
114114
#define SQLITE_VERSION "3.11.0"
115115
#define SQLITE_VERSION_NUMBER 3011000
116
-#define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5"
116
+#define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1"
117117
118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers
120120
** KEYWORDS: sqlite3_version, sqlite3_sourceid
121121
**
122122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.11.0"
115 #define SQLITE_VERSION_NUMBER 3011000
116 #define SQLITE_SOURCE_ID "2016-01-18 17:48:28 acaf426449bf6fd3140fd63141750ff69d1119a5"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.11.0"
115 #define SQLITE_VERSION_NUMBER 3011000
116 #define SQLITE_SOURCE_ID "2016-01-20 14:22:41 204432ee72fda8e82d244c4aa18de7ec4811b8e1"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122
+20 -17
--- src/statrep.c
+++ src/statrep.c
@@ -1,7 +1,7 @@
11
/*
2
-** Copyright (c) 2013 Stephen Beal
2
+** Copyright (c) 2013 Stephan Beal
33
**
44
** This program is free software; you can redistribute it and/or
55
** modify it under the terms of the Simplified BSD License (also
66
** known as the "2-Clause License" or "FreeBSD License".)
77
@@ -241,10 +241,11 @@
241241
rowClass = ++nRowNumber % 2;
242242
@ <tr class='row%d(rowClass)'>
243243
@ <td></td>
244244
@ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
245245
@</tr>
246
+ showYearTotal = 0;
246247
}
247248
nEventsPerYear = 0;
248249
memcpy(zPrevYear,zTimeframe,4);
249250
rowClass = ++nRowNumber % 2;
250251
@ <tr class='row%d(rowClass)'>
@@ -334,12 +335,12 @@
334335
all rows. */
335336
stats_report_init_view();
336337
@ <h1>Timeline Events
337338
@ (%s(stats_report_label_for_type())) by User</h1>
338339
db_multi_exec(
339
- "CREATE TEMP TABLE piechart(amt,label);"
340
- "INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports"
340
+ "CREATE TEMP VIEW piechart(amt,label) AS"
341
+ " SELECT count(*), ifnull(euser,user) FROM v_reports"
341342
" GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;"
342343
);
343344
if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
344345
@ <center><svg width=700 height=400>
345346
piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
@@ -482,24 +483,26 @@
482483
if( zUserName ){
483484
@ for user %h(zUserName)
484485
}
485486
@ </h1>
486487
db_multi_exec(
487
- "CREATE TEMP TABLE piechart(amt,label);"
488
- "INSERT INTO piechart"
489
- " SELECT count(*), cast(strftime('%%w', mtime) AS INT) FROM v_reports"
490
- " WHERE ifnull(coalesce(euser,user,'')=%Q,1)"
491
- " GROUP BY 2 ORDER BY 2;"
492
- "UPDATE piechart SET label = CASE label"
493
- " WHEN 0 THEN 'Sunday'"
494
- " WHEN 1 THEN 'Monday'"
495
- " WHEN 2 THEN 'Tuesday'"
496
- " WHEN 3 THEN 'Wednesday'"
497
- " WHEN 4 THEN 'Thursday'"
498
- " WHEN 5 THEN 'Friday'"
499
- " WHEN 6 THEN 'Saturday'"
500
- " ELSE 'ERROR' END;", zUserName
488
+ "CREATE TEMP VIEW piechart(amt,label) AS"
489
+ " SELECT count(*),"
490
+ " CASE cast(strftime('%%w', mtime) AS INT)"
491
+ " WHEN 0 THEN 'Sunday'"
492
+ " WHEN 1 THEN 'Monday'"
493
+ " WHEN 2 THEN 'Tuesday'"
494
+ " WHEN 3 THEN 'Wednesday'"
495
+ " WHEN 4 THEN 'Thursday'"
496
+ " WHEN 5 THEN 'Friday'"
497
+ " WHEN 6 THEN 'Saturday'"
498
+ " ELSE 'ERROR'"
499
+ " END"
500
+ " FROM v_reports"
501
+ " WHERE ifnull(coalesce(euser,user,'')=%Q,1)"
502
+ " GROUP BY 2 ORDER BY cast(strftime('%%w', mtime) AS INT);"
503
+ , zUserName
501504
);
502505
if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
503506
@ <center><svg width=700 height=400>
504507
piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
505508
@ </svg></centre><hr/>
506509
--- src/statrep.c
+++ src/statrep.c
@@ -1,7 +1,7 @@
1 /*
2 ** Copyright (c) 2013 Stephen Beal
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
@@ -241,10 +241,11 @@
241 rowClass = ++nRowNumber % 2;
242 @ <tr class='row%d(rowClass)'>
243 @ <td></td>
244 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
245 @</tr>
 
246 }
247 nEventsPerYear = 0;
248 memcpy(zPrevYear,zTimeframe,4);
249 rowClass = ++nRowNumber % 2;
250 @ <tr class='row%d(rowClass)'>
@@ -334,12 +335,12 @@
334 all rows. */
335 stats_report_init_view();
336 @ <h1>Timeline Events
337 @ (%s(stats_report_label_for_type())) by User</h1>
338 db_multi_exec(
339 "CREATE TEMP TABLE piechart(amt,label);"
340 "INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports"
341 " GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;"
342 );
343 if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
344 @ <center><svg width=700 height=400>
345 piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
@@ -482,24 +483,26 @@
482 if( zUserName ){
483 @ for user %h(zUserName)
484 }
485 @ </h1>
486 db_multi_exec(
487 "CREATE TEMP TABLE piechart(amt,label);"
488 "INSERT INTO piechart"
489 " SELECT count(*), cast(strftime('%%w', mtime) AS INT) FROM v_reports"
490 " WHERE ifnull(coalesce(euser,user,'')=%Q,1)"
491 " GROUP BY 2 ORDER BY 2;"
492 "UPDATE piechart SET label = CASE label"
493 " WHEN 0 THEN 'Sunday'"
494 " WHEN 1 THEN 'Monday'"
495 " WHEN 2 THEN 'Tuesday'"
496 " WHEN 3 THEN 'Wednesday'"
497 " WHEN 4 THEN 'Thursday'"
498 " WHEN 5 THEN 'Friday'"
499 " WHEN 6 THEN 'Saturday'"
500 " ELSE 'ERROR' END;", zUserName
 
 
501 );
502 if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
503 @ <center><svg width=700 height=400>
504 piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
505 @ </svg></centre><hr/>
506
--- src/statrep.c
+++ src/statrep.c
@@ -1,7 +1,7 @@
1 /*
2 ** Copyright (c) 2013 Stephan Beal
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
@@ -241,10 +241,11 @@
241 rowClass = ++nRowNumber % 2;
242 @ <tr class='row%d(rowClass)'>
243 @ <td></td>
244 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
245 @</tr>
246 showYearTotal = 0;
247 }
248 nEventsPerYear = 0;
249 memcpy(zPrevYear,zTimeframe,4);
250 rowClass = ++nRowNumber % 2;
251 @ <tr class='row%d(rowClass)'>
@@ -334,12 +335,12 @@
335 all rows. */
336 stats_report_init_view();
337 @ <h1>Timeline Events
338 @ (%s(stats_report_label_for_type())) by User</h1>
339 db_multi_exec(
340 "CREATE TEMP VIEW piechart(amt,label) AS"
341 " SELECT count(*), ifnull(euser,user) FROM v_reports"
342 " GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;"
343 );
344 if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
345 @ <center><svg width=700 height=400>
346 piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
@@ -482,24 +483,26 @@
483 if( zUserName ){
484 @ for user %h(zUserName)
485 }
486 @ </h1>
487 db_multi_exec(
488 "CREATE TEMP VIEW piechart(amt,label) AS"
489 " SELECT count(*),"
490 " CASE cast(strftime('%%w', mtime) AS INT)"
491 " WHEN 0 THEN 'Sunday'"
492 " WHEN 1 THEN 'Monday'"
493 " WHEN 2 THEN 'Tuesday'"
494 " WHEN 3 THEN 'Wednesday'"
495 " WHEN 4 THEN 'Thursday'"
496 " WHEN 5 THEN 'Friday'"
497 " WHEN 6 THEN 'Saturday'"
498 " ELSE 'ERROR'"
499 " END"
500 " FROM v_reports"
501 " WHERE ifnull(coalesce(euser,user,'')=%Q,1)"
502 " GROUP BY 2 ORDER BY cast(strftime('%%w', mtime) AS INT);"
503 , zUserName
504 );
505 if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
506 @ <center><svg width=700 height=400>
507 piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
508 @ </svg></centre><hr/>
509
+2 -2
--- src/th_lang.c
+++ src/th_lang.c
@@ -990,11 +990,11 @@
990990
}
991991
992992
/*
993993
** TH Syntax:
994994
**
995
-** array names
995
+** array names VARNAME
996996
*/
997997
static int array_names_command(
998998
Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
999999
){
10001000
int rc;
@@ -1014,11 +1014,11 @@
10141014
}
10151015
10161016
/*
10171017
** TH Syntax:
10181018
**
1019
-** unset VAR
1019
+** unset VARNAME
10201020
*/
10211021
static int unset_command(
10221022
Th_Interp *interp,
10231023
void *ctx,
10241024
int argc,
10251025
--- src/th_lang.c
+++ src/th_lang.c
@@ -990,11 +990,11 @@
990 }
991
992 /*
993 ** TH Syntax:
994 **
995 ** array names
996 */
997 static int array_names_command(
998 Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
999 ){
1000 int rc;
@@ -1014,11 +1014,11 @@
1014 }
1015
1016 /*
1017 ** TH Syntax:
1018 **
1019 ** unset VAR
1020 */
1021 static int unset_command(
1022 Th_Interp *interp,
1023 void *ctx,
1024 int argc,
1025
--- src/th_lang.c
+++ src/th_lang.c
@@ -990,11 +990,11 @@
990 }
991
992 /*
993 ** TH Syntax:
994 **
995 ** array names VARNAME
996 */
997 static int array_names_command(
998 Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
999 ){
1000 int rc;
@@ -1014,11 +1014,11 @@
1014 }
1015
1016 /*
1017 ** TH Syntax:
1018 **
1019 ** unset VARNAME
1020 */
1021 static int unset_command(
1022 Th_Interp *interp,
1023 void *ctx,
1024 int argc,
1025
+48 -3
--- src/th_main.c
+++ src/th_main.c
@@ -2291,11 +2291,11 @@
22912291
** --http Include an HTTP response header in the output
22922292
** --open-config Open the configuration database
22932293
** --th-trace Trace TH1 execution (for debugging purposes)
22942294
*/
22952295
void test_th_render(void){
2296
- int forceCgi = 0, fullHttpReply = 0;
2296
+ int forceCgi, fullHttpReply;
22972297
Blob in;
22982298
Th_InitTraceLog();
22992299
forceCgi = find_option("cgi", 0, 0)!=0;
23002300
fullHttpReply = find_option("http", 0, 0)!=0;
23012301
if( fullHttpReply ) forceCgi = 1;
@@ -2318,11 +2318,11 @@
23182318
** COMMAND: test-th-eval
23192319
**
23202320
** Usage: %fossil test-th-eval SCRIPT
23212321
**
23222322
** Evaluate SCRIPT as if it were a header or footer or ticket rendering
2323
-** script, evaluate it, and show the results on standard output.
2323
+** script and show the results on standard output.
23242324
**
23252325
** Options:
23262326
**
23272327
** --cgi Include a CGI response header in the output
23282328
** --http Include an HTTP response header in the output
@@ -2339,15 +2339,59 @@
23392339
if( fullHttpReply ) forceCgi = 1;
23402340
if( forceCgi ) Th_ForceCgi(fullHttpReply);
23412341
if( find_option("open-config", 0, 0)!=0 ){
23422342
Th_OpenConfig(1);
23432343
}
2344
+ verify_all_options();
23442345
if( g.argc!=3 ){
23452346
usage("script");
23462347
}
23472348
Th_FossilInit(TH_INIT_DEFAULT);
23482349
rc = Th_Eval(g.interp, 0, g.argv[2], -1);
2350
+ zRc = Th_ReturnCodeName(rc, 1);
2351
+ fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
2352
+ Th_PrintTraceLog();
2353
+ if( forceCgi ) cgi_reply();
2354
+}
2355
+
2356
+/*
2357
+** COMMAND: test-th-source
2358
+**
2359
+** Usage: %fossil test-th-source FILE
2360
+**
2361
+** Evaluate the contents of the file named "FILE" as if it were a header
2362
+** or footer or ticket rendering script and show the results on standard
2363
+** output.
2364
+**
2365
+** Options:
2366
+**
2367
+** --cgi Include a CGI response header in the output
2368
+** --http Include an HTTP response header in the output
2369
+** --open-config Open the configuration database
2370
+** --th-trace Trace TH1 execution (for debugging purposes)
2371
+*/
2372
+void test_th_source(void){
2373
+ int rc;
2374
+ const char *zRc;
2375
+ int forceCgi, fullHttpReply;
2376
+ Blob in;
2377
+ Th_InitTraceLog();
2378
+ forceCgi = find_option("cgi", 0, 0)!=0;
2379
+ fullHttpReply = find_option("http", 0, 0)!=0;
2380
+ if( fullHttpReply ) forceCgi = 1;
2381
+ if( forceCgi ) Th_ForceCgi(fullHttpReply);
2382
+ if( find_option("open-config", 0, 0)!=0 ){
2383
+ Th_OpenConfig(1);
2384
+ }
2385
+ verify_all_options();
2386
+ if( g.argc!=3 ){
2387
+ usage("file");
2388
+ }
2389
+ blob_zero(&in);
2390
+ blob_read_from_file(&in, g.argv[2]);
2391
+ Th_FossilInit(TH_INIT_DEFAULT);
2392
+ rc = Th_Eval(g.interp, 0, blob_str(&in), -1);
23492393
zRc = Th_ReturnCodeName(rc, 1);
23502394
fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
23512395
Th_PrintTraceLog();
23522396
if( forceCgi ) cgi_reply();
23532397
}
@@ -2356,11 +2400,11 @@
23562400
/*
23572401
** COMMAND: test-th-hook
23582402
**
23592403
** Usage: %fossil test-th-hook TYPE NAME FLAGS
23602404
**
2361
-** Executes the TH1 script configured for the pre-operation (i.e. a command
2405
+** Evaluates the TH1 script configured for the pre-operation (i.e. a command
23622406
** or web page) "hook" or post-operation "notification". The results of the
23632407
** script evaluation, if any, will be printed to the standard output channel.
23642408
** The NAME argument must be the name of a command or web page; however, it
23652409
** does not necessarily have to be a command or web page that is normally
23662410
** recognized by Fossil. The FLAGS argument will be used to set the value
@@ -2397,10 +2441,11 @@
23972441
Th_InitTraceLog();
23982442
forceCgi = find_option("cgi", 0, 0)!=0;
23992443
fullHttpReply = find_option("http", 0, 0)!=0;
24002444
if( fullHttpReply ) forceCgi = 1;
24012445
if( forceCgi ) Th_ForceCgi(fullHttpReply);
2446
+ verify_all_options();
24022447
if( g.argc<5 ){
24032448
usage("TYPE NAME FLAGS");
24042449
}
24052450
if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){
24062451
rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4]));
24072452
--- src/th_main.c
+++ src/th_main.c
@@ -2291,11 +2291,11 @@
2291 ** --http Include an HTTP response header in the output
2292 ** --open-config Open the configuration database
2293 ** --th-trace Trace TH1 execution (for debugging purposes)
2294 */
2295 void test_th_render(void){
2296 int forceCgi = 0, fullHttpReply = 0;
2297 Blob in;
2298 Th_InitTraceLog();
2299 forceCgi = find_option("cgi", 0, 0)!=0;
2300 fullHttpReply = find_option("http", 0, 0)!=0;
2301 if( fullHttpReply ) forceCgi = 1;
@@ -2318,11 +2318,11 @@
2318 ** COMMAND: test-th-eval
2319 **
2320 ** Usage: %fossil test-th-eval SCRIPT
2321 **
2322 ** Evaluate SCRIPT as if it were a header or footer or ticket rendering
2323 ** script, evaluate it, and show the results on standard output.
2324 **
2325 ** Options:
2326 **
2327 ** --cgi Include a CGI response header in the output
2328 ** --http Include an HTTP response header in the output
@@ -2339,15 +2339,59 @@
2339 if( fullHttpReply ) forceCgi = 1;
2340 if( forceCgi ) Th_ForceCgi(fullHttpReply);
2341 if( find_option("open-config", 0, 0)!=0 ){
2342 Th_OpenConfig(1);
2343 }
 
2344 if( g.argc!=3 ){
2345 usage("script");
2346 }
2347 Th_FossilInit(TH_INIT_DEFAULT);
2348 rc = Th_Eval(g.interp, 0, g.argv[2], -1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2349 zRc = Th_ReturnCodeName(rc, 1);
2350 fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
2351 Th_PrintTraceLog();
2352 if( forceCgi ) cgi_reply();
2353 }
@@ -2356,11 +2400,11 @@
2356 /*
2357 ** COMMAND: test-th-hook
2358 **
2359 ** Usage: %fossil test-th-hook TYPE NAME FLAGS
2360 **
2361 ** Executes the TH1 script configured for the pre-operation (i.e. a command
2362 ** or web page) "hook" or post-operation "notification". The results of the
2363 ** script evaluation, if any, will be printed to the standard output channel.
2364 ** The NAME argument must be the name of a command or web page; however, it
2365 ** does not necessarily have to be a command or web page that is normally
2366 ** recognized by Fossil. The FLAGS argument will be used to set the value
@@ -2397,10 +2441,11 @@
2397 Th_InitTraceLog();
2398 forceCgi = find_option("cgi", 0, 0)!=0;
2399 fullHttpReply = find_option("http", 0, 0)!=0;
2400 if( fullHttpReply ) forceCgi = 1;
2401 if( forceCgi ) Th_ForceCgi(fullHttpReply);
 
2402 if( g.argc<5 ){
2403 usage("TYPE NAME FLAGS");
2404 }
2405 if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){
2406 rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4]));
2407
--- src/th_main.c
+++ src/th_main.c
@@ -2291,11 +2291,11 @@
2291 ** --http Include an HTTP response header in the output
2292 ** --open-config Open the configuration database
2293 ** --th-trace Trace TH1 execution (for debugging purposes)
2294 */
2295 void test_th_render(void){
2296 int forceCgi, fullHttpReply;
2297 Blob in;
2298 Th_InitTraceLog();
2299 forceCgi = find_option("cgi", 0, 0)!=0;
2300 fullHttpReply = find_option("http", 0, 0)!=0;
2301 if( fullHttpReply ) forceCgi = 1;
@@ -2318,11 +2318,11 @@
2318 ** COMMAND: test-th-eval
2319 **
2320 ** Usage: %fossil test-th-eval SCRIPT
2321 **
2322 ** Evaluate SCRIPT as if it were a header or footer or ticket rendering
2323 ** script and show the results on standard output.
2324 **
2325 ** Options:
2326 **
2327 ** --cgi Include a CGI response header in the output
2328 ** --http Include an HTTP response header in the output
@@ -2339,15 +2339,59 @@
2339 if( fullHttpReply ) forceCgi = 1;
2340 if( forceCgi ) Th_ForceCgi(fullHttpReply);
2341 if( find_option("open-config", 0, 0)!=0 ){
2342 Th_OpenConfig(1);
2343 }
2344 verify_all_options();
2345 if( g.argc!=3 ){
2346 usage("script");
2347 }
2348 Th_FossilInit(TH_INIT_DEFAULT);
2349 rc = Th_Eval(g.interp, 0, g.argv[2], -1);
2350 zRc = Th_ReturnCodeName(rc, 1);
2351 fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
2352 Th_PrintTraceLog();
2353 if( forceCgi ) cgi_reply();
2354 }
2355
2356 /*
2357 ** COMMAND: test-th-source
2358 **
2359 ** Usage: %fossil test-th-source FILE
2360 **
2361 ** Evaluate the contents of the file named "FILE" as if it were a header
2362 ** or footer or ticket rendering script and show the results on standard
2363 ** output.
2364 **
2365 ** Options:
2366 **
2367 ** --cgi Include a CGI response header in the output
2368 ** --http Include an HTTP response header in the output
2369 ** --open-config Open the configuration database
2370 ** --th-trace Trace TH1 execution (for debugging purposes)
2371 */
2372 void test_th_source(void){
2373 int rc;
2374 const char *zRc;
2375 int forceCgi, fullHttpReply;
2376 Blob in;
2377 Th_InitTraceLog();
2378 forceCgi = find_option("cgi", 0, 0)!=0;
2379 fullHttpReply = find_option("http", 0, 0)!=0;
2380 if( fullHttpReply ) forceCgi = 1;
2381 if( forceCgi ) Th_ForceCgi(fullHttpReply);
2382 if( find_option("open-config", 0, 0)!=0 ){
2383 Th_OpenConfig(1);
2384 }
2385 verify_all_options();
2386 if( g.argc!=3 ){
2387 usage("file");
2388 }
2389 blob_zero(&in);
2390 blob_read_from_file(&in, g.argv[2]);
2391 Th_FossilInit(TH_INIT_DEFAULT);
2392 rc = Th_Eval(g.interp, 0, blob_str(&in), -1);
2393 zRc = Th_ReturnCodeName(rc, 1);
2394 fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
2395 Th_PrintTraceLog();
2396 if( forceCgi ) cgi_reply();
2397 }
@@ -2356,11 +2400,11 @@
2400 /*
2401 ** COMMAND: test-th-hook
2402 **
2403 ** Usage: %fossil test-th-hook TYPE NAME FLAGS
2404 **
2405 ** Evaluates the TH1 script configured for the pre-operation (i.e. a command
2406 ** or web page) "hook" or post-operation "notification". The results of the
2407 ** script evaluation, if any, will be printed to the standard output channel.
2408 ** The NAME argument must be the name of a command or web page; however, it
2409 ** does not necessarily have to be a command or web page that is normally
2410 ** recognized by Fossil. The FLAGS argument will be used to set the value
@@ -2397,10 +2441,11 @@
2441 Th_InitTraceLog();
2442 forceCgi = find_option("cgi", 0, 0)!=0;
2443 fullHttpReply = find_option("http", 0, 0)!=0;
2444 if( fullHttpReply ) forceCgi = 1;
2445 if( forceCgi ) Th_ForceCgi(fullHttpReply);
2446 verify_all_options();
2447 if( g.argc<5 ){
2448 usage("TYPE NAME FLAGS");
2449 }
2450 if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){
2451 rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4]));
2452
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -1517,11 +1517,11 @@
15171517
if( (tmFlags & TIMELINE_UNHIDE)==0 ){
15181518
timeline_submenu(&url, "Unhide", "unhide", "", 0);
15191519
}
15201520
}else{
15211521
/* Otherwise, a timeline based on a span of time */
1522
- int n, nBefore, nAfter;
1522
+ int n;
15231523
const char *zEType = "timeline item";
15241524
char *zDate;
15251525
Blob cond;
15261526
blob_zero(&cond);
15271527
if( zUses ){
15281528
--- src/timeline.c
+++ src/timeline.c
@@ -1517,11 +1517,11 @@
1517 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1518 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1519 }
1520 }else{
1521 /* Otherwise, a timeline based on a span of time */
1522 int n, nBefore, nAfter;
1523 const char *zEType = "timeline item";
1524 char *zDate;
1525 Blob cond;
1526 blob_zero(&cond);
1527 if( zUses ){
1528
--- src/timeline.c
+++ src/timeline.c
@@ -1517,11 +1517,11 @@
1517 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1518 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1519 }
1520 }else{
1521 /* Otherwise, a timeline based on a span of time */
1522 int n;
1523 const char *zEType = "timeline item";
1524 char *zDate;
1525 Blob cond;
1526 blob_zero(&cond);
1527 if( zUses ){
1528
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -1517,11 +1517,11 @@
15171517
if( (tmFlags & TIMELINE_UNHIDE)==0 ){
15181518
timeline_submenu(&url, "Unhide", "unhide", "", 0);
15191519
}
15201520
}else{
15211521
/* Otherwise, a timeline based on a span of time */
1522
- int n, nBefore, nAfter;
1522
+ int n;
15231523
const char *zEType = "timeline item";
15241524
char *zDate;
15251525
Blob cond;
15261526
blob_zero(&cond);
15271527
if( zUses ){
15281528
--- src/timeline.c
+++ src/timeline.c
@@ -1517,11 +1517,11 @@
1517 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1518 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1519 }
1520 }else{
1521 /* Otherwise, a timeline based on a span of time */
1522 int n, nBefore, nAfter;
1523 const char *zEType = "timeline item";
1524 char *zDate;
1525 Blob cond;
1526 blob_zero(&cond);
1527 if( zUses ){
1528
--- src/timeline.c
+++ src/timeline.c
@@ -1517,11 +1517,11 @@
1517 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1518 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1519 }
1520 }else{
1521 /* Otherwise, a timeline based on a span of time */
1522 int n;
1523 const char *zEType = "timeline item";
1524 char *zDate;
1525 Blob cond;
1526 blob_zero(&cond);
1527 if( zUses ){
1528
--- test/amend.test
+++ test/amend.test
@@ -1,6 +1,22 @@
11
#
2
+# Copyright (c) 2015 D. Richard Hipp
3
+#
4
+# This program is free software; you can redistribute it and/or
5
+# modify it under the terms of the Simplified BSD License (also
6
+# known as the "2-Clause License" or "FreeBSD License".)
7
+#
8
+# This program is distributed in the hope that it will be useful,
9
+# but without any warranty; without even the implied warranty of
10
+# merchantability or fitness for a particular purpose.
11
+#
12
+# Author contact information:
13
+# [email protected]
14
+# http://www.hwaci.com/drh/
15
+#
16
+############################################################################
17
+#
218
# Tests for the "amend" command.
319
#
420
521
proc short_uuid {uuid {len 10}} {
622
string range $uuid 0 $len-1
723
--- test/amend.test
+++ test/amend.test
@@ -1,6 +1,22 @@
1 #
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2 # Tests for the "amend" command.
3 #
4
5 proc short_uuid {uuid {len 10}} {
6 string range $uuid 0 $len-1
7
--- test/amend.test
+++ test/amend.test
@@ -1,6 +1,22 @@
1 #
2 # Copyright (c) 2015 D. Richard Hipp
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the Simplified BSD License (also
6 # known as the "2-Clause License" or "FreeBSD License".)
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but without any warranty; without even the implied warranty of
10 # merchantability or fitness for a particular purpose.
11 #
12 # Author contact information:
13 # [email protected]
14 # http://www.hwaci.com/drh/
15 #
16 ############################################################################
17 #
18 # Tests for the "amend" command.
19 #
20
21 proc short_uuid {uuid {len 10}} {
22 string range $uuid 0 $len-1
23
--- test/merge6.test
+++ test/merge6.test
@@ -62,6 +62,6 @@
6262
fossil ls
6363
6464
test merge_multi-4 {[normalize_result] eq {f1
6565
f2
6666
f3
67
-f4}}
67
+f4}} knownBug
6868
--- test/merge6.test
+++ test/merge6.test
@@ -62,6 +62,6 @@
62 fossil ls
63
64 test merge_multi-4 {[normalize_result] eq {f1
65 f2
66 f3
67 f4}}
68
--- test/merge6.test
+++ test/merge6.test
@@ -62,6 +62,6 @@
62 fossil ls
63
64 test merge_multi-4 {[normalize_result] eq {f1
65 f2
66 f3
67 f4}} knownBug
68
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -156,13 +156,13 @@
156156
}
157157
158158
if {$deletes!=0} {
159159
# failed
160160
protOut "Error, the merge should not delete any file"
161
- test merge_renames-2 0
161
+ test merge_renames-3 0
162162
} else {
163
- test merge_renames-2 1
163
+ test merge_renames-3 1
164164
}
165165
166166
######################################
167167
# Test 4 #
168168
# Reported: Ticket [67176c3aa4] #
@@ -198,14 +198,14 @@
198198
199199
fossil ls
200200
201201
test merge_renames-5 {[normalize_result] eq {f1
202202
f2
203
-f3}}
203
+f3}} knownBug
204204
205205
######################################
206206
#
207207
# Tests for troubles not specifically linked with renames but that I'd like to
208208
# write:
209209
# [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
210210
# [953031915f] - Lack of warning when overwriting extra files
211211
# [4df5f38f1e] - Troubles merging a file delete with a file change
212212
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -156,13 +156,13 @@
156 }
157
158 if {$deletes!=0} {
159 # failed
160 protOut "Error, the merge should not delete any file"
161 test merge_renames-2 0
162 } else {
163 test merge_renames-2 1
164 }
165
166 ######################################
167 # Test 4 #
168 # Reported: Ticket [67176c3aa4] #
@@ -198,14 +198,14 @@
198
199 fossil ls
200
201 test merge_renames-5 {[normalize_result] eq {f1
202 f2
203 f3}}
204
205 ######################################
206 #
207 # Tests for troubles not specifically linked with renames but that I'd like to
208 # write:
209 # [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
210 # [953031915f] - Lack of warning when overwriting extra files
211 # [4df5f38f1e] - Troubles merging a file delete with a file change
212
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -156,13 +156,13 @@
156 }
157
158 if {$deletes!=0} {
159 # failed
160 protOut "Error, the merge should not delete any file"
161 test merge_renames-3 0
162 } else {
163 test merge_renames-3 1
164 }
165
166 ######################################
167 # Test 4 #
168 # Reported: Ticket [67176c3aa4] #
@@ -198,14 +198,14 @@
198
199 fossil ls
200
201 test merge_renames-5 {[normalize_result] eq {f1
202 f2
203 f3}} knownBug
204
205 ######################################
206 #
207 # Tests for troubles not specifically linked with renames but that I'd like to
208 # write:
209 # [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
210 # [953031915f] - Lack of warning when overwriting extra files
211 # [4df5f38f1e] - Troubles merging a file delete with a file change
212
--- test/revert.test
+++ test/revert.test
@@ -1,5 +1,22 @@
1
+#
2
+# Copyright (c) 2013 D. Richard Hipp
3
+#
4
+# This program is free software; you can redistribute it and/or
5
+# modify it under the terms of the Simplified BSD License (also
6
+# known as the "2-Clause License" or "FreeBSD License".)
7
+#
8
+# This program is distributed in the hope that it will be useful,
9
+# but without any warranty; without even the implied warranty of
10
+# merchantability or fitness for a particular purpose.
11
+#
12
+# Author contact information:
13
+# [email protected]
14
+# http://www.hwaci.com/drh/
15
+#
16
+############################################################################
17
+#
118
#
219
# Tests for 'fossil revert'
320
#
421
#
522
623
--- test/revert.test
+++ test/revert.test
@@ -1,5 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1 #
2 # Tests for 'fossil revert'
3 #
4 #
5
6
--- test/revert.test
+++ test/revert.test
@@ -1,5 +1,22 @@
1 #
2 # Copyright (c) 2013 D. Richard Hipp
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the Simplified BSD License (also
6 # known as the "2-Clause License" or "FreeBSD License".)
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but without any warranty; without even the implied warranty of
10 # merchantability or fitness for a particular purpose.
11 #
12 # Author contact information:
13 # [email protected]
14 # http://www.hwaci.com/drh/
15 #
16 ############################################################################
17 #
18 #
19 # Tests for 'fossil revert'
20 #
21 #
22
23
+35 -9
--- test/tester.tcl
+++ test/tester.tcl
@@ -58,10 +58,18 @@
5858
set QUIET 1
5959
set argv [lreplace $argv $i $i]
6060
} else {
6161
set QUIET 0
6262
}
63
+
64
+set i [lsearch $argv -strict]
65
+if {$i>=0} {
66
+ set STRICT 1
67
+ set argv [lreplace $argv $i $i]
68
+} else {
69
+ set STRICT 0
70
+}
6371
6472
if {[llength $argv]==0} {
6573
foreach f [lsort [glob $testdir/*.test]] {
6674
set base [file root [file tail $f]]
6775
lappend argv $base
@@ -327,24 +335,35 @@
327335
}
328336
329337
# Perform a test
330338
#
331339
set test_count 0
332
-proc test {name expr} {
333
- global bad_test test_count RESULT
340
+proc test {name expr {constraints ""}} {
341
+ global bad_test ignored_test test_count RESULT
334342
incr test_count
343
+ set knownBug [expr {"knownBug" in $constraints}]
335344
set r [uplevel 1 [list expr $expr]]
336345
if {$r} {
337
- protOut "test $name OK"
346
+ if {$knownBug && !$::STRICT} {
347
+ protOut "test $name OK (knownBug)?"
348
+ } else {
349
+ protOut "test $name OK"
350
+ }
338351
} else {
339
- protOut "test $name FAILED!" 1
340
- if {$::QUIET} {protOut "RESULT: $RESULT" 1}
341
- lappend bad_test $name
342
- if {$::HALT} exit
352
+ if {$knownBug && !$::STRICT} {
353
+ protOut "test $name FAILED (knownBug)!" 1
354
+ lappend ignored_test $name
355
+ } else {
356
+ protOut "test $name FAILED!" 1
357
+ if {$::QUIET} {protOut "RESULT: $RESULT" 1}
358
+ lappend bad_test $name
359
+ if {$::HALT} exit
360
+ }
343361
}
344362
}
345363
set bad_test {}
364
+set ignored_test {}
346365
347366
# Return a random string N characters long.
348367
#
349368
set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
350369
append vocabulary " ()*^!.eeeeeeeeaaaaattiioo "
@@ -494,10 +513,17 @@
494513
protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
495514
cd $origwd
496515
}
497516
set nErr [llength $bad_test]
498517
if {$nErr>0 || !$::QUIET} {
499
- protOut "***** Final result: $nErr errors out of $test_count tests" 1
518
+ protOut "***** Final results: $nErr errors out of $test_count tests" 1
519
+}
520
+if {$nErr>0} {
521
+ protOut "***** Considered failures: $bad_test" 1
522
+}
523
+set nErr [llength $ignored_test]
524
+if {$nErr>0 || !$::QUIET} {
525
+ protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1
500526
}
501527
if {$nErr>0} {
502
- protOut "***** Failures: $bad_test" 1
528
+ protOut "***** Ignored failures: $ignored_test" 1
503529
}
504530
--- test/tester.tcl
+++ test/tester.tcl
@@ -58,10 +58,18 @@
58 set QUIET 1
59 set argv [lreplace $argv $i $i]
60 } else {
61 set QUIET 0
62 }
 
 
 
 
 
 
 
 
63
64 if {[llength $argv]==0} {
65 foreach f [lsort [glob $testdir/*.test]] {
66 set base [file root [file tail $f]]
67 lappend argv $base
@@ -327,24 +335,35 @@
327 }
328
329 # Perform a test
330 #
331 set test_count 0
332 proc test {name expr} {
333 global bad_test test_count RESULT
334 incr test_count
 
335 set r [uplevel 1 [list expr $expr]]
336 if {$r} {
337 protOut "test $name OK"
 
 
 
 
338 } else {
339 protOut "test $name FAILED!" 1
340 if {$::QUIET} {protOut "RESULT: $RESULT" 1}
341 lappend bad_test $name
342 if {$::HALT} exit
 
 
 
 
 
343 }
344 }
345 set bad_test {}
 
346
347 # Return a random string N characters long.
348 #
349 set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
350 append vocabulary " ()*^!.eeeeeeeeaaaaattiioo "
@@ -494,10 +513,17 @@
494 protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
495 cd $origwd
496 }
497 set nErr [llength $bad_test]
498 if {$nErr>0 || !$::QUIET} {
499 protOut "***** Final result: $nErr errors out of $test_count tests" 1
 
 
 
 
 
 
 
500 }
501 if {$nErr>0} {
502 protOut "***** Failures: $bad_test" 1
503 }
504
--- test/tester.tcl
+++ test/tester.tcl
@@ -58,10 +58,18 @@
58 set QUIET 1
59 set argv [lreplace $argv $i $i]
60 } else {
61 set QUIET 0
62 }
63
64 set i [lsearch $argv -strict]
65 if {$i>=0} {
66 set STRICT 1
67 set argv [lreplace $argv $i $i]
68 } else {
69 set STRICT 0
70 }
71
72 if {[llength $argv]==0} {
73 foreach f [lsort [glob $testdir/*.test]] {
74 set base [file root [file tail $f]]
75 lappend argv $base
@@ -327,24 +335,35 @@
335 }
336
337 # Perform a test
338 #
339 set test_count 0
340 proc test {name expr {constraints ""}} {
341 global bad_test ignored_test test_count RESULT
342 incr test_count
343 set knownBug [expr {"knownBug" in $constraints}]
344 set r [uplevel 1 [list expr $expr]]
345 if {$r} {
346 if {$knownBug && !$::STRICT} {
347 protOut "test $name OK (knownBug)?"
348 } else {
349 protOut "test $name OK"
350 }
351 } else {
352 if {$knownBug && !$::STRICT} {
353 protOut "test $name FAILED (knownBug)!" 1
354 lappend ignored_test $name
355 } else {
356 protOut "test $name FAILED!" 1
357 if {$::QUIET} {protOut "RESULT: $RESULT" 1}
358 lappend bad_test $name
359 if {$::HALT} exit
360 }
361 }
362 }
363 set bad_test {}
364 set ignored_test {}
365
366 # Return a random string N characters long.
367 #
368 set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
369 append vocabulary " ()*^!.eeeeeeeeaaaaattiioo "
@@ -494,10 +513,17 @@
513 protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
514 cd $origwd
515 }
516 set nErr [llength $bad_test]
517 if {$nErr>0 || !$::QUIET} {
518 protOut "***** Final results: $nErr errors out of $test_count tests" 1
519 }
520 if {$nErr>0} {
521 protOut "***** Considered failures: $bad_test" 1
522 }
523 set nErr [llength $ignored_test]
524 if {$nErr>0 || !$::QUIET} {
525 protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1
526 }
527 if {$nErr>0} {
528 protOut "***** Ignored failures: $ignored_test" 1
529 }
530
--- test/th1.test
+++ test/th1.test
@@ -1436,5 +1436,22 @@
14361436
14371437
###############################################################################
14381438
14391439
fossil test-th-eval {set tcl_platform(platform)}
14401440
test th1-platform-4 {$RESULT eq "windows" || $RESULT eq "unix"}
1441
+
1442
+###############################################################################
1443
+
1444
+set th1FileName [file join $::tempPath th1-[pid].th1]
1445
+
1446
+write_file $th1FileName {
1447
+ set x ""
1448
+ for {set i 0} {$i < 10} {set i [expr {$i + 1}]} {
1449
+ set x "$x $i"
1450
+ }
1451
+ return [string trim $x]
1452
+ set y; # NOTE: Never hit.
1453
+}
1454
+
1455
+fossil test-th-source $th1FileName
1456
+test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}}
1457
+file delete $th1FileName
14411458
--- test/th1.test
+++ test/th1.test
@@ -1436,5 +1436,22 @@
1436
1437 ###############################################################################
1438
1439 fossil test-th-eval {set tcl_platform(platform)}
1440 test th1-platform-4 {$RESULT eq "windows" || $RESULT eq "unix"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1441
--- test/th1.test
+++ test/th1.test
@@ -1436,5 +1436,22 @@
1436
1437 ###############################################################################
1438
1439 fossil test-th-eval {set tcl_platform(platform)}
1440 test th1-platform-4 {$RESULT eq "windows" || $RESULT eq "unix"}
1441
1442 ###############################################################################
1443
1444 set th1FileName [file join $::tempPath th1-[pid].th1]
1445
1446 write_file $th1FileName {
1447 set x ""
1448 for {set i 0} {$i < 10} {set i [expr {$i + 1}]} {
1449 set x "$x $i"
1450 }
1451 return [string trim $x]
1452 set y; # NOTE: Never hit.
1453 }
1454
1455 fossil test-th-source $th1FileName
1456 test th1-source-1 {$RESULT eq {TH_RETURN: 0 1 2 3 4 5 6 7 8 9}}
1457 file delete $th1FileName
1458
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -158,11 +158,11 @@
158158
#### The directories where the OpenSSL include and library files are located.
159159
# The recommended usage here is to use the Sysinternals junction tool
160160
# to create a hard link between an "openssl-1.x" sub-directory of the
161161
# Fossil source code directory and the target OpenSSL source directory.
162162
#
163
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e
163
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f
164164
OPENSSLINCDIR = $(OPENSSLDIR)/include
165165
OPENSSLLIBDIR = $(OPENSSLDIR)
166166
167167
#### Either the directory where the Tcl library is installed or the Tcl
168168
# source code directory resides (depending on the value of the macro
169169
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -158,11 +158,11 @@
158 #### The directories where the OpenSSL include and library files are located.
159 # The recommended usage here is to use the Sysinternals junction tool
160 # to create a hard link between an "openssl-1.x" sub-directory of the
161 # Fossil source code directory and the target OpenSSL source directory.
162 #
163 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e
164 OPENSSLINCDIR = $(OPENSSLDIR)/include
165 OPENSSLLIBDIR = $(OPENSSLDIR)
166
167 #### Either the directory where the Tcl library is installed or the Tcl
168 # source code directory resides (depending on the value of the macro
169
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -158,11 +158,11 @@
158 #### The directories where the OpenSSL include and library files are located.
159 # The recommended usage here is to use the Sysinternals junction tool
160 # to create a hard link between an "openssl-1.x" sub-directory of the
161 # Fossil source code directory and the target OpenSSL source directory.
162 #
163 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f
164 OPENSSLINCDIR = $(OPENSSLDIR)/include
165 OPENSSLLIBDIR = $(OPENSSLDIR)
166
167 #### Either the directory where the Tcl library is installed or the Tcl
168 # source code directory resides (depending on the value of the macro
169
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -158,11 +158,11 @@
158158
#### The directories where the OpenSSL include and library files are located.
159159
# The recommended usage here is to use the Sysinternals junction tool
160160
# to create a hard link between an "openssl-1.x" sub-directory of the
161161
# Fossil source code directory and the target OpenSSL source directory.
162162
#
163
-OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e
163
+OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f
164164
OPENSSLINCDIR = $(OPENSSLDIR)/include
165165
OPENSSLLIBDIR = $(OPENSSLDIR)
166166
167167
#### Either the directory where the Tcl library is installed or the Tcl
168168
# source code directory resides (depending on the value of the macro
169169
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -158,11 +158,11 @@
158 #### The directories where the OpenSSL include and library files are located.
159 # The recommended usage here is to use the Sysinternals junction tool
160 # to create a hard link between an "openssl-1.x" sub-directory of the
161 # Fossil source code directory and the target OpenSSL source directory.
162 #
163 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2e
164 OPENSSLINCDIR = $(OPENSSLDIR)/include
165 OPENSSLLIBDIR = $(OPENSSLDIR)
166
167 #### Either the directory where the Tcl library is installed or the Tcl
168 # source code directory resides (depending on the value of the macro
169
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -158,11 +158,11 @@
158 #### The directories where the OpenSSL include and library files are located.
159 # The recommended usage here is to use the Sysinternals junction tool
160 # to create a hard link between an "openssl-1.x" sub-directory of the
161 # Fossil source code directory and the target OpenSSL source directory.
162 #
163 OPENSSLDIR = $(SRCDIR)/../compat/openssl-1.0.2f
164 OPENSSLINCDIR = $(OPENSSLDIR)/include
165 OPENSSLLIBDIR = $(OPENSSLDIR)
166
167 #### Either the directory where the Tcl library is installed or the Tcl
168 # source code directory resides (depending on the value of the macro
169
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -93,11 +93,11 @@
9393
!ifndef FOSSIL_ENABLE_WINXP
9494
FOSSIL_ENABLE_WINXP = 0
9595
!endif
9696
9797
!if $(FOSSIL_ENABLE_SSL)!=0
98
-SSLDIR = $(B)\compat\openssl-1.0.2e
98
+SSLDIR = $(B)\compat\openssl-1.0.2f
9999
SSLINCDIR = $(SSLDIR)\inc32
100100
!if $(FOSSIL_DYNAMIC_BUILD)!=0
101101
SSLLIBDIR = $(SSLDIR)\out32dll
102102
!else
103103
SSLLIBDIR = $(SSLDIR)\out32
104104
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -93,11 +93,11 @@
93 !ifndef FOSSIL_ENABLE_WINXP
94 FOSSIL_ENABLE_WINXP = 0
95 !endif
96
97 !if $(FOSSIL_ENABLE_SSL)!=0
98 SSLDIR = $(B)\compat\openssl-1.0.2e
99 SSLINCDIR = $(SSLDIR)\inc32
100 !if $(FOSSIL_DYNAMIC_BUILD)!=0
101 SSLLIBDIR = $(SSLDIR)\out32dll
102 !else
103 SSLLIBDIR = $(SSLDIR)\out32
104
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -93,11 +93,11 @@
93 !ifndef FOSSIL_ENABLE_WINXP
94 FOSSIL_ENABLE_WINXP = 0
95 !endif
96
97 !if $(FOSSIL_ENABLE_SSL)!=0
98 SSLDIR = $(B)\compat\openssl-1.0.2f
99 SSLINCDIR = $(SSLDIR)\inc32
100 !if $(FOSSIL_DYNAMIC_BUILD)!=0
101 SSLLIBDIR = $(SSLDIR)\out32dll
102 !else
103 SSLLIBDIR = $(SSLDIR)\out32
104
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -259,12 +259,14 @@
259259
CALL :fn_UnsetVariable PFILES_SDK71A
260260
SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1
261261
GOTO :EOF
262262
263263
:fn_UnsetVariable
264
- IF NOT "%1" == "" (
265
- SET %1=
264
+ SET VALUE=%1
265
+ IF DEFINED VALUE (
266
+ SET %VALUE%=
267
+ SET VALUE=
266268
CALL :fn_ResetErrorLevel
267269
)
268270
GOTO :EOF
269271
270272
:fn_ResetErrorLevel
271273
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -259,12 +259,14 @@
259 CALL :fn_UnsetVariable PFILES_SDK71A
260 SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1
261 GOTO :EOF
262
263 :fn_UnsetVariable
264 IF NOT "%1" == "" (
265 SET %1=
 
 
266 CALL :fn_ResetErrorLevel
267 )
268 GOTO :EOF
269
270 :fn_ResetErrorLevel
271
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -259,12 +259,14 @@
259 CALL :fn_UnsetVariable PFILES_SDK71A
260 SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1
261 GOTO :EOF
262
263 :fn_UnsetVariable
264 SET VALUE=%1
265 IF DEFINED VALUE (
266 SET %VALUE%=
267 SET VALUE=
268 CALL :fn_ResetErrorLevel
269 )
270 GOTO :EOF
271
272 :fn_ResetErrorLevel
273
+14 -8
--- www/build.wiki
+++ www/build.wiki
@@ -111,23 +111,29 @@
111111
<li><p><i>Unix without running "configure"</i> → if you prefer to avoid
112112
running configure, you can also use: <b>make -f Makefile.classic</b>. You may
113113
want to make minor edits to Makefile.classic to configure the build for your
114114
system.
115115
116
-<li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile:
117
-"<b>make -f win/Makefile.mingw</b>". On a Windows box you will
118
-need either Cygwin or Msys as build environment. On Cygwin, Linux
119
-or Darwin you may want to make minor edits to win/Makefile.mingw
120
-to configure the cross-compile environment.
116
+<li><p><i>MinGW 3.x (<u>not</u> 4.x) / MinGW-w64</i> → Use the MinGW makefile:
117
+"<b>make -f win/Makefile.mingw</b>". On a Windows box you will need either
118
+Cygwin or Msys as build environment. On Cygwin, Linux or Darwin you may want
119
+to make minor edits to win/Makefile.mingw to configure the cross-compile
120
+environment.
121121
122122
To enable the native [./th1.md#tclEval | Tcl integration feature], use a
123123
command line like the following (all on one line):
124124
125125
<b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b>
126126
127
-Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see
128
-<a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>.
127
+Alternatively, <b>./configure</b> may now be used to create a Makefile
128
+suitable for use with MinGW; however, options passed to configure that are
129
+not applicable on Windows may cause the configuration or compilation to fail
130
+(e.g. fusefs, internal-sqlite, etc).
131
+
132
+<i>HINT</i>: Do <u>not</u> use MinGW-4.x, it may compile but the Fossil binary
133
+will not work correctly, see
134
+[https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c | ticket].
129135
130136
<li><p><i>MSVC</i> → Use the MSVC makefile. First
131137
change to the "win/" subdirectory ("<b>cd win</b>") then run
132138
"<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch
133139
file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to
@@ -135,11 +141,11 @@
135141
the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
136142
first <a href="https://www.openssl.org/source/">download the official
137143
source code for OpenSSL</a> and extract it to an appropriately named
138144
"<b>openssl-X.Y.ZA</b>" subdirectory within the local
139145
[/tree?ci=trunk&name=compat | compat] directory (e.g.
140
-"<b>compat/openssl-1.0.2e</b>"), then make sure that some recent
146
+"<b>compat/openssl-1.0.2f</b>"), then make sure that some recent
141147
<a href="http://www.perl.org/">Perl</a> binaries are installed locally,
142148
and finally run one of the following commands:
143149
<blockquote><pre>
144150
nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
145151
</pre></blockquote>
146152
--- www/build.wiki
+++ www/build.wiki
@@ -111,23 +111,29 @@
111 <li><p><i>Unix without running "configure"</i> → if you prefer to avoid
112 running configure, you can also use: <b>make -f Makefile.classic</b>. You may
113 want to make minor edits to Makefile.classic to configure the build for your
114 system.
115
116 <li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile:
117 "<b>make -f win/Makefile.mingw</b>". On a Windows box you will
118 need either Cygwin or Msys as build environment. On Cygwin, Linux
119 or Darwin you may want to make minor edits to win/Makefile.mingw
120 to configure the cross-compile environment.
121
122 To enable the native [./th1.md#tclEval | Tcl integration feature], use a
123 command line like the following (all on one line):
124
125 <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b>
126
127 Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see
128 <a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>.
 
 
 
 
 
 
129
130 <li><p><i>MSVC</i> → Use the MSVC makefile. First
131 change to the "win/" subdirectory ("<b>cd win</b>") then run
132 "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch
133 file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to
@@ -135,11 +141,11 @@
135 the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
136 first <a href="https://www.openssl.org/source/">download the official
137 source code for OpenSSL</a> and extract it to an appropriately named
138 "<b>openssl-X.Y.ZA</b>" subdirectory within the local
139 [/tree?ci=trunk&name=compat | compat] directory (e.g.
140 "<b>compat/openssl-1.0.2e</b>"), then make sure that some recent
141 <a href="http://www.perl.org/">Perl</a> binaries are installed locally,
142 and finally run one of the following commands:
143 <blockquote><pre>
144 nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
145 </pre></blockquote>
146
--- www/build.wiki
+++ www/build.wiki
@@ -111,23 +111,29 @@
111 <li><p><i>Unix without running "configure"</i> → if you prefer to avoid
112 running configure, you can also use: <b>make -f Makefile.classic</b>. You may
113 want to make minor edits to Makefile.classic to configure the build for your
114 system.
115
116 <li><p><i>MinGW 3.x (<u>not</u> 4.x) / MinGW-w64</i> → Use the MinGW makefile:
117 "<b>make -f win/Makefile.mingw</b>". On a Windows box you will need either
118 Cygwin or Msys as build environment. On Cygwin, Linux or Darwin you may want
119 to make minor edits to win/Makefile.mingw to configure the cross-compile
120 environment.
121
122 To enable the native [./th1.md#tclEval | Tcl integration feature], use a
123 command line like the following (all on one line):
124
125 <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b>
126
127 Alternatively, <b>./configure</b> may now be used to create a Makefile
128 suitable for use with MinGW; however, options passed to configure that are
129 not applicable on Windows may cause the configuration or compilation to fail
130 (e.g. fusefs, internal-sqlite, etc).
131
132 <i>HINT</i>: Do <u>not</u> use MinGW-4.x, it may compile but the Fossil binary
133 will not work correctly, see
134 [https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c | ticket].
135
136 <li><p><i>MSVC</i> → Use the MSVC makefile. First
137 change to the "win/" subdirectory ("<b>cd win</b>") then run
138 "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch
139 file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to
@@ -135,11 +141,11 @@
141 the optional <a href="https://www.openssl.org/">OpenSSL</a> support,
142 first <a href="https://www.openssl.org/source/">download the official
143 source code for OpenSSL</a> and extract it to an appropriately named
144 "<b>openssl-X.Y.ZA</b>" subdirectory within the local
145 [/tree?ci=trunk&name=compat | compat] directory (e.g.
146 "<b>compat/openssl-1.0.2f</b>"), then make sure that some recent
147 <a href="http://www.perl.org/">Perl</a> binaries are installed locally,
148 and finally run one of the following commands:
149 <blockquote><pre>
150 nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin
151 </pre></blockquote>
152

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button