Fossil SCM

Bring in fixes and new release code.

amb 2013-09-13 02:41 ssh-transport-changes merge
Commit a359ef8f20e878e1b03d503bac69e20a5a7a2ab1
+1 -1
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1
-1.26
1
+1.27
22
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 1.26
2
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 1.27
2
+2 -2
--- src/branch.c
+++ src/branch.c
@@ -325,12 +325,12 @@
325325
}
326326
login_anonymous_available();
327327
style_sidebox_begin("Nomenclature:", "33%");
328328
@ <ol>
329329
@ <li> An <div class="sideboxDescribed">%z(href("brlist"))
330
- @ open branch</a></div> is a branch that has one or
331
- @ more %z(href("leaves"))open leaves.</a>
330
+ @ open branch</a></div> is a branch that has one or more
331
+ @ <div class="sideboxDescribed">%z(href("leaves"))open leaves.</a></div>
332332
@ The presence of open leaves presumably means
333333
@ that the branch is still being extended with new check-ins.</li>
334334
@ <li> A <div class="sideboxDescribed">%z(href("brlist?closed"))
335335
@ closed branch</a></div> is a branch with only
336336
@ <div class="sideboxDescribed">%z(href("leaves?closed"))
337337
--- src/branch.c
+++ src/branch.c
@@ -325,12 +325,12 @@
325 }
326 login_anonymous_available();
327 style_sidebox_begin("Nomenclature:", "33%");
328 @ <ol>
329 @ <li> An <div class="sideboxDescribed">%z(href("brlist"))
330 @ open branch</a></div> is a branch that has one or
331 @ more %z(href("leaves"))open leaves.</a>
332 @ The presence of open leaves presumably means
333 @ that the branch is still being extended with new check-ins.</li>
334 @ <li> A <div class="sideboxDescribed">%z(href("brlist?closed"))
335 @ closed branch</a></div> is a branch with only
336 @ <div class="sideboxDescribed">%z(href("leaves?closed"))
337
--- src/branch.c
+++ src/branch.c
@@ -325,12 +325,12 @@
325 }
326 login_anonymous_available();
327 style_sidebox_begin("Nomenclature:", "33%");
328 @ <ol>
329 @ <li> An <div class="sideboxDescribed">%z(href("brlist"))
330 @ open branch</a></div> is a branch that has one or more
331 @ <div class="sideboxDescribed">%z(href("leaves"))open leaves.</a></div>
332 @ The presence of open leaves presumably means
333 @ that the branch is still being extended with new check-ins.</li>
334 @ <li> A <div class="sideboxDescribed">%z(href("brlist?closed"))
335 @ closed branch</a></div> is a branch with only
336 @ <div class="sideboxDescribed">%z(href("leaves?closed"))
337
+1
--- src/cgi.c
+++ src/cgi.c
@@ -43,10 +43,11 @@
4343
#include <unistd.h>
4444
#include "cgi.h"
4545
#ifdef __CYGWIN__
4646
__declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
4747
void *, void *, void *, int);
48
+ __declspec(dllimport) extern __stdcall size_t wcslen(const wchar_t *);
4849
#endif
4950
5051
#if INTERFACE
5152
/*
5253
** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
5354
--- src/cgi.c
+++ src/cgi.c
@@ -43,10 +43,11 @@
43 #include <unistd.h>
44 #include "cgi.h"
45 #ifdef __CYGWIN__
46 __declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
47 void *, void *, void *, int);
 
48 #endif
49
50 #if INTERFACE
51 /*
52 ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
53
--- src/cgi.c
+++ src/cgi.c
@@ -43,10 +43,11 @@
43 #include <unistd.h>
44 #include "cgi.h"
45 #ifdef __CYGWIN__
46 __declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
47 void *, void *, void *, int);
48 __declspec(dllimport) extern __stdcall size_t wcslen(const wchar_t *);
49 #endif
50
51 #if INTERFACE
52 /*
53 ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
54
+1
--- src/cgi.c
+++ src/cgi.c
@@ -43,10 +43,11 @@
4343
#include <unistd.h>
4444
#include "cgi.h"
4545
#ifdef __CYGWIN__
4646
__declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
4747
void *, void *, void *, int);
48
+ __declspec(dllimport) extern __stdcall size_t wcslen(const wchar_t *);
4849
#endif
4950
5051
#if INTERFACE
5152
/*
5253
** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
5354
--- src/cgi.c
+++ src/cgi.c
@@ -43,10 +43,11 @@
43 #include <unistd.h>
44 #include "cgi.h"
45 #ifdef __CYGWIN__
46 __declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
47 void *, void *, void *, int);
 
48 #endif
49
50 #if INTERFACE
51 /*
52 ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
53
--- src/cgi.c
+++ src/cgi.c
@@ -43,10 +43,11 @@
43 #include <unistd.h>
44 #include "cgi.h"
45 #ifdef __CYGWIN__
46 __declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
47 void *, void *, void *, int);
48 __declspec(dllimport) extern __stdcall size_t wcslen(const wchar_t *);
49 #endif
50
51 #if INTERFACE
52 /*
53 ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
54
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -30,11 +30,11 @@
3030
/* Determine the integer type use to parse non-floating point numbers */
3131
#ifdef _WIN32
3232
typedef __int64 JSON_int_t;
3333
#define JSON_PARSER_INTEGER_SSCANF_TOKEN "%I64d"
3434
#define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%I64d"
35
-#elif (__STDC_VERSION__ >= 199901L) || (HAVE_LONG_LONG == 1)
35
+#elif __STDC_VERSION__ >= 199901L || HAVE_LONG_LONG == 1
3636
typedef long long JSON_int_t;
3737
#define JSON_PARSER_INTEGER_SSCANF_TOKEN "%lld"
3838
#define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%lld"
3939
#else
4040
typedef long JSON_int_t;
@@ -103,11 +103,11 @@
103103
JSON_T_NULL, JSON_T_TRUE, and JSON_T_FALSE. String values are always returned
104104
as zero-terminated C strings.
105105
106106
\return Non-zero if parsing should continue, else zero.
107107
*/
108
-typedef int (*JSON_parser_callback)(void* ctx, int type, const struct JSON_value_struct* value);
108
+typedef int (*JSON_parser_callback)(void* ctx, int type, const JSON_value* value);
109109
110110
111111
/**
112112
A typedef for allocator functions semantically compatible with malloc().
113113
*/
@@ -233,11 +233,11 @@
233233
234234
#endif /* JSON_PARSER_H */
235235
/* end file parser/JSON_parser.h */
236236
/* begin file parser/JSON_parser.c */
237237
/*
238
-Copyright (c) 2005 JSON.org
238
+Copyright (c) 2007-2013 Jean Gressmann ([email protected])
239239
240240
Permission is hereby granted, free of charge, to any person obtaining a copy
241241
of this software and associated documentation files (the "Software"), to deal
242242
in the Software without restriction, including without limitation the rights
243243
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -245,12 +245,10 @@
245245
furnished to do so, subject to the following conditions:
246246
247247
The above copyright notice and this permission notice shall be included in all
248248
copies or substantial portions of the Software.
249249
250
-The Software shall be used for Good, not Evil.
251
-
252250
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
253251
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
254252
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
255253
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
256254
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@@ -257,49 +255,52 @@
257255
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
258256
SOFTWARE.
259257
*/
260258
261259
/*
262
- Callbacks, comments, Unicode handling by Jean Gressmann ([email protected]), 2007-2010.
263
-
264
-
265260
Changelog:
261
+ 2013-09-08
262
+ Updated license to to be compatible with Debian license requirements.
263
+
264
+ 2012-06-06
265
+ Fix for invalid UTF16 characters and some comment fixex ([email protected]).
266
+
266267
2010-11-25
267268
Support for custom memory allocation ([email protected]).
268
-
269
+
269270
2010-05-07
270
- Added error handling for memory allocation failure ([email protected]).
271
+ Added error handling for memory allocation failure ([email protected]).
271272
Added diagnosis errors for invalid JSON.
272
-
273
+
273274
2010-03-25
274275
Fixed buffer overrun in grow_parse_buffer & cleaned up code.
275
-
276
+
276277
2009-10-19
277
- Replaced long double in JSON_value_struct with double after reports
278
+ Replaced long double in JSON_value_struct with double after reports
278279
of strtold being broken on some platforms ([email protected]).
279
-
280
- 2009-05-17
280
+
281
+ 2009-05-17
281282
Incorporated [email protected] fix for UTF16 decoding.
282
-
283
- 2009-05-14
283
+
284
+ 2009-05-14
284285
Fixed float parsing bug related to a locale being set that didn't
285286
use '.' as decimal point character ([email protected]).
286
-
287
- 2008-10-14
287
+
288
+ 2008-10-14
288289
Renamed states.IN to states.IT to avoid name clash which IN macro
289290
defined in windef.h ([email protected])
290
-
291
- 2008-07-19
291
+
292
+ 2008-07-19
292293
Removed some duplicate code & debugging variable ([email protected])
293
-
294
- 2008-05-28
295
- Made JSON_value structure ansi C compliant. This bug was report by
294
+
295
+ 2008-05-28
296
+ Made JSON_value structure ansi C compliant. This bug was report by
296297
[email protected]
297
-
298
- 2008-05-20
299
- Fixed bug reported by [email protected] where the switching
300
- from static to dynamic parse buffer did not copy the static parse
298
+
299
+ 2008-05-20
300
+ Fixed bug reported by [email protected] where the switching
301
+ from static to dynamic parse buffer did not copy the static parse
301302
buffer's content.
302303
*/
303304
304305
305306
@@ -362,11 +363,11 @@
362363
char static_parse_buffer[JSON_PARSER_PARSE_BUFFER_SIZE];
363364
JSON_malloc_t malloc;
364365
JSON_free_t free;
365366
};
366367
367
-#define COUNTOF(x) (sizeof(x)/sizeof(x[0]))
368
+#define COUNTOF(x) (sizeof(x)/sizeof(x[0]))
368369
369370
/*
370371
Characters are mapped into these character classes. This allows for
371372
a significant reduction in the size of the state transition table.
372373
*/
@@ -403,11 +404,11 @@
403404
C_LOW_T, /* t */
404405
C_LOW_U, /* u */
405406
C_ABCDF, /* ABCDF */
406407
C_E, /* E */
407408
C_ETC, /* everything else */
408
- C_STAR, /* * */
409
+ C_STAR, /* * */
409410
NR_CLASSES
410411
};
411412
412413
static const signed char ascii_class[128] = {
413414
/*
@@ -419,11 +420,11 @@
419420
__, C_WHITE, C_WHITE, __, __, C_WHITE, __, __,
420421
__, __, __, __, __, __, __, __,
421422
__, __, __, __, __, __, __, __,
422423
423424
C_SPACE, C_ETC, C_QUOTE, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
424
- C_ETC, C_ETC, C_STAR, C_PLUS, C_COMMA, C_MINUS, C_POINT, C_SLASH,
425
+ C_ETC, C_ETC, C_STAR, C_PLUS, C_COMMA, C_MINUS, C_POINT, C_SLASH,
425426
C_ZERO, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT,
426427
C_DIGIT, C_DIGIT, C_COLON, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
427428
428429
C_ETC, C_ABCDF, C_ABCDF, C_ABCDF, C_ABCDF, C_E, C_ABCDF, C_ETC,
429430
C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
@@ -536,11 +537,11 @@
536537
/*false F4*/ {__,__,__,__,__,__,__,__,__,__,CB,__,__,__,__,__,__,__,__,__,OK,__,__,__,__,__,__,__,__,__,__,__},
537538
/*nu N1*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,N2,__,__,__,__},
538539
/*nul N2*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,N3,__,__,__,__,__,__,__,__,__},
539540
/*null N3*/ {__,__,__,__,__,__,__,__,__,__,CB,__,__,__,__,__,__,__,__,__,__,__,OK,__,__,__,__,__,__,__,__,__},
540541
/*/ C1*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,C2},
541
-/*/* C2*/ {C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C3},
542
+/*/star C2*/ {C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C3},
542543
/** C3*/ {C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,CE,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C3},
543544
/*_. FX*/ {OK,OK,__,-8,__,-7,__,-3,__,__,__,__,__,__,FR,FR,__,__,__,__,E1,__,__,__,__,__,__,__,__,E1,__,__},
544545
/*\ D1*/ {__,__,__,__,__,__,__,__,__,D2,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__},
545546
/*\ D2*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,U1,__,__,__,__},
546547
};
@@ -548,27 +549,27 @@
548549
549550
/*
550551
These modes can be pushed on the stack.
551552
*/
552553
enum modes {
553
- MODE_ARRAY = 1,
554
- MODE_DONE = 2,
555
- MODE_KEY = 3,
554
+ MODE_ARRAY = 1,
555
+ MODE_DONE = 2,
556
+ MODE_KEY = 3,
556557
MODE_OBJECT = 4
557558
};
558559
559560
static void set_error(JSON_parser jc)
560561
{
561562
switch (jc->state) {
562563
case GO:
563564
switch (jc->current_char) {
564
- case '{': case '}': case '[': case ']':
565
+ case '{': case '}': case '[': case ']':
565566
jc->error = JSON_E_UNBALANCED_COLLECTION;
566567
break;
567568
default:
568569
jc->error = JSON_E_INVALID_CHAR;
569
- break;
570
+ break;
570571
}
571572
break;
572573
case OB:
573574
jc->error = JSON_E_EXPECTED_KEY;
574575
break;
@@ -604,11 +605,11 @@
604605
{
605606
/*
606607
Push a mode onto the stack. Return false if there is overflow.
607608
*/
608609
assert(jc->top <= jc->stack_capacity);
609
-
610
+
610611
if (jc->depth < 0) {
611612
if (jc->top == jc->stack_capacity) {
612613
const size_t bytes_to_copy = jc->stack_capacity * sizeof(jc->stack[0]);
613614
const size_t new_capacity = jc->stack_capacity * 2;
614615
const size_t bytes_to_allocate = new_capacity * sizeof(jc->stack[0]);
@@ -653,17 +654,17 @@
653654
#define parse_buffer_clear(jc) \
654655
do {\
655656
jc->parse_buffer_count = 0;\
656657
jc->parse_buffer[0] = 0;\
657658
} while (0)
658
-
659
+
659660
#define parse_buffer_pop_back_char(jc)\
660661
do {\
661662
assert(jc->parse_buffer_count >= 1);\
662663
--jc->parse_buffer_count;\
663664
jc->parse_buffer[jc->parse_buffer_count] = 0;\
664
- } while (0)
665
+ } while (0)
665666
666667
667668
668669
void delete_JSON_parser(JSON_parser jc)
669670
{
@@ -673,25 +674,25 @@
673674
}
674675
if (jc->parse_buffer != &jc->static_parse_buffer[0]) {
675676
jc->free((void*)jc->parse_buffer);
676677
}
677678
jc->free((void*)jc);
678
- }
679
+ }
679680
}
680681
681682
int JSON_parser_reset(JSON_parser jc)
682683
{
683684
if (NULL == jc) {
684685
return false;
685686
}
686
-
687
+
687688
jc->state = GO;
688689
jc->top = -1;
689690
690691
/* parser has been used previously? */
691692
if (NULL == jc->parse_buffer) {
692
-
693
+
693694
/* Do we want non-bound stack? */
694695
if (jc->depth > 0) {
695696
jc->stack_capacity = jc->depth;
696697
if (jc->depth <= (int)COUNTOF(jc->static_stack)) {
697698
jc->stack = &jc->static_stack[0];
@@ -705,20 +706,20 @@
705706
} else {
706707
jc->stack_capacity = (int)COUNTOF(jc->static_stack);
707708
jc->depth = -1;
708709
jc->stack = &jc->static_stack[0];
709710
}
710
-
711
+
711712
/* set up the parse buffer */
712713
jc->parse_buffer = &jc->static_parse_buffer[0];
713714
jc->parse_buffer_capacity = COUNTOF(jc->static_parse_buffer);
714715
}
715
-
716
+
716717
/* set parser to start */
717718
push(jc, MODE_DONE);
718719
parse_buffer_clear(jc);
719
-
720
+
720721
return true;
721722
}
722723
723724
JSON_parser
724725
new_JSON_parser(JSON_config const * config)
@@ -735,29 +736,29 @@
735736
736737
int use_std_malloc = false;
737738
JSON_config default_config;
738739
JSON_parser jc;
739740
JSON_malloc_t alloc;
740
-
741
+
741742
/* set to default configuration if none was provided */
742743
if (NULL == config) {
743744
/* initialize configuration */
744745
init_JSON_config(&default_config);
745746
config = &default_config;
746747
}
747
-
748
+
748749
/* use std malloc if either the allocator or deallocator function isn't set */
749750
use_std_malloc = NULL == config->malloc || NULL == config->free;
750
-
751
+
751752
alloc = use_std_malloc ? malloc : config->malloc;
752
-
753
- jc = JSON_parser_malloc(alloc, sizeof(*jc), "parser");
754
-
753
+
754
+ jc = (JSON_parser)JSON_parser_malloc(alloc, sizeof(*jc), "parser");
755
+
755756
if (NULL == jc) {
756757
return NULL;
757758
}
758
-
759
+
759760
/* configure the parser */
760761
memset(jc, 0, sizeof(*jc));
761762
jc->malloc = alloc;
762763
jc->free = use_std_malloc ? free : config->free;
763764
jc->callback = config->callback;
@@ -765,42 +766,42 @@
765766
jc->allow_comments = (signed char)(config->allow_comments != 0);
766767
jc->handle_floats_manually = (signed char)(config->handle_floats_manually != 0);
767768
jc->decimal_point = *localeconv()->decimal_point;
768769
/* We need to be able to push at least one object */
769770
jc->depth = config->depth == 0 ? 1 : config->depth;
770
-
771
+
771772
/* reset the parser */
772773
if (!JSON_parser_reset(jc)) {
773774
jc->free(jc);
774775
return NULL;
775776
}
776
-
777
+
777778
return jc;
778779
}
779780
780781
static int parse_buffer_grow(JSON_parser jc)
781782
{
782783
const size_t bytes_to_copy = jc->parse_buffer_count * sizeof(jc->parse_buffer[0]);
783784
const size_t new_capacity = jc->parse_buffer_capacity * 2;
784785
const size_t bytes_to_allocate = new_capacity * sizeof(jc->parse_buffer[0]);
785786
void* mem = JSON_parser_malloc(jc->malloc, bytes_to_allocate, "parse buffer");
786
-
787
+
787788
if (mem == NULL) {
788789
jc->error = JSON_E_OUT_OF_MEMORY;
789790
return false;
790791
}
791
-
792
+
792793
assert(new_capacity > 0);
793794
memcpy(mem, jc->parse_buffer, bytes_to_copy);
794
-
795
+
795796
if (jc->parse_buffer != &jc->static_parse_buffer[0]) {
796797
jc->free(jc->parse_buffer);
797798
}
798
-
799
+
799800
jc->parse_buffer = (char*)mem;
800801
jc->parse_buffer_capacity = new_capacity;
801
-
802
+
802803
return true;
803804
}
804805
805806
static int parse_buffer_reserve_for(JSON_parser jc, unsigned chars)
806807
{
@@ -808,11 +809,11 @@
808809
if (!parse_buffer_grow(jc)) {
809810
assert(jc->error == JSON_E_OUT_OF_MEMORY);
810811
return false;
811812
}
812813
}
813
-
814
+
814815
return true;
815816
}
816817
817818
#define parse_buffer_has_space_for(jc, count) \
818819
(jc->parse_buffer_count + (count) + 1 <= jc->parse_buffer_capacity)
@@ -830,27 +831,27 @@
830831
jc->type == JSON_T_FALSE || \
831832
jc->type == JSON_T_TRUE || \
832833
jc->type == JSON_T_FLOAT || \
833834
jc->type == JSON_T_INTEGER || \
834835
jc->type == JSON_T_STRING)
835
-
836
+
836837
837838
static int parse_parse_buffer(JSON_parser jc)
838839
{
839840
if (jc->callback) {
840841
JSON_value value, *arg = NULL;
841
-
842
+
842843
if (jc->type != JSON_T_NONE) {
843844
assert_is_non_container_type(jc);
844
-
845
+
845846
switch(jc->type) {
846847
case JSON_T_FLOAT:
847848
arg = &value;
848849
if (jc->handle_floats_manually) {
849850
value.vu.str.value = jc->parse_buffer;
850851
value.vu.str.length = jc->parse_buffer_count;
851
- } else {
852
+ } else {
852853
/* not checking with end pointer b/c there may be trailing ws */
853854
value.vu.float_value = strtod(jc->parse_buffer, NULL);
854855
}
855856
break;
856857
case JSON_T_INTEGER:
@@ -861,19 +862,19 @@
861862
arg = &value;
862863
value.vu.str.value = jc->parse_buffer;
863864
value.vu.str.length = jc->parse_buffer_count;
864865
break;
865866
}
866
-
867
+
867868
if (!(*jc->callback)(jc->ctx, jc->type, arg)) {
868869
return false;
869870
}
870871
}
871872
}
872
-
873
+
873874
parse_buffer_clear(jc);
874
-
875
+
875876
return true;
876877
}
877878
878879
#define IS_HIGH_SURROGATE(uc) (((uc) & 0xFC00) == 0xD800)
879880
#define IS_LOW_SURROGATE(uc) (((uc) & 0xFC00) == 0xDC00)
@@ -884,35 +885,39 @@
884885
{
885886
int i;
886887
unsigned uc = 0;
887888
char* p;
888889
int trail_bytes;
889
-
890
+
890891
assert(jc->parse_buffer_count >= 6);
891
-
892
+
892893
p = &jc->parse_buffer[jc->parse_buffer_count - 4];
893
-
894
+
894895
for (i = 12; i >= 0; i -= 4, ++p) {
895896
unsigned x = *p;
896
-
897
+
897898
if (x >= 'a') {
898899
x -= ('a' - 10);
899900
} else if (x >= 'A') {
900901
x -= ('A' - 10);
901902
} else {
902903
x &= ~0x30u;
903904
}
904
-
905
+
905906
assert(x < 16);
906
-
907
+
907908
uc |= x << i;
908909
}
909
-
910
+
910911
/* clear UTF-16 char from buffer */
911912
jc->parse_buffer_count -= 6;
912913
jc->parse_buffer[jc->parse_buffer_count] = 0;
913
-
914
+
915
+ if (uc == 0xffff || uc == 0xfffe) {
916
+ return false;
917
+ }
918
+
914919
/* attempt decoding ... */
915920
if (jc->utf16_high_surrogate) {
916921
if (IS_LOW_SURROGATE(uc)) {
917922
uc = DECODE_SURROGATE_PAIR(jc->utf16_high_surrogate, uc);
918923
trail_bytes = 3;
@@ -935,26 +940,26 @@
935940
return false;
936941
} else {
937942
trail_bytes = 2;
938943
}
939944
}
940
-
945
+
941946
jc->parse_buffer[jc->parse_buffer_count++] = (char) ((uc >> (trail_bytes * 6)) | utf8_lead_bits[trail_bytes]);
942
-
947
+
943948
for (i = trail_bytes * 6 - 6; i >= 0; i -= 6) {
944949
jc->parse_buffer[jc->parse_buffer_count++] = (char) (((uc >> i) & 0x3F) | 0x80);
945950
}
946951
947952
jc->parse_buffer[jc->parse_buffer_count] = 0;
948
-
953
+
949954
return true;
950955
}
951956
952957
static int add_escaped_char_to_parse_buffer(JSON_parser jc, int next_char)
953958
{
954959
assert(parse_buffer_has_space_for(jc, 1));
955
-
960
+
956961
jc->escaped = 0;
957962
/* remove the backslash */
958963
parse_buffer_pop_back_char(jc);
959964
switch(next_char) {
960965
case 'b':
@@ -996,22 +1001,22 @@
9961001
{
9971002
if (!parse_buffer_reserve_for(jc, 1)) {
9981003
assert(JSON_E_OUT_OF_MEMORY == jc->error);
9991004
return false;
10001005
}
1001
-
1006
+
10021007
if (jc->escaped) {
10031008
if (!add_escaped_char_to_parse_buffer(jc, next_char)) {
10041009
jc->error = JSON_E_INVALID_ESCAPE_SEQUENCE;
1005
- return false;
1010
+ return false;
10061011
}
10071012
} else if (!jc->comment) {
10081013
if ((jc->type != JSON_T_NONE) | !((next_class == C_SPACE) | (next_class == C_WHITE)) /* non-white-space */) {
10091014
parse_buffer_push_back_char(jc, (char)next_char);
10101015
}
10111016
}
1012
-
1017
+
10131018
return true;
10141019
}
10151020
10161021
#define assert_type_isnt_string_null_or_bool(jc) \
10171022
assert(jc->type != JSON_T_FALSE); \
@@ -1031,13 +1036,13 @@
10311036
*/
10321037
int next_class, next_state;
10331038
10341039
/*
10351040
Store the current char for error handling
1036
-*/
1041
+*/
10371042
jc->current_char = next_char;
1038
-
1043
+
10391044
/*
10401045
Determine the character's class.
10411046
*/
10421047
if (next_char < 0) {
10431048
jc->error = JSON_E_INVALID_CHAR;
@@ -1050,15 +1055,15 @@
10501055
if (next_class <= __) {
10511056
set_error(jc);
10521057
return false;
10531058
}
10541059
}
1055
-
1060
+
10561061
if (!add_char_to_parse_buffer(jc, next_char, next_class)) {
10571062
return false;
10581063
}
1059
-
1064
+
10601065
/*
10611066
Get the next state from the state transition table.
10621067
*/
10631068
next_state = state_transition_table[jc->state][next_class];
10641069
if (next_state >= 0) {
@@ -1069,11 +1074,11 @@
10691074
} else {
10701075
/*
10711076
Or perform one of the actions.
10721077
*/
10731078
switch (next_state) {
1074
-/* Unicode character */
1079
+/* Unicode character */
10751080
case UC:
10761081
if(!decode_unicode_char(jc)) {
10771082
jc->error = JSON_E_INVALID_UNICODE_SEQUENCE;
10781083
return false;
10791084
}
@@ -1091,78 +1096,78 @@
10911096
break;
10921097
/* integer detected by minus */
10931098
case MX:
10941099
jc->type = JSON_T_INTEGER;
10951100
jc->state = MI;
1096
- break;
1097
-/* integer detected by zero */
1101
+ break;
1102
+/* integer detected by zero */
10981103
case ZX:
10991104
jc->type = JSON_T_INTEGER;
11001105
jc->state = ZE;
1101
- break;
1102
-/* integer detected by 1-9 */
1106
+ break;
1107
+/* integer detected by 1-9 */
11031108
case IX:
11041109
jc->type = JSON_T_INTEGER;
11051110
jc->state = IT;
1106
- break;
1107
-
1111
+ break;
1112
+
11081113
/* floating point number detected by exponent*/
11091114
case DE:
11101115
assert_type_isnt_string_null_or_bool(jc);
11111116
jc->type = JSON_T_FLOAT;
11121117
jc->state = E1;
1113
- break;
1114
-
1118
+ break;
1119
+
11151120
/* floating point number detected by fraction */
11161121
case DF:
11171122
assert_type_isnt_string_null_or_bool(jc);
11181123
if (!jc->handle_floats_manually) {
11191124
/*
1120
- Some versions of strtod (which underlies sscanf) don't support converting
1125
+ Some versions of strtod (which underlies sscanf) don't support converting
11211126
C-locale formated floating point values.
1122
-*/
1127
+*/
11231128
assert(jc->parse_buffer[jc->parse_buffer_count-1] == '.');
11241129
jc->parse_buffer[jc->parse_buffer_count-1] = jc->decimal_point;
1125
- }
1130
+ }
11261131
jc->type = JSON_T_FLOAT;
11271132
jc->state = FX;
1128
- break;
1133
+ break;
11291134
/* string begin " */
11301135
case SB:
11311136
parse_buffer_clear(jc);
11321137
assert(jc->type == JSON_T_NONE);
11331138
jc->type = JSON_T_STRING;
11341139
jc->state = ST;
1135
- break;
1136
-
1140
+ break;
1141
+
11371142
/* n */
11381143
case NU:
11391144
assert(jc->type == JSON_T_NONE);
11401145
jc->type = JSON_T_NULL;
11411146
jc->state = N1;
1142
- break;
1147
+ break;
11431148
/* f */
11441149
case FA:
11451150
assert(jc->type == JSON_T_NONE);
11461151
jc->type = JSON_T_FALSE;
11471152
jc->state = F1;
1148
- break;
1153
+ break;
11491154
/* t */
11501155
case TR:
11511156
assert(jc->type == JSON_T_NONE);
11521157
jc->type = JSON_T_TRUE;
11531158
jc->state = T1;
1154
- break;
1155
-
1159
+ break;
1160
+
11561161
/* closing comment */
11571162
case CE:
11581163
jc->comment = 0;
11591164
assert(jc->parse_buffer_count == 0);
11601165
assert(jc->type == JSON_T_NONE);
11611166
jc->state = jc->before_comment_state;
1162
- break;
1163
-
1167
+ break;
1168
+
11641169
/* opening comment */
11651170
case CB:
11661171
if (!jc->allow_comments) {
11671172
return false;
11681173
}
@@ -1172,11 +1177,11 @@
11721177
}
11731178
assert(jc->parse_buffer_count == 0);
11741179
assert(jc->type != JSON_T_STRING);
11751180
switch (jc->stack[jc->top]) {
11761181
case MODE_ARRAY:
1177
- case MODE_OBJECT:
1182
+ case MODE_OBJECT:
11781183
switch(jc->state) {
11791184
case VA:
11801185
case AR:
11811186
jc->before_comment_state = jc->state;
11821187
break;
@@ -1192,11 +1197,11 @@
11921197
jc->type = JSON_T_NONE;
11931198
jc->state = C1;
11941199
jc->comment = 1;
11951200
break;
11961201
/* empty } */
1197
- case -9:
1202
+ case -9:
11981203
parse_buffer_clear(jc);
11991204
if (jc->callback && !(*jc->callback)(jc->ctx, JSON_T_OBJECT_END, NULL)) {
12001205
return false;
12011206
}
12021207
if (!pop(jc, MODE_KEY)) {
@@ -1231,11 +1236,11 @@
12311236
}
12321237
if (!pop(jc, MODE_ARRAY)) {
12331238
jc->error = JSON_E_UNBALANCED_COLLECTION;
12341239
return false;
12351240
}
1236
-
1241
+
12371242
jc->type = JSON_T_NONE;
12381243
jc->state = OK;
12391244
break;
12401245
12411246
/* { */ case -6:
@@ -1267,11 +1272,11 @@
12671272
switch (jc->stack[jc->top]) {
12681273
case MODE_KEY:
12691274
assert(jc->type == JSON_T_STRING);
12701275
jc->type = JSON_T_NONE;
12711276
jc->state = CO;
1272
-
1277
+
12731278
if (jc->callback) {
12741279
JSON_value value;
12751280
value.vu.str.value = jc->parse_buffer;
12761281
value.vu.str.length = jc->parse_buffer_count;
12771282
if (!(*jc->callback)(jc->ctx, JSON_T_KEY, &value)) {
@@ -1357,29 +1362,29 @@
13571362
13581363
13591364
int JSON_parser_is_legal_white_space_string(const char* s)
13601365
{
13611366
int c, char_class;
1362
-
1367
+
13631368
if (s == NULL) {
13641369
return false;
13651370
}
1366
-
1367
- for (; *s; ++s) {
1371
+
1372
+ for (; *s; ++s) {
13681373
c = *s;
1369
-
1374
+
13701375
if (c < 0 || c >= 128) {
13711376
return false;
13721377
}
1373
-
1378
+
13741379
char_class = ascii_class[c];
1375
-
1380
+
13761381
if (char_class != C_SPACE && char_class != C_WHITE) {
13771382
return false;
13781383
}
13791384
}
1380
-
1385
+
13811386
return true;
13821387
}
13831388
13841389
int JSON_parser_get_last_error(JSON_parser jc)
13851390
{
@@ -1389,16 +1394,17 @@
13891394
13901395
void init_JSON_config(JSON_config* config)
13911396
{
13921397
if (config) {
13931398
memset(config, 0, sizeof(*config));
1394
-
1399
+
13951400
config->depth = JSON_PARSER_STACK_SIZE - 1;
13961401
config->malloc = malloc;
13971402
config->free = free;
13981403
}
13991404
}
1405
+
14001406
/* end file parser/JSON_parser.c */
14011407
/* begin file ./cson.c */
14021408
#include <assert.h>
14031409
#include <stdlib.h> /* malloc()/free() */
14041410
#include <string.h>
14051411
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -30,11 +30,11 @@
30 /* Determine the integer type use to parse non-floating point numbers */
31 #ifdef _WIN32
32 typedef __int64 JSON_int_t;
33 #define JSON_PARSER_INTEGER_SSCANF_TOKEN "%I64d"
34 #define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%I64d"
35 #elif (__STDC_VERSION__ >= 199901L) || (HAVE_LONG_LONG == 1)
36 typedef long long JSON_int_t;
37 #define JSON_PARSER_INTEGER_SSCANF_TOKEN "%lld"
38 #define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%lld"
39 #else
40 typedef long JSON_int_t;
@@ -103,11 +103,11 @@
103 JSON_T_NULL, JSON_T_TRUE, and JSON_T_FALSE. String values are always returned
104 as zero-terminated C strings.
105
106 \return Non-zero if parsing should continue, else zero.
107 */
108 typedef int (*JSON_parser_callback)(void* ctx, int type, const struct JSON_value_struct* value);
109
110
111 /**
112 A typedef for allocator functions semantically compatible with malloc().
113 */
@@ -233,11 +233,11 @@
233
234 #endif /* JSON_PARSER_H */
235 /* end file parser/JSON_parser.h */
236 /* begin file parser/JSON_parser.c */
237 /*
238 Copyright (c) 2005 JSON.org
239
240 Permission is hereby granted, free of charge, to any person obtaining a copy
241 of this software and associated documentation files (the "Software"), to deal
242 in the Software without restriction, including without limitation the rights
243 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -245,12 +245,10 @@
245 furnished to do so, subject to the following conditions:
246
247 The above copyright notice and this permission notice shall be included in all
248 copies or substantial portions of the Software.
249
250 The Software shall be used for Good, not Evil.
251
252 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
253 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
254 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
255 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
256 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@@ -257,49 +255,52 @@
257 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
258 SOFTWARE.
259 */
260
261 /*
262 Callbacks, comments, Unicode handling by Jean Gressmann ([email protected]), 2007-2010.
263
264
265 Changelog:
 
 
 
 
 
 
266 2010-11-25
267 Support for custom memory allocation ([email protected]).
268
269 2010-05-07
270 Added error handling for memory allocation failure ([email protected]).
271 Added diagnosis errors for invalid JSON.
272
273 2010-03-25
274 Fixed buffer overrun in grow_parse_buffer & cleaned up code.
275
276 2009-10-19
277 Replaced long double in JSON_value_struct with double after reports
278 of strtold being broken on some platforms ([email protected]).
279
280 2009-05-17
281 Incorporated [email protected] fix for UTF16 decoding.
282
283 2009-05-14
284 Fixed float parsing bug related to a locale being set that didn't
285 use '.' as decimal point character ([email protected]).
286
287 2008-10-14
288 Renamed states.IN to states.IT to avoid name clash which IN macro
289 defined in windef.h ([email protected])
290
291 2008-07-19
292 Removed some duplicate code & debugging variable ([email protected])
293
294 2008-05-28
295 Made JSON_value structure ansi C compliant. This bug was report by
296 [email protected]
297
298 2008-05-20
299 Fixed bug reported by [email protected] where the switching
300 from static to dynamic parse buffer did not copy the static parse
301 buffer's content.
302 */
303
304
305
@@ -362,11 +363,11 @@
362 char static_parse_buffer[JSON_PARSER_PARSE_BUFFER_SIZE];
363 JSON_malloc_t malloc;
364 JSON_free_t free;
365 };
366
367 #define COUNTOF(x) (sizeof(x)/sizeof(x[0]))
368
369 /*
370 Characters are mapped into these character classes. This allows for
371 a significant reduction in the size of the state transition table.
372 */
@@ -403,11 +404,11 @@
403 C_LOW_T, /* t */
404 C_LOW_U, /* u */
405 C_ABCDF, /* ABCDF */
406 C_E, /* E */
407 C_ETC, /* everything else */
408 C_STAR, /* * */
409 NR_CLASSES
410 };
411
412 static const signed char ascii_class[128] = {
413 /*
@@ -419,11 +420,11 @@
419 __, C_WHITE, C_WHITE, __, __, C_WHITE, __, __,
420 __, __, __, __, __, __, __, __,
421 __, __, __, __, __, __, __, __,
422
423 C_SPACE, C_ETC, C_QUOTE, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
424 C_ETC, C_ETC, C_STAR, C_PLUS, C_COMMA, C_MINUS, C_POINT, C_SLASH,
425 C_ZERO, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT,
426 C_DIGIT, C_DIGIT, C_COLON, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
427
428 C_ETC, C_ABCDF, C_ABCDF, C_ABCDF, C_ABCDF, C_E, C_ABCDF, C_ETC,
429 C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
@@ -536,11 +537,11 @@
536 /*false F4*/ {__,__,__,__,__,__,__,__,__,__,CB,__,__,__,__,__,__,__,__,__,OK,__,__,__,__,__,__,__,__,__,__,__},
537 /*nu N1*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,N2,__,__,__,__},
538 /*nul N2*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,N3,__,__,__,__,__,__,__,__,__},
539 /*null N3*/ {__,__,__,__,__,__,__,__,__,__,CB,__,__,__,__,__,__,__,__,__,__,__,OK,__,__,__,__,__,__,__,__,__},
540 /*/ C1*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,C2},
541 /*/* C2*/ {C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C3},
542 /** C3*/ {C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,CE,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C3},
543 /*_. FX*/ {OK,OK,__,-8,__,-7,__,-3,__,__,__,__,__,__,FR,FR,__,__,__,__,E1,__,__,__,__,__,__,__,__,E1,__,__},
544 /*\ D1*/ {__,__,__,__,__,__,__,__,__,D2,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__},
545 /*\ D2*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,U1,__,__,__,__},
546 };
@@ -548,27 +549,27 @@
548
549 /*
550 These modes can be pushed on the stack.
551 */
552 enum modes {
553 MODE_ARRAY = 1,
554 MODE_DONE = 2,
555 MODE_KEY = 3,
556 MODE_OBJECT = 4
557 };
558
559 static void set_error(JSON_parser jc)
560 {
561 switch (jc->state) {
562 case GO:
563 switch (jc->current_char) {
564 case '{': case '}': case '[': case ']':
565 jc->error = JSON_E_UNBALANCED_COLLECTION;
566 break;
567 default:
568 jc->error = JSON_E_INVALID_CHAR;
569 break;
570 }
571 break;
572 case OB:
573 jc->error = JSON_E_EXPECTED_KEY;
574 break;
@@ -604,11 +605,11 @@
604 {
605 /*
606 Push a mode onto the stack. Return false if there is overflow.
607 */
608 assert(jc->top <= jc->stack_capacity);
609
610 if (jc->depth < 0) {
611 if (jc->top == jc->stack_capacity) {
612 const size_t bytes_to_copy = jc->stack_capacity * sizeof(jc->stack[0]);
613 const size_t new_capacity = jc->stack_capacity * 2;
614 const size_t bytes_to_allocate = new_capacity * sizeof(jc->stack[0]);
@@ -653,17 +654,17 @@
653 #define parse_buffer_clear(jc) \
654 do {\
655 jc->parse_buffer_count = 0;\
656 jc->parse_buffer[0] = 0;\
657 } while (0)
658
659 #define parse_buffer_pop_back_char(jc)\
660 do {\
661 assert(jc->parse_buffer_count >= 1);\
662 --jc->parse_buffer_count;\
663 jc->parse_buffer[jc->parse_buffer_count] = 0;\
664 } while (0)
665
666
667
668 void delete_JSON_parser(JSON_parser jc)
669 {
@@ -673,25 +674,25 @@
673 }
674 if (jc->parse_buffer != &jc->static_parse_buffer[0]) {
675 jc->free((void*)jc->parse_buffer);
676 }
677 jc->free((void*)jc);
678 }
679 }
680
681 int JSON_parser_reset(JSON_parser jc)
682 {
683 if (NULL == jc) {
684 return false;
685 }
686
687 jc->state = GO;
688 jc->top = -1;
689
690 /* parser has been used previously? */
691 if (NULL == jc->parse_buffer) {
692
693 /* Do we want non-bound stack? */
694 if (jc->depth > 0) {
695 jc->stack_capacity = jc->depth;
696 if (jc->depth <= (int)COUNTOF(jc->static_stack)) {
697 jc->stack = &jc->static_stack[0];
@@ -705,20 +706,20 @@
705 } else {
706 jc->stack_capacity = (int)COUNTOF(jc->static_stack);
707 jc->depth = -1;
708 jc->stack = &jc->static_stack[0];
709 }
710
711 /* set up the parse buffer */
712 jc->parse_buffer = &jc->static_parse_buffer[0];
713 jc->parse_buffer_capacity = COUNTOF(jc->static_parse_buffer);
714 }
715
716 /* set parser to start */
717 push(jc, MODE_DONE);
718 parse_buffer_clear(jc);
719
720 return true;
721 }
722
723 JSON_parser
724 new_JSON_parser(JSON_config const * config)
@@ -735,29 +736,29 @@
735
736 int use_std_malloc = false;
737 JSON_config default_config;
738 JSON_parser jc;
739 JSON_malloc_t alloc;
740
741 /* set to default configuration if none was provided */
742 if (NULL == config) {
743 /* initialize configuration */
744 init_JSON_config(&default_config);
745 config = &default_config;
746 }
747
748 /* use std malloc if either the allocator or deallocator function isn't set */
749 use_std_malloc = NULL == config->malloc || NULL == config->free;
750
751 alloc = use_std_malloc ? malloc : config->malloc;
752
753 jc = JSON_parser_malloc(alloc, sizeof(*jc), "parser");
754
755 if (NULL == jc) {
756 return NULL;
757 }
758
759 /* configure the parser */
760 memset(jc, 0, sizeof(*jc));
761 jc->malloc = alloc;
762 jc->free = use_std_malloc ? free : config->free;
763 jc->callback = config->callback;
@@ -765,42 +766,42 @@
765 jc->allow_comments = (signed char)(config->allow_comments != 0);
766 jc->handle_floats_manually = (signed char)(config->handle_floats_manually != 0);
767 jc->decimal_point = *localeconv()->decimal_point;
768 /* We need to be able to push at least one object */
769 jc->depth = config->depth == 0 ? 1 : config->depth;
770
771 /* reset the parser */
772 if (!JSON_parser_reset(jc)) {
773 jc->free(jc);
774 return NULL;
775 }
776
777 return jc;
778 }
779
780 static int parse_buffer_grow(JSON_parser jc)
781 {
782 const size_t bytes_to_copy = jc->parse_buffer_count * sizeof(jc->parse_buffer[0]);
783 const size_t new_capacity = jc->parse_buffer_capacity * 2;
784 const size_t bytes_to_allocate = new_capacity * sizeof(jc->parse_buffer[0]);
785 void* mem = JSON_parser_malloc(jc->malloc, bytes_to_allocate, "parse buffer");
786
787 if (mem == NULL) {
788 jc->error = JSON_E_OUT_OF_MEMORY;
789 return false;
790 }
791
792 assert(new_capacity > 0);
793 memcpy(mem, jc->parse_buffer, bytes_to_copy);
794
795 if (jc->parse_buffer != &jc->static_parse_buffer[0]) {
796 jc->free(jc->parse_buffer);
797 }
798
799 jc->parse_buffer = (char*)mem;
800 jc->parse_buffer_capacity = new_capacity;
801
802 return true;
803 }
804
805 static int parse_buffer_reserve_for(JSON_parser jc, unsigned chars)
806 {
@@ -808,11 +809,11 @@
808 if (!parse_buffer_grow(jc)) {
809 assert(jc->error == JSON_E_OUT_OF_MEMORY);
810 return false;
811 }
812 }
813
814 return true;
815 }
816
817 #define parse_buffer_has_space_for(jc, count) \
818 (jc->parse_buffer_count + (count) + 1 <= jc->parse_buffer_capacity)
@@ -830,27 +831,27 @@
830 jc->type == JSON_T_FALSE || \
831 jc->type == JSON_T_TRUE || \
832 jc->type == JSON_T_FLOAT || \
833 jc->type == JSON_T_INTEGER || \
834 jc->type == JSON_T_STRING)
835
836
837 static int parse_parse_buffer(JSON_parser jc)
838 {
839 if (jc->callback) {
840 JSON_value value, *arg = NULL;
841
842 if (jc->type != JSON_T_NONE) {
843 assert_is_non_container_type(jc);
844
845 switch(jc->type) {
846 case JSON_T_FLOAT:
847 arg = &value;
848 if (jc->handle_floats_manually) {
849 value.vu.str.value = jc->parse_buffer;
850 value.vu.str.length = jc->parse_buffer_count;
851 } else {
852 /* not checking with end pointer b/c there may be trailing ws */
853 value.vu.float_value = strtod(jc->parse_buffer, NULL);
854 }
855 break;
856 case JSON_T_INTEGER:
@@ -861,19 +862,19 @@
861 arg = &value;
862 value.vu.str.value = jc->parse_buffer;
863 value.vu.str.length = jc->parse_buffer_count;
864 break;
865 }
866
867 if (!(*jc->callback)(jc->ctx, jc->type, arg)) {
868 return false;
869 }
870 }
871 }
872
873 parse_buffer_clear(jc);
874
875 return true;
876 }
877
878 #define IS_HIGH_SURROGATE(uc) (((uc) & 0xFC00) == 0xD800)
879 #define IS_LOW_SURROGATE(uc) (((uc) & 0xFC00) == 0xDC00)
@@ -884,35 +885,39 @@
884 {
885 int i;
886 unsigned uc = 0;
887 char* p;
888 int trail_bytes;
889
890 assert(jc->parse_buffer_count >= 6);
891
892 p = &jc->parse_buffer[jc->parse_buffer_count - 4];
893
894 for (i = 12; i >= 0; i -= 4, ++p) {
895 unsigned x = *p;
896
897 if (x >= 'a') {
898 x -= ('a' - 10);
899 } else if (x >= 'A') {
900 x -= ('A' - 10);
901 } else {
902 x &= ~0x30u;
903 }
904
905 assert(x < 16);
906
907 uc |= x << i;
908 }
909
910 /* clear UTF-16 char from buffer */
911 jc->parse_buffer_count -= 6;
912 jc->parse_buffer[jc->parse_buffer_count] = 0;
913
 
 
 
 
914 /* attempt decoding ... */
915 if (jc->utf16_high_surrogate) {
916 if (IS_LOW_SURROGATE(uc)) {
917 uc = DECODE_SURROGATE_PAIR(jc->utf16_high_surrogate, uc);
918 trail_bytes = 3;
@@ -935,26 +940,26 @@
935 return false;
936 } else {
937 trail_bytes = 2;
938 }
939 }
940
941 jc->parse_buffer[jc->parse_buffer_count++] = (char) ((uc >> (trail_bytes * 6)) | utf8_lead_bits[trail_bytes]);
942
943 for (i = trail_bytes * 6 - 6; i >= 0; i -= 6) {
944 jc->parse_buffer[jc->parse_buffer_count++] = (char) (((uc >> i) & 0x3F) | 0x80);
945 }
946
947 jc->parse_buffer[jc->parse_buffer_count] = 0;
948
949 return true;
950 }
951
952 static int add_escaped_char_to_parse_buffer(JSON_parser jc, int next_char)
953 {
954 assert(parse_buffer_has_space_for(jc, 1));
955
956 jc->escaped = 0;
957 /* remove the backslash */
958 parse_buffer_pop_back_char(jc);
959 switch(next_char) {
960 case 'b':
@@ -996,22 +1001,22 @@
996 {
997 if (!parse_buffer_reserve_for(jc, 1)) {
998 assert(JSON_E_OUT_OF_MEMORY == jc->error);
999 return false;
1000 }
1001
1002 if (jc->escaped) {
1003 if (!add_escaped_char_to_parse_buffer(jc, next_char)) {
1004 jc->error = JSON_E_INVALID_ESCAPE_SEQUENCE;
1005 return false;
1006 }
1007 } else if (!jc->comment) {
1008 if ((jc->type != JSON_T_NONE) | !((next_class == C_SPACE) | (next_class == C_WHITE)) /* non-white-space */) {
1009 parse_buffer_push_back_char(jc, (char)next_char);
1010 }
1011 }
1012
1013 return true;
1014 }
1015
1016 #define assert_type_isnt_string_null_or_bool(jc) \
1017 assert(jc->type != JSON_T_FALSE); \
@@ -1031,13 +1036,13 @@
1031 */
1032 int next_class, next_state;
1033
1034 /*
1035 Store the current char for error handling
1036 */
1037 jc->current_char = next_char;
1038
1039 /*
1040 Determine the character's class.
1041 */
1042 if (next_char < 0) {
1043 jc->error = JSON_E_INVALID_CHAR;
@@ -1050,15 +1055,15 @@
1050 if (next_class <= __) {
1051 set_error(jc);
1052 return false;
1053 }
1054 }
1055
1056 if (!add_char_to_parse_buffer(jc, next_char, next_class)) {
1057 return false;
1058 }
1059
1060 /*
1061 Get the next state from the state transition table.
1062 */
1063 next_state = state_transition_table[jc->state][next_class];
1064 if (next_state >= 0) {
@@ -1069,11 +1074,11 @@
1069 } else {
1070 /*
1071 Or perform one of the actions.
1072 */
1073 switch (next_state) {
1074 /* Unicode character */
1075 case UC:
1076 if(!decode_unicode_char(jc)) {
1077 jc->error = JSON_E_INVALID_UNICODE_SEQUENCE;
1078 return false;
1079 }
@@ -1091,78 +1096,78 @@
1091 break;
1092 /* integer detected by minus */
1093 case MX:
1094 jc->type = JSON_T_INTEGER;
1095 jc->state = MI;
1096 break;
1097 /* integer detected by zero */
1098 case ZX:
1099 jc->type = JSON_T_INTEGER;
1100 jc->state = ZE;
1101 break;
1102 /* integer detected by 1-9 */
1103 case IX:
1104 jc->type = JSON_T_INTEGER;
1105 jc->state = IT;
1106 break;
1107
1108 /* floating point number detected by exponent*/
1109 case DE:
1110 assert_type_isnt_string_null_or_bool(jc);
1111 jc->type = JSON_T_FLOAT;
1112 jc->state = E1;
1113 break;
1114
1115 /* floating point number detected by fraction */
1116 case DF:
1117 assert_type_isnt_string_null_or_bool(jc);
1118 if (!jc->handle_floats_manually) {
1119 /*
1120 Some versions of strtod (which underlies sscanf) don't support converting
1121 C-locale formated floating point values.
1122 */
1123 assert(jc->parse_buffer[jc->parse_buffer_count-1] == '.');
1124 jc->parse_buffer[jc->parse_buffer_count-1] = jc->decimal_point;
1125 }
1126 jc->type = JSON_T_FLOAT;
1127 jc->state = FX;
1128 break;
1129 /* string begin " */
1130 case SB:
1131 parse_buffer_clear(jc);
1132 assert(jc->type == JSON_T_NONE);
1133 jc->type = JSON_T_STRING;
1134 jc->state = ST;
1135 break;
1136
1137 /* n */
1138 case NU:
1139 assert(jc->type == JSON_T_NONE);
1140 jc->type = JSON_T_NULL;
1141 jc->state = N1;
1142 break;
1143 /* f */
1144 case FA:
1145 assert(jc->type == JSON_T_NONE);
1146 jc->type = JSON_T_FALSE;
1147 jc->state = F1;
1148 break;
1149 /* t */
1150 case TR:
1151 assert(jc->type == JSON_T_NONE);
1152 jc->type = JSON_T_TRUE;
1153 jc->state = T1;
1154 break;
1155
1156 /* closing comment */
1157 case CE:
1158 jc->comment = 0;
1159 assert(jc->parse_buffer_count == 0);
1160 assert(jc->type == JSON_T_NONE);
1161 jc->state = jc->before_comment_state;
1162 break;
1163
1164 /* opening comment */
1165 case CB:
1166 if (!jc->allow_comments) {
1167 return false;
1168 }
@@ -1172,11 +1177,11 @@
1172 }
1173 assert(jc->parse_buffer_count == 0);
1174 assert(jc->type != JSON_T_STRING);
1175 switch (jc->stack[jc->top]) {
1176 case MODE_ARRAY:
1177 case MODE_OBJECT:
1178 switch(jc->state) {
1179 case VA:
1180 case AR:
1181 jc->before_comment_state = jc->state;
1182 break;
@@ -1192,11 +1197,11 @@
1192 jc->type = JSON_T_NONE;
1193 jc->state = C1;
1194 jc->comment = 1;
1195 break;
1196 /* empty } */
1197 case -9:
1198 parse_buffer_clear(jc);
1199 if (jc->callback && !(*jc->callback)(jc->ctx, JSON_T_OBJECT_END, NULL)) {
1200 return false;
1201 }
1202 if (!pop(jc, MODE_KEY)) {
@@ -1231,11 +1236,11 @@
1231 }
1232 if (!pop(jc, MODE_ARRAY)) {
1233 jc->error = JSON_E_UNBALANCED_COLLECTION;
1234 return false;
1235 }
1236
1237 jc->type = JSON_T_NONE;
1238 jc->state = OK;
1239 break;
1240
1241 /* { */ case -6:
@@ -1267,11 +1272,11 @@
1267 switch (jc->stack[jc->top]) {
1268 case MODE_KEY:
1269 assert(jc->type == JSON_T_STRING);
1270 jc->type = JSON_T_NONE;
1271 jc->state = CO;
1272
1273 if (jc->callback) {
1274 JSON_value value;
1275 value.vu.str.value = jc->parse_buffer;
1276 value.vu.str.length = jc->parse_buffer_count;
1277 if (!(*jc->callback)(jc->ctx, JSON_T_KEY, &value)) {
@@ -1357,29 +1362,29 @@
1357
1358
1359 int JSON_parser_is_legal_white_space_string(const char* s)
1360 {
1361 int c, char_class;
1362
1363 if (s == NULL) {
1364 return false;
1365 }
1366
1367 for (; *s; ++s) {
1368 c = *s;
1369
1370 if (c < 0 || c >= 128) {
1371 return false;
1372 }
1373
1374 char_class = ascii_class[c];
1375
1376 if (char_class != C_SPACE && char_class != C_WHITE) {
1377 return false;
1378 }
1379 }
1380
1381 return true;
1382 }
1383
1384 int JSON_parser_get_last_error(JSON_parser jc)
1385 {
@@ -1389,16 +1394,17 @@
1389
1390 void init_JSON_config(JSON_config* config)
1391 {
1392 if (config) {
1393 memset(config, 0, sizeof(*config));
1394
1395 config->depth = JSON_PARSER_STACK_SIZE - 1;
1396 config->malloc = malloc;
1397 config->free = free;
1398 }
1399 }
 
1400 /* end file parser/JSON_parser.c */
1401 /* begin file ./cson.c */
1402 #include <assert.h>
1403 #include <stdlib.h> /* malloc()/free() */
1404 #include <string.h>
1405
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -30,11 +30,11 @@
30 /* Determine the integer type use to parse non-floating point numbers */
31 #ifdef _WIN32
32 typedef __int64 JSON_int_t;
33 #define JSON_PARSER_INTEGER_SSCANF_TOKEN "%I64d"
34 #define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%I64d"
35 #elif __STDC_VERSION__ >= 199901L || HAVE_LONG_LONG == 1
36 typedef long long JSON_int_t;
37 #define JSON_PARSER_INTEGER_SSCANF_TOKEN "%lld"
38 #define JSON_PARSER_INTEGER_SPRINTF_TOKEN "%lld"
39 #else
40 typedef long JSON_int_t;
@@ -103,11 +103,11 @@
103 JSON_T_NULL, JSON_T_TRUE, and JSON_T_FALSE. String values are always returned
104 as zero-terminated C strings.
105
106 \return Non-zero if parsing should continue, else zero.
107 */
108 typedef int (*JSON_parser_callback)(void* ctx, int type, const JSON_value* value);
109
110
111 /**
112 A typedef for allocator functions semantically compatible with malloc().
113 */
@@ -233,11 +233,11 @@
233
234 #endif /* JSON_PARSER_H */
235 /* end file parser/JSON_parser.h */
236 /* begin file parser/JSON_parser.c */
237 /*
238 Copyright (c) 2007-2013 Jean Gressmann ([email protected])
239
240 Permission is hereby granted, free of charge, to any person obtaining a copy
241 of this software and associated documentation files (the "Software"), to deal
242 in the Software without restriction, including without limitation the rights
243 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -245,12 +245,10 @@
245 furnished to do so, subject to the following conditions:
246
247 The above copyright notice and this permission notice shall be included in all
248 copies or substantial portions of the Software.
249
 
 
250 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
251 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
252 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
253 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
254 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@@ -257,49 +255,52 @@
255 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
256 SOFTWARE.
257 */
258
259 /*
 
 
 
260 Changelog:
261 2013-09-08
262 Updated license to to be compatible with Debian license requirements.
263
264 2012-06-06
265 Fix for invalid UTF16 characters and some comment fixex ([email protected]).
266
267 2010-11-25
268 Support for custom memory allocation ([email protected]).
269
270 2010-05-07
271 Added error handling for memory allocation failure ([email protected]).
272 Added diagnosis errors for invalid JSON.
273
274 2010-03-25
275 Fixed buffer overrun in grow_parse_buffer & cleaned up code.
276
277 2009-10-19
278 Replaced long double in JSON_value_struct with double after reports
279 of strtold being broken on some platforms ([email protected]).
280
281 2009-05-17
282 Incorporated [email protected] fix for UTF16 decoding.
283
284 2009-05-14
285 Fixed float parsing bug related to a locale being set that didn't
286 use '.' as decimal point character ([email protected]).
287
288 2008-10-14
289 Renamed states.IN to states.IT to avoid name clash which IN macro
290 defined in windef.h ([email protected])
291
292 2008-07-19
293 Removed some duplicate code & debugging variable ([email protected])
294
295 2008-05-28
296 Made JSON_value structure ansi C compliant. This bug was report by
297 [email protected]
298
299 2008-05-20
300 Fixed bug reported by [email protected] where the switching
301 from static to dynamic parse buffer did not copy the static parse
302 buffer's content.
303 */
304
305
306
@@ -362,11 +363,11 @@
363 char static_parse_buffer[JSON_PARSER_PARSE_BUFFER_SIZE];
364 JSON_malloc_t malloc;
365 JSON_free_t free;
366 };
367
368 #define COUNTOF(x) (sizeof(x)/sizeof(x[0]))
369
370 /*
371 Characters are mapped into these character classes. This allows for
372 a significant reduction in the size of the state transition table.
373 */
@@ -403,11 +404,11 @@
404 C_LOW_T, /* t */
405 C_LOW_U, /* u */
406 C_ABCDF, /* ABCDF */
407 C_E, /* E */
408 C_ETC, /* everything else */
409 C_STAR, /* * */
410 NR_CLASSES
411 };
412
413 static const signed char ascii_class[128] = {
414 /*
@@ -419,11 +420,11 @@
420 __, C_WHITE, C_WHITE, __, __, C_WHITE, __, __,
421 __, __, __, __, __, __, __, __,
422 __, __, __, __, __, __, __, __,
423
424 C_SPACE, C_ETC, C_QUOTE, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
425 C_ETC, C_ETC, C_STAR, C_PLUS, C_COMMA, C_MINUS, C_POINT, C_SLASH,
426 C_ZERO, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT, C_DIGIT,
427 C_DIGIT, C_DIGIT, C_COLON, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
428
429 C_ETC, C_ABCDF, C_ABCDF, C_ABCDF, C_ABCDF, C_E, C_ABCDF, C_ETC,
430 C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC, C_ETC,
@@ -536,11 +537,11 @@
537 /*false F4*/ {__,__,__,__,__,__,__,__,__,__,CB,__,__,__,__,__,__,__,__,__,OK,__,__,__,__,__,__,__,__,__,__,__},
538 /*nu N1*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,N2,__,__,__,__},
539 /*nul N2*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,N3,__,__,__,__,__,__,__,__,__},
540 /*null N3*/ {__,__,__,__,__,__,__,__,__,__,CB,__,__,__,__,__,__,__,__,__,__,__,OK,__,__,__,__,__,__,__,__,__},
541 /*/ C1*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,C2},
542 /*/star C2*/ {C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C3},
543 /** C3*/ {C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,CE,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C2,C3},
544 /*_. FX*/ {OK,OK,__,-8,__,-7,__,-3,__,__,__,__,__,__,FR,FR,__,__,__,__,E1,__,__,__,__,__,__,__,__,E1,__,__},
545 /*\ D1*/ {__,__,__,__,__,__,__,__,__,D2,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__},
546 /*\ D2*/ {__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,U1,__,__,__,__},
547 };
@@ -548,27 +549,27 @@
549
550 /*
551 These modes can be pushed on the stack.
552 */
553 enum modes {
554 MODE_ARRAY = 1,
555 MODE_DONE = 2,
556 MODE_KEY = 3,
557 MODE_OBJECT = 4
558 };
559
560 static void set_error(JSON_parser jc)
561 {
562 switch (jc->state) {
563 case GO:
564 switch (jc->current_char) {
565 case '{': case '}': case '[': case ']':
566 jc->error = JSON_E_UNBALANCED_COLLECTION;
567 break;
568 default:
569 jc->error = JSON_E_INVALID_CHAR;
570 break;
571 }
572 break;
573 case OB:
574 jc->error = JSON_E_EXPECTED_KEY;
575 break;
@@ -604,11 +605,11 @@
605 {
606 /*
607 Push a mode onto the stack. Return false if there is overflow.
608 */
609 assert(jc->top <= jc->stack_capacity);
610
611 if (jc->depth < 0) {
612 if (jc->top == jc->stack_capacity) {
613 const size_t bytes_to_copy = jc->stack_capacity * sizeof(jc->stack[0]);
614 const size_t new_capacity = jc->stack_capacity * 2;
615 const size_t bytes_to_allocate = new_capacity * sizeof(jc->stack[0]);
@@ -653,17 +654,17 @@
654 #define parse_buffer_clear(jc) \
655 do {\
656 jc->parse_buffer_count = 0;\
657 jc->parse_buffer[0] = 0;\
658 } while (0)
659
660 #define parse_buffer_pop_back_char(jc)\
661 do {\
662 assert(jc->parse_buffer_count >= 1);\
663 --jc->parse_buffer_count;\
664 jc->parse_buffer[jc->parse_buffer_count] = 0;\
665 } while (0)
666
667
668
669 void delete_JSON_parser(JSON_parser jc)
670 {
@@ -673,25 +674,25 @@
674 }
675 if (jc->parse_buffer != &jc->static_parse_buffer[0]) {
676 jc->free((void*)jc->parse_buffer);
677 }
678 jc->free((void*)jc);
679 }
680 }
681
682 int JSON_parser_reset(JSON_parser jc)
683 {
684 if (NULL == jc) {
685 return false;
686 }
687
688 jc->state = GO;
689 jc->top = -1;
690
691 /* parser has been used previously? */
692 if (NULL == jc->parse_buffer) {
693
694 /* Do we want non-bound stack? */
695 if (jc->depth > 0) {
696 jc->stack_capacity = jc->depth;
697 if (jc->depth <= (int)COUNTOF(jc->static_stack)) {
698 jc->stack = &jc->static_stack[0];
@@ -705,20 +706,20 @@
706 } else {
707 jc->stack_capacity = (int)COUNTOF(jc->static_stack);
708 jc->depth = -1;
709 jc->stack = &jc->static_stack[0];
710 }
711
712 /* set up the parse buffer */
713 jc->parse_buffer = &jc->static_parse_buffer[0];
714 jc->parse_buffer_capacity = COUNTOF(jc->static_parse_buffer);
715 }
716
717 /* set parser to start */
718 push(jc, MODE_DONE);
719 parse_buffer_clear(jc);
720
721 return true;
722 }
723
724 JSON_parser
725 new_JSON_parser(JSON_config const * config)
@@ -735,29 +736,29 @@
736
737 int use_std_malloc = false;
738 JSON_config default_config;
739 JSON_parser jc;
740 JSON_malloc_t alloc;
741
742 /* set to default configuration if none was provided */
743 if (NULL == config) {
744 /* initialize configuration */
745 init_JSON_config(&default_config);
746 config = &default_config;
747 }
748
749 /* use std malloc if either the allocator or deallocator function isn't set */
750 use_std_malloc = NULL == config->malloc || NULL == config->free;
751
752 alloc = use_std_malloc ? malloc : config->malloc;
753
754 jc = (JSON_parser)JSON_parser_malloc(alloc, sizeof(*jc), "parser");
755
756 if (NULL == jc) {
757 return NULL;
758 }
759
760 /* configure the parser */
761 memset(jc, 0, sizeof(*jc));
762 jc->malloc = alloc;
763 jc->free = use_std_malloc ? free : config->free;
764 jc->callback = config->callback;
@@ -765,42 +766,42 @@
766 jc->allow_comments = (signed char)(config->allow_comments != 0);
767 jc->handle_floats_manually = (signed char)(config->handle_floats_manually != 0);
768 jc->decimal_point = *localeconv()->decimal_point;
769 /* We need to be able to push at least one object */
770 jc->depth = config->depth == 0 ? 1 : config->depth;
771
772 /* reset the parser */
773 if (!JSON_parser_reset(jc)) {
774 jc->free(jc);
775 return NULL;
776 }
777
778 return jc;
779 }
780
781 static int parse_buffer_grow(JSON_parser jc)
782 {
783 const size_t bytes_to_copy = jc->parse_buffer_count * sizeof(jc->parse_buffer[0]);
784 const size_t new_capacity = jc->parse_buffer_capacity * 2;
785 const size_t bytes_to_allocate = new_capacity * sizeof(jc->parse_buffer[0]);
786 void* mem = JSON_parser_malloc(jc->malloc, bytes_to_allocate, "parse buffer");
787
788 if (mem == NULL) {
789 jc->error = JSON_E_OUT_OF_MEMORY;
790 return false;
791 }
792
793 assert(new_capacity > 0);
794 memcpy(mem, jc->parse_buffer, bytes_to_copy);
795
796 if (jc->parse_buffer != &jc->static_parse_buffer[0]) {
797 jc->free(jc->parse_buffer);
798 }
799
800 jc->parse_buffer = (char*)mem;
801 jc->parse_buffer_capacity = new_capacity;
802
803 return true;
804 }
805
806 static int parse_buffer_reserve_for(JSON_parser jc, unsigned chars)
807 {
@@ -808,11 +809,11 @@
809 if (!parse_buffer_grow(jc)) {
810 assert(jc->error == JSON_E_OUT_OF_MEMORY);
811 return false;
812 }
813 }
814
815 return true;
816 }
817
818 #define parse_buffer_has_space_for(jc, count) \
819 (jc->parse_buffer_count + (count) + 1 <= jc->parse_buffer_capacity)
@@ -830,27 +831,27 @@
831 jc->type == JSON_T_FALSE || \
832 jc->type == JSON_T_TRUE || \
833 jc->type == JSON_T_FLOAT || \
834 jc->type == JSON_T_INTEGER || \
835 jc->type == JSON_T_STRING)
836
837
838 static int parse_parse_buffer(JSON_parser jc)
839 {
840 if (jc->callback) {
841 JSON_value value, *arg = NULL;
842
843 if (jc->type != JSON_T_NONE) {
844 assert_is_non_container_type(jc);
845
846 switch(jc->type) {
847 case JSON_T_FLOAT:
848 arg = &value;
849 if (jc->handle_floats_manually) {
850 value.vu.str.value = jc->parse_buffer;
851 value.vu.str.length = jc->parse_buffer_count;
852 } else {
853 /* not checking with end pointer b/c there may be trailing ws */
854 value.vu.float_value = strtod(jc->parse_buffer, NULL);
855 }
856 break;
857 case JSON_T_INTEGER:
@@ -861,19 +862,19 @@
862 arg = &value;
863 value.vu.str.value = jc->parse_buffer;
864 value.vu.str.length = jc->parse_buffer_count;
865 break;
866 }
867
868 if (!(*jc->callback)(jc->ctx, jc->type, arg)) {
869 return false;
870 }
871 }
872 }
873
874 parse_buffer_clear(jc);
875
876 return true;
877 }
878
879 #define IS_HIGH_SURROGATE(uc) (((uc) & 0xFC00) == 0xD800)
880 #define IS_LOW_SURROGATE(uc) (((uc) & 0xFC00) == 0xDC00)
@@ -884,35 +885,39 @@
885 {
886 int i;
887 unsigned uc = 0;
888 char* p;
889 int trail_bytes;
890
891 assert(jc->parse_buffer_count >= 6);
892
893 p = &jc->parse_buffer[jc->parse_buffer_count - 4];
894
895 for (i = 12; i >= 0; i -= 4, ++p) {
896 unsigned x = *p;
897
898 if (x >= 'a') {
899 x -= ('a' - 10);
900 } else if (x >= 'A') {
901 x -= ('A' - 10);
902 } else {
903 x &= ~0x30u;
904 }
905
906 assert(x < 16);
907
908 uc |= x << i;
909 }
910
911 /* clear UTF-16 char from buffer */
912 jc->parse_buffer_count -= 6;
913 jc->parse_buffer[jc->parse_buffer_count] = 0;
914
915 if (uc == 0xffff || uc == 0xfffe) {
916 return false;
917 }
918
919 /* attempt decoding ... */
920 if (jc->utf16_high_surrogate) {
921 if (IS_LOW_SURROGATE(uc)) {
922 uc = DECODE_SURROGATE_PAIR(jc->utf16_high_surrogate, uc);
923 trail_bytes = 3;
@@ -935,26 +940,26 @@
940 return false;
941 } else {
942 trail_bytes = 2;
943 }
944 }
945
946 jc->parse_buffer[jc->parse_buffer_count++] = (char) ((uc >> (trail_bytes * 6)) | utf8_lead_bits[trail_bytes]);
947
948 for (i = trail_bytes * 6 - 6; i >= 0; i -= 6) {
949 jc->parse_buffer[jc->parse_buffer_count++] = (char) (((uc >> i) & 0x3F) | 0x80);
950 }
951
952 jc->parse_buffer[jc->parse_buffer_count] = 0;
953
954 return true;
955 }
956
957 static int add_escaped_char_to_parse_buffer(JSON_parser jc, int next_char)
958 {
959 assert(parse_buffer_has_space_for(jc, 1));
960
961 jc->escaped = 0;
962 /* remove the backslash */
963 parse_buffer_pop_back_char(jc);
964 switch(next_char) {
965 case 'b':
@@ -996,22 +1001,22 @@
1001 {
1002 if (!parse_buffer_reserve_for(jc, 1)) {
1003 assert(JSON_E_OUT_OF_MEMORY == jc->error);
1004 return false;
1005 }
1006
1007 if (jc->escaped) {
1008 if (!add_escaped_char_to_parse_buffer(jc, next_char)) {
1009 jc->error = JSON_E_INVALID_ESCAPE_SEQUENCE;
1010 return false;
1011 }
1012 } else if (!jc->comment) {
1013 if ((jc->type != JSON_T_NONE) | !((next_class == C_SPACE) | (next_class == C_WHITE)) /* non-white-space */) {
1014 parse_buffer_push_back_char(jc, (char)next_char);
1015 }
1016 }
1017
1018 return true;
1019 }
1020
1021 #define assert_type_isnt_string_null_or_bool(jc) \
1022 assert(jc->type != JSON_T_FALSE); \
@@ -1031,13 +1036,13 @@
1036 */
1037 int next_class, next_state;
1038
1039 /*
1040 Store the current char for error handling
1041 */
1042 jc->current_char = next_char;
1043
1044 /*
1045 Determine the character's class.
1046 */
1047 if (next_char < 0) {
1048 jc->error = JSON_E_INVALID_CHAR;
@@ -1050,15 +1055,15 @@
1055 if (next_class <= __) {
1056 set_error(jc);
1057 return false;
1058 }
1059 }
1060
1061 if (!add_char_to_parse_buffer(jc, next_char, next_class)) {
1062 return false;
1063 }
1064
1065 /*
1066 Get the next state from the state transition table.
1067 */
1068 next_state = state_transition_table[jc->state][next_class];
1069 if (next_state >= 0) {
@@ -1069,11 +1074,11 @@
1074 } else {
1075 /*
1076 Or perform one of the actions.
1077 */
1078 switch (next_state) {
1079 /* Unicode character */
1080 case UC:
1081 if(!decode_unicode_char(jc)) {
1082 jc->error = JSON_E_INVALID_UNICODE_SEQUENCE;
1083 return false;
1084 }
@@ -1091,78 +1096,78 @@
1096 break;
1097 /* integer detected by minus */
1098 case MX:
1099 jc->type = JSON_T_INTEGER;
1100 jc->state = MI;
1101 break;
1102 /* integer detected by zero */
1103 case ZX:
1104 jc->type = JSON_T_INTEGER;
1105 jc->state = ZE;
1106 break;
1107 /* integer detected by 1-9 */
1108 case IX:
1109 jc->type = JSON_T_INTEGER;
1110 jc->state = IT;
1111 break;
1112
1113 /* floating point number detected by exponent*/
1114 case DE:
1115 assert_type_isnt_string_null_or_bool(jc);
1116 jc->type = JSON_T_FLOAT;
1117 jc->state = E1;
1118 break;
1119
1120 /* floating point number detected by fraction */
1121 case DF:
1122 assert_type_isnt_string_null_or_bool(jc);
1123 if (!jc->handle_floats_manually) {
1124 /*
1125 Some versions of strtod (which underlies sscanf) don't support converting
1126 C-locale formated floating point values.
1127 */
1128 assert(jc->parse_buffer[jc->parse_buffer_count-1] == '.');
1129 jc->parse_buffer[jc->parse_buffer_count-1] = jc->decimal_point;
1130 }
1131 jc->type = JSON_T_FLOAT;
1132 jc->state = FX;
1133 break;
1134 /* string begin " */
1135 case SB:
1136 parse_buffer_clear(jc);
1137 assert(jc->type == JSON_T_NONE);
1138 jc->type = JSON_T_STRING;
1139 jc->state = ST;
1140 break;
1141
1142 /* n */
1143 case NU:
1144 assert(jc->type == JSON_T_NONE);
1145 jc->type = JSON_T_NULL;
1146 jc->state = N1;
1147 break;
1148 /* f */
1149 case FA:
1150 assert(jc->type == JSON_T_NONE);
1151 jc->type = JSON_T_FALSE;
1152 jc->state = F1;
1153 break;
1154 /* t */
1155 case TR:
1156 assert(jc->type == JSON_T_NONE);
1157 jc->type = JSON_T_TRUE;
1158 jc->state = T1;
1159 break;
1160
1161 /* closing comment */
1162 case CE:
1163 jc->comment = 0;
1164 assert(jc->parse_buffer_count == 0);
1165 assert(jc->type == JSON_T_NONE);
1166 jc->state = jc->before_comment_state;
1167 break;
1168
1169 /* opening comment */
1170 case CB:
1171 if (!jc->allow_comments) {
1172 return false;
1173 }
@@ -1172,11 +1177,11 @@
1177 }
1178 assert(jc->parse_buffer_count == 0);
1179 assert(jc->type != JSON_T_STRING);
1180 switch (jc->stack[jc->top]) {
1181 case MODE_ARRAY:
1182 case MODE_OBJECT:
1183 switch(jc->state) {
1184 case VA:
1185 case AR:
1186 jc->before_comment_state = jc->state;
1187 break;
@@ -1192,11 +1197,11 @@
1197 jc->type = JSON_T_NONE;
1198 jc->state = C1;
1199 jc->comment = 1;
1200 break;
1201 /* empty } */
1202 case -9:
1203 parse_buffer_clear(jc);
1204 if (jc->callback && !(*jc->callback)(jc->ctx, JSON_T_OBJECT_END, NULL)) {
1205 return false;
1206 }
1207 if (!pop(jc, MODE_KEY)) {
@@ -1231,11 +1236,11 @@
1236 }
1237 if (!pop(jc, MODE_ARRAY)) {
1238 jc->error = JSON_E_UNBALANCED_COLLECTION;
1239 return false;
1240 }
1241
1242 jc->type = JSON_T_NONE;
1243 jc->state = OK;
1244 break;
1245
1246 /* { */ case -6:
@@ -1267,11 +1272,11 @@
1272 switch (jc->stack[jc->top]) {
1273 case MODE_KEY:
1274 assert(jc->type == JSON_T_STRING);
1275 jc->type = JSON_T_NONE;
1276 jc->state = CO;
1277
1278 if (jc->callback) {
1279 JSON_value value;
1280 value.vu.str.value = jc->parse_buffer;
1281 value.vu.str.length = jc->parse_buffer_count;
1282 if (!(*jc->callback)(jc->ctx, JSON_T_KEY, &value)) {
@@ -1357,29 +1362,29 @@
1362
1363
1364 int JSON_parser_is_legal_white_space_string(const char* s)
1365 {
1366 int c, char_class;
1367
1368 if (s == NULL) {
1369 return false;
1370 }
1371
1372 for (; *s; ++s) {
1373 c = *s;
1374
1375 if (c < 0 || c >= 128) {
1376 return false;
1377 }
1378
1379 char_class = ascii_class[c];
1380
1381 if (char_class != C_SPACE && char_class != C_WHITE) {
1382 return false;
1383 }
1384 }
1385
1386 return true;
1387 }
1388
1389 int JSON_parser_get_last_error(JSON_parser jc)
1390 {
@@ -1389,16 +1394,17 @@
1394
1395 void init_JSON_config(JSON_config* config)
1396 {
1397 if (config) {
1398 memset(config, 0, sizeof(*config));
1399
1400 config->depth = JSON_PARSER_STACK_SIZE - 1;
1401 config->malloc = malloc;
1402 config->free = free;
1403 }
1404 }
1405
1406 /* end file parser/JSON_parser.c */
1407 /* begin file ./cson.c */
1408 #include <assert.h>
1409 #include <stdlib.h> /* malloc()/free() */
1410 #include <string.h>
1411
+1 -1
--- src/finfo.c
+++ src/finfo.c
@@ -196,11 +196,11 @@
196196
blob_reset(&line);
197197
blob_appendf(&line, "%.10s ", zCiUuid);
198198
blob_appendf(&line, "%.10s ", zDate);
199199
blob_appendf(&line, "%8.8s ", zUser);
200200
blob_appendf(&line, "%8.8s ", zBr);
201
- blob_appendf(&line,"%-40.40s\n", zCom );
201
+ blob_appendf(&line,"%-39.39s", zCom );
202202
comment_print(blob_str(&line), 0, 79);
203203
}
204204
}
205205
db_finalize(&q);
206206
blob_reset(&fname);
207207
--- src/finfo.c
+++ src/finfo.c
@@ -196,11 +196,11 @@
196 blob_reset(&line);
197 blob_appendf(&line, "%.10s ", zCiUuid);
198 blob_appendf(&line, "%.10s ", zDate);
199 blob_appendf(&line, "%8.8s ", zUser);
200 blob_appendf(&line, "%8.8s ", zBr);
201 blob_appendf(&line,"%-40.40s\n", zCom );
202 comment_print(blob_str(&line), 0, 79);
203 }
204 }
205 db_finalize(&q);
206 blob_reset(&fname);
207
--- src/finfo.c
+++ src/finfo.c
@@ -196,11 +196,11 @@
196 blob_reset(&line);
197 blob_appendf(&line, "%.10s ", zCiUuid);
198 blob_appendf(&line, "%.10s ", zDate);
199 blob_appendf(&line, "%8.8s ", zUser);
200 blob_appendf(&line, "%8.8s ", zBr);
201 blob_appendf(&line,"%-39.39s", zCom );
202 comment_print(blob_str(&line), 0, 79);
203 }
204 }
205 db_finalize(&q);
206 blob_reset(&fname);
207
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -124,11 +124,11 @@
124124
**
125125
** tag works like HTML mode's "t" option and branch works like HTML
126126
** mode's "r" option. They are very similar, but subtly different -
127127
** tag mode shows only entries with a given tag but branch mode can
128128
** also reveal some with "related" tags (meaning they were merged into
129
-** the requested branch).
129
+** the requested branch, or back).
130130
**
131131
** pSql is the target blob to append the query [subset]
132132
** to.
133133
**
134134
** Returns a positive value if it modifies pSql, 0 if it
@@ -144,10 +144,11 @@
144144
*/
145145
static char json_timeline_add_tag_branch_clause(Blob *pSql,
146146
cson_object * pPayload){
147147
char const * zTag = NULL;
148148
char const * zBranch = NULL;
149
+ char const * zMiOnly = NULL;
149150
int tagid = 0;
150151
if(! g.perm.Read ){
151152
return 0;
152153
}
153154
zTag = json_find_option_cstr("tag",NULL,NULL);
@@ -155,10 +156,11 @@
155156
zBranch = json_find_option_cstr("branch",NULL,NULL);
156157
if(!zBranch || !*zBranch){
157158
return 0;
158159
}
159160
zTag = zBranch;
161
+ zMiOnly = json_find_option_cstr("mionly",NULL,NULL);
160162
}
161163
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",
162164
zTag);
163165
if(tagid<=0){
164166
return -1;
@@ -175,16 +177,16 @@
175177
/* from "r" flag code in page_timeline().*/
176178
blob_appendf(pSql,
177179
" OR EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=cid"
178180
" WHERE tagid=%d AND tagtype>0 AND pid=blob.rid)",
179181
tagid);
180
-#if 0 /* from the undocumented "mionly" flag in page_timeline() */
181
- blob_appendf(pSql,
182
+ if( zMiOnly==0 ){
183
+ blob_appendf(pSql,
182184
" OR EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=pid"
183185
" WHERE tagid=%d AND tagtype>0 AND cid=blob.rid)",
184186
tagid);
185
-#endif
187
+ }
186188
}
187189
blob_append(pSql," ) ",3);
188190
return 1;
189191
}
190192
/*
191193
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -124,11 +124,11 @@
124 **
125 ** tag works like HTML mode's "t" option and branch works like HTML
126 ** mode's "r" option. They are very similar, but subtly different -
127 ** tag mode shows only entries with a given tag but branch mode can
128 ** also reveal some with "related" tags (meaning they were merged into
129 ** the requested branch).
130 **
131 ** pSql is the target blob to append the query [subset]
132 ** to.
133 **
134 ** Returns a positive value if it modifies pSql, 0 if it
@@ -144,10 +144,11 @@
144 */
145 static char json_timeline_add_tag_branch_clause(Blob *pSql,
146 cson_object * pPayload){
147 char const * zTag = NULL;
148 char const * zBranch = NULL;
 
149 int tagid = 0;
150 if(! g.perm.Read ){
151 return 0;
152 }
153 zTag = json_find_option_cstr("tag",NULL,NULL);
@@ -155,10 +156,11 @@
155 zBranch = json_find_option_cstr("branch",NULL,NULL);
156 if(!zBranch || !*zBranch){
157 return 0;
158 }
159 zTag = zBranch;
 
160 }
161 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",
162 zTag);
163 if(tagid<=0){
164 return -1;
@@ -175,16 +177,16 @@
175 /* from "r" flag code in page_timeline().*/
176 blob_appendf(pSql,
177 " OR EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=cid"
178 " WHERE tagid=%d AND tagtype>0 AND pid=blob.rid)",
179 tagid);
180 #if 0 /* from the undocumented "mionly" flag in page_timeline() */
181 blob_appendf(pSql,
182 " OR EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=pid"
183 " WHERE tagid=%d AND tagtype>0 AND cid=blob.rid)",
184 tagid);
185 #endif
186 }
187 blob_append(pSql," ) ",3);
188 return 1;
189 }
190 /*
191
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -124,11 +124,11 @@
124 **
125 ** tag works like HTML mode's "t" option and branch works like HTML
126 ** mode's "r" option. They are very similar, but subtly different -
127 ** tag mode shows only entries with a given tag but branch mode can
128 ** also reveal some with "related" tags (meaning they were merged into
129 ** the requested branch, or back).
130 **
131 ** pSql is the target blob to append the query [subset]
132 ** to.
133 **
134 ** Returns a positive value if it modifies pSql, 0 if it
@@ -144,10 +144,11 @@
144 */
145 static char json_timeline_add_tag_branch_clause(Blob *pSql,
146 cson_object * pPayload){
147 char const * zTag = NULL;
148 char const * zBranch = NULL;
149 char const * zMiOnly = NULL;
150 int tagid = 0;
151 if(! g.perm.Read ){
152 return 0;
153 }
154 zTag = json_find_option_cstr("tag",NULL,NULL);
@@ -155,10 +156,11 @@
156 zBranch = json_find_option_cstr("branch",NULL,NULL);
157 if(!zBranch || !*zBranch){
158 return 0;
159 }
160 zTag = zBranch;
161 zMiOnly = json_find_option_cstr("mionly",NULL,NULL);
162 }
163 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",
164 zTag);
165 if(tagid<=0){
166 return -1;
@@ -175,16 +177,16 @@
177 /* from "r" flag code in page_timeline().*/
178 blob_appendf(pSql,
179 " OR EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=cid"
180 " WHERE tagid=%d AND tagtype>0 AND pid=blob.rid)",
181 tagid);
182 if( zMiOnly==0 ){
183 blob_appendf(pSql,
184 " OR EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=pid"
185 " WHERE tagid=%d AND tagtype>0 AND cid=blob.rid)",
186 tagid);
187 }
188 }
189 blob_append(pSql," ) ",3);
190 return 1;
191 }
192 /*
193
+15 -3
--- src/main.c
+++ src/main.c
@@ -798,23 +798,35 @@
798798
fossil_print("This is fossil version " RELEASE_VERSION " "
799799
MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
800800
if(!find_option("verbose","v",0)){
801801
return;
802802
}else{
803
+#if defined(FOSSIL_ENABLE_TCL)
804
+ int rc;
805
+ const char *zRc;
806
+#endif
803807
fossil_print("Compiled on %s %s using %s (%d-bit)\n",
804808
__DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
805809
fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
806810
fossil_print("Schema version %s\n", AUX_SCHEMA);
807811
fossil_print("zlib %s\n", ZLIB_VERSION);
808812
#if defined(FOSSIL_ENABLE_SSL)
809813
fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
810814
#endif
811815
#if defined(FOSSIL_ENABLE_TCL)
812
- fossil_print("TCL (Tcl %s)\n", TCL_PATCH_LEVEL);
813
-#endif
816
+ Th_FossilInit(0, 0);
817
+ th_register_tcl(g.interp, &g.tcl);
818
+ rc = Th_Eval(g.interp, 0, "tclEval {package require Tcl}", -1);
819
+ zRc = Th_ReturnCodeName(rc, 1);
820
+ fossil_print("TCL (Tcl %s%s%s%s)\n", zRc, zRc ? ": " : "",
821
+ Th_GetResult(g.interp, 0),
814822
#if defined(FOSSIL_ENABLE_TCL_STUBS)
815
- fossil_print("TCL_STUBS\n");
823
+ zRc? "" : ", loaded only when needed"
824
+#else
825
+ ""
826
+#endif
827
+ );
816828
#endif
817829
#if defined(FOSSIL_ENABLE_JSON)
818830
fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
819831
#endif
820832
}
821833
--- src/main.c
+++ src/main.c
@@ -798,23 +798,35 @@
798 fossil_print("This is fossil version " RELEASE_VERSION " "
799 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
800 if(!find_option("verbose","v",0)){
801 return;
802 }else{
 
 
 
 
803 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
804 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
805 fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
806 fossil_print("Schema version %s\n", AUX_SCHEMA);
807 fossil_print("zlib %s\n", ZLIB_VERSION);
808 #if defined(FOSSIL_ENABLE_SSL)
809 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
810 #endif
811 #if defined(FOSSIL_ENABLE_TCL)
812 fossil_print("TCL (Tcl %s)\n", TCL_PATCH_LEVEL);
813 #endif
 
 
 
 
814 #if defined(FOSSIL_ENABLE_TCL_STUBS)
815 fossil_print("TCL_STUBS\n");
 
 
 
 
816 #endif
817 #if defined(FOSSIL_ENABLE_JSON)
818 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
819 #endif
820 }
821
--- src/main.c
+++ src/main.c
@@ -798,23 +798,35 @@
798 fossil_print("This is fossil version " RELEASE_VERSION " "
799 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
800 if(!find_option("verbose","v",0)){
801 return;
802 }else{
803 #if defined(FOSSIL_ENABLE_TCL)
804 int rc;
805 const char *zRc;
806 #endif
807 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
808 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
809 fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
810 fossil_print("Schema version %s\n", AUX_SCHEMA);
811 fossil_print("zlib %s\n", ZLIB_VERSION);
812 #if defined(FOSSIL_ENABLE_SSL)
813 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
814 #endif
815 #if defined(FOSSIL_ENABLE_TCL)
816 Th_FossilInit(0, 0);
817 th_register_tcl(g.interp, &g.tcl);
818 rc = Th_Eval(g.interp, 0, "tclEval {package require Tcl}", -1);
819 zRc = Th_ReturnCodeName(rc, 1);
820 fossil_print("TCL (Tcl %s%s%s%s)\n", zRc, zRc ? ": " : "",
821 Th_GetResult(g.interp, 0),
822 #if defined(FOSSIL_ENABLE_TCL_STUBS)
823 zRc? "" : ", loaded only when needed"
824 #else
825 ""
826 #endif
827 );
828 #endif
829 #if defined(FOSSIL_ENABLE_JSON)
830 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
831 #endif
832 }
833
+15 -3
--- src/main.c
+++ src/main.c
@@ -798,23 +798,35 @@
798798
fossil_print("This is fossil version " RELEASE_VERSION " "
799799
MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
800800
if(!find_option("verbose","v",0)){
801801
return;
802802
}else{
803
+#if defined(FOSSIL_ENABLE_TCL)
804
+ int rc;
805
+ const char *zRc;
806
+#endif
803807
fossil_print("Compiled on %s %s using %s (%d-bit)\n",
804808
__DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
805809
fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
806810
fossil_print("Schema version %s\n", AUX_SCHEMA);
807811
fossil_print("zlib %s\n", ZLIB_VERSION);
808812
#if defined(FOSSIL_ENABLE_SSL)
809813
fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
810814
#endif
811815
#if defined(FOSSIL_ENABLE_TCL)
812
- fossil_print("TCL (Tcl %s)\n", TCL_PATCH_LEVEL);
813
-#endif
816
+ Th_FossilInit(0, 0);
817
+ th_register_tcl(g.interp, &g.tcl);
818
+ rc = Th_Eval(g.interp, 0, "tclEval {package require Tcl}", -1);
819
+ zRc = Th_ReturnCodeName(rc, 1);
820
+ fossil_print("TCL (Tcl %s%s%s%s)\n", zRc, zRc ? ": " : "",
821
+ Th_GetResult(g.interp, 0),
814822
#if defined(FOSSIL_ENABLE_TCL_STUBS)
815
- fossil_print("TCL_STUBS\n");
823
+ zRc? "" : ", loaded only when needed"
824
+#else
825
+ ""
826
+#endif
827
+ );
816828
#endif
817829
#if defined(FOSSIL_ENABLE_JSON)
818830
fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
819831
#endif
820832
}
821833
--- src/main.c
+++ src/main.c
@@ -798,23 +798,35 @@
798 fossil_print("This is fossil version " RELEASE_VERSION " "
799 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
800 if(!find_option("verbose","v",0)){
801 return;
802 }else{
 
 
 
 
803 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
804 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
805 fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
806 fossil_print("Schema version %s\n", AUX_SCHEMA);
807 fossil_print("zlib %s\n", ZLIB_VERSION);
808 #if defined(FOSSIL_ENABLE_SSL)
809 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
810 #endif
811 #if defined(FOSSIL_ENABLE_TCL)
812 fossil_print("TCL (Tcl %s)\n", TCL_PATCH_LEVEL);
813 #endif
 
 
 
 
814 #if defined(FOSSIL_ENABLE_TCL_STUBS)
815 fossil_print("TCL_STUBS\n");
 
 
 
 
816 #endif
817 #if defined(FOSSIL_ENABLE_JSON)
818 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
819 #endif
820 }
821
--- src/main.c
+++ src/main.c
@@ -798,23 +798,35 @@
798 fossil_print("This is fossil version " RELEASE_VERSION " "
799 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
800 if(!find_option("verbose","v",0)){
801 return;
802 }else{
803 #if defined(FOSSIL_ENABLE_TCL)
804 int rc;
805 const char *zRc;
806 #endif
807 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
808 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
809 fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
810 fossil_print("Schema version %s\n", AUX_SCHEMA);
811 fossil_print("zlib %s\n", ZLIB_VERSION);
812 #if defined(FOSSIL_ENABLE_SSL)
813 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
814 #endif
815 #if defined(FOSSIL_ENABLE_TCL)
816 Th_FossilInit(0, 0);
817 th_register_tcl(g.interp, &g.tcl);
818 rc = Th_Eval(g.interp, 0, "tclEval {package require Tcl}", -1);
819 zRc = Th_ReturnCodeName(rc, 1);
820 fossil_print("TCL (Tcl %s%s%s%s)\n", zRc, zRc ? ": " : "",
821 Th_GetResult(g.interp, 0),
822 #if defined(FOSSIL_ENABLE_TCL_STUBS)
823 zRc? "" : ", loaded only when needed"
824 #else
825 ""
826 #endif
827 );
828 #endif
829 #if defined(FOSSIL_ENABLE_JSON)
830 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
831 #endif
832 }
833
+1 -1
--- src/main.mk
+++ src/main.mk
@@ -1160,11 +1160,11 @@
11601160
$(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
11611161
$(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
11621162
11631163
$(OBJDIR)/zip.h: $(OBJDIR)/headers
11641164
$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1165
- $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1165
+ $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
11661166
11671167
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
11681168
$(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
11691169
11701170
$(OBJDIR)/th.o: $(SRCDIR)/th.c
11711171
--- src/main.mk
+++ src/main.mk
@@ -1160,11 +1160,11 @@
1160 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1161 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1162
1163 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1164 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1165 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1166
1167 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1168 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1169
1170 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1171
--- src/main.mk
+++ src/main.mk
@@ -1160,11 +1160,11 @@
1160 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1161 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1162
1163 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1164 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1165 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1166
1167 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1168 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1169
1170 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1171
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -291,10 +291,11 @@
291291
append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
292292
#append opt " -DSQLITE_ENABLE_FTS3=1"
293293
append opt " -DSQLITE_ENABLE_STAT3"
294294
append opt " -Dlocaltime=fossil_localtime"
295295
append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
296
+append opt " -DSQLITE_WIN32_NO_ANSI"
296297
set SQLITE_OPTIONS $opt
297298
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
298299
299300
writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
300301
set opt {-Dmain=sqlite3_shell}
@@ -690,10 +691,14 @@
690691
endif
691692
692693
zlib:
693694
$(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
694695
696
+openssl: zlib
697
+ cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
698
+ $(MAKE) -C $(OPENSSLLIBDIR)
699
+
695700
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
696701
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
697702
698703
# This rule prevents make from using its default rules to try build
699704
# an executable named "manifest" out of the file named "manifest.c"
@@ -1230,17 +1235,17 @@
12301235
12311236
# define the sqlite files, which need special flags on compile
12321237
SQLITESRC=sqlite3.c
12331238
ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
12341239
SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
1235
-SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
1240
+SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI
12361241
12371242
# define the sqlite shell files, which need special flags on compile
12381243
SQLITESHELLSRC=shell.c
12391244
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
12401245
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
1241
-SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
1246
+SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
12421247
12431248
# define the th scripting files, which need special flags on compile
12441249
THSRC=th.c th_lang.c
12451250
ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
12461251
THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
12471252
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -291,10 +291,11 @@
291 append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
292 #append opt " -DSQLITE_ENABLE_FTS3=1"
293 append opt " -DSQLITE_ENABLE_STAT3"
294 append opt " -Dlocaltime=fossil_localtime"
295 append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
 
296 set SQLITE_OPTIONS $opt
297 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
298
299 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
300 set opt {-Dmain=sqlite3_shell}
@@ -690,10 +691,14 @@
690 endif
691
692 zlib:
693 $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
694
 
 
 
 
695 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
696 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
697
698 # This rule prevents make from using its default rules to try build
699 # an executable named "manifest" out of the file named "manifest.c"
@@ -1230,17 +1235,17 @@
1230
1231 # define the sqlite files, which need special flags on compile
1232 SQLITESRC=sqlite3.c
1233 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
1234 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
1235 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
1236
1237 # define the sqlite shell files, which need special flags on compile
1238 SQLITESHELLSRC=shell.c
1239 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
1240 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
1241 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
1242
1243 # define the th scripting files, which need special flags on compile
1244 THSRC=th.c th_lang.c
1245 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
1246 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
1247
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -291,10 +291,11 @@
291 append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
292 #append opt " -DSQLITE_ENABLE_FTS3=1"
293 append opt " -DSQLITE_ENABLE_STAT3"
294 append opt " -Dlocaltime=fossil_localtime"
295 append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0"
296 append opt " -DSQLITE_WIN32_NO_ANSI"
297 set SQLITE_OPTIONS $opt
298 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
299
300 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
301 set opt {-Dmain=sqlite3_shell}
@@ -690,10 +691,14 @@
691 endif
692
693 zlib:
694 $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
695
696 openssl: zlib
697 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
698 $(MAKE) -C $(OPENSSLLIBDIR)
699
700 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
701 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
702
703 # This rule prevents make from using its default rules to try build
704 # an executable named "manifest" out of the file named "manifest.c"
@@ -1230,17 +1235,17 @@
1235
1236 # define the sqlite files, which need special flags on compile
1237 SQLITESRC=sqlite3.c
1238 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
1239 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
1240 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI
1241
1242 # define the sqlite shell files, which need special flags on compile
1243 SQLITESHELLSRC=shell.c
1244 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
1245 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
1246 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
1247
1248 # define the th scripting files, which need special flags on compile
1249 THSRC=th.c th_lang.c
1250 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
1251 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
1252
--- src/update.c
+++ src/update.c
@@ -128,10 +128,11 @@
128128
db_must_be_within_tree();
129129
vid = db_lget_int("checkout", 0);
130130
if( vid==0 ){
131131
fossil_fatal("cannot find current version");
132132
}
133
+ user_select();
133134
if( !dryRunFlag && !internalUpdate ){
134135
autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag);
135136
}
136137
137138
/* Create any empty directories now, as well as after the update,
138139
--- src/update.c
+++ src/update.c
@@ -128,10 +128,11 @@
128 db_must_be_within_tree();
129 vid = db_lget_int("checkout", 0);
130 if( vid==0 ){
131 fossil_fatal("cannot find current version");
132 }
 
133 if( !dryRunFlag && !internalUpdate ){
134 autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag);
135 }
136
137 /* Create any empty directories now, as well as after the update,
138
--- src/update.c
+++ src/update.c
@@ -128,10 +128,11 @@
128 db_must_be_within_tree();
129 vid = db_lget_int("checkout", 0);
130 if( vid==0 ){
131 fossil_fatal("cannot find current version");
132 }
133 user_select();
134 if( !dryRunFlag && !internalUpdate ){
135 autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag);
136 }
137
138 /* Create any empty directories now, as well as after the update,
139
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -45,11 +45,11 @@
4545
int nFileSent; /* Number of files sent */
4646
int nDeltaSent; /* Number of deltas sent */
4747
int nFileRcvd; /* Number of files received */
4848
int nDeltaRcvd; /* Number of deltas received */
4949
int nDanglingFile; /* Number of dangling deltas received */
50
- int mxSend; /* Stop sending "file" with pOut reaches this size */
50
+ int mxSend; /* Stop sending "file" when pOut reaches this size */
5151
int resync; /* Send igot cards for all holdings */
5252
u8 syncPrivate; /* True to enable syncing private content */
5353
u8 nextIsPrivate; /* If true, next "file" received is a private */
5454
time_t maxTime; /* Time when this transfer should be finished */
5555
};
5656
--- src/xfer.c
+++ src/xfer.c
@@ -45,11 +45,11 @@
45 int nFileSent; /* Number of files sent */
46 int nDeltaSent; /* Number of deltas sent */
47 int nFileRcvd; /* Number of files received */
48 int nDeltaRcvd; /* Number of deltas received */
49 int nDanglingFile; /* Number of dangling deltas received */
50 int mxSend; /* Stop sending "file" with pOut reaches this size */
51 int resync; /* Send igot cards for all holdings */
52 u8 syncPrivate; /* True to enable syncing private content */
53 u8 nextIsPrivate; /* If true, next "file" received is a private */
54 time_t maxTime; /* Time when this transfer should be finished */
55 };
56
--- src/xfer.c
+++ src/xfer.c
@@ -45,11 +45,11 @@
45 int nFileSent; /* Number of files sent */
46 int nDeltaSent; /* Number of deltas sent */
47 int nFileRcvd; /* Number of files received */
48 int nDeltaRcvd; /* Number of deltas received */
49 int nDanglingFile; /* Number of dangling deltas received */
50 int mxSend; /* Stop sending "file" when pOut reaches this size */
51 int resync; /* Send igot cards for all holdings */
52 u8 syncPrivate; /* True to enable syncing private content */
53 u8 nextIsPrivate; /* If true, next "file" received is a private */
54 time_t maxTime; /* Time when this transfer should be finished */
55 };
56
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -45,11 +45,11 @@
4545
int nFileSent; /* Number of files sent */
4646
int nDeltaSent; /* Number of deltas sent */
4747
int nFileRcvd; /* Number of files received */
4848
int nDeltaRcvd; /* Number of deltas received */
4949
int nDanglingFile; /* Number of dangling deltas received */
50
- int mxSend; /* Stop sending "file" with pOut reaches this size */
50
+ int mxSend; /* Stop sending "file" when pOut reaches this size */
5151
int resync; /* Send igot cards for all holdings */
5252
u8 syncPrivate; /* True to enable syncing private content */
5353
u8 nextIsPrivate; /* If true, next "file" received is a private */
5454
time_t maxTime; /* Time when this transfer should be finished */
5555
};
5656
--- src/xfer.c
+++ src/xfer.c
@@ -45,11 +45,11 @@
45 int nFileSent; /* Number of files sent */
46 int nDeltaSent; /* Number of deltas sent */
47 int nFileRcvd; /* Number of files received */
48 int nDeltaRcvd; /* Number of deltas received */
49 int nDanglingFile; /* Number of dangling deltas received */
50 int mxSend; /* Stop sending "file" with pOut reaches this size */
51 int resync; /* Send igot cards for all holdings */
52 u8 syncPrivate; /* True to enable syncing private content */
53 u8 nextIsPrivate; /* If true, next "file" received is a private */
54 time_t maxTime; /* Time when this transfer should be finished */
55 };
56
--- src/xfer.c
+++ src/xfer.c
@@ -45,11 +45,11 @@
45 int nFileSent; /* Number of files sent */
46 int nDeltaSent; /* Number of deltas sent */
47 int nFileRcvd; /* Number of files received */
48 int nDeltaRcvd; /* Number of deltas received */
49 int nDanglingFile; /* Number of dangling deltas received */
50 int mxSend; /* Stop sending "file" when pOut reaches this size */
51 int resync; /* Send igot cards for all holdings */
52 u8 syncPrivate; /* True to enable syncing private content */
53 u8 nextIsPrivate; /* If true, next "file" received is a private */
54 time_t maxTime; /* Time when this transfer should be finished */
55 };
56
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,17 +83,17 @@
8383
8484
# define the sqlite files, which need special flags on compile
8585
SQLITESRC=sqlite3.c
8686
ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
8787
SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88
-SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
88
+SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI
8989
9090
# define the sqlite shell files, which need special flags on compile
9191
SQLITESHELLSRC=shell.c
9292
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
9393
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
-SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
94
+SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
9595
9696
# define the th scripting files, which need special flags on compile
9797
THSRC=th.c th_lang.c
9898
ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
9999
THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100100
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,17 +83,17 @@
83
84 # define the sqlite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
89
90 # define the sqlite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1
95
96 # define the th scripting files, which need special flags on compile
97 THSRC=th.c th_lang.c
98 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
99 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,17 +83,17 @@
83
84 # define the sqlite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI
89
90 # define the sqlite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94 SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob
95
96 # define the th scripting files, which need special flags on compile
97 THSRC=th.c th_lang.c
98 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
99 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
100
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
2424
CFLAGS = -o
2525
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
29
-SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
29
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI
3030
3131
SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3232
3333
OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
3434
3535
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
30
31 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
32
33 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
34
35
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI
30
31 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
32
33 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
34
35
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -658,10 +658,14 @@
658658
endif
659659
660660
zlib:
661661
$(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
662662
663
+openssl: zlib
664
+ cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
665
+ $(MAKE) -C $(OPENSSLLIBDIR)
666
+
663667
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
664668
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
665669
666670
# This rule prevents make from using its default rules to try build
667671
# an executable named "manifest" out of the file named "manifest.c"
@@ -1656,11 +1660,11 @@
16561660
$(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
16571661
16581662
$(OBJDIR)/zip.h: $(OBJDIR)/headers
16591663
16601664
$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1661
- $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1665
+ $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
16621666
16631667
$(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
16641668
$(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
16651669
16661670
$(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
16671671
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -658,10 +658,14 @@
658 endif
659
660 zlib:
661 $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
662
 
 
 
 
663 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
664 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
665
666 # This rule prevents make from using its default rules to try build
667 # an executable named "manifest" out of the file named "manifest.c"
@@ -1656,11 +1660,11 @@
1656 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1657
1658 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1659
1660 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1661 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1662
1663 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
1664 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1665
1666 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1667
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -658,10 +658,14 @@
658 endif
659
660 zlib:
661 $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
662
663 openssl: zlib
664 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
665 $(MAKE) -C $(OPENSSLLIBDIR)
666
667 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
668 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
669
670 # This rule prevents make from using its default rules to try build
671 # an executable named "manifest" out of the file named "manifest.c"
@@ -1656,11 +1660,11 @@
1660 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1661
1662 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1663
1664 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1665 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1666
1667 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
1668 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1669
1670 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1671
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -658,10 +658,14 @@
658658
endif
659659
660660
zlib:
661661
$(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
662662
663
+openssl: zlib
664
+ cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
665
+ $(MAKE) -C $(OPENSSLLIBDIR)
666
+
663667
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
664668
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
665669
666670
# This rule prevents make from using its default rules to try build
667671
# an executable named "manifest" out of the file named "manifest.c"
@@ -1656,11 +1660,11 @@
16561660
$(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
16571661
16581662
$(OBJDIR)/zip.h: $(OBJDIR)/headers
16591663
16601664
$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1661
- $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1665
+ $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
16621666
16631667
$(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
16641668
$(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
16651669
16661670
$(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
16671671
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -658,10 +658,14 @@
658 endif
659
660 zlib:
661 $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
662
 
 
 
 
663 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
664 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
665
666 # This rule prevents make from using its default rules to try build
667 # an executable named "manifest" out of the file named "manifest.c"
@@ -1656,11 +1660,11 @@
1656 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1657
1658 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1659
1660 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1661 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1662
1663 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
1664 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1665
1666 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1667
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -658,10 +658,14 @@
658 endif
659
660 zlib:
661 $(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) -f win32/Makefile.gcc libz.a
662
663 openssl: zlib
664 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
665 $(MAKE) -C $(OPENSSLLIBDIR)
666
667 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
668 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
669
670 # This rule prevents make from using its default rules to try build
671 # an executable named "manifest" out of the file named "manifest.c"
@@ -1656,11 +1660,11 @@
1660 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1661
1662 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1663
1664 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1665 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1666
1667 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
1668 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1669
1670 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1671
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -59,11 +59,12 @@
5959
SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
6060
/DSQLITE_THREADSAFE=0 \
6161
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
6262
/DSQLITE_ENABLE_STAT3 \
6363
/Dlocaltime=fossil_localtime \
64
- /DSQLITE_ENABLE_LOCKING_STYLE=0
64
+ /DSQLITE_ENABLE_LOCKING_STYLE=0 \
65
+ /DSQLITE_WIN32_NO_ANSI
6566
6667
SRC = add_.c \
6768
allrepo_.c \
6869
attach_.c \
6970
bag_.c \
7071
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -59,11 +59,12 @@
59 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
60 /DSQLITE_THREADSAFE=0 \
61 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
62 /DSQLITE_ENABLE_STAT3 \
63 /Dlocaltime=fossil_localtime \
64 /DSQLITE_ENABLE_LOCKING_STYLE=0
 
65
66 SRC = add_.c \
67 allrepo_.c \
68 attach_.c \
69 bag_.c \
70
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -59,11 +59,12 @@
59 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
60 /DSQLITE_THREADSAFE=0 \
61 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
62 /DSQLITE_ENABLE_STAT3 \
63 /Dlocaltime=fossil_localtime \
64 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
65 /DSQLITE_WIN32_NO_ANSI
66
67 SRC = add_.c \
68 allrepo_.c \
69 attach_.c \
70 bag_.c \
71
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,8 +1,8 @@
11
<title>Change Log</title>
22
3
-<h2>Changes For Version 1.27 (as yet unreleased)</h2>
3
+<h2>Changes For Version 1.27 (2013-09-11)</h2>
44
* Enhance the [/help?cmd=changes | fossil changes],
55
[/help?cmd=clean | fossil clean], [/help?cmd=extras | fossil extras],
66
[/help?cmd=ls | fossil ls] and [/help?cmd=status | fossil status] commands
77
to restrict operation to files and directories named on the command-line.
88
* New --integrate option to [/help?cmd=merge | fossil merge], which
@@ -9,13 +9,13 @@
99
automatically closes the merged branch when committing.
1010
* Renamed <tt>/stats_report</tt> page to [/reports]. Graph width is now
1111
relative, not absolute.
1212
* Added <tt>yw=YYYY-WW</tt> (year-week) filter to timeline to limit the results
1313
to a specific year and calendar week number, e.g. [/timeline?yw=2013-01].
14
- * Fixed an obscure condition under which an assertion failure could overwrite
15
- part of a repository database file, corrupting it. This problem has only
16
- been seen once in the wild.
14
+ * Updates to SQLite to prevent opening a repository file using file descriptors
15
+ 1 or 2 on unix. This fixes a bug under which an assertion failure could
16
+ overwrite part of a repository database file, corrupting it.
1717
* Added support for unlimited line lengths in side-by-side diffs.
1818
* New --close option to [/help?cmd=commit | fossil commit], which
1919
immediately closes the branch being committed.
2020
* Added <tt>chart</tt> option to [/help?cmd=bisect | fossil bisect].
2121
* Improvements to the "human or bot?" determination.
@@ -22,10 +22,13 @@
2222
* Reports errors about missing CGI-standard environment variables for HTTP
2323
servers which do not support them.
2424
* Minor improvements to sync support on Windows.
2525
* Added <tt>--scgi</tt> option to [/help?cmd=server | fossil server].
2626
* Internal improvements to the sync process.
27
+ * The internals of the JSON API are now MIT-licensed, so downstream
28
+ users/packagers are no longer affected by the "do no evil" license
29
+ clause.
2730
2831
<h2>Changes For Version 1.26 (2013-06-18)</h2>
2932
* The argument to the --port option for the [/help?cmd=ui | fossil ui] and
3033
[/help?cmd=server | fossil server] commands can take an IP address in addition
3134
to the port number, causing Fossil to bind to just that one IP address.
3235
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,8 +1,8 @@
1 <title>Change Log</title>
2
3 <h2>Changes For Version 1.27 (as yet unreleased)</h2>
4 * Enhance the [/help?cmd=changes | fossil changes],
5 [/help?cmd=clean | fossil clean], [/help?cmd=extras | fossil extras],
6 [/help?cmd=ls | fossil ls] and [/help?cmd=status | fossil status] commands
7 to restrict operation to files and directories named on the command-line.
8 * New --integrate option to [/help?cmd=merge | fossil merge], which
@@ -9,13 +9,13 @@
9 automatically closes the merged branch when committing.
10 * Renamed <tt>/stats_report</tt> page to [/reports]. Graph width is now
11 relative, not absolute.
12 * Added <tt>yw=YYYY-WW</tt> (year-week) filter to timeline to limit the results
13 to a specific year and calendar week number, e.g. [/timeline?yw=2013-01].
14 * Fixed an obscure condition under which an assertion failure could overwrite
15 part of a repository database file, corrupting it. This problem has only
16 been seen once in the wild.
17 * Added support for unlimited line lengths in side-by-side diffs.
18 * New --close option to [/help?cmd=commit | fossil commit], which
19 immediately closes the branch being committed.
20 * Added <tt>chart</tt> option to [/help?cmd=bisect | fossil bisect].
21 * Improvements to the "human or bot?" determination.
@@ -22,10 +22,13 @@
22 * Reports errors about missing CGI-standard environment variables for HTTP
23 servers which do not support them.
24 * Minor improvements to sync support on Windows.
25 * Added <tt>--scgi</tt> option to [/help?cmd=server | fossil server].
26 * Internal improvements to the sync process.
 
 
 
27
28 <h2>Changes For Version 1.26 (2013-06-18)</h2>
29 * The argument to the --port option for the [/help?cmd=ui | fossil ui] and
30 [/help?cmd=server | fossil server] commands can take an IP address in addition
31 to the port number, causing Fossil to bind to just that one IP address.
32
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,8 +1,8 @@
1 <title>Change Log</title>
2
3 <h2>Changes For Version 1.27 (2013-09-11)</h2>
4 * Enhance the [/help?cmd=changes | fossil changes],
5 [/help?cmd=clean | fossil clean], [/help?cmd=extras | fossil extras],
6 [/help?cmd=ls | fossil ls] and [/help?cmd=status | fossil status] commands
7 to restrict operation to files and directories named on the command-line.
8 * New --integrate option to [/help?cmd=merge | fossil merge], which
@@ -9,13 +9,13 @@
9 automatically closes the merged branch when committing.
10 * Renamed <tt>/stats_report</tt> page to [/reports]. Graph width is now
11 relative, not absolute.
12 * Added <tt>yw=YYYY-WW</tt> (year-week) filter to timeline to limit the results
13 to a specific year and calendar week number, e.g. [/timeline?yw=2013-01].
14 * Updates to SQLite to prevent opening a repository file using file descriptors
15 1 or 2 on unix. This fixes a bug under which an assertion failure could
16 overwrite part of a repository database file, corrupting it.
17 * Added support for unlimited line lengths in side-by-side diffs.
18 * New --close option to [/help?cmd=commit | fossil commit], which
19 immediately closes the branch being committed.
20 * Added <tt>chart</tt> option to [/help?cmd=bisect | fossil bisect].
21 * Improvements to the "human or bot?" determination.
@@ -22,10 +22,13 @@
22 * Reports errors about missing CGI-standard environment variables for HTTP
23 servers which do not support them.
24 * Minor improvements to sync support on Windows.
25 * Added <tt>--scgi</tt> option to [/help?cmd=server | fossil server].
26 * Internal improvements to the sync process.
27 * The internals of the JSON API are now MIT-licensed, so downstream
28 users/packagers are no longer affected by the "do no evil" license
29 clause.
30
31 <h2>Changes For Version 1.26 (2013-06-18)</h2>
32 * The argument to the --port option for the [/help?cmd=ui | fossil ui] and
33 [/help?cmd=server | fossil server] commands can take an IP address in addition
34 to the port number, causing Fossil to bind to just that one IP address.
35
--- www/fileformat.wiki
+++ www/fileformat.wiki
@@ -586,144 +586,144 @@
586586
<td align=center><b>0-1</b></td>
587587
</tr>
588588
<tr>
589589
<td><b>D</b> <i>date-time-stamp</i></td>
590590
<td align=center><b>1</b></td>
591
-<td align=center>&nbsp;</td>
591
+<td>&nbsp;</td>
592592
<td align=center><b>1</b></td>
593593
<td align=center><b>1</b></td>
594594
<td align=center><b>1</b></td>
595595
<td align=center><b>1</b></td>
596596
<td align=center><b>1</b></td>
597597
</tr>
598598
<tr>
599599
<td><b>E</b> <i>event-time event-id</i></td>
600
-<td align=center>&nbsp;</td>
601
-<td align=center>&nbsp;</td>
602
-<td align=center>&nbsp;</td>
603
-<td align=center>&nbsp;</td>
604
-<td align=center>&nbsp;</td>
605
-<td align=center>&nbsp;</td>
600
+<td>&nbsp;</td>
601
+<td>&nbsp;</td>
602
+<td>&nbsp;</td>
603
+<td>&nbsp;</td>
604
+<td>&nbsp;</td>
605
+<td>&nbsp;</td>
606606
<td align=center><b>1</b></td>
607607
</tr>
608608
<tr>
609609
<td><b>F</b> <i>filename</i> ?<i>uuid</i>? ?<i>permissions</i>? ?<i>oldname</i>?</td>
610610
<td align=center><b>0+</b></td>
611
-<td align=center>&nbsp;</td>
612
-<td align=center>&nbsp;</td>
613
-<td align=center>&nbsp;</td>
614
-<td align=center>&nbsp;</td>
615
-<td align=center>&nbsp;</td>
616
-<td align=center>&nbsp;</td>
611
+<td>&nbsp;</td>
612
+<td>&nbsp;</td>
613
+<td>&nbsp;</td>
614
+<td>&nbsp;</td>
615
+<td>&nbsp;</td>
616
+<td>&nbsp;</td>
617617
</tr>
618618
<tr>
619619
<td><b>J</b> <i>name</i> ?<i>value</i>?</td>
620
-<td align=center>&nbsp;</td>
621
-<td align=center>&nbsp;</td>
622
-<td align=center>&nbsp;</td>
623
-<td align=center>&nbsp;</td>
620
+<td>&nbsp;</td>
621
+<td>&nbsp;</td>
622
+<td>&nbsp;</td>
623
+<td>&nbsp;</td>
624624
<td align=center><b>1+</b></td>
625
-<td align=center>&nbsp;</td>
626
-<td align=center>&nbsp;</td>
625
+<td>&nbsp;</td>
626
+<td>&nbsp;</td>
627627
</tr>
628628
<tr>
629629
<td><b>K</b> <i>ticket-uuid</i></td>
630
-<td align=center>&nbsp;</td>
631
-<td align=center>&nbsp;</td>
632
-<td align=center>&nbsp;</td>
633
-<td align=center>&nbsp;</td>
630
+<td>&nbsp;</td>
631
+<td>&nbsp;</td>
632
+<td>&nbsp;</td>
633
+<td>&nbsp;</td>
634634
<td align=center><b>1</b></td>
635
-<td align=center>&nbsp;</td>
636
-<td align=center>&nbsp;</td>
635
+<td>&nbsp;</td>
636
+<td>&nbsp;</td>
637637
</tr>
638638
<tr>
639639
<td><b>L</b> <i>wiki-title</i></td>
640
-<td align=center>&nbsp;</td>
641
-<td align=center>&nbsp;</td>
642
-<td align=center>&nbsp;</td>
640
+<td>&nbsp;</td>
641
+<td>&nbsp;</td>
642
+<td>&nbsp;</td>
643643
<td align=center><b>1</b></td>
644
-<td align=center>&nbsp;</td>
645
-<td align=center>&nbsp;</td>
646
-<td align=center>&nbsp;</td>
644
+<td>&nbsp;</td>
645
+<td>&nbsp;</td>
646
+<td>&nbsp;</td>
647647
</tr>
648648
<tr>
649649
<td><b>M</b> <i>uuid</i></td>
650
-<td align=center>&nbsp;</td>
650
+<td>&nbsp;</td>
651651
<td align=center><b>1+</b></td>
652
-<td align=center>&nbsp;</td>
653
-<td align=center>&nbsp;</td>
654
-<td align=center>&nbsp;</td>
655
-<td align=center>&nbsp;</td>
656
-<td align=center>&nbsp;</td>
652
+<td>&nbsp;</td>
653
+<td>&nbsp;</td>
654
+<td>&nbsp;</td>
655
+<td>&nbsp;</td>
656
+<td>&nbsp;</td>
657657
</tr>
658658
<tr>
659659
<td><b>N</b> <i>mimetype</i></td>
660660
<td align=center><b>0-1</b></td>
661
-<td align=center>&nbsp;</td>
662
-<td align=center>&nbsp;</td>
661
+<td>&nbsp;</td>
662
+<td>&nbsp;</td>
663663
<td align=center><b>0-1</b></td>
664
-<td align=center>&nbsp;</td>
664
+<td>&nbsp;</td>
665665
<td align=center><b>0-1</b></td>
666666
<td align=center><b>0-1</b></td>
667667
</tr>
668668
<tr>
669669
<td><b>P</b> <i>uuid ...</i></td>
670670
<td align=center><b>0-1</b></td>
671
-<td align=center>&nbsp;</td>
672
-<td align=center>&nbsp;</td>
671
+<td>&nbsp;</td>
672
+<td>&nbsp;</td>
673673
<td align=center><b>0-1</b></td>
674
-<td align=center>&nbsp;</td>
675
-<td align=center>&nbsp;</td>
674
+<td>&nbsp;</td>
675
+<td>&nbsp;</td>
676676
<td align=center><b>0-1</b></td>
677677
</tr>
678678
<tr>
679679
<td><b>Q</b> (<b>+</b>|<b>-</b>)<i>uuid</i> ?<i>uuid</i>?</td>
680680
<td align=center><b>0+</b></td>
681
-<td align=center>&nbsp;</td>
682
-<td align=center>&nbsp;</td>
683
-<td align=center>&nbsp;</td>
684
-<td align=center>&nbsp;</td>
685
-<td align=center>&nbsp;</td>
686
-<td align=center>&nbsp;</td>
681
+<td>&nbsp;</td>
682
+<td>&nbsp;</td>
683
+<td>&nbsp;</td>
684
+<td>&nbsp;</td>
685
+<td>&nbsp;</td>
686
+<td>&nbsp;</td>
687687
</tr>
688688
<tr>
689689
<td><b>R</b> <i>md5sum</i></td>
690690
<td align=center><b>0-1</b></td>
691
-<td align=center>&nbsp;</td>
692
-<td align=center>&nbsp;</td>
693
-<td align=center>&nbsp;</td>
694
-<td align=center>&nbsp;</td>
695
-<td align=center>&nbsp;</td>
696
-<td align=center>&nbsp;</td>
691
+<td>&nbsp;</td>
692
+<td>&nbsp;</td>
693
+<td>&nbsp;</td>
694
+<td>&nbsp;</td>
695
+<td>&nbsp;</td>
696
+<td>&nbsp;</td>
697697
<tr>
698698
<td><b>T</b> (<b>+</b>|<b>*</b>|<b>-</b>)<i>tagname</i> <i>uuid</i> ?<i>value</i>?</td>
699699
<td align=center><b>0+</b></td>
700
-<td align=center>&nbsp;</td>
700
+<td>&nbsp;</td>
701701
<td align=center><b>1+</b></td>
702
-<td align=center>&nbsp;</td>
703
-<td align=center>&nbsp;</td>
704
-<td align=center>&nbsp;</td>
702
+<td>&nbsp;</td>
703
+<td>&nbsp;</td>
704
+<td>&nbsp;</td>
705705
<td align=center><b>0+</b></td>
706706
</tr>
707707
<tr>
708708
<td><b>U</b> <i>username</i></td>
709709
<td align=center><b>1</b></td>
710
-<td align=center>&nbsp;</td>
710
+<td>&nbsp;</td>
711711
<td align=center><b>1</b></td>
712712
<td align=center><b>1</b></td>
713713
<td align=center><b>1</b></td>
714714
<td align=center><b>0-1</b></td>
715715
<td align=center><b>0-1</b></td>
716716
</tr>
717717
<tr>
718718
<td><b>W</b> <i>size</i></td>
719
-<td align=center>&nbsp;</td>
720
-<td align=center>&nbsp;</td>
721
-<td align=center>&nbsp;</td>
719
+<td>&nbsp;</td>
720
+<td>&nbsp;</td>
721
+<td>&nbsp;</td>
722722
<td align=center><b>1</b></td>
723
-<td align=center>&nbsp;</td>
724
-<td align=center>&nbsp;</td>
723
+<td>&nbsp;</td>
724
+<td>&nbsp;</td>
725725
<td align=center><b>1</b></td>
726726
</tr>
727727
<tr>
728728
<td><b>Z</b> <i>md5sum</i></td>
729729
<td align=center><b>1</b></td>
@@ -777,7 +777,7 @@
777777
filenames in the manifest are "fossilized" (encoded) because they contain
778778
spaces. In that case the shell-generated hash would differ because the
779779
<tt>stat</tt> calls will fail to find such files (which are output in encoded
780780
form here). That approach also won't work for delta manifests. Calculating
781781
the R-card for delta manifests requires traversing both the delta and its baseline in
782
-lexical order of the files, prefering the delta's copy if both contain
782
+lexical order of the files, preferring the delta's copy if both contain
783783
a given file.
784784
--- www/fileformat.wiki
+++ www/fileformat.wiki
@@ -586,144 +586,144 @@
586 <td align=center><b>0-1</b></td>
587 </tr>
588 <tr>
589 <td><b>D</b> <i>date-time-stamp</i></td>
590 <td align=center><b>1</b></td>
591 <td align=center>&nbsp;</td>
592 <td align=center><b>1</b></td>
593 <td align=center><b>1</b></td>
594 <td align=center><b>1</b></td>
595 <td align=center><b>1</b></td>
596 <td align=center><b>1</b></td>
597 </tr>
598 <tr>
599 <td><b>E</b> <i>event-time event-id</i></td>
600 <td align=center>&nbsp;</td>
601 <td align=center>&nbsp;</td>
602 <td align=center>&nbsp;</td>
603 <td align=center>&nbsp;</td>
604 <td align=center>&nbsp;</td>
605 <td align=center>&nbsp;</td>
606 <td align=center><b>1</b></td>
607 </tr>
608 <tr>
609 <td><b>F</b> <i>filename</i> ?<i>uuid</i>? ?<i>permissions</i>? ?<i>oldname</i>?</td>
610 <td align=center><b>0+</b></td>
611 <td align=center>&nbsp;</td>
612 <td align=center>&nbsp;</td>
613 <td align=center>&nbsp;</td>
614 <td align=center>&nbsp;</td>
615 <td align=center>&nbsp;</td>
616 <td align=center>&nbsp;</td>
617 </tr>
618 <tr>
619 <td><b>J</b> <i>name</i> ?<i>value</i>?</td>
620 <td align=center>&nbsp;</td>
621 <td align=center>&nbsp;</td>
622 <td align=center>&nbsp;</td>
623 <td align=center>&nbsp;</td>
624 <td align=center><b>1+</b></td>
625 <td align=center>&nbsp;</td>
626 <td align=center>&nbsp;</td>
627 </tr>
628 <tr>
629 <td><b>K</b> <i>ticket-uuid</i></td>
630 <td align=center>&nbsp;</td>
631 <td align=center>&nbsp;</td>
632 <td align=center>&nbsp;</td>
633 <td align=center>&nbsp;</td>
634 <td align=center><b>1</b></td>
635 <td align=center>&nbsp;</td>
636 <td align=center>&nbsp;</td>
637 </tr>
638 <tr>
639 <td><b>L</b> <i>wiki-title</i></td>
640 <td align=center>&nbsp;</td>
641 <td align=center>&nbsp;</td>
642 <td align=center>&nbsp;</td>
643 <td align=center><b>1</b></td>
644 <td align=center>&nbsp;</td>
645 <td align=center>&nbsp;</td>
646 <td align=center>&nbsp;</td>
647 </tr>
648 <tr>
649 <td><b>M</b> <i>uuid</i></td>
650 <td align=center>&nbsp;</td>
651 <td align=center><b>1+</b></td>
652 <td align=center>&nbsp;</td>
653 <td align=center>&nbsp;</td>
654 <td align=center>&nbsp;</td>
655 <td align=center>&nbsp;</td>
656 <td align=center>&nbsp;</td>
657 </tr>
658 <tr>
659 <td><b>N</b> <i>mimetype</i></td>
660 <td align=center><b>0-1</b></td>
661 <td align=center>&nbsp;</td>
662 <td align=center>&nbsp;</td>
663 <td align=center><b>0-1</b></td>
664 <td align=center>&nbsp;</td>
665 <td align=center><b>0-1</b></td>
666 <td align=center><b>0-1</b></td>
667 </tr>
668 <tr>
669 <td><b>P</b> <i>uuid ...</i></td>
670 <td align=center><b>0-1</b></td>
671 <td align=center>&nbsp;</td>
672 <td align=center>&nbsp;</td>
673 <td align=center><b>0-1</b></td>
674 <td align=center>&nbsp;</td>
675 <td align=center>&nbsp;</td>
676 <td align=center><b>0-1</b></td>
677 </tr>
678 <tr>
679 <td><b>Q</b> (<b>+</b>|<b>-</b>)<i>uuid</i> ?<i>uuid</i>?</td>
680 <td align=center><b>0+</b></td>
681 <td align=center>&nbsp;</td>
682 <td align=center>&nbsp;</td>
683 <td align=center>&nbsp;</td>
684 <td align=center>&nbsp;</td>
685 <td align=center>&nbsp;</td>
686 <td align=center>&nbsp;</td>
687 </tr>
688 <tr>
689 <td><b>R</b> <i>md5sum</i></td>
690 <td align=center><b>0-1</b></td>
691 <td align=center>&nbsp;</td>
692 <td align=center>&nbsp;</td>
693 <td align=center>&nbsp;</td>
694 <td align=center>&nbsp;</td>
695 <td align=center>&nbsp;</td>
696 <td align=center>&nbsp;</td>
697 <tr>
698 <td><b>T</b> (<b>+</b>|<b>*</b>|<b>-</b>)<i>tagname</i> <i>uuid</i> ?<i>value</i>?</td>
699 <td align=center><b>0+</b></td>
700 <td align=center>&nbsp;</td>
701 <td align=center><b>1+</b></td>
702 <td align=center>&nbsp;</td>
703 <td align=center>&nbsp;</td>
704 <td align=center>&nbsp;</td>
705 <td align=center><b>0+</b></td>
706 </tr>
707 <tr>
708 <td><b>U</b> <i>username</i></td>
709 <td align=center><b>1</b></td>
710 <td align=center>&nbsp;</td>
711 <td align=center><b>1</b></td>
712 <td align=center><b>1</b></td>
713 <td align=center><b>1</b></td>
714 <td align=center><b>0-1</b></td>
715 <td align=center><b>0-1</b></td>
716 </tr>
717 <tr>
718 <td><b>W</b> <i>size</i></td>
719 <td align=center>&nbsp;</td>
720 <td align=center>&nbsp;</td>
721 <td align=center>&nbsp;</td>
722 <td align=center><b>1</b></td>
723 <td align=center>&nbsp;</td>
724 <td align=center>&nbsp;</td>
725 <td align=center><b>1</b></td>
726 </tr>
727 <tr>
728 <td><b>Z</b> <i>md5sum</i></td>
729 <td align=center><b>1</b></td>
@@ -777,7 +777,7 @@
777 filenames in the manifest are "fossilized" (encoded) because they contain
778 spaces. In that case the shell-generated hash would differ because the
779 <tt>stat</tt> calls will fail to find such files (which are output in encoded
780 form here). That approach also won't work for delta manifests. Calculating
781 the R-card for delta manifests requires traversing both the delta and its baseline in
782 lexical order of the files, prefering the delta's copy if both contain
783 a given file.
784
--- www/fileformat.wiki
+++ www/fileformat.wiki
@@ -586,144 +586,144 @@
586 <td align=center><b>0-1</b></td>
587 </tr>
588 <tr>
589 <td><b>D</b> <i>date-time-stamp</i></td>
590 <td align=center><b>1</b></td>
591 <td>&nbsp;</td>
592 <td align=center><b>1</b></td>
593 <td align=center><b>1</b></td>
594 <td align=center><b>1</b></td>
595 <td align=center><b>1</b></td>
596 <td align=center><b>1</b></td>
597 </tr>
598 <tr>
599 <td><b>E</b> <i>event-time event-id</i></td>
600 <td>&nbsp;</td>
601 <td>&nbsp;</td>
602 <td>&nbsp;</td>
603 <td>&nbsp;</td>
604 <td>&nbsp;</td>
605 <td>&nbsp;</td>
606 <td align=center><b>1</b></td>
607 </tr>
608 <tr>
609 <td><b>F</b> <i>filename</i> ?<i>uuid</i>? ?<i>permissions</i>? ?<i>oldname</i>?</td>
610 <td align=center><b>0+</b></td>
611 <td>&nbsp;</td>
612 <td>&nbsp;</td>
613 <td>&nbsp;</td>
614 <td>&nbsp;</td>
615 <td>&nbsp;</td>
616 <td>&nbsp;</td>
617 </tr>
618 <tr>
619 <td><b>J</b> <i>name</i> ?<i>value</i>?</td>
620 <td>&nbsp;</td>
621 <td>&nbsp;</td>
622 <td>&nbsp;</td>
623 <td>&nbsp;</td>
624 <td align=center><b>1+</b></td>
625 <td>&nbsp;</td>
626 <td>&nbsp;</td>
627 </tr>
628 <tr>
629 <td><b>K</b> <i>ticket-uuid</i></td>
630 <td>&nbsp;</td>
631 <td>&nbsp;</td>
632 <td>&nbsp;</td>
633 <td>&nbsp;</td>
634 <td align=center><b>1</b></td>
635 <td>&nbsp;</td>
636 <td>&nbsp;</td>
637 </tr>
638 <tr>
639 <td><b>L</b> <i>wiki-title</i></td>
640 <td>&nbsp;</td>
641 <td>&nbsp;</td>
642 <td>&nbsp;</td>
643 <td align=center><b>1</b></td>
644 <td>&nbsp;</td>
645 <td>&nbsp;</td>
646 <td>&nbsp;</td>
647 </tr>
648 <tr>
649 <td><b>M</b> <i>uuid</i></td>
650 <td>&nbsp;</td>
651 <td align=center><b>1+</b></td>
652 <td>&nbsp;</td>
653 <td>&nbsp;</td>
654 <td>&nbsp;</td>
655 <td>&nbsp;</td>
656 <td>&nbsp;</td>
657 </tr>
658 <tr>
659 <td><b>N</b> <i>mimetype</i></td>
660 <td align=center><b>0-1</b></td>
661 <td>&nbsp;</td>
662 <td>&nbsp;</td>
663 <td align=center><b>0-1</b></td>
664 <td>&nbsp;</td>
665 <td align=center><b>0-1</b></td>
666 <td align=center><b>0-1</b></td>
667 </tr>
668 <tr>
669 <td><b>P</b> <i>uuid ...</i></td>
670 <td align=center><b>0-1</b></td>
671 <td>&nbsp;</td>
672 <td>&nbsp;</td>
673 <td align=center><b>0-1</b></td>
674 <td>&nbsp;</td>
675 <td>&nbsp;</td>
676 <td align=center><b>0-1</b></td>
677 </tr>
678 <tr>
679 <td><b>Q</b> (<b>+</b>|<b>-</b>)<i>uuid</i> ?<i>uuid</i>?</td>
680 <td align=center><b>0+</b></td>
681 <td>&nbsp;</td>
682 <td>&nbsp;</td>
683 <td>&nbsp;</td>
684 <td>&nbsp;</td>
685 <td>&nbsp;</td>
686 <td>&nbsp;</td>
687 </tr>
688 <tr>
689 <td><b>R</b> <i>md5sum</i></td>
690 <td align=center><b>0-1</b></td>
691 <td>&nbsp;</td>
692 <td>&nbsp;</td>
693 <td>&nbsp;</td>
694 <td>&nbsp;</td>
695 <td>&nbsp;</td>
696 <td>&nbsp;</td>
697 <tr>
698 <td><b>T</b> (<b>+</b>|<b>*</b>|<b>-</b>)<i>tagname</i> <i>uuid</i> ?<i>value</i>?</td>
699 <td align=center><b>0+</b></td>
700 <td>&nbsp;</td>
701 <td align=center><b>1+</b></td>
702 <td>&nbsp;</td>
703 <td>&nbsp;</td>
704 <td>&nbsp;</td>
705 <td align=center><b>0+</b></td>
706 </tr>
707 <tr>
708 <td><b>U</b> <i>username</i></td>
709 <td align=center><b>1</b></td>
710 <td>&nbsp;</td>
711 <td align=center><b>1</b></td>
712 <td align=center><b>1</b></td>
713 <td align=center><b>1</b></td>
714 <td align=center><b>0-1</b></td>
715 <td align=center><b>0-1</b></td>
716 </tr>
717 <tr>
718 <td><b>W</b> <i>size</i></td>
719 <td>&nbsp;</td>
720 <td>&nbsp;</td>
721 <td>&nbsp;</td>
722 <td align=center><b>1</b></td>
723 <td>&nbsp;</td>
724 <td>&nbsp;</td>
725 <td align=center><b>1</b></td>
726 </tr>
727 <tr>
728 <td><b>Z</b> <i>md5sum</i></td>
729 <td align=center><b>1</b></td>
@@ -777,7 +777,7 @@
777 filenames in the manifest are "fossilized" (encoded) because they contain
778 spaces. In that case the shell-generated hash would differ because the
779 <tt>stat</tt> calls will fail to find such files (which are output in encoded
780 form here). That approach also won't work for delta manifests. Calculating
781 the R-card for delta manifests requires traversing both the delta and its baseline in
782 lexical order of the files, preferring the delta's copy if both contain
783 a given file.
784
--- www/mkdownload.tcl
+++ www/mkdownload.tcl
@@ -68,20 +68,20 @@
6868
set dt [string range $datetime 0 3]-[string range $datetime 4 5]-
6969
append dt "[string range $datetime 6 7] "
7070
append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:"
7171
append dt "[string range $datetime 12 13]"
7272
set link [string map {{ } +} $dt]
73
- set hr http://www.fossil-scm.org/fossil/timeline?c=$link&amp;y=ci
73
+ set hr "http://www.fossil-scm.org/fossil/timeline?c=$link&amp;y=ci"
7474
puts $out "<tr><td colspan=6 align=left><hr>"
7575
puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>"
7676
puts $out "</td></tr>"
7777
puts $out "<tr>"
7878
7979
foreach {prefix suffix img desc} {
80
- fossil-linux-x86 zip linux.gif {Linux x86}
81
- fossil-macosx-x86 zip mac.gif {Mac 10.5 x86}
82
- fossil-openbsd-x86 zip openbsd.gif {OpenBSD 4.7 x86}
80
+ fossil-linux-x86 zip linux.gif {Linux 3.x x86}
81
+ fossil-macosx-x86 zip mac.gif {Mac 10.x x86}
82
+ fossil-openbsd-x86 zip openbsd.gif {OpenBSD 4.x x86}
8383
fossil-w32 zip win32.gif {Windows}
8484
fossil-src tar.gz src.gif {Source Tarball}
8585
} {
8686
set filename download/$prefix-$datetime.$suffix
8787
if {[file exists $filename]} {
8888
--- www/mkdownload.tcl
+++ www/mkdownload.tcl
@@ -68,20 +68,20 @@
68 set dt [string range $datetime 0 3]-[string range $datetime 4 5]-
69 append dt "[string range $datetime 6 7] "
70 append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:"
71 append dt "[string range $datetime 12 13]"
72 set link [string map {{ } +} $dt]
73 set hr http://www.fossil-scm.org/fossil/timeline?c=$link&amp;y=ci
74 puts $out "<tr><td colspan=6 align=left><hr>"
75 puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>"
76 puts $out "</td></tr>"
77 puts $out "<tr>"
78
79 foreach {prefix suffix img desc} {
80 fossil-linux-x86 zip linux.gif {Linux x86}
81 fossil-macosx-x86 zip mac.gif {Mac 10.5 x86}
82 fossil-openbsd-x86 zip openbsd.gif {OpenBSD 4.7 x86}
83 fossil-w32 zip win32.gif {Windows}
84 fossil-src tar.gz src.gif {Source Tarball}
85 } {
86 set filename download/$prefix-$datetime.$suffix
87 if {[file exists $filename]} {
88
--- www/mkdownload.tcl
+++ www/mkdownload.tcl
@@ -68,20 +68,20 @@
68 set dt [string range $datetime 0 3]-[string range $datetime 4 5]-
69 append dt "[string range $datetime 6 7] "
70 append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:"
71 append dt "[string range $datetime 12 13]"
72 set link [string map {{ } +} $dt]
73 set hr "http://www.fossil-scm.org/fossil/timeline?c=$link&amp;y=ci"
74 puts $out "<tr><td colspan=6 align=left><hr>"
75 puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>"
76 puts $out "</td></tr>"
77 puts $out "<tr>"
78
79 foreach {prefix suffix img desc} {
80 fossil-linux-x86 zip linux.gif {Linux 3.x x86}
81 fossil-macosx-x86 zip mac.gif {Mac 10.x x86}
82 fossil-openbsd-x86 zip openbsd.gif {OpenBSD 4.x x86}
83 fossil-w32 zip win32.gif {Windows}
84 fossil-src tar.gz src.gif {Source Tarball}
85 } {
86 set filename download/$prefix-$datetime.$suffix
87 if {[file exists $filename]} {
88

Keyboard Shortcuts

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