Fossil SCM

merge trunk

jan.nijtmans 2013-01-11 12:28 allow-backslash-in-card-filename merge
Commit 6e9e6436a6256b4bf49b6fc95eafebd907a72de1
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1422,11 +1422,10 @@
14221422
extern "C" {
14231423
#endif
14241424
14251425
14261426
1427
-
14281427
/**
14291428
This type holds the "vtbl" for type-specific operations when
14301429
working with cson_value objects.
14311430
14321431
All cson_values of a given logical type share a pointer to a single
@@ -1524,13 +1523,11 @@
15241523
*/
15251524
#define cson_value_empty_m { &cson_value_api_empty/*api*/, NULL/*value*/, 0/*refcount*/ }
15261525
/**
15271526
Empty-initialized cson_value object.
15281527
*/
1529
-extern const cson_value cson_value_empty;
1530
-
1531
-const cson_value cson_value_empty = cson_value_empty_m;
1528
+static const cson_value cson_value_empty = cson_value_empty_m;
15321529
const cson_parse_opt cson_parse_opt_empty = cson_parse_opt_empty_m;
15331530
const cson_output_opt cson_output_opt_empty = cson_output_opt_empty_m;
15341531
const cson_object_iterator cson_object_iterator_empty = cson_object_iterator_empty_m;
15351532
const cson_buffer cson_buffer_empty = cson_buffer_empty_m;
15361533
const cson_parse_info cson_parse_info_empty = cson_parse_info_empty_m;
@@ -1661,11 +1658,11 @@
16611658
{
16621659
if((m >= (void const *)&CSON_EMPTY_HOLDER)
16631660
&& ( m < (void const *)(&CSON_EMPTY_HOLDER+1)))
16641661
return 1;
16651662
else return
1666
- ((m > (void const *)&CSON_SPECIAL_VALUES[0])
1663
+ ((m >= (void const *)&CSON_SPECIAL_VALUES[0])
16671664
&& ( m < (void const *)&CSON_SPECIAL_VALUES[CSON_INTERNAL_VALUES_LENGTH]) )
16681665
? 1
16691666
: 0;
16701667
}
16711668
@@ -1711,13 +1708,13 @@
17111708
malloc/free funcs because fossil's lack of header files
17121709
means we would have to #include "main.c" here to
17131710
get the declarations.
17141711
*/
17151712
#if defined(CSON_FOSSIL_MODE)
1716
-void *fossil_malloc(size_t n);
1717
-void fossil_free(void *p);
1718
-void *fossil_realloc(void *p, size_t n);
1713
+extern void *fossil_malloc(size_t n);
1714
+extern void fossil_free(void *p);
1715
+extern void *fossil_realloc(void *p, size_t n);
17191716
# define CSON_MALLOC_IMPL fossil_malloc
17201717
# define CSON_FREE_IMPL fossil_free
17211718
# define CSON_REALLOC_IMPL fossil_realloc
17221719
#endif
17231720
@@ -4380,11 +4377,11 @@
43804377
arg MUST be a (cson_buffer*). This function appends n bytes at
43814378
position arg->used, expanding the buffer as necessary.
43824379
*/
43834380
static int cson_data_dest_cson_buffer( void * arg, void const * data_, unsigned int n )
43844381
{
4385
- if( ! arg || (n<0) ) return cson_rc.ArgError;
4382
+ if( !arg ) return cson_rc.ArgError;
43864383
else if( ! n ) return 0;
43874384
else
43884385
{
43894386
cson_buffer * sb = (cson_buffer*)arg;
43904387
char const * data = (char const *)data_;
@@ -4500,11 +4497,10 @@
45004497
cson_value * cv = NULL;
45014498
cson_object const * curObj = obj;
45024499
enum { BufSize = 128 };
45034500
char buf[BufSize];
45044501
memset( buf, 0, BufSize );
4505
- rc = cson_rc.RangeError;
45064502
45074503
while( cson_next_token( &beg, sep, &end ) )
45084504
{
45094505
if( beg == end ) break;
45104506
else
45114507
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1422,11 +1422,10 @@
1422 extern "C" {
1423 #endif
1424
1425
1426
1427
1428 /**
1429 This type holds the "vtbl" for type-specific operations when
1430 working with cson_value objects.
1431
1432 All cson_values of a given logical type share a pointer to a single
@@ -1524,13 +1523,11 @@
1524 */
1525 #define cson_value_empty_m { &cson_value_api_empty/*api*/, NULL/*value*/, 0/*refcount*/ }
1526 /**
1527 Empty-initialized cson_value object.
1528 */
1529 extern const cson_value cson_value_empty;
1530
1531 const cson_value cson_value_empty = cson_value_empty_m;
1532 const cson_parse_opt cson_parse_opt_empty = cson_parse_opt_empty_m;
1533 const cson_output_opt cson_output_opt_empty = cson_output_opt_empty_m;
1534 const cson_object_iterator cson_object_iterator_empty = cson_object_iterator_empty_m;
1535 const cson_buffer cson_buffer_empty = cson_buffer_empty_m;
1536 const cson_parse_info cson_parse_info_empty = cson_parse_info_empty_m;
@@ -1661,11 +1658,11 @@
1661 {
1662 if((m >= (void const *)&CSON_EMPTY_HOLDER)
1663 && ( m < (void const *)(&CSON_EMPTY_HOLDER+1)))
1664 return 1;
1665 else return
1666 ((m > (void const *)&CSON_SPECIAL_VALUES[0])
1667 && ( m < (void const *)&CSON_SPECIAL_VALUES[CSON_INTERNAL_VALUES_LENGTH]) )
1668 ? 1
1669 : 0;
1670 }
1671
@@ -1711,13 +1708,13 @@
1711 malloc/free funcs because fossil's lack of header files
1712 means we would have to #include "main.c" here to
1713 get the declarations.
1714 */
1715 #if defined(CSON_FOSSIL_MODE)
1716 void *fossil_malloc(size_t n);
1717 void fossil_free(void *p);
1718 void *fossil_realloc(void *p, size_t n);
1719 # define CSON_MALLOC_IMPL fossil_malloc
1720 # define CSON_FREE_IMPL fossil_free
1721 # define CSON_REALLOC_IMPL fossil_realloc
1722 #endif
1723
@@ -4380,11 +4377,11 @@
4380 arg MUST be a (cson_buffer*). This function appends n bytes at
4381 position arg->used, expanding the buffer as necessary.
4382 */
4383 static int cson_data_dest_cson_buffer( void * arg, void const * data_, unsigned int n )
4384 {
4385 if( ! arg || (n<0) ) return cson_rc.ArgError;
4386 else if( ! n ) return 0;
4387 else
4388 {
4389 cson_buffer * sb = (cson_buffer*)arg;
4390 char const * data = (char const *)data_;
@@ -4500,11 +4497,10 @@
4500 cson_value * cv = NULL;
4501 cson_object const * curObj = obj;
4502 enum { BufSize = 128 };
4503 char buf[BufSize];
4504 memset( buf, 0, BufSize );
4505 rc = cson_rc.RangeError;
4506
4507 while( cson_next_token( &beg, sep, &end ) )
4508 {
4509 if( beg == end ) break;
4510 else
4511
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1422,11 +1422,10 @@
1422 extern "C" {
1423 #endif
1424
1425
1426
 
1427 /**
1428 This type holds the "vtbl" for type-specific operations when
1429 working with cson_value objects.
1430
1431 All cson_values of a given logical type share a pointer to a single
@@ -1524,13 +1523,11 @@
1523 */
1524 #define cson_value_empty_m { &cson_value_api_empty/*api*/, NULL/*value*/, 0/*refcount*/ }
1525 /**
1526 Empty-initialized cson_value object.
1527 */
1528 static const cson_value cson_value_empty = cson_value_empty_m;
 
 
1529 const cson_parse_opt cson_parse_opt_empty = cson_parse_opt_empty_m;
1530 const cson_output_opt cson_output_opt_empty = cson_output_opt_empty_m;
1531 const cson_object_iterator cson_object_iterator_empty = cson_object_iterator_empty_m;
1532 const cson_buffer cson_buffer_empty = cson_buffer_empty_m;
1533 const cson_parse_info cson_parse_info_empty = cson_parse_info_empty_m;
@@ -1661,11 +1658,11 @@
1658 {
1659 if((m >= (void const *)&CSON_EMPTY_HOLDER)
1660 && ( m < (void const *)(&CSON_EMPTY_HOLDER+1)))
1661 return 1;
1662 else return
1663 ((m >= (void const *)&CSON_SPECIAL_VALUES[0])
1664 && ( m < (void const *)&CSON_SPECIAL_VALUES[CSON_INTERNAL_VALUES_LENGTH]) )
1665 ? 1
1666 : 0;
1667 }
1668
@@ -1711,13 +1708,13 @@
1708 malloc/free funcs because fossil's lack of header files
1709 means we would have to #include "main.c" here to
1710 get the declarations.
1711 */
1712 #if defined(CSON_FOSSIL_MODE)
1713 extern void *fossil_malloc(size_t n);
1714 extern void fossil_free(void *p);
1715 extern void *fossil_realloc(void *p, size_t n);
1716 # define CSON_MALLOC_IMPL fossil_malloc
1717 # define CSON_FREE_IMPL fossil_free
1718 # define CSON_REALLOC_IMPL fossil_realloc
1719 #endif
1720
@@ -4380,11 +4377,11 @@
4377 arg MUST be a (cson_buffer*). This function appends n bytes at
4378 position arg->used, expanding the buffer as necessary.
4379 */
4380 static int cson_data_dest_cson_buffer( void * arg, void const * data_, unsigned int n )
4381 {
4382 if( !arg ) return cson_rc.ArgError;
4383 else if( ! n ) return 0;
4384 else
4385 {
4386 cson_buffer * sb = (cson_buffer*)arg;
4387 char const * data = (char const *)data_;
@@ -4500,11 +4497,10 @@
4497 cson_value * cv = NULL;
4498 cson_object const * curObj = obj;
4499 enum { BufSize = 128 };
4500 char buf[BufSize];
4501 memset( buf, 0, BufSize );
 
4502
4503 while( cson_next_token( &beg, sep, &end ) )
4504 {
4505 if( beg == end ) break;
4506 else
4507
--- src/cson_amalgamation.h
+++ src/cson_amalgamation.h
@@ -1236,11 +1236,14 @@
12361236
eventually either free the value using cson_value_free() or
12371237
inserting it into a container (array or object), which transfers
12381238
ownership to the container. See the cson_value class documentation
12391239
for more details.
12401240
1241
- Returns NULL on allocation error.
1241
+ Semantically speaking this function Returns NULL on allocation
1242
+ error, but the implementation never actually allocates for this
1243
+ case. Nonetheless, it must be treated as if it were an allocated
1244
+ value.
12421245
*/
12431246
cson_value * cson_value_new_bool( char v );
12441247
12451248
12461249
/**
@@ -1927,11 +1930,12 @@
19271930
modified.
19281931
19291932
buf->mem is owned by buf and must eventually be freed by passing an
19301933
n value of 0 to this function.
19311934
1932
- buf->used is never modified by this function.
1935
+ buf->used is never modified by this function unless n is 0, in which case
1936
+ it is reset.
19331937
*/
19341938
int cson_buffer_reserve( cson_buffer * buf, cson_size_t n );
19351939
19361940
/**
19371941
Fills all bytes of the given buffer with the given character.
19381942
--- src/cson_amalgamation.h
+++ src/cson_amalgamation.h
@@ -1236,11 +1236,14 @@
1236 eventually either free the value using cson_value_free() or
1237 inserting it into a container (array or object), which transfers
1238 ownership to the container. See the cson_value class documentation
1239 for more details.
1240
1241 Returns NULL on allocation error.
 
 
 
1242 */
1243 cson_value * cson_value_new_bool( char v );
1244
1245
1246 /**
@@ -1927,11 +1930,12 @@
1927 modified.
1928
1929 buf->mem is owned by buf and must eventually be freed by passing an
1930 n value of 0 to this function.
1931
1932 buf->used is never modified by this function.
 
1933 */
1934 int cson_buffer_reserve( cson_buffer * buf, cson_size_t n );
1935
1936 /**
1937 Fills all bytes of the given buffer with the given character.
1938
--- src/cson_amalgamation.h
+++ src/cson_amalgamation.h
@@ -1236,11 +1236,14 @@
1236 eventually either free the value using cson_value_free() or
1237 inserting it into a container (array or object), which transfers
1238 ownership to the container. See the cson_value class documentation
1239 for more details.
1240
1241 Semantically speaking this function Returns NULL on allocation
1242 error, but the implementation never actually allocates for this
1243 case. Nonetheless, it must be treated as if it were an allocated
1244 value.
1245 */
1246 cson_value * cson_value_new_bool( char v );
1247
1248
1249 /**
@@ -1927,11 +1930,12 @@
1930 modified.
1931
1932 buf->mem is owned by buf and must eventually be freed by passing an
1933 n value of 0 to this function.
1934
1935 buf->used is never modified by this function unless n is 0, in which case
1936 it is reset.
1937 */
1938 int cson_buffer_reserve( cson_buffer * buf, cson_size_t n );
1939
1940 /**
1941 Fills all bytes of the given buffer with the given character.
1942
+8 -8
--- src/db.c
+++ src/db.c
@@ -22,11 +22,11 @@
2222
**
2323
** (1) The "user" database in ~/.fossil
2424
**
2525
** (2) The "repository" database
2626
**
27
-** (3) A local checkout database named "_FOSSIL_" or ".fos"
27
+** (3) A local checkout database named "_FOSSIL_" or ".fslckout"
2828
** and located at the root of the local copy of the source tree.
2929
**
3030
*/
3131
#include "config.h"
3232
#if ! defined(_WIN32)
@@ -89,11 +89,11 @@
8989
cgi_reply();
9090
}
9191
else if( g.cgiOutput ){
9292
g.cgiOutput = 0;
9393
cgi_printf("<h1>Database Error</h1>\n"
94
- "<pre>%h</pre><p>%s</p>", z, zRebuildMsg);
94
+ "<pre>%h</pre>\n<p>%s</p>\n", z, zRebuildMsg);
9595
cgi_reply();
9696
}else{
9797
fprintf(stderr, "%s: %s\n\n%s", g.argv[0], z, zRebuildMsg);
9898
}
9999
free(z);
@@ -644,11 +644,11 @@
644644
const char *zSql;
645645
va_list ap;
646646
647647
rc = sqlite3_open(zFileName, &db);
648648
if( rc!=SQLITE_OK ){
649
- db_err(sqlite3_errmsg(db));
649
+ db_err("[%s] %s", zFileName, sqlite3_errmsg(db));
650650
}
651651
sqlite3_busy_timeout(db, 5000);
652652
sqlite3_exec(db, "BEGIN EXCLUSIVE", 0, 0, 0);
653653
rc = sqlite3_exec(db, zSchema, 0, 0, 0);
654654
if( rc!=SQLITE_OK ){
@@ -702,18 +702,19 @@
702702
static sqlite3 *openDatabase(const char *zDbName){
703703
int rc;
704704
const char *zVfs;
705705
sqlite3 *db;
706706
707
+ if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
707708
zVfs = fossil_getenv("FOSSIL_VFS");
708709
rc = sqlite3_open_v2(
709710
zDbName, &db,
710711
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
711712
zVfs
712713
);
713714
if( rc!=SQLITE_OK ){
714
- db_err(sqlite3_errmsg(db));
715
+ db_err("[%s]: %s", zDbName, sqlite3_errmsg(db));
715716
}
716717
sqlite3_busy_timeout(db, 5000);
717718
sqlite3_wal_autocheckpoint(db, 1); /* Set to checkpoint frequently */
718719
sqlite3_create_function(db, "now", 0, SQLITE_ANY, 0, db_now_function, 0, 0);
719720
sqlite3_create_function(db, "checkin_mtime", 2, SQLITE_ANY, 0,
@@ -1456,13 +1457,11 @@
14561457
}
14571458
}
14581459
}
14591460
static void db_sql_trace(void *notUsed, const char *zSql){
14601461
int n = strlen(zSql);
1461
- char *zMsg = mprintf("%s%s\n", zSql, (n>0 && zSql[n-1]==';') ? "" : ";");
1462
- fossil_puts(zMsg, 1);
1463
- fossil_free(zMsg);
1462
+ fossil_trace("%s%s\n", zSql, (n>0 && zSql[n-1]==';') ? "" : ";");
14641463
}
14651464
14661465
/*
14671466
** Implement the user() SQL function. user() takes no arguments and
14681467
** returns the user ID of the current user.
@@ -1604,11 +1603,11 @@
16041603
16051604
/*
16061605
** This function registers auxiliary functions when the SQLite
16071606
** database connection is first established.
16081607
*/
1609
-LOCAL void db_connection_init(void){
1608
+void db_connection_init(void){
16101609
sqlite3_exec(g.db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
16111610
sqlite3_create_function(g.db, "user", 0, SQLITE_ANY, 0, db_sql_user, 0, 0);
16121611
sqlite3_create_function(g.db, "cgi", 1, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
16131612
sqlite3_create_function(g.db, "cgi", 2, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
16141613
sqlite3_create_function(g.db, "print", -1, SQLITE_UTF8, 0,db_sql_print,0,0);
@@ -1619,10 +1618,11 @@
16191618
g.db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
16201619
);
16211620
if( g.fSqlTrace ){
16221621
sqlite3_trace(g.db, db_sql_trace, 0);
16231622
}
1623
+ re_add_sql_func(g.db);
16241624
}
16251625
16261626
/*
16271627
** Return true if the string zVal represents "true" (or "false").
16281628
*/
16291629
--- src/db.c
+++ src/db.c
@@ -22,11 +22,11 @@
22 **
23 ** (1) The "user" database in ~/.fossil
24 **
25 ** (2) The "repository" database
26 **
27 ** (3) A local checkout database named "_FOSSIL_" or ".fos"
28 ** and located at the root of the local copy of the source tree.
29 **
30 */
31 #include "config.h"
32 #if ! defined(_WIN32)
@@ -89,11 +89,11 @@
89 cgi_reply();
90 }
91 else if( g.cgiOutput ){
92 g.cgiOutput = 0;
93 cgi_printf("<h1>Database Error</h1>\n"
94 "<pre>%h</pre><p>%s</p>", z, zRebuildMsg);
95 cgi_reply();
96 }else{
97 fprintf(stderr, "%s: %s\n\n%s", g.argv[0], z, zRebuildMsg);
98 }
99 free(z);
@@ -644,11 +644,11 @@
644 const char *zSql;
645 va_list ap;
646
647 rc = sqlite3_open(zFileName, &db);
648 if( rc!=SQLITE_OK ){
649 db_err(sqlite3_errmsg(db));
650 }
651 sqlite3_busy_timeout(db, 5000);
652 sqlite3_exec(db, "BEGIN EXCLUSIVE", 0, 0, 0);
653 rc = sqlite3_exec(db, zSchema, 0, 0, 0);
654 if( rc!=SQLITE_OK ){
@@ -702,18 +702,19 @@
702 static sqlite3 *openDatabase(const char *zDbName){
703 int rc;
704 const char *zVfs;
705 sqlite3 *db;
706
 
707 zVfs = fossil_getenv("FOSSIL_VFS");
708 rc = sqlite3_open_v2(
709 zDbName, &db,
710 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
711 zVfs
712 );
713 if( rc!=SQLITE_OK ){
714 db_err(sqlite3_errmsg(db));
715 }
716 sqlite3_busy_timeout(db, 5000);
717 sqlite3_wal_autocheckpoint(db, 1); /* Set to checkpoint frequently */
718 sqlite3_create_function(db, "now", 0, SQLITE_ANY, 0, db_now_function, 0, 0);
719 sqlite3_create_function(db, "checkin_mtime", 2, SQLITE_ANY, 0,
@@ -1456,13 +1457,11 @@
1456 }
1457 }
1458 }
1459 static void db_sql_trace(void *notUsed, const char *zSql){
1460 int n = strlen(zSql);
1461 char *zMsg = mprintf("%s%s\n", zSql, (n>0 && zSql[n-1]==';') ? "" : ";");
1462 fossil_puts(zMsg, 1);
1463 fossil_free(zMsg);
1464 }
1465
1466 /*
1467 ** Implement the user() SQL function. user() takes no arguments and
1468 ** returns the user ID of the current user.
@@ -1604,11 +1603,11 @@
1604
1605 /*
1606 ** This function registers auxiliary functions when the SQLite
1607 ** database connection is first established.
1608 */
1609 LOCAL void db_connection_init(void){
1610 sqlite3_exec(g.db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
1611 sqlite3_create_function(g.db, "user", 0, SQLITE_ANY, 0, db_sql_user, 0, 0);
1612 sqlite3_create_function(g.db, "cgi", 1, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1613 sqlite3_create_function(g.db, "cgi", 2, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1614 sqlite3_create_function(g.db, "print", -1, SQLITE_UTF8, 0,db_sql_print,0,0);
@@ -1619,10 +1618,11 @@
1619 g.db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
1620 );
1621 if( g.fSqlTrace ){
1622 sqlite3_trace(g.db, db_sql_trace, 0);
1623 }
 
1624 }
1625
1626 /*
1627 ** Return true if the string zVal represents "true" (or "false").
1628 */
1629
--- src/db.c
+++ src/db.c
@@ -22,11 +22,11 @@
22 **
23 ** (1) The "user" database in ~/.fossil
24 **
25 ** (2) The "repository" database
26 **
27 ** (3) A local checkout database named "_FOSSIL_" or ".fslckout"
28 ** and located at the root of the local copy of the source tree.
29 **
30 */
31 #include "config.h"
32 #if ! defined(_WIN32)
@@ -89,11 +89,11 @@
89 cgi_reply();
90 }
91 else if( g.cgiOutput ){
92 g.cgiOutput = 0;
93 cgi_printf("<h1>Database Error</h1>\n"
94 "<pre>%h</pre>\n<p>%s</p>\n", z, zRebuildMsg);
95 cgi_reply();
96 }else{
97 fprintf(stderr, "%s: %s\n\n%s", g.argv[0], z, zRebuildMsg);
98 }
99 free(z);
@@ -644,11 +644,11 @@
644 const char *zSql;
645 va_list ap;
646
647 rc = sqlite3_open(zFileName, &db);
648 if( rc!=SQLITE_OK ){
649 db_err("[%s] %s", zFileName, sqlite3_errmsg(db));
650 }
651 sqlite3_busy_timeout(db, 5000);
652 sqlite3_exec(db, "BEGIN EXCLUSIVE", 0, 0, 0);
653 rc = sqlite3_exec(db, zSchema, 0, 0, 0);
654 if( rc!=SQLITE_OK ){
@@ -702,18 +702,19 @@
702 static sqlite3 *openDatabase(const char *zDbName){
703 int rc;
704 const char *zVfs;
705 sqlite3 *db;
706
707 if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
708 zVfs = fossil_getenv("FOSSIL_VFS");
709 rc = sqlite3_open_v2(
710 zDbName, &db,
711 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
712 zVfs
713 );
714 if( rc!=SQLITE_OK ){
715 db_err("[%s]: %s", zDbName, sqlite3_errmsg(db));
716 }
717 sqlite3_busy_timeout(db, 5000);
718 sqlite3_wal_autocheckpoint(db, 1); /* Set to checkpoint frequently */
719 sqlite3_create_function(db, "now", 0, SQLITE_ANY, 0, db_now_function, 0, 0);
720 sqlite3_create_function(db, "checkin_mtime", 2, SQLITE_ANY, 0,
@@ -1456,13 +1457,11 @@
1457 }
1458 }
1459 }
1460 static void db_sql_trace(void *notUsed, const char *zSql){
1461 int n = strlen(zSql);
1462 fossil_trace("%s%s\n", zSql, (n>0 && zSql[n-1]==';') ? "" : ";");
 
 
1463 }
1464
1465 /*
1466 ** Implement the user() SQL function. user() takes no arguments and
1467 ** returns the user ID of the current user.
@@ -1604,11 +1603,11 @@
1603
1604 /*
1605 ** This function registers auxiliary functions when the SQLite
1606 ** database connection is first established.
1607 */
1608 void db_connection_init(void){
1609 sqlite3_exec(g.db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
1610 sqlite3_create_function(g.db, "user", 0, SQLITE_ANY, 0, db_sql_user, 0, 0);
1611 sqlite3_create_function(g.db, "cgi", 1, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1612 sqlite3_create_function(g.db, "cgi", 2, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1613 sqlite3_create_function(g.db, "print", -1, SQLITE_UTF8, 0,db_sql_print,0,0);
@@ -1619,10 +1618,11 @@
1618 g.db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
1619 );
1620 if( g.fSqlTrace ){
1621 sqlite3_trace(g.db, db_sql_trace, 0);
1622 }
1623 re_add_sql_func(g.db);
1624 }
1625
1626 /*
1627 ** Return true if the string zVal represents "true" (or "false").
1628 */
1629
+133 -40
--- src/diff.c
+++ src/diff.c
@@ -38,10 +38,11 @@
3838
#define DIFF_HTML ((u64)0x10000000) /* Render for HTML */
3939
#define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */
4040
#define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */
4141
#define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
4242
#define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
43
+#define DIFF_CONTEXT_EX (((u64)0x04)<<32) /* Use context even if zero */
4344
4445
/*
4546
** These error messages are shared in multiple locations. They are defined
4647
** here for consistency.
4748
*/
@@ -411,24 +412,45 @@
411412
** Return true if two DLine elements are identical.
412413
*/
413414
static int same_dline(DLine *pA, DLine *pB){
414415
return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0;
415416
}
417
+
418
+/*
419
+** Return true if the regular expression *pRe matches any of the
420
+** N dlines
421
+*/
422
+static int re_dline_match(
423
+ ReCompiled *pRe, /* The regular expression to be matched */
424
+ DLine *aDLine, /* First of N DLines to compare against */
425
+ int N /* Number of DLines to check */
426
+){
427
+ while( N-- ){
428
+ if( re_match(pRe, (const unsigned char *)aDLine->z, LENGTH(aDLine)) ){
429
+ return 1;
430
+ }
431
+ aDLine++;
432
+ }
433
+ return 0;
434
+}
416435
417436
/*
418437
** Append a single line of context-diff output to pOut.
419438
*/
420439
static void appendDiffLine(
421440
Blob *pOut, /* Where to write the line of output */
422441
char cPrefix, /* One of " ", "+", or "-" */
423442
DLine *pLine, /* The line to be output */
424
- int html /* True if generating HTML. False for plain text */
443
+ int html, /* True if generating HTML. False for plain text */
444
+ ReCompiled *pRe /* Colorize only if line matches this Regex */
425445
){
426446
blob_append(pOut, &cPrefix, 1);
427447
if( html ){
428448
char *zHtml;
429
- if( cPrefix=='+' ){
449
+ if( pRe && re_dline_match(pRe, pLine, 1)==0 ){
450
+ cPrefix = ' ';
451
+ }else if( cPrefix=='+' ){
430452
blob_append(pOut, "<span class=\"diffadd\">", -1);
431453
}else if( cPrefix=='-' ){
432454
blob_append(pOut, "<span class=\"diffrm\">", -1);
433455
}
434456
zHtml = htmlize(pLine->z, (pLine->h & LENGTH_MASK));
@@ -462,21 +484,19 @@
462484
blob_append(pOut, " ", 8);
463485
}
464486
if( html ) blob_append(pOut, "</span>", -1);
465487
}
466488
467
-
468489
/*
469490
** Given a raw diff p[] in which the p->aEdit[] array has been filled
470491
** in, compute a context diff into pOut.
471492
*/
472493
static void contextDiff(
473494
DContext *p, /* The difference */
474495
Blob *pOut, /* Output a context diff to here */
475
- int nContext, /* Number of lines of context */
476
- int showLn, /* Show line numbers */
477
- int html /* Render as HTML */
496
+ ReCompiled *pRe, /* Only show changes that match this regex */
497
+ u64 diffFlags /* Flags controlling the diff format */
478498
){
479499
DLine *A; /* Left side of the diff */
480500
DLine *B; /* Right side of the diff */
481501
int a = 0; /* Index of next line in A[] */
482502
int b = 0; /* Index of next line in B[] */
@@ -487,11 +507,18 @@
487507
int na, nb; /* Number of lines shown from A and B */
488508
int i, j; /* Loop counters */
489509
int m; /* Number of lines to output */
490510
int skip; /* Number of lines to skip */
491511
int nChunk = 0; /* Number of diff chunks seen so far */
512
+ int nContext; /* Number of lines of context */
513
+ int showLn; /* Show line numbers */
514
+ int html; /* Render as HTML */
515
+ int showDivider = 0; /* True to show the divider between diff blocks */
492516
517
+ nContext = diff_context_lines(diffFlags);
518
+ showLn = (diffFlags & DIFF_LINENO)!=0;
519
+ html = (diffFlags & DIFF_HTML)!=0;
493520
A = p->aFrom;
494521
B = p->aTo;
495522
R = p->aEdit;
496523
mxr = p->nEdit;
497524
while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; }
@@ -498,10 +525,35 @@
498525
for(r=0; r<mxr; r += 3*nr){
499526
/* Figure out how many triples to show in a single block */
500527
for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){}
501528
/* printf("r=%d nr=%d\n", r, nr); */
502529
530
+ /* If there is a regex, skip this block (generate no diff output)
531
+ ** if the regex matches or does not match both insert and delete.
532
+ ** Only display the block if one side matches but the other side does
533
+ ** not.
534
+ */
535
+ if( pRe ){
536
+ int hideBlock = 1;
537
+ int xa = a, xb = b;
538
+ for(i=0; hideBlock && i<nr; i++){
539
+ int c1, c2;
540
+ xa += R[r+i*3];
541
+ xb += R[r+i*3];
542
+ c1 = re_dline_match(pRe, &A[xa], R[r+i*3+1]);
543
+ c2 = re_dline_match(pRe, &B[xb], R[r+i*3+2]);
544
+ hideBlock = c1==c2;
545
+ xa += R[r+i*3+1];
546
+ xb += R[r+i*3+2];
547
+ }
548
+ if( hideBlock ){
549
+ a = xa;
550
+ b = xb;
551
+ continue;
552
+ }
553
+ }
554
+
503555
/* For the current block comprising nr triples, figure out
504556
** how many lines of A and B are to be displayed
505557
*/
506558
if( R[r]>nContext ){
507559
na = nb = nContext;
@@ -530,12 +582,13 @@
530582
** context diff that contains line numbers, show the separator from
531583
** the previous block.
532584
*/
533585
nChunk++;
534586
if( showLn ){
535
- if( r==0 ){
587
+ if( !showDivider ){
536588
/* Do not show a top divider */
589
+ showDivider = 1;
537590
}else if( html ){
538591
blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.');
539592
blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk);
540593
}else{
541594
blob_appendf(pOut, "%.80c\n", '.');
@@ -558,34 +611,36 @@
558611
a += skip;
559612
b += skip;
560613
m = R[r] - skip;
561614
for(j=0; j<m; j++){
562615
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
563
- appendDiffLine(pOut, ' ', &A[a+j], html);
616
+ appendDiffLine(pOut, ' ', &A[a+j], html, 0);
564617
}
565618
a += m;
566619
b += m;
567620
568621
/* Show the differences */
569622
for(i=0; i<nr; i++){
570623
m = R[r+i*3+1];
571624
for(j=0; j<m; j++){
625
+ char cMark = '-';
572626
if( showLn ) appendDiffLineno(pOut, a+j+1, 0, html);
573
- appendDiffLine(pOut, '-', &A[a+j], html);
627
+ if( pRe && re_dline_match(pRe, &A[a+j], 1)==0 ) cMark = ' ';
628
+ appendDiffLine(pOut, '-', &A[a+j], html, pRe);
574629
}
575630
a += m;
576631
m = R[r+i*3+2];
577632
for(j=0; j<m; j++){
578633
if( showLn ) appendDiffLineno(pOut, 0, b+j+1, html);
579
- appendDiffLine(pOut, '+', &B[b+j], html);
634
+ appendDiffLine(pOut, '+', &B[b+j], html, pRe);
580635
}
581636
b += m;
582637
if( i<nr-1 ){
583638
m = R[r+i*3+3];
584639
for(j=0; j<m; j++){
585640
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
586
- appendDiffLine(pOut, ' ', &B[b+j], html);
641
+ appendDiffLine(pOut, ' ', &B[b+j], html, 0);
587642
}
588643
b += m;
589644
a += m;
590645
}
591646
}
@@ -594,11 +649,11 @@
594649
assert( nr==i );
595650
m = R[r+nr*3];
596651
if( m>nContext ) m = nContext;
597652
for(j=0; j<m; j++){
598653
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
599
- appendDiffLine(pOut, ' ', &B[b+j], html);
654
+ appendDiffLine(pOut, ' ', &B[b+j], html, 0);
600655
}
601656
}
602657
}
603658
604659
/*
@@ -614,10 +669,11 @@
614669
const char *zStart; /* A <span> tag */
615670
int iEnd; /* Write </span> prior to character iEnd */
616671
int iStart2; /* Write zStart2 prior to character iStart2 */
617672
const char *zStart2; /* A <span> tag */
618673
int iEnd2; /* Write </span> prior to character iEnd2 */
674
+ ReCompiled *pRe; /* Only colorize matching lines, if not NULL */
619675
};
620676
621677
/*
622678
** Flags for sbsWriteText()
623679
*/
@@ -639,13 +695,17 @@
639695
int k; /* Cursor position */
640696
int needEndSpan = 0;
641697
const char *zIn = pLine->z;
642698
char *z = &p->zLine[p->n];
643699
int w = p->width;
700
+ int colorize = p->escHtml;
701
+ if( colorize && p->pRe && re_dline_match(p->pRe, pLine, 1)==0 ){
702
+ colorize = 0;
703
+ }
644704
for(i=j=k=0; k<w && i<n; i++, k++){
645705
char c = zIn[i];
646
- if( p->escHtml ){
706
+ if( colorize ){
647707
if( i==p->iStart ){
648708
int x = strlen(p->zStart);
649709
memcpy(z+j, p->zStart, x);
650710
j += x;
651711
needEndSpan = 1;
@@ -1195,13 +1255,12 @@
11951255
** in, compute a side-by-side diff into pOut.
11961256
*/
11971257
static void sbsDiff(
11981258
DContext *p, /* The computed diff */
11991259
Blob *pOut, /* Write the results here */
1200
- int nContext, /* Number of lines of context around each change */
1201
- int width, /* Width of each column of output */
1202
- int escHtml /* True to generate HTML output */
1260
+ ReCompiled *pRe, /* Only show changes that match this regex */
1261
+ u64 diffFlags /* Flags controlling the diff */
12031262
){
12041263
DLine *A; /* Left side of the diff */
12051264
DLine *B; /* Right side of the diff */
12061265
int a = 0; /* Index of next line in A[] */
12071266
int b = 0; /* Index of next line in B[] */
@@ -1213,16 +1272,20 @@
12131272
int i, j; /* Loop counters */
12141273
int m, ma, mb;/* Number of lines to output */
12151274
int skip; /* Number of lines to skip */
12161275
int nChunk = 0; /* Number of chunks of diff output seen so far */
12171276
SbsLine s; /* Output line buffer */
1277
+ int nContext; /* Lines of context above and below each change */
1278
+ int showDivider = 0; /* True to show the divider */
12181279
12191280
memset(&s, 0, sizeof(s));
1220
- s.zLine = fossil_malloc( 15*width + 200 );
1281
+ s.width = diff_width(diffFlags);
1282
+ s.zLine = fossil_malloc( 15*s.width + 200 );
12211283
if( s.zLine==0 ) return;
1222
- s.width = width;
1223
- s.escHtml = escHtml;
1284
+ nContext = diff_context_lines(diffFlags);
1285
+ s.escHtml = (diffFlags & DIFF_HTML)!=0;
1286
+ s.pRe = pRe;
12241287
s.iStart = -1;
12251288
s.iStart2 = 0;
12261289
s.iEnd = -1;
12271290
A = p->aFrom;
12281291
B = p->aTo;
@@ -1231,10 +1294,35 @@
12311294
while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; }
12321295
for(r=0; r<mxr; r += 3*nr){
12331296
/* Figure out how many triples to show in a single block */
12341297
for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){}
12351298
/* printf("r=%d nr=%d\n", r, nr); */
1299
+
1300
+ /* If there is a regex, skip this block (generate no diff output)
1301
+ ** if the regex matches or does not match both insert and delete.
1302
+ ** Only display the block if one side matches but the other side does
1303
+ ** not.
1304
+ */
1305
+ if( pRe ){
1306
+ int hideBlock = 1;
1307
+ int xa = a, xb = b;
1308
+ for(i=0; hideBlock && i<nr; i++){
1309
+ int c1, c2;
1310
+ xa += R[r+i*3];
1311
+ xb += R[r+i*3];
1312
+ c1 = re_dline_match(pRe, &A[xa], R[r+i*3+1]);
1313
+ c2 = re_dline_match(pRe, &B[xb], R[r+i*3+2]);
1314
+ hideBlock = c1==c2;
1315
+ xa += R[r+i*3+1];
1316
+ xb += R[r+i*3+2];
1317
+ }
1318
+ if( hideBlock ){
1319
+ a = xa;
1320
+ b = xb;
1321
+ continue;
1322
+ }
1323
+ }
12361324
12371325
/* For the current block comprising nr triples, figure out
12381326
** how many lines of A and B are to be displayed
12391327
*/
12401328
if( R[r]>nContext ){
@@ -1259,20 +1347,21 @@
12591347
na += R[r+i*3];
12601348
nb += R[r+i*3];
12611349
}
12621350
12631351
/* Draw the separator between blocks */
1264
- if( r>0 ){
1265
- if( escHtml ){
1352
+ if( showDivider ){
1353
+ if( s.escHtml ){
12661354
blob_appendf(pOut, "<span class=\"diffhr\">%.*c</span>\n",
1267
- width*2+16, '.');
1355
+ s.width*2+16, '.');
12681356
}else{
1269
- blob_appendf(pOut, "%.*c\n", width*2+16, '.');
1357
+ blob_appendf(pOut, "%.*c\n", s.width*2+16, '.');
12701358
}
12711359
}
1360
+ showDivider = 1;
12721361
nChunk++;
1273
- if( escHtml ){
1362
+ if( s.escHtml ){
12741363
blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk);
12751364
}
12761365
12771366
/* Show the initial common area */
12781367
a += skip;
@@ -1315,11 +1404,11 @@
13151404
sbsWriteLineno(&s, a);
13161405
s.iStart = 0;
13171406
s.zStart = "<span class=\"diffrm\">";
13181407
s.iEnd = s.width;
13191408
sbsWriteText(&s, &A[a], SBS_PAD);
1320
- if( escHtml ){
1409
+ if( s.escHtml ){
13211410
sbsWrite(&s, " &lt;\n", 6);
13221411
}else{
13231412
sbsWrite(&s, " <\n", 3);
13241413
}
13251414
blob_append(pOut, s.zLine, s.n);
@@ -1337,12 +1426,12 @@
13371426
a++;
13381427
b++;
13391428
}else if( alignment[j]==2 ){
13401429
/* Insert one line on the right */
13411430
s.n = 0;
1342
- sbsWriteSpace(&s, width + 7);
1343
- if( escHtml ){
1431
+ sbsWriteSpace(&s, s.width + 7);
1432
+ if( s.escHtml ){
13441433
sbsWrite(&s, " &gt; ", 6);
13451434
}else{
13461435
sbsWrite(&s, " > ", 3);
13471436
}
13481437
sbsWriteLineno(&s, b);
@@ -1800,11 +1889,11 @@
18001889
** Extract the number of lines of context from diffFlags. Supply an
18011890
** appropriate default if no context width is specified.
18021891
*/
18031892
int diff_context_lines(u64 diffFlags){
18041893
int n = diffFlags & DIFF_CONTEXT_MASK;
1805
- if( n==0 ) n = 5;
1894
+ if( n==0 && (diffFlags & DIFF_CONTEXT_EX)==0 ) n = 5;
18061895
return n;
18071896
}
18081897
18091898
/*
18101899
** Extract the width of columns for side-by-side diff. Supply an
@@ -1832,22 +1921,21 @@
18321921
*/
18331922
int *text_diff(
18341923
Blob *pA_Blob, /* FROM file */
18351924
Blob *pB_Blob, /* TO file */
18361925
Blob *pOut, /* Write diff here if not NULL */
1926
+ ReCompiled *pRe, /* Only output changes where this Regexp matches */
18371927
u64 diffFlags /* DIFF_* flags defined above */
18381928
){
18391929
int ignoreEolWs; /* Ignore whitespace at the end of lines */
1840
- int nContext; /* Amount of context to display */
18411930
DContext c;
18421931
18431932
if( diffFlags & DIFF_INVERT ){
18441933
Blob *pTemp = pA_Blob;
18451934
pA_Blob = pB_Blob;
18461935
pB_Blob = pTemp;
18471936
}
1848
- nContext = diff_context_lines(diffFlags);
18491937
ignoreEolWs = (diffFlags & DIFF_IGNORE_EOLWS)!=0;
18501938
18511939
/* Prepare the input files */
18521940
memset(&c, 0, sizeof(c));
18531941
c.aFrom = break_into_lines(blob_str(pA_Blob), blob_size(pA_Blob),
@@ -1867,17 +1955,14 @@
18671955
diff_all(&c);
18681956
if( (diffFlags & DIFF_NOOPT)==0 ) diff_optimize(&c);
18691957
18701958
if( pOut ){
18711959
/* Compute a context or side-by-side diff into pOut */
1872
- int escHtml = (diffFlags & DIFF_HTML)!=0;
18731960
if( diffFlags & DIFF_SIDEBYSIDE ){
1874
- int width = diff_width(diffFlags);
1875
- sbsDiff(&c, pOut, nContext, width, escHtml);
1961
+ sbsDiff(&c, pOut, pRe, diffFlags);
18761962
}else{
1877
- int showLn = (diffFlags & DIFF_LINENO)!=0;
1878
- contextDiff(&c, pOut, nContext, showLn, escHtml);
1963
+ contextDiff(&c, pOut, pRe, diffFlags);
18791964
}
18801965
fossil_free(c.aFrom);
18811966
fossil_free(c.aTo);
18821967
fossil_free(c.aEdit);
18831968
return 0;
@@ -1903,19 +1988,19 @@
19031988
** --noopt Disable optimization DIFF_NOOPT
19041989
** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE
19051990
** --unified Unified diff. ~DIFF_SIDEBYSIDE
19061991
** --width|-W N N character lines. DIFF_WIDTH_MASK
19071992
*/
1908
-int diff_options(void){
1993
+u64 diff_options(void){
19091994
u64 diffFlags = 0;
19101995
const char *z;
19111996
int f;
19121997
if( find_option("side-by-side","y",0)!=0 ) diffFlags |= DIFF_SIDEBYSIDE;
19131998
if( find_option("unified",0,0)!=0 ) diffFlags &= ~DIFF_SIDEBYSIDE;
1914
- if( (z = find_option("context","c",1))!=0 && (f = atoi(z))>0 ){
1999
+ if( (z = find_option("context","c",1))!=0 && (f = atoi(z))>=0 ){
19152000
if( f > DIFF_CONTEXT_MASK ) f = DIFF_CONTEXT_MASK;
1916
- diffFlags |= f;
2001
+ diffFlags |= f + DIFF_CONTEXT_EX;
19172002
}
19182003
if( (z = find_option("width","W",1))!=0 && (f = atoi(z))>0 ){
19192004
f *= DIFF_CONTEXT_MASK+1;
19202005
if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
19212006
diffFlags |= f;
@@ -1940,11 +2025,11 @@
19402025
if( g.argc<4 ) usage("FILE1 FILE2 ...");
19412026
blob_read_from_file(&a, g.argv[2]);
19422027
for(i=3; i<g.argc; i++){
19432028
if( i>3 ) fossil_print("-------------------------------\n");
19442029
blob_read_from_file(&b, g.argv[i]);
1945
- R = text_diff(&a, &b, 0, diffFlags);
2030
+ R = text_diff(&a, &b, 0, 0, diffFlags);
19462031
for(r=0; R[r] || R[r+1] || R[r+2]; r += 3){
19472032
fossil_print(" copy %4d delete %4d insert %4d\n", R[r], R[r+1], R[r+2]);
19482033
}
19492034
/* free(R); */
19502035
blob_reset(&b);
@@ -1959,25 +2044,33 @@
19592044
** Print the difference between two files. The usual diff options apply.
19602045
*/
19612046
void test_diff_cmd(void){
19622047
Blob a, b, out;
19632048
u64 diffFlag;
2049
+ const char *zRe; /* Regex filter for diff output */
2050
+ ReCompiled *pRe = 0; /* Regex filter for diff output */
19642051
19652052
if( find_option("tk",0,0)!=0 ){
19662053
diff_tk("test-diff", 2);
19672054
return;
19682055
}
19692056
find_option("i",0,0);
2057
+ zRe = find_option("regexp","e",1);
2058
+ if( zRe ){
2059
+ const char *zErr = re_compile(&pRe, zRe, 0);
2060
+ if( zErr ) fossil_fatal("regex error: %s", zErr);
2061
+ }
19702062
diffFlag = diff_options();
19712063
verify_all_options();
19722064
if( g.argc!=4 ) usage("FILE1 FILE2");
19732065
diff_print_filenames(g.argv[2], g.argv[3], diffFlag);
19742066
blob_read_from_file(&a, g.argv[2]);
19752067
blob_read_from_file(&b, g.argv[3]);
19762068
blob_zero(&out);
1977
- text_diff(&a, &b, &out, diffFlag);
2069
+ text_diff(&a, &b, &out, pRe, diffFlag);
19782070
blob_write_to_file(&out, "-");
2071
+ re_free(pRe);
19792072
}
19802073
19812074
/**************************************************************************
19822075
** The basic difference engine is above. What follows is the annotation
19832076
** engine. Both are in the same file since they share many components.
19842077
--- src/diff.c
+++ src/diff.c
@@ -38,10 +38,11 @@
38 #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */
39 #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */
40 #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */
41 #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
42 #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
 
43
44 /*
45 ** These error messages are shared in multiple locations. They are defined
46 ** here for consistency.
47 */
@@ -411,24 +412,45 @@
411 ** Return true if two DLine elements are identical.
412 */
413 static int same_dline(DLine *pA, DLine *pB){
414 return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0;
415 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
417 /*
418 ** Append a single line of context-diff output to pOut.
419 */
420 static void appendDiffLine(
421 Blob *pOut, /* Where to write the line of output */
422 char cPrefix, /* One of " ", "+", or "-" */
423 DLine *pLine, /* The line to be output */
424 int html /* True if generating HTML. False for plain text */
 
425 ){
426 blob_append(pOut, &cPrefix, 1);
427 if( html ){
428 char *zHtml;
429 if( cPrefix=='+' ){
 
 
430 blob_append(pOut, "<span class=\"diffadd\">", -1);
431 }else if( cPrefix=='-' ){
432 blob_append(pOut, "<span class=\"diffrm\">", -1);
433 }
434 zHtml = htmlize(pLine->z, (pLine->h & LENGTH_MASK));
@@ -462,21 +484,19 @@
462 blob_append(pOut, " ", 8);
463 }
464 if( html ) blob_append(pOut, "</span>", -1);
465 }
466
467
468 /*
469 ** Given a raw diff p[] in which the p->aEdit[] array has been filled
470 ** in, compute a context diff into pOut.
471 */
472 static void contextDiff(
473 DContext *p, /* The difference */
474 Blob *pOut, /* Output a context diff to here */
475 int nContext, /* Number of lines of context */
476 int showLn, /* Show line numbers */
477 int html /* Render as HTML */
478 ){
479 DLine *A; /* Left side of the diff */
480 DLine *B; /* Right side of the diff */
481 int a = 0; /* Index of next line in A[] */
482 int b = 0; /* Index of next line in B[] */
@@ -487,11 +507,18 @@
487 int na, nb; /* Number of lines shown from A and B */
488 int i, j; /* Loop counters */
489 int m; /* Number of lines to output */
490 int skip; /* Number of lines to skip */
491 int nChunk = 0; /* Number of diff chunks seen so far */
 
 
 
 
492
 
 
 
493 A = p->aFrom;
494 B = p->aTo;
495 R = p->aEdit;
496 mxr = p->nEdit;
497 while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; }
@@ -498,10 +525,35 @@
498 for(r=0; r<mxr; r += 3*nr){
499 /* Figure out how many triples to show in a single block */
500 for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){}
501 /* printf("r=%d nr=%d\n", r, nr); */
502
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503 /* For the current block comprising nr triples, figure out
504 ** how many lines of A and B are to be displayed
505 */
506 if( R[r]>nContext ){
507 na = nb = nContext;
@@ -530,12 +582,13 @@
530 ** context diff that contains line numbers, show the separator from
531 ** the previous block.
532 */
533 nChunk++;
534 if( showLn ){
535 if( r==0 ){
536 /* Do not show a top divider */
 
537 }else if( html ){
538 blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.');
539 blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk);
540 }else{
541 blob_appendf(pOut, "%.80c\n", '.');
@@ -558,34 +611,36 @@
558 a += skip;
559 b += skip;
560 m = R[r] - skip;
561 for(j=0; j<m; j++){
562 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
563 appendDiffLine(pOut, ' ', &A[a+j], html);
564 }
565 a += m;
566 b += m;
567
568 /* Show the differences */
569 for(i=0; i<nr; i++){
570 m = R[r+i*3+1];
571 for(j=0; j<m; j++){
 
572 if( showLn ) appendDiffLineno(pOut, a+j+1, 0, html);
573 appendDiffLine(pOut, '-', &A[a+j], html);
 
574 }
575 a += m;
576 m = R[r+i*3+2];
577 for(j=0; j<m; j++){
578 if( showLn ) appendDiffLineno(pOut, 0, b+j+1, html);
579 appendDiffLine(pOut, '+', &B[b+j], html);
580 }
581 b += m;
582 if( i<nr-1 ){
583 m = R[r+i*3+3];
584 for(j=0; j<m; j++){
585 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
586 appendDiffLine(pOut, ' ', &B[b+j], html);
587 }
588 b += m;
589 a += m;
590 }
591 }
@@ -594,11 +649,11 @@
594 assert( nr==i );
595 m = R[r+nr*3];
596 if( m>nContext ) m = nContext;
597 for(j=0; j<m; j++){
598 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
599 appendDiffLine(pOut, ' ', &B[b+j], html);
600 }
601 }
602 }
603
604 /*
@@ -614,10 +669,11 @@
614 const char *zStart; /* A <span> tag */
615 int iEnd; /* Write </span> prior to character iEnd */
616 int iStart2; /* Write zStart2 prior to character iStart2 */
617 const char *zStart2; /* A <span> tag */
618 int iEnd2; /* Write </span> prior to character iEnd2 */
 
619 };
620
621 /*
622 ** Flags for sbsWriteText()
623 */
@@ -639,13 +695,17 @@
639 int k; /* Cursor position */
640 int needEndSpan = 0;
641 const char *zIn = pLine->z;
642 char *z = &p->zLine[p->n];
643 int w = p->width;
 
 
 
 
644 for(i=j=k=0; k<w && i<n; i++, k++){
645 char c = zIn[i];
646 if( p->escHtml ){
647 if( i==p->iStart ){
648 int x = strlen(p->zStart);
649 memcpy(z+j, p->zStart, x);
650 j += x;
651 needEndSpan = 1;
@@ -1195,13 +1255,12 @@
1195 ** in, compute a side-by-side diff into pOut.
1196 */
1197 static void sbsDiff(
1198 DContext *p, /* The computed diff */
1199 Blob *pOut, /* Write the results here */
1200 int nContext, /* Number of lines of context around each change */
1201 int width, /* Width of each column of output */
1202 int escHtml /* True to generate HTML output */
1203 ){
1204 DLine *A; /* Left side of the diff */
1205 DLine *B; /* Right side of the diff */
1206 int a = 0; /* Index of next line in A[] */
1207 int b = 0; /* Index of next line in B[] */
@@ -1213,16 +1272,20 @@
1213 int i, j; /* Loop counters */
1214 int m, ma, mb;/* Number of lines to output */
1215 int skip; /* Number of lines to skip */
1216 int nChunk = 0; /* Number of chunks of diff output seen so far */
1217 SbsLine s; /* Output line buffer */
 
 
1218
1219 memset(&s, 0, sizeof(s));
1220 s.zLine = fossil_malloc( 15*width + 200 );
 
1221 if( s.zLine==0 ) return;
1222 s.width = width;
1223 s.escHtml = escHtml;
 
1224 s.iStart = -1;
1225 s.iStart2 = 0;
1226 s.iEnd = -1;
1227 A = p->aFrom;
1228 B = p->aTo;
@@ -1231,10 +1294,35 @@
1231 while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; }
1232 for(r=0; r<mxr; r += 3*nr){
1233 /* Figure out how many triples to show in a single block */
1234 for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){}
1235 /* printf("r=%d nr=%d\n", r, nr); */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1236
1237 /* For the current block comprising nr triples, figure out
1238 ** how many lines of A and B are to be displayed
1239 */
1240 if( R[r]>nContext ){
@@ -1259,20 +1347,21 @@
1259 na += R[r+i*3];
1260 nb += R[r+i*3];
1261 }
1262
1263 /* Draw the separator between blocks */
1264 if( r>0 ){
1265 if( escHtml ){
1266 blob_appendf(pOut, "<span class=\"diffhr\">%.*c</span>\n",
1267 width*2+16, '.');
1268 }else{
1269 blob_appendf(pOut, "%.*c\n", width*2+16, '.');
1270 }
1271 }
 
1272 nChunk++;
1273 if( escHtml ){
1274 blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk);
1275 }
1276
1277 /* Show the initial common area */
1278 a += skip;
@@ -1315,11 +1404,11 @@
1315 sbsWriteLineno(&s, a);
1316 s.iStart = 0;
1317 s.zStart = "<span class=\"diffrm\">";
1318 s.iEnd = s.width;
1319 sbsWriteText(&s, &A[a], SBS_PAD);
1320 if( escHtml ){
1321 sbsWrite(&s, " &lt;\n", 6);
1322 }else{
1323 sbsWrite(&s, " <\n", 3);
1324 }
1325 blob_append(pOut, s.zLine, s.n);
@@ -1337,12 +1426,12 @@
1337 a++;
1338 b++;
1339 }else if( alignment[j]==2 ){
1340 /* Insert one line on the right */
1341 s.n = 0;
1342 sbsWriteSpace(&s, width + 7);
1343 if( escHtml ){
1344 sbsWrite(&s, " &gt; ", 6);
1345 }else{
1346 sbsWrite(&s, " > ", 3);
1347 }
1348 sbsWriteLineno(&s, b);
@@ -1800,11 +1889,11 @@
1800 ** Extract the number of lines of context from diffFlags. Supply an
1801 ** appropriate default if no context width is specified.
1802 */
1803 int diff_context_lines(u64 diffFlags){
1804 int n = diffFlags & DIFF_CONTEXT_MASK;
1805 if( n==0 ) n = 5;
1806 return n;
1807 }
1808
1809 /*
1810 ** Extract the width of columns for side-by-side diff. Supply an
@@ -1832,22 +1921,21 @@
1832 */
1833 int *text_diff(
1834 Blob *pA_Blob, /* FROM file */
1835 Blob *pB_Blob, /* TO file */
1836 Blob *pOut, /* Write diff here if not NULL */
 
1837 u64 diffFlags /* DIFF_* flags defined above */
1838 ){
1839 int ignoreEolWs; /* Ignore whitespace at the end of lines */
1840 int nContext; /* Amount of context to display */
1841 DContext c;
1842
1843 if( diffFlags & DIFF_INVERT ){
1844 Blob *pTemp = pA_Blob;
1845 pA_Blob = pB_Blob;
1846 pB_Blob = pTemp;
1847 }
1848 nContext = diff_context_lines(diffFlags);
1849 ignoreEolWs = (diffFlags & DIFF_IGNORE_EOLWS)!=0;
1850
1851 /* Prepare the input files */
1852 memset(&c, 0, sizeof(c));
1853 c.aFrom = break_into_lines(blob_str(pA_Blob), blob_size(pA_Blob),
@@ -1867,17 +1955,14 @@
1867 diff_all(&c);
1868 if( (diffFlags & DIFF_NOOPT)==0 ) diff_optimize(&c);
1869
1870 if( pOut ){
1871 /* Compute a context or side-by-side diff into pOut */
1872 int escHtml = (diffFlags & DIFF_HTML)!=0;
1873 if( diffFlags & DIFF_SIDEBYSIDE ){
1874 int width = diff_width(diffFlags);
1875 sbsDiff(&c, pOut, nContext, width, escHtml);
1876 }else{
1877 int showLn = (diffFlags & DIFF_LINENO)!=0;
1878 contextDiff(&c, pOut, nContext, showLn, escHtml);
1879 }
1880 fossil_free(c.aFrom);
1881 fossil_free(c.aTo);
1882 fossil_free(c.aEdit);
1883 return 0;
@@ -1903,19 +1988,19 @@
1903 ** --noopt Disable optimization DIFF_NOOPT
1904 ** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE
1905 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1906 ** --width|-W N N character lines. DIFF_WIDTH_MASK
1907 */
1908 int diff_options(void){
1909 u64 diffFlags = 0;
1910 const char *z;
1911 int f;
1912 if( find_option("side-by-side","y",0)!=0 ) diffFlags |= DIFF_SIDEBYSIDE;
1913 if( find_option("unified",0,0)!=0 ) diffFlags &= ~DIFF_SIDEBYSIDE;
1914 if( (z = find_option("context","c",1))!=0 && (f = atoi(z))>0 ){
1915 if( f > DIFF_CONTEXT_MASK ) f = DIFF_CONTEXT_MASK;
1916 diffFlags |= f;
1917 }
1918 if( (z = find_option("width","W",1))!=0 && (f = atoi(z))>0 ){
1919 f *= DIFF_CONTEXT_MASK+1;
1920 if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
1921 diffFlags |= f;
@@ -1940,11 +2025,11 @@
1940 if( g.argc<4 ) usage("FILE1 FILE2 ...");
1941 blob_read_from_file(&a, g.argv[2]);
1942 for(i=3; i<g.argc; i++){
1943 if( i>3 ) fossil_print("-------------------------------\n");
1944 blob_read_from_file(&b, g.argv[i]);
1945 R = text_diff(&a, &b, 0, diffFlags);
1946 for(r=0; R[r] || R[r+1] || R[r+2]; r += 3){
1947 fossil_print(" copy %4d delete %4d insert %4d\n", R[r], R[r+1], R[r+2]);
1948 }
1949 /* free(R); */
1950 blob_reset(&b);
@@ -1959,25 +2044,33 @@
1959 ** Print the difference between two files. The usual diff options apply.
1960 */
1961 void test_diff_cmd(void){
1962 Blob a, b, out;
1963 u64 diffFlag;
 
 
1964
1965 if( find_option("tk",0,0)!=0 ){
1966 diff_tk("test-diff", 2);
1967 return;
1968 }
1969 find_option("i",0,0);
 
 
 
 
 
1970 diffFlag = diff_options();
1971 verify_all_options();
1972 if( g.argc!=4 ) usage("FILE1 FILE2");
1973 diff_print_filenames(g.argv[2], g.argv[3], diffFlag);
1974 blob_read_from_file(&a, g.argv[2]);
1975 blob_read_from_file(&b, g.argv[3]);
1976 blob_zero(&out);
1977 text_diff(&a, &b, &out, diffFlag);
1978 blob_write_to_file(&out, "-");
 
1979 }
1980
1981 /**************************************************************************
1982 ** The basic difference engine is above. What follows is the annotation
1983 ** engine. Both are in the same file since they share many components.
1984
--- src/diff.c
+++ src/diff.c
@@ -38,10 +38,11 @@
38 #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */
39 #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */
40 #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */
41 #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
42 #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
43 #define DIFF_CONTEXT_EX (((u64)0x04)<<32) /* Use context even if zero */
44
45 /*
46 ** These error messages are shared in multiple locations. They are defined
47 ** here for consistency.
48 */
@@ -411,24 +412,45 @@
412 ** Return true if two DLine elements are identical.
413 */
414 static int same_dline(DLine *pA, DLine *pB){
415 return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0;
416 }
417
418 /*
419 ** Return true if the regular expression *pRe matches any of the
420 ** N dlines
421 */
422 static int re_dline_match(
423 ReCompiled *pRe, /* The regular expression to be matched */
424 DLine *aDLine, /* First of N DLines to compare against */
425 int N /* Number of DLines to check */
426 ){
427 while( N-- ){
428 if( re_match(pRe, (const unsigned char *)aDLine->z, LENGTH(aDLine)) ){
429 return 1;
430 }
431 aDLine++;
432 }
433 return 0;
434 }
435
436 /*
437 ** Append a single line of context-diff output to pOut.
438 */
439 static void appendDiffLine(
440 Blob *pOut, /* Where to write the line of output */
441 char cPrefix, /* One of " ", "+", or "-" */
442 DLine *pLine, /* The line to be output */
443 int html, /* True if generating HTML. False for plain text */
444 ReCompiled *pRe /* Colorize only if line matches this Regex */
445 ){
446 blob_append(pOut, &cPrefix, 1);
447 if( html ){
448 char *zHtml;
449 if( pRe && re_dline_match(pRe, pLine, 1)==0 ){
450 cPrefix = ' ';
451 }else if( cPrefix=='+' ){
452 blob_append(pOut, "<span class=\"diffadd\">", -1);
453 }else if( cPrefix=='-' ){
454 blob_append(pOut, "<span class=\"diffrm\">", -1);
455 }
456 zHtml = htmlize(pLine->z, (pLine->h & LENGTH_MASK));
@@ -462,21 +484,19 @@
484 blob_append(pOut, " ", 8);
485 }
486 if( html ) blob_append(pOut, "</span>", -1);
487 }
488
 
489 /*
490 ** Given a raw diff p[] in which the p->aEdit[] array has been filled
491 ** in, compute a context diff into pOut.
492 */
493 static void contextDiff(
494 DContext *p, /* The difference */
495 Blob *pOut, /* Output a context diff to here */
496 ReCompiled *pRe, /* Only show changes that match this regex */
497 u64 diffFlags /* Flags controlling the diff format */
 
498 ){
499 DLine *A; /* Left side of the diff */
500 DLine *B; /* Right side of the diff */
501 int a = 0; /* Index of next line in A[] */
502 int b = 0; /* Index of next line in B[] */
@@ -487,11 +507,18 @@
507 int na, nb; /* Number of lines shown from A and B */
508 int i, j; /* Loop counters */
509 int m; /* Number of lines to output */
510 int skip; /* Number of lines to skip */
511 int nChunk = 0; /* Number of diff chunks seen so far */
512 int nContext; /* Number of lines of context */
513 int showLn; /* Show line numbers */
514 int html; /* Render as HTML */
515 int showDivider = 0; /* True to show the divider between diff blocks */
516
517 nContext = diff_context_lines(diffFlags);
518 showLn = (diffFlags & DIFF_LINENO)!=0;
519 html = (diffFlags & DIFF_HTML)!=0;
520 A = p->aFrom;
521 B = p->aTo;
522 R = p->aEdit;
523 mxr = p->nEdit;
524 while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; }
@@ -498,10 +525,35 @@
525 for(r=0; r<mxr; r += 3*nr){
526 /* Figure out how many triples to show in a single block */
527 for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){}
528 /* printf("r=%d nr=%d\n", r, nr); */
529
530 /* If there is a regex, skip this block (generate no diff output)
531 ** if the regex matches or does not match both insert and delete.
532 ** Only display the block if one side matches but the other side does
533 ** not.
534 */
535 if( pRe ){
536 int hideBlock = 1;
537 int xa = a, xb = b;
538 for(i=0; hideBlock && i<nr; i++){
539 int c1, c2;
540 xa += R[r+i*3];
541 xb += R[r+i*3];
542 c1 = re_dline_match(pRe, &A[xa], R[r+i*3+1]);
543 c2 = re_dline_match(pRe, &B[xb], R[r+i*3+2]);
544 hideBlock = c1==c2;
545 xa += R[r+i*3+1];
546 xb += R[r+i*3+2];
547 }
548 if( hideBlock ){
549 a = xa;
550 b = xb;
551 continue;
552 }
553 }
554
555 /* For the current block comprising nr triples, figure out
556 ** how many lines of A and B are to be displayed
557 */
558 if( R[r]>nContext ){
559 na = nb = nContext;
@@ -530,12 +582,13 @@
582 ** context diff that contains line numbers, show the separator from
583 ** the previous block.
584 */
585 nChunk++;
586 if( showLn ){
587 if( !showDivider ){
588 /* Do not show a top divider */
589 showDivider = 1;
590 }else if( html ){
591 blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.');
592 blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk);
593 }else{
594 blob_appendf(pOut, "%.80c\n", '.');
@@ -558,34 +611,36 @@
611 a += skip;
612 b += skip;
613 m = R[r] - skip;
614 for(j=0; j<m; j++){
615 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
616 appendDiffLine(pOut, ' ', &A[a+j], html, 0);
617 }
618 a += m;
619 b += m;
620
621 /* Show the differences */
622 for(i=0; i<nr; i++){
623 m = R[r+i*3+1];
624 for(j=0; j<m; j++){
625 char cMark = '-';
626 if( showLn ) appendDiffLineno(pOut, a+j+1, 0, html);
627 if( pRe && re_dline_match(pRe, &A[a+j], 1)==0 ) cMark = ' ';
628 appendDiffLine(pOut, '-', &A[a+j], html, pRe);
629 }
630 a += m;
631 m = R[r+i*3+2];
632 for(j=0; j<m; j++){
633 if( showLn ) appendDiffLineno(pOut, 0, b+j+1, html);
634 appendDiffLine(pOut, '+', &B[b+j], html, pRe);
635 }
636 b += m;
637 if( i<nr-1 ){
638 m = R[r+i*3+3];
639 for(j=0; j<m; j++){
640 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
641 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
642 }
643 b += m;
644 a += m;
645 }
646 }
@@ -594,11 +649,11 @@
649 assert( nr==i );
650 m = R[r+nr*3];
651 if( m>nContext ) m = nContext;
652 for(j=0; j<m; j++){
653 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
654 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
655 }
656 }
657 }
658
659 /*
@@ -614,10 +669,11 @@
669 const char *zStart; /* A <span> tag */
670 int iEnd; /* Write </span> prior to character iEnd */
671 int iStart2; /* Write zStart2 prior to character iStart2 */
672 const char *zStart2; /* A <span> tag */
673 int iEnd2; /* Write </span> prior to character iEnd2 */
674 ReCompiled *pRe; /* Only colorize matching lines, if not NULL */
675 };
676
677 /*
678 ** Flags for sbsWriteText()
679 */
@@ -639,13 +695,17 @@
695 int k; /* Cursor position */
696 int needEndSpan = 0;
697 const char *zIn = pLine->z;
698 char *z = &p->zLine[p->n];
699 int w = p->width;
700 int colorize = p->escHtml;
701 if( colorize && p->pRe && re_dline_match(p->pRe, pLine, 1)==0 ){
702 colorize = 0;
703 }
704 for(i=j=k=0; k<w && i<n; i++, k++){
705 char c = zIn[i];
706 if( colorize ){
707 if( i==p->iStart ){
708 int x = strlen(p->zStart);
709 memcpy(z+j, p->zStart, x);
710 j += x;
711 needEndSpan = 1;
@@ -1195,13 +1255,12 @@
1255 ** in, compute a side-by-side diff into pOut.
1256 */
1257 static void sbsDiff(
1258 DContext *p, /* The computed diff */
1259 Blob *pOut, /* Write the results here */
1260 ReCompiled *pRe, /* Only show changes that match this regex */
1261 u64 diffFlags /* Flags controlling the diff */
 
1262 ){
1263 DLine *A; /* Left side of the diff */
1264 DLine *B; /* Right side of the diff */
1265 int a = 0; /* Index of next line in A[] */
1266 int b = 0; /* Index of next line in B[] */
@@ -1213,16 +1272,20 @@
1272 int i, j; /* Loop counters */
1273 int m, ma, mb;/* Number of lines to output */
1274 int skip; /* Number of lines to skip */
1275 int nChunk = 0; /* Number of chunks of diff output seen so far */
1276 SbsLine s; /* Output line buffer */
1277 int nContext; /* Lines of context above and below each change */
1278 int showDivider = 0; /* True to show the divider */
1279
1280 memset(&s, 0, sizeof(s));
1281 s.width = diff_width(diffFlags);
1282 s.zLine = fossil_malloc( 15*s.width + 200 );
1283 if( s.zLine==0 ) return;
1284 nContext = diff_context_lines(diffFlags);
1285 s.escHtml = (diffFlags & DIFF_HTML)!=0;
1286 s.pRe = pRe;
1287 s.iStart = -1;
1288 s.iStart2 = 0;
1289 s.iEnd = -1;
1290 A = p->aFrom;
1291 B = p->aTo;
@@ -1231,10 +1294,35 @@
1294 while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; }
1295 for(r=0; r<mxr; r += 3*nr){
1296 /* Figure out how many triples to show in a single block */
1297 for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){}
1298 /* printf("r=%d nr=%d\n", r, nr); */
1299
1300 /* If there is a regex, skip this block (generate no diff output)
1301 ** if the regex matches or does not match both insert and delete.
1302 ** Only display the block if one side matches but the other side does
1303 ** not.
1304 */
1305 if( pRe ){
1306 int hideBlock = 1;
1307 int xa = a, xb = b;
1308 for(i=0; hideBlock && i<nr; i++){
1309 int c1, c2;
1310 xa += R[r+i*3];
1311 xb += R[r+i*3];
1312 c1 = re_dline_match(pRe, &A[xa], R[r+i*3+1]);
1313 c2 = re_dline_match(pRe, &B[xb], R[r+i*3+2]);
1314 hideBlock = c1==c2;
1315 xa += R[r+i*3+1];
1316 xb += R[r+i*3+2];
1317 }
1318 if( hideBlock ){
1319 a = xa;
1320 b = xb;
1321 continue;
1322 }
1323 }
1324
1325 /* For the current block comprising nr triples, figure out
1326 ** how many lines of A and B are to be displayed
1327 */
1328 if( R[r]>nContext ){
@@ -1259,20 +1347,21 @@
1347 na += R[r+i*3];
1348 nb += R[r+i*3];
1349 }
1350
1351 /* Draw the separator between blocks */
1352 if( showDivider ){
1353 if( s.escHtml ){
1354 blob_appendf(pOut, "<span class=\"diffhr\">%.*c</span>\n",
1355 s.width*2+16, '.');
1356 }else{
1357 blob_appendf(pOut, "%.*c\n", s.width*2+16, '.');
1358 }
1359 }
1360 showDivider = 1;
1361 nChunk++;
1362 if( s.escHtml ){
1363 blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk);
1364 }
1365
1366 /* Show the initial common area */
1367 a += skip;
@@ -1315,11 +1404,11 @@
1404 sbsWriteLineno(&s, a);
1405 s.iStart = 0;
1406 s.zStart = "<span class=\"diffrm\">";
1407 s.iEnd = s.width;
1408 sbsWriteText(&s, &A[a], SBS_PAD);
1409 if( s.escHtml ){
1410 sbsWrite(&s, " &lt;\n", 6);
1411 }else{
1412 sbsWrite(&s, " <\n", 3);
1413 }
1414 blob_append(pOut, s.zLine, s.n);
@@ -1337,12 +1426,12 @@
1426 a++;
1427 b++;
1428 }else if( alignment[j]==2 ){
1429 /* Insert one line on the right */
1430 s.n = 0;
1431 sbsWriteSpace(&s, s.width + 7);
1432 if( s.escHtml ){
1433 sbsWrite(&s, " &gt; ", 6);
1434 }else{
1435 sbsWrite(&s, " > ", 3);
1436 }
1437 sbsWriteLineno(&s, b);
@@ -1800,11 +1889,11 @@
1889 ** Extract the number of lines of context from diffFlags. Supply an
1890 ** appropriate default if no context width is specified.
1891 */
1892 int diff_context_lines(u64 diffFlags){
1893 int n = diffFlags & DIFF_CONTEXT_MASK;
1894 if( n==0 && (diffFlags & DIFF_CONTEXT_EX)==0 ) n = 5;
1895 return n;
1896 }
1897
1898 /*
1899 ** Extract the width of columns for side-by-side diff. Supply an
@@ -1832,22 +1921,21 @@
1921 */
1922 int *text_diff(
1923 Blob *pA_Blob, /* FROM file */
1924 Blob *pB_Blob, /* TO file */
1925 Blob *pOut, /* Write diff here if not NULL */
1926 ReCompiled *pRe, /* Only output changes where this Regexp matches */
1927 u64 diffFlags /* DIFF_* flags defined above */
1928 ){
1929 int ignoreEolWs; /* Ignore whitespace at the end of lines */
 
1930 DContext c;
1931
1932 if( diffFlags & DIFF_INVERT ){
1933 Blob *pTemp = pA_Blob;
1934 pA_Blob = pB_Blob;
1935 pB_Blob = pTemp;
1936 }
 
1937 ignoreEolWs = (diffFlags & DIFF_IGNORE_EOLWS)!=0;
1938
1939 /* Prepare the input files */
1940 memset(&c, 0, sizeof(c));
1941 c.aFrom = break_into_lines(blob_str(pA_Blob), blob_size(pA_Blob),
@@ -1867,17 +1955,14 @@
1955 diff_all(&c);
1956 if( (diffFlags & DIFF_NOOPT)==0 ) diff_optimize(&c);
1957
1958 if( pOut ){
1959 /* Compute a context or side-by-side diff into pOut */
 
1960 if( diffFlags & DIFF_SIDEBYSIDE ){
1961 sbsDiff(&c, pOut, pRe, diffFlags);
 
1962 }else{
1963 contextDiff(&c, pOut, pRe, diffFlags);
 
1964 }
1965 fossil_free(c.aFrom);
1966 fossil_free(c.aTo);
1967 fossil_free(c.aEdit);
1968 return 0;
@@ -1903,19 +1988,19 @@
1988 ** --noopt Disable optimization DIFF_NOOPT
1989 ** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE
1990 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1991 ** --width|-W N N character lines. DIFF_WIDTH_MASK
1992 */
1993 u64 diff_options(void){
1994 u64 diffFlags = 0;
1995 const char *z;
1996 int f;
1997 if( find_option("side-by-side","y",0)!=0 ) diffFlags |= DIFF_SIDEBYSIDE;
1998 if( find_option("unified",0,0)!=0 ) diffFlags &= ~DIFF_SIDEBYSIDE;
1999 if( (z = find_option("context","c",1))!=0 && (f = atoi(z))>=0 ){
2000 if( f > DIFF_CONTEXT_MASK ) f = DIFF_CONTEXT_MASK;
2001 diffFlags |= f + DIFF_CONTEXT_EX;
2002 }
2003 if( (z = find_option("width","W",1))!=0 && (f = atoi(z))>0 ){
2004 f *= DIFF_CONTEXT_MASK+1;
2005 if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
2006 diffFlags |= f;
@@ -1940,11 +2025,11 @@
2025 if( g.argc<4 ) usage("FILE1 FILE2 ...");
2026 blob_read_from_file(&a, g.argv[2]);
2027 for(i=3; i<g.argc; i++){
2028 if( i>3 ) fossil_print("-------------------------------\n");
2029 blob_read_from_file(&b, g.argv[i]);
2030 R = text_diff(&a, &b, 0, 0, diffFlags);
2031 for(r=0; R[r] || R[r+1] || R[r+2]; r += 3){
2032 fossil_print(" copy %4d delete %4d insert %4d\n", R[r], R[r+1], R[r+2]);
2033 }
2034 /* free(R); */
2035 blob_reset(&b);
@@ -1959,25 +2044,33 @@
2044 ** Print the difference between two files. The usual diff options apply.
2045 */
2046 void test_diff_cmd(void){
2047 Blob a, b, out;
2048 u64 diffFlag;
2049 const char *zRe; /* Regex filter for diff output */
2050 ReCompiled *pRe = 0; /* Regex filter for diff output */
2051
2052 if( find_option("tk",0,0)!=0 ){
2053 diff_tk("test-diff", 2);
2054 return;
2055 }
2056 find_option("i",0,0);
2057 zRe = find_option("regexp","e",1);
2058 if( zRe ){
2059 const char *zErr = re_compile(&pRe, zRe, 0);
2060 if( zErr ) fossil_fatal("regex error: %s", zErr);
2061 }
2062 diffFlag = diff_options();
2063 verify_all_options();
2064 if( g.argc!=4 ) usage("FILE1 FILE2");
2065 diff_print_filenames(g.argv[2], g.argv[3], diffFlag);
2066 blob_read_from_file(&a, g.argv[2]);
2067 blob_read_from_file(&b, g.argv[3]);
2068 blob_zero(&out);
2069 text_diff(&a, &b, &out, pRe, diffFlag);
2070 blob_write_to_file(&out, "-");
2071 re_free(pRe);
2072 }
2073
2074 /**************************************************************************
2075 ** The basic difference engine is above. What follows is the annotation
2076 ** engine. Both are in the same file since they share many components.
2077
+2 -2
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -109,11 +109,11 @@
109109
if( blob_compare(pFile1, &file2) ){
110110
fossil_print("CHANGED %s\n", zName);
111111
}
112112
}else{
113113
blob_zero(&out);
114
- text_diff(pFile1, &file2, &out, diffFlags);
114
+ text_diff(pFile1, &file2, &out, 0, diffFlags);
115115
if( blob_size(&out) ){
116116
diff_print_filenames(zName, zName2, diffFlags);
117117
fossil_print("%s\n", blob_str(&out));
118118
}
119119
blob_reset(&out);
@@ -210,11 +210,11 @@
210210
if( diffFlags & DIFF_BRIEF ) return;
211211
if( zDiffCmd==0 ){
212212
Blob out; /* Diff output text */
213213
214214
blob_zero(&out);
215
- text_diff(pFile1, pFile2, &out, diffFlags);
215
+ text_diff(pFile1, pFile2, &out, 0, diffFlags);
216216
diff_print_filenames(zName, zName, diffFlags);
217217
fossil_print("%s\n", blob_str(&out));
218218
219219
/* Release memory resources */
220220
blob_reset(&out);
221221
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -109,11 +109,11 @@
109 if( blob_compare(pFile1, &file2) ){
110 fossil_print("CHANGED %s\n", zName);
111 }
112 }else{
113 blob_zero(&out);
114 text_diff(pFile1, &file2, &out, diffFlags);
115 if( blob_size(&out) ){
116 diff_print_filenames(zName, zName2, diffFlags);
117 fossil_print("%s\n", blob_str(&out));
118 }
119 blob_reset(&out);
@@ -210,11 +210,11 @@
210 if( diffFlags & DIFF_BRIEF ) return;
211 if( zDiffCmd==0 ){
212 Blob out; /* Diff output text */
213
214 blob_zero(&out);
215 text_diff(pFile1, pFile2, &out, diffFlags);
216 diff_print_filenames(zName, zName, diffFlags);
217 fossil_print("%s\n", blob_str(&out));
218
219 /* Release memory resources */
220 blob_reset(&out);
221
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -109,11 +109,11 @@
109 if( blob_compare(pFile1, &file2) ){
110 fossil_print("CHANGED %s\n", zName);
111 }
112 }else{
113 blob_zero(&out);
114 text_diff(pFile1, &file2, &out, 0, diffFlags);
115 if( blob_size(&out) ){
116 diff_print_filenames(zName, zName2, diffFlags);
117 fossil_print("%s\n", blob_str(&out));
118 }
119 blob_reset(&out);
@@ -210,11 +210,11 @@
210 if( diffFlags & DIFF_BRIEF ) return;
211 if( zDiffCmd==0 ){
212 Blob out; /* Diff output text */
213
214 blob_zero(&out);
215 text_diff(pFile1, pFile2, &out, 0, diffFlags);
216 diff_print_filenames(zName, zName, diffFlags);
217 fossil_print("%s\n", blob_str(&out));
218
219 /* Release memory resources */
220 blob_reset(&out);
221
+4 -10
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -1,21 +1,15 @@
11
/*
22
** Copyright (c) 2009 D. Richard Hipp
33
**
44
** This program is free software; you can redistribute it and/or
5
-** modify it under the terms of the GNU General Public
6
-** License version 2 as published by the Free Software Foundation.
5
+** modify it under the terms of the Simplified BSD License (also
6
+** known as the "2-Clause License" or "FreeBSD License".)
77
**
88
** This program is distributed in the hope that it will be useful,
9
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
10
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
-** General Public License for more details.
12
-**
13
-** You should have received a copy of the GNU General Public
14
-** License along with this library; if not, write to the
15
-** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16
-** Boston, MA 02111-1307, USA.
9
+** but without any warranty; without even the implied warranty of
10
+** merchantability or fitness for a particular purpose.
1711
**
1812
** Author contact information:
1913
** [email protected]
2014
** http://www.hwaci.com/drh/
2115
**
2216
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -1,21 +1,15 @@
1 /*
2 ** Copyright (c) 2009 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the GNU General Public
6 ** License version 2 as published by the Free Software Foundation.
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ** General Public License for more details.
12 **
13 ** You should have received a copy of the GNU General Public
14 ** License along with this library; if not, write to the
15 ** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 ** Boston, MA 02111-1307, USA.
17 **
18 ** Author contact information:
19 ** [email protected]
20 ** http://www.hwaci.com/drh/
21 **
22
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -1,21 +1,15 @@
1 /*
2 ** Copyright (c) 2009 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
 
 
 
 
 
 
11 **
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16
+47 -13
--- src/info.c
+++ src/info.c
@@ -208,10 +208,12 @@
208208
fossil_print("project-code: %s\n", db_get("project-code", ""));
209209
vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
210210
if( vid ){
211211
show_common_info(vid, "checkout:", 1, 1);
212212
}
213
+ fossil_print("checkin-count: %d\n",
214
+ db_int(-1, "SELECT count(distinct mid) FROM mlink /*scan*/"));
213215
}else{
214216
int rid;
215217
rid = name_to_rid(g.argv[2]);
216218
if( rid==0 ){
217219
fossil_panic("no such object: %s\n", g.argv[2]);
@@ -287,13 +289,18 @@
287289
}
288290
}
289291
290292
291293
/*
292
-** Append the difference between two RIDs to the output
294
+** Append the difference between artifacts to the output
293295
*/
294
-static void append_diff(const char *zFrom, const char *zTo, u64 diffFlags){
296
+static void append_diff(
297
+ const char *zFrom, /* Diff from this artifact */
298
+ const char *zTo, /* ... to this artifact */
299
+ u64 diffFlags, /* Diff formatting flags */
300
+ ReCompiled *pRe /* Only show change matching this regex */
301
+){
295302
int fromid;
296303
int toid;
297304
Blob from, to, out;
298305
if( zFrom ){
299306
fromid = uuid_to_rid(zFrom, 0);
@@ -307,16 +314,16 @@
307314
}else{
308315
blob_zero(&to);
309316
}
310317
blob_zero(&out);
311318
if( diffFlags & DIFF_SIDEBYSIDE ){
312
- text_diff(&from, &to, &out, diffFlags | DIFF_HTML);
319
+ text_diff(&from, &to, &out, pRe, diffFlags | DIFF_HTML);
313320
@ <div class="sbsdiff">
314321
@ %s(blob_str(&out))
315322
@ </div>
316323
}else{
317
- text_diff(&from, &to, &out, diffFlags | DIFF_LINENO | DIFF_HTML);
324
+ text_diff(&from, &to, &out, pRe, diffFlags | DIFF_LINENO | DIFF_HTML);
318325
@ <div class="udiff">
319326
@ %s(blob_str(&out))
320327
@ </div>
321328
}
322329
blob_reset(&from);
@@ -333,10 +340,11 @@
333340
const char *zName, /* Name of the file that has changed */
334341
const char *zOld, /* blob.uuid before change. NULL for added files */
335342
const char *zNew, /* blob.uuid after change. NULL for deletes */
336343
const char *zOldName, /* Prior name. NULL if no name change. */
337344
u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */
345
+ ReCompiled *pRe, /* Only show diffs that match this regex, if not NULL */
338346
int mperm /* executable or symlink permission for zNew */
339347
){
340348
if( !g.perm.Hyperlink ){
341349
if( zNew==0 ){
342350
@ <p>Deleted %h(zName)</p>
@@ -350,11 +358,11 @@
350358
}else{
351359
@ <p>Changes to %h(zName)</p>
352360
}
353361
if( diffFlags ){
354362
@ <pre style="white-space:pre;">
355
- append_diff(zOld, zNew, diffFlags);
363
+ append_diff(zOld, zNew, diffFlags, pRe);
356364
@ </pre>
357365
}
358366
}else{
359367
if( zOld && zNew ){
360368
if( fossil_strcmp(zOld, zNew)!=0 ){
@@ -376,11 +384,11 @@
376384
@ <p>Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
377385
@ version %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a>
378386
}
379387
if( diffFlags ){
380388
@ <pre style="white-space:pre;">
381
- append_diff(zOld, zNew, diffFlags);
389
+ append_diff(zOld, zNew, diffFlags, pRe);
382390
@ </pre>
383391
}else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
384392
@ &nbsp;&nbsp;
385393
@ %z(href("%R/fdiff?v1=%S&v2=%S",zOld,zNew))[diff]</a>
386394
}
@@ -444,10 +452,12 @@
444452
int sideBySide; /* True for side-by-side diffs */
445453
u64 diffFlags; /* Flag parameter for text_diff() */
446454
const char *zName; /* Name of the checkin to be displayed */
447455
const char *zUuid; /* UUID of zName */
448456
const char *zParent; /* UUID of the parent checkin (if any) */
457
+ const char *zRe; /* regex parameter */
458
+ ReCompiled *pRe = 0; /* regex */
449459
450460
login_check_credentials();
451461
if( !g.perm.Read ){ login_needed(); return; }
452462
zName = P("name");
453463
rid = name_to_rid_www("name");
@@ -455,10 +465,12 @@
455465
style_header("Check-in Information Error");
456466
@ No such object: %h(g.argv[2])
457467
style_footer();
458468
return;
459469
}
470
+ zRe = P("regex");
471
+ if( zRe ) re_compile(&pRe, zRe, 0);
460472
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
461473
zParent = db_text(0,
462474
"SELECT uuid FROM plink, blob"
463475
" WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
464476
rid
@@ -692,10 +704,14 @@
692704
@ show&nbsp;side-by-side&nbsp;diffs</a>
693705
}
694706
}
695707
@ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
696708
@ patch</a></div>
709
+ if( pRe ){
710
+ @ <p><b>Only differences that match regular expression "%h(zRe)"
711
+ @ are shown.</b></p>
712
+ }
697713
db_prepare(&q,
698714
"SELECT name,"
699715
" mperm,"
700716
" (SELECT uuid FROM blob WHERE rid=mlink.pid),"
701717
" (SELECT uuid FROM blob WHERE rid=mlink.fid),"
@@ -712,11 +728,11 @@
712728
const char *zName = db_column_text(&q,0);
713729
int mperm = db_column_int(&q, 1);
714730
const char *zOld = db_column_text(&q,2);
715731
const char *zNew = db_column_text(&q,3);
716732
const char *zOldName = db_column_text(&q, 4);
717
- append_file_change_line(zName, zOld, zNew, zOldName, diffFlags, mperm);
733
+ append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);
718734
}
719735
db_finalize(&q);
720736
}
721737
style_footer();
722738
}
@@ -935,15 +951,19 @@
935951
Manifest *pFrom, *pTo;
936952
ManifestFile *pFileFrom, *pFileTo;
937953
const char *zBranch;
938954
const char *zFrom;
939955
const char *zTo;
956
+ const char *zRe;
957
+ ReCompiled *pRe = 0;
940958
941959
login_check_credentials();
942960
if( !g.perm.Read ){ login_needed(); return; }
943961
login_anonymous_available();
944962
963
+ zRe = P("regex");
964
+ if( zRe ) re_compile(&pRe, zRe, 0);
945965
zBranch = P("branch");
946966
if( zBranch && zBranch[0] ){
947967
cgi_replace_parameter("from", mprintf("root:%s", zBranch));
948968
cgi_replace_parameter("to", zBranch);
949969
}
@@ -971,11 +991,16 @@
971991
style_header("Check-in Differences");
972992
@ <h2>Difference From:</h2><blockquote>
973993
checkin_description(ridFrom);
974994
@ </blockquote><h2>To:</h2><blockquote>
975995
checkin_description(ridTo);
976
- @ </blockquote><hr /><p>
996
+ @ </blockquote>
997
+ if( pRe ){
998
+ @ <p><b>Only differences that match regular expression "%h(zRe)"
999
+ @ are shown.</b></p>
1000
+ }
1001
+ @<hr /><p>
9771002
9781003
manifest_file_rewind(pFrom);
9791004
pFileFrom = manifest_file_next(pFrom, 0);
9801005
manifest_file_rewind(pTo);
9811006
pFileTo = manifest_file_next(pTo, 0);
@@ -989,25 +1014,25 @@
9891014
}else{
9901015
cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName);
9911016
}
9921017
if( cmp<0 ){
9931018
append_file_change_line(pFileFrom->zName,
994
- pFileFrom->zUuid, 0, 0, diffFlags, 0);
1019
+ pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0);
9951020
pFileFrom = manifest_file_next(pFrom, 0);
9961021
}else if( cmp>0 ){
9971022
append_file_change_line(pFileTo->zName,
998
- 0, pFileTo->zUuid, 0, diffFlags,
1023
+ 0, pFileTo->zUuid, 0, diffFlags, pRe,
9991024
manifest_file_mperm(pFileTo));
10001025
pFileTo = manifest_file_next(pTo, 0);
10011026
}else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){
10021027
/* No changes */
10031028
pFileFrom = manifest_file_next(pFrom, 0);
10041029
pFileTo = manifest_file_next(pTo, 0);
10051030
}else{
10061031
append_file_change_line(pFileFrom->zName,
10071032
pFileFrom->zUuid,
1008
- pFileTo->zUuid, 0, diffFlags,
1033
+ pFileTo->zUuid, 0, diffFlags, pRe,
10091034
manifest_file_mperm(pFileTo));
10101035
pFileFrom = manifest_file_next(pFrom, 0);
10111036
pFileTo = manifest_file_next(pTo, 0);
10121037
}
10131038
}
@@ -1256,11 +1281,11 @@
12561281
}
12571282
12581283
12591284
/*
12601285
** WEBPAGE: fdiff
1261
-** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN
1286
+** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN&regex=REGEX
12621287
**
12631288
** Two arguments, v1 and v2, identify the files to be diffed. Show the
12641289
** difference between the two artifacts. Show diff side by side unless sbs
12651290
** is 0. Generate plaintext if "patch" is present.
12661291
*/
@@ -1269,12 +1294,15 @@
12691294
int isPatch;
12701295
int sideBySide;
12711296
Blob c1, c2, diff, *pOut;
12721297
char *zV1;
12731298
char *zV2;
1299
+ const char *zRe;
1300
+ ReCompiled *pRe = 0;
12741301
u64 diffFlags;
12751302
const char *zStyle = "sbsdiff";
1303
+ const char *zReErr = 0;
12761304
12771305
login_check_credentials();
12781306
if( !g.perm.Read ){ login_needed(); return; }
12791307
v1 = name_to_rid_www("v1");
12801308
v2 = name_to_rid_www("v2");
@@ -1296,13 +1324,15 @@
12961324
}else{
12971325
diffFlags |= DIFF_LINENO;
12981326
zStyle = "udiff";
12991327
}
13001328
}
1329
+ zRe = P("regex");
1330
+ if( zRe ) zReErr = re_compile(&pRe, zRe, 0);
13011331
content_get(v1, &c1);
13021332
content_get(v2, &c2);
1303
- text_diff(&c1, &c2, pOut, diffFlags);
1333
+ text_diff(&c1, &c2, pOut, pRe, diffFlags);
13041334
blob_reset(&c1);
13051335
blob_reset(&c2);
13061336
if( !isPatch ){
13071337
style_header("Diff");
13081338
style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch",
@@ -1326,10 +1356,14 @@
13261356
@ Artifact %z(href("%R/artifact/%S",zV1))[%S(zV1)]</a>:</h2>
13271357
object_description(v1, 0, 0);
13281358
@ <h2>To Artifact %z(href("%R/artifact/%S",zV2))[%S(zV2)]</a>:</h2>
13291359
object_description(v2, 0, 0);
13301360
}
1361
+ if( pRe ){
1362
+ @ <b>Only differences that match regular expression "%h(zRe)"
1363
+ @ are shown.</b>
1364
+ }
13311365
@ <hr />
13321366
@ <div class="%s(zStyle)">
13331367
@ %s(blob_str(&diff))
13341368
@ </div>
13351369
blob_reset(&diff);
13361370
--- src/info.c
+++ src/info.c
@@ -208,10 +208,12 @@
208 fossil_print("project-code: %s\n", db_get("project-code", ""));
209 vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
210 if( vid ){
211 show_common_info(vid, "checkout:", 1, 1);
212 }
 
 
213 }else{
214 int rid;
215 rid = name_to_rid(g.argv[2]);
216 if( rid==0 ){
217 fossil_panic("no such object: %s\n", g.argv[2]);
@@ -287,13 +289,18 @@
287 }
288 }
289
290
291 /*
292 ** Append the difference between two RIDs to the output
293 */
294 static void append_diff(const char *zFrom, const char *zTo, u64 diffFlags){
 
 
 
 
 
295 int fromid;
296 int toid;
297 Blob from, to, out;
298 if( zFrom ){
299 fromid = uuid_to_rid(zFrom, 0);
@@ -307,16 +314,16 @@
307 }else{
308 blob_zero(&to);
309 }
310 blob_zero(&out);
311 if( diffFlags & DIFF_SIDEBYSIDE ){
312 text_diff(&from, &to, &out, diffFlags | DIFF_HTML);
313 @ <div class="sbsdiff">
314 @ %s(blob_str(&out))
315 @ </div>
316 }else{
317 text_diff(&from, &to, &out, diffFlags | DIFF_LINENO | DIFF_HTML);
318 @ <div class="udiff">
319 @ %s(blob_str(&out))
320 @ </div>
321 }
322 blob_reset(&from);
@@ -333,10 +340,11 @@
333 const char *zName, /* Name of the file that has changed */
334 const char *zOld, /* blob.uuid before change. NULL for added files */
335 const char *zNew, /* blob.uuid after change. NULL for deletes */
336 const char *zOldName, /* Prior name. NULL if no name change. */
337 u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */
 
338 int mperm /* executable or symlink permission for zNew */
339 ){
340 if( !g.perm.Hyperlink ){
341 if( zNew==0 ){
342 @ <p>Deleted %h(zName)</p>
@@ -350,11 +358,11 @@
350 }else{
351 @ <p>Changes to %h(zName)</p>
352 }
353 if( diffFlags ){
354 @ <pre style="white-space:pre;">
355 append_diff(zOld, zNew, diffFlags);
356 @ </pre>
357 }
358 }else{
359 if( zOld && zNew ){
360 if( fossil_strcmp(zOld, zNew)!=0 ){
@@ -376,11 +384,11 @@
376 @ <p>Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
377 @ version %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a>
378 }
379 if( diffFlags ){
380 @ <pre style="white-space:pre;">
381 append_diff(zOld, zNew, diffFlags);
382 @ </pre>
383 }else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
384 @ &nbsp;&nbsp;
385 @ %z(href("%R/fdiff?v1=%S&v2=%S",zOld,zNew))[diff]</a>
386 }
@@ -444,10 +452,12 @@
444 int sideBySide; /* True for side-by-side diffs */
445 u64 diffFlags; /* Flag parameter for text_diff() */
446 const char *zName; /* Name of the checkin to be displayed */
447 const char *zUuid; /* UUID of zName */
448 const char *zParent; /* UUID of the parent checkin (if any) */
 
 
449
450 login_check_credentials();
451 if( !g.perm.Read ){ login_needed(); return; }
452 zName = P("name");
453 rid = name_to_rid_www("name");
@@ -455,10 +465,12 @@
455 style_header("Check-in Information Error");
456 @ No such object: %h(g.argv[2])
457 style_footer();
458 return;
459 }
 
 
460 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
461 zParent = db_text(0,
462 "SELECT uuid FROM plink, blob"
463 " WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
464 rid
@@ -692,10 +704,14 @@
692 @ show&nbsp;side-by-side&nbsp;diffs</a>
693 }
694 }
695 @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
696 @ patch</a></div>
 
 
 
 
697 db_prepare(&q,
698 "SELECT name,"
699 " mperm,"
700 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
701 " (SELECT uuid FROM blob WHERE rid=mlink.fid),"
@@ -712,11 +728,11 @@
712 const char *zName = db_column_text(&q,0);
713 int mperm = db_column_int(&q, 1);
714 const char *zOld = db_column_text(&q,2);
715 const char *zNew = db_column_text(&q,3);
716 const char *zOldName = db_column_text(&q, 4);
717 append_file_change_line(zName, zOld, zNew, zOldName, diffFlags, mperm);
718 }
719 db_finalize(&q);
720 }
721 style_footer();
722 }
@@ -935,15 +951,19 @@
935 Manifest *pFrom, *pTo;
936 ManifestFile *pFileFrom, *pFileTo;
937 const char *zBranch;
938 const char *zFrom;
939 const char *zTo;
 
 
940
941 login_check_credentials();
942 if( !g.perm.Read ){ login_needed(); return; }
943 login_anonymous_available();
944
 
 
945 zBranch = P("branch");
946 if( zBranch && zBranch[0] ){
947 cgi_replace_parameter("from", mprintf("root:%s", zBranch));
948 cgi_replace_parameter("to", zBranch);
949 }
@@ -971,11 +991,16 @@
971 style_header("Check-in Differences");
972 @ <h2>Difference From:</h2><blockquote>
973 checkin_description(ridFrom);
974 @ </blockquote><h2>To:</h2><blockquote>
975 checkin_description(ridTo);
976 @ </blockquote><hr /><p>
 
 
 
 
 
977
978 manifest_file_rewind(pFrom);
979 pFileFrom = manifest_file_next(pFrom, 0);
980 manifest_file_rewind(pTo);
981 pFileTo = manifest_file_next(pTo, 0);
@@ -989,25 +1014,25 @@
989 }else{
990 cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName);
991 }
992 if( cmp<0 ){
993 append_file_change_line(pFileFrom->zName,
994 pFileFrom->zUuid, 0, 0, diffFlags, 0);
995 pFileFrom = manifest_file_next(pFrom, 0);
996 }else if( cmp>0 ){
997 append_file_change_line(pFileTo->zName,
998 0, pFileTo->zUuid, 0, diffFlags,
999 manifest_file_mperm(pFileTo));
1000 pFileTo = manifest_file_next(pTo, 0);
1001 }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){
1002 /* No changes */
1003 pFileFrom = manifest_file_next(pFrom, 0);
1004 pFileTo = manifest_file_next(pTo, 0);
1005 }else{
1006 append_file_change_line(pFileFrom->zName,
1007 pFileFrom->zUuid,
1008 pFileTo->zUuid, 0, diffFlags,
1009 manifest_file_mperm(pFileTo));
1010 pFileFrom = manifest_file_next(pFrom, 0);
1011 pFileTo = manifest_file_next(pTo, 0);
1012 }
1013 }
@@ -1256,11 +1281,11 @@
1256 }
1257
1258
1259 /*
1260 ** WEBPAGE: fdiff
1261 ** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN
1262 **
1263 ** Two arguments, v1 and v2, identify the files to be diffed. Show the
1264 ** difference between the two artifacts. Show diff side by side unless sbs
1265 ** is 0. Generate plaintext if "patch" is present.
1266 */
@@ -1269,12 +1294,15 @@
1269 int isPatch;
1270 int sideBySide;
1271 Blob c1, c2, diff, *pOut;
1272 char *zV1;
1273 char *zV2;
 
 
1274 u64 diffFlags;
1275 const char *zStyle = "sbsdiff";
 
1276
1277 login_check_credentials();
1278 if( !g.perm.Read ){ login_needed(); return; }
1279 v1 = name_to_rid_www("v1");
1280 v2 = name_to_rid_www("v2");
@@ -1296,13 +1324,15 @@
1296 }else{
1297 diffFlags |= DIFF_LINENO;
1298 zStyle = "udiff";
1299 }
1300 }
 
 
1301 content_get(v1, &c1);
1302 content_get(v2, &c2);
1303 text_diff(&c1, &c2, pOut, diffFlags);
1304 blob_reset(&c1);
1305 blob_reset(&c2);
1306 if( !isPatch ){
1307 style_header("Diff");
1308 style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch",
@@ -1326,10 +1356,14 @@
1326 @ Artifact %z(href("%R/artifact/%S",zV1))[%S(zV1)]</a>:</h2>
1327 object_description(v1, 0, 0);
1328 @ <h2>To Artifact %z(href("%R/artifact/%S",zV2))[%S(zV2)]</a>:</h2>
1329 object_description(v2, 0, 0);
1330 }
 
 
 
 
1331 @ <hr />
1332 @ <div class="%s(zStyle)">
1333 @ %s(blob_str(&diff))
1334 @ </div>
1335 blob_reset(&diff);
1336
--- src/info.c
+++ src/info.c
@@ -208,10 +208,12 @@
208 fossil_print("project-code: %s\n", db_get("project-code", ""));
209 vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
210 if( vid ){
211 show_common_info(vid, "checkout:", 1, 1);
212 }
213 fossil_print("checkin-count: %d\n",
214 db_int(-1, "SELECT count(distinct mid) FROM mlink /*scan*/"));
215 }else{
216 int rid;
217 rid = name_to_rid(g.argv[2]);
218 if( rid==0 ){
219 fossil_panic("no such object: %s\n", g.argv[2]);
@@ -287,13 +289,18 @@
289 }
290 }
291
292
293 /*
294 ** Append the difference between artifacts to the output
295 */
296 static void append_diff(
297 const char *zFrom, /* Diff from this artifact */
298 const char *zTo, /* ... to this artifact */
299 u64 diffFlags, /* Diff formatting flags */
300 ReCompiled *pRe /* Only show change matching this regex */
301 ){
302 int fromid;
303 int toid;
304 Blob from, to, out;
305 if( zFrom ){
306 fromid = uuid_to_rid(zFrom, 0);
@@ -307,16 +314,16 @@
314 }else{
315 blob_zero(&to);
316 }
317 blob_zero(&out);
318 if( diffFlags & DIFF_SIDEBYSIDE ){
319 text_diff(&from, &to, &out, pRe, diffFlags | DIFF_HTML);
320 @ <div class="sbsdiff">
321 @ %s(blob_str(&out))
322 @ </div>
323 }else{
324 text_diff(&from, &to, &out, pRe, diffFlags | DIFF_LINENO | DIFF_HTML);
325 @ <div class="udiff">
326 @ %s(blob_str(&out))
327 @ </div>
328 }
329 blob_reset(&from);
@@ -333,10 +340,11 @@
340 const char *zName, /* Name of the file that has changed */
341 const char *zOld, /* blob.uuid before change. NULL for added files */
342 const char *zNew, /* blob.uuid after change. NULL for deletes */
343 const char *zOldName, /* Prior name. NULL if no name change. */
344 u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */
345 ReCompiled *pRe, /* Only show diffs that match this regex, if not NULL */
346 int mperm /* executable or symlink permission for zNew */
347 ){
348 if( !g.perm.Hyperlink ){
349 if( zNew==0 ){
350 @ <p>Deleted %h(zName)</p>
@@ -350,11 +358,11 @@
358 }else{
359 @ <p>Changes to %h(zName)</p>
360 }
361 if( diffFlags ){
362 @ <pre style="white-space:pre;">
363 append_diff(zOld, zNew, diffFlags, pRe);
364 @ </pre>
365 }
366 }else{
367 if( zOld && zNew ){
368 if( fossil_strcmp(zOld, zNew)!=0 ){
@@ -376,11 +384,11 @@
384 @ <p>Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
385 @ version %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a>
386 }
387 if( diffFlags ){
388 @ <pre style="white-space:pre;">
389 append_diff(zOld, zNew, diffFlags, pRe);
390 @ </pre>
391 }else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
392 @ &nbsp;&nbsp;
393 @ %z(href("%R/fdiff?v1=%S&v2=%S",zOld,zNew))[diff]</a>
394 }
@@ -444,10 +452,12 @@
452 int sideBySide; /* True for side-by-side diffs */
453 u64 diffFlags; /* Flag parameter for text_diff() */
454 const char *zName; /* Name of the checkin to be displayed */
455 const char *zUuid; /* UUID of zName */
456 const char *zParent; /* UUID of the parent checkin (if any) */
457 const char *zRe; /* regex parameter */
458 ReCompiled *pRe = 0; /* regex */
459
460 login_check_credentials();
461 if( !g.perm.Read ){ login_needed(); return; }
462 zName = P("name");
463 rid = name_to_rid_www("name");
@@ -455,10 +465,12 @@
465 style_header("Check-in Information Error");
466 @ No such object: %h(g.argv[2])
467 style_footer();
468 return;
469 }
470 zRe = P("regex");
471 if( zRe ) re_compile(&pRe, zRe, 0);
472 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
473 zParent = db_text(0,
474 "SELECT uuid FROM plink, blob"
475 " WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
476 rid
@@ -692,10 +704,14 @@
704 @ show&nbsp;side-by-side&nbsp;diffs</a>
705 }
706 }
707 @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
708 @ patch</a></div>
709 if( pRe ){
710 @ <p><b>Only differences that match regular expression "%h(zRe)"
711 @ are shown.</b></p>
712 }
713 db_prepare(&q,
714 "SELECT name,"
715 " mperm,"
716 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
717 " (SELECT uuid FROM blob WHERE rid=mlink.fid),"
@@ -712,11 +728,11 @@
728 const char *zName = db_column_text(&q,0);
729 int mperm = db_column_int(&q, 1);
730 const char *zOld = db_column_text(&q,2);
731 const char *zNew = db_column_text(&q,3);
732 const char *zOldName = db_column_text(&q, 4);
733 append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);
734 }
735 db_finalize(&q);
736 }
737 style_footer();
738 }
@@ -935,15 +951,19 @@
951 Manifest *pFrom, *pTo;
952 ManifestFile *pFileFrom, *pFileTo;
953 const char *zBranch;
954 const char *zFrom;
955 const char *zTo;
956 const char *zRe;
957 ReCompiled *pRe = 0;
958
959 login_check_credentials();
960 if( !g.perm.Read ){ login_needed(); return; }
961 login_anonymous_available();
962
963 zRe = P("regex");
964 if( zRe ) re_compile(&pRe, zRe, 0);
965 zBranch = P("branch");
966 if( zBranch && zBranch[0] ){
967 cgi_replace_parameter("from", mprintf("root:%s", zBranch));
968 cgi_replace_parameter("to", zBranch);
969 }
@@ -971,11 +991,16 @@
991 style_header("Check-in Differences");
992 @ <h2>Difference From:</h2><blockquote>
993 checkin_description(ridFrom);
994 @ </blockquote><h2>To:</h2><blockquote>
995 checkin_description(ridTo);
996 @ </blockquote>
997 if( pRe ){
998 @ <p><b>Only differences that match regular expression "%h(zRe)"
999 @ are shown.</b></p>
1000 }
1001 @<hr /><p>
1002
1003 manifest_file_rewind(pFrom);
1004 pFileFrom = manifest_file_next(pFrom, 0);
1005 manifest_file_rewind(pTo);
1006 pFileTo = manifest_file_next(pTo, 0);
@@ -989,25 +1014,25 @@
1014 }else{
1015 cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName);
1016 }
1017 if( cmp<0 ){
1018 append_file_change_line(pFileFrom->zName,
1019 pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0);
1020 pFileFrom = manifest_file_next(pFrom, 0);
1021 }else if( cmp>0 ){
1022 append_file_change_line(pFileTo->zName,
1023 0, pFileTo->zUuid, 0, diffFlags, pRe,
1024 manifest_file_mperm(pFileTo));
1025 pFileTo = manifest_file_next(pTo, 0);
1026 }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){
1027 /* No changes */
1028 pFileFrom = manifest_file_next(pFrom, 0);
1029 pFileTo = manifest_file_next(pTo, 0);
1030 }else{
1031 append_file_change_line(pFileFrom->zName,
1032 pFileFrom->zUuid,
1033 pFileTo->zUuid, 0, diffFlags, pRe,
1034 manifest_file_mperm(pFileTo));
1035 pFileFrom = manifest_file_next(pFrom, 0);
1036 pFileTo = manifest_file_next(pTo, 0);
1037 }
1038 }
@@ -1256,11 +1281,11 @@
1281 }
1282
1283
1284 /*
1285 ** WEBPAGE: fdiff
1286 ** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN&regex=REGEX
1287 **
1288 ** Two arguments, v1 and v2, identify the files to be diffed. Show the
1289 ** difference between the two artifacts. Show diff side by side unless sbs
1290 ** is 0. Generate plaintext if "patch" is present.
1291 */
@@ -1269,12 +1294,15 @@
1294 int isPatch;
1295 int sideBySide;
1296 Blob c1, c2, diff, *pOut;
1297 char *zV1;
1298 char *zV2;
1299 const char *zRe;
1300 ReCompiled *pRe = 0;
1301 u64 diffFlags;
1302 const char *zStyle = "sbsdiff";
1303 const char *zReErr = 0;
1304
1305 login_check_credentials();
1306 if( !g.perm.Read ){ login_needed(); return; }
1307 v1 = name_to_rid_www("v1");
1308 v2 = name_to_rid_www("v2");
@@ -1296,13 +1324,15 @@
1324 }else{
1325 diffFlags |= DIFF_LINENO;
1326 zStyle = "udiff";
1327 }
1328 }
1329 zRe = P("regex");
1330 if( zRe ) zReErr = re_compile(&pRe, zRe, 0);
1331 content_get(v1, &c1);
1332 content_get(v2, &c2);
1333 text_diff(&c1, &c2, pOut, pRe, diffFlags);
1334 blob_reset(&c1);
1335 blob_reset(&c2);
1336 if( !isPatch ){
1337 style_header("Diff");
1338 style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch",
@@ -1326,10 +1356,14 @@
1356 @ Artifact %z(href("%R/artifact/%S",zV1))[%S(zV1)]</a>:</h2>
1357 object_description(v1, 0, 0);
1358 @ <h2>To Artifact %z(href("%R/artifact/%S",zV2))[%S(zV2)]</a>:</h2>
1359 object_description(v2, 0, 0);
1360 }
1361 if( pRe ){
1362 @ <b>Only differences that match regular expression "%h(zRe)"
1363 @ are shown.</b>
1364 }
1365 @ <hr />
1366 @ <div class="%s(zStyle)">
1367 @ %s(blob_str(&diff))
1368 @ </div>
1369 blob_reset(&diff);
1370
+1 -1
--- src/json_diff.c
+++ src/json_diff.c
@@ -58,11 +58,11 @@
5858
return NULL;
5959
}
6060
content_get(fromid, &from);
6161
content_get(toid, &to);
6262
blob_zero(&out);
63
- text_diff(&from, &to, &out, flags);
63
+ text_diff(&from, &to, &out, 0, flags);
6464
blob_reset(&from);
6565
blob_reset(&to);
6666
outLen = blob_size(&out);
6767
if(outLen>=0){
6868
rc = cson_value_new_string(blob_buffer(&out),
6969
--- src/json_diff.c
+++ src/json_diff.c
@@ -58,11 +58,11 @@
58 return NULL;
59 }
60 content_get(fromid, &from);
61 content_get(toid, &to);
62 blob_zero(&out);
63 text_diff(&from, &to, &out, flags);
64 blob_reset(&from);
65 blob_reset(&to);
66 outLen = blob_size(&out);
67 if(outLen>=0){
68 rc = cson_value_new_string(blob_buffer(&out),
69
--- src/json_diff.c
+++ src/json_diff.c
@@ -58,11 +58,11 @@
58 return NULL;
59 }
60 content_get(fromid, &from);
61 content_get(toid, &to);
62 blob_zero(&out);
63 text_diff(&from, &to, &out, 0, flags);
64 blob_reset(&from);
65 blob_reset(&to);
66 outLen = blob_size(&out);
67 if(outLen>=0){
68 rc = cson_value_new_string(blob_buffer(&out),
69
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -90,11 +90,11 @@
9090
9191
/*
9292
** Return a pointer to a constant string that forms the basis
9393
** for a timeline query for the JSON interface.
9494
*/
95
-const char const * json_timeline_query(void){
95
+char const * json_timeline_query(void){
9696
/* Field order MUST match that from json_timeline_temp_table()!!! */
9797
static const char zBaseSql[] =
9898
@ SELECT
9999
@ NULL,
100100
@ blob.rid,
101101
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -90,11 +90,11 @@
90
91 /*
92 ** Return a pointer to a constant string that forms the basis
93 ** for a timeline query for the JSON interface.
94 */
95 const char const * json_timeline_query(void){
96 /* Field order MUST match that from json_timeline_temp_table()!!! */
97 static const char zBaseSql[] =
98 @ SELECT
99 @ NULL,
100 @ blob.rid,
101
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -90,11 +90,11 @@
90
91 /*
92 ** Return a pointer to a constant string that forms the basis
93 ** for a timeline query for the JSON interface.
94 */
95 char const * json_timeline_query(void){
96 /* Field order MUST match that from json_timeline_temp_table()!!! */
97 static const char zBaseSql[] =
98 @ SELECT
99 @ NULL,
100 @ blob.rid,
101
+1 -1
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -543,11 +543,11 @@
543543
blob_init(&w1, pW1->zWiki, -1);
544544
blob_zero(&w2);
545545
blob_init(&w2, pW2->zWiki, -1);
546546
blob_zero(&d);
547547
diffFlags = DIFF_IGNORE_EOLWS | DIFF_INLINE;
548
- text_diff(&w2, &w1, &d, diffFlags);
548
+ text_diff(&w2, &w1, &d, 0, diffFlags);
549549
blob_reset(&w1);
550550
blob_reset(&w2);
551551
552552
pay = cson_new_object();
553553
554554
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -543,11 +543,11 @@
543 blob_init(&w1, pW1->zWiki, -1);
544 blob_zero(&w2);
545 blob_init(&w2, pW2->zWiki, -1);
546 blob_zero(&d);
547 diffFlags = DIFF_IGNORE_EOLWS | DIFF_INLINE;
548 text_diff(&w2, &w1, &d, diffFlags);
549 blob_reset(&w1);
550 blob_reset(&w2);
551
552 pay = cson_new_object();
553
554
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -543,11 +543,11 @@
543 blob_init(&w1, pW1->zWiki, -1);
544 blob_zero(&w2);
545 blob_init(&w2, pW2->zWiki, -1);
546 blob_zero(&d);
547 diffFlags = DIFF_IGNORE_EOLWS | DIFF_INLINE;
548 text_diff(&w2, &w1, &d, 0, diffFlags);
549 blob_reset(&w1);
550 blob_reset(&w2);
551
552 pay = cson_new_object();
553
554
+2 -2
--- src/login.c
+++ src/login.c
@@ -397,11 +397,11 @@
397397
}
398398
if( memcmp(zAgent, "Mozilla/", 8)==0 ){
399399
if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */
400400
if( strglob("*Firefox/[1-9]*", zAgent) ) return 1;
401401
if( strglob("*Chrome/[1-9]*", zAgent) ) return 1;
402
- if( strglob("*(compatible;?MSIE?[1-9]*", zAgent) ) return 1;
402
+ if( strglob("*(compatible;?MSIE?[1789]*", zAgent) ) return 1;
403403
if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1;
404404
return 0;
405405
}
406406
if( memcmp(zAgent, "Opera/", 6)==0 ) return 1;
407407
if( memcmp(zAgent, "Safari/", 7)==0 ) return 1;
@@ -625,11 +625,11 @@
625625
@ <a href="%s(g.zTop)/register?g=%T(P("G"))">create one</a>.
626626
}
627627
if( zAnonPw ){
628628
unsigned int uSeed = captcha_seed();
629629
char const *zDecoded = captcha_decode(uSeed);
630
- int bAutoCaptcha = db_get_boolean("auto-captcha", 1);
630
+ int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
631631
char *zCaptcha = captcha_render(zDecoded);
632632
633633
@ <p><input type="hidden" name="cs" value="%u(uSeed)" />
634634
@ Visitors may enter <b>anonymous</b> as the user-ID with
635635
@ the 8-character hexadecimal password shown below:</p>
636636
--- src/login.c
+++ src/login.c
@@ -397,11 +397,11 @@
397 }
398 if( memcmp(zAgent, "Mozilla/", 8)==0 ){
399 if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */
400 if( strglob("*Firefox/[1-9]*", zAgent) ) return 1;
401 if( strglob("*Chrome/[1-9]*", zAgent) ) return 1;
402 if( strglob("*(compatible;?MSIE?[1-9]*", zAgent) ) return 1;
403 if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1;
404 return 0;
405 }
406 if( memcmp(zAgent, "Opera/", 6)==0 ) return 1;
407 if( memcmp(zAgent, "Safari/", 7)==0 ) return 1;
@@ -625,11 +625,11 @@
625 @ <a href="%s(g.zTop)/register?g=%T(P("G"))">create one</a>.
626 }
627 if( zAnonPw ){
628 unsigned int uSeed = captcha_seed();
629 char const *zDecoded = captcha_decode(uSeed);
630 int bAutoCaptcha = db_get_boolean("auto-captcha", 1);
631 char *zCaptcha = captcha_render(zDecoded);
632
633 @ <p><input type="hidden" name="cs" value="%u(uSeed)" />
634 @ Visitors may enter <b>anonymous</b> as the user-ID with
635 @ the 8-character hexadecimal password shown below:</p>
636
--- src/login.c
+++ src/login.c
@@ -397,11 +397,11 @@
397 }
398 if( memcmp(zAgent, "Mozilla/", 8)==0 ){
399 if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */
400 if( strglob("*Firefox/[1-9]*", zAgent) ) return 1;
401 if( strglob("*Chrome/[1-9]*", zAgent) ) return 1;
402 if( strglob("*(compatible;?MSIE?[1789]*", zAgent) ) return 1;
403 if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1;
404 return 0;
405 }
406 if( memcmp(zAgent, "Opera/", 6)==0 ) return 1;
407 if( memcmp(zAgent, "Safari/", 7)==0 ) return 1;
@@ -625,11 +625,11 @@
625 @ <a href="%s(g.zTop)/register?g=%T(P("G"))">create one</a>.
626 }
627 if( zAnonPw ){
628 unsigned int uSeed = captcha_seed();
629 char const *zDecoded = captcha_decode(uSeed);
630 int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
631 char *zCaptcha = captcha_render(zDecoded);
632
633 @ <p><input type="hidden" name="cs" value="%u(uSeed)" />
634 @ Visitors may enter <b>anonymous</b> as the user-ID with
635 @ the 8-character hexadecimal password shown below:</p>
636
+14 -26
--- src/main.c
+++ src/main.c
@@ -605,14 +605,11 @@
605605
if( g.cgiOutput && once ){
606606
once = 0;
607607
cgi_printf("<p class=\"generalError\">%h</p>", z);
608608
cgi_reply();
609609
}else if( !g.fQuiet ){
610
- char *zOut = mprintf("%s: %s\n", g.argv[0], z);
611
- fossil_force_newline();
612
- fossil_puts(zOut, 1);
613
- fossil_free(zOut);
610
+ fossil_trace("%s: %s\n", g.argv[0], z);
614611
}
615612
}
616613
free(z);
617614
db_force_rollback();
618615
fossil_exit(rc);
@@ -636,17 +633,14 @@
636633
else
637634
#endif
638635
{
639636
if( g.cgiOutput ){
640637
g.cgiOutput = 0;
641
- cgi_printf("<p class=\"generalError\">%h</p>", z);
638
+ cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);
642639
cgi_reply();
643640
}else if( !g.fQuiet ){
644
- char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
645
- fossil_force_newline();
646
- fossil_puts(zOut, 1);
647
- fossil_free(zOut);
641
+ fossil_trace("%s: %s\n", g.argv[0], z);
648642
}
649643
}
650644
free(z);
651645
db_force_rollback();
652646
fossil_exit(rc);
@@ -679,17 +673,14 @@
679673
} else
680674
#endif
681675
{
682676
if( g.cgiOutput ){
683677
g.cgiOutput = 0;
684
- cgi_printf("<p class=\"generalError\">%h</p>", z);
678
+ cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);
685679
cgi_reply();
686680
}else{
687
- char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
688
- fossil_force_newline();
689
- fossil_puts(zOut, 1);
690
- fossil_free(zOut);
681
+ fossil_trace("%s: %s\n", g.argv[0], z);
691682
}
692683
}
693684
db_force_rollback();
694685
fossil_exit(rc);
695686
}
@@ -707,16 +698,13 @@
707698
json_warn( FSL_JSON_W_UNKNOWN, z );
708699
}else
709700
#endif
710701
{
711702
if( g.cgiOutput ){
712
- cgi_printf("<p class=\"generalError\">%h</p>", z);
703
+ cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);
713704
}else{
714
- char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
715
- fossil_force_newline();
716
- fossil_puts(zOut, 1);
717
- fossil_free(zOut);
705
+ fossil_trace("%s: %s\n", g.argv[0], z);
718706
}
719707
}
720708
free(z);
721709
}
722710
@@ -747,13 +735,11 @@
747735
** Who knows why - this is just the way windows works.
748736
*/
749737
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
750738
WCHAR *zUnicode = fossil_utf8_to_unicode(zNewCmd);
751739
if( g.fSystemTrace ) {
752
- char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);
753
- fossil_puts(zOut, 1);
754
- fossil_free(zOut);
740
+ fossil_trace("SYSTEM: %s\n", zNewCmd);
755741
}
756742
rc = _wsystem(zUnicode);
757743
fossil_unicode_free(zUnicode);
758744
free(zNewCmd);
759745
#else
@@ -1225,15 +1211,17 @@
12251211
}
12261212
zRepo = "/";
12271213
}else{
12281214
for(i=strlen(zDir)-1; i>0 && zDir[i]!='/'; i--){}
12291215
if( zDir[i]!='/' ) fossil_panic("bad repository name: %s", zRepo);
1230
- zDir[i] = 0;
1231
- if( chdir(zDir) || chroot(zDir) || chdir("/") ){
1232
- fossil_fatal("unable to chroot into %s", zDir);
1216
+ if( i>0 ){
1217
+ zDir[i] = 0;
1218
+ if( chdir(zDir) || chroot(zDir) || chdir("/") ){
1219
+ fossil_fatal("unable to chroot into %s", zDir);
1220
+ }
1221
+ zDir[i] = '/';
12331222
}
1234
- zDir[i] = '/';
12351223
zRepo = &zDir[i];
12361224
}
12371225
if( stat(zRepo, &sStat)!=0 ){
12381226
fossil_fatal("cannot stat() repository: %s", zRepo);
12391227
}
12401228
--- src/main.c
+++ src/main.c
@@ -605,14 +605,11 @@
605 if( g.cgiOutput && once ){
606 once = 0;
607 cgi_printf("<p class=\"generalError\">%h</p>", z);
608 cgi_reply();
609 }else if( !g.fQuiet ){
610 char *zOut = mprintf("%s: %s\n", g.argv[0], z);
611 fossil_force_newline();
612 fossil_puts(zOut, 1);
613 fossil_free(zOut);
614 }
615 }
616 free(z);
617 db_force_rollback();
618 fossil_exit(rc);
@@ -636,17 +633,14 @@
636 else
637 #endif
638 {
639 if( g.cgiOutput ){
640 g.cgiOutput = 0;
641 cgi_printf("<p class=\"generalError\">%h</p>", z);
642 cgi_reply();
643 }else if( !g.fQuiet ){
644 char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
645 fossil_force_newline();
646 fossil_puts(zOut, 1);
647 fossil_free(zOut);
648 }
649 }
650 free(z);
651 db_force_rollback();
652 fossil_exit(rc);
@@ -679,17 +673,14 @@
679 } else
680 #endif
681 {
682 if( g.cgiOutput ){
683 g.cgiOutput = 0;
684 cgi_printf("<p class=\"generalError\">%h</p>", z);
685 cgi_reply();
686 }else{
687 char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
688 fossil_force_newline();
689 fossil_puts(zOut, 1);
690 fossil_free(zOut);
691 }
692 }
693 db_force_rollback();
694 fossil_exit(rc);
695 }
@@ -707,16 +698,13 @@
707 json_warn( FSL_JSON_W_UNKNOWN, z );
708 }else
709 #endif
710 {
711 if( g.cgiOutput ){
712 cgi_printf("<p class=\"generalError\">%h</p>", z);
713 }else{
714 char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
715 fossil_force_newline();
716 fossil_puts(zOut, 1);
717 fossil_free(zOut);
718 }
719 }
720 free(z);
721 }
722
@@ -747,13 +735,11 @@
747 ** Who knows why - this is just the way windows works.
748 */
749 char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
750 WCHAR *zUnicode = fossil_utf8_to_unicode(zNewCmd);
751 if( g.fSystemTrace ) {
752 char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);
753 fossil_puts(zOut, 1);
754 fossil_free(zOut);
755 }
756 rc = _wsystem(zUnicode);
757 fossil_unicode_free(zUnicode);
758 free(zNewCmd);
759 #else
@@ -1225,15 +1211,17 @@
1225 }
1226 zRepo = "/";
1227 }else{
1228 for(i=strlen(zDir)-1; i>0 && zDir[i]!='/'; i--){}
1229 if( zDir[i]!='/' ) fossil_panic("bad repository name: %s", zRepo);
1230 zDir[i] = 0;
1231 if( chdir(zDir) || chroot(zDir) || chdir("/") ){
1232 fossil_fatal("unable to chroot into %s", zDir);
 
 
 
1233 }
1234 zDir[i] = '/';
1235 zRepo = &zDir[i];
1236 }
1237 if( stat(zRepo, &sStat)!=0 ){
1238 fossil_fatal("cannot stat() repository: %s", zRepo);
1239 }
1240
--- src/main.c
+++ src/main.c
@@ -605,14 +605,11 @@
605 if( g.cgiOutput && once ){
606 once = 0;
607 cgi_printf("<p class=\"generalError\">%h</p>", z);
608 cgi_reply();
609 }else if( !g.fQuiet ){
610 fossil_trace("%s: %s\n", g.argv[0], z);
 
 
 
611 }
612 }
613 free(z);
614 db_force_rollback();
615 fossil_exit(rc);
@@ -636,17 +633,14 @@
633 else
634 #endif
635 {
636 if( g.cgiOutput ){
637 g.cgiOutput = 0;
638 cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);
639 cgi_reply();
640 }else if( !g.fQuiet ){
641 fossil_trace("%s: %s\n", g.argv[0], z);
 
 
 
642 }
643 }
644 free(z);
645 db_force_rollback();
646 fossil_exit(rc);
@@ -679,17 +673,14 @@
673 } else
674 #endif
675 {
676 if( g.cgiOutput ){
677 g.cgiOutput = 0;
678 cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);
679 cgi_reply();
680 }else{
681 fossil_trace("%s: %s\n", g.argv[0], z);
 
 
 
682 }
683 }
684 db_force_rollback();
685 fossil_exit(rc);
686 }
@@ -707,16 +698,13 @@
698 json_warn( FSL_JSON_W_UNKNOWN, z );
699 }else
700 #endif
701 {
702 if( g.cgiOutput ){
703 cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z);
704 }else{
705 fossil_trace("%s: %s\n", g.argv[0], z);
 
 
 
706 }
707 }
708 free(z);
709 }
710
@@ -747,13 +735,11 @@
735 ** Who knows why - this is just the way windows works.
736 */
737 char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
738 WCHAR *zUnicode = fossil_utf8_to_unicode(zNewCmd);
739 if( g.fSystemTrace ) {
740 fossil_trace("SYSTEM: %s\n", zNewCmd);
 
 
741 }
742 rc = _wsystem(zUnicode);
743 fossil_unicode_free(zUnicode);
744 free(zNewCmd);
745 #else
@@ -1225,15 +1211,17 @@
1211 }
1212 zRepo = "/";
1213 }else{
1214 for(i=strlen(zDir)-1; i>0 && zDir[i]!='/'; i--){}
1215 if( zDir[i]!='/' ) fossil_panic("bad repository name: %s", zRepo);
1216 if( i>0 ){
1217 zDir[i] = 0;
1218 if( chdir(zDir) || chroot(zDir) || chdir("/") ){
1219 fossil_fatal("unable to chroot into %s", zDir);
1220 }
1221 zDir[i] = '/';
1222 }
 
1223 zRepo = &zDir[i];
1224 }
1225 if( stat(zRepo, &sStat)!=0 ){
1226 fossil_fatal("cannot stat() repository: %s", zRepo);
1227 }
1228
+21 -1
--- src/main.mk
+++ src/main.mk
@@ -81,10 +81,11 @@
8181
$(SRCDIR)/pivot.c \
8282
$(SRCDIR)/popen.c \
8383
$(SRCDIR)/pqueue.c \
8484
$(SRCDIR)/printf.c \
8585
$(SRCDIR)/rebuild.c \
86
+ $(SRCDIR)/regexp.c \
8687
$(SRCDIR)/report.c \
8788
$(SRCDIR)/rss.c \
8889
$(SRCDIR)/schema.c \
8990
$(SRCDIR)/search.c \
9091
$(SRCDIR)/setup.c \
@@ -101,10 +102,11 @@
101102
$(SRCDIR)/th_main.c \
102103
$(SRCDIR)/timeline.c \
103104
$(SRCDIR)/tkt.c \
104105
$(SRCDIR)/tktsetup.c \
105106
$(SRCDIR)/undo.c \
107
+ $(SRCDIR)/unicode.c \
106108
$(SRCDIR)/update.c \
107109
$(SRCDIR)/url.c \
108110
$(SRCDIR)/user.c \
109111
$(SRCDIR)/utf8.c \
110112
$(SRCDIR)/verify.c \
@@ -185,10 +187,11 @@
185187
$(OBJDIR)/pivot_.c \
186188
$(OBJDIR)/popen_.c \
187189
$(OBJDIR)/pqueue_.c \
188190
$(OBJDIR)/printf_.c \
189191
$(OBJDIR)/rebuild_.c \
192
+ $(OBJDIR)/regexp_.c \
190193
$(OBJDIR)/report_.c \
191194
$(OBJDIR)/rss_.c \
192195
$(OBJDIR)/schema_.c \
193196
$(OBJDIR)/search_.c \
194197
$(OBJDIR)/setup_.c \
@@ -205,10 +208,11 @@
205208
$(OBJDIR)/th_main_.c \
206209
$(OBJDIR)/timeline_.c \
207210
$(OBJDIR)/tkt_.c \
208211
$(OBJDIR)/tktsetup_.c \
209212
$(OBJDIR)/undo_.c \
213
+ $(OBJDIR)/unicode_.c \
210214
$(OBJDIR)/update_.c \
211215
$(OBJDIR)/url_.c \
212216
$(OBJDIR)/user_.c \
213217
$(OBJDIR)/utf8_.c \
214218
$(OBJDIR)/verify_.c \
@@ -289,10 +293,11 @@
289293
$(OBJDIR)/pivot.o \
290294
$(OBJDIR)/popen.o \
291295
$(OBJDIR)/pqueue.o \
292296
$(OBJDIR)/printf.o \
293297
$(OBJDIR)/rebuild.o \
298
+ $(OBJDIR)/regexp.o \
294299
$(OBJDIR)/report.o \
295300
$(OBJDIR)/rss.o \
296301
$(OBJDIR)/schema.o \
297302
$(OBJDIR)/search.o \
298303
$(OBJDIR)/setup.o \
@@ -309,10 +314,11 @@
309314
$(OBJDIR)/th_main.o \
310315
$(OBJDIR)/timeline.o \
311316
$(OBJDIR)/tkt.o \
312317
$(OBJDIR)/tktsetup.o \
313318
$(OBJDIR)/undo.o \
319
+ $(OBJDIR)/unicode.o \
314320
$(OBJDIR)/update.o \
315321
$(OBJDIR)/url.o \
316322
$(OBJDIR)/user.o \
317323
$(OBJDIR)/utf8.o \
318324
$(OBJDIR)/verify.o \
@@ -390,11 +396,11 @@
390396
391397
392398
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
393399
$(OBJDIR)/mkindex $(TRANS_SRC) >$@
394400
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
395
- $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
401
+ $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
396402
touch $(OBJDIR)/headers
397403
$(OBJDIR)/headers: Makefile
398404
$(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_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
399405
Makefile:
400406
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -878,10 +884,17 @@
878884
879885
$(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
880886
$(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
881887
882888
$(OBJDIR)/rebuild.h: $(OBJDIR)/headers
889
+$(OBJDIR)/regexp_.c: $(SRCDIR)/regexp.c $(OBJDIR)/translate
890
+ $(OBJDIR)/translate $(SRCDIR)/regexp.c >$(OBJDIR)/regexp_.c
891
+
892
+$(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
893
+ $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
894
+
895
+$(OBJDIR)/regexp.h: $(OBJDIR)/headers
883896
$(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
884897
$(OBJDIR)/translate $(SRCDIR)/report.c >$(OBJDIR)/report_.c
885898
886899
$(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
887900
$(XTCC) -o $(OBJDIR)/report.o -c $(OBJDIR)/report_.c
@@ -1018,10 +1031,17 @@
10181031
10191032
$(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
10201033
$(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
10211034
10221035
$(OBJDIR)/undo.h: $(OBJDIR)/headers
1036
+$(OBJDIR)/unicode_.c: $(SRCDIR)/unicode.c $(OBJDIR)/translate
1037
+ $(OBJDIR)/translate $(SRCDIR)/unicode.c >$(OBJDIR)/unicode_.c
1038
+
1039
+$(OBJDIR)/unicode.o: $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h $(SRCDIR)/config.h
1040
+ $(XTCC) -o $(OBJDIR)/unicode.o -c $(OBJDIR)/unicode_.c
1041
+
1042
+$(OBJDIR)/unicode.h: $(OBJDIR)/headers
10231043
$(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
10241044
$(OBJDIR)/translate $(SRCDIR)/update.c >$(OBJDIR)/update_.c
10251045
10261046
$(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
10271047
$(XTCC) -o $(OBJDIR)/update.o -c $(OBJDIR)/update_.c
10281048
--- src/main.mk
+++ src/main.mk
@@ -81,10 +81,11 @@
81 $(SRCDIR)/pivot.c \
82 $(SRCDIR)/popen.c \
83 $(SRCDIR)/pqueue.c \
84 $(SRCDIR)/printf.c \
85 $(SRCDIR)/rebuild.c \
 
86 $(SRCDIR)/report.c \
87 $(SRCDIR)/rss.c \
88 $(SRCDIR)/schema.c \
89 $(SRCDIR)/search.c \
90 $(SRCDIR)/setup.c \
@@ -101,10 +102,11 @@
101 $(SRCDIR)/th_main.c \
102 $(SRCDIR)/timeline.c \
103 $(SRCDIR)/tkt.c \
104 $(SRCDIR)/tktsetup.c \
105 $(SRCDIR)/undo.c \
 
106 $(SRCDIR)/update.c \
107 $(SRCDIR)/url.c \
108 $(SRCDIR)/user.c \
109 $(SRCDIR)/utf8.c \
110 $(SRCDIR)/verify.c \
@@ -185,10 +187,11 @@
185 $(OBJDIR)/pivot_.c \
186 $(OBJDIR)/popen_.c \
187 $(OBJDIR)/pqueue_.c \
188 $(OBJDIR)/printf_.c \
189 $(OBJDIR)/rebuild_.c \
 
190 $(OBJDIR)/report_.c \
191 $(OBJDIR)/rss_.c \
192 $(OBJDIR)/schema_.c \
193 $(OBJDIR)/search_.c \
194 $(OBJDIR)/setup_.c \
@@ -205,10 +208,11 @@
205 $(OBJDIR)/th_main_.c \
206 $(OBJDIR)/timeline_.c \
207 $(OBJDIR)/tkt_.c \
208 $(OBJDIR)/tktsetup_.c \
209 $(OBJDIR)/undo_.c \
 
210 $(OBJDIR)/update_.c \
211 $(OBJDIR)/url_.c \
212 $(OBJDIR)/user_.c \
213 $(OBJDIR)/utf8_.c \
214 $(OBJDIR)/verify_.c \
@@ -289,10 +293,11 @@
289 $(OBJDIR)/pivot.o \
290 $(OBJDIR)/popen.o \
291 $(OBJDIR)/pqueue.o \
292 $(OBJDIR)/printf.o \
293 $(OBJDIR)/rebuild.o \
 
294 $(OBJDIR)/report.o \
295 $(OBJDIR)/rss.o \
296 $(OBJDIR)/schema.o \
297 $(OBJDIR)/search.o \
298 $(OBJDIR)/setup.o \
@@ -309,10 +314,11 @@
309 $(OBJDIR)/th_main.o \
310 $(OBJDIR)/timeline.o \
311 $(OBJDIR)/tkt.o \
312 $(OBJDIR)/tktsetup.o \
313 $(OBJDIR)/undo.o \
 
314 $(OBJDIR)/update.o \
315 $(OBJDIR)/url.o \
316 $(OBJDIR)/user.o \
317 $(OBJDIR)/utf8.o \
318 $(OBJDIR)/verify.o \
@@ -390,11 +396,11 @@
390
391
392 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
393 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
394 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
395 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
396 touch $(OBJDIR)/headers
397 $(OBJDIR)/headers: Makefile
398 $(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_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
399 Makefile:
400 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -878,10 +884,17 @@
878
879 $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
880 $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
881
882 $(OBJDIR)/rebuild.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
883 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
884 $(OBJDIR)/translate $(SRCDIR)/report.c >$(OBJDIR)/report_.c
885
886 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
887 $(XTCC) -o $(OBJDIR)/report.o -c $(OBJDIR)/report_.c
@@ -1018,10 +1031,17 @@
1018
1019 $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
1020 $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
1021
1022 $(OBJDIR)/undo.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
1023 $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
1024 $(OBJDIR)/translate $(SRCDIR)/update.c >$(OBJDIR)/update_.c
1025
1026 $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
1027 $(XTCC) -o $(OBJDIR)/update.o -c $(OBJDIR)/update_.c
1028
--- src/main.mk
+++ src/main.mk
@@ -81,10 +81,11 @@
81 $(SRCDIR)/pivot.c \
82 $(SRCDIR)/popen.c \
83 $(SRCDIR)/pqueue.c \
84 $(SRCDIR)/printf.c \
85 $(SRCDIR)/rebuild.c \
86 $(SRCDIR)/regexp.c \
87 $(SRCDIR)/report.c \
88 $(SRCDIR)/rss.c \
89 $(SRCDIR)/schema.c \
90 $(SRCDIR)/search.c \
91 $(SRCDIR)/setup.c \
@@ -101,10 +102,11 @@
102 $(SRCDIR)/th_main.c \
103 $(SRCDIR)/timeline.c \
104 $(SRCDIR)/tkt.c \
105 $(SRCDIR)/tktsetup.c \
106 $(SRCDIR)/undo.c \
107 $(SRCDIR)/unicode.c \
108 $(SRCDIR)/update.c \
109 $(SRCDIR)/url.c \
110 $(SRCDIR)/user.c \
111 $(SRCDIR)/utf8.c \
112 $(SRCDIR)/verify.c \
@@ -185,10 +187,11 @@
187 $(OBJDIR)/pivot_.c \
188 $(OBJDIR)/popen_.c \
189 $(OBJDIR)/pqueue_.c \
190 $(OBJDIR)/printf_.c \
191 $(OBJDIR)/rebuild_.c \
192 $(OBJDIR)/regexp_.c \
193 $(OBJDIR)/report_.c \
194 $(OBJDIR)/rss_.c \
195 $(OBJDIR)/schema_.c \
196 $(OBJDIR)/search_.c \
197 $(OBJDIR)/setup_.c \
@@ -205,10 +208,11 @@
208 $(OBJDIR)/th_main_.c \
209 $(OBJDIR)/timeline_.c \
210 $(OBJDIR)/tkt_.c \
211 $(OBJDIR)/tktsetup_.c \
212 $(OBJDIR)/undo_.c \
213 $(OBJDIR)/unicode_.c \
214 $(OBJDIR)/update_.c \
215 $(OBJDIR)/url_.c \
216 $(OBJDIR)/user_.c \
217 $(OBJDIR)/utf8_.c \
218 $(OBJDIR)/verify_.c \
@@ -289,10 +293,11 @@
293 $(OBJDIR)/pivot.o \
294 $(OBJDIR)/popen.o \
295 $(OBJDIR)/pqueue.o \
296 $(OBJDIR)/printf.o \
297 $(OBJDIR)/rebuild.o \
298 $(OBJDIR)/regexp.o \
299 $(OBJDIR)/report.o \
300 $(OBJDIR)/rss.o \
301 $(OBJDIR)/schema.o \
302 $(OBJDIR)/search.o \
303 $(OBJDIR)/setup.o \
@@ -309,10 +314,11 @@
314 $(OBJDIR)/th_main.o \
315 $(OBJDIR)/timeline.o \
316 $(OBJDIR)/tkt.o \
317 $(OBJDIR)/tktsetup.o \
318 $(OBJDIR)/undo.o \
319 $(OBJDIR)/unicode.o \
320 $(OBJDIR)/update.o \
321 $(OBJDIR)/url.o \
322 $(OBJDIR)/user.o \
323 $(OBJDIR)/utf8.o \
324 $(OBJDIR)/verify.o \
@@ -390,11 +396,11 @@
396
397
398 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
399 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
400 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
401 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
402 touch $(OBJDIR)/headers
403 $(OBJDIR)/headers: Makefile
404 $(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_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
405 Makefile:
406 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -878,10 +884,17 @@
884
885 $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
886 $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
887
888 $(OBJDIR)/rebuild.h: $(OBJDIR)/headers
889 $(OBJDIR)/regexp_.c: $(SRCDIR)/regexp.c $(OBJDIR)/translate
890 $(OBJDIR)/translate $(SRCDIR)/regexp.c >$(OBJDIR)/regexp_.c
891
892 $(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
893 $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
894
895 $(OBJDIR)/regexp.h: $(OBJDIR)/headers
896 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
897 $(OBJDIR)/translate $(SRCDIR)/report.c >$(OBJDIR)/report_.c
898
899 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
900 $(XTCC) -o $(OBJDIR)/report.o -c $(OBJDIR)/report_.c
@@ -1018,10 +1031,17 @@
1031
1032 $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
1033 $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
1034
1035 $(OBJDIR)/undo.h: $(OBJDIR)/headers
1036 $(OBJDIR)/unicode_.c: $(SRCDIR)/unicode.c $(OBJDIR)/translate
1037 $(OBJDIR)/translate $(SRCDIR)/unicode.c >$(OBJDIR)/unicode_.c
1038
1039 $(OBJDIR)/unicode.o: $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h $(SRCDIR)/config.h
1040 $(XTCC) -o $(OBJDIR)/unicode.o -c $(OBJDIR)/unicode_.c
1041
1042 $(OBJDIR)/unicode.h: $(OBJDIR)/headers
1043 $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
1044 $(OBJDIR)/translate $(SRCDIR)/update.c >$(OBJDIR)/update_.c
1045
1046 $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
1047 $(XTCC) -o $(OBJDIR)/update.o -c $(OBJDIR)/update_.c
1048
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -84,10 +84,11 @@
8484
pivot
8585
popen
8686
pqueue
8787
printf
8888
rebuild
89
+ regexp
8990
report
9091
rss
9192
schema
9293
search
9394
setup
@@ -104,10 +105,11 @@
104105
th_main
105106
timeline
106107
tkt
107108
tktsetup
108109
undo
110
+ unicode
109111
update
110112
url
111113
user
112114
utf8
113115
verify
114116
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -84,10 +84,11 @@
84 pivot
85 popen
86 pqueue
87 printf
88 rebuild
 
89 report
90 rss
91 schema
92 search
93 setup
@@ -104,10 +105,11 @@
104 th_main
105 timeline
106 tkt
107 tktsetup
108 undo
 
109 update
110 url
111 user
112 utf8
113 verify
114
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -84,10 +84,11 @@
84 pivot
85 popen
86 pqueue
87 printf
88 rebuild
89 regexp
90 report
91 rss
92 schema
93 search
94 setup
@@ -104,10 +105,11 @@
105 th_main
106 timeline
107 tkt
108 tktsetup
109 undo
110 unicode
111 update
112 url
113 user
114 utf8
115 verify
116
+2 -2
--- src/merge3.c
+++ src/merge3.c
@@ -175,12 +175,12 @@
175175
** is the number of lines of text to copy directly from the pivot,
176176
** the second integer is the number of lines of text to omit from the
177177
** pivot, and the third integer is the number of lines of text that are
178178
** inserted. The edit array ends with a triple of 0,0,0.
179179
*/
180
- aC1 = text_diff(pPivot, pV1, 0, 0);
181
- aC2 = text_diff(pPivot, pV2, 0, 0);
180
+ aC1 = text_diff(pPivot, pV1, 0, 0, 0);
181
+ aC2 = text_diff(pPivot, pV2, 0, 0, 0);
182182
if( aC1==0 || aC2==0 ){
183183
free(aC1);
184184
free(aC2);
185185
return -1;
186186
}
187187
--- src/merge3.c
+++ src/merge3.c
@@ -175,12 +175,12 @@
175 ** is the number of lines of text to copy directly from the pivot,
176 ** the second integer is the number of lines of text to omit from the
177 ** pivot, and the third integer is the number of lines of text that are
178 ** inserted. The edit array ends with a triple of 0,0,0.
179 */
180 aC1 = text_diff(pPivot, pV1, 0, 0);
181 aC2 = text_diff(pPivot, pV2, 0, 0);
182 if( aC1==0 || aC2==0 ){
183 free(aC1);
184 free(aC2);
185 return -1;
186 }
187
--- src/merge3.c
+++ src/merge3.c
@@ -175,12 +175,12 @@
175 ** is the number of lines of text to copy directly from the pivot,
176 ** the second integer is the number of lines of text to omit from the
177 ** pivot, and the third integer is the number of lines of text that are
178 ** inserted. The edit array ends with a triple of 0,0,0.
179 */
180 aC1 = text_diff(pPivot, pV1, 0, 0, 0);
181 aC2 = text_diff(pPivot, pV2, 0, 0, 0);
182 if( aC1==0 || aC2==0 ){
183 free(aC1);
184 free(aC2);
185 return -1;
186 }
187
+15
--- src/printf.c
+++ src/printf.c
@@ -871,10 +871,25 @@
871871
Blob b = empty_blob;
872872
vxprintf(&b, zFormat, ap);
873873
fossil_puts(blob_str(&b), 0);
874874
blob_reset(&b);
875875
}
876
+ va_end(ap);
877
+}
878
+
879
+/*
880
+** Print a trace message on standard error.
881
+*/
882
+void fossil_trace(const char *zFormat, ...){
883
+ va_list ap;
884
+ Blob b;
885
+ va_start(ap, zFormat);
886
+ b = empty_blob;
887
+ vxprintf(&b, zFormat, ap);
888
+ fossil_puts(blob_str(&b), 1);
889
+ blob_reset(&b);
890
+ va_end(ap);
876891
}
877892
878893
/*
879894
** Like strcmp() except that it accepts NULL pointers. NULL sorts before
880895
** all non-NULL string pointers. Also, this strcmp() is a binary comparison
881896
882897
ADDED src/regexp.c
--- src/printf.c
+++ src/printf.c
@@ -871,10 +871,25 @@
871 Blob b = empty_blob;
872 vxprintf(&b, zFormat, ap);
873 fossil_puts(blob_str(&b), 0);
874 blob_reset(&b);
875 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876 }
877
878 /*
879 ** Like strcmp() except that it accepts NULL pointers. NULL sorts before
880 ** all non-NULL string pointers. Also, this strcmp() is a binary comparison
881
882 DDED src/regexp.c
--- src/printf.c
+++ src/printf.c
@@ -871,10 +871,25 @@
871 Blob b = empty_blob;
872 vxprintf(&b, zFormat, ap);
873 fossil_puts(blob_str(&b), 0);
874 blob_reset(&b);
875 }
876 va_end(ap);
877 }
878
879 /*
880 ** Print a trace message on standard error.
881 */
882 void fossil_trace(const char *zFormat, ...){
883 va_list ap;
884 Blob b;
885 va_start(ap, zFormat);
886 b = empty_blob;
887 vxprintf(&b, zFormat, ap);
888 fossil_puts(blob_str(&b), 1);
889 blob_reset(&b);
890 va_end(ap);
891 }
892
893 /*
894 ** Like strcmp() except that it accepts NULL pointers. NULL sorts before
895 ** all non-NULL string pointers. Also, this strcmp() is a binary comparison
896
897 DDED src/regexp.c
+55
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -0,0 +1,55 @@
1
+/*
2
+** Co#ifndef SQL(sizeof(aSp*
3
+** Co#ifndef SQLITE_MAX_REGEXP_REPEAT
4
+# define SQLITE_MAX_REGEXP_REPEAT 999
5
+#endifcharacter3CC_INC>0 &&ute a reasonable limit on the length of the REGEXP NFA.
6
+*/
7
+int re_maxlen(void){
8
+ return 1000) : 1000;
9
+}re_maxlen(), noCase) Co0);
10
+ /, 0 <= p,q <= 999*
11
+** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
12
+** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
13
+*/
14
+static void grepprintfREPEAT
15
+# define SQLITE_MAX_REGEXP_REPEAT 999
16
+#endifcharacter3CC_INC>0 &&ute a reasonable limit on the length of the REGEXP NFA.
17
+*/
18
+int re_maxlen(void){
19
+ return 1000) : 1000;
20
+}re_maxlen(), noCase) Co0);
21
+ /, 0 <= p,q <= 999*
22
+** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
23
+** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
24
+*/
25
+static void grepprintf har const
26
+ int argc, resqlite3char zInit[12];
27
+** Co#ifnde** Co#ifndef SQLITE_MAX_REGEXP_REPEAT
28
+# define SQLITE_MAX_REGEXP_REPEAT 999
29
+#endifcharacter3CC_INC>0 &&ute a reasonable limit on the length of the REGEXP NFA.
30
+*/
31
+int re_maxlen(void){
32
+ return 1000) : 1000;
33
+}re_maxlen(), noCase) Co0);
34
+ /, 0 <= p,q <= 999*
35
+** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
36
+** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
37
+*/
38
+static void grepprintfREPEAT
39
+# define SQLITE_MAX_REGEXP_REPEAT 999
40
+#endifcharacter3CC_INC>0 &&ute a reasonable limit on X Where XXX is any number ofn the length of the REGEXP NF
41
+ return 1000) : 1000;
42
+}re_maxlen(), noCase) Co0);
43
+ /, 0 <= p,q <= 999*
44
+** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
45
+** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
46
+*/
47
+static void grepprintf har const
48
+ int argc, resqlite3 strncmp(zIn+in.i, mem if( re_hex(zIn[1],&v) ){
49
+ += 3v;
50
+ }5v = 0;
51
+v = 0;
52
+ for(i=1; p->sIn.i<p->sIn.mx && re_hex(p->sIn.z[p->sIn.i+i], &v); i++){}
53
+ if( i>1 ){
54
+{
55
+ return 1000) :/
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -0,0 +1,55 @@
1 /*
2 ** Co#ifndef SQL(sizeof(aSp*
3 ** Co#ifndef SQLITE_MAX_REGEXP_REPEAT
4 # define SQLITE_MAX_REGEXP_REPEAT 999
5 #endifcharacter3CC_INC>0 &&ute a reasonable limit on the length of the REGEXP NFA.
6 */
7 int re_maxlen(void){
8 return 1000) : 1000;
9 }re_maxlen(), noCase) Co0);
10 /, 0 <= p,q <= 999*
11 ** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
12 ** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
13 */
14 static void grepprintfREPEAT
15 # define SQLITE_MAX_REGEXP_REPEAT 999
16 #endifcharacter3CC_INC>0 &&ute a reasonable limit on the length of the REGEXP NFA.
17 */
18 int re_maxlen(void){
19 return 1000) : 1000;
20 }re_maxlen(), noCase) Co0);
21 /, 0 <= p,q <= 999*
22 ** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
23 ** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
24 */
25 static void grepprintf har const
26 int argc, resqlite3char zInit[12];
27 ** Co#ifnde** Co#ifndef SQLITE_MAX_REGEXP_REPEAT
28 # define SQLITE_MAX_REGEXP_REPEAT 999
29 #endifcharacter3CC_INC>0 &&ute a reasonable limit on the length of the REGEXP NFA.
30 */
31 int re_maxlen(void){
32 return 1000) : 1000;
33 }re_maxlen(), noCase) Co0);
34 /, 0 <= p,q <= 999*
35 ** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
36 ** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
37 */
38 static void grepprintfREPEAT
39 # define SQLITE_MAX_REGEXP_REPEAT 999
40 #endifcharacter3CC_INC>0 &&ute a reasonable limit on X Where XXX is any number ofn the length of the REGEXP NF
41 return 1000) : 1000;
42 }re_maxlen(), noCase) Co0);
43 /, 0 <= p,q <= 999*
44 ** To help prevent DoS attacks, the values of p and q in the "{p,q}" syntax
45 ** are limited to SQLITE_MAX_REGEXP_REPEAT, default 999 return 1; return 1
46 */
47 static void grepprintf har const
48 int argc, resqlite3 strncmp(zIn+in.i, mem if( re_hex(zIn[1],&v) ){
49 += 3v;
50 }5v = 0;
51 v = 0;
52 for(i=1; p->sIn.i<p->sIn.mx && re_hex(p->sIn.z[p->sIn.i+i], &v); i++){}
53 if( i>1 ){
54 {
55 return 1000) :/
+47 -1
--- src/setup.c
+++ src/setup.c
@@ -94,11 +94,11 @@
9494
"Edit HTML text inserted at the top of every page");
9595
setup_menu_entry("Footer", "setup_footer",
9696
"Edit HTML text inserted at the bottom of every page");
9797
setup_menu_entry("Moderation", "setup_modreq",
9898
"Enable/Disable requiring moderator approval of Wiki and/or Ticket"
99
- "edits and attachments.");
99
+ " changes and attachments.");
100100
setup_menu_entry("Ad-Unit", "setup_adunit",
101101
"Edit HTML text for an ad unit inserted after the menu bar");
102102
setup_menu_entry("Logo", "setup_logo",
103103
"Change the logo and background images for the server");
104104
setup_menu_entry("Shunned", "shun",
@@ -109,10 +109,12 @@
109109
"A record of login attempts");
110110
setup_menu_entry("Stats", "stat",
111111
"Display repository statistics");
112112
setup_menu_entry("SQL", "admin_sql",
113113
"Enter raw SQL commands");
114
+ setup_menu_entry("TH1", "admin_th1",
115
+ "Enter raw TH1 commands");
114116
@ </table>
115117
116118
style_footer();
117119
}
118120
@@ -1759,8 +1761,52 @@
17591761
@ </tr>
17601762
}
17611763
sqlite3_finalize(pStmt);
17621764
@ </table>
17631765
}
1766
+ }
1767
+ style_footer();
1768
+}
1769
+
1770
+
1771
+/*
1772
+** WEBPAGE: admin_th1
1773
+**
1774
+** Run raw TH1 commands using the web interface. If Tcl integration was
1775
+** enabled at compile-time and the "tcl" setting is enabled, Tcl commands
1776
+** may be run as well.
1777
+*/
1778
+void th1_page(void){
1779
+ const char *zQ = P("q");
1780
+ int go = P("go")!=0;
1781
+ login_check_credentials();
1782
+ if( !g.perm.Setup ){
1783
+ login_needed();
1784
+ }
1785
+ db_begin_transaction();
1786
+ style_header("Raw TH1 Commands");
1787
+ @ <p><b>Caution:</b> There are no restrictions on the TH1 that can be
1788
+ @ run by this page. If Tcl integration was enabled at compile-time and
1789
+ @ the "tcl" setting is enabled, Tcl commands may be run as well.</p>
1790
+ @
1791
+ @ <form method="post" action="%s(g.zTop)/admin_th1">
1792
+ login_insert_csrf_secret();
1793
+ @ TH1:<br />
1794
+ @ <textarea name="q" rows="5" cols="80">%h(zQ)</textarea><br />
1795
+ @ <input type="submit" name="go" value="Run TH1">
1796
+ @ </form>
1797
+ if( go ){
1798
+ const char *zR;
1799
+ int rc;
1800
+ int n;
1801
+ @ <hr />
1802
+ login_verify_csrf_secret();
1803
+ rc = Th_Eval(g.interp, 0, zQ, -1);
1804
+ zR = Th_GetResult(g.interp, &n);
1805
+ if( rc==TH_OK ){
1806
+ @ <pre class="th1result">%h(zR)</pre>
1807
+ }else{
1808
+ @ <pre class="th1error">%h(zR)</pre>
1809
+ }
17641810
}
17651811
style_footer();
17661812
}
17671813
--- src/setup.c
+++ src/setup.c
@@ -94,11 +94,11 @@
94 "Edit HTML text inserted at the top of every page");
95 setup_menu_entry("Footer", "setup_footer",
96 "Edit HTML text inserted at the bottom of every page");
97 setup_menu_entry("Moderation", "setup_modreq",
98 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
99 "edits and attachments.");
100 setup_menu_entry("Ad-Unit", "setup_adunit",
101 "Edit HTML text for an ad unit inserted after the menu bar");
102 setup_menu_entry("Logo", "setup_logo",
103 "Change the logo and background images for the server");
104 setup_menu_entry("Shunned", "shun",
@@ -109,10 +109,12 @@
109 "A record of login attempts");
110 setup_menu_entry("Stats", "stat",
111 "Display repository statistics");
112 setup_menu_entry("SQL", "admin_sql",
113 "Enter raw SQL commands");
 
 
114 @ </table>
115
116 style_footer();
117 }
118
@@ -1759,8 +1761,52 @@
1759 @ </tr>
1760 }
1761 sqlite3_finalize(pStmt);
1762 @ </table>
1763 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1764 }
1765 style_footer();
1766 }
1767
--- src/setup.c
+++ src/setup.c
@@ -94,11 +94,11 @@
94 "Edit HTML text inserted at the top of every page");
95 setup_menu_entry("Footer", "setup_footer",
96 "Edit HTML text inserted at the bottom of every page");
97 setup_menu_entry("Moderation", "setup_modreq",
98 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
99 " changes and attachments.");
100 setup_menu_entry("Ad-Unit", "setup_adunit",
101 "Edit HTML text for an ad unit inserted after the menu bar");
102 setup_menu_entry("Logo", "setup_logo",
103 "Change the logo and background images for the server");
104 setup_menu_entry("Shunned", "shun",
@@ -109,10 +109,12 @@
109 "A record of login attempts");
110 setup_menu_entry("Stats", "stat",
111 "Display repository statistics");
112 setup_menu_entry("SQL", "admin_sql",
113 "Enter raw SQL commands");
114 setup_menu_entry("TH1", "admin_th1",
115 "Enter raw TH1 commands");
116 @ </table>
117
118 style_footer();
119 }
120
@@ -1759,8 +1761,52 @@
1761 @ </tr>
1762 }
1763 sqlite3_finalize(pStmt);
1764 @ </table>
1765 }
1766 }
1767 style_footer();
1768 }
1769
1770
1771 /*
1772 ** WEBPAGE: admin_th1
1773 **
1774 ** Run raw TH1 commands using the web interface. If Tcl integration was
1775 ** enabled at compile-time and the "tcl" setting is enabled, Tcl commands
1776 ** may be run as well.
1777 */
1778 void th1_page(void){
1779 const char *zQ = P("q");
1780 int go = P("go")!=0;
1781 login_check_credentials();
1782 if( !g.perm.Setup ){
1783 login_needed();
1784 }
1785 db_begin_transaction();
1786 style_header("Raw TH1 Commands");
1787 @ <p><b>Caution:</b> There are no restrictions on the TH1 that can be
1788 @ run by this page. If Tcl integration was enabled at compile-time and
1789 @ the "tcl" setting is enabled, Tcl commands may be run as well.</p>
1790 @
1791 @ <form method="post" action="%s(g.zTop)/admin_th1">
1792 login_insert_csrf_secret();
1793 @ TH1:<br />
1794 @ <textarea name="q" rows="5" cols="80">%h(zQ)</textarea><br />
1795 @ <input type="submit" name="go" value="Run TH1">
1796 @ </form>
1797 if( go ){
1798 const char *zR;
1799 int rc;
1800 int n;
1801 @ <hr />
1802 login_verify_csrf_secret();
1803 rc = Th_Eval(g.interp, 0, zQ, -1);
1804 zR = Th_GetResult(g.interp, &n);
1805 if( rc==TH_OK ){
1806 @ <pre class="th1result">%h(zR)</pre>
1807 }else{
1808 @ <pre class="th1error">%h(zR)</pre>
1809 }
1810 }
1811 style_footer();
1812 }
1813
--- src/shell.c
+++ src/shell.c
@@ -1477,10 +1477,16 @@
14771477
p->zDbFilename, sqlite3_errmsg(db));
14781478
exit(1);
14791479
}
14801480
#ifndef SQLITE_OMIT_LOAD_EXTENSION
14811481
sqlite3_enable_load_extension(p->db, 1);
1482
+#endif
1483
+#ifdef SQLITE_ENABLE_REGEXP
1484
+ {
1485
+ extern int sqlite3_add_regexp_func(sqlite3*);
1486
+ sqlite3_add_regexp_func(db);
1487
+ }
14821488
#endif
14831489
}
14841490
}
14851491
14861492
/*
14871493
--- src/shell.c
+++ src/shell.c
@@ -1477,10 +1477,16 @@
1477 p->zDbFilename, sqlite3_errmsg(db));
1478 exit(1);
1479 }
1480 #ifndef SQLITE_OMIT_LOAD_EXTENSION
1481 sqlite3_enable_load_extension(p->db, 1);
 
 
 
 
 
 
1482 #endif
1483 }
1484 }
1485
1486 /*
1487
--- src/shell.c
+++ src/shell.c
@@ -1477,10 +1477,16 @@
1477 p->zDbFilename, sqlite3_errmsg(db));
1478 exit(1);
1479 }
1480 #ifndef SQLITE_OMIT_LOAD_EXTENSION
1481 sqlite3_enable_load_extension(p->db, 1);
1482 #endif
1483 #ifdef SQLITE_ENABLE_REGEXP
1484 {
1485 extern int sqlite3_add_regexp_func(sqlite3*);
1486 sqlite3_add_regexp_func(db);
1487 }
1488 #endif
1489 }
1490 }
1491
1492 /*
1493
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -118,10 +118,11 @@
118118
sqlcmd_content, 0, 0);
119119
sqlite3_create_function(db, "compress", 1, SQLITE_ANY, 0,
120120
sqlcmd_compress, 0, 0);
121121
sqlite3_create_function(db, "decompress", 1, SQLITE_ANY, 0,
122122
sqlcmd_decompress, 0, 0);
123
+ re_add_sql_func(db);
123124
g.repositoryOpen = 1;
124125
g.db = db;
125126
return SQLITE_OK;
126127
}
127128
128129
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -118,10 +118,11 @@
118 sqlcmd_content, 0, 0);
119 sqlite3_create_function(db, "compress", 1, SQLITE_ANY, 0,
120 sqlcmd_compress, 0, 0);
121 sqlite3_create_function(db, "decompress", 1, SQLITE_ANY, 0,
122 sqlcmd_decompress, 0, 0);
 
123 g.repositoryOpen = 1;
124 g.db = db;
125 return SQLITE_OK;
126 }
127
128
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -118,10 +118,11 @@
118 sqlcmd_content, 0, 0);
119 sqlite3_create_function(db, "compress", 1, SQLITE_ANY, 0,
120 sqlcmd_compress, 0, 0);
121 sqlite3_create_function(db, "decompress", 1, SQLITE_ANY, 0,
122 sqlcmd_decompress, 0, 0);
123 re_add_sql_func(db);
124 g.repositoryOpen = 1;
125 g.db = db;
126 return SQLITE_OK;
127 }
128
129
+372 -118
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -673,11 +673,11 @@
673673
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
674674
** [sqlite_version()] and [sqlite_source_id()].
675675
*/
676676
#define SQLITE_VERSION "3.7.16"
677677
#define SQLITE_VERSION_NUMBER 3007016
678
-#define SQLITE_SOURCE_ID "2012-12-14 17:54:38 3d65c70343196b8f69c5293e7703839846fade85"
678
+#define SQLITE_SOURCE_ID "2013-01-09 11:31:17 5774f2175ce621dfc4b6b93f7ee13fd66f3ec2b9"
679679
680680
/*
681681
** CAPI3REF: Run-Time Library Version Numbers
682682
** KEYWORDS: sqlite3_version, sqlite3_sourceid
683683
**
@@ -10553,24 +10553,24 @@
1055310553
** and the value of Index.onError indicate the which conflict resolution
1055410554
** algorithm to employ whenever an attempt is made to insert a non-unique
1055510555
** element.
1055610556
*/
1055710557
struct Index {
10558
- char *zName; /* Name of this index */
10559
- int *aiColumn; /* Which columns are used by this index. 1st is 0 */
10560
- tRowcnt *aiRowEst; /* Result of ANALYZE: Est. rows selected by each column */
10561
- Table *pTable; /* The SQL table being indexed */
10562
- char *zColAff; /* String defining the affinity of each column */
10563
- Index *pNext; /* The next index associated with the same table */
10564
- Schema *pSchema; /* Schema containing this index */
10565
- u8 *aSortOrder; /* Array of size Index.nColumn. True==DESC, False==ASC */
10566
- char **azColl; /* Array of collation sequence names for index */
10567
- int nColumn; /* Number of columns in the table used by this index */
10568
- int tnum; /* Page containing root of this index in database file */
10569
- u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
10570
- u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */
10571
- u8 bUnordered; /* Use this index for == or IN queries only */
10558
+ char *zName; /* Name of this index */
10559
+ int *aiColumn; /* Which columns are used by this index. 1st is 0 */
10560
+ tRowcnt *aiRowEst; /* From ANALYZE: Est. rows selected by each column */
10561
+ Table *pTable; /* The SQL table being indexed */
10562
+ char *zColAff; /* String defining the affinity of each column */
10563
+ Index *pNext; /* The next index associated with the same table */
10564
+ Schema *pSchema; /* Schema containing this index */
10565
+ u8 *aSortOrder; /* for each column: True==DESC, False==ASC */
10566
+ char **azColl; /* Array of collation sequence names for index */
10567
+ int tnum; /* DB Page containing root of this index */
10568
+ u16 nColumn; /* Number of columns in table used by this index */
10569
+ u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
10570
+ unsigned autoIndex:2; /* 1==UNIQUE, 2==PRIMARY KEY, 0==CREATE INDEX */
10571
+ unsigned bUnordered:1; /* Use this index for == or IN queries only */
1057210572
#ifdef SQLITE_ENABLE_STAT3
1057310573
int nSample; /* Number of elements in aSample[] */
1057410574
tRowcnt avgEq; /* Average nEq value for key values not in aSample */
1057510575
IndexSample *aSample; /* Samples of the left-most key */
1057610576
#endif
@@ -10840,22 +10840,31 @@
1084010840
** name. An expr/name combination can be used in several ways, such
1084110841
** as the list of "expr AS ID" fields following a "SELECT" or in the
1084210842
** list of "ID = expr" items in an UPDATE. A list of expressions can
1084310843
** also be used as the argument to a function, in which case the a.zName
1084410844
** field is not used.
10845
+**
10846
+** By default the Expr.zSpan field holds a human-readable description of
10847
+** the expression that is used in the generation of error messages and
10848
+** column labels. In this case, Expr.zSpan is typically the text of a
10849
+** column expression as it exists in a SELECT statement. However, if
10850
+** the bSpanIsTab flag is set, then zSpan is overloaded to mean the name
10851
+** of the result column in the form: DATABASE.TABLE.COLUMN. This later
10852
+** form is used for name resolution with nested FROM clauses.
1084510853
*/
1084610854
struct ExprList {
1084710855
int nExpr; /* Number of expressions on the list */
1084810856
int iECursor; /* VDBE Cursor associated with this ExprList */
1084910857
struct ExprList_item { /* For each expression in the list */
10850
- Expr *pExpr; /* The list of expressions */
10851
- char *zName; /* Token associated with this expression */
10852
- char *zSpan; /* Original text of the expression */
10853
- u8 sortOrder; /* 1 for DESC or 0 for ASC */
10854
- u8 done; /* A flag to indicate when processing is finished */
10855
- u16 iOrderByCol; /* For ORDER BY, column number in result set */
10856
- u16 iAlias; /* Index into Parse.aAlias[] for zName */
10858
+ Expr *pExpr; /* The list of expressions */
10859
+ char *zName; /* Token associated with this expression */
10860
+ char *zSpan; /* Original text of the expression */
10861
+ u8 sortOrder; /* 1 for DESC or 0 for ASC */
10862
+ unsigned done :1; /* A flag to indicate when processing is finished */
10863
+ unsigned bSpanIsTab :1; /* zSpan holds DB.TABLE.COLUMN */
10864
+ u16 iOrderByCol; /* For ORDER BY, column number in result set */
10865
+ u16 iAlias; /* Index into Parse.aAlias[] for zName */
1085710866
} *a; /* Alloc a power of two greater or equal to nExpr */
1085810867
};
1085910868
1086010869
/*
1086110870
** An instance of this structure is used by the parser to record both
@@ -11171,10 +11180,11 @@
1117111180
#define SF_Expanded 0x0010 /* sqlite3SelectExpand() called on this */
1117211181
#define SF_HasTypeInfo 0x0020 /* FROM subqueries have Table metadata */
1117311182
#define SF_UseSorter 0x0040 /* Sort using a sorter */
1117411183
#define SF_Values 0x0080 /* Synthesized from VALUES clause */
1117511184
#define SF_Materialize 0x0100 /* Force materialization of views */
11185
+#define SF_NestedFrom 0x0200 /* Part of a parenthesized FROM clause */
1117611186
1117711187
1117811188
/*
1117911189
** The results of a select can be distributed in several ways. The
1118011190
** "SRT" prefix means "SELECT Result Type".
@@ -11883,11 +11893,11 @@
1188311893
SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
1188411894
Token*, int, int);
1188511895
SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int);
1188611896
SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*);
1188711897
SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,
11888
- Expr*,ExprList*,int,Expr*,Expr*);
11898
+ Expr*,ExprList*,u16,Expr*,Expr*);
1188911899
SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
1189011900
SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*);
1189111901
SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int);
1189211902
SQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);
1189311903
#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
@@ -12140,10 +12150,11 @@
1214012150
SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
1214112151
SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
1214212152
SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
1214312153
SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int);
1214412154
SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
12155
+SQLITE_PRIVATE int sqlite3MatchSpanName(const char*, const char*, const char*, const char*);
1214512156
SQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*);
1214612157
SQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);
1214712158
SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
1214812159
SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
1214912160
SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
@@ -12278,12 +12289,14 @@
1227812289
#define sqlite3FkOldmask(a,b) 0
1227912290
#define sqlite3FkRequired(a,b,c,d) 0
1228012291
#endif
1228112292
#ifndef SQLITE_OMIT_FOREIGN_KEY
1228212293
SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*);
12294
+SQLITE_PRIVATE int sqlite3FkLocateIndex(Parse*,Table*,FKey*,Index**,int**);
1228312295
#else
1228412296
#define sqlite3FkDelete(a,b)
12297
+ #define sqlite3FkLocateIndex(a,b,c,d,e)
1228512298
#endif
1228612299
1228712300
1228812301
/*
1228912302
** Available fault injectors. Should be numbered beginning with 0.
@@ -23286,15 +23299,11 @@
2328623299
{ "pwrite64", (sqlite3_syscall_ptr)0, 0 },
2328723300
#endif
2328823301
#define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\
2328923302
aSyscall[13].pCurrent)
2329023303
23291
-#if SQLITE_ENABLE_LOCKING_STYLE
2329223304
{ "fchmod", (sqlite3_syscall_ptr)fchmod, 0 },
23293
-#else
23294
- { "fchmod", (sqlite3_syscall_ptr)0, 0 },
23295
-#endif
2329623305
#define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent)
2329723306
2329823307
#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
2329923308
{ "fallocate", (sqlite3_syscall_ptr)posix_fallocate, 0 },
2330023309
#else
@@ -23315,13 +23324,10 @@
2331523324
#define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent)
2331623325
2331723326
{ "fchown", (sqlite3_syscall_ptr)posixFchown, 0 },
2331823327
#define osFchown ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
2331923328
23320
- { "umask", (sqlite3_syscall_ptr)umask, 0 },
23321
-#define osUmask ((mode_t(*)(mode_t))aSyscall[21].pCurrent)
23322
-
2332323329
}; /* End of the overrideable system calls */
2332423330
2332523331
/*
2332623332
** This is the xSetSystemCall() method of sqlite3_vfs for all of the
2332723333
** "unix" VFSes. Return SQLITE_OK opon successfully updating the
@@ -23422,31 +23428,29 @@
2342223428
** process that is able to write to the database will also be able to
2342323429
** recover the hot journals.
2342423430
*/
2342523431
static int robust_open(const char *z, int f, mode_t m){
2342623432
int fd;
23427
- mode_t m2;
23428
- mode_t origM = 0;
23429
- if( m==0 ){
23430
- m2 = SQLITE_DEFAULT_FILE_PERMISSIONS;
23431
- }else{
23432
- m2 = m;
23433
- origM = osUmask(0);
23434
- }
23433
+ mode_t m2 = m ? m : SQLITE_DEFAULT_FILE_PERMISSIONS;
2343523434
do{
2343623435
#if defined(O_CLOEXEC)
2343723436
fd = osOpen(z,f|O_CLOEXEC,m2);
2343823437
#else
2343923438
fd = osOpen(z,f,m2);
2344023439
#endif
2344123440
}while( fd<0 && errno==EINTR );
23442
- if( m ){
23443
- osUmask(origM);
23444
- }
23441
+ if( fd>=0 ){
23442
+ if( m!=0 ){
23443
+ struct stat statbuf;
23444
+ if( osFstat(fd, &statbuf)==0 && (statbuf.st_mode&0777)!=m ){
23445
+ osFchmod(fd, m);
23446
+ }
23447
+ }
2344523448
#if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0)
23446
- if( fd>=0 ) osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
23449
+ osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
2344723450
#endif
23451
+ }
2344823452
return fd;
2344923453
}
2345023454
2345123455
/*
2345223456
** Helper functions to obtain and relinquish the global mutex. The
@@ -29868,11 +29872,11 @@
2986829872
};
2986929873
unsigned int i; /* Loop counter */
2987029874
2987129875
/* Double-check that the aSyscall[] array has been constructed
2987229876
** correctly. See ticket [bb3a86e890c8e96ab] */
29873
- assert( ArraySize(aSyscall)==22 );
29877
+ assert( ArraySize(aSyscall)==21 );
2987429878
2987529879
/* Register all VFSes defined in the aVfs[] array */
2987629880
for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){
2987729881
sqlite3_vfs_register(&aVfs[i], i==0);
2987829882
}
@@ -56869,11 +56873,16 @@
5686956873
/*
5687056874
** Parameter zSrcData points to a buffer containing the data for
5687156875
** page iSrcPg from the source database. Copy this data into the
5687256876
** destination database.
5687356877
*/
56874
-static int backupOnePage(sqlite3_backup *p, Pgno iSrcPg, const u8 *zSrcData){
56878
+static int backupOnePage(
56879
+ sqlite3_backup *p, /* Backup handle */
56880
+ Pgno iSrcPg, /* Source database page to backup */
56881
+ const u8 *zSrcData, /* Source database page data */
56882
+ int bUpdate /* True for an update, false otherwise */
56883
+){
5687556884
Pager * const pDestPager = sqlite3BtreePager(p->pDest);
5687656885
const int nSrcPgsz = sqlite3BtreeGetPageSize(p->pSrc);
5687756886
int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);
5687856887
const int nCopy = MIN(nSrcPgsz, nDestPgsz);
5687956888
const i64 iEnd = (i64)iSrcPg*(i64)nSrcPgsz;
@@ -56942,10 +56951,13 @@
5694256951
** cached parse of the page). MemPage.isInit is marked
5694356952
** "MUST BE FIRST" for this purpose.
5694456953
*/
5694556954
memcpy(zOut, zIn, nCopy);
5694656955
((u8 *)sqlite3PagerGetExtra(pDestPg))[0] = 0;
56956
+ if( iOff==0 && bUpdate==0 ){
56957
+ sqlite3Put4byte(&zOut[28], sqlite3BtreeLastPage(p->pSrc));
56958
+ }
5694756959
}
5694856960
sqlite3PagerUnref(pDestPg);
5694956961
}
5695056962
5695156963
return rc;
@@ -57048,11 +57060,11 @@
5704857060
const Pgno iSrcPg = p->iNext; /* Source page number */
5704957061
if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
5705057062
DbPage *pSrcPg; /* Source page object */
5705157063
rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
5705257064
if( rc==SQLITE_OK ){
57053
- rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg));
57065
+ rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0);
5705457066
sqlite3PagerUnref(pSrcPg);
5705557067
}
5705657068
}
5705757069
p->iNext++;
5705857070
}
@@ -57296,11 +57308,11 @@
5729657308
** the new data into the backup.
5729757309
*/
5729857310
int rc;
5729957311
assert( p->pDestDb );
5730057312
sqlite3_mutex_enter(p->pDestDb->mutex);
57301
- rc = backupOnePage(p, iPage, aData);
57313
+ rc = backupOnePage(p, iPage, aData, 1);
5730257314
sqlite3_mutex_leave(p->pDestDb->mutex);
5730357315
assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
5730457316
if( rc!=SQLITE_OK ){
5730557317
p->rc = rc;
5730657318
}
@@ -71890,10 +71902,18 @@
7189071902
p->pReal = pReal;
7189171903
if( p->iSize>0 ){
7189271904
assert(p->iSize<=p->nBuf);
7189371905
rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0);
7189471906
}
71907
+ if( rc!=SQLITE_OK ){
71908
+ /* If an error occurred while writing to the file, close it before
71909
+ ** returning. This way, SQLite uses the in-memory journal data to
71910
+ ** roll back changes made to the internal page-cache before this
71911
+ ** function was called. */
71912
+ sqlite3OsClose(pReal);
71913
+ p->pReal = 0;
71914
+ }
7189571915
}
7189671916
}
7189771917
return rc;
7189871918
}
7189971919
@@ -72636,10 +72656,39 @@
7263672656
}
7263772657
}
7263872658
return 0;
7263972659
}
7264072660
72661
+/*
72662
+** Subqueries stores the original database, table and column names for their
72663
+** result sets in ExprList.a[].zSpan, in the form "DATABASE.TABLE.COLUMN".
72664
+** Check to see if the zSpan given to this routine matches the zDb, zTab,
72665
+** and zCol. If any of zDb, zTab, and zCol are NULL then those fields will
72666
+** match anything.
72667
+*/
72668
+SQLITE_PRIVATE int sqlite3MatchSpanName(
72669
+ const char *zSpan,
72670
+ const char *zCol,
72671
+ const char *zTab,
72672
+ const char *zDb
72673
+){
72674
+ int n;
72675
+ for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}
72676
+ if( zDb && sqlite3StrNICmp(zSpan, zDb, n)!=0 ){
72677
+ return 0;
72678
+ }
72679
+ zSpan += n+1;
72680
+ for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}
72681
+ if( zTab && sqlite3StrNICmp(zSpan, zTab, n)!=0 ){
72682
+ return 0;
72683
+ }
72684
+ zSpan += n+1;
72685
+ if( zCol && sqlite3StrICmp(zSpan, zCol)!=0 ){
72686
+ return 0;
72687
+ }
72688
+ return 1;
72689
+}
7264172690
7264272691
/*
7264372692
** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
7264472693
** that name in the set of source tables in pSrcList and make the pExpr
7264572694
** expression node refer back to that source column. The following changes
@@ -72691,44 +72740,63 @@
7269172740
7269272741
/* Initialize the node to no-match */
7269372742
pExpr->iTable = -1;
7269472743
pExpr->pTab = 0;
7269572744
ExprSetIrreducible(pExpr);
72745
+
72746
+ /* Translate the schema name in zDb into a pointer to the corresponding
72747
+ ** schema. If not found, pSchema will remain NULL and nothing will match
72748
+ ** resulting in an appropriate error message toward the end of this routine
72749
+ */
72750
+ if( zDb ){
72751
+ for(i=0; i<db->nDb; i++){
72752
+ assert( db->aDb[i].zName );
72753
+ if( sqlite3StrICmp(db->aDb[i].zName,zDb)==0 ){
72754
+ pSchema = db->aDb[i].pSchema;
72755
+ break;
72756
+ }
72757
+ }
72758
+ }
7269672759
7269772760
/* Start at the inner-most context and move outward until a match is found */
7269872761
while( pNC && cnt==0 ){
7269972762
ExprList *pEList;
7270072763
SrcList *pSrcList = pNC->pSrcList;
7270172764
7270272765
if( pSrcList ){
7270372766
for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
7270472767
Table *pTab;
72705
- int iDb;
7270672768
Column *pCol;
7270772769
7270872770
pTab = pItem->pTab;
7270972771
assert( pTab!=0 && pTab->zName!=0 );
72710
- iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
7271172772
assert( pTab->nCol>0 );
72773
+ if( pItem->pSelect && (pItem->pSelect->selFlags & SF_NestedFrom)!=0 ){
72774
+ ExprList *pEList = pItem->pSelect->pEList;
72775
+ int hit = 0;
72776
+ for(j=0; j<pEList->nExpr; j++){
72777
+ if( sqlite3MatchSpanName(pEList->a[j].zSpan, zCol, zTab, zDb) ){
72778
+ cnt++;
72779
+ cntTab = 2;
72780
+ pMatch = pItem;
72781
+ pExpr->iColumn = j;
72782
+ hit = 1;
72783
+ }
72784
+ }
72785
+ if( hit || zTab==0 ) continue;
72786
+ }
72787
+ if( zDb && pTab->pSchema!=pSchema ){
72788
+ continue;
72789
+ }
7271272790
if( zTab ){
72713
- if( pItem->zAlias ){
72714
- char *zTabName = pItem->zAlias;
72715
- if( sqlite3StrICmp(zTabName, zTab)!=0 ) continue;
72716
- }else{
72717
- char *zTabName = pTab->zName;
72718
- if( NEVER(zTabName==0) || sqlite3StrICmp(zTabName, zTab)!=0 ){
72719
- continue;
72720
- }
72721
- if( zDb!=0 && sqlite3StrICmp(db->aDb[iDb].zName, zDb)!=0 ){
72722
- continue;
72723
- }
72791
+ const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
72792
+ assert( zTabName!=0 );
72793
+ if( sqlite3StrICmp(zTabName, zTab)!=0 ){
72794
+ continue;
7272472795
}
7272572796
}
7272672797
if( 0==(cntTab++) ){
72727
- pExpr->iTable = pItem->iCursor;
72728
- pExpr->pTab = pTab;
72729
- pSchema = pTab->pSchema;
7273072798
pMatch = pItem;
7273172799
}
7273272800
for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){
7273372801
if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
7273472802
/* If there has been exactly one prior match and this match
@@ -72738,21 +72806,23 @@
7273872806
if( cnt==1 ){
7273972807
if( pItem->jointype & JT_NATURAL ) continue;
7274072808
if( nameInUsingClause(pItem->pUsing, zCol) ) continue;
7274172809
}
7274272810
cnt++;
72743
- pExpr->iTable = pItem->iCursor;
72744
- pExpr->pTab = pTab;
7274572811
pMatch = pItem;
72746
- pSchema = pTab->pSchema;
7274772812
/* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
7274872813
pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j;
7274972814
break;
7275072815
}
7275172816
}
7275272817
}
72753
- }
72818
+ if( pMatch ){
72819
+ pExpr->iTable = pMatch->iCursor;
72820
+ pExpr->pTab = pMatch->pTab;
72821
+ pSchema = pExpr->pTab->pSchema;
72822
+ }
72823
+ } /* if( pSrcList ) */
7275472824
7275572825
#ifndef SQLITE_OMIT_TRIGGER
7275672826
/* If we have not already resolved the name, then maybe
7275772827
** it is a new.* or old.* trigger argument reference
7275872828
*/
@@ -73083,11 +73153,11 @@
7308373153
#endif
7308473154
if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){
7308573155
sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
7308673156
pNC->nErr++;
7308773157
is_agg = 0;
73088
- }else if( no_such_func ){
73158
+ }else if( no_such_func && pParse->db->init.busy==0 ){
7308973159
sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
7309073160
pNC->nErr++;
7309173161
}else if( wrong_num_args ){
7309273162
sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
7309373163
nId, zId);
@@ -73519,27 +73589,10 @@
7351973589
if( sqlite3ResolveExprNames(&sNC, p->pLimit) ||
7352073590
sqlite3ResolveExprNames(&sNC, p->pOffset) ){
7352173591
return WRC_Abort;
7352273592
}
7352373593
73524
- /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
73525
- ** resolve the result-set expression list.
73526
- */
73527
- sNC.ncFlags = NC_AllowAgg;
73528
- sNC.pSrcList = p->pSrc;
73529
- sNC.pNext = pOuterNC;
73530
-
73531
- /* Resolve names in the result set. */
73532
- pEList = p->pEList;
73533
- assert( pEList!=0 );
73534
- for(i=0; i<pEList->nExpr; i++){
73535
- Expr *pX = pEList->a[i].pExpr;
73536
- if( sqlite3ResolveExprNames(&sNC, pX) ){
73537
- return WRC_Abort;
73538
- }
73539
- }
73540
-
7354173594
/* Recursively resolve names in all subqueries
7354273595
*/
7354373596
for(i=0; i<p->pSrc->nSrc; i++){
7354473597
struct SrcList_item *pItem = &p->pSrc->a[i];
7354573598
if( pItem->pSelect ){
@@ -73562,10 +73615,27 @@
7356273615
for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef -= pNC->nRef;
7356373616
assert( pItem->isCorrelated==0 && nRef<=0 );
7356473617
pItem->isCorrelated = (nRef!=0);
7356573618
}
7356673619
}
73620
+
73621
+ /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
73622
+ ** resolve the result-set expression list.
73623
+ */
73624
+ sNC.ncFlags = NC_AllowAgg;
73625
+ sNC.pSrcList = p->pSrc;
73626
+ sNC.pNext = pOuterNC;
73627
+
73628
+ /* Resolve names in the result set. */
73629
+ pEList = p->pEList;
73630
+ assert( pEList!=0 );
73631
+ for(i=0; i<pEList->nExpr; i++){
73632
+ Expr *pX = pEList->a[i].pExpr;
73633
+ if( sqlite3ResolveExprNames(&sNC, pX) ){
73634
+ return WRC_Abort;
73635
+ }
73636
+ }
7356773637
7356873638
/* If there are no aggregate functions in the result-set, and no GROUP BY
7356973639
** expression, do not allow aggregates in any of the other expressions.
7357073640
*/
7357173641
assert( (p->selFlags & SF_Aggregate)==0 );
@@ -77046,10 +77116,16 @@
7704677116
for(i=0; i<pList->nExpr; i++){
7704777117
sqlite3ExplainPrintf(pOut, "item[%d] = ", i);
7704877118
sqlite3ExplainPush(pOut);
7704977119
sqlite3ExplainExpr(pOut, pList->a[i].pExpr);
7705077120
sqlite3ExplainPop(pOut);
77121
+ if( pList->a[i].zName ){
77122
+ sqlite3ExplainPrintf(pOut, " AS %s", pList->a[i].zName);
77123
+ }
77124
+ if( pList->a[i].bSpanIsTab ){
77125
+ sqlite3ExplainPrintf(pOut, " (%s)", pList->a[i].zSpan);
77126
+ }
7705177127
if( i<pList->nExpr-1 ){
7705277128
sqlite3ExplainNL(pOut);
7705377129
}
7705477130
}
7705577131
sqlite3ExplainPop(pOut);
@@ -87523,11 +87599,11 @@
8752387599
8752487600
/*
8752587601
** A foreign key constraint requires that the key columns in the parent
8752687602
** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
8752787603
** Given that pParent is the parent table for foreign key constraint pFKey,
87528
-** search the schema a unique index on the parent key columns.
87604
+** search the schema for a unique index on the parent key columns.
8752987605
**
8753087606
** If successful, zero is returned. If the parent key is an INTEGER PRIMARY
8753187607
** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx
8753287608
** is set to point to the unique index.
8753387609
**
@@ -87559,11 +87635,11 @@
8755987635
**
8756087636
** then non-zero is returned, and a "foreign key mismatch" error loaded
8756187637
** into pParse. If an OOM error occurs, non-zero is returned and the
8756287638
** pParse->db->mallocFailed flag is set.
8756387639
*/
87564
-static int locateFkeyIndex(
87640
+SQLITE_PRIVATE int sqlite3FkLocateIndex(
8756587641
Parse *pParse, /* Parse context to store any error in */
8756687642
Table *pParent, /* Parent table of FK constraint pFKey */
8756787643
FKey *pFKey, /* Foreign key to find index for */
8756887644
Index **ppIdx, /* OUT: Unique index on parent table */
8756987645
int **paiCol /* OUT: Map of index columns in pFKey */
@@ -87656,11 +87732,13 @@
8765687732
}
8765787733
}
8765887734
8765987735
if( !pIdx ){
8766087736
if( !pParse->disableTriggers ){
87661
- sqlite3ErrorMsg(pParse, "foreign key mismatch");
87737
+ sqlite3ErrorMsg(pParse,
87738
+ "foreign key mismatch - \"%w\" referencing \"%w\"",
87739
+ pFKey->pFrom->zName, pFKey->zTo);
8766287740
}
8766387741
sqlite3DbFree(pParse->db, aiCol);
8766487742
return 1;
8766587743
}
8766687744
@@ -88117,11 +88195,11 @@
8811788195
if( pParse->disableTriggers ){
8811888196
pTo = sqlite3FindTable(db, pFKey->zTo, zDb);
8811988197
}else{
8812088198
pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);
8812188199
}
88122
- if( !pTo || locateFkeyIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
88200
+ if( !pTo || sqlite3FkLocateIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
8812388201
assert( isIgnoreErrors==0 || (regOld!=0 && regNew==0) );
8812488202
if( !isIgnoreErrors || db->mallocFailed ) return;
8812588203
if( pTo==0 ){
8812688204
/* If isIgnoreErrors is true, then a table is being dropped. In this
8812788205
** case SQLite runs a "DELETE FROM xxx" on the table being dropped
@@ -88197,11 +88275,11 @@
8819788275
/* Inserting a single row into a parent table cannot cause an immediate
8819888276
** foreign key violation. So do nothing in this case. */
8819988277
continue;
8820088278
}
8820188279
88202
- if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){
88280
+ if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){
8820388281
if( !isIgnoreErrors || db->mallocFailed ) return;
8820488282
continue;
8820588283
}
8820688284
assert( aiCol || pFKey->nCol==1 );
8820788285
@@ -88252,11 +88330,11 @@
8825288330
for(p=pTab->pFKey; p; p=p->pNextFrom){
8825388331
for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);
8825488332
}
8825588333
for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
8825688334
Index *pIdx = 0;
88257
- locateFkeyIndex(pParse, pTab, p, &pIdx, 0);
88335
+ sqlite3FkLocateIndex(pParse, pTab, p, &pIdx, 0);
8825888336
if( pIdx ){
8825988337
for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
8826088338
}
8826188339
}
8826288340
}
@@ -88378,11 +88456,11 @@
8837888456
ExprList *pList = 0; /* Changes list if ON UPDATE CASCADE */
8837988457
Select *pSelect = 0; /* If RESTRICT, "SELECT RAISE(...)" */
8838088458
int i; /* Iterator variable */
8838188459
Expr *pWhen = 0; /* WHEN clause for the trigger */
8838288460
88383
- if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;
88461
+ if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;
8838488462
assert( aiCol || pFKey->nCol==1 );
8838588463
8838688464
for(i=0; i<pFKey->nCol; i++){
8838788465
Token tOld = { "old", 3 }; /* Literal "old" token */
8838888466
Token tNew = { "new", 3 }; /* Literal "new" token */
@@ -92718,13 +92796,15 @@
9271892796
if( sqlite3StrICmp(zLeft, "table_info")==0 && zRight ){
9271992797
Table *pTab;
9272092798
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
9272192799
pTab = sqlite3FindTable(db, zRight, zDb);
9272292800
if( pTab ){
92723
- int i;
92801
+ int i, k;
9272492802
int nHidden = 0;
9272592803
Column *pCol;
92804
+ Index *pPk;
92805
+ for(pPk=pTab->pIndex; pPk && pPk->autoIndex!=2; pPk=pPk->pNext){}
9272692806
sqlite3VdbeSetNumCols(v, 6);
9272792807
pParse->nMem = 6;
9272892808
sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cid", SQLITE_STATIC);
9272992809
sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
9273092810
sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "type", SQLITE_STATIC);
@@ -92745,12 +92825,18 @@
9274592825
if( pCol->zDflt ){
9274692826
sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0);
9274792827
}else{
9274892828
sqlite3VdbeAddOp2(v, OP_Null, 0, 5);
9274992829
}
92750
- sqlite3VdbeAddOp2(v, OP_Integer,
92751
- (pCol->colFlags&COLFLAG_PRIMKEY)!=0, 6);
92830
+ if( (pCol->colFlags & COLFLAG_PRIMKEY)==0 ){
92831
+ k = 0;
92832
+ }else if( pPk==0 ){
92833
+ k = 1;
92834
+ }else{
92835
+ for(k=1; ALWAYS(k<=pTab->nCol) && pPk->aiColumn[k-1]!=i; k++){}
92836
+ }
92837
+ sqlite3VdbeAddOp2(v, OP_Integer, k, 6);
9275292838
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6);
9275392839
}
9275492840
}
9275592841
}else
9275692842
@@ -92881,10 +92967,124 @@
9288192967
++i;
9288292968
pFK = pFK->pNextFrom;
9288392969
}
9288492970
}
9288592971
}
92972
+ }else
92973
+#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
92974
+
92975
+#ifndef SQLITE_OMIT_FOREIGN_KEY
92976
+ if( sqlite3StrICmp(zLeft, "foreign_key_check")==0 ){
92977
+ FKey *pFK; /* A foreign key constraint */
92978
+ Table *pTab; /* Child table contain "REFERENCES" keyword */
92979
+ Table *pParent; /* Parent table that child points to */
92980
+ Index *pIdx; /* Index in the parent table */
92981
+ int i; /* Loop counter: Foreign key number for pTab */
92982
+ int j; /* Loop counter: Field of the foreign key */
92983
+ HashElem *k; /* Loop counter: Next table in schema */
92984
+ int x; /* result variable */
92985
+ int regResult; /* 3 registers to hold a result row */
92986
+ int regKey; /* Register to hold key for checking the FK */
92987
+ int regRow; /* Registers to hold a row from pTab */
92988
+ int addrTop; /* Top of a loop checking foreign keys */
92989
+ int addrOk; /* Jump here if the key is OK */
92990
+ int *aiCols; /* child to parent column mapping */
92991
+
92992
+ if( sqlite3ReadSchema(pParse) ) goto pragma_out;
92993
+ regResult = pParse->nMem+1;
92994
+ pParse->nMem += 4;
92995
+ regKey = ++pParse->nMem;
92996
+ regRow = ++pParse->nMem;
92997
+ v = sqlite3GetVdbe(pParse);
92998
+ sqlite3VdbeSetNumCols(v, 4);
92999
+ sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "table", SQLITE_STATIC);
93000
+ sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "rowid", SQLITE_STATIC);
93001
+ sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "parent", SQLITE_STATIC);
93002
+ sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "fkid", SQLITE_STATIC);
93003
+ sqlite3CodeVerifySchema(pParse, iDb);
93004
+ k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash);
93005
+ while( k ){
93006
+ if( zRight ){
93007
+ pTab = sqlite3LocateTable(pParse, 0, zRight, zDb);
93008
+ k = 0;
93009
+ }else{
93010
+ pTab = (Table*)sqliteHashData(k);
93011
+ k = sqliteHashNext(k);
93012
+ }
93013
+ if( pTab==0 || pTab->pFKey==0 ) continue;
93014
+ sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
93015
+ if( pTab->nCol+regRow>pParse->nMem ) pParse->nMem = pTab->nCol + regRow;
93016
+ sqlite3OpenTable(pParse, 0, iDb, pTab, OP_OpenRead);
93017
+ sqlite3VdbeAddOp4(v, OP_String8, 0, regResult, 0, pTab->zName,
93018
+ P4_TRANSIENT);
93019
+ for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
93020
+ pParent = sqlite3LocateTable(pParse, 0, pFK->zTo, zDb);
93021
+ if( pParent==0 ) break;
93022
+ pIdx = 0;
93023
+ sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
93024
+ x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
93025
+ if( x==0 ){
93026
+ if( pIdx==0 ){
93027
+ sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
93028
+ }else{
93029
+ KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
93030
+ sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iDb);
93031
+ sqlite3VdbeChangeP4(v, -1, (char*)pKey, P4_KEYINFO_HANDOFF);
93032
+ }
93033
+ }else{
93034
+ k = 0;
93035
+ break;
93036
+ }
93037
+ }
93038
+ if( pFK ) break;
93039
+ if( pParse->nTab<i ) pParse->nTab = i;
93040
+ addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, 0);
93041
+ for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
93042
+ pParent = sqlite3LocateTable(pParse, 0, pFK->zTo, zDb);
93043
+ assert( pParent!=0 );
93044
+ pIdx = 0;
93045
+ aiCols = 0;
93046
+ x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols);
93047
+ assert( x==0 );
93048
+ addrOk = sqlite3VdbeMakeLabel(v);
93049
+ if( pIdx==0 ){
93050
+ int iKey = pFK->aCol[0].iFrom;
93051
+ assert( iKey>=0 && iKey<pTab->nCol );
93052
+ if( iKey!=pTab->iPKey ){
93053
+ sqlite3VdbeAddOp3(v, OP_Column, 0, iKey, regRow);
93054
+ sqlite3ColumnDefault(v, pTab, iKey, regRow);
93055
+ sqlite3VdbeAddOp2(v, OP_IsNull, regRow, addrOk);
93056
+ sqlite3VdbeAddOp2(v, OP_MustBeInt, regRow,
93057
+ sqlite3VdbeCurrentAddr(v)+3);
93058
+ }else{
93059
+ sqlite3VdbeAddOp2(v, OP_Rowid, 0, regRow);
93060
+ }
93061
+ sqlite3VdbeAddOp3(v, OP_NotExists, i, 0, regRow);
93062
+ sqlite3VdbeAddOp2(v, OP_Goto, 0, addrOk);
93063
+ sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
93064
+ }else{
93065
+ for(j=0; j<pFK->nCol; j++){
93066
+ sqlite3ExprCodeGetColumnOfTable(v, pTab, 0,
93067
+ aiCols ? aiCols[j] : pFK->aCol[0].iFrom, regRow+j);
93068
+ sqlite3VdbeAddOp2(v, OP_IsNull, regRow+j, addrOk);
93069
+ }
93070
+ sqlite3VdbeAddOp3(v, OP_MakeRecord, regRow, pFK->nCol, regKey);
93071
+ sqlite3VdbeChangeP4(v, -1,
93072
+ sqlite3IndexAffinityStr(v,pIdx), P4_TRANSIENT);
93073
+ sqlite3VdbeAddOp4Int(v, OP_Found, i, addrOk, regKey, 0);
93074
+ }
93075
+ sqlite3VdbeAddOp2(v, OP_Rowid, 0, regResult+1);
93076
+ sqlite3VdbeAddOp4(v, OP_String8, 0, regResult+2, 0,
93077
+ pFK->zTo, P4_TRANSIENT);
93078
+ sqlite3VdbeAddOp2(v, OP_Integer, i-1, regResult+3);
93079
+ sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, 4);
93080
+ sqlite3VdbeResolveLabel(v, addrOk);
93081
+ sqlite3DbFree(db, aiCols);
93082
+ }
93083
+ sqlite3VdbeAddOp2(v, OP_Next, 0, addrTop+1);
93084
+ sqlite3VdbeJumpHere(v, addrTop);
93085
+ }
9288693086
}else
9288793087
#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
9288893088
9288993089
#ifndef NDEBUG
9289093090
if( sqlite3StrICmp(zLeft, "parser_trace")==0 ){
@@ -94340,11 +94540,11 @@
9434094540
SrcList *pSrc, /* the FROM clause -- which tables to scan */
9434194541
Expr *pWhere, /* the WHERE clause */
9434294542
ExprList *pGroupBy, /* the GROUP BY clause */
9434394543
Expr *pHaving, /* the HAVING clause */
9434494544
ExprList *pOrderBy, /* the ORDER BY clause */
94345
- int isDistinct, /* true if the DISTINCT keyword is present */
94545
+ u16 selFlags, /* Flag parameters, such as SF_Distinct */
9434694546
Expr *pLimit, /* LIMIT value. NULL means not used */
9434794547
Expr *pOffset /* OFFSET value. NULL means no offset */
9434894548
){
9434994549
Select *pNew;
9435094550
Select standin;
@@ -94364,11 +94564,11 @@
9436494564
pNew->pSrc = pSrc;
9436594565
pNew->pWhere = pWhere;
9436694566
pNew->pGroupBy = pGroupBy;
9436794567
pNew->pHaving = pHaving;
9436894568
pNew->pOrderBy = pOrderBy;
94369
- pNew->selFlags = isDistinct ? SF_Distinct : 0;
94569
+ pNew->selFlags = selFlags;
9437094570
pNew->op = TK_SELECT;
9437194571
pNew->pLimit = pLimit;
9437294572
pNew->pOffset = pOffset;
9437394573
assert( pOffset==0 || pLimit!=0 );
9437494574
pNew->addrOpenEphm[0] = -1;
@@ -95621,12 +95821,10 @@
9562195821
9562295822
for(i=0, pCol=aCol; i<nCol; i++, pCol++){
9562395823
/* Get an appropriate name for the column
9562495824
*/
9562595825
p = sqlite3ExprSkipCollate(pEList->a[i].pExpr);
95626
- assert( p->pRight==0 || ExprHasProperty(p->pRight, EP_IntValue)
95627
- || p->pRight->u.zToken==0 || p->pRight->u.zToken[0]!=0 );
9562895826
if( (zName = pEList->a[i].zName)!=0 ){
9562995827
/* If the column contains an "AS <name>" phrase, use <name> as the name */
9563095828
zName = sqlite3DbStrDup(db, zName);
9563195829
}else{
9563295830
Expr *pColExpr = p; /* The expression that is the result column name */
@@ -95660,10 +95858,13 @@
9566095858
*/
9566195859
nName = sqlite3Strlen30(zName);
9566295860
for(j=cnt=0; j<i; j++){
9566395861
if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
9566495862
char *zNewName;
95863
+ int k;
95864
+ for(k=nName-1; k>1 && sqlite3Isdigit(zName[k]); k--){}
95865
+ if( zName[k]==':' ) nName = k;
9566595866
zName[nName] = 0;
9566695867
zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
9566795868
sqlite3DbFree(db, zName);
9566895869
zName = zNewName;
9566995870
j = -1;
@@ -97576,10 +97777,11 @@
9757697777
int i, j, k;
9757797778
SrcList *pTabList;
9757897779
ExprList *pEList;
9757997780
struct SrcList_item *pFrom;
9758097781
sqlite3 *db = pParse->db;
97782
+ Expr *pE, *pRight, *pExpr;
9758197783
9758297784
if( db->mallocFailed ){
9758397785
return WRC_Abort;
9758497786
}
9758597787
if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
@@ -97661,11 +97863,11 @@
9766197863
**
9766297864
** The first loop just checks to see if there are any "*" operators
9766397865
** that need expanding.
9766497866
*/
9766597867
for(k=0; k<pEList->nExpr; k++){
97666
- Expr *pE = pEList->a[k].pExpr;
97868
+ pE = pEList->a[k].pExpr;
9766797869
if( pE->op==TK_ALL ) break;
9766897870
assert( pE->op!=TK_DOT || pE->pRight!=0 );
9766997871
assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) );
9767097872
if( pE->op==TK_DOT && pE->pRight->op==TK_ALL ) break;
9767197873
}
@@ -97679,14 +97881,22 @@
9767997881
ExprList *pNew = 0;
9768097882
int flags = pParse->db->flags;
9768197883
int longNames = (flags & SQLITE_FullColNames)!=0
9768297884
&& (flags & SQLITE_ShortColNames)==0;
9768397885
97886
+ /* When processing FROM-clause subqueries, it is always the case
97887
+ ** that full_column_names=OFF and short_column_names=ON. The
97888
+ ** sqlite3ResultSetOfSelect() routine makes it so. */
97889
+ assert( (p->selFlags & SF_NestedFrom)==0
97890
+ || ((flags & SQLITE_FullColNames)==0 &&
97891
+ (flags & SQLITE_ShortColNames)!=0) );
97892
+
9768497893
for(k=0; k<pEList->nExpr; k++){
97685
- Expr *pE = a[k].pExpr;
97686
- assert( pE->op!=TK_DOT || pE->pRight!=0 );
97687
- if( pE->op!=TK_ALL && (pE->op!=TK_DOT || pE->pRight->op!=TK_ALL) ){
97894
+ pE = a[k].pExpr;
97895
+ pRight = pE->pRight;
97896
+ assert( pE->op!=TK_DOT || pRight!=0 );
97897
+ if( pE->op!=TK_ALL && (pE->op!=TK_DOT || pRight->op!=TK_ALL) ){
9768897898
/* This particular expression does not need to be expanded.
9768997899
*/
9769097900
pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr);
9769197901
if( pNew ){
9769297902
pNew->a[pNew->nExpr-1].zName = a[k].zName;
@@ -97697,44 +97907,56 @@
9769797907
a[k].pExpr = 0;
9769897908
}else{
9769997909
/* This expression is a "*" or a "TABLE.*" and needs to be
9770097910
** expanded. */
9770197911
int tableSeen = 0; /* Set to 1 when TABLE matches */
97702
- char *zTName; /* text of name of TABLE */
97912
+ char *zTName = 0; /* text of name of TABLE */
9770397913
if( pE->op==TK_DOT ){
9770497914
assert( pE->pLeft!=0 );
9770597915
assert( !ExprHasProperty(pE->pLeft, EP_IntValue) );
9770697916
zTName = pE->pLeft->u.zToken;
97707
- }else{
97708
- zTName = 0;
9770997917
}
9771097918
for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
9771197919
Table *pTab = pFrom->pTab;
97920
+ Select *pSub = pFrom->pSelect;
9771297921
char *zTabName = pFrom->zAlias;
97922
+ const char *zSchemaName = 0;
97923
+ int iDb;
9771397924
if( zTabName==0 ){
9771497925
zTabName = pTab->zName;
9771597926
}
9771697927
if( db->mallocFailed ) break;
97717
- if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){
97718
- continue;
97928
+ if( pSub==0 || (pSub->selFlags & SF_NestedFrom)==0 ){
97929
+ pSub = 0;
97930
+ if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){
97931
+ continue;
97932
+ }
97933
+ iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
97934
+ zSchemaName = iDb>=0 ? db->aDb[iDb].zName : "*";
9771997935
}
97720
- tableSeen = 1;
9772197936
for(j=0; j<pTab->nCol; j++){
97722
- Expr *pExpr, *pRight;
9772397937
char *zName = pTab->aCol[j].zName;
9772497938
char *zColname; /* The computed column name */
9772597939
char *zToFree; /* Malloced string that needs to be freed */
9772697940
Token sColname; /* Computed column name as a token */
97941
+
97942
+ assert( zName );
97943
+ if( zTName && pSub
97944
+ && sqlite3MatchSpanName(pSub->pEList->a[j].zSpan, 0, zTName, 0)==0
97945
+ ){
97946
+ continue;
97947
+ }
9772797948
9772897949
/* If a column is marked as 'hidden' (currently only possible
9772997950
** for virtual tables), do not include it in the expanded
9773097951
** result-set list.
9773197952
*/
9773297953
if( IsHiddenColumn(&pTab->aCol[j]) ){
9773397954
assert(IsVirtual(pTab));
9773497955
continue;
9773597956
}
97957
+ tableSeen = 1;
9773697958
9773797959
if( i>0 && zTName==0 ){
9773897960
if( (pFrom->jointype & JT_NATURAL)!=0
9773997961
&& tableAndColumnIndex(pTabList, i, zName, 0, 0)
9774097962
){
@@ -97753,10 +97975,14 @@
9775397975
zToFree = 0;
9775497976
if( longNames || pTabList->nSrc>1 ){
9775597977
Expr *pLeft;
9775697978
pLeft = sqlite3Expr(db, TK_ID, zTabName);
9775797979
pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
97980
+ if( zSchemaName ){
97981
+ pLeft = sqlite3Expr(db, TK_ID, zSchemaName);
97982
+ pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pExpr, 0);
97983
+ }
9775897984
if( longNames ){
9775997985
zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
9776097986
zToFree = zColname;
9776197987
}
9776297988
}else{
@@ -97764,10 +97990,22 @@
9776497990
}
9776597991
pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
9776697992
sColname.z = zColname;
9776797993
sColname.n = sqlite3Strlen30(zColname);
9776897994
sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
97995
+ if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
97996
+ struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
97997
+ if( pSub ){
97998
+ pX->zSpan = sqlite3DbStrDup(db, pSub->pEList->a[j].zSpan);
97999
+ testcase( pX->zSpan==0 );
98000
+ }else{
98001
+ pX->zSpan = sqlite3MPrintf(db, "%s.%s.%s",
98002
+ zSchemaName, zTabName, zColname);
98003
+ testcase( pX->zSpan==0 );
98004
+ }
98005
+ pX->bSpanIsTab = 1;
98006
+ }
9776998007
sqlite3DbFree(db, zToFree);
9777098008
}
9777198009
}
9777298010
if( !tableSeen ){
9777398011
if( zTName ){
@@ -102869,11 +103107,11 @@
102869103107
sqlite3DbFree(db, pOld);
102870103108
}
102871103109
pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
102872103110
}
102873103111
pTerm = &pWC->a[idx = pWC->nTerm++];
102874
- pTerm->pExpr = p;
103112
+ pTerm->pExpr = sqlite3ExprSkipCollate(p);
102875103113
pTerm->wtFlags = wtFlags;
102876103114
pTerm->pWC = pWC;
102877103115
pTerm->iParent = -1;
102878103116
return idx;
102879103117
}
@@ -103654,11 +103892,12 @@
103654103892
if( db->mallocFailed ){
103655103893
return;
103656103894
}
103657103895
pTerm = &pWC->a[idxTerm];
103658103896
pMaskSet = pWC->pMaskSet;
103659
- pExpr = sqlite3ExprSkipCollate(pTerm->pExpr);
103897
+ pExpr = pTerm->pExpr;
103898
+ assert( pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE );
103660103899
prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft);
103661103900
op = pExpr->op;
103662103901
if( op==TK_IN ){
103663103902
assert( pExpr->pRight==0 );
103664103903
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
@@ -105767,11 +106006,11 @@
105767106006
int bRev = 2;
105768106007
WHERETRACE((" --> before isSortingIndex: nPriorSat=%d\n",nPriorSat));
105769106008
pc.plan.nOBSat = isSortingIndex(p, pProbe, iCur, &bRev);
105770106009
WHERETRACE((" --> after isSortingIndex: bRev=%d nOBSat=%d\n",
105771106010
bRev, pc.plan.nOBSat));
105772
- if( nPriorSat<pc.plan.nOBSat || (pc.plan.wsFlags & WHERE_UNIQUE)!=0 ){
106011
+ if( nPriorSat<pc.plan.nOBSat || (pc.plan.wsFlags & WHERE_ALL_UNIQUE)!=0 ){
105773106012
pc.plan.wsFlags |= WHERE_ORDERED;
105774106013
}
105775106014
if( nOrderBy==pc.plan.nOBSat ){
105776106015
bSort = 0;
105777106016
pc.plan.wsFlags |= WHERE_ROWID_RANGE|WHERE_COLUMN_RANGE;
@@ -108237,10 +108476,11 @@
108237108476
Expr* yy122;
108238108477
Select* yy159;
108239108478
IdList* yy180;
108240108479
struct {int value; int mask;} yy207;
108241108480
u8 yy258;
108481
+ u16 yy305;
108242108482
struct LikeOp yy318;
108243108483
TriggerStep* yy327;
108244108484
ExprSpan yy342;
108245108485
SrcList* yy347;
108246108486
int yy392;
@@ -110187,22 +110427,19 @@
110187110427
case 82: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==82);
110188110428
case 84: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==84);
110189110429
case 86: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==86);
110190110430
case 98: /* defer_subclause_opt ::= */ yytestcase(yyruleno==98);
110191110431
case 109: /* ifexists ::= */ yytestcase(yyruleno==109);
110192
- case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120);
110193
- case 121: /* distinct ::= */ yytestcase(yyruleno==121);
110194110432
case 221: /* between_op ::= BETWEEN */ yytestcase(yyruleno==221);
110195110433
case 224: /* in_op ::= IN */ yytestcase(yyruleno==224);
110196110434
{yygotominor.yy392 = 0;}
110197110435
break;
110198110436
case 29: /* ifnotexists ::= IF NOT EXISTS */
110199110437
case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
110200110438
case 70: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==70);
110201110439
case 85: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==85);
110202110440
case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108);
110203
- case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119);
110204110441
case 222: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==222);
110205110442
case 225: /* in_op ::= NOT IN */ yytestcase(yyruleno==225);
110206110443
{yygotominor.yy392 = 1;}
110207110444
break;
110208110445
case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
@@ -110438,12 +110675,19 @@
110438110675
case 116: /* multiselect_op ::= UNION ALL */
110439110676
{yygotominor.yy392 = TK_ALL;}
110440110677
break;
110441110678
case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
110442110679
{
110443
- yygotominor.yy159 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy442,yymsp[-5].minor.yy347,yymsp[-4].minor.yy122,yymsp[-3].minor.yy442,yymsp[-2].minor.yy122,yymsp[-1].minor.yy442,yymsp[-7].minor.yy392,yymsp[0].minor.yy64.pLimit,yymsp[0].minor.yy64.pOffset);
110680
+ yygotominor.yy159 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy442,yymsp[-5].minor.yy347,yymsp[-4].minor.yy122,yymsp[-3].minor.yy442,yymsp[-2].minor.yy122,yymsp[-1].minor.yy442,yymsp[-7].minor.yy305,yymsp[0].minor.yy64.pLimit,yymsp[0].minor.yy64.pOffset);
110444110681
}
110682
+ break;
110683
+ case 119: /* distinct ::= DISTINCT */
110684
+{yygotominor.yy305 = SF_Distinct;}
110685
+ break;
110686
+ case 120: /* distinct ::= ALL */
110687
+ case 121: /* distinct ::= */ yytestcase(yyruleno==121);
110688
+{yygotominor.yy305 = 0;}
110445110689
break;
110446110690
case 122: /* sclp ::= selcollist COMMA */
110447110691
case 246: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==246);
110448110692
{yygotominor.yy442 = yymsp[-1].minor.yy442;}
110449110693
break;
@@ -110509,14 +110753,24 @@
110509110753
break;
110510110754
case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
110511110755
{
110512110756
if( yymsp[-6].minor.yy347==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy122==0 && yymsp[0].minor.yy180==0 ){
110513110757
yygotominor.yy347 = yymsp[-4].minor.yy347;
110758
+ }else if( yymsp[-4].minor.yy347->nSrc==1 ){
110759
+ yygotominor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy122,yymsp[0].minor.yy180);
110760
+ if( yygotominor.yy347 ){
110761
+ struct SrcList_item *pNew = &yygotominor.yy347->a[yygotominor.yy347->nSrc-1];
110762
+ struct SrcList_item *pOld = yymsp[-4].minor.yy347->a;
110763
+ pNew->zName = pOld->zName;
110764
+ pNew->zDatabase = pOld->zDatabase;
110765
+ pOld->zName = pOld->zDatabase = 0;
110766
+ }
110767
+ sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy347);
110514110768
}else{
110515110769
Select *pSubquery;
110516110770
sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy347);
110517
- pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy347,0,0,0,0,0,0,0);
110771
+ pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy347,0,0,0,0,SF_NestedFrom,0,0);
110518110772
yygotominor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy122,yymsp[0].minor.yy180);
110519110773
}
110520110774
}
110521110775
break;
110522110776
case 137: /* dbnm ::= */
@@ -110745,11 +110999,11 @@
110745110999
if( yymsp[-1].minor.yy442 && yymsp[-1].minor.yy442->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
110746111000
sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
110747111001
}
110748111002
yygotominor.yy342.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy442, &yymsp[-4].minor.yy0);
110749111003
spanSet(&yygotominor.yy342,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
110750
- if( yymsp[-2].minor.yy392 && yygotominor.yy342.pExpr ){
111004
+ if( yymsp[-2].minor.yy305 && yygotominor.yy342.pExpr ){
110751111005
yygotominor.yy342.pExpr->flags |= EP_Distinct;
110752111006
}
110753111007
}
110754111008
break;
110755111009
case 197: /* expr ::= ID LP STAR RP */
110756111010
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -673,11 +673,11 @@
673 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
674 ** [sqlite_version()] and [sqlite_source_id()].
675 */
676 #define SQLITE_VERSION "3.7.16"
677 #define SQLITE_VERSION_NUMBER 3007016
678 #define SQLITE_SOURCE_ID "2012-12-14 17:54:38 3d65c70343196b8f69c5293e7703839846fade85"
679
680 /*
681 ** CAPI3REF: Run-Time Library Version Numbers
682 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
683 **
@@ -10553,24 +10553,24 @@
10553 ** and the value of Index.onError indicate the which conflict resolution
10554 ** algorithm to employ whenever an attempt is made to insert a non-unique
10555 ** element.
10556 */
10557 struct Index {
10558 char *zName; /* Name of this index */
10559 int *aiColumn; /* Which columns are used by this index. 1st is 0 */
10560 tRowcnt *aiRowEst; /* Result of ANALYZE: Est. rows selected by each column */
10561 Table *pTable; /* The SQL table being indexed */
10562 char *zColAff; /* String defining the affinity of each column */
10563 Index *pNext; /* The next index associated with the same table */
10564 Schema *pSchema; /* Schema containing this index */
10565 u8 *aSortOrder; /* Array of size Index.nColumn. True==DESC, False==ASC */
10566 char **azColl; /* Array of collation sequence names for index */
10567 int nColumn; /* Number of columns in the table used by this index */
10568 int tnum; /* Page containing root of this index in database file */
10569 u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
10570 u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */
10571 u8 bUnordered; /* Use this index for == or IN queries only */
10572 #ifdef SQLITE_ENABLE_STAT3
10573 int nSample; /* Number of elements in aSample[] */
10574 tRowcnt avgEq; /* Average nEq value for key values not in aSample */
10575 IndexSample *aSample; /* Samples of the left-most key */
10576 #endif
@@ -10840,22 +10840,31 @@
10840 ** name. An expr/name combination can be used in several ways, such
10841 ** as the list of "expr AS ID" fields following a "SELECT" or in the
10842 ** list of "ID = expr" items in an UPDATE. A list of expressions can
10843 ** also be used as the argument to a function, in which case the a.zName
10844 ** field is not used.
 
 
 
 
 
 
 
 
10845 */
10846 struct ExprList {
10847 int nExpr; /* Number of expressions on the list */
10848 int iECursor; /* VDBE Cursor associated with this ExprList */
10849 struct ExprList_item { /* For each expression in the list */
10850 Expr *pExpr; /* The list of expressions */
10851 char *zName; /* Token associated with this expression */
10852 char *zSpan; /* Original text of the expression */
10853 u8 sortOrder; /* 1 for DESC or 0 for ASC */
10854 u8 done; /* A flag to indicate when processing is finished */
10855 u16 iOrderByCol; /* For ORDER BY, column number in result set */
10856 u16 iAlias; /* Index into Parse.aAlias[] for zName */
 
10857 } *a; /* Alloc a power of two greater or equal to nExpr */
10858 };
10859
10860 /*
10861 ** An instance of this structure is used by the parser to record both
@@ -11171,10 +11180,11 @@
11171 #define SF_Expanded 0x0010 /* sqlite3SelectExpand() called on this */
11172 #define SF_HasTypeInfo 0x0020 /* FROM subqueries have Table metadata */
11173 #define SF_UseSorter 0x0040 /* Sort using a sorter */
11174 #define SF_Values 0x0080 /* Synthesized from VALUES clause */
11175 #define SF_Materialize 0x0100 /* Force materialization of views */
 
11176
11177
11178 /*
11179 ** The results of a select can be distributed in several ways. The
11180 ** "SRT" prefix means "SELECT Result Type".
@@ -11883,11 +11893,11 @@
11883 SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
11884 Token*, int, int);
11885 SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int);
11886 SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*);
11887 SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,
11888 Expr*,ExprList*,int,Expr*,Expr*);
11889 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
11890 SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*);
11891 SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int);
11892 SQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);
11893 #if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
@@ -12140,10 +12150,11 @@
12140 SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
12141 SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
12142 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
12143 SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int);
12144 SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
 
12145 SQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*);
12146 SQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);
12147 SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
12148 SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
12149 SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
@@ -12278,12 +12289,14 @@
12278 #define sqlite3FkOldmask(a,b) 0
12279 #define sqlite3FkRequired(a,b,c,d) 0
12280 #endif
12281 #ifndef SQLITE_OMIT_FOREIGN_KEY
12282 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*);
 
12283 #else
12284 #define sqlite3FkDelete(a,b)
 
12285 #endif
12286
12287
12288 /*
12289 ** Available fault injectors. Should be numbered beginning with 0.
@@ -23286,15 +23299,11 @@
23286 { "pwrite64", (sqlite3_syscall_ptr)0, 0 },
23287 #endif
23288 #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\
23289 aSyscall[13].pCurrent)
23290
23291 #if SQLITE_ENABLE_LOCKING_STYLE
23292 { "fchmod", (sqlite3_syscall_ptr)fchmod, 0 },
23293 #else
23294 { "fchmod", (sqlite3_syscall_ptr)0, 0 },
23295 #endif
23296 #define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent)
23297
23298 #if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
23299 { "fallocate", (sqlite3_syscall_ptr)posix_fallocate, 0 },
23300 #else
@@ -23315,13 +23324,10 @@
23315 #define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent)
23316
23317 { "fchown", (sqlite3_syscall_ptr)posixFchown, 0 },
23318 #define osFchown ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
23319
23320 { "umask", (sqlite3_syscall_ptr)umask, 0 },
23321 #define osUmask ((mode_t(*)(mode_t))aSyscall[21].pCurrent)
23322
23323 }; /* End of the overrideable system calls */
23324
23325 /*
23326 ** This is the xSetSystemCall() method of sqlite3_vfs for all of the
23327 ** "unix" VFSes. Return SQLITE_OK opon successfully updating the
@@ -23422,31 +23428,29 @@
23422 ** process that is able to write to the database will also be able to
23423 ** recover the hot journals.
23424 */
23425 static int robust_open(const char *z, int f, mode_t m){
23426 int fd;
23427 mode_t m2;
23428 mode_t origM = 0;
23429 if( m==0 ){
23430 m2 = SQLITE_DEFAULT_FILE_PERMISSIONS;
23431 }else{
23432 m2 = m;
23433 origM = osUmask(0);
23434 }
23435 do{
23436 #if defined(O_CLOEXEC)
23437 fd = osOpen(z,f|O_CLOEXEC,m2);
23438 #else
23439 fd = osOpen(z,f,m2);
23440 #endif
23441 }while( fd<0 && errno==EINTR );
23442 if( m ){
23443 osUmask(origM);
23444 }
 
 
 
 
23445 #if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0)
23446 if( fd>=0 ) osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
23447 #endif
 
23448 return fd;
23449 }
23450
23451 /*
23452 ** Helper functions to obtain and relinquish the global mutex. The
@@ -29868,11 +29872,11 @@
29868 };
29869 unsigned int i; /* Loop counter */
29870
29871 /* Double-check that the aSyscall[] array has been constructed
29872 ** correctly. See ticket [bb3a86e890c8e96ab] */
29873 assert( ArraySize(aSyscall)==22 );
29874
29875 /* Register all VFSes defined in the aVfs[] array */
29876 for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){
29877 sqlite3_vfs_register(&aVfs[i], i==0);
29878 }
@@ -56869,11 +56873,16 @@
56869 /*
56870 ** Parameter zSrcData points to a buffer containing the data for
56871 ** page iSrcPg from the source database. Copy this data into the
56872 ** destination database.
56873 */
56874 static int backupOnePage(sqlite3_backup *p, Pgno iSrcPg, const u8 *zSrcData){
 
 
 
 
 
56875 Pager * const pDestPager = sqlite3BtreePager(p->pDest);
56876 const int nSrcPgsz = sqlite3BtreeGetPageSize(p->pSrc);
56877 int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);
56878 const int nCopy = MIN(nSrcPgsz, nDestPgsz);
56879 const i64 iEnd = (i64)iSrcPg*(i64)nSrcPgsz;
@@ -56942,10 +56951,13 @@
56942 ** cached parse of the page). MemPage.isInit is marked
56943 ** "MUST BE FIRST" for this purpose.
56944 */
56945 memcpy(zOut, zIn, nCopy);
56946 ((u8 *)sqlite3PagerGetExtra(pDestPg))[0] = 0;
 
 
 
56947 }
56948 sqlite3PagerUnref(pDestPg);
56949 }
56950
56951 return rc;
@@ -57048,11 +57060,11 @@
57048 const Pgno iSrcPg = p->iNext; /* Source page number */
57049 if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
57050 DbPage *pSrcPg; /* Source page object */
57051 rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
57052 if( rc==SQLITE_OK ){
57053 rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg));
57054 sqlite3PagerUnref(pSrcPg);
57055 }
57056 }
57057 p->iNext++;
57058 }
@@ -57296,11 +57308,11 @@
57296 ** the new data into the backup.
57297 */
57298 int rc;
57299 assert( p->pDestDb );
57300 sqlite3_mutex_enter(p->pDestDb->mutex);
57301 rc = backupOnePage(p, iPage, aData);
57302 sqlite3_mutex_leave(p->pDestDb->mutex);
57303 assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
57304 if( rc!=SQLITE_OK ){
57305 p->rc = rc;
57306 }
@@ -71890,10 +71902,18 @@
71890 p->pReal = pReal;
71891 if( p->iSize>0 ){
71892 assert(p->iSize<=p->nBuf);
71893 rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0);
71894 }
 
 
 
 
 
 
 
 
71895 }
71896 }
71897 return rc;
71898 }
71899
@@ -72636,10 +72656,39 @@
72636 }
72637 }
72638 return 0;
72639 }
72640
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72641
72642 /*
72643 ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
72644 ** that name in the set of source tables in pSrcList and make the pExpr
72645 ** expression node refer back to that source column. The following changes
@@ -72691,44 +72740,63 @@
72691
72692 /* Initialize the node to no-match */
72693 pExpr->iTable = -1;
72694 pExpr->pTab = 0;
72695 ExprSetIrreducible(pExpr);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72696
72697 /* Start at the inner-most context and move outward until a match is found */
72698 while( pNC && cnt==0 ){
72699 ExprList *pEList;
72700 SrcList *pSrcList = pNC->pSrcList;
72701
72702 if( pSrcList ){
72703 for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
72704 Table *pTab;
72705 int iDb;
72706 Column *pCol;
72707
72708 pTab = pItem->pTab;
72709 assert( pTab!=0 && pTab->zName!=0 );
72710 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
72711 assert( pTab->nCol>0 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72712 if( zTab ){
72713 if( pItem->zAlias ){
72714 char *zTabName = pItem->zAlias;
72715 if( sqlite3StrICmp(zTabName, zTab)!=0 ) continue;
72716 }else{
72717 char *zTabName = pTab->zName;
72718 if( NEVER(zTabName==0) || sqlite3StrICmp(zTabName, zTab)!=0 ){
72719 continue;
72720 }
72721 if( zDb!=0 && sqlite3StrICmp(db->aDb[iDb].zName, zDb)!=0 ){
72722 continue;
72723 }
72724 }
72725 }
72726 if( 0==(cntTab++) ){
72727 pExpr->iTable = pItem->iCursor;
72728 pExpr->pTab = pTab;
72729 pSchema = pTab->pSchema;
72730 pMatch = pItem;
72731 }
72732 for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){
72733 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
72734 /* If there has been exactly one prior match and this match
@@ -72738,21 +72806,23 @@
72738 if( cnt==1 ){
72739 if( pItem->jointype & JT_NATURAL ) continue;
72740 if( nameInUsingClause(pItem->pUsing, zCol) ) continue;
72741 }
72742 cnt++;
72743 pExpr->iTable = pItem->iCursor;
72744 pExpr->pTab = pTab;
72745 pMatch = pItem;
72746 pSchema = pTab->pSchema;
72747 /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
72748 pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j;
72749 break;
72750 }
72751 }
72752 }
72753 }
 
 
 
 
 
72754
72755 #ifndef SQLITE_OMIT_TRIGGER
72756 /* If we have not already resolved the name, then maybe
72757 ** it is a new.* or old.* trigger argument reference
72758 */
@@ -73083,11 +73153,11 @@
73083 #endif
73084 if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){
73085 sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
73086 pNC->nErr++;
73087 is_agg = 0;
73088 }else if( no_such_func ){
73089 sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
73090 pNC->nErr++;
73091 }else if( wrong_num_args ){
73092 sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
73093 nId, zId);
@@ -73519,27 +73589,10 @@
73519 if( sqlite3ResolveExprNames(&sNC, p->pLimit) ||
73520 sqlite3ResolveExprNames(&sNC, p->pOffset) ){
73521 return WRC_Abort;
73522 }
73523
73524 /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
73525 ** resolve the result-set expression list.
73526 */
73527 sNC.ncFlags = NC_AllowAgg;
73528 sNC.pSrcList = p->pSrc;
73529 sNC.pNext = pOuterNC;
73530
73531 /* Resolve names in the result set. */
73532 pEList = p->pEList;
73533 assert( pEList!=0 );
73534 for(i=0; i<pEList->nExpr; i++){
73535 Expr *pX = pEList->a[i].pExpr;
73536 if( sqlite3ResolveExprNames(&sNC, pX) ){
73537 return WRC_Abort;
73538 }
73539 }
73540
73541 /* Recursively resolve names in all subqueries
73542 */
73543 for(i=0; i<p->pSrc->nSrc; i++){
73544 struct SrcList_item *pItem = &p->pSrc->a[i];
73545 if( pItem->pSelect ){
@@ -73562,10 +73615,27 @@
73562 for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef -= pNC->nRef;
73563 assert( pItem->isCorrelated==0 && nRef<=0 );
73564 pItem->isCorrelated = (nRef!=0);
73565 }
73566 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73567
73568 /* If there are no aggregate functions in the result-set, and no GROUP BY
73569 ** expression, do not allow aggregates in any of the other expressions.
73570 */
73571 assert( (p->selFlags & SF_Aggregate)==0 );
@@ -77046,10 +77116,16 @@
77046 for(i=0; i<pList->nExpr; i++){
77047 sqlite3ExplainPrintf(pOut, "item[%d] = ", i);
77048 sqlite3ExplainPush(pOut);
77049 sqlite3ExplainExpr(pOut, pList->a[i].pExpr);
77050 sqlite3ExplainPop(pOut);
 
 
 
 
 
 
77051 if( i<pList->nExpr-1 ){
77052 sqlite3ExplainNL(pOut);
77053 }
77054 }
77055 sqlite3ExplainPop(pOut);
@@ -87523,11 +87599,11 @@
87523
87524 /*
87525 ** A foreign key constraint requires that the key columns in the parent
87526 ** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
87527 ** Given that pParent is the parent table for foreign key constraint pFKey,
87528 ** search the schema a unique index on the parent key columns.
87529 **
87530 ** If successful, zero is returned. If the parent key is an INTEGER PRIMARY
87531 ** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx
87532 ** is set to point to the unique index.
87533 **
@@ -87559,11 +87635,11 @@
87559 **
87560 ** then non-zero is returned, and a "foreign key mismatch" error loaded
87561 ** into pParse. If an OOM error occurs, non-zero is returned and the
87562 ** pParse->db->mallocFailed flag is set.
87563 */
87564 static int locateFkeyIndex(
87565 Parse *pParse, /* Parse context to store any error in */
87566 Table *pParent, /* Parent table of FK constraint pFKey */
87567 FKey *pFKey, /* Foreign key to find index for */
87568 Index **ppIdx, /* OUT: Unique index on parent table */
87569 int **paiCol /* OUT: Map of index columns in pFKey */
@@ -87656,11 +87732,13 @@
87656 }
87657 }
87658
87659 if( !pIdx ){
87660 if( !pParse->disableTriggers ){
87661 sqlite3ErrorMsg(pParse, "foreign key mismatch");
 
 
87662 }
87663 sqlite3DbFree(pParse->db, aiCol);
87664 return 1;
87665 }
87666
@@ -88117,11 +88195,11 @@
88117 if( pParse->disableTriggers ){
88118 pTo = sqlite3FindTable(db, pFKey->zTo, zDb);
88119 }else{
88120 pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);
88121 }
88122 if( !pTo || locateFkeyIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
88123 assert( isIgnoreErrors==0 || (regOld!=0 && regNew==0) );
88124 if( !isIgnoreErrors || db->mallocFailed ) return;
88125 if( pTo==0 ){
88126 /* If isIgnoreErrors is true, then a table is being dropped. In this
88127 ** case SQLite runs a "DELETE FROM xxx" on the table being dropped
@@ -88197,11 +88275,11 @@
88197 /* Inserting a single row into a parent table cannot cause an immediate
88198 ** foreign key violation. So do nothing in this case. */
88199 continue;
88200 }
88201
88202 if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){
88203 if( !isIgnoreErrors || db->mallocFailed ) return;
88204 continue;
88205 }
88206 assert( aiCol || pFKey->nCol==1 );
88207
@@ -88252,11 +88330,11 @@
88252 for(p=pTab->pFKey; p; p=p->pNextFrom){
88253 for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);
88254 }
88255 for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
88256 Index *pIdx = 0;
88257 locateFkeyIndex(pParse, pTab, p, &pIdx, 0);
88258 if( pIdx ){
88259 for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
88260 }
88261 }
88262 }
@@ -88378,11 +88456,11 @@
88378 ExprList *pList = 0; /* Changes list if ON UPDATE CASCADE */
88379 Select *pSelect = 0; /* If RESTRICT, "SELECT RAISE(...)" */
88380 int i; /* Iterator variable */
88381 Expr *pWhen = 0; /* WHEN clause for the trigger */
88382
88383 if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;
88384 assert( aiCol || pFKey->nCol==1 );
88385
88386 for(i=0; i<pFKey->nCol; i++){
88387 Token tOld = { "old", 3 }; /* Literal "old" token */
88388 Token tNew = { "new", 3 }; /* Literal "new" token */
@@ -92718,13 +92796,15 @@
92718 if( sqlite3StrICmp(zLeft, "table_info")==0 && zRight ){
92719 Table *pTab;
92720 if( sqlite3ReadSchema(pParse) ) goto pragma_out;
92721 pTab = sqlite3FindTable(db, zRight, zDb);
92722 if( pTab ){
92723 int i;
92724 int nHidden = 0;
92725 Column *pCol;
 
 
92726 sqlite3VdbeSetNumCols(v, 6);
92727 pParse->nMem = 6;
92728 sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cid", SQLITE_STATIC);
92729 sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
92730 sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "type", SQLITE_STATIC);
@@ -92745,12 +92825,18 @@
92745 if( pCol->zDflt ){
92746 sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0);
92747 }else{
92748 sqlite3VdbeAddOp2(v, OP_Null, 0, 5);
92749 }
92750 sqlite3VdbeAddOp2(v, OP_Integer,
92751 (pCol->colFlags&COLFLAG_PRIMKEY)!=0, 6);
 
 
 
 
 
 
92752 sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6);
92753 }
92754 }
92755 }else
92756
@@ -92881,10 +92967,124 @@
92881 ++i;
92882 pFK = pFK->pNextFrom;
92883 }
92884 }
92885 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92886 }else
92887 #endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
92888
92889 #ifndef NDEBUG
92890 if( sqlite3StrICmp(zLeft, "parser_trace")==0 ){
@@ -94340,11 +94540,11 @@
94340 SrcList *pSrc, /* the FROM clause -- which tables to scan */
94341 Expr *pWhere, /* the WHERE clause */
94342 ExprList *pGroupBy, /* the GROUP BY clause */
94343 Expr *pHaving, /* the HAVING clause */
94344 ExprList *pOrderBy, /* the ORDER BY clause */
94345 int isDistinct, /* true if the DISTINCT keyword is present */
94346 Expr *pLimit, /* LIMIT value. NULL means not used */
94347 Expr *pOffset /* OFFSET value. NULL means no offset */
94348 ){
94349 Select *pNew;
94350 Select standin;
@@ -94364,11 +94564,11 @@
94364 pNew->pSrc = pSrc;
94365 pNew->pWhere = pWhere;
94366 pNew->pGroupBy = pGroupBy;
94367 pNew->pHaving = pHaving;
94368 pNew->pOrderBy = pOrderBy;
94369 pNew->selFlags = isDistinct ? SF_Distinct : 0;
94370 pNew->op = TK_SELECT;
94371 pNew->pLimit = pLimit;
94372 pNew->pOffset = pOffset;
94373 assert( pOffset==0 || pLimit!=0 );
94374 pNew->addrOpenEphm[0] = -1;
@@ -95621,12 +95821,10 @@
95621
95622 for(i=0, pCol=aCol; i<nCol; i++, pCol++){
95623 /* Get an appropriate name for the column
95624 */
95625 p = sqlite3ExprSkipCollate(pEList->a[i].pExpr);
95626 assert( p->pRight==0 || ExprHasProperty(p->pRight, EP_IntValue)
95627 || p->pRight->u.zToken==0 || p->pRight->u.zToken[0]!=0 );
95628 if( (zName = pEList->a[i].zName)!=0 ){
95629 /* If the column contains an "AS <name>" phrase, use <name> as the name */
95630 zName = sqlite3DbStrDup(db, zName);
95631 }else{
95632 Expr *pColExpr = p; /* The expression that is the result column name */
@@ -95660,10 +95858,13 @@
95660 */
95661 nName = sqlite3Strlen30(zName);
95662 for(j=cnt=0; j<i; j++){
95663 if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
95664 char *zNewName;
 
 
 
95665 zName[nName] = 0;
95666 zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
95667 sqlite3DbFree(db, zName);
95668 zName = zNewName;
95669 j = -1;
@@ -97576,10 +97777,11 @@
97576 int i, j, k;
97577 SrcList *pTabList;
97578 ExprList *pEList;
97579 struct SrcList_item *pFrom;
97580 sqlite3 *db = pParse->db;
 
97581
97582 if( db->mallocFailed ){
97583 return WRC_Abort;
97584 }
97585 if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
@@ -97661,11 +97863,11 @@
97661 **
97662 ** The first loop just checks to see if there are any "*" operators
97663 ** that need expanding.
97664 */
97665 for(k=0; k<pEList->nExpr; k++){
97666 Expr *pE = pEList->a[k].pExpr;
97667 if( pE->op==TK_ALL ) break;
97668 assert( pE->op!=TK_DOT || pE->pRight!=0 );
97669 assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) );
97670 if( pE->op==TK_DOT && pE->pRight->op==TK_ALL ) break;
97671 }
@@ -97679,14 +97881,22 @@
97679 ExprList *pNew = 0;
97680 int flags = pParse->db->flags;
97681 int longNames = (flags & SQLITE_FullColNames)!=0
97682 && (flags & SQLITE_ShortColNames)==0;
97683
 
 
 
 
 
 
 
97684 for(k=0; k<pEList->nExpr; k++){
97685 Expr *pE = a[k].pExpr;
97686 assert( pE->op!=TK_DOT || pE->pRight!=0 );
97687 if( pE->op!=TK_ALL && (pE->op!=TK_DOT || pE->pRight->op!=TK_ALL) ){
 
97688 /* This particular expression does not need to be expanded.
97689 */
97690 pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr);
97691 if( pNew ){
97692 pNew->a[pNew->nExpr-1].zName = a[k].zName;
@@ -97697,44 +97907,56 @@
97697 a[k].pExpr = 0;
97698 }else{
97699 /* This expression is a "*" or a "TABLE.*" and needs to be
97700 ** expanded. */
97701 int tableSeen = 0; /* Set to 1 when TABLE matches */
97702 char *zTName; /* text of name of TABLE */
97703 if( pE->op==TK_DOT ){
97704 assert( pE->pLeft!=0 );
97705 assert( !ExprHasProperty(pE->pLeft, EP_IntValue) );
97706 zTName = pE->pLeft->u.zToken;
97707 }else{
97708 zTName = 0;
97709 }
97710 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
97711 Table *pTab = pFrom->pTab;
 
97712 char *zTabName = pFrom->zAlias;
 
 
97713 if( zTabName==0 ){
97714 zTabName = pTab->zName;
97715 }
97716 if( db->mallocFailed ) break;
97717 if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){
97718 continue;
 
 
 
 
 
97719 }
97720 tableSeen = 1;
97721 for(j=0; j<pTab->nCol; j++){
97722 Expr *pExpr, *pRight;
97723 char *zName = pTab->aCol[j].zName;
97724 char *zColname; /* The computed column name */
97725 char *zToFree; /* Malloced string that needs to be freed */
97726 Token sColname; /* Computed column name as a token */
 
 
 
 
 
 
 
97727
97728 /* If a column is marked as 'hidden' (currently only possible
97729 ** for virtual tables), do not include it in the expanded
97730 ** result-set list.
97731 */
97732 if( IsHiddenColumn(&pTab->aCol[j]) ){
97733 assert(IsVirtual(pTab));
97734 continue;
97735 }
 
97736
97737 if( i>0 && zTName==0 ){
97738 if( (pFrom->jointype & JT_NATURAL)!=0
97739 && tableAndColumnIndex(pTabList, i, zName, 0, 0)
97740 ){
@@ -97753,10 +97975,14 @@
97753 zToFree = 0;
97754 if( longNames || pTabList->nSrc>1 ){
97755 Expr *pLeft;
97756 pLeft = sqlite3Expr(db, TK_ID, zTabName);
97757 pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
 
 
 
 
97758 if( longNames ){
97759 zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
97760 zToFree = zColname;
97761 }
97762 }else{
@@ -97764,10 +97990,22 @@
97764 }
97765 pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
97766 sColname.z = zColname;
97767 sColname.n = sqlite3Strlen30(zColname);
97768 sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
 
 
 
 
 
 
 
 
 
 
 
 
97769 sqlite3DbFree(db, zToFree);
97770 }
97771 }
97772 if( !tableSeen ){
97773 if( zTName ){
@@ -102869,11 +103107,11 @@
102869 sqlite3DbFree(db, pOld);
102870 }
102871 pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
102872 }
102873 pTerm = &pWC->a[idx = pWC->nTerm++];
102874 pTerm->pExpr = p;
102875 pTerm->wtFlags = wtFlags;
102876 pTerm->pWC = pWC;
102877 pTerm->iParent = -1;
102878 return idx;
102879 }
@@ -103654,11 +103892,12 @@
103654 if( db->mallocFailed ){
103655 return;
103656 }
103657 pTerm = &pWC->a[idxTerm];
103658 pMaskSet = pWC->pMaskSet;
103659 pExpr = sqlite3ExprSkipCollate(pTerm->pExpr);
 
103660 prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft);
103661 op = pExpr->op;
103662 if( op==TK_IN ){
103663 assert( pExpr->pRight==0 );
103664 if( ExprHasProperty(pExpr, EP_xIsSelect) ){
@@ -105767,11 +106006,11 @@
105767 int bRev = 2;
105768 WHERETRACE((" --> before isSortingIndex: nPriorSat=%d\n",nPriorSat));
105769 pc.plan.nOBSat = isSortingIndex(p, pProbe, iCur, &bRev);
105770 WHERETRACE((" --> after isSortingIndex: bRev=%d nOBSat=%d\n",
105771 bRev, pc.plan.nOBSat));
105772 if( nPriorSat<pc.plan.nOBSat || (pc.plan.wsFlags & WHERE_UNIQUE)!=0 ){
105773 pc.plan.wsFlags |= WHERE_ORDERED;
105774 }
105775 if( nOrderBy==pc.plan.nOBSat ){
105776 bSort = 0;
105777 pc.plan.wsFlags |= WHERE_ROWID_RANGE|WHERE_COLUMN_RANGE;
@@ -108237,10 +108476,11 @@
108237 Expr* yy122;
108238 Select* yy159;
108239 IdList* yy180;
108240 struct {int value; int mask;} yy207;
108241 u8 yy258;
 
108242 struct LikeOp yy318;
108243 TriggerStep* yy327;
108244 ExprSpan yy342;
108245 SrcList* yy347;
108246 int yy392;
@@ -110187,22 +110427,19 @@
110187 case 82: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==82);
110188 case 84: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==84);
110189 case 86: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==86);
110190 case 98: /* defer_subclause_opt ::= */ yytestcase(yyruleno==98);
110191 case 109: /* ifexists ::= */ yytestcase(yyruleno==109);
110192 case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120);
110193 case 121: /* distinct ::= */ yytestcase(yyruleno==121);
110194 case 221: /* between_op ::= BETWEEN */ yytestcase(yyruleno==221);
110195 case 224: /* in_op ::= IN */ yytestcase(yyruleno==224);
110196 {yygotominor.yy392 = 0;}
110197 break;
110198 case 29: /* ifnotexists ::= IF NOT EXISTS */
110199 case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
110200 case 70: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==70);
110201 case 85: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==85);
110202 case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108);
110203 case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119);
110204 case 222: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==222);
110205 case 225: /* in_op ::= NOT IN */ yytestcase(yyruleno==225);
110206 {yygotominor.yy392 = 1;}
110207 break;
110208 case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
@@ -110438,12 +110675,19 @@
110438 case 116: /* multiselect_op ::= UNION ALL */
110439 {yygotominor.yy392 = TK_ALL;}
110440 break;
110441 case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
110442 {
110443 yygotominor.yy159 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy442,yymsp[-5].minor.yy347,yymsp[-4].minor.yy122,yymsp[-3].minor.yy442,yymsp[-2].minor.yy122,yymsp[-1].minor.yy442,yymsp[-7].minor.yy392,yymsp[0].minor.yy64.pLimit,yymsp[0].minor.yy64.pOffset);
110444 }
 
 
 
 
 
 
 
110445 break;
110446 case 122: /* sclp ::= selcollist COMMA */
110447 case 246: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==246);
110448 {yygotominor.yy442 = yymsp[-1].minor.yy442;}
110449 break;
@@ -110509,14 +110753,24 @@
110509 break;
110510 case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
110511 {
110512 if( yymsp[-6].minor.yy347==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy122==0 && yymsp[0].minor.yy180==0 ){
110513 yygotominor.yy347 = yymsp[-4].minor.yy347;
 
 
 
 
 
 
 
 
 
 
110514 }else{
110515 Select *pSubquery;
110516 sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy347);
110517 pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy347,0,0,0,0,0,0,0);
110518 yygotominor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy122,yymsp[0].minor.yy180);
110519 }
110520 }
110521 break;
110522 case 137: /* dbnm ::= */
@@ -110745,11 +110999,11 @@
110745 if( yymsp[-1].minor.yy442 && yymsp[-1].minor.yy442->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
110746 sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
110747 }
110748 yygotominor.yy342.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy442, &yymsp[-4].minor.yy0);
110749 spanSet(&yygotominor.yy342,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
110750 if( yymsp[-2].minor.yy392 && yygotominor.yy342.pExpr ){
110751 yygotominor.yy342.pExpr->flags |= EP_Distinct;
110752 }
110753 }
110754 break;
110755 case 197: /* expr ::= ID LP STAR RP */
110756
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -673,11 +673,11 @@
673 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
674 ** [sqlite_version()] and [sqlite_source_id()].
675 */
676 #define SQLITE_VERSION "3.7.16"
677 #define SQLITE_VERSION_NUMBER 3007016
678 #define SQLITE_SOURCE_ID "2013-01-09 11:31:17 5774f2175ce621dfc4b6b93f7ee13fd66f3ec2b9"
679
680 /*
681 ** CAPI3REF: Run-Time Library Version Numbers
682 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
683 **
@@ -10553,24 +10553,24 @@
10553 ** and the value of Index.onError indicate the which conflict resolution
10554 ** algorithm to employ whenever an attempt is made to insert a non-unique
10555 ** element.
10556 */
10557 struct Index {
10558 char *zName; /* Name of this index */
10559 int *aiColumn; /* Which columns are used by this index. 1st is 0 */
10560 tRowcnt *aiRowEst; /* From ANALYZE: Est. rows selected by each column */
10561 Table *pTable; /* The SQL table being indexed */
10562 char *zColAff; /* String defining the affinity of each column */
10563 Index *pNext; /* The next index associated with the same table */
10564 Schema *pSchema; /* Schema containing this index */
10565 u8 *aSortOrder; /* for each column: True==DESC, False==ASC */
10566 char **azColl; /* Array of collation sequence names for index */
10567 int tnum; /* DB Page containing root of this index */
10568 u16 nColumn; /* Number of columns in table used by this index */
10569 u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
10570 unsigned autoIndex:2; /* 1==UNIQUE, 2==PRIMARY KEY, 0==CREATE INDEX */
10571 unsigned bUnordered:1; /* Use this index for == or IN queries only */
10572 #ifdef SQLITE_ENABLE_STAT3
10573 int nSample; /* Number of elements in aSample[] */
10574 tRowcnt avgEq; /* Average nEq value for key values not in aSample */
10575 IndexSample *aSample; /* Samples of the left-most key */
10576 #endif
@@ -10840,22 +10840,31 @@
10840 ** name. An expr/name combination can be used in several ways, such
10841 ** as the list of "expr AS ID" fields following a "SELECT" or in the
10842 ** list of "ID = expr" items in an UPDATE. A list of expressions can
10843 ** also be used as the argument to a function, in which case the a.zName
10844 ** field is not used.
10845 **
10846 ** By default the Expr.zSpan field holds a human-readable description of
10847 ** the expression that is used in the generation of error messages and
10848 ** column labels. In this case, Expr.zSpan is typically the text of a
10849 ** column expression as it exists in a SELECT statement. However, if
10850 ** the bSpanIsTab flag is set, then zSpan is overloaded to mean the name
10851 ** of the result column in the form: DATABASE.TABLE.COLUMN. This later
10852 ** form is used for name resolution with nested FROM clauses.
10853 */
10854 struct ExprList {
10855 int nExpr; /* Number of expressions on the list */
10856 int iECursor; /* VDBE Cursor associated with this ExprList */
10857 struct ExprList_item { /* For each expression in the list */
10858 Expr *pExpr; /* The list of expressions */
10859 char *zName; /* Token associated with this expression */
10860 char *zSpan; /* Original text of the expression */
10861 u8 sortOrder; /* 1 for DESC or 0 for ASC */
10862 unsigned done :1; /* A flag to indicate when processing is finished */
10863 unsigned bSpanIsTab :1; /* zSpan holds DB.TABLE.COLUMN */
10864 u16 iOrderByCol; /* For ORDER BY, column number in result set */
10865 u16 iAlias; /* Index into Parse.aAlias[] for zName */
10866 } *a; /* Alloc a power of two greater or equal to nExpr */
10867 };
10868
10869 /*
10870 ** An instance of this structure is used by the parser to record both
@@ -11171,10 +11180,11 @@
11180 #define SF_Expanded 0x0010 /* sqlite3SelectExpand() called on this */
11181 #define SF_HasTypeInfo 0x0020 /* FROM subqueries have Table metadata */
11182 #define SF_UseSorter 0x0040 /* Sort using a sorter */
11183 #define SF_Values 0x0080 /* Synthesized from VALUES clause */
11184 #define SF_Materialize 0x0100 /* Force materialization of views */
11185 #define SF_NestedFrom 0x0200 /* Part of a parenthesized FROM clause */
11186
11187
11188 /*
11189 ** The results of a select can be distributed in several ways. The
11190 ** "SRT" prefix means "SELECT Result Type".
@@ -11883,11 +11893,11 @@
11893 SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
11894 Token*, int, int);
11895 SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int);
11896 SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*);
11897 SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,
11898 Expr*,ExprList*,u16,Expr*,Expr*);
11899 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
11900 SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*);
11901 SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int);
11902 SQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);
11903 #if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
@@ -12140,10 +12150,11 @@
12150 SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
12151 SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
12152 SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
12153 SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int);
12154 SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
12155 SQLITE_PRIVATE int sqlite3MatchSpanName(const char*, const char*, const char*, const char*);
12156 SQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*);
12157 SQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);
12158 SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
12159 SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
12160 SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
@@ -12278,12 +12289,14 @@
12289 #define sqlite3FkOldmask(a,b) 0
12290 #define sqlite3FkRequired(a,b,c,d) 0
12291 #endif
12292 #ifndef SQLITE_OMIT_FOREIGN_KEY
12293 SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*);
12294 SQLITE_PRIVATE int sqlite3FkLocateIndex(Parse*,Table*,FKey*,Index**,int**);
12295 #else
12296 #define sqlite3FkDelete(a,b)
12297 #define sqlite3FkLocateIndex(a,b,c,d,e)
12298 #endif
12299
12300
12301 /*
12302 ** Available fault injectors. Should be numbered beginning with 0.
@@ -23286,15 +23299,11 @@
23299 { "pwrite64", (sqlite3_syscall_ptr)0, 0 },
23300 #endif
23301 #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\
23302 aSyscall[13].pCurrent)
23303
 
23304 { "fchmod", (sqlite3_syscall_ptr)fchmod, 0 },
 
 
 
23305 #define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent)
23306
23307 #if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
23308 { "fallocate", (sqlite3_syscall_ptr)posix_fallocate, 0 },
23309 #else
@@ -23315,13 +23324,10 @@
23324 #define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent)
23325
23326 { "fchown", (sqlite3_syscall_ptr)posixFchown, 0 },
23327 #define osFchown ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
23328
 
 
 
23329 }; /* End of the overrideable system calls */
23330
23331 /*
23332 ** This is the xSetSystemCall() method of sqlite3_vfs for all of the
23333 ** "unix" VFSes. Return SQLITE_OK opon successfully updating the
@@ -23422,31 +23428,29 @@
23428 ** process that is able to write to the database will also be able to
23429 ** recover the hot journals.
23430 */
23431 static int robust_open(const char *z, int f, mode_t m){
23432 int fd;
23433 mode_t m2 = m ? m : SQLITE_DEFAULT_FILE_PERMISSIONS;
 
 
 
 
 
 
 
23434 do{
23435 #if defined(O_CLOEXEC)
23436 fd = osOpen(z,f|O_CLOEXEC,m2);
23437 #else
23438 fd = osOpen(z,f,m2);
23439 #endif
23440 }while( fd<0 && errno==EINTR );
23441 if( fd>=0 ){
23442 if( m!=0 ){
23443 struct stat statbuf;
23444 if( osFstat(fd, &statbuf)==0 && (statbuf.st_mode&0777)!=m ){
23445 osFchmod(fd, m);
23446 }
23447 }
23448 #if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0)
23449 osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
23450 #endif
23451 }
23452 return fd;
23453 }
23454
23455 /*
23456 ** Helper functions to obtain and relinquish the global mutex. The
@@ -29868,11 +29872,11 @@
29872 };
29873 unsigned int i; /* Loop counter */
29874
29875 /* Double-check that the aSyscall[] array has been constructed
29876 ** correctly. See ticket [bb3a86e890c8e96ab] */
29877 assert( ArraySize(aSyscall)==21 );
29878
29879 /* Register all VFSes defined in the aVfs[] array */
29880 for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){
29881 sqlite3_vfs_register(&aVfs[i], i==0);
29882 }
@@ -56869,11 +56873,16 @@
56873 /*
56874 ** Parameter zSrcData points to a buffer containing the data for
56875 ** page iSrcPg from the source database. Copy this data into the
56876 ** destination database.
56877 */
56878 static int backupOnePage(
56879 sqlite3_backup *p, /* Backup handle */
56880 Pgno iSrcPg, /* Source database page to backup */
56881 const u8 *zSrcData, /* Source database page data */
56882 int bUpdate /* True for an update, false otherwise */
56883 ){
56884 Pager * const pDestPager = sqlite3BtreePager(p->pDest);
56885 const int nSrcPgsz = sqlite3BtreeGetPageSize(p->pSrc);
56886 int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);
56887 const int nCopy = MIN(nSrcPgsz, nDestPgsz);
56888 const i64 iEnd = (i64)iSrcPg*(i64)nSrcPgsz;
@@ -56942,10 +56951,13 @@
56951 ** cached parse of the page). MemPage.isInit is marked
56952 ** "MUST BE FIRST" for this purpose.
56953 */
56954 memcpy(zOut, zIn, nCopy);
56955 ((u8 *)sqlite3PagerGetExtra(pDestPg))[0] = 0;
56956 if( iOff==0 && bUpdate==0 ){
56957 sqlite3Put4byte(&zOut[28], sqlite3BtreeLastPage(p->pSrc));
56958 }
56959 }
56960 sqlite3PagerUnref(pDestPg);
56961 }
56962
56963 return rc;
@@ -57048,11 +57060,11 @@
57060 const Pgno iSrcPg = p->iNext; /* Source page number */
57061 if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
57062 DbPage *pSrcPg; /* Source page object */
57063 rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
57064 if( rc==SQLITE_OK ){
57065 rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0);
57066 sqlite3PagerUnref(pSrcPg);
57067 }
57068 }
57069 p->iNext++;
57070 }
@@ -57296,11 +57308,11 @@
57308 ** the new data into the backup.
57309 */
57310 int rc;
57311 assert( p->pDestDb );
57312 sqlite3_mutex_enter(p->pDestDb->mutex);
57313 rc = backupOnePage(p, iPage, aData, 1);
57314 sqlite3_mutex_leave(p->pDestDb->mutex);
57315 assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
57316 if( rc!=SQLITE_OK ){
57317 p->rc = rc;
57318 }
@@ -71890,10 +71902,18 @@
71902 p->pReal = pReal;
71903 if( p->iSize>0 ){
71904 assert(p->iSize<=p->nBuf);
71905 rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0);
71906 }
71907 if( rc!=SQLITE_OK ){
71908 /* If an error occurred while writing to the file, close it before
71909 ** returning. This way, SQLite uses the in-memory journal data to
71910 ** roll back changes made to the internal page-cache before this
71911 ** function was called. */
71912 sqlite3OsClose(pReal);
71913 p->pReal = 0;
71914 }
71915 }
71916 }
71917 return rc;
71918 }
71919
@@ -72636,10 +72656,39 @@
72656 }
72657 }
72658 return 0;
72659 }
72660
72661 /*
72662 ** Subqueries stores the original database, table and column names for their
72663 ** result sets in ExprList.a[].zSpan, in the form "DATABASE.TABLE.COLUMN".
72664 ** Check to see if the zSpan given to this routine matches the zDb, zTab,
72665 ** and zCol. If any of zDb, zTab, and zCol are NULL then those fields will
72666 ** match anything.
72667 */
72668 SQLITE_PRIVATE int sqlite3MatchSpanName(
72669 const char *zSpan,
72670 const char *zCol,
72671 const char *zTab,
72672 const char *zDb
72673 ){
72674 int n;
72675 for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}
72676 if( zDb && sqlite3StrNICmp(zSpan, zDb, n)!=0 ){
72677 return 0;
72678 }
72679 zSpan += n+1;
72680 for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}
72681 if( zTab && sqlite3StrNICmp(zSpan, zTab, n)!=0 ){
72682 return 0;
72683 }
72684 zSpan += n+1;
72685 if( zCol && sqlite3StrICmp(zSpan, zCol)!=0 ){
72686 return 0;
72687 }
72688 return 1;
72689 }
72690
72691 /*
72692 ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
72693 ** that name in the set of source tables in pSrcList and make the pExpr
72694 ** expression node refer back to that source column. The following changes
@@ -72691,44 +72740,63 @@
72740
72741 /* Initialize the node to no-match */
72742 pExpr->iTable = -1;
72743 pExpr->pTab = 0;
72744 ExprSetIrreducible(pExpr);
72745
72746 /* Translate the schema name in zDb into a pointer to the corresponding
72747 ** schema. If not found, pSchema will remain NULL and nothing will match
72748 ** resulting in an appropriate error message toward the end of this routine
72749 */
72750 if( zDb ){
72751 for(i=0; i<db->nDb; i++){
72752 assert( db->aDb[i].zName );
72753 if( sqlite3StrICmp(db->aDb[i].zName,zDb)==0 ){
72754 pSchema = db->aDb[i].pSchema;
72755 break;
72756 }
72757 }
72758 }
72759
72760 /* Start at the inner-most context and move outward until a match is found */
72761 while( pNC && cnt==0 ){
72762 ExprList *pEList;
72763 SrcList *pSrcList = pNC->pSrcList;
72764
72765 if( pSrcList ){
72766 for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
72767 Table *pTab;
 
72768 Column *pCol;
72769
72770 pTab = pItem->pTab;
72771 assert( pTab!=0 && pTab->zName!=0 );
 
72772 assert( pTab->nCol>0 );
72773 if( pItem->pSelect && (pItem->pSelect->selFlags & SF_NestedFrom)!=0 ){
72774 ExprList *pEList = pItem->pSelect->pEList;
72775 int hit = 0;
72776 for(j=0; j<pEList->nExpr; j++){
72777 if( sqlite3MatchSpanName(pEList->a[j].zSpan, zCol, zTab, zDb) ){
72778 cnt++;
72779 cntTab = 2;
72780 pMatch = pItem;
72781 pExpr->iColumn = j;
72782 hit = 1;
72783 }
72784 }
72785 if( hit || zTab==0 ) continue;
72786 }
72787 if( zDb && pTab->pSchema!=pSchema ){
72788 continue;
72789 }
72790 if( zTab ){
72791 const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
72792 assert( zTabName!=0 );
72793 if( sqlite3StrICmp(zTabName, zTab)!=0 ){
72794 continue;
 
 
 
 
 
 
 
72795 }
72796 }
72797 if( 0==(cntTab++) ){
 
 
 
72798 pMatch = pItem;
72799 }
72800 for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){
72801 if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
72802 /* If there has been exactly one prior match and this match
@@ -72738,21 +72806,23 @@
72806 if( cnt==1 ){
72807 if( pItem->jointype & JT_NATURAL ) continue;
72808 if( nameInUsingClause(pItem->pUsing, zCol) ) continue;
72809 }
72810 cnt++;
 
 
72811 pMatch = pItem;
 
72812 /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
72813 pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j;
72814 break;
72815 }
72816 }
72817 }
72818 if( pMatch ){
72819 pExpr->iTable = pMatch->iCursor;
72820 pExpr->pTab = pMatch->pTab;
72821 pSchema = pExpr->pTab->pSchema;
72822 }
72823 } /* if( pSrcList ) */
72824
72825 #ifndef SQLITE_OMIT_TRIGGER
72826 /* If we have not already resolved the name, then maybe
72827 ** it is a new.* or old.* trigger argument reference
72828 */
@@ -73083,11 +73153,11 @@
73153 #endif
73154 if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){
73155 sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
73156 pNC->nErr++;
73157 is_agg = 0;
73158 }else if( no_such_func && pParse->db->init.busy==0 ){
73159 sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
73160 pNC->nErr++;
73161 }else if( wrong_num_args ){
73162 sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
73163 nId, zId);
@@ -73519,27 +73589,10 @@
73589 if( sqlite3ResolveExprNames(&sNC, p->pLimit) ||
73590 sqlite3ResolveExprNames(&sNC, p->pOffset) ){
73591 return WRC_Abort;
73592 }
73593
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73594 /* Recursively resolve names in all subqueries
73595 */
73596 for(i=0; i<p->pSrc->nSrc; i++){
73597 struct SrcList_item *pItem = &p->pSrc->a[i];
73598 if( pItem->pSelect ){
@@ -73562,10 +73615,27 @@
73615 for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef -= pNC->nRef;
73616 assert( pItem->isCorrelated==0 && nRef<=0 );
73617 pItem->isCorrelated = (nRef!=0);
73618 }
73619 }
73620
73621 /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
73622 ** resolve the result-set expression list.
73623 */
73624 sNC.ncFlags = NC_AllowAgg;
73625 sNC.pSrcList = p->pSrc;
73626 sNC.pNext = pOuterNC;
73627
73628 /* Resolve names in the result set. */
73629 pEList = p->pEList;
73630 assert( pEList!=0 );
73631 for(i=0; i<pEList->nExpr; i++){
73632 Expr *pX = pEList->a[i].pExpr;
73633 if( sqlite3ResolveExprNames(&sNC, pX) ){
73634 return WRC_Abort;
73635 }
73636 }
73637
73638 /* If there are no aggregate functions in the result-set, and no GROUP BY
73639 ** expression, do not allow aggregates in any of the other expressions.
73640 */
73641 assert( (p->selFlags & SF_Aggregate)==0 );
@@ -77046,10 +77116,16 @@
77116 for(i=0; i<pList->nExpr; i++){
77117 sqlite3ExplainPrintf(pOut, "item[%d] = ", i);
77118 sqlite3ExplainPush(pOut);
77119 sqlite3ExplainExpr(pOut, pList->a[i].pExpr);
77120 sqlite3ExplainPop(pOut);
77121 if( pList->a[i].zName ){
77122 sqlite3ExplainPrintf(pOut, " AS %s", pList->a[i].zName);
77123 }
77124 if( pList->a[i].bSpanIsTab ){
77125 sqlite3ExplainPrintf(pOut, " (%s)", pList->a[i].zSpan);
77126 }
77127 if( i<pList->nExpr-1 ){
77128 sqlite3ExplainNL(pOut);
77129 }
77130 }
77131 sqlite3ExplainPop(pOut);
@@ -87523,11 +87599,11 @@
87599
87600 /*
87601 ** A foreign key constraint requires that the key columns in the parent
87602 ** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
87603 ** Given that pParent is the parent table for foreign key constraint pFKey,
87604 ** search the schema for a unique index on the parent key columns.
87605 **
87606 ** If successful, zero is returned. If the parent key is an INTEGER PRIMARY
87607 ** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx
87608 ** is set to point to the unique index.
87609 **
@@ -87559,11 +87635,11 @@
87635 **
87636 ** then non-zero is returned, and a "foreign key mismatch" error loaded
87637 ** into pParse. If an OOM error occurs, non-zero is returned and the
87638 ** pParse->db->mallocFailed flag is set.
87639 */
87640 SQLITE_PRIVATE int sqlite3FkLocateIndex(
87641 Parse *pParse, /* Parse context to store any error in */
87642 Table *pParent, /* Parent table of FK constraint pFKey */
87643 FKey *pFKey, /* Foreign key to find index for */
87644 Index **ppIdx, /* OUT: Unique index on parent table */
87645 int **paiCol /* OUT: Map of index columns in pFKey */
@@ -87656,11 +87732,13 @@
87732 }
87733 }
87734
87735 if( !pIdx ){
87736 if( !pParse->disableTriggers ){
87737 sqlite3ErrorMsg(pParse,
87738 "foreign key mismatch - \"%w\" referencing \"%w\"",
87739 pFKey->pFrom->zName, pFKey->zTo);
87740 }
87741 sqlite3DbFree(pParse->db, aiCol);
87742 return 1;
87743 }
87744
@@ -88117,11 +88195,11 @@
88195 if( pParse->disableTriggers ){
88196 pTo = sqlite3FindTable(db, pFKey->zTo, zDb);
88197 }else{
88198 pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);
88199 }
88200 if( !pTo || sqlite3FkLocateIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
88201 assert( isIgnoreErrors==0 || (regOld!=0 && regNew==0) );
88202 if( !isIgnoreErrors || db->mallocFailed ) return;
88203 if( pTo==0 ){
88204 /* If isIgnoreErrors is true, then a table is being dropped. In this
88205 ** case SQLite runs a "DELETE FROM xxx" on the table being dropped
@@ -88197,11 +88275,11 @@
88275 /* Inserting a single row into a parent table cannot cause an immediate
88276 ** foreign key violation. So do nothing in this case. */
88277 continue;
88278 }
88279
88280 if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){
88281 if( !isIgnoreErrors || db->mallocFailed ) return;
88282 continue;
88283 }
88284 assert( aiCol || pFKey->nCol==1 );
88285
@@ -88252,11 +88330,11 @@
88330 for(p=pTab->pFKey; p; p=p->pNextFrom){
88331 for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);
88332 }
88333 for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
88334 Index *pIdx = 0;
88335 sqlite3FkLocateIndex(pParse, pTab, p, &pIdx, 0);
88336 if( pIdx ){
88337 for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
88338 }
88339 }
88340 }
@@ -88378,11 +88456,11 @@
88456 ExprList *pList = 0; /* Changes list if ON UPDATE CASCADE */
88457 Select *pSelect = 0; /* If RESTRICT, "SELECT RAISE(...)" */
88458 int i; /* Iterator variable */
88459 Expr *pWhen = 0; /* WHEN clause for the trigger */
88460
88461 if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;
88462 assert( aiCol || pFKey->nCol==1 );
88463
88464 for(i=0; i<pFKey->nCol; i++){
88465 Token tOld = { "old", 3 }; /* Literal "old" token */
88466 Token tNew = { "new", 3 }; /* Literal "new" token */
@@ -92718,13 +92796,15 @@
92796 if( sqlite3StrICmp(zLeft, "table_info")==0 && zRight ){
92797 Table *pTab;
92798 if( sqlite3ReadSchema(pParse) ) goto pragma_out;
92799 pTab = sqlite3FindTable(db, zRight, zDb);
92800 if( pTab ){
92801 int i, k;
92802 int nHidden = 0;
92803 Column *pCol;
92804 Index *pPk;
92805 for(pPk=pTab->pIndex; pPk && pPk->autoIndex!=2; pPk=pPk->pNext){}
92806 sqlite3VdbeSetNumCols(v, 6);
92807 pParse->nMem = 6;
92808 sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cid", SQLITE_STATIC);
92809 sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
92810 sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "type", SQLITE_STATIC);
@@ -92745,12 +92825,18 @@
92825 if( pCol->zDflt ){
92826 sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0);
92827 }else{
92828 sqlite3VdbeAddOp2(v, OP_Null, 0, 5);
92829 }
92830 if( (pCol->colFlags & COLFLAG_PRIMKEY)==0 ){
92831 k = 0;
92832 }else if( pPk==0 ){
92833 k = 1;
92834 }else{
92835 for(k=1; ALWAYS(k<=pTab->nCol) && pPk->aiColumn[k-1]!=i; k++){}
92836 }
92837 sqlite3VdbeAddOp2(v, OP_Integer, k, 6);
92838 sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6);
92839 }
92840 }
92841 }else
92842
@@ -92881,10 +92967,124 @@
92967 ++i;
92968 pFK = pFK->pNextFrom;
92969 }
92970 }
92971 }
92972 }else
92973 #endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
92974
92975 #ifndef SQLITE_OMIT_FOREIGN_KEY
92976 if( sqlite3StrICmp(zLeft, "foreign_key_check")==0 ){
92977 FKey *pFK; /* A foreign key constraint */
92978 Table *pTab; /* Child table contain "REFERENCES" keyword */
92979 Table *pParent; /* Parent table that child points to */
92980 Index *pIdx; /* Index in the parent table */
92981 int i; /* Loop counter: Foreign key number for pTab */
92982 int j; /* Loop counter: Field of the foreign key */
92983 HashElem *k; /* Loop counter: Next table in schema */
92984 int x; /* result variable */
92985 int regResult; /* 3 registers to hold a result row */
92986 int regKey; /* Register to hold key for checking the FK */
92987 int regRow; /* Registers to hold a row from pTab */
92988 int addrTop; /* Top of a loop checking foreign keys */
92989 int addrOk; /* Jump here if the key is OK */
92990 int *aiCols; /* child to parent column mapping */
92991
92992 if( sqlite3ReadSchema(pParse) ) goto pragma_out;
92993 regResult = pParse->nMem+1;
92994 pParse->nMem += 4;
92995 regKey = ++pParse->nMem;
92996 regRow = ++pParse->nMem;
92997 v = sqlite3GetVdbe(pParse);
92998 sqlite3VdbeSetNumCols(v, 4);
92999 sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "table", SQLITE_STATIC);
93000 sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "rowid", SQLITE_STATIC);
93001 sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "parent", SQLITE_STATIC);
93002 sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "fkid", SQLITE_STATIC);
93003 sqlite3CodeVerifySchema(pParse, iDb);
93004 k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash);
93005 while( k ){
93006 if( zRight ){
93007 pTab = sqlite3LocateTable(pParse, 0, zRight, zDb);
93008 k = 0;
93009 }else{
93010 pTab = (Table*)sqliteHashData(k);
93011 k = sqliteHashNext(k);
93012 }
93013 if( pTab==0 || pTab->pFKey==0 ) continue;
93014 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
93015 if( pTab->nCol+regRow>pParse->nMem ) pParse->nMem = pTab->nCol + regRow;
93016 sqlite3OpenTable(pParse, 0, iDb, pTab, OP_OpenRead);
93017 sqlite3VdbeAddOp4(v, OP_String8, 0, regResult, 0, pTab->zName,
93018 P4_TRANSIENT);
93019 for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
93020 pParent = sqlite3LocateTable(pParse, 0, pFK->zTo, zDb);
93021 if( pParent==0 ) break;
93022 pIdx = 0;
93023 sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
93024 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
93025 if( x==0 ){
93026 if( pIdx==0 ){
93027 sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
93028 }else{
93029 KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
93030 sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iDb);
93031 sqlite3VdbeChangeP4(v, -1, (char*)pKey, P4_KEYINFO_HANDOFF);
93032 }
93033 }else{
93034 k = 0;
93035 break;
93036 }
93037 }
93038 if( pFK ) break;
93039 if( pParse->nTab<i ) pParse->nTab = i;
93040 addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, 0);
93041 for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
93042 pParent = sqlite3LocateTable(pParse, 0, pFK->zTo, zDb);
93043 assert( pParent!=0 );
93044 pIdx = 0;
93045 aiCols = 0;
93046 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols);
93047 assert( x==0 );
93048 addrOk = sqlite3VdbeMakeLabel(v);
93049 if( pIdx==0 ){
93050 int iKey = pFK->aCol[0].iFrom;
93051 assert( iKey>=0 && iKey<pTab->nCol );
93052 if( iKey!=pTab->iPKey ){
93053 sqlite3VdbeAddOp3(v, OP_Column, 0, iKey, regRow);
93054 sqlite3ColumnDefault(v, pTab, iKey, regRow);
93055 sqlite3VdbeAddOp2(v, OP_IsNull, regRow, addrOk);
93056 sqlite3VdbeAddOp2(v, OP_MustBeInt, regRow,
93057 sqlite3VdbeCurrentAddr(v)+3);
93058 }else{
93059 sqlite3VdbeAddOp2(v, OP_Rowid, 0, regRow);
93060 }
93061 sqlite3VdbeAddOp3(v, OP_NotExists, i, 0, regRow);
93062 sqlite3VdbeAddOp2(v, OP_Goto, 0, addrOk);
93063 sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
93064 }else{
93065 for(j=0; j<pFK->nCol; j++){
93066 sqlite3ExprCodeGetColumnOfTable(v, pTab, 0,
93067 aiCols ? aiCols[j] : pFK->aCol[0].iFrom, regRow+j);
93068 sqlite3VdbeAddOp2(v, OP_IsNull, regRow+j, addrOk);
93069 }
93070 sqlite3VdbeAddOp3(v, OP_MakeRecord, regRow, pFK->nCol, regKey);
93071 sqlite3VdbeChangeP4(v, -1,
93072 sqlite3IndexAffinityStr(v,pIdx), P4_TRANSIENT);
93073 sqlite3VdbeAddOp4Int(v, OP_Found, i, addrOk, regKey, 0);
93074 }
93075 sqlite3VdbeAddOp2(v, OP_Rowid, 0, regResult+1);
93076 sqlite3VdbeAddOp4(v, OP_String8, 0, regResult+2, 0,
93077 pFK->zTo, P4_TRANSIENT);
93078 sqlite3VdbeAddOp2(v, OP_Integer, i-1, regResult+3);
93079 sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, 4);
93080 sqlite3VdbeResolveLabel(v, addrOk);
93081 sqlite3DbFree(db, aiCols);
93082 }
93083 sqlite3VdbeAddOp2(v, OP_Next, 0, addrTop+1);
93084 sqlite3VdbeJumpHere(v, addrTop);
93085 }
93086 }else
93087 #endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
93088
93089 #ifndef NDEBUG
93090 if( sqlite3StrICmp(zLeft, "parser_trace")==0 ){
@@ -94340,11 +94540,11 @@
94540 SrcList *pSrc, /* the FROM clause -- which tables to scan */
94541 Expr *pWhere, /* the WHERE clause */
94542 ExprList *pGroupBy, /* the GROUP BY clause */
94543 Expr *pHaving, /* the HAVING clause */
94544 ExprList *pOrderBy, /* the ORDER BY clause */
94545 u16 selFlags, /* Flag parameters, such as SF_Distinct */
94546 Expr *pLimit, /* LIMIT value. NULL means not used */
94547 Expr *pOffset /* OFFSET value. NULL means no offset */
94548 ){
94549 Select *pNew;
94550 Select standin;
@@ -94364,11 +94564,11 @@
94564 pNew->pSrc = pSrc;
94565 pNew->pWhere = pWhere;
94566 pNew->pGroupBy = pGroupBy;
94567 pNew->pHaving = pHaving;
94568 pNew->pOrderBy = pOrderBy;
94569 pNew->selFlags = selFlags;
94570 pNew->op = TK_SELECT;
94571 pNew->pLimit = pLimit;
94572 pNew->pOffset = pOffset;
94573 assert( pOffset==0 || pLimit!=0 );
94574 pNew->addrOpenEphm[0] = -1;
@@ -95621,12 +95821,10 @@
95821
95822 for(i=0, pCol=aCol; i<nCol; i++, pCol++){
95823 /* Get an appropriate name for the column
95824 */
95825 p = sqlite3ExprSkipCollate(pEList->a[i].pExpr);
 
 
95826 if( (zName = pEList->a[i].zName)!=0 ){
95827 /* If the column contains an "AS <name>" phrase, use <name> as the name */
95828 zName = sqlite3DbStrDup(db, zName);
95829 }else{
95830 Expr *pColExpr = p; /* The expression that is the result column name */
@@ -95660,10 +95858,13 @@
95858 */
95859 nName = sqlite3Strlen30(zName);
95860 for(j=cnt=0; j<i; j++){
95861 if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
95862 char *zNewName;
95863 int k;
95864 for(k=nName-1; k>1 && sqlite3Isdigit(zName[k]); k--){}
95865 if( zName[k]==':' ) nName = k;
95866 zName[nName] = 0;
95867 zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
95868 sqlite3DbFree(db, zName);
95869 zName = zNewName;
95870 j = -1;
@@ -97576,10 +97777,11 @@
97777 int i, j, k;
97778 SrcList *pTabList;
97779 ExprList *pEList;
97780 struct SrcList_item *pFrom;
97781 sqlite3 *db = pParse->db;
97782 Expr *pE, *pRight, *pExpr;
97783
97784 if( db->mallocFailed ){
97785 return WRC_Abort;
97786 }
97787 if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
@@ -97661,11 +97863,11 @@
97863 **
97864 ** The first loop just checks to see if there are any "*" operators
97865 ** that need expanding.
97866 */
97867 for(k=0; k<pEList->nExpr; k++){
97868 pE = pEList->a[k].pExpr;
97869 if( pE->op==TK_ALL ) break;
97870 assert( pE->op!=TK_DOT || pE->pRight!=0 );
97871 assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) );
97872 if( pE->op==TK_DOT && pE->pRight->op==TK_ALL ) break;
97873 }
@@ -97679,14 +97881,22 @@
97881 ExprList *pNew = 0;
97882 int flags = pParse->db->flags;
97883 int longNames = (flags & SQLITE_FullColNames)!=0
97884 && (flags & SQLITE_ShortColNames)==0;
97885
97886 /* When processing FROM-clause subqueries, it is always the case
97887 ** that full_column_names=OFF and short_column_names=ON. The
97888 ** sqlite3ResultSetOfSelect() routine makes it so. */
97889 assert( (p->selFlags & SF_NestedFrom)==0
97890 || ((flags & SQLITE_FullColNames)==0 &&
97891 (flags & SQLITE_ShortColNames)!=0) );
97892
97893 for(k=0; k<pEList->nExpr; k++){
97894 pE = a[k].pExpr;
97895 pRight = pE->pRight;
97896 assert( pE->op!=TK_DOT || pRight!=0 );
97897 if( pE->op!=TK_ALL && (pE->op!=TK_DOT || pRight->op!=TK_ALL) ){
97898 /* This particular expression does not need to be expanded.
97899 */
97900 pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr);
97901 if( pNew ){
97902 pNew->a[pNew->nExpr-1].zName = a[k].zName;
@@ -97697,44 +97907,56 @@
97907 a[k].pExpr = 0;
97908 }else{
97909 /* This expression is a "*" or a "TABLE.*" and needs to be
97910 ** expanded. */
97911 int tableSeen = 0; /* Set to 1 when TABLE matches */
97912 char *zTName = 0; /* text of name of TABLE */
97913 if( pE->op==TK_DOT ){
97914 assert( pE->pLeft!=0 );
97915 assert( !ExprHasProperty(pE->pLeft, EP_IntValue) );
97916 zTName = pE->pLeft->u.zToken;
 
 
97917 }
97918 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
97919 Table *pTab = pFrom->pTab;
97920 Select *pSub = pFrom->pSelect;
97921 char *zTabName = pFrom->zAlias;
97922 const char *zSchemaName = 0;
97923 int iDb;
97924 if( zTabName==0 ){
97925 zTabName = pTab->zName;
97926 }
97927 if( db->mallocFailed ) break;
97928 if( pSub==0 || (pSub->selFlags & SF_NestedFrom)==0 ){
97929 pSub = 0;
97930 if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){
97931 continue;
97932 }
97933 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
97934 zSchemaName = iDb>=0 ? db->aDb[iDb].zName : "*";
97935 }
 
97936 for(j=0; j<pTab->nCol; j++){
 
97937 char *zName = pTab->aCol[j].zName;
97938 char *zColname; /* The computed column name */
97939 char *zToFree; /* Malloced string that needs to be freed */
97940 Token sColname; /* Computed column name as a token */
97941
97942 assert( zName );
97943 if( zTName && pSub
97944 && sqlite3MatchSpanName(pSub->pEList->a[j].zSpan, 0, zTName, 0)==0
97945 ){
97946 continue;
97947 }
97948
97949 /* If a column is marked as 'hidden' (currently only possible
97950 ** for virtual tables), do not include it in the expanded
97951 ** result-set list.
97952 */
97953 if( IsHiddenColumn(&pTab->aCol[j]) ){
97954 assert(IsVirtual(pTab));
97955 continue;
97956 }
97957 tableSeen = 1;
97958
97959 if( i>0 && zTName==0 ){
97960 if( (pFrom->jointype & JT_NATURAL)!=0
97961 && tableAndColumnIndex(pTabList, i, zName, 0, 0)
97962 ){
@@ -97753,10 +97975,14 @@
97975 zToFree = 0;
97976 if( longNames || pTabList->nSrc>1 ){
97977 Expr *pLeft;
97978 pLeft = sqlite3Expr(db, TK_ID, zTabName);
97979 pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
97980 if( zSchemaName ){
97981 pLeft = sqlite3Expr(db, TK_ID, zSchemaName);
97982 pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pExpr, 0);
97983 }
97984 if( longNames ){
97985 zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
97986 zToFree = zColname;
97987 }
97988 }else{
@@ -97764,10 +97990,22 @@
97990 }
97991 pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
97992 sColname.z = zColname;
97993 sColname.n = sqlite3Strlen30(zColname);
97994 sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
97995 if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
97996 struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
97997 if( pSub ){
97998 pX->zSpan = sqlite3DbStrDup(db, pSub->pEList->a[j].zSpan);
97999 testcase( pX->zSpan==0 );
98000 }else{
98001 pX->zSpan = sqlite3MPrintf(db, "%s.%s.%s",
98002 zSchemaName, zTabName, zColname);
98003 testcase( pX->zSpan==0 );
98004 }
98005 pX->bSpanIsTab = 1;
98006 }
98007 sqlite3DbFree(db, zToFree);
98008 }
98009 }
98010 if( !tableSeen ){
98011 if( zTName ){
@@ -102869,11 +103107,11 @@
103107 sqlite3DbFree(db, pOld);
103108 }
103109 pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
103110 }
103111 pTerm = &pWC->a[idx = pWC->nTerm++];
103112 pTerm->pExpr = sqlite3ExprSkipCollate(p);
103113 pTerm->wtFlags = wtFlags;
103114 pTerm->pWC = pWC;
103115 pTerm->iParent = -1;
103116 return idx;
103117 }
@@ -103654,11 +103892,12 @@
103892 if( db->mallocFailed ){
103893 return;
103894 }
103895 pTerm = &pWC->a[idxTerm];
103896 pMaskSet = pWC->pMaskSet;
103897 pExpr = pTerm->pExpr;
103898 assert( pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE );
103899 prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft);
103900 op = pExpr->op;
103901 if( op==TK_IN ){
103902 assert( pExpr->pRight==0 );
103903 if( ExprHasProperty(pExpr, EP_xIsSelect) ){
@@ -105767,11 +106006,11 @@
106006 int bRev = 2;
106007 WHERETRACE((" --> before isSortingIndex: nPriorSat=%d\n",nPriorSat));
106008 pc.plan.nOBSat = isSortingIndex(p, pProbe, iCur, &bRev);
106009 WHERETRACE((" --> after isSortingIndex: bRev=%d nOBSat=%d\n",
106010 bRev, pc.plan.nOBSat));
106011 if( nPriorSat<pc.plan.nOBSat || (pc.plan.wsFlags & WHERE_ALL_UNIQUE)!=0 ){
106012 pc.plan.wsFlags |= WHERE_ORDERED;
106013 }
106014 if( nOrderBy==pc.plan.nOBSat ){
106015 bSort = 0;
106016 pc.plan.wsFlags |= WHERE_ROWID_RANGE|WHERE_COLUMN_RANGE;
@@ -108237,10 +108476,11 @@
108476 Expr* yy122;
108477 Select* yy159;
108478 IdList* yy180;
108479 struct {int value; int mask;} yy207;
108480 u8 yy258;
108481 u16 yy305;
108482 struct LikeOp yy318;
108483 TriggerStep* yy327;
108484 ExprSpan yy342;
108485 SrcList* yy347;
108486 int yy392;
@@ -110187,22 +110427,19 @@
110427 case 82: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==82);
110428 case 84: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==84);
110429 case 86: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==86);
110430 case 98: /* defer_subclause_opt ::= */ yytestcase(yyruleno==98);
110431 case 109: /* ifexists ::= */ yytestcase(yyruleno==109);
 
 
110432 case 221: /* between_op ::= BETWEEN */ yytestcase(yyruleno==221);
110433 case 224: /* in_op ::= IN */ yytestcase(yyruleno==224);
110434 {yygotominor.yy392 = 0;}
110435 break;
110436 case 29: /* ifnotexists ::= IF NOT EXISTS */
110437 case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
110438 case 70: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==70);
110439 case 85: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==85);
110440 case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108);
 
110441 case 222: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==222);
110442 case 225: /* in_op ::= NOT IN */ yytestcase(yyruleno==225);
110443 {yygotominor.yy392 = 1;}
110444 break;
110445 case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
@@ -110438,12 +110675,19 @@
110675 case 116: /* multiselect_op ::= UNION ALL */
110676 {yygotominor.yy392 = TK_ALL;}
110677 break;
110678 case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
110679 {
110680 yygotominor.yy159 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy442,yymsp[-5].minor.yy347,yymsp[-4].minor.yy122,yymsp[-3].minor.yy442,yymsp[-2].minor.yy122,yymsp[-1].minor.yy442,yymsp[-7].minor.yy305,yymsp[0].minor.yy64.pLimit,yymsp[0].minor.yy64.pOffset);
110681 }
110682 break;
110683 case 119: /* distinct ::= DISTINCT */
110684 {yygotominor.yy305 = SF_Distinct;}
110685 break;
110686 case 120: /* distinct ::= ALL */
110687 case 121: /* distinct ::= */ yytestcase(yyruleno==121);
110688 {yygotominor.yy305 = 0;}
110689 break;
110690 case 122: /* sclp ::= selcollist COMMA */
110691 case 246: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==246);
110692 {yygotominor.yy442 = yymsp[-1].minor.yy442;}
110693 break;
@@ -110509,14 +110753,24 @@
110753 break;
110754 case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
110755 {
110756 if( yymsp[-6].minor.yy347==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy122==0 && yymsp[0].minor.yy180==0 ){
110757 yygotominor.yy347 = yymsp[-4].minor.yy347;
110758 }else if( yymsp[-4].minor.yy347->nSrc==1 ){
110759 yygotominor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy122,yymsp[0].minor.yy180);
110760 if( yygotominor.yy347 ){
110761 struct SrcList_item *pNew = &yygotominor.yy347->a[yygotominor.yy347->nSrc-1];
110762 struct SrcList_item *pOld = yymsp[-4].minor.yy347->a;
110763 pNew->zName = pOld->zName;
110764 pNew->zDatabase = pOld->zDatabase;
110765 pOld->zName = pOld->zDatabase = 0;
110766 }
110767 sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy347);
110768 }else{
110769 Select *pSubquery;
110770 sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy347);
110771 pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy347,0,0,0,0,SF_NestedFrom,0,0);
110772 yygotominor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy122,yymsp[0].minor.yy180);
110773 }
110774 }
110775 break;
110776 case 137: /* dbnm ::= */
@@ -110745,11 +110999,11 @@
110999 if( yymsp[-1].minor.yy442 && yymsp[-1].minor.yy442->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
111000 sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
111001 }
111002 yygotominor.yy342.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy442, &yymsp[-4].minor.yy0);
111003 spanSet(&yygotominor.yy342,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
111004 if( yymsp[-2].minor.yy305 && yygotominor.yy342.pExpr ){
111005 yygotominor.yy342.pExpr->flags |= EP_Distinct;
111006 }
111007 }
111008 break;
111009 case 197: /* expr ::= ID LP STAR RP */
111010
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.7.16"
111111
#define SQLITE_VERSION_NUMBER 3007016
112
-#define SQLITE_SOURCE_ID "2012-12-14 17:54:38 3d65c70343196b8f69c5293e7703839846fade85"
112
+#define SQLITE_SOURCE_ID "2013-01-09 11:31:17 5774f2175ce621dfc4b6b93f7ee13fd66f3ec2b9"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
118118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.16"
111 #define SQLITE_VERSION_NUMBER 3007016
112 #define SQLITE_SOURCE_ID "2012-12-14 17:54:38 3d65c70343196b8f69c5293e7703839846fade85"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.16"
111 #define SQLITE_VERSION_NUMBER 3007016
112 #define SQLITE_SOURCE_ID "2013-01-09 11:31:17 5774f2175ce621dfc4b6b93f7ee13fd66f3ec2b9"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
+1 -1
--- src/stat.c
+++ src/stat.c
@@ -115,11 +115,11 @@
115115
@ </td></tr>
116116
}
117117
@ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
118118
n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
119119
" + 0.99");
120
- @ %d(n) days or approximately %.2f(n/356.24) years.
120
+ @ %d(n) days or approximately %.2f(n/365.24) years.
121121
@ </td></tr>
122122
@ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
123123
@ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
124124
@ <tr><th>Fossil&nbsp;Version:</th><td>
125125
@ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
126126
--- src/stat.c
+++ src/stat.c
@@ -115,11 +115,11 @@
115 @ </td></tr>
116 }
117 @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
118 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
119 " + 0.99");
120 @ %d(n) days or approximately %.2f(n/356.24) years.
121 @ </td></tr>
122 @ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
123 @ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
124 @ <tr><th>Fossil&nbsp;Version:</th><td>
125 @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
126
--- src/stat.c
+++ src/stat.c
@@ -115,11 +115,11 @@
115 @ </td></tr>
116 }
117 @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
118 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
119 " + 0.99");
120 @ %d(n) days or approximately %.2f(n/365.24) years.
121 @ </td></tr>
122 @ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
123 @ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
124 @ <tr><th>Fossil&nbsp;Version:</th><td>
125 @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
126
+11
--- src/style.c
+++ src/style.c
@@ -994,10 +994,21 @@
994994
},
995995
{ "span.modpending",
996996
"Moderation Pending message on timeline",
997997
@ color: #b03800;
998998
@ font-style: italic;
999
+ },
1000
+ { "pre.th1result",
1001
+ "format for th1 script results",
1002
+ @ white-space: pre-wrap;
1003
+ @ word-wrap: break-word;
1004
+ },
1005
+ { "pre.th1error",
1006
+ "format for th1 script errors",
1007
+ @ white-space: pre-wrap;
1008
+ @ word-wrap: break-word;
1009
+ @ color: red;
9991010
},
10001011
{ 0,
10011012
0,
10021013
0
10031014
}
10041015
--- src/style.c
+++ src/style.c
@@ -994,10 +994,21 @@
994 },
995 { "span.modpending",
996 "Moderation Pending message on timeline",
997 @ color: #b03800;
998 @ font-style: italic;
 
 
 
 
 
 
 
 
 
 
 
999 },
1000 { 0,
1001 0,
1002 0
1003 }
1004
--- src/style.c
+++ src/style.c
@@ -994,10 +994,21 @@
994 },
995 { "span.modpending",
996 "Moderation Pending message on timeline",
997 @ color: #b03800;
998 @ font-style: italic;
999 },
1000 { "pre.th1result",
1001 "format for th1 script results",
1002 @ white-space: pre-wrap;
1003 @ word-wrap: break-word;
1004 },
1005 { "pre.th1error",
1006 "format for th1 script errors",
1007 @ white-space: pre-wrap;
1008 @ word-wrap: break-word;
1009 @ color: red;
1010 },
1011 { 0,
1012 0,
1013 0
1014 }
1015
+9 -32
--- src/timeline.c
+++ src/timeline.c
@@ -211,19 +211,20 @@
211211
if( tmFlags & TIMELINE_GRAPH ){
212212
pGraph = graph_init();
213213
/* style is not moved to css, because this is
214214
** a technical div for the timeline graph
215215
*/
216
- @ <div id="canvas" style="position:relative;width:1px;height:1px;"
216
+ @ <div id="canvas" style="position:relative;height:0px;width:0px;"
217217
@ onclick="clickOnGraph(event)"></div>
218218
}
219219
db_static_prepare(&qbranch,
220220
"SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
221221
TAG_BRANCH
222222
);
223223
224
- @ <table id="timelineTable" class="timelineTable">
224
+ @ <table id="timelineTable" class="timelineTable"
225
+ @ onclick="clickOnGraph(event)">
225226
blob_zero(&comment);
226227
while( db_step(pQuery)==SQLITE_ROW ){
227228
int rid = db_column_int(pQuery, 0);
228229
const char *zUuid = db_column_text(pQuery, 1);
229230
int isLeaf = db_column_int(pQuery, 5);
@@ -727,42 +728,16 @@
727728
@ for(var i in rowinfo){
728729
@ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY;
729730
@ rowinfo[i].x = left + rowinfo[i].r*railPitch;
730731
@ }
731732
@ var btm = absoluteY("grbtm") + 10 - canvasY;
732
-#if 0
733
- @ if( btm<32768 ){
734
- @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+
735
- @ 'style="position:absolute;left:'+(left-5)+'px;"' +
736
- @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>';
737
- @ realCanvas = gebi('timeline-canvas');
738
- @ }else{
739
- @ realCanvas = 0;
740
- @ }
741
- @ var context;
742
- @ if( realCanvas && realCanvas.getContext
743
- @ && (context = realCanvas.getContext('2d'))) {
744
- @ drawBox = function(color,x0,y0,x1,y1) {
745
- @ if( y0>32767 || y1>32767 ) return;
746
- @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
747
- @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; }
748
- @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return;
749
- @ context.fillStyle = color;
750
- @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1);
751
- @ };
752
- @ }
753
-#endif
754733
@ for(var i in rowinfo){
755734
@ drawNode(rowinfo[i], left, btm);
756735
@ }
757736
@ if( selRow!=null ) clickOnRow(selRow);
758737
@ }
759738
@ function clickOnGraph(event){
760
-#ifdef OMIT_IE8_SUPPORT
761
- @ var x=event.clientX-absoluteX("canvas")+window.pageXOffset;
762
- @ var y=event.clientY-absoluteY("canvas")+window.pageYOffset;
763
-#else
764739
@ var x=event.clientX-absoluteX("canvas");
765740
@ var y=event.clientY-absoluteY("canvas");
766741
@ if(window.pageXOffset!=null){
767742
@ x += window.pageXOffset;
768743
@ y += window.pageYOffset;
@@ -770,16 +745,18 @@
770745
@ var d = window.document.documentElement;
771746
@ if(document.compatMode!="CSS1Compat") d = d.body;
772747
@ x += d.scrollLeft;
773748
@ y += d.scrollTop;
774749
@ }
775
-#endif
750
+ if( P("clicktest")!=0 ){
751
+ @ alert("click at "+x+","+y)
752
+ }
776753
@ for(var i in rowinfo){
777754
@ p = rowinfo[i];
778
- @ if( p.y<y-10 ) continue;
779
- @ if( p.y>y+10 ) break;
780
- @ if( p.x>x-10 && p.x<x+10 ){
755
+ @ if( p.y<y-11 ) continue;
756
+ @ if( p.y>y+9 ) break;
757
+ @ if( p.x>x-11 && p.x<x+9 ){
781758
@ clickOnRow(p);
782759
@ break;
783760
@ }
784761
@ }
785762
@ }
786763
787764
ADDED src/unicode.c
--- src/timeline.c
+++ src/timeline.c
@@ -211,19 +211,20 @@
211 if( tmFlags & TIMELINE_GRAPH ){
212 pGraph = graph_init();
213 /* style is not moved to css, because this is
214 ** a technical div for the timeline graph
215 */
216 @ <div id="canvas" style="position:relative;width:1px;height:1px;"
217 @ onclick="clickOnGraph(event)"></div>
218 }
219 db_static_prepare(&qbranch,
220 "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
221 TAG_BRANCH
222 );
223
224 @ <table id="timelineTable" class="timelineTable">
 
225 blob_zero(&comment);
226 while( db_step(pQuery)==SQLITE_ROW ){
227 int rid = db_column_int(pQuery, 0);
228 const char *zUuid = db_column_text(pQuery, 1);
229 int isLeaf = db_column_int(pQuery, 5);
@@ -727,42 +728,16 @@
727 @ for(var i in rowinfo){
728 @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY;
729 @ rowinfo[i].x = left + rowinfo[i].r*railPitch;
730 @ }
731 @ var btm = absoluteY("grbtm") + 10 - canvasY;
732 #if 0
733 @ if( btm<32768 ){
734 @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+
735 @ 'style="position:absolute;left:'+(left-5)+'px;"' +
736 @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>';
737 @ realCanvas = gebi('timeline-canvas');
738 @ }else{
739 @ realCanvas = 0;
740 @ }
741 @ var context;
742 @ if( realCanvas && realCanvas.getContext
743 @ && (context = realCanvas.getContext('2d'))) {
744 @ drawBox = function(color,x0,y0,x1,y1) {
745 @ if( y0>32767 || y1>32767 ) return;
746 @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
747 @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; }
748 @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return;
749 @ context.fillStyle = color;
750 @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1);
751 @ };
752 @ }
753 #endif
754 @ for(var i in rowinfo){
755 @ drawNode(rowinfo[i], left, btm);
756 @ }
757 @ if( selRow!=null ) clickOnRow(selRow);
758 @ }
759 @ function clickOnGraph(event){
760 #ifdef OMIT_IE8_SUPPORT
761 @ var x=event.clientX-absoluteX("canvas")+window.pageXOffset;
762 @ var y=event.clientY-absoluteY("canvas")+window.pageYOffset;
763 #else
764 @ var x=event.clientX-absoluteX("canvas");
765 @ var y=event.clientY-absoluteY("canvas");
766 @ if(window.pageXOffset!=null){
767 @ x += window.pageXOffset;
768 @ y += window.pageYOffset;
@@ -770,16 +745,18 @@
770 @ var d = window.document.documentElement;
771 @ if(document.compatMode!="CSS1Compat") d = d.body;
772 @ x += d.scrollLeft;
773 @ y += d.scrollTop;
774 @ }
775 #endif
 
 
776 @ for(var i in rowinfo){
777 @ p = rowinfo[i];
778 @ if( p.y<y-10 ) continue;
779 @ if( p.y>y+10 ) break;
780 @ if( p.x>x-10 && p.x<x+10 ){
781 @ clickOnRow(p);
782 @ break;
783 @ }
784 @ }
785 @ }
786
787 DDED src/unicode.c
--- src/timeline.c
+++ src/timeline.c
@@ -211,19 +211,20 @@
211 if( tmFlags & TIMELINE_GRAPH ){
212 pGraph = graph_init();
213 /* style is not moved to css, because this is
214 ** a technical div for the timeline graph
215 */
216 @ <div id="canvas" style="position:relative;height:0px;width:0px;"
217 @ onclick="clickOnGraph(event)"></div>
218 }
219 db_static_prepare(&qbranch,
220 "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
221 TAG_BRANCH
222 );
223
224 @ <table id="timelineTable" class="timelineTable"
225 @ onclick="clickOnGraph(event)">
226 blob_zero(&comment);
227 while( db_step(pQuery)==SQLITE_ROW ){
228 int rid = db_column_int(pQuery, 0);
229 const char *zUuid = db_column_text(pQuery, 1);
230 int isLeaf = db_column_int(pQuery, 5);
@@ -727,42 +728,16 @@
728 @ for(var i in rowinfo){
729 @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY;
730 @ rowinfo[i].x = left + rowinfo[i].r*railPitch;
731 @ }
732 @ var btm = absoluteY("grbtm") + 10 - canvasY;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733 @ for(var i in rowinfo){
734 @ drawNode(rowinfo[i], left, btm);
735 @ }
736 @ if( selRow!=null ) clickOnRow(selRow);
737 @ }
738 @ function clickOnGraph(event){
 
 
 
 
739 @ var x=event.clientX-absoluteX("canvas");
740 @ var y=event.clientY-absoluteY("canvas");
741 @ if(window.pageXOffset!=null){
742 @ x += window.pageXOffset;
743 @ y += window.pageYOffset;
@@ -770,16 +745,18 @@
745 @ var d = window.document.documentElement;
746 @ if(document.compatMode!="CSS1Compat") d = d.body;
747 @ x += d.scrollLeft;
748 @ y += d.scrollTop;
749 @ }
750 if( P("clicktest")!=0 ){
751 @ alert("click at "+x+","+y)
752 }
753 @ for(var i in rowinfo){
754 @ p = rowinfo[i];
755 @ if( p.y<y-11 ) continue;
756 @ if( p.y>y+9 ) break;
757 @ if( p.x>x-11 && p.x<x+9 ){
758 @ clickOnRow(p);
759 @ break;
760 @ }
761 @ }
762 @ }
763
764 DDED src/unicode.c
+528
--- a/src/unicode.c
+++ b/src/unicode.c
@@ -0,0 +1,528 @@
1
+/*
2
+*8028020F606809F8C0B, 0x03600001,
3
+ 0x03ECA401,
4
+ 0x03F88033,
5
+ 0x03FC6807,
6
+ 0x03FFE405,
7
+ 0x0406400C,
8
+ 0x040E7C01,
9
+ 0x04247C01,
10
+ 0x0428E003,
11
+ 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
12
+ 0x04450004, 0x04451402,
13
+ 0x044B7C0C, 0x044C0004,
14
+ 0x044D2C03, 0x0FC01, 0x00320404,
15
+ 0x00335402,
16
+ 0x00351803,
17
+ 0x0035E401,
18
+ 0x00376008,
19
+ 0x00391C09,
20
+ 6, 0x003AEC02C80331, 0x00AF2835,
21
+ 0x00B39406,
22
+ 0x00B5F
23
+ 0x00BC00D6,
24
+ 0x00C0D802,
25
+ 0x00C64002,
26
+ 0x00C94001,
27
+ 0x01370040,
28
+ 0x029A7802,
29
+ 0x02A00801,
30
+ 0x02A1D004,2A3E003,
31
+ 0x02A57C01,
32
+3/fts302A8A40E,
33
+ 0x02A9EC03,
34
+ 0x02AB0401,
35
+ 0x02AF8C0B,
36
+ 0x03EC7801, 0x03ECA
37
+ 0x03F8001A,
38
+ 0x03FC040F,
39
+ 0x03FFA 0x0421DC02,
40
+ 0x00292C03,
41
+ 0x042B2001,
42
+ 0x 0x002AF001,
43
+ 0x04471409,*
44
+*8028 0x002BC002,
45
+ 0x002D1C02, 0x002D2C03,
46
+ 0x002E0801, 0x002EF805,
47
+ 0x002FCC08, 0x00300004,
48
+ 0x00315402, 0x00318802,
49
+ 0x0032F807, 0x00331803,
50
+ 0x00340403, 0x0034F807688, 61700351803, 0x00352804,
51
+ 0x0035E401, 0x00360802,
52
+ 0x00376008, 0x0037C803,
53
+ 0x00391C09, 0x00396802,
54
+ 0x003B2006, 0x003C041F,
55
+ 0x003E6424, 0x003EF80F,
56
+ 0x00415804, 0x00417803,
57
+ 0x0042080C, 0x00423C01,
58
+ 0x004E400A, 0
59
+ **, 'y', 'y', 'a', 'c0x005F6004,
60
+ 0x0062A401, 0x0064800C,
61
+ 0x00677822, 0x00685C05,
62
+ 0x0069FC01, 0x006A8007,
63
+
64
+ 0x006FF004, 0x00709014,, 0x03600001,
65
+ 0x03ECA401,
66
+ 0x03F88033,
67
+ 0x03FC6807,
68
+ 0x03FFE405,
69
+ 0x0406400C
70
+ 0x007FB403, 0x007FF402,
71
+ 0 007FB403, 0x007FF402,
72
+ 0x00822805, 0x0082801F,
73
+ 0x00842002, 0x00845001,
74
+ 0x00const static84A401,
75
+ 0x00852804, 0x00853C01, 0x00862802, 0x0086426F, 0x00900027,
76
+ 0x009E53E0, 0x00ADD820,
77
+ 00391C09,
78
+ 6, 0x003AEC02C80331, 8, 0x00AFB004, 0x00B394060x05BE3C000B5F
79
+ 0x00BC00D6,
80
+ 0x00C0 0x00B5C001, 0x00B5FC01,
81
+ 00C94001,
82
+ 0x0137005, 0x00BA001A, 0x00C0A807, 0x00C0DC01,
83
+ 0x00C05, 0x00181816,
84
+ 0x001B9C07,2A00801,
85
+ 0x02A0D8
86
+ 0x001CC01B,x0472A40E,
87
+ 0x02A380
88
+ 0x00206C09,
89
+ 0x02A8A40E, 0x02
90
+ 0x00217x03600001,
91
+ 0x03EC7801, 0x03ECA401,
92
+ 0x03F8001A, 0x03F88033,
93
+ 0x03FC040F, 0x03FC6807,
94
+ 0x03FFA007, 0x03FFE405,
95
+ 0x04063003, 0x0406400C,
96
+ 0x040DD805, 0x040E7C01,
97
+ 0x0421DC02, 0x04247C01,
98
+ 0x04d', 'e', 'e', 'g', 'h', 'i 0x04283004, 0x0428E003,
99
+ 0x042B2001, 0x042B9402,
100
+ 0x04400003, 0x0440E016,
101
+ 0x04449C0E, 0x04450004,
102
+ 0x04471409, 0x04476C01,
103
+ 0F606809F8C0B, 0x03600001,
104
+ 0x044D2C03, 0x044D5C01,
105
+ 0x0450D412, 0x04512C05,
106
+ 0x04531801, 0x0456BC07,
107
+ 0x0459800D, 0x045AAC0D,
108
+ 040DD805,
109
+ 0x0421DC02,
110
+ 41FC04,
111
+ 0x04450004,
112
+ 0x0
113
+ 0x0471C9800D,
114
+ 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
115
+ 0x0474FC07, 0x04751C01,
116
+ 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC05C01, 0x00358802, 0x0035E401,
117
+ 01, 0x006A8007,
118
+ 0 0x00376008,
119
+ 709014,, 0x03600001,
120
+ 0x00391C09,
121
+ 807,
122
+ 0x03FFE405,
123
+ 0x003B2006,
124
+ 0x00822805, 0x008 0x003E6424,
125
+ 849C01, 0x0084A401,
126
+ 0x00415804,
127
+ 86426F, 0x00900027,
128
+ 0x0042080C,
129
+ 6, 0x003AEC02C80331, 0x004E400A,
130
+ 0x00BC00D6,
131
+ 0x00 0x005BAC03,
132
+ 0x0137005, 0x00BA001 0x005ED023,
133
+ 0x00C64002,
134
+ A401, 0x0064800C,
135
+ 0x00677822, 0x00685C05,
136
+ 0x0069FC01, 0x006A8007,
137
+ 0x006CD011, 0x006D6823,
138
+ 0x006FF004, 0x007090140442C012,
139
+/*
140
+*8028020F606809F8C0B, 0x0360809F8C0B, 0x03600001,
141
+ 0x 0x0077F004, 0x007EF401,
142
+ 0x007FB403, 0x007FF402,
143
+ 0x00822805, 0x0082801F,
144
+ 0x00842002, 0x00845001,
145
+ 0x00849C01, 0x0084A401,
146
+ 0x00852804, 0x00853C016C011, 0x00672002,
147
+
148
+ 0x0069FC01, 0x006A8007,
149
+ 0x006CD011, 0x006D6823,
150
+ 0x006FF004, 0x00709014,
151
+ 0x00734019, 0x0073B401,, 0x03600001,
152
+ 0x03ECA401
153
+ 0x007FB403, 0x007FFEC01, 0x0 0x02A6CC1B, 0x02A77802,
154
+
155
+ 0x00822805, 0x0082801E,05BE3C000842002, 0x00845001,
156
+ 0x00849C01, 0x0084A401,
157
+ 0x00852804, 0x00853C01 0x040400
158
+ 0x0092704E, 0x0406400C, 0x040F4
159
+ 0x00AEF40C, 0x00AF28082CE407,
160
+ 0x0441FC04, 0x0442C012,
161
+ 0x0445CC03, 0x04460003,
162
+ 0x04477403, 0x0448B012,
163
+ 0F606809F8C0B, 0x03600001,
164
+ 0x044D8802,8, 1168660, 186, 6},
165
+ {7976, 18686, 8}, {8008, 18687, 8}, {8040,86, 8}, {8104, 18686, 2},
166
+ {8122,0, 1},
167
+ {8136,86, 2},
168
+ {8154, 15{8170, 154, 2},
169
+ {8172, 18848, 2}, {81860, 112, 1},
170
+ {8491, 1140836, 1},
171
+ {11364, 1104, 1},
172
+ {11374, 1060, 1}, {11376, 1029846209, 84, 0, 86},
173
+{42930, 86},
174
+ {43888, 92 30204,
175
+ 54793, 54809,
176
+ 8028020F606809F020F606809F8C0B, 65268, 65341,
177
+ 65436, 65439,
178
+ 65482, 65488,
179
+ bRemoveDiacritic ));/446, 1},
180
+ 4, 8},
181
+ {7960, 184, 4980A, 0x02A51C0D,
182
+ , 184, 8}, {79 0x02A79401,
183
+ {8040,{8088, 184, 0x02A9DC03,
184
+ 2}, {8122, 16 0x02AAF802,
185
+ 0, 1}, {8136, 0x02AD6C01,
186
+
187
+ {81868, 182
188
+ 0x037FFC01,
189
+
190
+ {11363, 136, 1}, 0x03F7F002,
191
+ 1506, 0, 1},*8028020F0E, 0x03F8C02 {42877, 94, 1},
192
+ {42893, 86, 1},
193
+ {42922, 80, 1},
194
+ {42925, 82, 1},
195
+ {42929, 840, 831, 68, 1},
196
+ {429325268, 65341, 65373,
197
+ 65450,
198
+ 65506,
199
+ 8028020F606809F8C0B, 0x03600001,
200
+ 03600001,
201
+ 0x03ECA401,
202
+ 0x03F88033,
203
+ 0x03FC6807,
204
+ 0x03FFE405,
205
+ 0x0406400C,
206
+ 0x040E7C01,
207
+ 0x04247C01,
208
+ 0x0428E003,
209
+ 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
210
+ 0x04450004, 0x04451402,
211
+ 0x044B7C0C, 0x044C00sizeof(aEntry)/sizeof(aEntry[0] 0x0035E401,
212
+ 0x00376008,
213
+ 0x00391C09,
214
+ 6, 0x003AEC02C80331, 0x00AF2835,
215
+ 0x00B39406,
216
+ 0x00B5F
217
+ 0x00B4, 0x04473401, 0x0448B012, 0x044B7C0C,
218
+ 0x044C0403, 0x044CF001, 0x044CF807, 0x044DC005, 0x0452C014,
219
+ 8687, 8}, {8040,86, 8}, 186, 8}, {8104, 1868 {8136,86, 2},
220
+ {8154, 15{8170, 154, 2},
221
+ {8172, 18848, 2}, {81860, 112, 1},
222
+ {8491, 1140836, 1},
223
+ {11364, 1104, 1},
224
+ B5{11374, 1060, 1}, {11376, 1029846209, 84, 1},
225
+ {42930, 86},
226
+ {43888, 92 30204,
227
+ 54793, 54809,
228
+ 8028020F606809F020F606809F8C0B, 65268, 65341,
229
+ A34007, 0x07BBC002,
230
+
231
+ 0x07C34425, 0x07C4401F, 0x04247C01,
232
+ 0x0428E003,
233
+ 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
234
+ 0x04450004, 0x04451402,
235
+ 0x044B7C0C, 0x044C00sizeof(aEntry)/sizeof(aEntry[0] 0x0035E401,
236
+ 0x00376008,
237
+ 0x00391C09,
238
+ 6, 0x003AEC02C80331, 0x00AF2835,
239
+ 0x00B39406,
240
+ 0x00B5F
241
+ 0x00BC00D6,
242
+ 0x00C0D802,
243
+ 0x00C64002,
244
+ 0x00C94001,
245
+ 0x01370040,
246
+ 0x029A7802,
247
+ 0x02A00801,
248
+ 0x02A1D004,2A3E003,
249
+ 0x02A57C01,
250
+ 0x02A8A40E,
251
+ 0x02A9EC03,
252
+ 0x02AB0401,
253
+ 0x02AF8C0B,
254
+ 0x03EC7801, 0x03ECA
255
+ 0x03F8001A,
256
+ 0x03FC040F,
257
+ 0x03FFA007,
258
+ 0x04063003,
259
+ 0x040DD805,
260
+ 0x0421DC02,
261
+ 0x04283004,
262
+ 0x042B2001,
263
+ 0x04349004,
264
+ 0x0441FC04,
265
+ 0x04450004,
266
+ 0x04471409,*
267
+*8028020F606809F8C0, 0x03600001,
268
+
269
+ 0x044D2C03,
270
+ 0x0450D412,
271
+ 0x04531801,
272
+ 0x0459800D,
273
+ 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
274
+ 0x0474FC07, 0x04751C01,
275
+ 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC010,
276
+ 442E, 0x05BE3C04, 0x06F27008,
277
+
278
+ 0x075B0401, 0x075B6C01,
279
+ 0x075D3C01, 0x075DBC01,
280
+ 0x0760028C, 0x076A6C05,
281
+ 0x07806C07, 0x07808C02, 0x07809805, 0x07A34007, 0x07A51007,
282
+
283
+ 0x07C0C064, 0x07C2800F,
284
+ 0x07C4405C, 0x07C5C03D,
285
+ 0x07C94A,
286
+ 0x07DC0074, 0x07DE0059
287
+ 0x07E18028,402F, 0x07E50031,
288
+ 0x07E5CC04, 0x07E5E801, 0x07E5F027, 0x07E6C00A, 0x07E70003,
289
+ 0x07E74030, 0x07E9800E, 0x38000401, 0x38008060,){896, 3912, 3928,
290
+
291
+ 4408, 4424, 447
292
+ 61448, 61468, 61534, 61592, 61642, 61688, 61704, 61726,
293
+ 36, 61880, 61914, 61948, 61998, 62122,
294
+ 62154, 62200, 62218, 62302, 62364
295
+ 62554,
296
+ 62924char aChar[] = {
297
+ '\0', '/*
298
+*8028'u', 'y', 'y', 'a', 'c',
299
+ 'd', 'e', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r',
300
+ 's', 't', 'u', 'u', 'w', 'y', 'z', 'o', 'u', 'a', 'i', 'o',
301
+ 'u', 'g', 'k', 'o', 'j', 'g', 'n', 'a', 'e', 'i', 'o', 'r',
302
+ 'u', 's', 't', 'h', 'a', 'e', 'o', 'y', '\0', '\0', '\0', '\0',
303
+ '\0', '\0', '\0', '\0', 'a', 'b', 'd', 'd', 'e', 'f', 'g', 'h',
304
+ 'h', 'i', 'k', 'l', 'l', 'm', 'n', 'p', 'r', 'r', 's', 't',
305
+ 'u', 'v', 'w', 'w', 'x', 'y', 'z', 'h', 't', 'w', 'y', 'a',
306
+ 'e', 'i', 'o', 'u', return (
307
+*8028020F606809F8C0B,09F8C0B, 0x0360b2058, 1},
308
+ {503, 1704627678, 1},
309
+ {981, 1828284, 1, 24},
310
+ {10081009, 174, 1}, {108846862, 1},
311
+ {7297,*8028020F606809F8C0B, 0x03600001,
312
+ sizeof(aDia)/sizeof(aDia[0]
313
+ 0x040DD805,
314
+ 0x0421DC02,
315
+ 0x04283004,
316
+ 0x042B2001,
317
+ 0x04349004,
318
+ 0x0441FC04,
319
+ 0x04450004,
320
+ 0x04471409,*
321
+*8028020F606809F8C0, 0x03600001,
322
+
323
+ 0x044D2C03,
324
+ 0x0450D412,
325
+ 0x04531801,
326
+ 0x0459800D,
327
+ 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
328
+ 0x0474FC07, 0x04751C01,
329
+ 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC010,
330
+ 442E, 0x05BE3C04, 0x06F27008,
331
+
332
+ 0x075B0401, 0x075B6C01,
333
+ 0x075D3C01, 0x075DBC01,
334
+ 0x0760028C, 0x076A6C05,
335
+ 0x07806C07, 0x07808C02, 0x07809805, 0x07A34007, 0x07A51007,
336
+
337
+ 0x07C0C064, 0x07C2800F,
338
+ 0x07C4405C, 0x07C5C03D,
339
+ 0x07C94A,
340
+ 0x07DC0074, 0x07DE0059
341
+ 0x07E18028,402F, 0x07E50031,
342
+ 0x07E5CC04, 0x07E5E801, 0x07E5F027, 0x07E6C00A, 0x07E70003,
343
+ 0x07E74030, 0x07E9800E, 0x38000401, 0x38008060,){896, 3912, 3928,
344
+
345
+ 4408, 4424, 447
346
+ 61448, 61468, 61534, 61592, 61642, 61688, 61704, 61726,
347
+ 36, 61880, 61914, 61948, 61998, 62122,
348
+ 62154, 62200, 62218, 62302, 62364
349
+ 62554,
350
+ 62924char aChar[] = {
351
+ '\0', '/*
352
+*8028'u', 'y', 'y', 'a', 'c',
353
+ 'd', 'e', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r',
354
+ 's', 't', 'u', 'u', 'w', 'y', 'z', 'o', 'u', 'a', 'i', 'o',
355
+ 'u', 'g', 'k', 'o', 'j', 'g', 'n', 'a', 'e', 'i', 'o', 'r',
356
+ 'u', 's', 't', 'h', 'a', 'e', 'o', 'y', '\0', '\0', '\0', '\0',
357
+ '\0', '\0', '\0', '\0', 'a', 'b', 'd', 'd', 'e', 'f', 'g', 'h',
358
+ 'h', 'i', 'k', 'l', 'l', 'm', 'n', 'p', 'r', 'r', 's', 't',
359
+ 'u', 'v', 'w', 'w', 'x', 'y', 'z', 'h', 't', 'w', 'y', 'a',
360
+ ';e', 'i', 'o', 'u', return (
361
+*8028020F606809F8C0B,09F8C0B, 0x0360b2058, 1},
362
+ {503, 1704627678, 1},
363
+ {981, 1828284, 1, 24},
364
+ {10081009, 174, 1}, {108846862, 1},
365
+ {7297,*8028020F606809F8C0B, 0x03600001,
366
+ 0x03ECA401,
367
+ 0x03F88033,
368
+ 0x03FC6807,
369
+ 0x03FFE405,
370
+ 0x0406400C,
371
+ 0x040E7C01,
372
+ 0x04247C01,
373
+ 0x0428E003,
374
+ 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
375
+ 0x04450004, 0x04451402,
376
+ 0x044B7C0C, 0x044C0004,
377
+ 0x044D2C03, 0x0600001,
378
+ 0x03ECA402, 1324, 1},
379
+ {7304, 96, 1}, {7312, 138, 43}, {7357, 13867838, 1168660, 186, 6},
380
+ {7976, 18686, 8}, {8008, 18687, 8}, {8040,86, 8}, {8104, 18686, 2},
381
+ {8122,0, 1},
382
+ {8136,86, 2},
383
+ {8154, 15{8170, 154, 2},
384
+ {8172, 18848, 2}, {81860, 112, 1},
385
+ {8491, 1140836, 1},
386
+ {11364, 1104, 1},
387
+ {11374, 1060, 1}, {11376, 1029846209, 84, 1},
388
+ {42930, 86},
389
+ {43888, 92 30204,
390
+ 54793, 54809,
391
+ 8028020F606809F020F606809F8C0B, 65268, 65341,
392
+ 65436, 65439,
393
+ 65482, 65488,
394
+ bRemoveDiacritic ));count(aEntry
395
+ {42925, 82, 1},
396
+sizeof(aEntry)/sizeof(aEntry[0] 0x0456E020,
397
+ 7976, 18686, 8}, {8008,AAC0D, 0x045C740F, 0x045CF004,
398
+
399
+ 0x05BD442E, 0x05BE3C04,
400
+ 0x0744A4C0, 0x07480046,
401
+ 0x075BEC01, 0x075C5401, 'm', 75E2401, 0x075EA401,05BE3C0076A840F, 0x07A340078},
402
+ {8120, 184, 2}, {8122, 160, 2}, {8124, 182, 1},
403
+ {8126, 120, 1}, {82B},
404
+ {8170,6, 2},
405
+ B{81868, 1827A, 0x07D5EC29, 0x07D6952C, 0x07DB800D,
406
+ 0x07DBC004, 0x07DC0074,247C01,
407
+7E1400A, 0x07E18028, 0x07E24,
408
+ 0x044D2C03, 0x0600001,
409
+ 0x03ECA402, 1324, 1},
410
+ {7304, 96, 1}, {7312, 138, 43}, {7357, 13867838, 1168660, 186, 6},
411
+ {7976, 18686, 8}, {8008, 18687, 8}, {8040,86, 8}, {8104, 18686, 2},
412
+ {8122,0, 1},
413
+ {8136,86, 2},
414
+ {8154, 15{8170, 154, 2},
415
+ {8172, 18848, 2}, {81860, 112, 1},
416
+ {8491, 1140836, 1},
417
+ {11364, 1104, 1},
418
+ {11374, 1060, 1}, {11376, 1029846209, 84, 1},
419
+ {42930, 86},
420
+ {43888, 92 30204,
421
+ 54793, 54809,
422
+ 8028020F606809F020F606809F8C0B, 65268, 65341,
423
+ 65436, 65439,
424
+ 65482, 65488,
425
+ bRemoveDiacritic ));/446, 1},
426
+ 4, 8},
427
+ {7960, 184, 6},7976, 184, 8}, {7992, 184, 88008, 184, 6},{8025, 185, 8}, {8040,{8088, 184, 8}, {8104, 184, 8},
428
+ {8120, 184, 2}, {8122, 160, 2}, {8124, 182, 1},
429
+ {8126, 120, 1}, {8136, 1582, 1},
430
+ {8152,4, 2},
431
+ {8170,6, 2},
432
+ {81868, 182
433
+
434
+ {8544, 8, 16},
435
+ {11264, 24, 47},
436
+ {11363, 136, 1},
437
+ {11373, 104, 1},
438
+
439
+
440
+ {11506, 0, 1},*8028020F606606809F8C0B, 0x03600001,
441
+ {42877, 94, 1},
442
+ {42893, 86, 1},
443
+ {42922, 80, 1},
444
+ {42925, 82, 1},
445
+ {42929, 840, 831, 68, 1},
446
+ {429325268, 65341, 65373,
447
+ 65450,
448
+ 65506,
449
+ 8028020F606809F8C0B, 0x03600001,
450
+ 03600001,
451
+ 0x03ECA401,
452
+ 0x03F88033,
453
+ 0x03FC6807,
454
+ 0x03FFE405,
455
+ 0x0406400C,
456
+ 0x040E7C01,
457
+ 0x04247C01,
458
+ 0x0428E003,
459
+ 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
460
+ 0x04450004, 0x04451402,
461
+ 0x044B7C0C, 0x044C00sizeof(aEntry)/sizeof(aEntry[0] 0x0035E401,
462
+ 0x00376008,
463
+ 0x00391C09,
464
+ 6, 0x003AEC02C80331, 0x00AF2835,
465
+ 0x00B39406,
466
+ 0x00B5F
467
+ 0x00BC00D6,
468
+ 0x00C0D802,
469
+ 0x00C64002,
470
+ 0x00C94001,
471
+ 0x01370040,
472
+ 0x029A7802,
473
+ 0x02A00801,
474
+ 0x02A1D004,2A3E003,
475
+ 0x02A57C01,
476
+ 0x02A8A40E,
477
+ 0x02A9EC03,
478
+ 0x02AB0401,
479
+ 0x02AF8C0B,
480
+ 0x03EC7801, 0x03ECA
481
+ 0x03F8001A,
482
+ 0x03FC040F,
483
+ 0x03FFA007,
484
+ 0x04063003,
485
+ 0x040DD805,
486
+ 0x0421DC02,
487
+ 0x04283004,
488
+ 0x042B2001,
489
+ 0x04349004,
490
+ 0x0441FC04,
491
+ 0x04450004,
492
+ 0x04471409,*
493
+*8028020F606809F8C0, 0x03600001,
494
+
495
+ 0x044D2C03,
496
+ 0x0450D412,
497
+ 0x04531801,
498
+ 0x0459800D,
499
+ 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
500
+ 0x0474FC07, 0x04751C01,
501
+ 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC010,
502
+ 442E, 0x05BE3C04, 0x06F27008,
503
+
504
+ 0x075B0401, 0x075B6C01,
505
+ 0x075D3C01, 0x075DBC01,
506
+ 0x0760028C, 0x076A6C05,
507
+ 0x07806C07, 0x07808C02, 0x07809805, 0x07A34007, 0x07A51007,
508
+
509
+ 0x07C0C064, 0x07C2800F,
510
+ 0x07C4405C, 0x07C5C03D,
511
+ 0x07C94A,
512
+ 0x07DC0074, 0x07DE0059
513
+ 0x07E18028,402F, 0x07E50031,
514
+ 0x07E5CC04, 0x07E5E801, 0x07E5F027, 0x07E6C00A, 0x07E70003,
515
+ 0x07E74030, 0x07E9800E, 0x38000401, 0x38008060,){896, 3912, 3928,
516
+
517
+ 4408, 4424, 447
518
+ 61448, 61468, 61534, 61592, 61642, 61688, 61704, 61726,
519
+ 36, 61880, 61914, 61948, 61998, 62122,
520
+ 62154, 62200, 62218, 62302, 62364
521
+ 62554,
522
+ 62924char aChar[] = {
523
+ '\0', '/*
524
+*8028'u', 'y', 'y', 'a', 'c',
525
+ 'd', 'e', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r',
526
+ 's', 't', 'u', 'u', 'w', 'y', 'z', 'o', 'u', 'a', 'i', 'o',
527
+ 'u', 'g', 'k', 'o', 'j', 'g', 'n', 'a', 'e', 'i', 'o', 'r',
528
+ 'u', 's', 't', 'h'
--- a/src/unicode.c
+++ b/src/unicode.c
@@ -0,0 +1,528 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/unicode.c
+++ b/src/unicode.c
@@ -0,0 +1,528 @@
1 /*
2 *8028020F606809F8C0B, 0x03600001,
3 0x03ECA401,
4 0x03F88033,
5 0x03FC6807,
6 0x03FFE405,
7 0x0406400C,
8 0x040E7C01,
9 0x04247C01,
10 0x0428E003,
11 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
12 0x04450004, 0x04451402,
13 0x044B7C0C, 0x044C0004,
14 0x044D2C03, 0x0FC01, 0x00320404,
15 0x00335402,
16 0x00351803,
17 0x0035E401,
18 0x00376008,
19 0x00391C09,
20 6, 0x003AEC02C80331, 0x00AF2835,
21 0x00B39406,
22 0x00B5F
23 0x00BC00D6,
24 0x00C0D802,
25 0x00C64002,
26 0x00C94001,
27 0x01370040,
28 0x029A7802,
29 0x02A00801,
30 0x02A1D004,2A3E003,
31 0x02A57C01,
32 3/fts302A8A40E,
33 0x02A9EC03,
34 0x02AB0401,
35 0x02AF8C0B,
36 0x03EC7801, 0x03ECA
37 0x03F8001A,
38 0x03FC040F,
39 0x03FFA 0x0421DC02,
40 0x00292C03,
41 0x042B2001,
42 0x 0x002AF001,
43 0x04471409,*
44 *8028 0x002BC002,
45 0x002D1C02, 0x002D2C03,
46 0x002E0801, 0x002EF805,
47 0x002FCC08, 0x00300004,
48 0x00315402, 0x00318802,
49 0x0032F807, 0x00331803,
50 0x00340403, 0x0034F807688, 61700351803, 0x00352804,
51 0x0035E401, 0x00360802,
52 0x00376008, 0x0037C803,
53 0x00391C09, 0x00396802,
54 0x003B2006, 0x003C041F,
55 0x003E6424, 0x003EF80F,
56 0x00415804, 0x00417803,
57 0x0042080C, 0x00423C01,
58 0x004E400A, 0
59 **, 'y', 'y', 'a', 'c0x005F6004,
60 0x0062A401, 0x0064800C,
61 0x00677822, 0x00685C05,
62 0x0069FC01, 0x006A8007,
63
64 0x006FF004, 0x00709014,, 0x03600001,
65 0x03ECA401,
66 0x03F88033,
67 0x03FC6807,
68 0x03FFE405,
69 0x0406400C
70 0x007FB403, 0x007FF402,
71 0 007FB403, 0x007FF402,
72 0x00822805, 0x0082801F,
73 0x00842002, 0x00845001,
74 0x00const static84A401,
75 0x00852804, 0x00853C01, 0x00862802, 0x0086426F, 0x00900027,
76 0x009E53E0, 0x00ADD820,
77 00391C09,
78 6, 0x003AEC02C80331, 8, 0x00AFB004, 0x00B394060x05BE3C000B5F
79 0x00BC00D6,
80 0x00C0 0x00B5C001, 0x00B5FC01,
81 00C94001,
82 0x0137005, 0x00BA001A, 0x00C0A807, 0x00C0DC01,
83 0x00C05, 0x00181816,
84 0x001B9C07,2A00801,
85 0x02A0D8
86 0x001CC01B,x0472A40E,
87 0x02A380
88 0x00206C09,
89 0x02A8A40E, 0x02
90 0x00217x03600001,
91 0x03EC7801, 0x03ECA401,
92 0x03F8001A, 0x03F88033,
93 0x03FC040F, 0x03FC6807,
94 0x03FFA007, 0x03FFE405,
95 0x04063003, 0x0406400C,
96 0x040DD805, 0x040E7C01,
97 0x0421DC02, 0x04247C01,
98 0x04d', 'e', 'e', 'g', 'h', 'i 0x04283004, 0x0428E003,
99 0x042B2001, 0x042B9402,
100 0x04400003, 0x0440E016,
101 0x04449C0E, 0x04450004,
102 0x04471409, 0x04476C01,
103 0F606809F8C0B, 0x03600001,
104 0x044D2C03, 0x044D5C01,
105 0x0450D412, 0x04512C05,
106 0x04531801, 0x0456BC07,
107 0x0459800D, 0x045AAC0D,
108 040DD805,
109 0x0421DC02,
110 41FC04,
111 0x04450004,
112 0x0
113 0x0471C9800D,
114 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
115 0x0474FC07, 0x04751C01,
116 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC05C01, 0x00358802, 0x0035E401,
117 01, 0x006A8007,
118 0 0x00376008,
119 709014,, 0x03600001,
120 0x00391C09,
121 807,
122 0x03FFE405,
123 0x003B2006,
124 0x00822805, 0x008 0x003E6424,
125 849C01, 0x0084A401,
126 0x00415804,
127 86426F, 0x00900027,
128 0x0042080C,
129 6, 0x003AEC02C80331, 0x004E400A,
130 0x00BC00D6,
131 0x00 0x005BAC03,
132 0x0137005, 0x00BA001 0x005ED023,
133 0x00C64002,
134 A401, 0x0064800C,
135 0x00677822, 0x00685C05,
136 0x0069FC01, 0x006A8007,
137 0x006CD011, 0x006D6823,
138 0x006FF004, 0x007090140442C012,
139 /*
140 *8028020F606809F8C0B, 0x0360809F8C0B, 0x03600001,
141 0x 0x0077F004, 0x007EF401,
142 0x007FB403, 0x007FF402,
143 0x00822805, 0x0082801F,
144 0x00842002, 0x00845001,
145 0x00849C01, 0x0084A401,
146 0x00852804, 0x00853C016C011, 0x00672002,
147
148 0x0069FC01, 0x006A8007,
149 0x006CD011, 0x006D6823,
150 0x006FF004, 0x00709014,
151 0x00734019, 0x0073B401,, 0x03600001,
152 0x03ECA401
153 0x007FB403, 0x007FFEC01, 0x0 0x02A6CC1B, 0x02A77802,
154
155 0x00822805, 0x0082801E,05BE3C000842002, 0x00845001,
156 0x00849C01, 0x0084A401,
157 0x00852804, 0x00853C01 0x040400
158 0x0092704E, 0x0406400C, 0x040F4
159 0x00AEF40C, 0x00AF28082CE407,
160 0x0441FC04, 0x0442C012,
161 0x0445CC03, 0x04460003,
162 0x04477403, 0x0448B012,
163 0F606809F8C0B, 0x03600001,
164 0x044D8802,8, 1168660, 186, 6},
165 {7976, 18686, 8}, {8008, 18687, 8}, {8040,86, 8}, {8104, 18686, 2},
166 {8122,0, 1},
167 {8136,86, 2},
168 {8154, 15{8170, 154, 2},
169 {8172, 18848, 2}, {81860, 112, 1},
170 {8491, 1140836, 1},
171 {11364, 1104, 1},
172 {11374, 1060, 1}, {11376, 1029846209, 84, 0, 86},
173 {42930, 86},
174 {43888, 92 30204,
175 54793, 54809,
176 8028020F606809F020F606809F8C0B, 65268, 65341,
177 65436, 65439,
178 65482, 65488,
179 bRemoveDiacritic ));/446, 1},
180 4, 8},
181 {7960, 184, 4980A, 0x02A51C0D,
182 , 184, 8}, {79 0x02A79401,
183 {8040,{8088, 184, 0x02A9DC03,
184 2}, {8122, 16 0x02AAF802,
185 0, 1}, {8136, 0x02AD6C01,
186
187 {81868, 182
188 0x037FFC01,
189
190 {11363, 136, 1}, 0x03F7F002,
191 1506, 0, 1},*8028020F0E, 0x03F8C02 {42877, 94, 1},
192 {42893, 86, 1},
193 {42922, 80, 1},
194 {42925, 82, 1},
195 {42929, 840, 831, 68, 1},
196 {429325268, 65341, 65373,
197 65450,
198 65506,
199 8028020F606809F8C0B, 0x03600001,
200 03600001,
201 0x03ECA401,
202 0x03F88033,
203 0x03FC6807,
204 0x03FFE405,
205 0x0406400C,
206 0x040E7C01,
207 0x04247C01,
208 0x0428E003,
209 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
210 0x04450004, 0x04451402,
211 0x044B7C0C, 0x044C00sizeof(aEntry)/sizeof(aEntry[0] 0x0035E401,
212 0x00376008,
213 0x00391C09,
214 6, 0x003AEC02C80331, 0x00AF2835,
215 0x00B39406,
216 0x00B5F
217 0x00B4, 0x04473401, 0x0448B012, 0x044B7C0C,
218 0x044C0403, 0x044CF001, 0x044CF807, 0x044DC005, 0x0452C014,
219 8687, 8}, {8040,86, 8}, 186, 8}, {8104, 1868 {8136,86, 2},
220 {8154, 15{8170, 154, 2},
221 {8172, 18848, 2}, {81860, 112, 1},
222 {8491, 1140836, 1},
223 {11364, 1104, 1},
224 B5{11374, 1060, 1}, {11376, 1029846209, 84, 1},
225 {42930, 86},
226 {43888, 92 30204,
227 54793, 54809,
228 8028020F606809F020F606809F8C0B, 65268, 65341,
229 A34007, 0x07BBC002,
230
231 0x07C34425, 0x07C4401F, 0x04247C01,
232 0x0428E003,
233 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
234 0x04450004, 0x04451402,
235 0x044B7C0C, 0x044C00sizeof(aEntry)/sizeof(aEntry[0] 0x0035E401,
236 0x00376008,
237 0x00391C09,
238 6, 0x003AEC02C80331, 0x00AF2835,
239 0x00B39406,
240 0x00B5F
241 0x00BC00D6,
242 0x00C0D802,
243 0x00C64002,
244 0x00C94001,
245 0x01370040,
246 0x029A7802,
247 0x02A00801,
248 0x02A1D004,2A3E003,
249 0x02A57C01,
250 0x02A8A40E,
251 0x02A9EC03,
252 0x02AB0401,
253 0x02AF8C0B,
254 0x03EC7801, 0x03ECA
255 0x03F8001A,
256 0x03FC040F,
257 0x03FFA007,
258 0x04063003,
259 0x040DD805,
260 0x0421DC02,
261 0x04283004,
262 0x042B2001,
263 0x04349004,
264 0x0441FC04,
265 0x04450004,
266 0x04471409,*
267 *8028020F606809F8C0, 0x03600001,
268
269 0x044D2C03,
270 0x0450D412,
271 0x04531801,
272 0x0459800D,
273 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
274 0x0474FC07, 0x04751C01,
275 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC010,
276 442E, 0x05BE3C04, 0x06F27008,
277
278 0x075B0401, 0x075B6C01,
279 0x075D3C01, 0x075DBC01,
280 0x0760028C, 0x076A6C05,
281 0x07806C07, 0x07808C02, 0x07809805, 0x07A34007, 0x07A51007,
282
283 0x07C0C064, 0x07C2800F,
284 0x07C4405C, 0x07C5C03D,
285 0x07C94A,
286 0x07DC0074, 0x07DE0059
287 0x07E18028,402F, 0x07E50031,
288 0x07E5CC04, 0x07E5E801, 0x07E5F027, 0x07E6C00A, 0x07E70003,
289 0x07E74030, 0x07E9800E, 0x38000401, 0x38008060,){896, 3912, 3928,
290
291 4408, 4424, 447
292 61448, 61468, 61534, 61592, 61642, 61688, 61704, 61726,
293 36, 61880, 61914, 61948, 61998, 62122,
294 62154, 62200, 62218, 62302, 62364
295 62554,
296 62924char aChar[] = {
297 '\0', '/*
298 *8028'u', 'y', 'y', 'a', 'c',
299 'd', 'e', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r',
300 's', 't', 'u', 'u', 'w', 'y', 'z', 'o', 'u', 'a', 'i', 'o',
301 'u', 'g', 'k', 'o', 'j', 'g', 'n', 'a', 'e', 'i', 'o', 'r',
302 'u', 's', 't', 'h', 'a', 'e', 'o', 'y', '\0', '\0', '\0', '\0',
303 '\0', '\0', '\0', '\0', 'a', 'b', 'd', 'd', 'e', 'f', 'g', 'h',
304 'h', 'i', 'k', 'l', 'l', 'm', 'n', 'p', 'r', 'r', 's', 't',
305 'u', 'v', 'w', 'w', 'x', 'y', 'z', 'h', 't', 'w', 'y', 'a',
306 'e', 'i', 'o', 'u', return (
307 *8028020F606809F8C0B,09F8C0B, 0x0360b2058, 1},
308 {503, 1704627678, 1},
309 {981, 1828284, 1, 24},
310 {10081009, 174, 1}, {108846862, 1},
311 {7297,*8028020F606809F8C0B, 0x03600001,
312 sizeof(aDia)/sizeof(aDia[0]
313 0x040DD805,
314 0x0421DC02,
315 0x04283004,
316 0x042B2001,
317 0x04349004,
318 0x0441FC04,
319 0x04450004,
320 0x04471409,*
321 *8028020F606809F8C0, 0x03600001,
322
323 0x044D2C03,
324 0x0450D412,
325 0x04531801,
326 0x0459800D,
327 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
328 0x0474FC07, 0x04751C01,
329 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC010,
330 442E, 0x05BE3C04, 0x06F27008,
331
332 0x075B0401, 0x075B6C01,
333 0x075D3C01, 0x075DBC01,
334 0x0760028C, 0x076A6C05,
335 0x07806C07, 0x07808C02, 0x07809805, 0x07A34007, 0x07A51007,
336
337 0x07C0C064, 0x07C2800F,
338 0x07C4405C, 0x07C5C03D,
339 0x07C94A,
340 0x07DC0074, 0x07DE0059
341 0x07E18028,402F, 0x07E50031,
342 0x07E5CC04, 0x07E5E801, 0x07E5F027, 0x07E6C00A, 0x07E70003,
343 0x07E74030, 0x07E9800E, 0x38000401, 0x38008060,){896, 3912, 3928,
344
345 4408, 4424, 447
346 61448, 61468, 61534, 61592, 61642, 61688, 61704, 61726,
347 36, 61880, 61914, 61948, 61998, 62122,
348 62154, 62200, 62218, 62302, 62364
349 62554,
350 62924char aChar[] = {
351 '\0', '/*
352 *8028'u', 'y', 'y', 'a', 'c',
353 'd', 'e', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r',
354 's', 't', 'u', 'u', 'w', 'y', 'z', 'o', 'u', 'a', 'i', 'o',
355 'u', 'g', 'k', 'o', 'j', 'g', 'n', 'a', 'e', 'i', 'o', 'r',
356 'u', 's', 't', 'h', 'a', 'e', 'o', 'y', '\0', '\0', '\0', '\0',
357 '\0', '\0', '\0', '\0', 'a', 'b', 'd', 'd', 'e', 'f', 'g', 'h',
358 'h', 'i', 'k', 'l', 'l', 'm', 'n', 'p', 'r', 'r', 's', 't',
359 'u', 'v', 'w', 'w', 'x', 'y', 'z', 'h', 't', 'w', 'y', 'a',
360 ';e', 'i', 'o', 'u', return (
361 *8028020F606809F8C0B,09F8C0B, 0x0360b2058, 1},
362 {503, 1704627678, 1},
363 {981, 1828284, 1, 24},
364 {10081009, 174, 1}, {108846862, 1},
365 {7297,*8028020F606809F8C0B, 0x03600001,
366 0x03ECA401,
367 0x03F88033,
368 0x03FC6807,
369 0x03FFE405,
370 0x0406400C,
371 0x040E7C01,
372 0x04247C01,
373 0x0428E003,
374 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
375 0x04450004, 0x04451402,
376 0x044B7C0C, 0x044C0004,
377 0x044D2C03, 0x0600001,
378 0x03ECA402, 1324, 1},
379 {7304, 96, 1}, {7312, 138, 43}, {7357, 13867838, 1168660, 186, 6},
380 {7976, 18686, 8}, {8008, 18687, 8}, {8040,86, 8}, {8104, 18686, 2},
381 {8122,0, 1},
382 {8136,86, 2},
383 {8154, 15{8170, 154, 2},
384 {8172, 18848, 2}, {81860, 112, 1},
385 {8491, 1140836, 1},
386 {11364, 1104, 1},
387 {11374, 1060, 1}, {11376, 1029846209, 84, 1},
388 {42930, 86},
389 {43888, 92 30204,
390 54793, 54809,
391 8028020F606809F020F606809F8C0B, 65268, 65341,
392 65436, 65439,
393 65482, 65488,
394 bRemoveDiacritic ));count(aEntry
395 {42925, 82, 1},
396 sizeof(aEntry)/sizeof(aEntry[0] 0x0456E020,
397 7976, 18686, 8}, {8008,AAC0D, 0x045C740F, 0x045CF004,
398
399 0x05BD442E, 0x05BE3C04,
400 0x0744A4C0, 0x07480046,
401 0x075BEC01, 0x075C5401, 'm', 75E2401, 0x075EA401,05BE3C0076A840F, 0x07A340078},
402 {8120, 184, 2}, {8122, 160, 2}, {8124, 182, 1},
403 {8126, 120, 1}, {82B},
404 {8170,6, 2},
405 B{81868, 1827A, 0x07D5EC29, 0x07D6952C, 0x07DB800D,
406 0x07DBC004, 0x07DC0074,247C01,
407 7E1400A, 0x07E18028, 0x07E24,
408 0x044D2C03, 0x0600001,
409 0x03ECA402, 1324, 1},
410 {7304, 96, 1}, {7312, 138, 43}, {7357, 13867838, 1168660, 186, 6},
411 {7976, 18686, 8}, {8008, 18687, 8}, {8040,86, 8}, {8104, 18686, 2},
412 {8122,0, 1},
413 {8136,86, 2},
414 {8154, 15{8170, 154, 2},
415 {8172, 18848, 2}, {81860, 112, 1},
416 {8491, 1140836, 1},
417 {11364, 1104, 1},
418 {11374, 1060, 1}, {11376, 1029846209, 84, 1},
419 {42930, 86},
420 {43888, 92 30204,
421 54793, 54809,
422 8028020F606809F020F606809F8C0B, 65268, 65341,
423 65436, 65439,
424 65482, 65488,
425 bRemoveDiacritic ));/446, 1},
426 4, 8},
427 {7960, 184, 6},7976, 184, 8}, {7992, 184, 88008, 184, 6},{8025, 185, 8}, {8040,{8088, 184, 8}, {8104, 184, 8},
428 {8120, 184, 2}, {8122, 160, 2}, {8124, 182, 1},
429 {8126, 120, 1}, {8136, 1582, 1},
430 {8152,4, 2},
431 {8170,6, 2},
432 {81868, 182
433
434 {8544, 8, 16},
435 {11264, 24, 47},
436 {11363, 136, 1},
437 {11373, 104, 1},
438
439
440 {11506, 0, 1},*8028020F606606809F8C0B, 0x03600001,
441 {42877, 94, 1},
442 {42893, 86, 1},
443 {42922, 80, 1},
444 {42925, 82, 1},
445 {42929, 840, 831, 68, 1},
446 {429325268, 65341, 65373,
447 65450,
448 65506,
449 8028020F606809F8C0B, 0x03600001,
450 03600001,
451 0x03ECA401,
452 0x03F88033,
453 0x03FC6807,
454 0x03FFE405,
455 0x0406400C,
456 0x040E7C01,
457 0x04247C01,
458 0x0428E003,
459 0x042B9402 0x043D18 0x0441FC04, 0x0442C012,
460 0x04450004, 0x04451402,
461 0x044B7C0C, 0x044C00sizeof(aEntry)/sizeof(aEntry[0] 0x0035E401,
462 0x00376008,
463 0x00391C09,
464 6, 0x003AEC02C80331, 0x00AF2835,
465 0x00B39406,
466 0x00B5F
467 0x00BC00D6,
468 0x00C0D802,
469 0x00C64002,
470 0x00C94001,
471 0x01370040,
472 0x029A7802,
473 0x02A00801,
474 0x02A1D004,2A3E003,
475 0x02A57C01,
476 0x02A8A40E,
477 0x02A9EC03,
478 0x02AB0401,
479 0x02AF8C0B,
480 0x03EC7801, 0x03ECA
481 0x03F8001A,
482 0x03FC040F,
483 0x03FFA007,
484 0x04063003,
485 0x040DD805,
486 0x0421DC02,
487 0x04283004,
488 0x042B2001,
489 0x04349004,
490 0x0441FC04,
491 0x04450004,
492 0x04471409,*
493 *8028020F606809F8C0, 0x03600001,
494
495 0x044D2C03,
496 0x0450D412,
497 0x04531801,
498 0x0459800D,
499 0x0468040A, 0x0468CC07,46A7805, 0x0470BC08,4724816, 0x0472A40E,
500 0x0474FC07, 0x04751C01,
501 0x047BCC06, 0x0491C005, 0x05A9B802, 0x05ABC006, 0x05ACC010,
502 442E, 0x05BE3C04, 0x06F27008,
503
504 0x075B0401, 0x075B6C01,
505 0x075D3C01, 0x075DBC01,
506 0x0760028C, 0x076A6C05,
507 0x07806C07, 0x07808C02, 0x07809805, 0x07A34007, 0x07A51007,
508
509 0x07C0C064, 0x07C2800F,
510 0x07C4405C, 0x07C5C03D,
511 0x07C94A,
512 0x07DC0074, 0x07DE0059
513 0x07E18028,402F, 0x07E50031,
514 0x07E5CC04, 0x07E5E801, 0x07E5F027, 0x07E6C00A, 0x07E70003,
515 0x07E74030, 0x07E9800E, 0x38000401, 0x38008060,){896, 3912, 3928,
516
517 4408, 4424, 447
518 61448, 61468, 61534, 61592, 61642, 61688, 61704, 61726,
519 36, 61880, 61914, 61948, 61998, 62122,
520 62154, 62200, 62218, 62302, 62364
521 62554,
522 62924char aChar[] = {
523 '\0', '/*
524 *8028'u', 'y', 'y', 'a', 'c',
525 'd', 'e', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r',
526 's', 't', 'u', 'u', 'w', 'y', 'z', 'o', 'u', 'a', 'i', 'o',
527 'u', 'g', 'k', 'o', 'j', 'g', 'n', 'a', 'e', 'i', 'o', 'r',
528 'u', 's', 't', 'h'
+10 -5
--- src/update.c
+++ src/update.c
@@ -715,14 +715,18 @@
715715
int vid;
716716
vid = db_lget_int("checkout", 0);
717717
vfile_check_signature(vid, 0);
718718
db_multi_exec(
719719
"DELETE FROM vmerge;"
720
- "INSERT INTO torevert "
721
- "SELECT pathname"
722
- " FROM vfile "
723
- " WHERE chnged OR deleted OR rid=0 OR pathname!=origname;"
720
+ "INSERT OR IGNORE INTO torevert "
721
+ " SELECT pathname"
722
+ " FROM vfile "
723
+ " WHERE chnged OR deleted OR rid=0 OR pathname!=origname "
724
+ " UNION ALL "
725
+ " SELECT origname"
726
+ " FROM vfile"
727
+ " WHERE origname!=pathname;"
724728
);
725729
}
726730
blob_zero(&record);
727731
db_prepare(&q, "SELECT name FROM torevert");
728732
if( zRevision==0 ){
@@ -736,11 +740,12 @@
736740
zFile = db_column_text(&q, 0);
737741
zFull = mprintf("%/%/", g.zLocalRoot, zFile);
738742
errCode = historical_version_of_file(zRevision, zFile, &record,
739743
&isLink, &isExe, 0, 2);
740744
if( errCode==2 ){
741
- if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFile)==0 ){
745
+ if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q",
746
+ zFile, zFile)==0 ){
742747
fossil_print("UNMANAGE: %s\n", zFile);
743748
}else{
744749
undo_save(zFile);
745750
file_delete(zFull);
746751
fossil_print("DELETE: %s\n", zFile);
747752
--- src/update.c
+++ src/update.c
@@ -715,14 +715,18 @@
715 int vid;
716 vid = db_lget_int("checkout", 0);
717 vfile_check_signature(vid, 0);
718 db_multi_exec(
719 "DELETE FROM vmerge;"
720 "INSERT INTO torevert "
721 "SELECT pathname"
722 " FROM vfile "
723 " WHERE chnged OR deleted OR rid=0 OR pathname!=origname;"
 
 
 
 
724 );
725 }
726 blob_zero(&record);
727 db_prepare(&q, "SELECT name FROM torevert");
728 if( zRevision==0 ){
@@ -736,11 +740,12 @@
736 zFile = db_column_text(&q, 0);
737 zFull = mprintf("%/%/", g.zLocalRoot, zFile);
738 errCode = historical_version_of_file(zRevision, zFile, &record,
739 &isLink, &isExe, 0, 2);
740 if( errCode==2 ){
741 if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFile)==0 ){
 
742 fossil_print("UNMANAGE: %s\n", zFile);
743 }else{
744 undo_save(zFile);
745 file_delete(zFull);
746 fossil_print("DELETE: %s\n", zFile);
747
--- src/update.c
+++ src/update.c
@@ -715,14 +715,18 @@
715 int vid;
716 vid = db_lget_int("checkout", 0);
717 vfile_check_signature(vid, 0);
718 db_multi_exec(
719 "DELETE FROM vmerge;"
720 "INSERT OR IGNORE INTO torevert "
721 " SELECT pathname"
722 " FROM vfile "
723 " WHERE chnged OR deleted OR rid=0 OR pathname!=origname "
724 " UNION ALL "
725 " SELECT origname"
726 " FROM vfile"
727 " WHERE origname!=pathname;"
728 );
729 }
730 blob_zero(&record);
731 db_prepare(&q, "SELECT name FROM torevert");
732 if( zRevision==0 ){
@@ -736,11 +740,12 @@
740 zFile = db_column_text(&q, 0);
741 zFull = mprintf("%/%/", g.zLocalRoot, zFile);
742 errCode = historical_version_of_file(zRevision, zFile, &record,
743 &isLink, &isExe, 0, 2);
744 if( errCode==2 ){
745 if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q",
746 zFile, zFile)==0 ){
747 fossil_print("UNMANAGE: %s\n", zFile);
748 }else{
749 undo_save(zFile);
750 file_delete(zFull);
751 fossil_print("DELETE: %s\n", zFile);
752
+1 -1
--- src/wiki.c
+++ src/wiki.c
@@ -667,11 +667,11 @@
667667
if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){
668668
blob_init(&w2, pW2->zWiki, -1);
669669
}
670670
blob_zero(&d);
671671
diffFlags = construct_diff_flags(1,0);
672
- text_diff(&w2, &w1, &d, diffFlags | DIFF_HTML | DIFF_LINENO);
672
+ text_diff(&w2, &w1, &d, 0, diffFlags | DIFF_HTML | DIFF_LINENO);
673673
@ <div class="udiff">
674674
@ %s(blob_str(&d))
675675
@ </div>
676676
manifest_destroy(pW1);
677677
manifest_destroy(pW2);
678678
--- src/wiki.c
+++ src/wiki.c
@@ -667,11 +667,11 @@
667 if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){
668 blob_init(&w2, pW2->zWiki, -1);
669 }
670 blob_zero(&d);
671 diffFlags = construct_diff_flags(1,0);
672 text_diff(&w2, &w1, &d, diffFlags | DIFF_HTML | DIFF_LINENO);
673 @ <div class="udiff">
674 @ %s(blob_str(&d))
675 @ </div>
676 manifest_destroy(pW1);
677 manifest_destroy(pW2);
678
--- src/wiki.c
+++ src/wiki.c
@@ -667,11 +667,11 @@
667 if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){
668 blob_init(&w2, pW2->zWiki, -1);
669 }
670 blob_zero(&d);
671 diffFlags = construct_diff_flags(1,0);
672 text_diff(&w2, &w1, &d, 0, diffFlags | DIFF_HTML | DIFF_LINENO);
673 @ <div class="udiff">
674 @ %s(blob_str(&d))
675 @ </div>
676 manifest_destroy(pW1);
677 manifest_destroy(pW2);
678
+16 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -26,13 +26,13 @@
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
2929
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
3030
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_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.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 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 update_.c url_.c user_.c utf8_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
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_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.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 verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3232
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_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$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)\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)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$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
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_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$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)\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
3636
RC=$(DMDIR)\bin\rcc
3737
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
3838
@@ -46,11 +46,11 @@
4646
4747
$(OBJDIR)\fossil.res: $B\win\fossil.rc
4848
$(RC) $(RCFLAGS) -o$@ $**
4949
5050
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
51
- +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo update url user utf8 verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
51
+ +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
5252
+echo fossil >> $@
5353
+echo fossil >> $@
5454
+echo $(LIBS) >> $@
5555
+echo. >> $@
5656
+echo fossil >> $@
@@ -523,10 +523,16 @@
523523
$(OBJDIR)\rebuild$O : rebuild_.c rebuild.h
524524
$(TCC) -o$@ -c rebuild_.c
525525
526526
rebuild_.c : $(SRCDIR)\rebuild.c
527527
+translate$E $** > $@
528
+
529
+$(OBJDIR)\regexp$O : regexp_.c regexp.h
530
+ $(TCC) -o$@ -c regexp_.c
531
+
532
+regexp_.c : $(SRCDIR)\regexp.c
533
+ +translate$E $** > $@
528534
529535
$(OBJDIR)\report$O : report_.c report.h
530536
$(TCC) -o$@ -c report_.c
531537
532538
report_.c : $(SRCDIR)\report.c
@@ -643,10 +649,16 @@
643649
$(OBJDIR)\undo$O : undo_.c undo.h
644650
$(TCC) -o$@ -c undo_.c
645651
646652
undo_.c : $(SRCDIR)\undo.c
647653
+translate$E $** > $@
654
+
655
+$(OBJDIR)\unicode$O : unicode_.c unicode.h
656
+ $(TCC) -o$@ -c unicode_.c
657
+
658
+unicode_.c : $(SRCDIR)\unicode.c
659
+ +translate$E $** > $@
648660
649661
$(OBJDIR)\update$O : update_.c update.h
650662
$(TCC) -o$@ -c update_.c
651663
652664
update_.c : $(SRCDIR)\update.c
@@ -723,7 +735,7 @@
723735
724736
zip_.c : $(SRCDIR)\zip.c
725737
+translate$E $** > $@
726738
727739
headers: makeheaders$E page_index.h VERSION.h
728
- +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
740
+ +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
729741
@copy /Y nul: headers
730742
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -26,13 +26,13 @@
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_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.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 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 update_.c url_.c user_.c utf8_.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_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$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)\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)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$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
36 RC=$(DMDIR)\bin\rcc
37 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
38
@@ -46,11 +46,11 @@
46
47 $(OBJDIR)\fossil.res: $B\win\fossil.rc
48 $(RC) $(RCFLAGS) -o$@ $**
49
50 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
51 +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo update url user utf8 verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
52 +echo fossil >> $@
53 +echo fossil >> $@
54 +echo $(LIBS) >> $@
55 +echo. >> $@
56 +echo fossil >> $@
@@ -523,10 +523,16 @@
523 $(OBJDIR)\rebuild$O : rebuild_.c rebuild.h
524 $(TCC) -o$@ -c rebuild_.c
525
526 rebuild_.c : $(SRCDIR)\rebuild.c
527 +translate$E $** > $@
 
 
 
 
 
 
528
529 $(OBJDIR)\report$O : report_.c report.h
530 $(TCC) -o$@ -c report_.c
531
532 report_.c : $(SRCDIR)\report.c
@@ -643,10 +649,16 @@
643 $(OBJDIR)\undo$O : undo_.c undo.h
644 $(TCC) -o$@ -c undo_.c
645
646 undo_.c : $(SRCDIR)\undo.c
647 +translate$E $** > $@
 
 
 
 
 
 
648
649 $(OBJDIR)\update$O : update_.c update.h
650 $(TCC) -o$@ -c update_.c
651
652 update_.c : $(SRCDIR)\update.c
@@ -723,7 +735,7 @@
723
724 zip_.c : $(SRCDIR)\zip.c
725 +translate$E $** > $@
726
727 headers: makeheaders$E page_index.h VERSION.h
728 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
729 @copy /Y nul: headers
730
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -26,13 +26,13 @@
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_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.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 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_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$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)\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
36 RC=$(DMDIR)\bin\rcc
37 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
38
@@ -46,11 +46,11 @@
46
47 $(OBJDIR)\fossil.res: $B\win\fossil.rc
48 $(RC) $(RCFLAGS) -o$@ $**
49
50 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
51 +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
52 +echo fossil >> $@
53 +echo fossil >> $@
54 +echo $(LIBS) >> $@
55 +echo. >> $@
56 +echo fossil >> $@
@@ -523,10 +523,16 @@
523 $(OBJDIR)\rebuild$O : rebuild_.c rebuild.h
524 $(TCC) -o$@ -c rebuild_.c
525
526 rebuild_.c : $(SRCDIR)\rebuild.c
527 +translate$E $** > $@
528
529 $(OBJDIR)\regexp$O : regexp_.c regexp.h
530 $(TCC) -o$@ -c regexp_.c
531
532 regexp_.c : $(SRCDIR)\regexp.c
533 +translate$E $** > $@
534
535 $(OBJDIR)\report$O : report_.c report.h
536 $(TCC) -o$@ -c report_.c
537
538 report_.c : $(SRCDIR)\report.c
@@ -643,10 +649,16 @@
649 $(OBJDIR)\undo$O : undo_.c undo.h
650 $(TCC) -o$@ -c undo_.c
651
652 undo_.c : $(SRCDIR)\undo.c
653 +translate$E $** > $@
654
655 $(OBJDIR)\unicode$O : unicode_.c unicode.h
656 $(TCC) -o$@ -c unicode_.c
657
658 unicode_.c : $(SRCDIR)\unicode.c
659 +translate$E $** > $@
660
661 $(OBJDIR)\update$O : update_.c update.h
662 $(TCC) -o$@ -c update_.c
663
664 update_.c : $(SRCDIR)\update.c
@@ -723,7 +735,7 @@
735
736 zip_.c : $(SRCDIR)\zip.c
737 +translate$E $** > $@
738
739 headers: makeheaders$E page_index.h VERSION.h
740 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
741 @copy /Y nul: headers
742
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -322,10 +322,11 @@
322322
$(SRCDIR)/pivot.c \
323323
$(SRCDIR)/popen.c \
324324
$(SRCDIR)/pqueue.c \
325325
$(SRCDIR)/printf.c \
326326
$(SRCDIR)/rebuild.c \
327
+ $(SRCDIR)/regexp.c \
327328
$(SRCDIR)/report.c \
328329
$(SRCDIR)/rss.c \
329330
$(SRCDIR)/schema.c \
330331
$(SRCDIR)/search.c \
331332
$(SRCDIR)/setup.c \
@@ -342,10 +343,11 @@
342343
$(SRCDIR)/th_main.c \
343344
$(SRCDIR)/timeline.c \
344345
$(SRCDIR)/tkt.c \
345346
$(SRCDIR)/tktsetup.c \
346347
$(SRCDIR)/undo.c \
348
+ $(SRCDIR)/unicode.c \
347349
$(SRCDIR)/update.c \
348350
$(SRCDIR)/url.c \
349351
$(SRCDIR)/user.c \
350352
$(SRCDIR)/utf8.c \
351353
$(SRCDIR)/verify.c \
@@ -426,10 +428,11 @@
426428
$(OBJDIR)/pivot_.c \
427429
$(OBJDIR)/popen_.c \
428430
$(OBJDIR)/pqueue_.c \
429431
$(OBJDIR)/printf_.c \
430432
$(OBJDIR)/rebuild_.c \
433
+ $(OBJDIR)/regexp_.c \
431434
$(OBJDIR)/report_.c \
432435
$(OBJDIR)/rss_.c \
433436
$(OBJDIR)/schema_.c \
434437
$(OBJDIR)/search_.c \
435438
$(OBJDIR)/setup_.c \
@@ -446,10 +449,11 @@
446449
$(OBJDIR)/th_main_.c \
447450
$(OBJDIR)/timeline_.c \
448451
$(OBJDIR)/tkt_.c \
449452
$(OBJDIR)/tktsetup_.c \
450453
$(OBJDIR)/undo_.c \
454
+ $(OBJDIR)/unicode_.c \
451455
$(OBJDIR)/update_.c \
452456
$(OBJDIR)/url_.c \
453457
$(OBJDIR)/user_.c \
454458
$(OBJDIR)/utf8_.c \
455459
$(OBJDIR)/verify_.c \
@@ -530,10 +534,11 @@
530534
$(OBJDIR)/pivot.o \
531535
$(OBJDIR)/popen.o \
532536
$(OBJDIR)/pqueue.o \
533537
$(OBJDIR)/printf.o \
534538
$(OBJDIR)/rebuild.o \
539
+ $(OBJDIR)/regexp.o \
535540
$(OBJDIR)/report.o \
536541
$(OBJDIR)/rss.o \
537542
$(OBJDIR)/schema.o \
538543
$(OBJDIR)/search.o \
539544
$(OBJDIR)/setup.o \
@@ -550,10 +555,11 @@
550555
$(OBJDIR)/th_main.o \
551556
$(OBJDIR)/timeline.o \
552557
$(OBJDIR)/tkt.o \
553558
$(OBJDIR)/tktsetup.o \
554559
$(OBJDIR)/undo.o \
560
+ $(OBJDIR)/unicode.o \
555561
$(OBJDIR)/update.o \
556562
$(OBJDIR)/url.o \
557563
$(OBJDIR)/user.o \
558564
$(OBJDIR)/utf8.o \
559565
$(OBJDIR)/verify.o \
@@ -747,10 +753,11 @@
747753
$(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \
748754
$(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \
749755
$(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \
750756
$(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
751757
$(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
758
+ $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \
752759
$(OBJDIR)/report_.c:$(OBJDIR)/report.h \
753760
$(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
754761
$(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
755762
$(OBJDIR)/search_.c:$(OBJDIR)/search.h \
756763
$(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \
@@ -767,10 +774,11 @@
767774
$(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
768775
$(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \
769776
$(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \
770777
$(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \
771778
$(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \
779
+ $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h \
772780
$(OBJDIR)/update_.c:$(OBJDIR)/update.h \
773781
$(OBJDIR)/url_.c:$(OBJDIR)/url.h \
774782
$(OBJDIR)/user_.c:$(OBJDIR)/user.h \
775783
$(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \
776784
$(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \
@@ -1340,10 +1348,18 @@
13401348
13411349
$(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
13421350
$(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
13431351
13441352
$(OBJDIR)/rebuild.h: $(OBJDIR)/headers
1353
+
1354
+$(OBJDIR)/regexp_.c: $(SRCDIR)/regexp.c $(OBJDIR)/translate
1355
+ $(TRANSLATE) $(SRCDIR)/regexp.c >$(OBJDIR)/regexp_.c
1356
+
1357
+$(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
1358
+ $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
1359
+
1360
+$(OBJDIR)/regexp.h: $(OBJDIR)/headers
13451361
13461362
$(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
13471363
$(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c
13481364
13491365
$(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
@@ -1500,10 +1516,18 @@
15001516
15011517
$(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
15021518
$(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
15031519
15041520
$(OBJDIR)/undo.h: $(OBJDIR)/headers
1521
+
1522
+$(OBJDIR)/unicode_.c: $(SRCDIR)/unicode.c $(OBJDIR)/translate
1523
+ $(TRANSLATE) $(SRCDIR)/unicode.c >$(OBJDIR)/unicode_.c
1524
+
1525
+$(OBJDIR)/unicode.o: $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h $(SRCDIR)/config.h
1526
+ $(XTCC) -o $(OBJDIR)/unicode.o -c $(OBJDIR)/unicode_.c
1527
+
1528
+$(OBJDIR)/unicode.h: $(OBJDIR)/headers
15051529
15061530
$(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
15071531
$(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c
15081532
15091533
$(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
15101534
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -322,10 +322,11 @@
322 $(SRCDIR)/pivot.c \
323 $(SRCDIR)/popen.c \
324 $(SRCDIR)/pqueue.c \
325 $(SRCDIR)/printf.c \
326 $(SRCDIR)/rebuild.c \
 
327 $(SRCDIR)/report.c \
328 $(SRCDIR)/rss.c \
329 $(SRCDIR)/schema.c \
330 $(SRCDIR)/search.c \
331 $(SRCDIR)/setup.c \
@@ -342,10 +343,11 @@
342 $(SRCDIR)/th_main.c \
343 $(SRCDIR)/timeline.c \
344 $(SRCDIR)/tkt.c \
345 $(SRCDIR)/tktsetup.c \
346 $(SRCDIR)/undo.c \
 
347 $(SRCDIR)/update.c \
348 $(SRCDIR)/url.c \
349 $(SRCDIR)/user.c \
350 $(SRCDIR)/utf8.c \
351 $(SRCDIR)/verify.c \
@@ -426,10 +428,11 @@
426 $(OBJDIR)/pivot_.c \
427 $(OBJDIR)/popen_.c \
428 $(OBJDIR)/pqueue_.c \
429 $(OBJDIR)/printf_.c \
430 $(OBJDIR)/rebuild_.c \
 
431 $(OBJDIR)/report_.c \
432 $(OBJDIR)/rss_.c \
433 $(OBJDIR)/schema_.c \
434 $(OBJDIR)/search_.c \
435 $(OBJDIR)/setup_.c \
@@ -446,10 +449,11 @@
446 $(OBJDIR)/th_main_.c \
447 $(OBJDIR)/timeline_.c \
448 $(OBJDIR)/tkt_.c \
449 $(OBJDIR)/tktsetup_.c \
450 $(OBJDIR)/undo_.c \
 
451 $(OBJDIR)/update_.c \
452 $(OBJDIR)/url_.c \
453 $(OBJDIR)/user_.c \
454 $(OBJDIR)/utf8_.c \
455 $(OBJDIR)/verify_.c \
@@ -530,10 +534,11 @@
530 $(OBJDIR)/pivot.o \
531 $(OBJDIR)/popen.o \
532 $(OBJDIR)/pqueue.o \
533 $(OBJDIR)/printf.o \
534 $(OBJDIR)/rebuild.o \
 
535 $(OBJDIR)/report.o \
536 $(OBJDIR)/rss.o \
537 $(OBJDIR)/schema.o \
538 $(OBJDIR)/search.o \
539 $(OBJDIR)/setup.o \
@@ -550,10 +555,11 @@
550 $(OBJDIR)/th_main.o \
551 $(OBJDIR)/timeline.o \
552 $(OBJDIR)/tkt.o \
553 $(OBJDIR)/tktsetup.o \
554 $(OBJDIR)/undo.o \
 
555 $(OBJDIR)/update.o \
556 $(OBJDIR)/url.o \
557 $(OBJDIR)/user.o \
558 $(OBJDIR)/utf8.o \
559 $(OBJDIR)/verify.o \
@@ -747,10 +753,11 @@
747 $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \
748 $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \
749 $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \
750 $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
751 $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
 
752 $(OBJDIR)/report_.c:$(OBJDIR)/report.h \
753 $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
754 $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
755 $(OBJDIR)/search_.c:$(OBJDIR)/search.h \
756 $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \
@@ -767,10 +774,11 @@
767 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
768 $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \
769 $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \
770 $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \
771 $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \
 
772 $(OBJDIR)/update_.c:$(OBJDIR)/update.h \
773 $(OBJDIR)/url_.c:$(OBJDIR)/url.h \
774 $(OBJDIR)/user_.c:$(OBJDIR)/user.h \
775 $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \
776 $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \
@@ -1340,10 +1348,18 @@
1340
1341 $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
1342 $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
1343
1344 $(OBJDIR)/rebuild.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1345
1346 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
1347 $(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c
1348
1349 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
@@ -1500,10 +1516,18 @@
1500
1501 $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
1502 $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
1503
1504 $(OBJDIR)/undo.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1505
1506 $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
1507 $(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c
1508
1509 $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
1510
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -322,10 +322,11 @@
322 $(SRCDIR)/pivot.c \
323 $(SRCDIR)/popen.c \
324 $(SRCDIR)/pqueue.c \
325 $(SRCDIR)/printf.c \
326 $(SRCDIR)/rebuild.c \
327 $(SRCDIR)/regexp.c \
328 $(SRCDIR)/report.c \
329 $(SRCDIR)/rss.c \
330 $(SRCDIR)/schema.c \
331 $(SRCDIR)/search.c \
332 $(SRCDIR)/setup.c \
@@ -342,10 +343,11 @@
343 $(SRCDIR)/th_main.c \
344 $(SRCDIR)/timeline.c \
345 $(SRCDIR)/tkt.c \
346 $(SRCDIR)/tktsetup.c \
347 $(SRCDIR)/undo.c \
348 $(SRCDIR)/unicode.c \
349 $(SRCDIR)/update.c \
350 $(SRCDIR)/url.c \
351 $(SRCDIR)/user.c \
352 $(SRCDIR)/utf8.c \
353 $(SRCDIR)/verify.c \
@@ -426,10 +428,11 @@
428 $(OBJDIR)/pivot_.c \
429 $(OBJDIR)/popen_.c \
430 $(OBJDIR)/pqueue_.c \
431 $(OBJDIR)/printf_.c \
432 $(OBJDIR)/rebuild_.c \
433 $(OBJDIR)/regexp_.c \
434 $(OBJDIR)/report_.c \
435 $(OBJDIR)/rss_.c \
436 $(OBJDIR)/schema_.c \
437 $(OBJDIR)/search_.c \
438 $(OBJDIR)/setup_.c \
@@ -446,10 +449,11 @@
449 $(OBJDIR)/th_main_.c \
450 $(OBJDIR)/timeline_.c \
451 $(OBJDIR)/tkt_.c \
452 $(OBJDIR)/tktsetup_.c \
453 $(OBJDIR)/undo_.c \
454 $(OBJDIR)/unicode_.c \
455 $(OBJDIR)/update_.c \
456 $(OBJDIR)/url_.c \
457 $(OBJDIR)/user_.c \
458 $(OBJDIR)/utf8_.c \
459 $(OBJDIR)/verify_.c \
@@ -530,10 +534,11 @@
534 $(OBJDIR)/pivot.o \
535 $(OBJDIR)/popen.o \
536 $(OBJDIR)/pqueue.o \
537 $(OBJDIR)/printf.o \
538 $(OBJDIR)/rebuild.o \
539 $(OBJDIR)/regexp.o \
540 $(OBJDIR)/report.o \
541 $(OBJDIR)/rss.o \
542 $(OBJDIR)/schema.o \
543 $(OBJDIR)/search.o \
544 $(OBJDIR)/setup.o \
@@ -550,10 +555,11 @@
555 $(OBJDIR)/th_main.o \
556 $(OBJDIR)/timeline.o \
557 $(OBJDIR)/tkt.o \
558 $(OBJDIR)/tktsetup.o \
559 $(OBJDIR)/undo.o \
560 $(OBJDIR)/unicode.o \
561 $(OBJDIR)/update.o \
562 $(OBJDIR)/url.o \
563 $(OBJDIR)/user.o \
564 $(OBJDIR)/utf8.o \
565 $(OBJDIR)/verify.o \
@@ -747,10 +753,11 @@
753 $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \
754 $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \
755 $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \
756 $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
757 $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
758 $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \
759 $(OBJDIR)/report_.c:$(OBJDIR)/report.h \
760 $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
761 $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
762 $(OBJDIR)/search_.c:$(OBJDIR)/search.h \
763 $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \
@@ -767,10 +774,11 @@
774 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
775 $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \
776 $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \
777 $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \
778 $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \
779 $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h \
780 $(OBJDIR)/update_.c:$(OBJDIR)/update.h \
781 $(OBJDIR)/url_.c:$(OBJDIR)/url.h \
782 $(OBJDIR)/user_.c:$(OBJDIR)/user.h \
783 $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \
784 $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \
@@ -1340,10 +1348,18 @@
1348
1349 $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
1350 $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
1351
1352 $(OBJDIR)/rebuild.h: $(OBJDIR)/headers
1353
1354 $(OBJDIR)/regexp_.c: $(SRCDIR)/regexp.c $(OBJDIR)/translate
1355 $(TRANSLATE) $(SRCDIR)/regexp.c >$(OBJDIR)/regexp_.c
1356
1357 $(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
1358 $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
1359
1360 $(OBJDIR)/regexp.h: $(OBJDIR)/headers
1361
1362 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
1363 $(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c
1364
1365 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
@@ -1500,10 +1516,18 @@
1516
1517 $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
1518 $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
1519
1520 $(OBJDIR)/undo.h: $(OBJDIR)/headers
1521
1522 $(OBJDIR)/unicode_.c: $(SRCDIR)/unicode.c $(OBJDIR)/translate
1523 $(TRANSLATE) $(SRCDIR)/unicode.c >$(OBJDIR)/unicode_.c
1524
1525 $(OBJDIR)/unicode.o: $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h $(SRCDIR)/config.h
1526 $(XTCC) -o $(OBJDIR)/unicode.o -c $(OBJDIR)/unicode_.c
1527
1528 $(OBJDIR)/unicode.h: $(OBJDIR)/headers
1529
1530 $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
1531 $(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c
1532
1533 $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
1534
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -322,10 +322,11 @@
322322
$(SRCDIR)/pivot.c \
323323
$(SRCDIR)/popen.c \
324324
$(SRCDIR)/pqueue.c \
325325
$(SRCDIR)/printf.c \
326326
$(SRCDIR)/rebuild.c \
327
+ $(SRCDIR)/regexp.c \
327328
$(SRCDIR)/report.c \
328329
$(SRCDIR)/rss.c \
329330
$(SRCDIR)/schema.c \
330331
$(SRCDIR)/search.c \
331332
$(SRCDIR)/setup.c \
@@ -342,10 +343,11 @@
342343
$(SRCDIR)/th_main.c \
343344
$(SRCDIR)/timeline.c \
344345
$(SRCDIR)/tkt.c \
345346
$(SRCDIR)/tktsetup.c \
346347
$(SRCDIR)/undo.c \
348
+ $(SRCDIR)/unicode.c \
347349
$(SRCDIR)/update.c \
348350
$(SRCDIR)/url.c \
349351
$(SRCDIR)/user.c \
350352
$(SRCDIR)/utf8.c \
351353
$(SRCDIR)/verify.c \
@@ -426,10 +428,11 @@
426428
$(OBJDIR)/pivot_.c \
427429
$(OBJDIR)/popen_.c \
428430
$(OBJDIR)/pqueue_.c \
429431
$(OBJDIR)/printf_.c \
430432
$(OBJDIR)/rebuild_.c \
433
+ $(OBJDIR)/regexp_.c \
431434
$(OBJDIR)/report_.c \
432435
$(OBJDIR)/rss_.c \
433436
$(OBJDIR)/schema_.c \
434437
$(OBJDIR)/search_.c \
435438
$(OBJDIR)/setup_.c \
@@ -446,10 +449,11 @@
446449
$(OBJDIR)/th_main_.c \
447450
$(OBJDIR)/timeline_.c \
448451
$(OBJDIR)/tkt_.c \
449452
$(OBJDIR)/tktsetup_.c \
450453
$(OBJDIR)/undo_.c \
454
+ $(OBJDIR)/unicode_.c \
451455
$(OBJDIR)/update_.c \
452456
$(OBJDIR)/url_.c \
453457
$(OBJDIR)/user_.c \
454458
$(OBJDIR)/utf8_.c \
455459
$(OBJDIR)/verify_.c \
@@ -530,10 +534,11 @@
530534
$(OBJDIR)/pivot.o \
531535
$(OBJDIR)/popen.o \
532536
$(OBJDIR)/pqueue.o \
533537
$(OBJDIR)/printf.o \
534538
$(OBJDIR)/rebuild.o \
539
+ $(OBJDIR)/regexp.o \
535540
$(OBJDIR)/report.o \
536541
$(OBJDIR)/rss.o \
537542
$(OBJDIR)/schema.o \
538543
$(OBJDIR)/search.o \
539544
$(OBJDIR)/setup.o \
@@ -550,10 +555,11 @@
550555
$(OBJDIR)/th_main.o \
551556
$(OBJDIR)/timeline.o \
552557
$(OBJDIR)/tkt.o \
553558
$(OBJDIR)/tktsetup.o \
554559
$(OBJDIR)/undo.o \
560
+ $(OBJDIR)/unicode.o \
555561
$(OBJDIR)/update.o \
556562
$(OBJDIR)/url.o \
557563
$(OBJDIR)/user.o \
558564
$(OBJDIR)/utf8.o \
559565
$(OBJDIR)/verify.o \
@@ -747,10 +753,11 @@
747753
$(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \
748754
$(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \
749755
$(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \
750756
$(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
751757
$(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
758
+ $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \
752759
$(OBJDIR)/report_.c:$(OBJDIR)/report.h \
753760
$(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
754761
$(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
755762
$(OBJDIR)/search_.c:$(OBJDIR)/search.h \
756763
$(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \
@@ -767,10 +774,11 @@
767774
$(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
768775
$(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \
769776
$(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \
770777
$(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \
771778
$(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \
779
+ $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h \
772780
$(OBJDIR)/update_.c:$(OBJDIR)/update.h \
773781
$(OBJDIR)/url_.c:$(OBJDIR)/url.h \
774782
$(OBJDIR)/user_.c:$(OBJDIR)/user.h \
775783
$(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \
776784
$(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \
@@ -1340,10 +1348,18 @@
13401348
13411349
$(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
13421350
$(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
13431351
13441352
$(OBJDIR)/rebuild.h: $(OBJDIR)/headers
1353
+
1354
+$(OBJDIR)/regexp_.c: $(SRCDIR)/regexp.c $(OBJDIR)/translate
1355
+ $(TRANSLATE) $(SRCDIR)/regexp.c >$(OBJDIR)/regexp_.c
1356
+
1357
+$(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
1358
+ $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
1359
+
1360
+$(OBJDIR)/regexp.h: $(OBJDIR)/headers
13451361
13461362
$(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
13471363
$(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c
13481364
13491365
$(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
@@ -1500,10 +1516,18 @@
15001516
15011517
$(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
15021518
$(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
15031519
15041520
$(OBJDIR)/undo.h: $(OBJDIR)/headers
1521
+
1522
+$(OBJDIR)/unicode_.c: $(SRCDIR)/unicode.c $(OBJDIR)/translate
1523
+ $(TRANSLATE) $(SRCDIR)/unicode.c >$(OBJDIR)/unicode_.c
1524
+
1525
+$(OBJDIR)/unicode.o: $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h $(SRCDIR)/config.h
1526
+ $(XTCC) -o $(OBJDIR)/unicode.o -c $(OBJDIR)/unicode_.c
1527
+
1528
+$(OBJDIR)/unicode.h: $(OBJDIR)/headers
15051529
15061530
$(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
15071531
$(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c
15081532
15091533
$(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
15101534
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -322,10 +322,11 @@
322 $(SRCDIR)/pivot.c \
323 $(SRCDIR)/popen.c \
324 $(SRCDIR)/pqueue.c \
325 $(SRCDIR)/printf.c \
326 $(SRCDIR)/rebuild.c \
 
327 $(SRCDIR)/report.c \
328 $(SRCDIR)/rss.c \
329 $(SRCDIR)/schema.c \
330 $(SRCDIR)/search.c \
331 $(SRCDIR)/setup.c \
@@ -342,10 +343,11 @@
342 $(SRCDIR)/th_main.c \
343 $(SRCDIR)/timeline.c \
344 $(SRCDIR)/tkt.c \
345 $(SRCDIR)/tktsetup.c \
346 $(SRCDIR)/undo.c \
 
347 $(SRCDIR)/update.c \
348 $(SRCDIR)/url.c \
349 $(SRCDIR)/user.c \
350 $(SRCDIR)/utf8.c \
351 $(SRCDIR)/verify.c \
@@ -426,10 +428,11 @@
426 $(OBJDIR)/pivot_.c \
427 $(OBJDIR)/popen_.c \
428 $(OBJDIR)/pqueue_.c \
429 $(OBJDIR)/printf_.c \
430 $(OBJDIR)/rebuild_.c \
 
431 $(OBJDIR)/report_.c \
432 $(OBJDIR)/rss_.c \
433 $(OBJDIR)/schema_.c \
434 $(OBJDIR)/search_.c \
435 $(OBJDIR)/setup_.c \
@@ -446,10 +449,11 @@
446 $(OBJDIR)/th_main_.c \
447 $(OBJDIR)/timeline_.c \
448 $(OBJDIR)/tkt_.c \
449 $(OBJDIR)/tktsetup_.c \
450 $(OBJDIR)/undo_.c \
 
451 $(OBJDIR)/update_.c \
452 $(OBJDIR)/url_.c \
453 $(OBJDIR)/user_.c \
454 $(OBJDIR)/utf8_.c \
455 $(OBJDIR)/verify_.c \
@@ -530,10 +534,11 @@
530 $(OBJDIR)/pivot.o \
531 $(OBJDIR)/popen.o \
532 $(OBJDIR)/pqueue.o \
533 $(OBJDIR)/printf.o \
534 $(OBJDIR)/rebuild.o \
 
535 $(OBJDIR)/report.o \
536 $(OBJDIR)/rss.o \
537 $(OBJDIR)/schema.o \
538 $(OBJDIR)/search.o \
539 $(OBJDIR)/setup.o \
@@ -550,10 +555,11 @@
550 $(OBJDIR)/th_main.o \
551 $(OBJDIR)/timeline.o \
552 $(OBJDIR)/tkt.o \
553 $(OBJDIR)/tktsetup.o \
554 $(OBJDIR)/undo.o \
 
555 $(OBJDIR)/update.o \
556 $(OBJDIR)/url.o \
557 $(OBJDIR)/user.o \
558 $(OBJDIR)/utf8.o \
559 $(OBJDIR)/verify.o \
@@ -747,10 +753,11 @@
747 $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \
748 $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \
749 $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \
750 $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
751 $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
 
752 $(OBJDIR)/report_.c:$(OBJDIR)/report.h \
753 $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
754 $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
755 $(OBJDIR)/search_.c:$(OBJDIR)/search.h \
756 $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \
@@ -767,10 +774,11 @@
767 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
768 $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \
769 $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \
770 $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \
771 $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \
 
772 $(OBJDIR)/update_.c:$(OBJDIR)/update.h \
773 $(OBJDIR)/url_.c:$(OBJDIR)/url.h \
774 $(OBJDIR)/user_.c:$(OBJDIR)/user.h \
775 $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \
776 $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \
@@ -1340,10 +1348,18 @@
1340
1341 $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
1342 $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
1343
1344 $(OBJDIR)/rebuild.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1345
1346 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
1347 $(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c
1348
1349 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
@@ -1500,10 +1516,18 @@
1500
1501 $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
1502 $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
1503
1504 $(OBJDIR)/undo.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1505
1506 $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
1507 $(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c
1508
1509 $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
1510
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -322,10 +322,11 @@
322 $(SRCDIR)/pivot.c \
323 $(SRCDIR)/popen.c \
324 $(SRCDIR)/pqueue.c \
325 $(SRCDIR)/printf.c \
326 $(SRCDIR)/rebuild.c \
327 $(SRCDIR)/regexp.c \
328 $(SRCDIR)/report.c \
329 $(SRCDIR)/rss.c \
330 $(SRCDIR)/schema.c \
331 $(SRCDIR)/search.c \
332 $(SRCDIR)/setup.c \
@@ -342,10 +343,11 @@
343 $(SRCDIR)/th_main.c \
344 $(SRCDIR)/timeline.c \
345 $(SRCDIR)/tkt.c \
346 $(SRCDIR)/tktsetup.c \
347 $(SRCDIR)/undo.c \
348 $(SRCDIR)/unicode.c \
349 $(SRCDIR)/update.c \
350 $(SRCDIR)/url.c \
351 $(SRCDIR)/user.c \
352 $(SRCDIR)/utf8.c \
353 $(SRCDIR)/verify.c \
@@ -426,10 +428,11 @@
428 $(OBJDIR)/pivot_.c \
429 $(OBJDIR)/popen_.c \
430 $(OBJDIR)/pqueue_.c \
431 $(OBJDIR)/printf_.c \
432 $(OBJDIR)/rebuild_.c \
433 $(OBJDIR)/regexp_.c \
434 $(OBJDIR)/report_.c \
435 $(OBJDIR)/rss_.c \
436 $(OBJDIR)/schema_.c \
437 $(OBJDIR)/search_.c \
438 $(OBJDIR)/setup_.c \
@@ -446,10 +449,11 @@
449 $(OBJDIR)/th_main_.c \
450 $(OBJDIR)/timeline_.c \
451 $(OBJDIR)/tkt_.c \
452 $(OBJDIR)/tktsetup_.c \
453 $(OBJDIR)/undo_.c \
454 $(OBJDIR)/unicode_.c \
455 $(OBJDIR)/update_.c \
456 $(OBJDIR)/url_.c \
457 $(OBJDIR)/user_.c \
458 $(OBJDIR)/utf8_.c \
459 $(OBJDIR)/verify_.c \
@@ -530,10 +534,11 @@
534 $(OBJDIR)/pivot.o \
535 $(OBJDIR)/popen.o \
536 $(OBJDIR)/pqueue.o \
537 $(OBJDIR)/printf.o \
538 $(OBJDIR)/rebuild.o \
539 $(OBJDIR)/regexp.o \
540 $(OBJDIR)/report.o \
541 $(OBJDIR)/rss.o \
542 $(OBJDIR)/schema.o \
543 $(OBJDIR)/search.o \
544 $(OBJDIR)/setup.o \
@@ -550,10 +555,11 @@
555 $(OBJDIR)/th_main.o \
556 $(OBJDIR)/timeline.o \
557 $(OBJDIR)/tkt.o \
558 $(OBJDIR)/tktsetup.o \
559 $(OBJDIR)/undo.o \
560 $(OBJDIR)/unicode.o \
561 $(OBJDIR)/update.o \
562 $(OBJDIR)/url.o \
563 $(OBJDIR)/user.o \
564 $(OBJDIR)/utf8.o \
565 $(OBJDIR)/verify.o \
@@ -747,10 +753,11 @@
753 $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \
754 $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \
755 $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \
756 $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \
757 $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \
758 $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \
759 $(OBJDIR)/report_.c:$(OBJDIR)/report.h \
760 $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \
761 $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \
762 $(OBJDIR)/search_.c:$(OBJDIR)/search.h \
763 $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \
@@ -767,10 +774,11 @@
774 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
775 $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \
776 $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \
777 $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \
778 $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \
779 $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h \
780 $(OBJDIR)/update_.c:$(OBJDIR)/update.h \
781 $(OBJDIR)/url_.c:$(OBJDIR)/url.h \
782 $(OBJDIR)/user_.c:$(OBJDIR)/user.h \
783 $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \
784 $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \
@@ -1340,10 +1348,18 @@
1348
1349 $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h
1350 $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c
1351
1352 $(OBJDIR)/rebuild.h: $(OBJDIR)/headers
1353
1354 $(OBJDIR)/regexp_.c: $(SRCDIR)/regexp.c $(OBJDIR)/translate
1355 $(TRANSLATE) $(SRCDIR)/regexp.c >$(OBJDIR)/regexp_.c
1356
1357 $(OBJDIR)/regexp.o: $(OBJDIR)/regexp_.c $(OBJDIR)/regexp.h $(SRCDIR)/config.h
1358 $(XTCC) -o $(OBJDIR)/regexp.o -c $(OBJDIR)/regexp_.c
1359
1360 $(OBJDIR)/regexp.h: $(OBJDIR)/headers
1361
1362 $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate
1363 $(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c
1364
1365 $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h
@@ -1500,10 +1516,18 @@
1516
1517 $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h
1518 $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c
1519
1520 $(OBJDIR)/undo.h: $(OBJDIR)/headers
1521
1522 $(OBJDIR)/unicode_.c: $(SRCDIR)/unicode.c $(OBJDIR)/translate
1523 $(TRANSLATE) $(SRCDIR)/unicode.c >$(OBJDIR)/unicode_.c
1524
1525 $(OBJDIR)/unicode.o: $(OBJDIR)/unicode_.c $(OBJDIR)/unicode.h $(SRCDIR)/config.h
1526 $(XTCC) -o $(OBJDIR)/unicode.o -c $(OBJDIR)/unicode_.c
1527
1528 $(OBJDIR)/unicode.h: $(OBJDIR)/headers
1529
1530 $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate
1531 $(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c
1532
1533 $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h
1534
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -107,10 +107,11 @@
107107
pivot_.c \
108108
popen_.c \
109109
pqueue_.c \
110110
printf_.c \
111111
rebuild_.c \
112
+ regexp_.c \
112113
report_.c \
113114
rss_.c \
114115
schema_.c \
115116
search_.c \
116117
setup_.c \
@@ -127,10 +128,11 @@
127128
th_main_.c \
128129
timeline_.c \
129130
tkt_.c \
130131
tktsetup_.c \
131132
undo_.c \
133
+ unicode_.c \
132134
update_.c \
133135
url_.c \
134136
user_.c \
135137
utf8_.c \
136138
verify_.c \
@@ -210,10 +212,11 @@
210212
$(OX)\pivot$O \
211213
$(OX)\popen$O \
212214
$(OX)\pqueue$O \
213215
$(OX)\printf$O \
214216
$(OX)\rebuild$O \
217
+ $(OX)\regexp$O \
215218
$(OX)\report$O \
216219
$(OX)\rss$O \
217220
$(OX)\schema$O \
218221
$(OX)\search$O \
219222
$(OX)\setup$O \
@@ -230,10 +233,11 @@
230233
$(OX)\th_main$O \
231234
$(OX)\timeline$O \
232235
$(OX)\tkt$O \
233236
$(OX)\tktsetup$O \
234237
$(OX)\undo$O \
238
+ $(OX)\unicode$O \
235239
$(OX)\update$O \
236240
$(OX)\url$O \
237241
$(OX)\user$O \
238242
$(OX)\utf8$O \
239243
$(OX)\verify$O \
@@ -330,10 +334,11 @@
330334
echo $(OX)\pivot.obj >> $@
331335
echo $(OX)\popen.obj >> $@
332336
echo $(OX)\pqueue.obj >> $@
333337
echo $(OX)\printf.obj >> $@
334338
echo $(OX)\rebuild.obj >> $@
339
+ echo $(OX)\regexp.obj >> $@
335340
echo $(OX)\report.obj >> $@
336341
echo $(OX)\rss.obj >> $@
337342
echo $(OX)\schema.obj >> $@
338343
echo $(OX)\search.obj >> $@
339344
echo $(OX)\setup.obj >> $@
@@ -354,10 +359,11 @@
354359
echo $(OX)\th_main.obj >> $@
355360
echo $(OX)\timeline.obj >> $@
356361
echo $(OX)\tkt.obj >> $@
357362
echo $(OX)\tktsetup.obj >> $@
358363
echo $(OX)\undo.obj >> $@
364
+ echo $(OX)\unicode.obj >> $@
359365
echo $(OX)\update.obj >> $@
360366
echo $(OX)\url.obj >> $@
361367
echo $(OX)\user.obj >> $@
362368
echo $(OX)\utf8.obj >> $@
363369
echo $(OX)\verify.obj >> $@
@@ -853,10 +859,16 @@
853859
$(OX)\rebuild$O : rebuild_.c rebuild.h
854860
$(TCC) /Fo$@ -c rebuild_.c
855861
856862
rebuild_.c : $(SRCDIR)\rebuild.c
857863
translate$E $** > $@
864
+
865
+$(OX)\regexp$O : regexp_.c regexp.h
866
+ $(TCC) /Fo$@ -c regexp_.c
867
+
868
+regexp_.c : $(SRCDIR)\regexp.c
869
+ translate$E $** > $@
858870
859871
$(OX)\report$O : report_.c report.h
860872
$(TCC) /Fo$@ -c report_.c
861873
862874
report_.c : $(SRCDIR)\report.c
@@ -973,10 +985,16 @@
973985
$(OX)\undo$O : undo_.c undo.h
974986
$(TCC) /Fo$@ -c undo_.c
975987
976988
undo_.c : $(SRCDIR)\undo.c
977989
translate$E $** > $@
990
+
991
+$(OX)\unicode$O : unicode_.c unicode.h
992
+ $(TCC) /Fo$@ -c unicode_.c
993
+
994
+unicode_.c : $(SRCDIR)\unicode.c
995
+ translate$E $** > $@
978996
979997
$(OX)\update$O : update_.c update.h
980998
$(TCC) /Fo$@ -c update_.c
981999
9821000
update_.c : $(SRCDIR)\update.c
@@ -1122,10 +1140,11 @@
11221140
pivot_.c:pivot.h \
11231141
popen_.c:popen.h \
11241142
pqueue_.c:pqueue.h \
11251143
printf_.c:printf.h \
11261144
rebuild_.c:rebuild.h \
1145
+ regexp_.c:regexp.h \
11271146
report_.c:report.h \
11281147
rss_.c:rss.h \
11291148
schema_.c:schema.h \
11301149
search_.c:search.h \
11311150
setup_.c:setup.h \
@@ -1142,10 +1161,11 @@
11421161
th_main_.c:th_main.h \
11431162
timeline_.c:timeline.h \
11441163
tkt_.c:tkt.h \
11451164
tktsetup_.c:tktsetup.h \
11461165
undo_.c:undo.h \
1166
+ unicode_.c:unicode.h \
11471167
update_.c:update.h \
11481168
url_.c:url.h \
11491169
user_.c:user.h \
11501170
utf8_.c:utf8.h \
11511171
verify_.c:verify.h \
11521172
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -107,10 +107,11 @@
107 pivot_.c \
108 popen_.c \
109 pqueue_.c \
110 printf_.c \
111 rebuild_.c \
 
112 report_.c \
113 rss_.c \
114 schema_.c \
115 search_.c \
116 setup_.c \
@@ -127,10 +128,11 @@
127 th_main_.c \
128 timeline_.c \
129 tkt_.c \
130 tktsetup_.c \
131 undo_.c \
 
132 update_.c \
133 url_.c \
134 user_.c \
135 utf8_.c \
136 verify_.c \
@@ -210,10 +212,11 @@
210 $(OX)\pivot$O \
211 $(OX)\popen$O \
212 $(OX)\pqueue$O \
213 $(OX)\printf$O \
214 $(OX)\rebuild$O \
 
215 $(OX)\report$O \
216 $(OX)\rss$O \
217 $(OX)\schema$O \
218 $(OX)\search$O \
219 $(OX)\setup$O \
@@ -230,10 +233,11 @@
230 $(OX)\th_main$O \
231 $(OX)\timeline$O \
232 $(OX)\tkt$O \
233 $(OX)\tktsetup$O \
234 $(OX)\undo$O \
 
235 $(OX)\update$O \
236 $(OX)\url$O \
237 $(OX)\user$O \
238 $(OX)\utf8$O \
239 $(OX)\verify$O \
@@ -330,10 +334,11 @@
330 echo $(OX)\pivot.obj >> $@
331 echo $(OX)\popen.obj >> $@
332 echo $(OX)\pqueue.obj >> $@
333 echo $(OX)\printf.obj >> $@
334 echo $(OX)\rebuild.obj >> $@
 
335 echo $(OX)\report.obj >> $@
336 echo $(OX)\rss.obj >> $@
337 echo $(OX)\schema.obj >> $@
338 echo $(OX)\search.obj >> $@
339 echo $(OX)\setup.obj >> $@
@@ -354,10 +359,11 @@
354 echo $(OX)\th_main.obj >> $@
355 echo $(OX)\timeline.obj >> $@
356 echo $(OX)\tkt.obj >> $@
357 echo $(OX)\tktsetup.obj >> $@
358 echo $(OX)\undo.obj >> $@
 
359 echo $(OX)\update.obj >> $@
360 echo $(OX)\url.obj >> $@
361 echo $(OX)\user.obj >> $@
362 echo $(OX)\utf8.obj >> $@
363 echo $(OX)\verify.obj >> $@
@@ -853,10 +859,16 @@
853 $(OX)\rebuild$O : rebuild_.c rebuild.h
854 $(TCC) /Fo$@ -c rebuild_.c
855
856 rebuild_.c : $(SRCDIR)\rebuild.c
857 translate$E $** > $@
 
 
 
 
 
 
858
859 $(OX)\report$O : report_.c report.h
860 $(TCC) /Fo$@ -c report_.c
861
862 report_.c : $(SRCDIR)\report.c
@@ -973,10 +985,16 @@
973 $(OX)\undo$O : undo_.c undo.h
974 $(TCC) /Fo$@ -c undo_.c
975
976 undo_.c : $(SRCDIR)\undo.c
977 translate$E $** > $@
 
 
 
 
 
 
978
979 $(OX)\update$O : update_.c update.h
980 $(TCC) /Fo$@ -c update_.c
981
982 update_.c : $(SRCDIR)\update.c
@@ -1122,10 +1140,11 @@
1122 pivot_.c:pivot.h \
1123 popen_.c:popen.h \
1124 pqueue_.c:pqueue.h \
1125 printf_.c:printf.h \
1126 rebuild_.c:rebuild.h \
 
1127 report_.c:report.h \
1128 rss_.c:rss.h \
1129 schema_.c:schema.h \
1130 search_.c:search.h \
1131 setup_.c:setup.h \
@@ -1142,10 +1161,11 @@
1142 th_main_.c:th_main.h \
1143 timeline_.c:timeline.h \
1144 tkt_.c:tkt.h \
1145 tktsetup_.c:tktsetup.h \
1146 undo_.c:undo.h \
 
1147 update_.c:update.h \
1148 url_.c:url.h \
1149 user_.c:user.h \
1150 utf8_.c:utf8.h \
1151 verify_.c:verify.h \
1152
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -107,10 +107,11 @@
107 pivot_.c \
108 popen_.c \
109 pqueue_.c \
110 printf_.c \
111 rebuild_.c \
112 regexp_.c \
113 report_.c \
114 rss_.c \
115 schema_.c \
116 search_.c \
117 setup_.c \
@@ -127,10 +128,11 @@
128 th_main_.c \
129 timeline_.c \
130 tkt_.c \
131 tktsetup_.c \
132 undo_.c \
133 unicode_.c \
134 update_.c \
135 url_.c \
136 user_.c \
137 utf8_.c \
138 verify_.c \
@@ -210,10 +212,11 @@
212 $(OX)\pivot$O \
213 $(OX)\popen$O \
214 $(OX)\pqueue$O \
215 $(OX)\printf$O \
216 $(OX)\rebuild$O \
217 $(OX)\regexp$O \
218 $(OX)\report$O \
219 $(OX)\rss$O \
220 $(OX)\schema$O \
221 $(OX)\search$O \
222 $(OX)\setup$O \
@@ -230,10 +233,11 @@
233 $(OX)\th_main$O \
234 $(OX)\timeline$O \
235 $(OX)\tkt$O \
236 $(OX)\tktsetup$O \
237 $(OX)\undo$O \
238 $(OX)\unicode$O \
239 $(OX)\update$O \
240 $(OX)\url$O \
241 $(OX)\user$O \
242 $(OX)\utf8$O \
243 $(OX)\verify$O \
@@ -330,10 +334,11 @@
334 echo $(OX)\pivot.obj >> $@
335 echo $(OX)\popen.obj >> $@
336 echo $(OX)\pqueue.obj >> $@
337 echo $(OX)\printf.obj >> $@
338 echo $(OX)\rebuild.obj >> $@
339 echo $(OX)\regexp.obj >> $@
340 echo $(OX)\report.obj >> $@
341 echo $(OX)\rss.obj >> $@
342 echo $(OX)\schema.obj >> $@
343 echo $(OX)\search.obj >> $@
344 echo $(OX)\setup.obj >> $@
@@ -354,10 +359,11 @@
359 echo $(OX)\th_main.obj >> $@
360 echo $(OX)\timeline.obj >> $@
361 echo $(OX)\tkt.obj >> $@
362 echo $(OX)\tktsetup.obj >> $@
363 echo $(OX)\undo.obj >> $@
364 echo $(OX)\unicode.obj >> $@
365 echo $(OX)\update.obj >> $@
366 echo $(OX)\url.obj >> $@
367 echo $(OX)\user.obj >> $@
368 echo $(OX)\utf8.obj >> $@
369 echo $(OX)\verify.obj >> $@
@@ -853,10 +859,16 @@
859 $(OX)\rebuild$O : rebuild_.c rebuild.h
860 $(TCC) /Fo$@ -c rebuild_.c
861
862 rebuild_.c : $(SRCDIR)\rebuild.c
863 translate$E $** > $@
864
865 $(OX)\regexp$O : regexp_.c regexp.h
866 $(TCC) /Fo$@ -c regexp_.c
867
868 regexp_.c : $(SRCDIR)\regexp.c
869 translate$E $** > $@
870
871 $(OX)\report$O : report_.c report.h
872 $(TCC) /Fo$@ -c report_.c
873
874 report_.c : $(SRCDIR)\report.c
@@ -973,10 +985,16 @@
985 $(OX)\undo$O : undo_.c undo.h
986 $(TCC) /Fo$@ -c undo_.c
987
988 undo_.c : $(SRCDIR)\undo.c
989 translate$E $** > $@
990
991 $(OX)\unicode$O : unicode_.c unicode.h
992 $(TCC) /Fo$@ -c unicode_.c
993
994 unicode_.c : $(SRCDIR)\unicode.c
995 translate$E $** > $@
996
997 $(OX)\update$O : update_.c update.h
998 $(TCC) /Fo$@ -c update_.c
999
1000 update_.c : $(SRCDIR)\update.c
@@ -1122,10 +1140,11 @@
1140 pivot_.c:pivot.h \
1141 popen_.c:popen.h \
1142 pqueue_.c:pqueue.h \
1143 printf_.c:printf.h \
1144 rebuild_.c:rebuild.h \
1145 regexp_.c:regexp.h \
1146 report_.c:report.h \
1147 rss_.c:rss.h \
1148 schema_.c:schema.h \
1149 search_.c:search.h \
1150 setup_.c:setup.h \
@@ -1142,10 +1161,11 @@
1161 th_main_.c:th_main.h \
1162 timeline_.c:timeline.h \
1163 tkt_.c:tkt.h \
1164 tktsetup_.c:tktsetup.h \
1165 undo_.c:undo.h \
1166 unicode_.c:unicode.h \
1167 update_.c:update.h \
1168 url_.c:url.h \
1169 user_.c:user.h \
1170 utf8_.c:utf8.h \
1171 verify_.c:verify.h \
1172
--- www/checkin_names.wiki
+++ www/checkin_names.wiki
@@ -14,12 +14,11 @@
1414
<li> Special names:
1515
<ul>
1616
<li> <b>tip</b>
1717
<li> <b>current</b>
1818
<li> <b>next</b>
19
-<li> <b>previous</b>
20
-<li> <b>ckout</b>
19
+<li> <b>previous</b> or <b>prev</b>
2120
</ul>
2221
</ul>
2322
</td></tr>
2423
</table>
2524
Many Fossil [/help|commands] and [./webui.wiki | web-interface] URLs accept
@@ -194,12 +193,12 @@
194193
equivalent to the timestamp tag "5000-01-01".
195194
196195
If the command is being run from a working check-out (not against a bare
197196
repository) then a few extra tags apply. The "current" tag means the
198197
current check-out. The "next" tag means the youngest child of the
199
-current check-out. And the "previous" tag means the primary (non-merge)
200
-parent of the current check-out.
198
+current check-out. And the "previous" or "prev" tag means the primary
199
+(non-merge) parent of the current check-out.
201200
202201
<h2>Additional Examples</h2>
203202
204203
To view the changes in the most recent check-in prior to the version currently
205204
checked out:
206205
207206
ADDED www/fiveminutes.wiki
--- www/checkin_names.wiki
+++ www/checkin_names.wiki
@@ -14,12 +14,11 @@
14 <li> Special names:
15 <ul>
16 <li> <b>tip</b>
17 <li> <b>current</b>
18 <li> <b>next</b>
19 <li> <b>previous</b>
20 <li> <b>ckout</b>
21 </ul>
22 </ul>
23 </td></tr>
24 </table>
25 Many Fossil [/help|commands] and [./webui.wiki | web-interface] URLs accept
@@ -194,12 +193,12 @@
194 equivalent to the timestamp tag "5000-01-01".
195
196 If the command is being run from a working check-out (not against a bare
197 repository) then a few extra tags apply. The "current" tag means the
198 current check-out. The "next" tag means the youngest child of the
199 current check-out. And the "previous" tag means the primary (non-merge)
200 parent of the current check-out.
201
202 <h2>Additional Examples</h2>
203
204 To view the changes in the most recent check-in prior to the version currently
205 checked out:
206
207 DDED www/fiveminutes.wiki
--- www/checkin_names.wiki
+++ www/checkin_names.wiki
@@ -14,12 +14,11 @@
14 <li> Special names:
15 <ul>
16 <li> <b>tip</b>
17 <li> <b>current</b>
18 <li> <b>next</b>
19 <li> <b>previous</b> or <b>prev</b>
 
20 </ul>
21 </ul>
22 </td></tr>
23 </table>
24 Many Fossil [/help|commands] and [./webui.wiki | web-interface] URLs accept
@@ -194,12 +193,12 @@
193 equivalent to the timestamp tag "5000-01-01".
194
195 If the command is being run from a working check-out (not against a bare
196 repository) then a few extra tags apply. The "current" tag means the
197 current check-out. The "next" tag means the youngest child of the
198 current check-out. And the "previous" or "prev" tag means the primary
199 (non-merge) parent of the current check-out.
200
201 <h2>Additional Examples</h2>
202
203 To view the changes in the most recent check-in prior to the version currently
204 checked out:
205
206 DDED www/fiveminutes.wiki
--- a/www/fiveminutes.wiki
+++ b/www/fiveminutes.wiki
@@ -0,0 +1,40 @@
1
+<title>Up and running in 5 minutes as a single user</title>
2
+
3
+<p align="center"><b><i>
4
+The following document was contributed by Gilles Ganault on 2013-01-08.
5
+</i></b>
6
+</p><hr>
7
+
8
+<h1>Up and running in 5 min<p>tes as a single user</h1>
9
+
10
+This short document explains the main basic F ossil comands for a single
11
+user, i.e. with no additional users, with no need to s
12
+repository, and no </p>need for branching/forking.
13
+
14
+<h2>Cr<p>fossil new c:\test.repo</p>
15
+<p>sil new c:\test.repo</tt>
16
+
17
+This will create the new SQLite binary file that holds the repository, itc. It can be located anywhere, although it's considered
18
+best practice to keep it outside the wse to keep it outside the work directory where you will work on files here you will work on files
19
+after they've been che</p>
20
+
21
+<h2>Open the repository</h2>
22
+<p>cd c:\temp\test.fossil</p>
23
+<p>fossil open c:\test.repo</p>
24
+<p>il open c:\test.repo</tt>
25
+
26
+This will check out the last revision of all t
27
+if any, into the current work directory. In addition, it will create a binary
28
+file _UUIDIL_ to keep track of changes (on</p>called
29
+<tt>.fslckout</tt><p>fossilUUID#1 --to UUIDes to the repository. The files aren't actually
30
+added until you run &quot;commit&quot
31
+
32
+<h2>Close the repository</h2>
33
+<p>fossil c repository</h2>
34
+<p>fossil close_FOSSIL_ at the root of the work di>.fslckout</tt>< to the repository. The files aren'es in the repository,
35
+if any, into the current work directory. In addition--to UUIDes to the repository. The files aren't actually
36
+added until you run &quot;commit&quot
37
+
38
+<h2>Close the repository</h2>
39
+<p>fossil c repository</h2>
40
+<p>fossil close_FOSSIL_ at the root of the work di>.fslckout</tt>< to the repository. The files ar
--- a/www/fiveminutes.wiki
+++ b/www/fiveminutes.wiki
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/www/fiveminutes.wiki
+++ b/www/fiveminutes.wiki
@@ -0,0 +1,40 @@
1 <title>Up and running in 5 minutes as a single user</title>
2
3 <p align="center"><b><i>
4 The following document was contributed by Gilles Ganault on 2013-01-08.
5 </i></b>
6 </p><hr>
7
8 <h1>Up and running in 5 min<p>tes as a single user</h1>
9
10 This short document explains the main basic F ossil comands for a single
11 user, i.e. with no additional users, with no need to s
12 repository, and no </p>need for branching/forking.
13
14 <h2>Cr<p>fossil new c:\test.repo</p>
15 <p>sil new c:\test.repo</tt>
16
17 This will create the new SQLite binary file that holds the repository, itc. It can be located anywhere, although it's considered
18 best practice to keep it outside the wse to keep it outside the work directory where you will work on files here you will work on files
19 after they've been che</p>
20
21 <h2>Open the repository</h2>
22 <p>cd c:\temp\test.fossil</p>
23 <p>fossil open c:\test.repo</p>
24 <p>il open c:\test.repo</tt>
25
26 This will check out the last revision of all t
27 if any, into the current work directory. In addition, it will create a binary
28 file _UUIDIL_ to keep track of changes (on</p>called
29 <tt>.fslckout</tt><p>fossilUUID#1 --to UUIDes to the repository. The files aren't actually
30 added until you run &quot;commit&quot
31
32 <h2>Close the repository</h2>
33 <p>fossil c repository</h2>
34 <p>fossil close_FOSSIL_ at the root of the work di>.fslckout</tt>< to the repository. The files aren'es in the repository,
35 if any, into the current work directory. In addition--to UUIDes to the repository. The files aren't actually
36 added until you run &quot;commit&quot
37
38 <h2>Close the repository</h2>
39 <p>fossil c repository</h2>
40 <p>fossil close_FOSSIL_ at the root of the work di>.fslckout</tt>< to the repository. The files ar
--- www/index.wiki
+++ www/index.wiki
@@ -149,10 +149,12 @@
149149
* How to [./server.wiki | set up a server] for your repository.
150150
* Customizing the [./custom_ticket.wiki | ticket system].
151151
* Methods to [./checkin_names.wiki | identify a specific check-in].
152152
* [./inout.wiki | Import and export] from and to Git.
153153
* [./fossil-v-git.wiki | Fossil versus Git].
154
+ * [./fiveminutes.wiki | Up and running in 5 minutes as a single user]
155
+ (contributed by Gilles Ganault on 2013-01-08).
154156
155157
<h3>Links For Fossil Developer:</h3>
156158
157159
* [./contribute.wiki | Contributing] code or documentation to the
158160
Fossil project.
159161
--- www/index.wiki
+++ www/index.wiki
@@ -149,10 +149,12 @@
149 * How to [./server.wiki | set up a server] for your repository.
150 * Customizing the [./custom_ticket.wiki | ticket system].
151 * Methods to [./checkin_names.wiki | identify a specific check-in].
152 * [./inout.wiki | Import and export] from and to Git.
153 * [./fossil-v-git.wiki | Fossil versus Git].
 
 
154
155 <h3>Links For Fossil Developer:</h3>
156
157 * [./contribute.wiki | Contributing] code or documentation to the
158 Fossil project.
159
--- www/index.wiki
+++ www/index.wiki
@@ -149,10 +149,12 @@
149 * How to [./server.wiki | set up a server] for your repository.
150 * Customizing the [./custom_ticket.wiki | ticket system].
151 * Methods to [./checkin_names.wiki | identify a specific check-in].
152 * [./inout.wiki | Import and export] from and to Git.
153 * [./fossil-v-git.wiki | Fossil versus Git].
154 * [./fiveminutes.wiki | Up and running in 5 minutes as a single user]
155 (contributed by Gilles Ganault on 2013-01-08).
156
157 <h3>Links For Fossil Developer:</h3>
158
159 * [./contribute.wiki | Contributing] code or documentation to the
160 Fossil project.
161
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -21,10 +21,11 @@
2121
delta_format.wiki {Fossil Delta Format}
2222
embeddeddoc.wiki {Embedded Project Documentation}
2323
event.wiki {Events}
2424
faq.wiki {Frequently Asked Questions}
2525
fileformat.wiki {Fossil File Format}
26
+ fiveminutes.wiki {Update and Running in 5 Minutes as a Single User}
2627
foss-cklist.wiki {Checklist For Successful Open-Source Projects}
2728
fossil-v-git.wiki {Fossil Versus Git}
2829
index.wiki {Home Page}
2930
inout.wiki {Import And Export To And From Git}
3031
makefile.wiki {The Fossil Build Process}
3132
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -21,10 +21,11 @@
21 delta_format.wiki {Fossil Delta Format}
22 embeddeddoc.wiki {Embedded Project Documentation}
23 event.wiki {Events}
24 faq.wiki {Frequently Asked Questions}
25 fileformat.wiki {Fossil File Format}
 
26 foss-cklist.wiki {Checklist For Successful Open-Source Projects}
27 fossil-v-git.wiki {Fossil Versus Git}
28 index.wiki {Home Page}
29 inout.wiki {Import And Export To And From Git}
30 makefile.wiki {The Fossil Build Process}
31
--- www/mkindex.tcl
+++ www/mkindex.tcl
@@ -21,10 +21,11 @@
21 delta_format.wiki {Fossil Delta Format}
22 embeddeddoc.wiki {Embedded Project Documentation}
23 event.wiki {Events}
24 faq.wiki {Frequently Asked Questions}
25 fileformat.wiki {Fossil File Format}
26 fiveminutes.wiki {Update and Running in 5 Minutes as a Single User}
27 foss-cklist.wiki {Checklist For Successful Open-Source Projects}
28 fossil-v-git.wiki {Fossil Versus Git}
29 index.wiki {Home Page}
30 inout.wiki {Import And Export To And From Git}
31 makefile.wiki {The Fossil Build Process}
32
--- www/permutedindex.wiki
+++ www/permutedindex.wiki
@@ -10,13 +10,15 @@
1010
<li> [/help | Command-line help]
1111
</ul>
1212
<a name="pindex"></a>
1313
<h2>Permuted Index:</h2>
1414
<ul>
15
+<li><a href="fiveminutes.wiki">5 Minutes as a Single User &mdash; Update and Running in</a></li>
1516
<li><a href="tech_overview.wiki">A Technical Overview Of The Design And Implementation Of Fossil</a></li>
1617
<li><a href="copyright-release.html">Agreement &mdash; Contributor License</a></li>
1718
<li><a href="delta_encoder_algorithm.wiki">Algorithm &mdash; Fossil Delta Encoding</a></li>
19
+<li><a href="fiveminutes.wiki">as a Single User &mdash; Update and Running in 5 Minutes</a></li>
1820
<li><a href="faq.wiki">Asked Questions &mdash; Frequently</a></li>
1921
<li><a href="password.wiki">Authentication &mdash; Password Management And</a></li>
2022
<li><a href="private.wiki">Branches &mdash; Creating, Syncing, and Deleting Private</a></li>
2123
<li><a href="branching.wiki">Branching, Forking, Merging, and Tagging</a></li>
2224
<li><a href="bugtheory.wiki">Bug Tracking In Fossil</a></li>
@@ -90,10 +92,11 @@
9092
<li><a href="selfcheck.wiki">Integrity Self Checks &mdash; Fossil Repository</a></li>
9193
<li><a href="webui.wiki">Interface &mdash; The Fossil Web</a></li>
9294
<li><a href="copyright-release.html">License Agreement &mdash; Contributor</a></li>
9395
<li><a href="password.wiki">Management And Authentication &mdash; Password</a></li>
9496
<li><a href="branching.wiki">Merging, and Tagging &mdash; Branching, Forking,</a></li>
97
+<li><a href="fiveminutes.wiki">Minutes as a Single User &mdash; Update and Running in 5</a></li>
9598
<li><a href="checkin_names.wiki">Names &mdash; Checkin And Version</a></li>
9699
<li><a href="newrepo.wiki">New Fossil Repository &mdash; How To Create A</a></li>
97100
<li><a href="foss-cklist.wiki">Open-Source Projects &mdash; Checklist For Successful</a></li>
98101
<li><a href="pop.wiki">Operations &mdash; Principles Of</a></li>
99102
<li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil &mdash; A Technical</a></li>
@@ -115,16 +118,18 @@
115118
<li><a href="quotes.wiki">Quotes: What People Are Saying About Fossil, Git, and DVCSes in General</a></li>
116119
<li><a href="selfhost.wiki">Repositories &mdash; Fossil Self Hosting</a></li>
117120
<li><a href="newrepo.wiki">Repository &mdash; How To Create A New Fossil</a></li>
118121
<li><a href="selfcheck.wiki">Repository Integrity Self Checks &mdash; Fossil</a></li>
119122
<li><a href="reviews.wiki">Reviews</a></li>
123
+<li><a href="fiveminutes.wiki">Running in 5 Minutes as a Single User &mdash; Update and</a></li>
120124
<li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General &mdash; Quotes: What People Are</a></li>
121125
<li><a href="selfcheck.wiki">Self Checks &mdash; Fossil Repository Integrity</a></li>
122126
<li><a href="selfhost.wiki">Self Hosting Repositories &mdash; Fossil</a></li>
123127
<li><a href="server.wiki">Server &mdash; How To Configure A Fossil</a></li>
124128
<li><a href="settings.wiki">Settings &mdash; Fossil</a></li>
125129
<li><a href="shunning.wiki">Shunning: Deleting Content From Fossil</a></li>
130
+<li><a href="fiveminutes.wiki">Single User &mdash; Update and Running in 5 Minutes as a</a></li>
126131
<li><a href="style.wiki">Source Code Style Guidelines</a></li>
127132
<li><a href="tech_overview.wiki">SQLite Databases Used By Fossil</a></li>
128133
<li><a href="ssl.wiki">SSL with Fossil &mdash; Using</a></li>
129134
<li><a href="quickstart.wiki">Start Guide &mdash; Fossil Quick</a></li>
130135
<li><a href="stats.wiki">Statistics &mdash; Performance</a></li>
@@ -140,13 +145,15 @@
140145
<li><a href="sync.wiki">The Fossil Sync Protocol</a></li>
141146
<li><a href="webui.wiki">The Fossil Web Interface</a></li>
142147
<li><a href="theory1.wiki">Thoughts On The Design Of The Fossil DVCS</a></li>
143148
<li><a href="custom_ticket.wiki">Ticket System &mdash; Customizing The</a></li>
144149
<li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
150
+<li><a href="fiveminutes.wiki">Update and Running in 5 Minutes as a Single User</a></li>
151
+<li><a href="fiveminutes.wiki">User &mdash; Update and Running in 5 Minutes as a Single</a></li>
145152
<li><a href="ssl.wiki">Using SSL with Fossil</a></li>
146153
<li><a href="checkin_names.wiki">Version Names &mdash; Checkin And</a></li>
147154
<li><a href="fossil-v-git.wiki">Versus Git &mdash; Fossil</a></li>
148155
<li><a href="webui.wiki">Web Interface &mdash; The Fossil</a></li>
149156
<li><a href="quotes.wiki">What People Are Saying About Fossil, Git, and DVCSes in General &mdash; Quotes:</a></li>
150157
<li><a href="wikitheory.wiki">Wiki In Fossil</a></li>
151158
<li><a href="ssl.wiki">with Fossil &mdash; Using SSL</a></li>
152159
</ul>
153160
--- www/permutedindex.wiki
+++ www/permutedindex.wiki
@@ -10,13 +10,15 @@
10 <li> [/help | Command-line help]
11 </ul>
12 <a name="pindex"></a>
13 <h2>Permuted Index:</h2>
14 <ul>
 
15 <li><a href="tech_overview.wiki">A Technical Overview Of The Design And Implementation Of Fossil</a></li>
16 <li><a href="copyright-release.html">Agreement &mdash; Contributor License</a></li>
17 <li><a href="delta_encoder_algorithm.wiki">Algorithm &mdash; Fossil Delta Encoding</a></li>
 
18 <li><a href="faq.wiki">Asked Questions &mdash; Frequently</a></li>
19 <li><a href="password.wiki">Authentication &mdash; Password Management And</a></li>
20 <li><a href="private.wiki">Branches &mdash; Creating, Syncing, and Deleting Private</a></li>
21 <li><a href="branching.wiki">Branching, Forking, Merging, and Tagging</a></li>
22 <li><a href="bugtheory.wiki">Bug Tracking In Fossil</a></li>
@@ -90,10 +92,11 @@
90 <li><a href="selfcheck.wiki">Integrity Self Checks &mdash; Fossil Repository</a></li>
91 <li><a href="webui.wiki">Interface &mdash; The Fossil Web</a></li>
92 <li><a href="copyright-release.html">License Agreement &mdash; Contributor</a></li>
93 <li><a href="password.wiki">Management And Authentication &mdash; Password</a></li>
94 <li><a href="branching.wiki">Merging, and Tagging &mdash; Branching, Forking,</a></li>
 
95 <li><a href="checkin_names.wiki">Names &mdash; Checkin And Version</a></li>
96 <li><a href="newrepo.wiki">New Fossil Repository &mdash; How To Create A</a></li>
97 <li><a href="foss-cklist.wiki">Open-Source Projects &mdash; Checklist For Successful</a></li>
98 <li><a href="pop.wiki">Operations &mdash; Principles Of</a></li>
99 <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil &mdash; A Technical</a></li>
@@ -115,16 +118,18 @@
115 <li><a href="quotes.wiki">Quotes: What People Are Saying About Fossil, Git, and DVCSes in General</a></li>
116 <li><a href="selfhost.wiki">Repositories &mdash; Fossil Self Hosting</a></li>
117 <li><a href="newrepo.wiki">Repository &mdash; How To Create A New Fossil</a></li>
118 <li><a href="selfcheck.wiki">Repository Integrity Self Checks &mdash; Fossil</a></li>
119 <li><a href="reviews.wiki">Reviews</a></li>
 
120 <li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General &mdash; Quotes: What People Are</a></li>
121 <li><a href="selfcheck.wiki">Self Checks &mdash; Fossil Repository Integrity</a></li>
122 <li><a href="selfhost.wiki">Self Hosting Repositories &mdash; Fossil</a></li>
123 <li><a href="server.wiki">Server &mdash; How To Configure A Fossil</a></li>
124 <li><a href="settings.wiki">Settings &mdash; Fossil</a></li>
125 <li><a href="shunning.wiki">Shunning: Deleting Content From Fossil</a></li>
 
126 <li><a href="style.wiki">Source Code Style Guidelines</a></li>
127 <li><a href="tech_overview.wiki">SQLite Databases Used By Fossil</a></li>
128 <li><a href="ssl.wiki">SSL with Fossil &mdash; Using</a></li>
129 <li><a href="quickstart.wiki">Start Guide &mdash; Fossil Quick</a></li>
130 <li><a href="stats.wiki">Statistics &mdash; Performance</a></li>
@@ -140,13 +145,15 @@
140 <li><a href="sync.wiki">The Fossil Sync Protocol</a></li>
141 <li><a href="webui.wiki">The Fossil Web Interface</a></li>
142 <li><a href="theory1.wiki">Thoughts On The Design Of The Fossil DVCS</a></li>
143 <li><a href="custom_ticket.wiki">Ticket System &mdash; Customizing The</a></li>
144 <li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
 
 
145 <li><a href="ssl.wiki">Using SSL with Fossil</a></li>
146 <li><a href="checkin_names.wiki">Version Names &mdash; Checkin And</a></li>
147 <li><a href="fossil-v-git.wiki">Versus Git &mdash; Fossil</a></li>
148 <li><a href="webui.wiki">Web Interface &mdash; The Fossil</a></li>
149 <li><a href="quotes.wiki">What People Are Saying About Fossil, Git, and DVCSes in General &mdash; Quotes:</a></li>
150 <li><a href="wikitheory.wiki">Wiki In Fossil</a></li>
151 <li><a href="ssl.wiki">with Fossil &mdash; Using SSL</a></li>
152 </ul>
153
--- www/permutedindex.wiki
+++ www/permutedindex.wiki
@@ -10,13 +10,15 @@
10 <li> [/help | Command-line help]
11 </ul>
12 <a name="pindex"></a>
13 <h2>Permuted Index:</h2>
14 <ul>
15 <li><a href="fiveminutes.wiki">5 Minutes as a Single User &mdash; Update and Running in</a></li>
16 <li><a href="tech_overview.wiki">A Technical Overview Of The Design And Implementation Of Fossil</a></li>
17 <li><a href="copyright-release.html">Agreement &mdash; Contributor License</a></li>
18 <li><a href="delta_encoder_algorithm.wiki">Algorithm &mdash; Fossil Delta Encoding</a></li>
19 <li><a href="fiveminutes.wiki">as a Single User &mdash; Update and Running in 5 Minutes</a></li>
20 <li><a href="faq.wiki">Asked Questions &mdash; Frequently</a></li>
21 <li><a href="password.wiki">Authentication &mdash; Password Management And</a></li>
22 <li><a href="private.wiki">Branches &mdash; Creating, Syncing, and Deleting Private</a></li>
23 <li><a href="branching.wiki">Branching, Forking, Merging, and Tagging</a></li>
24 <li><a href="bugtheory.wiki">Bug Tracking In Fossil</a></li>
@@ -90,10 +92,11 @@
92 <li><a href="selfcheck.wiki">Integrity Self Checks &mdash; Fossil Repository</a></li>
93 <li><a href="webui.wiki">Interface &mdash; The Fossil Web</a></li>
94 <li><a href="copyright-release.html">License Agreement &mdash; Contributor</a></li>
95 <li><a href="password.wiki">Management And Authentication &mdash; Password</a></li>
96 <li><a href="branching.wiki">Merging, and Tagging &mdash; Branching, Forking,</a></li>
97 <li><a href="fiveminutes.wiki">Minutes as a Single User &mdash; Update and Running in 5</a></li>
98 <li><a href="checkin_names.wiki">Names &mdash; Checkin And Version</a></li>
99 <li><a href="newrepo.wiki">New Fossil Repository &mdash; How To Create A</a></li>
100 <li><a href="foss-cklist.wiki">Open-Source Projects &mdash; Checklist For Successful</a></li>
101 <li><a href="pop.wiki">Operations &mdash; Principles Of</a></li>
102 <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil &mdash; A Technical</a></li>
@@ -115,16 +118,18 @@
118 <li><a href="quotes.wiki">Quotes: What People Are Saying About Fossil, Git, and DVCSes in General</a></li>
119 <li><a href="selfhost.wiki">Repositories &mdash; Fossil Self Hosting</a></li>
120 <li><a href="newrepo.wiki">Repository &mdash; How To Create A New Fossil</a></li>
121 <li><a href="selfcheck.wiki">Repository Integrity Self Checks &mdash; Fossil</a></li>
122 <li><a href="reviews.wiki">Reviews</a></li>
123 <li><a href="fiveminutes.wiki">Running in 5 Minutes as a Single User &mdash; Update and</a></li>
124 <li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General &mdash; Quotes: What People Are</a></li>
125 <li><a href="selfcheck.wiki">Self Checks &mdash; Fossil Repository Integrity</a></li>
126 <li><a href="selfhost.wiki">Self Hosting Repositories &mdash; Fossil</a></li>
127 <li><a href="server.wiki">Server &mdash; How To Configure A Fossil</a></li>
128 <li><a href="settings.wiki">Settings &mdash; Fossil</a></li>
129 <li><a href="shunning.wiki">Shunning: Deleting Content From Fossil</a></li>
130 <li><a href="fiveminutes.wiki">Single User &mdash; Update and Running in 5 Minutes as a</a></li>
131 <li><a href="style.wiki">Source Code Style Guidelines</a></li>
132 <li><a href="tech_overview.wiki">SQLite Databases Used By Fossil</a></li>
133 <li><a href="ssl.wiki">SSL with Fossil &mdash; Using</a></li>
134 <li><a href="quickstart.wiki">Start Guide &mdash; Fossil Quick</a></li>
135 <li><a href="stats.wiki">Statistics &mdash; Performance</a></li>
@@ -140,13 +145,15 @@
145 <li><a href="sync.wiki">The Fossil Sync Protocol</a></li>
146 <li><a href="webui.wiki">The Fossil Web Interface</a></li>
147 <li><a href="theory1.wiki">Thoughts On The Design Of The Fossil DVCS</a></li>
148 <li><a href="custom_ticket.wiki">Ticket System &mdash; Customizing The</a></li>
149 <li><a href="bugtheory.wiki">Tracking In Fossil &mdash; Bug</a></li>
150 <li><a href="fiveminutes.wiki">Update and Running in 5 Minutes as a Single User</a></li>
151 <li><a href="fiveminutes.wiki">User &mdash; Update and Running in 5 Minutes as a Single</a></li>
152 <li><a href="ssl.wiki">Using SSL with Fossil</a></li>
153 <li><a href="checkin_names.wiki">Version Names &mdash; Checkin And</a></li>
154 <li><a href="fossil-v-git.wiki">Versus Git &mdash; Fossil</a></li>
155 <li><a href="webui.wiki">Web Interface &mdash; The Fossil</a></li>
156 <li><a href="quotes.wiki">What People Are Saying About Fossil, Git, and DVCSes in General &mdash; Quotes:</a></li>
157 <li><a href="wikitheory.wiki">Wiki In Fossil</a></li>
158 <li><a href="ssl.wiki">with Fossil &mdash; Using SSL</a></li>
159 </ul>
160

Keyboard Shortcuts

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