Fossil SCM
merge trunk
Commit
6e9e6436a6256b4bf49b6fc95eafebd907a72de1
Parent
0a242574208c2f3…
37 files changed
+6
-10
+6
-2
+8
-8
+133
-40
+2
-2
+4
-10
+47
-13
+1
-1
+1
-1
+1
-1
+2
-2
+14
-26
+21
-1
+2
+2
-2
+15
+55
+47
-1
+6
+1
+372
-118
+1
-1
+1
-1
+11
+9
-32
+528
+10
-5
+1
-1
+16
-4
+24
+24
+20
+3
-4
+40
+2
+1
+7
~
src/cson_amalgamation.c
~
src/cson_amalgamation.h
~
src/db.c
~
src/diff.c
~
src/diffcmd.c
~
src/http_ssl.c
~
src/info.c
~
src/json_diff.c
~
src/json_timeline.c
~
src/json_wiki.c
~
src/login.c
~
src/main.c
~
src/main.mk
~
src/makemake.tcl
~
src/merge3.c
~
src/printf.c
~
src/regexp.c
~
src/setup.c
~
src/shell.c
~
src/sqlcmd.c
~
src/sqlite3.c
~
src/sqlite3.h
~
src/stat.c
~
src/style.c
~
src/timeline.c
~
src/unicode.c
~
src/update.c
~
src/wiki.c
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
www/checkin_names.wiki
~
www/fiveminutes.wiki
~
www/index.wiki
~
www/mkindex.tcl
~
www/permutedindex.wiki
+6
-10
| --- src/cson_amalgamation.c | ||
| +++ src/cson_amalgamation.c | ||
| @@ -1422,11 +1422,10 @@ | ||
| 1422 | 1422 | extern "C" { |
| 1423 | 1423 | #endif |
| 1424 | 1424 | |
| 1425 | 1425 | |
| 1426 | 1426 | |
| 1427 | - | |
| 1428 | 1427 | /** |
| 1429 | 1428 | This type holds the "vtbl" for type-specific operations when |
| 1430 | 1429 | working with cson_value objects. |
| 1431 | 1430 | |
| 1432 | 1431 | All cson_values of a given logical type share a pointer to a single |
| @@ -1524,13 +1523,11 @@ | ||
| 1524 | 1523 | */ |
| 1525 | 1524 | #define cson_value_empty_m { &cson_value_api_empty/*api*/, NULL/*value*/, 0/*refcount*/ } |
| 1526 | 1525 | /** |
| 1527 | 1526 | Empty-initialized cson_value object. |
| 1528 | 1527 | */ |
| 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; | |
| 1532 | 1529 | const cson_parse_opt cson_parse_opt_empty = cson_parse_opt_empty_m; |
| 1533 | 1530 | const cson_output_opt cson_output_opt_empty = cson_output_opt_empty_m; |
| 1534 | 1531 | const cson_object_iterator cson_object_iterator_empty = cson_object_iterator_empty_m; |
| 1535 | 1532 | const cson_buffer cson_buffer_empty = cson_buffer_empty_m; |
| 1536 | 1533 | const cson_parse_info cson_parse_info_empty = cson_parse_info_empty_m; |
| @@ -1661,11 +1658,11 @@ | ||
| 1661 | 1658 | { |
| 1662 | 1659 | if((m >= (void const *)&CSON_EMPTY_HOLDER) |
| 1663 | 1660 | && ( m < (void const *)(&CSON_EMPTY_HOLDER+1))) |
| 1664 | 1661 | return 1; |
| 1665 | 1662 | else return |
| 1666 | - ((m > (void const *)&CSON_SPECIAL_VALUES[0]) | |
| 1663 | + ((m >= (void const *)&CSON_SPECIAL_VALUES[0]) | |
| 1667 | 1664 | && ( m < (void const *)&CSON_SPECIAL_VALUES[CSON_INTERNAL_VALUES_LENGTH]) ) |
| 1668 | 1665 | ? 1 |
| 1669 | 1666 | : 0; |
| 1670 | 1667 | } |
| 1671 | 1668 | |
| @@ -1711,13 +1708,13 @@ | ||
| 1711 | 1708 | malloc/free funcs because fossil's lack of header files |
| 1712 | 1709 | means we would have to #include "main.c" here to |
| 1713 | 1710 | get the declarations. |
| 1714 | 1711 | */ |
| 1715 | 1712 | #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); | |
| 1719 | 1716 | # define CSON_MALLOC_IMPL fossil_malloc |
| 1720 | 1717 | # define CSON_FREE_IMPL fossil_free |
| 1721 | 1718 | # define CSON_REALLOC_IMPL fossil_realloc |
| 1722 | 1719 | #endif |
| 1723 | 1720 | |
| @@ -4380,11 +4377,11 @@ | ||
| 4380 | 4377 | arg MUST be a (cson_buffer*). This function appends n bytes at |
| 4381 | 4378 | position arg->used, expanding the buffer as necessary. |
| 4382 | 4379 | */ |
| 4383 | 4380 | static int cson_data_dest_cson_buffer( void * arg, void const * data_, unsigned int n ) |
| 4384 | 4381 | { |
| 4385 | - if( ! arg || (n<0) ) return cson_rc.ArgError; | |
| 4382 | + if( !arg ) return cson_rc.ArgError; | |
| 4386 | 4383 | else if( ! n ) return 0; |
| 4387 | 4384 | else |
| 4388 | 4385 | { |
| 4389 | 4386 | cson_buffer * sb = (cson_buffer*)arg; |
| 4390 | 4387 | char const * data = (char const *)data_; |
| @@ -4500,11 +4497,10 @@ | ||
| 4500 | 4497 | cson_value * cv = NULL; |
| 4501 | 4498 | cson_object const * curObj = obj; |
| 4502 | 4499 | enum { BufSize = 128 }; |
| 4503 | 4500 | char buf[BufSize]; |
| 4504 | 4501 | memset( buf, 0, BufSize ); |
| 4505 | - rc = cson_rc.RangeError; | |
| 4506 | 4502 | |
| 4507 | 4503 | while( cson_next_token( &beg, sep, &end ) ) |
| 4508 | 4504 | { |
| 4509 | 4505 | if( beg == end ) break; |
| 4510 | 4506 | else |
| 4511 | 4507 |
| --- 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 |
+6
-2
| --- src/cson_amalgamation.h | ||
| +++ src/cson_amalgamation.h | ||
| @@ -1236,11 +1236,14 @@ | ||
| 1236 | 1236 | eventually either free the value using cson_value_free() or |
| 1237 | 1237 | inserting it into a container (array or object), which transfers |
| 1238 | 1238 | ownership to the container. See the cson_value class documentation |
| 1239 | 1239 | for more details. |
| 1240 | 1240 | |
| 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. | |
| 1242 | 1245 | */ |
| 1243 | 1246 | cson_value * cson_value_new_bool( char v ); |
| 1244 | 1247 | |
| 1245 | 1248 | |
| 1246 | 1249 | /** |
| @@ -1927,11 +1930,12 @@ | ||
| 1927 | 1930 | modified. |
| 1928 | 1931 | |
| 1929 | 1932 | buf->mem is owned by buf and must eventually be freed by passing an |
| 1930 | 1933 | n value of 0 to this function. |
| 1931 | 1934 | |
| 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. | |
| 1933 | 1937 | */ |
| 1934 | 1938 | int cson_buffer_reserve( cson_buffer * buf, cson_size_t n ); |
| 1935 | 1939 | |
| 1936 | 1940 | /** |
| 1937 | 1941 | Fills all bytes of the given buffer with the given character. |
| 1938 | 1942 |
| --- 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 |
M
src/db.c
+8
-8
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -22,11 +22,11 @@ | ||
| 22 | 22 | ** |
| 23 | 23 | ** (1) The "user" database in ~/.fossil |
| 24 | 24 | ** |
| 25 | 25 | ** (2) The "repository" database |
| 26 | 26 | ** |
| 27 | -** (3) A local checkout database named "_FOSSIL_" or ".fos" | |
| 27 | +** (3) A local checkout database named "_FOSSIL_" or ".fslckout" | |
| 28 | 28 | ** and located at the root of the local copy of the source tree. |
| 29 | 29 | ** |
| 30 | 30 | */ |
| 31 | 31 | #include "config.h" |
| 32 | 32 | #if ! defined(_WIN32) |
| @@ -89,11 +89,11 @@ | ||
| 89 | 89 | cgi_reply(); |
| 90 | 90 | } |
| 91 | 91 | else if( g.cgiOutput ){ |
| 92 | 92 | g.cgiOutput = 0; |
| 93 | 93 | 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); | |
| 95 | 95 | cgi_reply(); |
| 96 | 96 | }else{ |
| 97 | 97 | fprintf(stderr, "%s: %s\n\n%s", g.argv[0], z, zRebuildMsg); |
| 98 | 98 | } |
| 99 | 99 | free(z); |
| @@ -644,11 +644,11 @@ | ||
| 644 | 644 | const char *zSql; |
| 645 | 645 | va_list ap; |
| 646 | 646 | |
| 647 | 647 | rc = sqlite3_open(zFileName, &db); |
| 648 | 648 | if( rc!=SQLITE_OK ){ |
| 649 | - db_err(sqlite3_errmsg(db)); | |
| 649 | + db_err("[%s] %s", zFileName, sqlite3_errmsg(db)); | |
| 650 | 650 | } |
| 651 | 651 | sqlite3_busy_timeout(db, 5000); |
| 652 | 652 | sqlite3_exec(db, "BEGIN EXCLUSIVE", 0, 0, 0); |
| 653 | 653 | rc = sqlite3_exec(db, zSchema, 0, 0, 0); |
| 654 | 654 | if( rc!=SQLITE_OK ){ |
| @@ -702,18 +702,19 @@ | ||
| 702 | 702 | static sqlite3 *openDatabase(const char *zDbName){ |
| 703 | 703 | int rc; |
| 704 | 704 | const char *zVfs; |
| 705 | 705 | sqlite3 *db; |
| 706 | 706 | |
| 707 | + if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName); | |
| 707 | 708 | zVfs = fossil_getenv("FOSSIL_VFS"); |
| 708 | 709 | rc = sqlite3_open_v2( |
| 709 | 710 | zDbName, &db, |
| 710 | 711 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, |
| 711 | 712 | zVfs |
| 712 | 713 | ); |
| 713 | 714 | if( rc!=SQLITE_OK ){ |
| 714 | - db_err(sqlite3_errmsg(db)); | |
| 715 | + db_err("[%s]: %s", zDbName, sqlite3_errmsg(db)); | |
| 715 | 716 | } |
| 716 | 717 | sqlite3_busy_timeout(db, 5000); |
| 717 | 718 | sqlite3_wal_autocheckpoint(db, 1); /* Set to checkpoint frequently */ |
| 718 | 719 | sqlite3_create_function(db, "now", 0, SQLITE_ANY, 0, db_now_function, 0, 0); |
| 719 | 720 | sqlite3_create_function(db, "checkin_mtime", 2, SQLITE_ANY, 0, |
| @@ -1456,13 +1457,11 @@ | ||
| 1456 | 1457 | } |
| 1457 | 1458 | } |
| 1458 | 1459 | } |
| 1459 | 1460 | static void db_sql_trace(void *notUsed, const char *zSql){ |
| 1460 | 1461 | 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]==';') ? "" : ";"); | |
| 1464 | 1463 | } |
| 1465 | 1464 | |
| 1466 | 1465 | /* |
| 1467 | 1466 | ** Implement the user() SQL function. user() takes no arguments and |
| 1468 | 1467 | ** returns the user ID of the current user. |
| @@ -1604,11 +1603,11 @@ | ||
| 1604 | 1603 | |
| 1605 | 1604 | /* |
| 1606 | 1605 | ** This function registers auxiliary functions when the SQLite |
| 1607 | 1606 | ** database connection is first established. |
| 1608 | 1607 | */ |
| 1609 | -LOCAL void db_connection_init(void){ | |
| 1608 | +void db_connection_init(void){ | |
| 1610 | 1609 | sqlite3_exec(g.db, "PRAGMA foreign_keys=OFF;", 0, 0, 0); |
| 1611 | 1610 | sqlite3_create_function(g.db, "user", 0, SQLITE_ANY, 0, db_sql_user, 0, 0); |
| 1612 | 1611 | sqlite3_create_function(g.db, "cgi", 1, SQLITE_ANY, 0, db_sql_cgi, 0, 0); |
| 1613 | 1612 | sqlite3_create_function(g.db, "cgi", 2, SQLITE_ANY, 0, db_sql_cgi, 0, 0); |
| 1614 | 1613 | sqlite3_create_function(g.db, "print", -1, SQLITE_UTF8, 0,db_sql_print,0,0); |
| @@ -1619,10 +1618,11 @@ | ||
| 1619 | 1618 | g.db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0 |
| 1620 | 1619 | ); |
| 1621 | 1620 | if( g.fSqlTrace ){ |
| 1622 | 1621 | sqlite3_trace(g.db, db_sql_trace, 0); |
| 1623 | 1622 | } |
| 1623 | + re_add_sql_func(g.db); | |
| 1624 | 1624 | } |
| 1625 | 1625 | |
| 1626 | 1626 | /* |
| 1627 | 1627 | ** Return true if the string zVal represents "true" (or "false"). |
| 1628 | 1628 | */ |
| 1629 | 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 ".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 @@ | ||
| 38 | 38 | #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */ |
| 39 | 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 | 41 | #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */ |
| 42 | 42 | #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */ |
| 43 | +#define DIFF_CONTEXT_EX (((u64)0x04)<<32) /* Use context even if zero */ | |
| 43 | 44 | |
| 44 | 45 | /* |
| 45 | 46 | ** These error messages are shared in multiple locations. They are defined |
| 46 | 47 | ** here for consistency. |
| 47 | 48 | */ |
| @@ -411,24 +412,45 @@ | ||
| 411 | 412 | ** Return true if two DLine elements are identical. |
| 412 | 413 | */ |
| 413 | 414 | static int same_dline(DLine *pA, DLine *pB){ |
| 414 | 415 | return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0; |
| 415 | 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 | +} | |
| 416 | 435 | |
| 417 | 436 | /* |
| 418 | 437 | ** Append a single line of context-diff output to pOut. |
| 419 | 438 | */ |
| 420 | 439 | static void appendDiffLine( |
| 421 | 440 | Blob *pOut, /* Where to write the line of output */ |
| 422 | 441 | char cPrefix, /* One of " ", "+", or "-" */ |
| 423 | 442 | 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 */ | |
| 425 | 445 | ){ |
| 426 | 446 | blob_append(pOut, &cPrefix, 1); |
| 427 | 447 | if( html ){ |
| 428 | 448 | char *zHtml; |
| 429 | - if( cPrefix=='+' ){ | |
| 449 | + if( pRe && re_dline_match(pRe, pLine, 1)==0 ){ | |
| 450 | + cPrefix = ' '; | |
| 451 | + }else if( cPrefix=='+' ){ | |
| 430 | 452 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 431 | 453 | }else if( cPrefix=='-' ){ |
| 432 | 454 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 433 | 455 | } |
| 434 | 456 | zHtml = htmlize(pLine->z, (pLine->h & LENGTH_MASK)); |
| @@ -462,21 +484,19 @@ | ||
| 462 | 484 | blob_append(pOut, " ", 8); |
| 463 | 485 | } |
| 464 | 486 | if( html ) blob_append(pOut, "</span>", -1); |
| 465 | 487 | } |
| 466 | 488 | |
| 467 | - | |
| 468 | 489 | /* |
| 469 | 490 | ** Given a raw diff p[] in which the p->aEdit[] array has been filled |
| 470 | 491 | ** in, compute a context diff into pOut. |
| 471 | 492 | */ |
| 472 | 493 | static void contextDiff( |
| 473 | 494 | DContext *p, /* The difference */ |
| 474 | 495 | 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 */ | |
| 478 | 498 | ){ |
| 479 | 499 | DLine *A; /* Left side of the diff */ |
| 480 | 500 | DLine *B; /* Right side of the diff */ |
| 481 | 501 | int a = 0; /* Index of next line in A[] */ |
| 482 | 502 | int b = 0; /* Index of next line in B[] */ |
| @@ -487,11 +507,18 @@ | ||
| 487 | 507 | int na, nb; /* Number of lines shown from A and B */ |
| 488 | 508 | int i, j; /* Loop counters */ |
| 489 | 509 | int m; /* Number of lines to output */ |
| 490 | 510 | int skip; /* Number of lines to skip */ |
| 491 | 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 */ | |
| 492 | 516 | |
| 517 | + nContext = diff_context_lines(diffFlags); | |
| 518 | + showLn = (diffFlags & DIFF_LINENO)!=0; | |
| 519 | + html = (diffFlags & DIFF_HTML)!=0; | |
| 493 | 520 | A = p->aFrom; |
| 494 | 521 | B = p->aTo; |
| 495 | 522 | R = p->aEdit; |
| 496 | 523 | mxr = p->nEdit; |
| 497 | 524 | while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; } |
| @@ -498,10 +525,35 @@ | ||
| 498 | 525 | for(r=0; r<mxr; r += 3*nr){ |
| 499 | 526 | /* Figure out how many triples to show in a single block */ |
| 500 | 527 | for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){} |
| 501 | 528 | /* printf("r=%d nr=%d\n", r, nr); */ |
| 502 | 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 | + | |
| 503 | 555 | /* For the current block comprising nr triples, figure out |
| 504 | 556 | ** how many lines of A and B are to be displayed |
| 505 | 557 | */ |
| 506 | 558 | if( R[r]>nContext ){ |
| 507 | 559 | na = nb = nContext; |
| @@ -530,12 +582,13 @@ | ||
| 530 | 582 | ** context diff that contains line numbers, show the separator from |
| 531 | 583 | ** the previous block. |
| 532 | 584 | */ |
| 533 | 585 | nChunk++; |
| 534 | 586 | if( showLn ){ |
| 535 | - if( r==0 ){ | |
| 587 | + if( !showDivider ){ | |
| 536 | 588 | /* Do not show a top divider */ |
| 589 | + showDivider = 1; | |
| 537 | 590 | }else if( html ){ |
| 538 | 591 | blob_appendf(pOut, "<span class=\"diffhr\">%.80c</span>\n", '.'); |
| 539 | 592 | blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk); |
| 540 | 593 | }else{ |
| 541 | 594 | blob_appendf(pOut, "%.80c\n", '.'); |
| @@ -558,34 +611,36 @@ | ||
| 558 | 611 | a += skip; |
| 559 | 612 | b += skip; |
| 560 | 613 | m = R[r] - skip; |
| 561 | 614 | for(j=0; j<m; j++){ |
| 562 | 615 | 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); | |
| 564 | 617 | } |
| 565 | 618 | a += m; |
| 566 | 619 | b += m; |
| 567 | 620 | |
| 568 | 621 | /* Show the differences */ |
| 569 | 622 | for(i=0; i<nr; i++){ |
| 570 | 623 | m = R[r+i*3+1]; |
| 571 | 624 | for(j=0; j<m; j++){ |
| 625 | + char cMark = '-'; | |
| 572 | 626 | 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); | |
| 574 | 629 | } |
| 575 | 630 | a += m; |
| 576 | 631 | m = R[r+i*3+2]; |
| 577 | 632 | for(j=0; j<m; j++){ |
| 578 | 633 | if( showLn ) appendDiffLineno(pOut, 0, b+j+1, html); |
| 579 | - appendDiffLine(pOut, '+', &B[b+j], html); | |
| 634 | + appendDiffLine(pOut, '+', &B[b+j], html, pRe); | |
| 580 | 635 | } |
| 581 | 636 | b += m; |
| 582 | 637 | if( i<nr-1 ){ |
| 583 | 638 | m = R[r+i*3+3]; |
| 584 | 639 | for(j=0; j<m; j++){ |
| 585 | 640 | 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); | |
| 587 | 642 | } |
| 588 | 643 | b += m; |
| 589 | 644 | a += m; |
| 590 | 645 | } |
| 591 | 646 | } |
| @@ -594,11 +649,11 @@ | ||
| 594 | 649 | assert( nr==i ); |
| 595 | 650 | m = R[r+nr*3]; |
| 596 | 651 | if( m>nContext ) m = nContext; |
| 597 | 652 | for(j=0; j<m; j++){ |
| 598 | 653 | 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); | |
| 600 | 655 | } |
| 601 | 656 | } |
| 602 | 657 | } |
| 603 | 658 | |
| 604 | 659 | /* |
| @@ -614,10 +669,11 @@ | ||
| 614 | 669 | const char *zStart; /* A <span> tag */ |
| 615 | 670 | int iEnd; /* Write </span> prior to character iEnd */ |
| 616 | 671 | int iStart2; /* Write zStart2 prior to character iStart2 */ |
| 617 | 672 | const char *zStart2; /* A <span> tag */ |
| 618 | 673 | int iEnd2; /* Write </span> prior to character iEnd2 */ |
| 674 | + ReCompiled *pRe; /* Only colorize matching lines, if not NULL */ | |
| 619 | 675 | }; |
| 620 | 676 | |
| 621 | 677 | /* |
| 622 | 678 | ** Flags for sbsWriteText() |
| 623 | 679 | */ |
| @@ -639,13 +695,17 @@ | ||
| 639 | 695 | int k; /* Cursor position */ |
| 640 | 696 | int needEndSpan = 0; |
| 641 | 697 | const char *zIn = pLine->z; |
| 642 | 698 | char *z = &p->zLine[p->n]; |
| 643 | 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 | + } | |
| 644 | 704 | for(i=j=k=0; k<w && i<n; i++, k++){ |
| 645 | 705 | char c = zIn[i]; |
| 646 | - if( p->escHtml ){ | |
| 706 | + if( colorize ){ | |
| 647 | 707 | if( i==p->iStart ){ |
| 648 | 708 | int x = strlen(p->zStart); |
| 649 | 709 | memcpy(z+j, p->zStart, x); |
| 650 | 710 | j += x; |
| 651 | 711 | needEndSpan = 1; |
| @@ -1195,13 +1255,12 @@ | ||
| 1195 | 1255 | ** in, compute a side-by-side diff into pOut. |
| 1196 | 1256 | */ |
| 1197 | 1257 | static void sbsDiff( |
| 1198 | 1258 | DContext *p, /* The computed diff */ |
| 1199 | 1259 | 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 */ | |
| 1203 | 1262 | ){ |
| 1204 | 1263 | DLine *A; /* Left side of the diff */ |
| 1205 | 1264 | DLine *B; /* Right side of the diff */ |
| 1206 | 1265 | int a = 0; /* Index of next line in A[] */ |
| 1207 | 1266 | int b = 0; /* Index of next line in B[] */ |
| @@ -1213,16 +1272,20 @@ | ||
| 1213 | 1272 | int i, j; /* Loop counters */ |
| 1214 | 1273 | int m, ma, mb;/* Number of lines to output */ |
| 1215 | 1274 | int skip; /* Number of lines to skip */ |
| 1216 | 1275 | int nChunk = 0; /* Number of chunks of diff output seen so far */ |
| 1217 | 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 */ | |
| 1218 | 1279 | |
| 1219 | 1280 | 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 ); | |
| 1221 | 1283 | 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; | |
| 1224 | 1287 | s.iStart = -1; |
| 1225 | 1288 | s.iStart2 = 0; |
| 1226 | 1289 | s.iEnd = -1; |
| 1227 | 1290 | A = p->aFrom; |
| 1228 | 1291 | B = p->aTo; |
| @@ -1231,10 +1294,35 @@ | ||
| 1231 | 1294 | while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; } |
| 1232 | 1295 | for(r=0; r<mxr; r += 3*nr){ |
| 1233 | 1296 | /* Figure out how many triples to show in a single block */ |
| 1234 | 1297 | for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){} |
| 1235 | 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 | + } | |
| 1236 | 1324 | |
| 1237 | 1325 | /* For the current block comprising nr triples, figure out |
| 1238 | 1326 | ** how many lines of A and B are to be displayed |
| 1239 | 1327 | */ |
| 1240 | 1328 | if( R[r]>nContext ){ |
| @@ -1259,20 +1347,21 @@ | ||
| 1259 | 1347 | na += R[r+i*3]; |
| 1260 | 1348 | nb += R[r+i*3]; |
| 1261 | 1349 | } |
| 1262 | 1350 | |
| 1263 | 1351 | /* Draw the separator between blocks */ |
| 1264 | - if( r>0 ){ | |
| 1265 | - if( escHtml ){ | |
| 1352 | + if( showDivider ){ | |
| 1353 | + if( s.escHtml ){ | |
| 1266 | 1354 | blob_appendf(pOut, "<span class=\"diffhr\">%.*c</span>\n", |
| 1267 | - width*2+16, '.'); | |
| 1355 | + s.width*2+16, '.'); | |
| 1268 | 1356 | }else{ |
| 1269 | - blob_appendf(pOut, "%.*c\n", width*2+16, '.'); | |
| 1357 | + blob_appendf(pOut, "%.*c\n", s.width*2+16, '.'); | |
| 1270 | 1358 | } |
| 1271 | 1359 | } |
| 1360 | + showDivider = 1; | |
| 1272 | 1361 | nChunk++; |
| 1273 | - if( escHtml ){ | |
| 1362 | + if( s.escHtml ){ | |
| 1274 | 1363 | blob_appendf(pOut, "<a name=\"chunk%d\"></a>\n", nChunk); |
| 1275 | 1364 | } |
| 1276 | 1365 | |
| 1277 | 1366 | /* Show the initial common area */ |
| 1278 | 1367 | a += skip; |
| @@ -1315,11 +1404,11 @@ | ||
| 1315 | 1404 | sbsWriteLineno(&s, a); |
| 1316 | 1405 | s.iStart = 0; |
| 1317 | 1406 | s.zStart = "<span class=\"diffrm\">"; |
| 1318 | 1407 | s.iEnd = s.width; |
| 1319 | 1408 | sbsWriteText(&s, &A[a], SBS_PAD); |
| 1320 | - if( escHtml ){ | |
| 1409 | + if( s.escHtml ){ | |
| 1321 | 1410 | sbsWrite(&s, " <\n", 6); |
| 1322 | 1411 | }else{ |
| 1323 | 1412 | sbsWrite(&s, " <\n", 3); |
| 1324 | 1413 | } |
| 1325 | 1414 | blob_append(pOut, s.zLine, s.n); |
| @@ -1337,12 +1426,12 @@ | ||
| 1337 | 1426 | a++; |
| 1338 | 1427 | b++; |
| 1339 | 1428 | }else if( alignment[j]==2 ){ |
| 1340 | 1429 | /* Insert one line on the right */ |
| 1341 | 1430 | s.n = 0; |
| 1342 | - sbsWriteSpace(&s, width + 7); | |
| 1343 | - if( escHtml ){ | |
| 1431 | + sbsWriteSpace(&s, s.width + 7); | |
| 1432 | + if( s.escHtml ){ | |
| 1344 | 1433 | sbsWrite(&s, " > ", 6); |
| 1345 | 1434 | }else{ |
| 1346 | 1435 | sbsWrite(&s, " > ", 3); |
| 1347 | 1436 | } |
| 1348 | 1437 | sbsWriteLineno(&s, b); |
| @@ -1800,11 +1889,11 @@ | ||
| 1800 | 1889 | ** Extract the number of lines of context from diffFlags. Supply an |
| 1801 | 1890 | ** appropriate default if no context width is specified. |
| 1802 | 1891 | */ |
| 1803 | 1892 | int diff_context_lines(u64 diffFlags){ |
| 1804 | 1893 | int n = diffFlags & DIFF_CONTEXT_MASK; |
| 1805 | - if( n==0 ) n = 5; | |
| 1894 | + if( n==0 && (diffFlags & DIFF_CONTEXT_EX)==0 ) n = 5; | |
| 1806 | 1895 | return n; |
| 1807 | 1896 | } |
| 1808 | 1897 | |
| 1809 | 1898 | /* |
| 1810 | 1899 | ** Extract the width of columns for side-by-side diff. Supply an |
| @@ -1832,22 +1921,21 @@ | ||
| 1832 | 1921 | */ |
| 1833 | 1922 | int *text_diff( |
| 1834 | 1923 | Blob *pA_Blob, /* FROM file */ |
| 1835 | 1924 | Blob *pB_Blob, /* TO file */ |
| 1836 | 1925 | Blob *pOut, /* Write diff here if not NULL */ |
| 1926 | + ReCompiled *pRe, /* Only output changes where this Regexp matches */ | |
| 1837 | 1927 | u64 diffFlags /* DIFF_* flags defined above */ |
| 1838 | 1928 | ){ |
| 1839 | 1929 | int ignoreEolWs; /* Ignore whitespace at the end of lines */ |
| 1840 | - int nContext; /* Amount of context to display */ | |
| 1841 | 1930 | DContext c; |
| 1842 | 1931 | |
| 1843 | 1932 | if( diffFlags & DIFF_INVERT ){ |
| 1844 | 1933 | Blob *pTemp = pA_Blob; |
| 1845 | 1934 | pA_Blob = pB_Blob; |
| 1846 | 1935 | pB_Blob = pTemp; |
| 1847 | 1936 | } |
| 1848 | - nContext = diff_context_lines(diffFlags); | |
| 1849 | 1937 | ignoreEolWs = (diffFlags & DIFF_IGNORE_EOLWS)!=0; |
| 1850 | 1938 | |
| 1851 | 1939 | /* Prepare the input files */ |
| 1852 | 1940 | memset(&c, 0, sizeof(c)); |
| 1853 | 1941 | c.aFrom = break_into_lines(blob_str(pA_Blob), blob_size(pA_Blob), |
| @@ -1867,17 +1955,14 @@ | ||
| 1867 | 1955 | diff_all(&c); |
| 1868 | 1956 | if( (diffFlags & DIFF_NOOPT)==0 ) diff_optimize(&c); |
| 1869 | 1957 | |
| 1870 | 1958 | if( pOut ){ |
| 1871 | 1959 | /* Compute a context or side-by-side diff into pOut */ |
| 1872 | - int escHtml = (diffFlags & DIFF_HTML)!=0; | |
| 1873 | 1960 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 1874 | - int width = diff_width(diffFlags); | |
| 1875 | - sbsDiff(&c, pOut, nContext, width, escHtml); | |
| 1961 | + sbsDiff(&c, pOut, pRe, diffFlags); | |
| 1876 | 1962 | }else{ |
| 1877 | - int showLn = (diffFlags & DIFF_LINENO)!=0; | |
| 1878 | - contextDiff(&c, pOut, nContext, showLn, escHtml); | |
| 1963 | + contextDiff(&c, pOut, pRe, diffFlags); | |
| 1879 | 1964 | } |
| 1880 | 1965 | fossil_free(c.aFrom); |
| 1881 | 1966 | fossil_free(c.aTo); |
| 1882 | 1967 | fossil_free(c.aEdit); |
| 1883 | 1968 | return 0; |
| @@ -1903,19 +1988,19 @@ | ||
| 1903 | 1988 | ** --noopt Disable optimization DIFF_NOOPT |
| 1904 | 1989 | ** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE |
| 1905 | 1990 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1906 | 1991 | ** --width|-W N N character lines. DIFF_WIDTH_MASK |
| 1907 | 1992 | */ |
| 1908 | -int diff_options(void){ | |
| 1993 | +u64 diff_options(void){ | |
| 1909 | 1994 | u64 diffFlags = 0; |
| 1910 | 1995 | const char *z; |
| 1911 | 1996 | int f; |
| 1912 | 1997 | if( find_option("side-by-side","y",0)!=0 ) diffFlags |= DIFF_SIDEBYSIDE; |
| 1913 | 1998 | 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 ){ | |
| 1915 | 2000 | if( f > DIFF_CONTEXT_MASK ) f = DIFF_CONTEXT_MASK; |
| 1916 | - diffFlags |= f; | |
| 2001 | + diffFlags |= f + DIFF_CONTEXT_EX; | |
| 1917 | 2002 | } |
| 1918 | 2003 | if( (z = find_option("width","W",1))!=0 && (f = atoi(z))>0 ){ |
| 1919 | 2004 | f *= DIFF_CONTEXT_MASK+1; |
| 1920 | 2005 | if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK; |
| 1921 | 2006 | diffFlags |= f; |
| @@ -1940,11 +2025,11 @@ | ||
| 1940 | 2025 | if( g.argc<4 ) usage("FILE1 FILE2 ..."); |
| 1941 | 2026 | blob_read_from_file(&a, g.argv[2]); |
| 1942 | 2027 | for(i=3; i<g.argc; i++){ |
| 1943 | 2028 | if( i>3 ) fossil_print("-------------------------------\n"); |
| 1944 | 2029 | 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); | |
| 1946 | 2031 | for(r=0; R[r] || R[r+1] || R[r+2]; r += 3){ |
| 1947 | 2032 | fossil_print(" copy %4d delete %4d insert %4d\n", R[r], R[r+1], R[r+2]); |
| 1948 | 2033 | } |
| 1949 | 2034 | /* free(R); */ |
| 1950 | 2035 | blob_reset(&b); |
| @@ -1959,25 +2044,33 @@ | ||
| 1959 | 2044 | ** Print the difference between two files. The usual diff options apply. |
| 1960 | 2045 | */ |
| 1961 | 2046 | void test_diff_cmd(void){ |
| 1962 | 2047 | Blob a, b, out; |
| 1963 | 2048 | u64 diffFlag; |
| 2049 | + const char *zRe; /* Regex filter for diff output */ | |
| 2050 | + ReCompiled *pRe = 0; /* Regex filter for diff output */ | |
| 1964 | 2051 | |
| 1965 | 2052 | if( find_option("tk",0,0)!=0 ){ |
| 1966 | 2053 | diff_tk("test-diff", 2); |
| 1967 | 2054 | return; |
| 1968 | 2055 | } |
| 1969 | 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 | + } | |
| 1970 | 2062 | diffFlag = diff_options(); |
| 1971 | 2063 | verify_all_options(); |
| 1972 | 2064 | if( g.argc!=4 ) usage("FILE1 FILE2"); |
| 1973 | 2065 | diff_print_filenames(g.argv[2], g.argv[3], diffFlag); |
| 1974 | 2066 | blob_read_from_file(&a, g.argv[2]); |
| 1975 | 2067 | blob_read_from_file(&b, g.argv[3]); |
| 1976 | 2068 | blob_zero(&out); |
| 1977 | - text_diff(&a, &b, &out, diffFlag); | |
| 2069 | + text_diff(&a, &b, &out, pRe, diffFlag); | |
| 1978 | 2070 | blob_write_to_file(&out, "-"); |
| 2071 | + re_free(pRe); | |
| 1979 | 2072 | } |
| 1980 | 2073 | |
| 1981 | 2074 | /************************************************************************** |
| 1982 | 2075 | ** The basic difference engine is above. What follows is the annotation |
| 1983 | 2076 | ** engine. Both are in the same file since they share many components. |
| 1984 | 2077 |
| --- 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, " <\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, " > ", 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, " <\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, " > ", 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 @@ | ||
| 109 | 109 | if( blob_compare(pFile1, &file2) ){ |
| 110 | 110 | fossil_print("CHANGED %s\n", zName); |
| 111 | 111 | } |
| 112 | 112 | }else{ |
| 113 | 113 | blob_zero(&out); |
| 114 | - text_diff(pFile1, &file2, &out, diffFlags); | |
| 114 | + text_diff(pFile1, &file2, &out, 0, diffFlags); | |
| 115 | 115 | if( blob_size(&out) ){ |
| 116 | 116 | diff_print_filenames(zName, zName2, diffFlags); |
| 117 | 117 | fossil_print("%s\n", blob_str(&out)); |
| 118 | 118 | } |
| 119 | 119 | blob_reset(&out); |
| @@ -210,11 +210,11 @@ | ||
| 210 | 210 | if( diffFlags & DIFF_BRIEF ) return; |
| 211 | 211 | if( zDiffCmd==0 ){ |
| 212 | 212 | Blob out; /* Diff output text */ |
| 213 | 213 | |
| 214 | 214 | blob_zero(&out); |
| 215 | - text_diff(pFile1, pFile2, &out, diffFlags); | |
| 215 | + text_diff(pFile1, pFile2, &out, 0, diffFlags); | |
| 216 | 216 | diff_print_filenames(zName, zName, diffFlags); |
| 217 | 217 | fossil_print("%s\n", blob_str(&out)); |
| 218 | 218 | |
| 219 | 219 | /* Release memory resources */ |
| 220 | 220 | blob_reset(&out); |
| 221 | 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, 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 @@ | ||
| 1 | 1 | /* |
| 2 | 2 | ** Copyright (c) 2009 D. Richard Hipp |
| 3 | 3 | ** |
| 4 | 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. | |
| 5 | +** modify it under the terms of the Simplified BSD License (also | |
| 6 | +** known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | 7 | ** |
| 8 | 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. | |
| 9 | +** but without any warranty; without even the implied warranty of | |
| 10 | +** merchantability or fitness for a particular purpose. | |
| 17 | 11 | ** |
| 18 | 12 | ** Author contact information: |
| 19 | 13 | ** [email protected] |
| 20 | 14 | ** http://www.hwaci.com/drh/ |
| 21 | 15 | ** |
| 22 | 16 |
| --- 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 @@ | ||
| 208 | 208 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 209 | 209 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 210 | 210 | if( vid ){ |
| 211 | 211 | show_common_info(vid, "checkout:", 1, 1); |
| 212 | 212 | } |
| 213 | + fossil_print("checkin-count: %d\n", | |
| 214 | + db_int(-1, "SELECT count(distinct mid) FROM mlink /*scan*/")); | |
| 213 | 215 | }else{ |
| 214 | 216 | int rid; |
| 215 | 217 | rid = name_to_rid(g.argv[2]); |
| 216 | 218 | if( rid==0 ){ |
| 217 | 219 | fossil_panic("no such object: %s\n", g.argv[2]); |
| @@ -287,13 +289,18 @@ | ||
| 287 | 289 | } |
| 288 | 290 | } |
| 289 | 291 | |
| 290 | 292 | |
| 291 | 293 | /* |
| 292 | -** Append the difference between two RIDs to the output | |
| 294 | +** Append the difference between artifacts to the output | |
| 293 | 295 | */ |
| 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 | +){ | |
| 295 | 302 | int fromid; |
| 296 | 303 | int toid; |
| 297 | 304 | Blob from, to, out; |
| 298 | 305 | if( zFrom ){ |
| 299 | 306 | fromid = uuid_to_rid(zFrom, 0); |
| @@ -307,16 +314,16 @@ | ||
| 307 | 314 | }else{ |
| 308 | 315 | blob_zero(&to); |
| 309 | 316 | } |
| 310 | 317 | blob_zero(&out); |
| 311 | 318 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 312 | - text_diff(&from, &to, &out, diffFlags | DIFF_HTML); | |
| 319 | + text_diff(&from, &to, &out, pRe, diffFlags | DIFF_HTML); | |
| 313 | 320 | @ <div class="sbsdiff"> |
| 314 | 321 | @ %s(blob_str(&out)) |
| 315 | 322 | @ </div> |
| 316 | 323 | }else{ |
| 317 | - text_diff(&from, &to, &out, diffFlags | DIFF_LINENO | DIFF_HTML); | |
| 324 | + text_diff(&from, &to, &out, pRe, diffFlags | DIFF_LINENO | DIFF_HTML); | |
| 318 | 325 | @ <div class="udiff"> |
| 319 | 326 | @ %s(blob_str(&out)) |
| 320 | 327 | @ </div> |
| 321 | 328 | } |
| 322 | 329 | blob_reset(&from); |
| @@ -333,10 +340,11 @@ | ||
| 333 | 340 | const char *zName, /* Name of the file that has changed */ |
| 334 | 341 | const char *zOld, /* blob.uuid before change. NULL for added files */ |
| 335 | 342 | const char *zNew, /* blob.uuid after change. NULL for deletes */ |
| 336 | 343 | const char *zOldName, /* Prior name. NULL if no name change. */ |
| 337 | 344 | u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */ |
| 345 | + ReCompiled *pRe, /* Only show diffs that match this regex, if not NULL */ | |
| 338 | 346 | int mperm /* executable or symlink permission for zNew */ |
| 339 | 347 | ){ |
| 340 | 348 | if( !g.perm.Hyperlink ){ |
| 341 | 349 | if( zNew==0 ){ |
| 342 | 350 | @ <p>Deleted %h(zName)</p> |
| @@ -350,11 +358,11 @@ | ||
| 350 | 358 | }else{ |
| 351 | 359 | @ <p>Changes to %h(zName)</p> |
| 352 | 360 | } |
| 353 | 361 | if( diffFlags ){ |
| 354 | 362 | @ <pre style="white-space:pre;"> |
| 355 | - append_diff(zOld, zNew, diffFlags); | |
| 363 | + append_diff(zOld, zNew, diffFlags, pRe); | |
| 356 | 364 | @ </pre> |
| 357 | 365 | } |
| 358 | 366 | }else{ |
| 359 | 367 | if( zOld && zNew ){ |
| 360 | 368 | if( fossil_strcmp(zOld, zNew)!=0 ){ |
| @@ -376,11 +384,11 @@ | ||
| 376 | 384 | @ <p>Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a> |
| 377 | 385 | @ version %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a> |
| 378 | 386 | } |
| 379 | 387 | if( diffFlags ){ |
| 380 | 388 | @ <pre style="white-space:pre;"> |
| 381 | - append_diff(zOld, zNew, diffFlags); | |
| 389 | + append_diff(zOld, zNew, diffFlags, pRe); | |
| 382 | 390 | @ </pre> |
| 383 | 391 | }else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){ |
| 384 | 392 | @ |
| 385 | 393 | @ %z(href("%R/fdiff?v1=%S&v2=%S",zOld,zNew))[diff]</a> |
| 386 | 394 | } |
| @@ -444,10 +452,12 @@ | ||
| 444 | 452 | int sideBySide; /* True for side-by-side diffs */ |
| 445 | 453 | u64 diffFlags; /* Flag parameter for text_diff() */ |
| 446 | 454 | const char *zName; /* Name of the checkin to be displayed */ |
| 447 | 455 | const char *zUuid; /* UUID of zName */ |
| 448 | 456 | const char *zParent; /* UUID of the parent checkin (if any) */ |
| 457 | + const char *zRe; /* regex parameter */ | |
| 458 | + ReCompiled *pRe = 0; /* regex */ | |
| 449 | 459 | |
| 450 | 460 | login_check_credentials(); |
| 451 | 461 | if( !g.perm.Read ){ login_needed(); return; } |
| 452 | 462 | zName = P("name"); |
| 453 | 463 | rid = name_to_rid_www("name"); |
| @@ -455,10 +465,12 @@ | ||
| 455 | 465 | style_header("Check-in Information Error"); |
| 456 | 466 | @ No such object: %h(g.argv[2]) |
| 457 | 467 | style_footer(); |
| 458 | 468 | return; |
| 459 | 469 | } |
| 470 | + zRe = P("regex"); | |
| 471 | + if( zRe ) re_compile(&pRe, zRe, 0); | |
| 460 | 472 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 461 | 473 | zParent = db_text(0, |
| 462 | 474 | "SELECT uuid FROM plink, blob" |
| 463 | 475 | " WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim", |
| 464 | 476 | rid |
| @@ -692,10 +704,14 @@ | ||
| 692 | 704 | @ show side-by-side diffs</a> |
| 693 | 705 | } |
| 694 | 706 | } |
| 695 | 707 | @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid)) |
| 696 | 708 | @ patch</a></div> |
| 709 | + if( pRe ){ | |
| 710 | + @ <p><b>Only differences that match regular expression "%h(zRe)" | |
| 711 | + @ are shown.</b></p> | |
| 712 | + } | |
| 697 | 713 | db_prepare(&q, |
| 698 | 714 | "SELECT name," |
| 699 | 715 | " mperm," |
| 700 | 716 | " (SELECT uuid FROM blob WHERE rid=mlink.pid)," |
| 701 | 717 | " (SELECT uuid FROM blob WHERE rid=mlink.fid)," |
| @@ -712,11 +728,11 @@ | ||
| 712 | 728 | const char *zName = db_column_text(&q,0); |
| 713 | 729 | int mperm = db_column_int(&q, 1); |
| 714 | 730 | const char *zOld = db_column_text(&q,2); |
| 715 | 731 | const char *zNew = db_column_text(&q,3); |
| 716 | 732 | 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); | |
| 718 | 734 | } |
| 719 | 735 | db_finalize(&q); |
| 720 | 736 | } |
| 721 | 737 | style_footer(); |
| 722 | 738 | } |
| @@ -935,15 +951,19 @@ | ||
| 935 | 951 | Manifest *pFrom, *pTo; |
| 936 | 952 | ManifestFile *pFileFrom, *pFileTo; |
| 937 | 953 | const char *zBranch; |
| 938 | 954 | const char *zFrom; |
| 939 | 955 | const char *zTo; |
| 956 | + const char *zRe; | |
| 957 | + ReCompiled *pRe = 0; | |
| 940 | 958 | |
| 941 | 959 | login_check_credentials(); |
| 942 | 960 | if( !g.perm.Read ){ login_needed(); return; } |
| 943 | 961 | login_anonymous_available(); |
| 944 | 962 | |
| 963 | + zRe = P("regex"); | |
| 964 | + if( zRe ) re_compile(&pRe, zRe, 0); | |
| 945 | 965 | zBranch = P("branch"); |
| 946 | 966 | if( zBranch && zBranch[0] ){ |
| 947 | 967 | cgi_replace_parameter("from", mprintf("root:%s", zBranch)); |
| 948 | 968 | cgi_replace_parameter("to", zBranch); |
| 949 | 969 | } |
| @@ -971,11 +991,16 @@ | ||
| 971 | 991 | style_header("Check-in Differences"); |
| 972 | 992 | @ <h2>Difference From:</h2><blockquote> |
| 973 | 993 | checkin_description(ridFrom); |
| 974 | 994 | @ </blockquote><h2>To:</h2><blockquote> |
| 975 | 995 | 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> | |
| 977 | 1002 | |
| 978 | 1003 | manifest_file_rewind(pFrom); |
| 979 | 1004 | pFileFrom = manifest_file_next(pFrom, 0); |
| 980 | 1005 | manifest_file_rewind(pTo); |
| 981 | 1006 | pFileTo = manifest_file_next(pTo, 0); |
| @@ -989,25 +1014,25 @@ | ||
| 989 | 1014 | }else{ |
| 990 | 1015 | cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName); |
| 991 | 1016 | } |
| 992 | 1017 | if( cmp<0 ){ |
| 993 | 1018 | append_file_change_line(pFileFrom->zName, |
| 994 | - pFileFrom->zUuid, 0, 0, diffFlags, 0); | |
| 1019 | + pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0); | |
| 995 | 1020 | pFileFrom = manifest_file_next(pFrom, 0); |
| 996 | 1021 | }else if( cmp>0 ){ |
| 997 | 1022 | append_file_change_line(pFileTo->zName, |
| 998 | - 0, pFileTo->zUuid, 0, diffFlags, | |
| 1023 | + 0, pFileTo->zUuid, 0, diffFlags, pRe, | |
| 999 | 1024 | manifest_file_mperm(pFileTo)); |
| 1000 | 1025 | pFileTo = manifest_file_next(pTo, 0); |
| 1001 | 1026 | }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){ |
| 1002 | 1027 | /* No changes */ |
| 1003 | 1028 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1004 | 1029 | pFileTo = manifest_file_next(pTo, 0); |
| 1005 | 1030 | }else{ |
| 1006 | 1031 | append_file_change_line(pFileFrom->zName, |
| 1007 | 1032 | pFileFrom->zUuid, |
| 1008 | - pFileTo->zUuid, 0, diffFlags, | |
| 1033 | + pFileTo->zUuid, 0, diffFlags, pRe, | |
| 1009 | 1034 | manifest_file_mperm(pFileTo)); |
| 1010 | 1035 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1011 | 1036 | pFileTo = manifest_file_next(pTo, 0); |
| 1012 | 1037 | } |
| 1013 | 1038 | } |
| @@ -1256,11 +1281,11 @@ | ||
| 1256 | 1281 | } |
| 1257 | 1282 | |
| 1258 | 1283 | |
| 1259 | 1284 | /* |
| 1260 | 1285 | ** WEBPAGE: fdiff |
| 1261 | -** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN | |
| 1286 | +** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN®ex=REGEX | |
| 1262 | 1287 | ** |
| 1263 | 1288 | ** Two arguments, v1 and v2, identify the files to be diffed. Show the |
| 1264 | 1289 | ** difference between the two artifacts. Show diff side by side unless sbs |
| 1265 | 1290 | ** is 0. Generate plaintext if "patch" is present. |
| 1266 | 1291 | */ |
| @@ -1269,12 +1294,15 @@ | ||
| 1269 | 1294 | int isPatch; |
| 1270 | 1295 | int sideBySide; |
| 1271 | 1296 | Blob c1, c2, diff, *pOut; |
| 1272 | 1297 | char *zV1; |
| 1273 | 1298 | char *zV2; |
| 1299 | + const char *zRe; | |
| 1300 | + ReCompiled *pRe = 0; | |
| 1274 | 1301 | u64 diffFlags; |
| 1275 | 1302 | const char *zStyle = "sbsdiff"; |
| 1303 | + const char *zReErr = 0; | |
| 1276 | 1304 | |
| 1277 | 1305 | login_check_credentials(); |
| 1278 | 1306 | if( !g.perm.Read ){ login_needed(); return; } |
| 1279 | 1307 | v1 = name_to_rid_www("v1"); |
| 1280 | 1308 | v2 = name_to_rid_www("v2"); |
| @@ -1296,13 +1324,15 @@ | ||
| 1296 | 1324 | }else{ |
| 1297 | 1325 | diffFlags |= DIFF_LINENO; |
| 1298 | 1326 | zStyle = "udiff"; |
| 1299 | 1327 | } |
| 1300 | 1328 | } |
| 1329 | + zRe = P("regex"); | |
| 1330 | + if( zRe ) zReErr = re_compile(&pRe, zRe, 0); | |
| 1301 | 1331 | content_get(v1, &c1); |
| 1302 | 1332 | content_get(v2, &c2); |
| 1303 | - text_diff(&c1, &c2, pOut, diffFlags); | |
| 1333 | + text_diff(&c1, &c2, pOut, pRe, diffFlags); | |
| 1304 | 1334 | blob_reset(&c1); |
| 1305 | 1335 | blob_reset(&c2); |
| 1306 | 1336 | if( !isPatch ){ |
| 1307 | 1337 | style_header("Diff"); |
| 1308 | 1338 | style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch", |
| @@ -1326,10 +1356,14 @@ | ||
| 1326 | 1356 | @ Artifact %z(href("%R/artifact/%S",zV1))[%S(zV1)]</a>:</h2> |
| 1327 | 1357 | object_description(v1, 0, 0); |
| 1328 | 1358 | @ <h2>To Artifact %z(href("%R/artifact/%S",zV2))[%S(zV2)]</a>:</h2> |
| 1329 | 1359 | object_description(v2, 0, 0); |
| 1330 | 1360 | } |
| 1361 | + if( pRe ){ | |
| 1362 | + @ <b>Only differences that match regular expression "%h(zRe)" | |
| 1363 | + @ are shown.</b> | |
| 1364 | + } | |
| 1331 | 1365 | @ <hr /> |
| 1332 | 1366 | @ <div class="%s(zStyle)"> |
| 1333 | 1367 | @ %s(blob_str(&diff)) |
| 1334 | 1368 | @ </div> |
| 1335 | 1369 | blob_reset(&diff); |
| 1336 | 1370 |
| --- 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 | @ |
| 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 side-by-side 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 | @ |
| 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 side-by-side 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®ex=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 @@ | ||
| 58 | 58 | return NULL; |
| 59 | 59 | } |
| 60 | 60 | content_get(fromid, &from); |
| 61 | 61 | content_get(toid, &to); |
| 62 | 62 | blob_zero(&out); |
| 63 | - text_diff(&from, &to, &out, flags); | |
| 63 | + text_diff(&from, &to, &out, 0, flags); | |
| 64 | 64 | blob_reset(&from); |
| 65 | 65 | blob_reset(&to); |
| 66 | 66 | outLen = blob_size(&out); |
| 67 | 67 | if(outLen>=0){ |
| 68 | 68 | rc = cson_value_new_string(blob_buffer(&out), |
| 69 | 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, 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 |
+1
-1
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -90,11 +90,11 @@ | ||
| 90 | 90 | |
| 91 | 91 | /* |
| 92 | 92 | ** Return a pointer to a constant string that forms the basis |
| 93 | 93 | ** for a timeline query for the JSON interface. |
| 94 | 94 | */ |
| 95 | -const char const * json_timeline_query(void){ | |
| 95 | +char const * json_timeline_query(void){ | |
| 96 | 96 | /* Field order MUST match that from json_timeline_temp_table()!!! */ |
| 97 | 97 | static const char zBaseSql[] = |
| 98 | 98 | @ SELECT |
| 99 | 99 | @ NULL, |
| 100 | 100 | @ blob.rid, |
| 101 | 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 | 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 @@ | ||
| 543 | 543 | blob_init(&w1, pW1->zWiki, -1); |
| 544 | 544 | blob_zero(&w2); |
| 545 | 545 | blob_init(&w2, pW2->zWiki, -1); |
| 546 | 546 | blob_zero(&d); |
| 547 | 547 | diffFlags = DIFF_IGNORE_EOLWS | DIFF_INLINE; |
| 548 | - text_diff(&w2, &w1, &d, diffFlags); | |
| 548 | + text_diff(&w2, &w1, &d, 0, diffFlags); | |
| 549 | 549 | blob_reset(&w1); |
| 550 | 550 | blob_reset(&w2); |
| 551 | 551 | |
| 552 | 552 | pay = cson_new_object(); |
| 553 | 553 | |
| 554 | 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, 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 @@ | ||
| 397 | 397 | } |
| 398 | 398 | if( memcmp(zAgent, "Mozilla/", 8)==0 ){ |
| 399 | 399 | if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */ |
| 400 | 400 | if( strglob("*Firefox/[1-9]*", zAgent) ) return 1; |
| 401 | 401 | 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; | |
| 403 | 403 | if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1; |
| 404 | 404 | return 0; |
| 405 | 405 | } |
| 406 | 406 | if( memcmp(zAgent, "Opera/", 6)==0 ) return 1; |
| 407 | 407 | if( memcmp(zAgent, "Safari/", 7)==0 ) return 1; |
| @@ -625,11 +625,11 @@ | ||
| 625 | 625 | @ <a href="%s(g.zTop)/register?g=%T(P("G"))">create one</a>. |
| 626 | 626 | } |
| 627 | 627 | if( zAnonPw ){ |
| 628 | 628 | unsigned int uSeed = captcha_seed(); |
| 629 | 629 | char const *zDecoded = captcha_decode(uSeed); |
| 630 | - int bAutoCaptcha = db_get_boolean("auto-captcha", 1); | |
| 630 | + int bAutoCaptcha = db_get_boolean("auto-captcha", 0); | |
| 631 | 631 | char *zCaptcha = captcha_render(zDecoded); |
| 632 | 632 | |
| 633 | 633 | @ <p><input type="hidden" name="cs" value="%u(uSeed)" /> |
| 634 | 634 | @ Visitors may enter <b>anonymous</b> as the user-ID with |
| 635 | 635 | @ the 8-character hexadecimal password shown below:</p> |
| 636 | 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?[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 @@ | ||
| 605 | 605 | if( g.cgiOutput && once ){ |
| 606 | 606 | once = 0; |
| 607 | 607 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 608 | 608 | cgi_reply(); |
| 609 | 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); | |
| 610 | + fossil_trace("%s: %s\n", g.argv[0], z); | |
| 614 | 611 | } |
| 615 | 612 | } |
| 616 | 613 | free(z); |
| 617 | 614 | db_force_rollback(); |
| 618 | 615 | fossil_exit(rc); |
| @@ -636,17 +633,14 @@ | ||
| 636 | 633 | else |
| 637 | 634 | #endif |
| 638 | 635 | { |
| 639 | 636 | if( g.cgiOutput ){ |
| 640 | 637 | g.cgiOutput = 0; |
| 641 | - cgi_printf("<p class=\"generalError\">%h</p>", z); | |
| 638 | + cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z); | |
| 642 | 639 | cgi_reply(); |
| 643 | 640 | }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); | |
| 648 | 642 | } |
| 649 | 643 | } |
| 650 | 644 | free(z); |
| 651 | 645 | db_force_rollback(); |
| 652 | 646 | fossil_exit(rc); |
| @@ -679,17 +673,14 @@ | ||
| 679 | 673 | } else |
| 680 | 674 | #endif |
| 681 | 675 | { |
| 682 | 676 | if( g.cgiOutput ){ |
| 683 | 677 | g.cgiOutput = 0; |
| 684 | - cgi_printf("<p class=\"generalError\">%h</p>", z); | |
| 678 | + cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z); | |
| 685 | 679 | cgi_reply(); |
| 686 | 680 | }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); | |
| 691 | 682 | } |
| 692 | 683 | } |
| 693 | 684 | db_force_rollback(); |
| 694 | 685 | fossil_exit(rc); |
| 695 | 686 | } |
| @@ -707,16 +698,13 @@ | ||
| 707 | 698 | json_warn( FSL_JSON_W_UNKNOWN, z ); |
| 708 | 699 | }else |
| 709 | 700 | #endif |
| 710 | 701 | { |
| 711 | 702 | if( g.cgiOutput ){ |
| 712 | - cgi_printf("<p class=\"generalError\">%h</p>", z); | |
| 703 | + cgi_printf("<p class=\"generalError\">\n%h\n</p>\n", z); | |
| 713 | 704 | }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); | |
| 718 | 706 | } |
| 719 | 707 | } |
| 720 | 708 | free(z); |
| 721 | 709 | } |
| 722 | 710 | |
| @@ -747,13 +735,11 @@ | ||
| 747 | 735 | ** Who knows why - this is just the way windows works. |
| 748 | 736 | */ |
| 749 | 737 | char *zNewCmd = mprintf("\"%s\"", zOrigCmd); |
| 750 | 738 | WCHAR *zUnicode = fossil_utf8_to_unicode(zNewCmd); |
| 751 | 739 | 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); | |
| 755 | 741 | } |
| 756 | 742 | rc = _wsystem(zUnicode); |
| 757 | 743 | fossil_unicode_free(zUnicode); |
| 758 | 744 | free(zNewCmd); |
| 759 | 745 | #else |
| @@ -1225,15 +1211,17 @@ | ||
| 1225 | 1211 | } |
| 1226 | 1212 | zRepo = "/"; |
| 1227 | 1213 | }else{ |
| 1228 | 1214 | for(i=strlen(zDir)-1; i>0 && zDir[i]!='/'; i--){} |
| 1229 | 1215 | 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] = '/'; | |
| 1233 | 1222 | } |
| 1234 | - zDir[i] = '/'; | |
| 1235 | 1223 | zRepo = &zDir[i]; |
| 1236 | 1224 | } |
| 1237 | 1225 | if( stat(zRepo, &sStat)!=0 ){ |
| 1238 | 1226 | fossil_fatal("cannot stat() repository: %s", zRepo); |
| 1239 | 1227 | } |
| 1240 | 1228 |
| --- 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 @@ | ||
| 81 | 81 | $(SRCDIR)/pivot.c \ |
| 82 | 82 | $(SRCDIR)/popen.c \ |
| 83 | 83 | $(SRCDIR)/pqueue.c \ |
| 84 | 84 | $(SRCDIR)/printf.c \ |
| 85 | 85 | $(SRCDIR)/rebuild.c \ |
| 86 | + $(SRCDIR)/regexp.c \ | |
| 86 | 87 | $(SRCDIR)/report.c \ |
| 87 | 88 | $(SRCDIR)/rss.c \ |
| 88 | 89 | $(SRCDIR)/schema.c \ |
| 89 | 90 | $(SRCDIR)/search.c \ |
| 90 | 91 | $(SRCDIR)/setup.c \ |
| @@ -101,10 +102,11 @@ | ||
| 101 | 102 | $(SRCDIR)/th_main.c \ |
| 102 | 103 | $(SRCDIR)/timeline.c \ |
| 103 | 104 | $(SRCDIR)/tkt.c \ |
| 104 | 105 | $(SRCDIR)/tktsetup.c \ |
| 105 | 106 | $(SRCDIR)/undo.c \ |
| 107 | + $(SRCDIR)/unicode.c \ | |
| 106 | 108 | $(SRCDIR)/update.c \ |
| 107 | 109 | $(SRCDIR)/url.c \ |
| 108 | 110 | $(SRCDIR)/user.c \ |
| 109 | 111 | $(SRCDIR)/utf8.c \ |
| 110 | 112 | $(SRCDIR)/verify.c \ |
| @@ -185,10 +187,11 @@ | ||
| 185 | 187 | $(OBJDIR)/pivot_.c \ |
| 186 | 188 | $(OBJDIR)/popen_.c \ |
| 187 | 189 | $(OBJDIR)/pqueue_.c \ |
| 188 | 190 | $(OBJDIR)/printf_.c \ |
| 189 | 191 | $(OBJDIR)/rebuild_.c \ |
| 192 | + $(OBJDIR)/regexp_.c \ | |
| 190 | 193 | $(OBJDIR)/report_.c \ |
| 191 | 194 | $(OBJDIR)/rss_.c \ |
| 192 | 195 | $(OBJDIR)/schema_.c \ |
| 193 | 196 | $(OBJDIR)/search_.c \ |
| 194 | 197 | $(OBJDIR)/setup_.c \ |
| @@ -205,10 +208,11 @@ | ||
| 205 | 208 | $(OBJDIR)/th_main_.c \ |
| 206 | 209 | $(OBJDIR)/timeline_.c \ |
| 207 | 210 | $(OBJDIR)/tkt_.c \ |
| 208 | 211 | $(OBJDIR)/tktsetup_.c \ |
| 209 | 212 | $(OBJDIR)/undo_.c \ |
| 213 | + $(OBJDIR)/unicode_.c \ | |
| 210 | 214 | $(OBJDIR)/update_.c \ |
| 211 | 215 | $(OBJDIR)/url_.c \ |
| 212 | 216 | $(OBJDIR)/user_.c \ |
| 213 | 217 | $(OBJDIR)/utf8_.c \ |
| 214 | 218 | $(OBJDIR)/verify_.c \ |
| @@ -289,10 +293,11 @@ | ||
| 289 | 293 | $(OBJDIR)/pivot.o \ |
| 290 | 294 | $(OBJDIR)/popen.o \ |
| 291 | 295 | $(OBJDIR)/pqueue.o \ |
| 292 | 296 | $(OBJDIR)/printf.o \ |
| 293 | 297 | $(OBJDIR)/rebuild.o \ |
| 298 | + $(OBJDIR)/regexp.o \ | |
| 294 | 299 | $(OBJDIR)/report.o \ |
| 295 | 300 | $(OBJDIR)/rss.o \ |
| 296 | 301 | $(OBJDIR)/schema.o \ |
| 297 | 302 | $(OBJDIR)/search.o \ |
| 298 | 303 | $(OBJDIR)/setup.o \ |
| @@ -309,10 +314,11 @@ | ||
| 309 | 314 | $(OBJDIR)/th_main.o \ |
| 310 | 315 | $(OBJDIR)/timeline.o \ |
| 311 | 316 | $(OBJDIR)/tkt.o \ |
| 312 | 317 | $(OBJDIR)/tktsetup.o \ |
| 313 | 318 | $(OBJDIR)/undo.o \ |
| 319 | + $(OBJDIR)/unicode.o \ | |
| 314 | 320 | $(OBJDIR)/update.o \ |
| 315 | 321 | $(OBJDIR)/url.o \ |
| 316 | 322 | $(OBJDIR)/user.o \ |
| 317 | 323 | $(OBJDIR)/utf8.o \ |
| 318 | 324 | $(OBJDIR)/verify.o \ |
| @@ -390,11 +396,11 @@ | ||
| 390 | 396 | |
| 391 | 397 | |
| 392 | 398 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 393 | 399 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 394 | 400 | $(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 | |
| 396 | 402 | touch $(OBJDIR)/headers |
| 397 | 403 | $(OBJDIR)/headers: Makefile |
| 398 | 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 |
| 399 | 405 | Makefile: |
| 400 | 406 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -878,10 +884,17 @@ | ||
| 878 | 884 | |
| 879 | 885 | $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h |
| 880 | 886 | $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c |
| 881 | 887 | |
| 882 | 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 | |
| 883 | 896 | $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate |
| 884 | 897 | $(OBJDIR)/translate $(SRCDIR)/report.c >$(OBJDIR)/report_.c |
| 885 | 898 | |
| 886 | 899 | $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h |
| 887 | 900 | $(XTCC) -o $(OBJDIR)/report.o -c $(OBJDIR)/report_.c |
| @@ -1018,10 +1031,17 @@ | ||
| 1018 | 1031 | |
| 1019 | 1032 | $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h |
| 1020 | 1033 | $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c |
| 1021 | 1034 | |
| 1022 | 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 | |
| 1023 | 1043 | $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate |
| 1024 | 1044 | $(OBJDIR)/translate $(SRCDIR)/update.c >$(OBJDIR)/update_.c |
| 1025 | 1045 | |
| 1026 | 1046 | $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h |
| 1027 | 1047 | $(XTCC) -o $(OBJDIR)/update.o -c $(OBJDIR)/update_.c |
| 1028 | 1048 |
| --- 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 |
+2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -84,10 +84,11 @@ | ||
| 84 | 84 | pivot |
| 85 | 85 | popen |
| 86 | 86 | pqueue |
| 87 | 87 | printf |
| 88 | 88 | rebuild |
| 89 | + regexp | |
| 89 | 90 | report |
| 90 | 91 | rss |
| 91 | 92 | schema |
| 92 | 93 | search |
| 93 | 94 | setup |
| @@ -104,10 +105,11 @@ | ||
| 104 | 105 | th_main |
| 105 | 106 | timeline |
| 106 | 107 | tkt |
| 107 | 108 | tktsetup |
| 108 | 109 | undo |
| 110 | + unicode | |
| 109 | 111 | update |
| 110 | 112 | url |
| 111 | 113 | user |
| 112 | 114 | utf8 |
| 113 | 115 | verify |
| 114 | 116 |
| --- 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 @@ | ||
| 175 | 175 | ** is the number of lines of text to copy directly from the pivot, |
| 176 | 176 | ** the second integer is the number of lines of text to omit from the |
| 177 | 177 | ** pivot, and the third integer is the number of lines of text that are |
| 178 | 178 | ** inserted. The edit array ends with a triple of 0,0,0. |
| 179 | 179 | */ |
| 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); | |
| 182 | 182 | if( aC1==0 || aC2==0 ){ |
| 183 | 183 | free(aC1); |
| 184 | 184 | free(aC2); |
| 185 | 185 | return -1; |
| 186 | 186 | } |
| 187 | 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); |
| 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 @@ | ||
| 871 | 871 | Blob b = empty_blob; |
| 872 | 872 | vxprintf(&b, zFormat, ap); |
| 873 | 873 | fossil_puts(blob_str(&b), 0); |
| 874 | 874 | blob_reset(&b); |
| 875 | 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); | |
| 876 | 891 | } |
| 877 | 892 | |
| 878 | 893 | /* |
| 879 | 894 | ** Like strcmp() except that it accepts NULL pointers. NULL sorts before |
| 880 | 895 | ** all non-NULL string pointers. Also, this strcmp() is a binary comparison |
| 881 | 896 | |
| 882 | 897 | 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 @@ | ||
| 94 | 94 | "Edit HTML text inserted at the top of every page"); |
| 95 | 95 | setup_menu_entry("Footer", "setup_footer", |
| 96 | 96 | "Edit HTML text inserted at the bottom of every page"); |
| 97 | 97 | setup_menu_entry("Moderation", "setup_modreq", |
| 98 | 98 | "Enable/Disable requiring moderator approval of Wiki and/or Ticket" |
| 99 | - "edits and attachments."); | |
| 99 | + " changes and attachments."); | |
| 100 | 100 | setup_menu_entry("Ad-Unit", "setup_adunit", |
| 101 | 101 | "Edit HTML text for an ad unit inserted after the menu bar"); |
| 102 | 102 | setup_menu_entry("Logo", "setup_logo", |
| 103 | 103 | "Change the logo and background images for the server"); |
| 104 | 104 | setup_menu_entry("Shunned", "shun", |
| @@ -109,10 +109,12 @@ | ||
| 109 | 109 | "A record of login attempts"); |
| 110 | 110 | setup_menu_entry("Stats", "stat", |
| 111 | 111 | "Display repository statistics"); |
| 112 | 112 | setup_menu_entry("SQL", "admin_sql", |
| 113 | 113 | "Enter raw SQL commands"); |
| 114 | + setup_menu_entry("TH1", "admin_th1", | |
| 115 | + "Enter raw TH1 commands"); | |
| 114 | 116 | @ </table> |
| 115 | 117 | |
| 116 | 118 | style_footer(); |
| 117 | 119 | } |
| 118 | 120 | |
| @@ -1759,8 +1761,52 @@ | ||
| 1759 | 1761 | @ </tr> |
| 1760 | 1762 | } |
| 1761 | 1763 | sqlite3_finalize(pStmt); |
| 1762 | 1764 | @ </table> |
| 1763 | 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 | + } | |
| 1764 | 1810 | } |
| 1765 | 1811 | style_footer(); |
| 1766 | 1812 | } |
| 1767 | 1813 |
| --- 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 |
+6
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -1477,10 +1477,16 @@ | ||
| 1477 | 1477 | p->zDbFilename, sqlite3_errmsg(db)); |
| 1478 | 1478 | exit(1); |
| 1479 | 1479 | } |
| 1480 | 1480 | #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 1481 | 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 | + } | |
| 1482 | 1488 | #endif |
| 1483 | 1489 | } |
| 1484 | 1490 | } |
| 1485 | 1491 | |
| 1486 | 1492 | /* |
| 1487 | 1493 |
| --- 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 |
+1
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -118,10 +118,11 @@ | ||
| 118 | 118 | sqlcmd_content, 0, 0); |
| 119 | 119 | sqlite3_create_function(db, "compress", 1, SQLITE_ANY, 0, |
| 120 | 120 | sqlcmd_compress, 0, 0); |
| 121 | 121 | sqlite3_create_function(db, "decompress", 1, SQLITE_ANY, 0, |
| 122 | 122 | sqlcmd_decompress, 0, 0); |
| 123 | + re_add_sql_func(db); | |
| 123 | 124 | g.repositoryOpen = 1; |
| 124 | 125 | g.db = db; |
| 125 | 126 | return SQLITE_OK; |
| 126 | 127 | } |
| 127 | 128 | |
| 128 | 129 |
| --- 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 @@ | ||
| 673 | 673 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 674 | 674 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 675 | 675 | */ |
| 676 | 676 | #define SQLITE_VERSION "3.7.16" |
| 677 | 677 | #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" | |
| 679 | 679 | |
| 680 | 680 | /* |
| 681 | 681 | ** CAPI3REF: Run-Time Library Version Numbers |
| 682 | 682 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 683 | 683 | ** |
| @@ -10553,24 +10553,24 @@ | ||
| 10553 | 10553 | ** and the value of Index.onError indicate the which conflict resolution |
| 10554 | 10554 | ** algorithm to employ whenever an attempt is made to insert a non-unique |
| 10555 | 10555 | ** element. |
| 10556 | 10556 | */ |
| 10557 | 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 */ | |
| 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 | 10572 | #ifdef SQLITE_ENABLE_STAT3 |
| 10573 | 10573 | int nSample; /* Number of elements in aSample[] */ |
| 10574 | 10574 | tRowcnt avgEq; /* Average nEq value for key values not in aSample */ |
| 10575 | 10575 | IndexSample *aSample; /* Samples of the left-most key */ |
| 10576 | 10576 | #endif |
| @@ -10840,22 +10840,31 @@ | ||
| 10840 | 10840 | ** name. An expr/name combination can be used in several ways, such |
| 10841 | 10841 | ** as the list of "expr AS ID" fields following a "SELECT" or in the |
| 10842 | 10842 | ** list of "ID = expr" items in an UPDATE. A list of expressions can |
| 10843 | 10843 | ** also be used as the argument to a function, in which case the a.zName |
| 10844 | 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. | |
| 10845 | 10853 | */ |
| 10846 | 10854 | struct ExprList { |
| 10847 | 10855 | int nExpr; /* Number of expressions on the list */ |
| 10848 | 10856 | int iECursor; /* VDBE Cursor associated with this ExprList */ |
| 10849 | 10857 | 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 */ | |
| 10857 | 10866 | } *a; /* Alloc a power of two greater or equal to nExpr */ |
| 10858 | 10867 | }; |
| 10859 | 10868 | |
| 10860 | 10869 | /* |
| 10861 | 10870 | ** An instance of this structure is used by the parser to record both |
| @@ -11171,10 +11180,11 @@ | ||
| 11171 | 11180 | #define SF_Expanded 0x0010 /* sqlite3SelectExpand() called on this */ |
| 11172 | 11181 | #define SF_HasTypeInfo 0x0020 /* FROM subqueries have Table metadata */ |
| 11173 | 11182 | #define SF_UseSorter 0x0040 /* Sort using a sorter */ |
| 11174 | 11183 | #define SF_Values 0x0080 /* Synthesized from VALUES clause */ |
| 11175 | 11184 | #define SF_Materialize 0x0100 /* Force materialization of views */ |
| 11185 | +#define SF_NestedFrom 0x0200 /* Part of a parenthesized FROM clause */ | |
| 11176 | 11186 | |
| 11177 | 11187 | |
| 11178 | 11188 | /* |
| 11179 | 11189 | ** The results of a select can be distributed in several ways. The |
| 11180 | 11190 | ** "SRT" prefix means "SELECT Result Type". |
| @@ -11883,11 +11893,11 @@ | ||
| 11883 | 11893 | SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*, |
| 11884 | 11894 | Token*, int, int); |
| 11885 | 11895 | SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int); |
| 11886 | 11896 | SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*); |
| 11887 | 11897 | SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*, |
| 11888 | - Expr*,ExprList*,int,Expr*,Expr*); | |
| 11898 | + Expr*,ExprList*,u16,Expr*,Expr*); | |
| 11889 | 11899 | SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*); |
| 11890 | 11900 | SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*); |
| 11891 | 11901 | SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int); |
| 11892 | 11902 | SQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int); |
| 11893 | 11903 | #if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) |
| @@ -12140,10 +12150,11 @@ | ||
| 12140 | 12150 | SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *); |
| 12141 | 12151 | SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...); |
| 12142 | 12152 | SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*); |
| 12143 | 12153 | SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int); |
| 12144 | 12154 | SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*); |
| 12155 | +SQLITE_PRIVATE int sqlite3MatchSpanName(const char*, const char*, const char*, const char*); | |
| 12145 | 12156 | SQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*); |
| 12146 | 12157 | SQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*); |
| 12147 | 12158 | SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*); |
| 12148 | 12159 | SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int); |
| 12149 | 12160 | SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *); |
| @@ -12278,12 +12289,14 @@ | ||
| 12278 | 12289 | #define sqlite3FkOldmask(a,b) 0 |
| 12279 | 12290 | #define sqlite3FkRequired(a,b,c,d) 0 |
| 12280 | 12291 | #endif |
| 12281 | 12292 | #ifndef SQLITE_OMIT_FOREIGN_KEY |
| 12282 | 12293 | SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*); |
| 12294 | +SQLITE_PRIVATE int sqlite3FkLocateIndex(Parse*,Table*,FKey*,Index**,int**); | |
| 12283 | 12295 | #else |
| 12284 | 12296 | #define sqlite3FkDelete(a,b) |
| 12297 | + #define sqlite3FkLocateIndex(a,b,c,d,e) | |
| 12285 | 12298 | #endif |
| 12286 | 12299 | |
| 12287 | 12300 | |
| 12288 | 12301 | /* |
| 12289 | 12302 | ** Available fault injectors. Should be numbered beginning with 0. |
| @@ -23286,15 +23299,11 @@ | ||
| 23286 | 23299 | { "pwrite64", (sqlite3_syscall_ptr)0, 0 }, |
| 23287 | 23300 | #endif |
| 23288 | 23301 | #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\ |
| 23289 | 23302 | aSyscall[13].pCurrent) |
| 23290 | 23303 | |
| 23291 | -#if SQLITE_ENABLE_LOCKING_STYLE | |
| 23292 | 23304 | { "fchmod", (sqlite3_syscall_ptr)fchmod, 0 }, |
| 23293 | -#else | |
| 23294 | - { "fchmod", (sqlite3_syscall_ptr)0, 0 }, | |
| 23295 | -#endif | |
| 23296 | 23305 | #define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent) |
| 23297 | 23306 | |
| 23298 | 23307 | #if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE |
| 23299 | 23308 | { "fallocate", (sqlite3_syscall_ptr)posix_fallocate, 0 }, |
| 23300 | 23309 | #else |
| @@ -23315,13 +23324,10 @@ | ||
| 23315 | 23324 | #define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent) |
| 23316 | 23325 | |
| 23317 | 23326 | { "fchown", (sqlite3_syscall_ptr)posixFchown, 0 }, |
| 23318 | 23327 | #define osFchown ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent) |
| 23319 | 23328 | |
| 23320 | - { "umask", (sqlite3_syscall_ptr)umask, 0 }, | |
| 23321 | -#define osUmask ((mode_t(*)(mode_t))aSyscall[21].pCurrent) | |
| 23322 | - | |
| 23323 | 23329 | }; /* End of the overrideable system calls */ |
| 23324 | 23330 | |
| 23325 | 23331 | /* |
| 23326 | 23332 | ** This is the xSetSystemCall() method of sqlite3_vfs for all of the |
| 23327 | 23333 | ** "unix" VFSes. Return SQLITE_OK opon successfully updating the |
| @@ -23422,31 +23428,29 @@ | ||
| 23422 | 23428 | ** process that is able to write to the database will also be able to |
| 23423 | 23429 | ** recover the hot journals. |
| 23424 | 23430 | */ |
| 23425 | 23431 | static int robust_open(const char *z, int f, mode_t m){ |
| 23426 | 23432 | 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; | |
| 23435 | 23434 | do{ |
| 23436 | 23435 | #if defined(O_CLOEXEC) |
| 23437 | 23436 | fd = osOpen(z,f|O_CLOEXEC,m2); |
| 23438 | 23437 | #else |
| 23439 | 23438 | fd = osOpen(z,f,m2); |
| 23440 | 23439 | #endif |
| 23441 | 23440 | }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 | + } | |
| 23445 | 23448 | #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); | |
| 23447 | 23450 | #endif |
| 23451 | + } | |
| 23448 | 23452 | return fd; |
| 23449 | 23453 | } |
| 23450 | 23454 | |
| 23451 | 23455 | /* |
| 23452 | 23456 | ** Helper functions to obtain and relinquish the global mutex. The |
| @@ -29868,11 +29872,11 @@ | ||
| 29868 | 29872 | }; |
| 29869 | 29873 | unsigned int i; /* Loop counter */ |
| 29870 | 29874 | |
| 29871 | 29875 | /* Double-check that the aSyscall[] array has been constructed |
| 29872 | 29876 | ** correctly. See ticket [bb3a86e890c8e96ab] */ |
| 29873 | - assert( ArraySize(aSyscall)==22 ); | |
| 29877 | + assert( ArraySize(aSyscall)==21 ); | |
| 29874 | 29878 | |
| 29875 | 29879 | /* Register all VFSes defined in the aVfs[] array */ |
| 29876 | 29880 | for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){ |
| 29877 | 29881 | sqlite3_vfs_register(&aVfs[i], i==0); |
| 29878 | 29882 | } |
| @@ -56869,11 +56873,16 @@ | ||
| 56869 | 56873 | /* |
| 56870 | 56874 | ** Parameter zSrcData points to a buffer containing the data for |
| 56871 | 56875 | ** page iSrcPg from the source database. Copy this data into the |
| 56872 | 56876 | ** destination database. |
| 56873 | 56877 | */ |
| 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 | +){ | |
| 56875 | 56884 | Pager * const pDestPager = sqlite3BtreePager(p->pDest); |
| 56876 | 56885 | const int nSrcPgsz = sqlite3BtreeGetPageSize(p->pSrc); |
| 56877 | 56886 | int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest); |
| 56878 | 56887 | const int nCopy = MIN(nSrcPgsz, nDestPgsz); |
| 56879 | 56888 | const i64 iEnd = (i64)iSrcPg*(i64)nSrcPgsz; |
| @@ -56942,10 +56951,13 @@ | ||
| 56942 | 56951 | ** cached parse of the page). MemPage.isInit is marked |
| 56943 | 56952 | ** "MUST BE FIRST" for this purpose. |
| 56944 | 56953 | */ |
| 56945 | 56954 | memcpy(zOut, zIn, nCopy); |
| 56946 | 56955 | ((u8 *)sqlite3PagerGetExtra(pDestPg))[0] = 0; |
| 56956 | + if( iOff==0 && bUpdate==0 ){ | |
| 56957 | + sqlite3Put4byte(&zOut[28], sqlite3BtreeLastPage(p->pSrc)); | |
| 56958 | + } | |
| 56947 | 56959 | } |
| 56948 | 56960 | sqlite3PagerUnref(pDestPg); |
| 56949 | 56961 | } |
| 56950 | 56962 | |
| 56951 | 56963 | return rc; |
| @@ -57048,11 +57060,11 @@ | ||
| 57048 | 57060 | const Pgno iSrcPg = p->iNext; /* Source page number */ |
| 57049 | 57061 | if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){ |
| 57050 | 57062 | DbPage *pSrcPg; /* Source page object */ |
| 57051 | 57063 | rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg); |
| 57052 | 57064 | if( rc==SQLITE_OK ){ |
| 57053 | - rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg)); | |
| 57065 | + rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0); | |
| 57054 | 57066 | sqlite3PagerUnref(pSrcPg); |
| 57055 | 57067 | } |
| 57056 | 57068 | } |
| 57057 | 57069 | p->iNext++; |
| 57058 | 57070 | } |
| @@ -57296,11 +57308,11 @@ | ||
| 57296 | 57308 | ** the new data into the backup. |
| 57297 | 57309 | */ |
| 57298 | 57310 | int rc; |
| 57299 | 57311 | assert( p->pDestDb ); |
| 57300 | 57312 | sqlite3_mutex_enter(p->pDestDb->mutex); |
| 57301 | - rc = backupOnePage(p, iPage, aData); | |
| 57313 | + rc = backupOnePage(p, iPage, aData, 1); | |
| 57302 | 57314 | sqlite3_mutex_leave(p->pDestDb->mutex); |
| 57303 | 57315 | assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED ); |
| 57304 | 57316 | if( rc!=SQLITE_OK ){ |
| 57305 | 57317 | p->rc = rc; |
| 57306 | 57318 | } |
| @@ -71890,10 +71902,18 @@ | ||
| 71890 | 71902 | p->pReal = pReal; |
| 71891 | 71903 | if( p->iSize>0 ){ |
| 71892 | 71904 | assert(p->iSize<=p->nBuf); |
| 71893 | 71905 | rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0); |
| 71894 | 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 | + } | |
| 71895 | 71915 | } |
| 71896 | 71916 | } |
| 71897 | 71917 | return rc; |
| 71898 | 71918 | } |
| 71899 | 71919 | |
| @@ -72636,10 +72656,39 @@ | ||
| 72636 | 72656 | } |
| 72637 | 72657 | } |
| 72638 | 72658 | return 0; |
| 72639 | 72659 | } |
| 72640 | 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 | +} | |
| 72641 | 72690 | |
| 72642 | 72691 | /* |
| 72643 | 72692 | ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up |
| 72644 | 72693 | ** that name in the set of source tables in pSrcList and make the pExpr |
| 72645 | 72694 | ** expression node refer back to that source column. The following changes |
| @@ -72691,44 +72740,63 @@ | ||
| 72691 | 72740 | |
| 72692 | 72741 | /* Initialize the node to no-match */ |
| 72693 | 72742 | pExpr->iTable = -1; |
| 72694 | 72743 | pExpr->pTab = 0; |
| 72695 | 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 | + } | |
| 72696 | 72759 | |
| 72697 | 72760 | /* Start at the inner-most context and move outward until a match is found */ |
| 72698 | 72761 | while( pNC && cnt==0 ){ |
| 72699 | 72762 | ExprList *pEList; |
| 72700 | 72763 | SrcList *pSrcList = pNC->pSrcList; |
| 72701 | 72764 | |
| 72702 | 72765 | if( pSrcList ){ |
| 72703 | 72766 | for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){ |
| 72704 | 72767 | Table *pTab; |
| 72705 | - int iDb; | |
| 72706 | 72768 | Column *pCol; |
| 72707 | 72769 | |
| 72708 | 72770 | pTab = pItem->pTab; |
| 72709 | 72771 | assert( pTab!=0 && pTab->zName!=0 ); |
| 72710 | - iDb = sqlite3SchemaToIndex(db, pTab->pSchema); | |
| 72711 | 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 | + } | |
| 72712 | 72790 | 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; | |
| 72724 | 72795 | } |
| 72725 | 72796 | } |
| 72726 | 72797 | if( 0==(cntTab++) ){ |
| 72727 | - pExpr->iTable = pItem->iCursor; | |
| 72728 | - pExpr->pTab = pTab; | |
| 72729 | - pSchema = pTab->pSchema; | |
| 72730 | 72798 | pMatch = pItem; |
| 72731 | 72799 | } |
| 72732 | 72800 | for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){ |
| 72733 | 72801 | if( sqlite3StrICmp(pCol->zName, zCol)==0 ){ |
| 72734 | 72802 | /* If there has been exactly one prior match and this match |
| @@ -72738,21 +72806,23 @@ | ||
| 72738 | 72806 | if( cnt==1 ){ |
| 72739 | 72807 | if( pItem->jointype & JT_NATURAL ) continue; |
| 72740 | 72808 | if( nameInUsingClause(pItem->pUsing, zCol) ) continue; |
| 72741 | 72809 | } |
| 72742 | 72810 | cnt++; |
| 72743 | - pExpr->iTable = pItem->iCursor; | |
| 72744 | - pExpr->pTab = pTab; | |
| 72745 | 72811 | pMatch = pItem; |
| 72746 | - pSchema = pTab->pSchema; | |
| 72747 | 72812 | /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */ |
| 72748 | 72813 | pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j; |
| 72749 | 72814 | break; |
| 72750 | 72815 | } |
| 72751 | 72816 | } |
| 72752 | 72817 | } |
| 72753 | - } | |
| 72818 | + if( pMatch ){ | |
| 72819 | + pExpr->iTable = pMatch->iCursor; | |
| 72820 | + pExpr->pTab = pMatch->pTab; | |
| 72821 | + pSchema = pExpr->pTab->pSchema; | |
| 72822 | + } | |
| 72823 | + } /* if( pSrcList ) */ | |
| 72754 | 72824 | |
| 72755 | 72825 | #ifndef SQLITE_OMIT_TRIGGER |
| 72756 | 72826 | /* If we have not already resolved the name, then maybe |
| 72757 | 72827 | ** it is a new.* or old.* trigger argument reference |
| 72758 | 72828 | */ |
| @@ -73083,11 +73153,11 @@ | ||
| 73083 | 73153 | #endif |
| 73084 | 73154 | if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){ |
| 73085 | 73155 | sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId); |
| 73086 | 73156 | pNC->nErr++; |
| 73087 | 73157 | is_agg = 0; |
| 73088 | - }else if( no_such_func ){ | |
| 73158 | + }else if( no_such_func && pParse->db->init.busy==0 ){ | |
| 73089 | 73159 | sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId); |
| 73090 | 73160 | pNC->nErr++; |
| 73091 | 73161 | }else if( wrong_num_args ){ |
| 73092 | 73162 | sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()", |
| 73093 | 73163 | nId, zId); |
| @@ -73519,27 +73589,10 @@ | ||
| 73519 | 73589 | if( sqlite3ResolveExprNames(&sNC, p->pLimit) || |
| 73520 | 73590 | sqlite3ResolveExprNames(&sNC, p->pOffset) ){ |
| 73521 | 73591 | return WRC_Abort; |
| 73522 | 73592 | } |
| 73523 | 73593 | |
| 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 | 73594 | /* Recursively resolve names in all subqueries |
| 73542 | 73595 | */ |
| 73543 | 73596 | for(i=0; i<p->pSrc->nSrc; i++){ |
| 73544 | 73597 | struct SrcList_item *pItem = &p->pSrc->a[i]; |
| 73545 | 73598 | if( pItem->pSelect ){ |
| @@ -73562,10 +73615,27 @@ | ||
| 73562 | 73615 | for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef -= pNC->nRef; |
| 73563 | 73616 | assert( pItem->isCorrelated==0 && nRef<=0 ); |
| 73564 | 73617 | pItem->isCorrelated = (nRef!=0); |
| 73565 | 73618 | } |
| 73566 | 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 | + } | |
| 73567 | 73637 | |
| 73568 | 73638 | /* If there are no aggregate functions in the result-set, and no GROUP BY |
| 73569 | 73639 | ** expression, do not allow aggregates in any of the other expressions. |
| 73570 | 73640 | */ |
| 73571 | 73641 | assert( (p->selFlags & SF_Aggregate)==0 ); |
| @@ -77046,10 +77116,16 @@ | ||
| 77046 | 77116 | for(i=0; i<pList->nExpr; i++){ |
| 77047 | 77117 | sqlite3ExplainPrintf(pOut, "item[%d] = ", i); |
| 77048 | 77118 | sqlite3ExplainPush(pOut); |
| 77049 | 77119 | sqlite3ExplainExpr(pOut, pList->a[i].pExpr); |
| 77050 | 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 | + } | |
| 77051 | 77127 | if( i<pList->nExpr-1 ){ |
| 77052 | 77128 | sqlite3ExplainNL(pOut); |
| 77053 | 77129 | } |
| 77054 | 77130 | } |
| 77055 | 77131 | sqlite3ExplainPop(pOut); |
| @@ -87523,11 +87599,11 @@ | ||
| 87523 | 87599 | |
| 87524 | 87600 | /* |
| 87525 | 87601 | ** A foreign key constraint requires that the key columns in the parent |
| 87526 | 87602 | ** table are collectively subject to a UNIQUE or PRIMARY KEY constraint. |
| 87527 | 87603 | ** 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. | |
| 87529 | 87605 | ** |
| 87530 | 87606 | ** If successful, zero is returned. If the parent key is an INTEGER PRIMARY |
| 87531 | 87607 | ** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx |
| 87532 | 87608 | ** is set to point to the unique index. |
| 87533 | 87609 | ** |
| @@ -87559,11 +87635,11 @@ | ||
| 87559 | 87635 | ** |
| 87560 | 87636 | ** then non-zero is returned, and a "foreign key mismatch" error loaded |
| 87561 | 87637 | ** into pParse. If an OOM error occurs, non-zero is returned and the |
| 87562 | 87638 | ** pParse->db->mallocFailed flag is set. |
| 87563 | 87639 | */ |
| 87564 | -static int locateFkeyIndex( | |
| 87640 | +SQLITE_PRIVATE int sqlite3FkLocateIndex( | |
| 87565 | 87641 | Parse *pParse, /* Parse context to store any error in */ |
| 87566 | 87642 | Table *pParent, /* Parent table of FK constraint pFKey */ |
| 87567 | 87643 | FKey *pFKey, /* Foreign key to find index for */ |
| 87568 | 87644 | Index **ppIdx, /* OUT: Unique index on parent table */ |
| 87569 | 87645 | int **paiCol /* OUT: Map of index columns in pFKey */ |
| @@ -87656,11 +87732,13 @@ | ||
| 87656 | 87732 | } |
| 87657 | 87733 | } |
| 87658 | 87734 | |
| 87659 | 87735 | if( !pIdx ){ |
| 87660 | 87736 | 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); | |
| 87662 | 87740 | } |
| 87663 | 87741 | sqlite3DbFree(pParse->db, aiCol); |
| 87664 | 87742 | return 1; |
| 87665 | 87743 | } |
| 87666 | 87744 | |
| @@ -88117,11 +88195,11 @@ | ||
| 88117 | 88195 | if( pParse->disableTriggers ){ |
| 88118 | 88196 | pTo = sqlite3FindTable(db, pFKey->zTo, zDb); |
| 88119 | 88197 | }else{ |
| 88120 | 88198 | pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb); |
| 88121 | 88199 | } |
| 88122 | - if( !pTo || locateFkeyIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){ | |
| 88200 | + if( !pTo || sqlite3FkLocateIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){ | |
| 88123 | 88201 | assert( isIgnoreErrors==0 || (regOld!=0 && regNew==0) ); |
| 88124 | 88202 | if( !isIgnoreErrors || db->mallocFailed ) return; |
| 88125 | 88203 | if( pTo==0 ){ |
| 88126 | 88204 | /* If isIgnoreErrors is true, then a table is being dropped. In this |
| 88127 | 88205 | ** case SQLite runs a "DELETE FROM xxx" on the table being dropped |
| @@ -88197,11 +88275,11 @@ | ||
| 88197 | 88275 | /* Inserting a single row into a parent table cannot cause an immediate |
| 88198 | 88276 | ** foreign key violation. So do nothing in this case. */ |
| 88199 | 88277 | continue; |
| 88200 | 88278 | } |
| 88201 | 88279 | |
| 88202 | - if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){ | |
| 88280 | + if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){ | |
| 88203 | 88281 | if( !isIgnoreErrors || db->mallocFailed ) return; |
| 88204 | 88282 | continue; |
| 88205 | 88283 | } |
| 88206 | 88284 | assert( aiCol || pFKey->nCol==1 ); |
| 88207 | 88285 | |
| @@ -88252,11 +88330,11 @@ | ||
| 88252 | 88330 | for(p=pTab->pFKey; p; p=p->pNextFrom){ |
| 88253 | 88331 | for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom); |
| 88254 | 88332 | } |
| 88255 | 88333 | for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){ |
| 88256 | 88334 | Index *pIdx = 0; |
| 88257 | - locateFkeyIndex(pParse, pTab, p, &pIdx, 0); | |
| 88335 | + sqlite3FkLocateIndex(pParse, pTab, p, &pIdx, 0); | |
| 88258 | 88336 | if( pIdx ){ |
| 88259 | 88337 | for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]); |
| 88260 | 88338 | } |
| 88261 | 88339 | } |
| 88262 | 88340 | } |
| @@ -88378,11 +88456,11 @@ | ||
| 88378 | 88456 | ExprList *pList = 0; /* Changes list if ON UPDATE CASCADE */ |
| 88379 | 88457 | Select *pSelect = 0; /* If RESTRICT, "SELECT RAISE(...)" */ |
| 88380 | 88458 | int i; /* Iterator variable */ |
| 88381 | 88459 | Expr *pWhen = 0; /* WHEN clause for the trigger */ |
| 88382 | 88460 | |
| 88383 | - if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0; | |
| 88461 | + if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0; | |
| 88384 | 88462 | assert( aiCol || pFKey->nCol==1 ); |
| 88385 | 88463 | |
| 88386 | 88464 | for(i=0; i<pFKey->nCol; i++){ |
| 88387 | 88465 | Token tOld = { "old", 3 }; /* Literal "old" token */ |
| 88388 | 88466 | Token tNew = { "new", 3 }; /* Literal "new" token */ |
| @@ -92718,13 +92796,15 @@ | ||
| 92718 | 92796 | if( sqlite3StrICmp(zLeft, "table_info")==0 && zRight ){ |
| 92719 | 92797 | Table *pTab; |
| 92720 | 92798 | if( sqlite3ReadSchema(pParse) ) goto pragma_out; |
| 92721 | 92799 | pTab = sqlite3FindTable(db, zRight, zDb); |
| 92722 | 92800 | if( pTab ){ |
| 92723 | - int i; | |
| 92801 | + int i, k; | |
| 92724 | 92802 | int nHidden = 0; |
| 92725 | 92803 | Column *pCol; |
| 92804 | + Index *pPk; | |
| 92805 | + for(pPk=pTab->pIndex; pPk && pPk->autoIndex!=2; pPk=pPk->pNext){} | |
| 92726 | 92806 | sqlite3VdbeSetNumCols(v, 6); |
| 92727 | 92807 | pParse->nMem = 6; |
| 92728 | 92808 | sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cid", SQLITE_STATIC); |
| 92729 | 92809 | sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC); |
| 92730 | 92810 | sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "type", SQLITE_STATIC); |
| @@ -92745,12 +92825,18 @@ | ||
| 92745 | 92825 | if( pCol->zDflt ){ |
| 92746 | 92826 | sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0); |
| 92747 | 92827 | }else{ |
| 92748 | 92828 | sqlite3VdbeAddOp2(v, OP_Null, 0, 5); |
| 92749 | 92829 | } |
| 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); | |
| 92752 | 92838 | sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6); |
| 92753 | 92839 | } |
| 92754 | 92840 | } |
| 92755 | 92841 | }else |
| 92756 | 92842 | |
| @@ -92881,10 +92967,124 @@ | ||
| 92881 | 92967 | ++i; |
| 92882 | 92968 | pFK = pFK->pNextFrom; |
| 92883 | 92969 | } |
| 92884 | 92970 | } |
| 92885 | 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 | + } | |
| 92886 | 93086 | }else |
| 92887 | 93087 | #endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */ |
| 92888 | 93088 | |
| 92889 | 93089 | #ifndef NDEBUG |
| 92890 | 93090 | if( sqlite3StrICmp(zLeft, "parser_trace")==0 ){ |
| @@ -94340,11 +94540,11 @@ | ||
| 94340 | 94540 | SrcList *pSrc, /* the FROM clause -- which tables to scan */ |
| 94341 | 94541 | Expr *pWhere, /* the WHERE clause */ |
| 94342 | 94542 | ExprList *pGroupBy, /* the GROUP BY clause */ |
| 94343 | 94543 | Expr *pHaving, /* the HAVING clause */ |
| 94344 | 94544 | 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 */ | |
| 94346 | 94546 | Expr *pLimit, /* LIMIT value. NULL means not used */ |
| 94347 | 94547 | Expr *pOffset /* OFFSET value. NULL means no offset */ |
| 94348 | 94548 | ){ |
| 94349 | 94549 | Select *pNew; |
| 94350 | 94550 | Select standin; |
| @@ -94364,11 +94564,11 @@ | ||
| 94364 | 94564 | pNew->pSrc = pSrc; |
| 94365 | 94565 | pNew->pWhere = pWhere; |
| 94366 | 94566 | pNew->pGroupBy = pGroupBy; |
| 94367 | 94567 | pNew->pHaving = pHaving; |
| 94368 | 94568 | pNew->pOrderBy = pOrderBy; |
| 94369 | - pNew->selFlags = isDistinct ? SF_Distinct : 0; | |
| 94569 | + pNew->selFlags = selFlags; | |
| 94370 | 94570 | pNew->op = TK_SELECT; |
| 94371 | 94571 | pNew->pLimit = pLimit; |
| 94372 | 94572 | pNew->pOffset = pOffset; |
| 94373 | 94573 | assert( pOffset==0 || pLimit!=0 ); |
| 94374 | 94574 | pNew->addrOpenEphm[0] = -1; |
| @@ -95621,12 +95821,10 @@ | ||
| 95621 | 95821 | |
| 95622 | 95822 | for(i=0, pCol=aCol; i<nCol; i++, pCol++){ |
| 95623 | 95823 | /* Get an appropriate name for the column |
| 95624 | 95824 | */ |
| 95625 | 95825 | 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 | 95826 | if( (zName = pEList->a[i].zName)!=0 ){ |
| 95629 | 95827 | /* If the column contains an "AS <name>" phrase, use <name> as the name */ |
| 95630 | 95828 | zName = sqlite3DbStrDup(db, zName); |
| 95631 | 95829 | }else{ |
| 95632 | 95830 | Expr *pColExpr = p; /* The expression that is the result column name */ |
| @@ -95660,10 +95858,13 @@ | ||
| 95660 | 95858 | */ |
| 95661 | 95859 | nName = sqlite3Strlen30(zName); |
| 95662 | 95860 | for(j=cnt=0; j<i; j++){ |
| 95663 | 95861 | if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){ |
| 95664 | 95862 | char *zNewName; |
| 95863 | + int k; | |
| 95864 | + for(k=nName-1; k>1 && sqlite3Isdigit(zName[k]); k--){} | |
| 95865 | + if( zName[k]==':' ) nName = k; | |
| 95665 | 95866 | zName[nName] = 0; |
| 95666 | 95867 | zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt); |
| 95667 | 95868 | sqlite3DbFree(db, zName); |
| 95668 | 95869 | zName = zNewName; |
| 95669 | 95870 | j = -1; |
| @@ -97576,10 +97777,11 @@ | ||
| 97576 | 97777 | int i, j, k; |
| 97577 | 97778 | SrcList *pTabList; |
| 97578 | 97779 | ExprList *pEList; |
| 97579 | 97780 | struct SrcList_item *pFrom; |
| 97580 | 97781 | sqlite3 *db = pParse->db; |
| 97782 | + Expr *pE, *pRight, *pExpr; | |
| 97581 | 97783 | |
| 97582 | 97784 | if( db->mallocFailed ){ |
| 97583 | 97785 | return WRC_Abort; |
| 97584 | 97786 | } |
| 97585 | 97787 | if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){ |
| @@ -97661,11 +97863,11 @@ | ||
| 97661 | 97863 | ** |
| 97662 | 97864 | ** The first loop just checks to see if there are any "*" operators |
| 97663 | 97865 | ** that need expanding. |
| 97664 | 97866 | */ |
| 97665 | 97867 | for(k=0; k<pEList->nExpr; k++){ |
| 97666 | - Expr *pE = pEList->a[k].pExpr; | |
| 97868 | + pE = pEList->a[k].pExpr; | |
| 97667 | 97869 | if( pE->op==TK_ALL ) break; |
| 97668 | 97870 | assert( pE->op!=TK_DOT || pE->pRight!=0 ); |
| 97669 | 97871 | assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) ); |
| 97670 | 97872 | if( pE->op==TK_DOT && pE->pRight->op==TK_ALL ) break; |
| 97671 | 97873 | } |
| @@ -97679,14 +97881,22 @@ | ||
| 97679 | 97881 | ExprList *pNew = 0; |
| 97680 | 97882 | int flags = pParse->db->flags; |
| 97681 | 97883 | int longNames = (flags & SQLITE_FullColNames)!=0 |
| 97682 | 97884 | && (flags & SQLITE_ShortColNames)==0; |
| 97683 | 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 | + | |
| 97684 | 97893 | 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) ){ | |
| 97688 | 97898 | /* This particular expression does not need to be expanded. |
| 97689 | 97899 | */ |
| 97690 | 97900 | pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr); |
| 97691 | 97901 | if( pNew ){ |
| 97692 | 97902 | pNew->a[pNew->nExpr-1].zName = a[k].zName; |
| @@ -97697,44 +97907,56 @@ | ||
| 97697 | 97907 | a[k].pExpr = 0; |
| 97698 | 97908 | }else{ |
| 97699 | 97909 | /* This expression is a "*" or a "TABLE.*" and needs to be |
| 97700 | 97910 | ** expanded. */ |
| 97701 | 97911 | 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 */ | |
| 97703 | 97913 | if( pE->op==TK_DOT ){ |
| 97704 | 97914 | assert( pE->pLeft!=0 ); |
| 97705 | 97915 | assert( !ExprHasProperty(pE->pLeft, EP_IntValue) ); |
| 97706 | 97916 | zTName = pE->pLeft->u.zToken; |
| 97707 | - }else{ | |
| 97708 | - zTName = 0; | |
| 97709 | 97917 | } |
| 97710 | 97918 | for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){ |
| 97711 | 97919 | Table *pTab = pFrom->pTab; |
| 97920 | + Select *pSub = pFrom->pSelect; | |
| 97712 | 97921 | char *zTabName = pFrom->zAlias; |
| 97922 | + const char *zSchemaName = 0; | |
| 97923 | + int iDb; | |
| 97713 | 97924 | if( zTabName==0 ){ |
| 97714 | 97925 | zTabName = pTab->zName; |
| 97715 | 97926 | } |
| 97716 | 97927 | 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 : "*"; | |
| 97719 | 97935 | } |
| 97720 | - tableSeen = 1; | |
| 97721 | 97936 | for(j=0; j<pTab->nCol; j++){ |
| 97722 | - Expr *pExpr, *pRight; | |
| 97723 | 97937 | char *zName = pTab->aCol[j].zName; |
| 97724 | 97938 | char *zColname; /* The computed column name */ |
| 97725 | 97939 | char *zToFree; /* Malloced string that needs to be freed */ |
| 97726 | 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 | + } | |
| 97727 | 97948 | |
| 97728 | 97949 | /* If a column is marked as 'hidden' (currently only possible |
| 97729 | 97950 | ** for virtual tables), do not include it in the expanded |
| 97730 | 97951 | ** result-set list. |
| 97731 | 97952 | */ |
| 97732 | 97953 | if( IsHiddenColumn(&pTab->aCol[j]) ){ |
| 97733 | 97954 | assert(IsVirtual(pTab)); |
| 97734 | 97955 | continue; |
| 97735 | 97956 | } |
| 97957 | + tableSeen = 1; | |
| 97736 | 97958 | |
| 97737 | 97959 | if( i>0 && zTName==0 ){ |
| 97738 | 97960 | if( (pFrom->jointype & JT_NATURAL)!=0 |
| 97739 | 97961 | && tableAndColumnIndex(pTabList, i, zName, 0, 0) |
| 97740 | 97962 | ){ |
| @@ -97753,10 +97975,14 @@ | ||
| 97753 | 97975 | zToFree = 0; |
| 97754 | 97976 | if( longNames || pTabList->nSrc>1 ){ |
| 97755 | 97977 | Expr *pLeft; |
| 97756 | 97978 | pLeft = sqlite3Expr(db, TK_ID, zTabName); |
| 97757 | 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 | + } | |
| 97758 | 97984 | if( longNames ){ |
| 97759 | 97985 | zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName); |
| 97760 | 97986 | zToFree = zColname; |
| 97761 | 97987 | } |
| 97762 | 97988 | }else{ |
| @@ -97764,10 +97990,22 @@ | ||
| 97764 | 97990 | } |
| 97765 | 97991 | pNew = sqlite3ExprListAppend(pParse, pNew, pExpr); |
| 97766 | 97992 | sColname.z = zColname; |
| 97767 | 97993 | sColname.n = sqlite3Strlen30(zColname); |
| 97768 | 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 | + } | |
| 97769 | 98007 | sqlite3DbFree(db, zToFree); |
| 97770 | 98008 | } |
| 97771 | 98009 | } |
| 97772 | 98010 | if( !tableSeen ){ |
| 97773 | 98011 | if( zTName ){ |
| @@ -102869,11 +103107,11 @@ | ||
| 102869 | 103107 | sqlite3DbFree(db, pOld); |
| 102870 | 103108 | } |
| 102871 | 103109 | pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]); |
| 102872 | 103110 | } |
| 102873 | 103111 | pTerm = &pWC->a[idx = pWC->nTerm++]; |
| 102874 | - pTerm->pExpr = p; | |
| 103112 | + pTerm->pExpr = sqlite3ExprSkipCollate(p); | |
| 102875 | 103113 | pTerm->wtFlags = wtFlags; |
| 102876 | 103114 | pTerm->pWC = pWC; |
| 102877 | 103115 | pTerm->iParent = -1; |
| 102878 | 103116 | return idx; |
| 102879 | 103117 | } |
| @@ -103654,11 +103892,12 @@ | ||
| 103654 | 103892 | if( db->mallocFailed ){ |
| 103655 | 103893 | return; |
| 103656 | 103894 | } |
| 103657 | 103895 | pTerm = &pWC->a[idxTerm]; |
| 103658 | 103896 | pMaskSet = pWC->pMaskSet; |
| 103659 | - pExpr = sqlite3ExprSkipCollate(pTerm->pExpr); | |
| 103897 | + pExpr = pTerm->pExpr; | |
| 103898 | + assert( pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE ); | |
| 103660 | 103899 | prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft); |
| 103661 | 103900 | op = pExpr->op; |
| 103662 | 103901 | if( op==TK_IN ){ |
| 103663 | 103902 | assert( pExpr->pRight==0 ); |
| 103664 | 103903 | if( ExprHasProperty(pExpr, EP_xIsSelect) ){ |
| @@ -105767,11 +106006,11 @@ | ||
| 105767 | 106006 | int bRev = 2; |
| 105768 | 106007 | WHERETRACE((" --> before isSortingIndex: nPriorSat=%d\n",nPriorSat)); |
| 105769 | 106008 | pc.plan.nOBSat = isSortingIndex(p, pProbe, iCur, &bRev); |
| 105770 | 106009 | WHERETRACE((" --> after isSortingIndex: bRev=%d nOBSat=%d\n", |
| 105771 | 106010 | 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 ){ | |
| 105773 | 106012 | pc.plan.wsFlags |= WHERE_ORDERED; |
| 105774 | 106013 | } |
| 105775 | 106014 | if( nOrderBy==pc.plan.nOBSat ){ |
| 105776 | 106015 | bSort = 0; |
| 105777 | 106016 | pc.plan.wsFlags |= WHERE_ROWID_RANGE|WHERE_COLUMN_RANGE; |
| @@ -108237,10 +108476,11 @@ | ||
| 108237 | 108476 | Expr* yy122; |
| 108238 | 108477 | Select* yy159; |
| 108239 | 108478 | IdList* yy180; |
| 108240 | 108479 | struct {int value; int mask;} yy207; |
| 108241 | 108480 | u8 yy258; |
| 108481 | + u16 yy305; | |
| 108242 | 108482 | struct LikeOp yy318; |
| 108243 | 108483 | TriggerStep* yy327; |
| 108244 | 108484 | ExprSpan yy342; |
| 108245 | 108485 | SrcList* yy347; |
| 108246 | 108486 | int yy392; |
| @@ -110187,22 +110427,19 @@ | ||
| 110187 | 110427 | case 82: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==82); |
| 110188 | 110428 | case 84: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==84); |
| 110189 | 110429 | case 86: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==86); |
| 110190 | 110430 | case 98: /* defer_subclause_opt ::= */ yytestcase(yyruleno==98); |
| 110191 | 110431 | case 109: /* ifexists ::= */ yytestcase(yyruleno==109); |
| 110192 | - case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120); | |
| 110193 | - case 121: /* distinct ::= */ yytestcase(yyruleno==121); | |
| 110194 | 110432 | case 221: /* between_op ::= BETWEEN */ yytestcase(yyruleno==221); |
| 110195 | 110433 | case 224: /* in_op ::= IN */ yytestcase(yyruleno==224); |
| 110196 | 110434 | {yygotominor.yy392 = 0;} |
| 110197 | 110435 | break; |
| 110198 | 110436 | case 29: /* ifnotexists ::= IF NOT EXISTS */ |
| 110199 | 110437 | case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30); |
| 110200 | 110438 | case 70: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==70); |
| 110201 | 110439 | case 85: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==85); |
| 110202 | 110440 | case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108); |
| 110203 | - case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119); | |
| 110204 | 110441 | case 222: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==222); |
| 110205 | 110442 | case 225: /* in_op ::= NOT IN */ yytestcase(yyruleno==225); |
| 110206 | 110443 | {yygotominor.yy392 = 1;} |
| 110207 | 110444 | break; |
| 110208 | 110445 | case 32: /* create_table_args ::= LP columnlist conslist_opt RP */ |
| @@ -110438,12 +110675,19 @@ | ||
| 110438 | 110675 | case 116: /* multiselect_op ::= UNION ALL */ |
| 110439 | 110676 | {yygotominor.yy392 = TK_ALL;} |
| 110440 | 110677 | break; |
| 110441 | 110678 | case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ |
| 110442 | 110679 | { |
| 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); | |
| 110444 | 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;} | |
| 110445 | 110689 | break; |
| 110446 | 110690 | case 122: /* sclp ::= selcollist COMMA */ |
| 110447 | 110691 | case 246: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==246); |
| 110448 | 110692 | {yygotominor.yy442 = yymsp[-1].minor.yy442;} |
| 110449 | 110693 | break; |
| @@ -110509,14 +110753,24 @@ | ||
| 110509 | 110753 | break; |
| 110510 | 110754 | case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ |
| 110511 | 110755 | { |
| 110512 | 110756 | if( yymsp[-6].minor.yy347==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy122==0 && yymsp[0].minor.yy180==0 ){ |
| 110513 | 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); | |
| 110514 | 110768 | }else{ |
| 110515 | 110769 | Select *pSubquery; |
| 110516 | 110770 | 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); | |
| 110518 | 110772 | yygotominor.yy347 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy347,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy122,yymsp[0].minor.yy180); |
| 110519 | 110773 | } |
| 110520 | 110774 | } |
| 110521 | 110775 | break; |
| 110522 | 110776 | case 137: /* dbnm ::= */ |
| @@ -110745,11 +110999,11 @@ | ||
| 110745 | 110999 | if( yymsp[-1].minor.yy442 && yymsp[-1].minor.yy442->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){ |
| 110746 | 111000 | sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0); |
| 110747 | 111001 | } |
| 110748 | 111002 | yygotominor.yy342.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy442, &yymsp[-4].minor.yy0); |
| 110749 | 111003 | 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 ){ | |
| 110751 | 111005 | yygotominor.yy342.pExpr->flags |= EP_Distinct; |
| 110752 | 111006 | } |
| 110753 | 111007 | } |
| 110754 | 111008 | break; |
| 110755 | 111009 | case 197: /* expr ::= ID LP STAR RP */ |
| 110756 | 111010 |
| --- 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 @@ | ||
| 107 | 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | 109 | */ |
| 110 | 110 | #define SQLITE_VERSION "3.7.16" |
| 111 | 111 | #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" | |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | 117 | ** |
| 118 | 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 "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 @@ | ||
| 115 | 115 | @ </td></tr> |
| 116 | 116 | } |
| 117 | 117 | @ <tr><th>Duration Of Project:</th><td> |
| 118 | 118 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 119 | 119 | " + 0.99"); |
| 120 | - @ %d(n) days or approximately %.2f(n/356.24) years. | |
| 120 | + @ %d(n) days or approximately %.2f(n/365.24) years. | |
| 121 | 121 | @ </td></tr> |
| 122 | 122 | @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | 123 | @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> |
| 124 | 124 | @ <tr><th>Fossil Version:</th><td> |
| 125 | 125 | @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 126 | 126 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -115,11 +115,11 @@ | |
| 115 | @ </td></tr> |
| 116 | } |
| 117 | @ <tr><th>Duration Of 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 ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> |
| 124 | @ <tr><th>Fossil 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 Of 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 ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> |
| 124 | @ <tr><th>Fossil 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 @@ | ||
| 994 | 994 | }, |
| 995 | 995 | { "span.modpending", |
| 996 | 996 | "Moderation Pending message on timeline", |
| 997 | 997 | @ color: #b03800; |
| 998 | 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; | |
| 999 | 1010 | }, |
| 1000 | 1011 | { 0, |
| 1001 | 1012 | 0, |
| 1002 | 1013 | 0 |
| 1003 | 1014 | } |
| 1004 | 1015 |
| --- 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 @@ | ||
| 211 | 211 | if( tmFlags & TIMELINE_GRAPH ){ |
| 212 | 212 | pGraph = graph_init(); |
| 213 | 213 | /* style is not moved to css, because this is |
| 214 | 214 | ** a technical div for the timeline graph |
| 215 | 215 | */ |
| 216 | - @ <div id="canvas" style="position:relative;width:1px;height:1px;" | |
| 216 | + @ <div id="canvas" style="position:relative;height:0px;width:0px;" | |
| 217 | 217 | @ onclick="clickOnGraph(event)"></div> |
| 218 | 218 | } |
| 219 | 219 | db_static_prepare(&qbranch, |
| 220 | 220 | "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid", |
| 221 | 221 | TAG_BRANCH |
| 222 | 222 | ); |
| 223 | 223 | |
| 224 | - @ <table id="timelineTable" class="timelineTable"> | |
| 224 | + @ <table id="timelineTable" class="timelineTable" | |
| 225 | + @ onclick="clickOnGraph(event)"> | |
| 225 | 226 | blob_zero(&comment); |
| 226 | 227 | while( db_step(pQuery)==SQLITE_ROW ){ |
| 227 | 228 | int rid = db_column_int(pQuery, 0); |
| 228 | 229 | const char *zUuid = db_column_text(pQuery, 1); |
| 229 | 230 | int isLeaf = db_column_int(pQuery, 5); |
| @@ -727,42 +728,16 @@ | ||
| 727 | 728 | @ for(var i in rowinfo){ |
| 728 | 729 | @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY; |
| 729 | 730 | @ rowinfo[i].x = left + rowinfo[i].r*railPitch; |
| 730 | 731 | @ } |
| 731 | 732 | @ 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 | 733 | @ for(var i in rowinfo){ |
| 755 | 734 | @ drawNode(rowinfo[i], left, btm); |
| 756 | 735 | @ } |
| 757 | 736 | @ if( selRow!=null ) clickOnRow(selRow); |
| 758 | 737 | @ } |
| 759 | 738 | @ 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 | 739 | @ var x=event.clientX-absoluteX("canvas"); |
| 765 | 740 | @ var y=event.clientY-absoluteY("canvas"); |
| 766 | 741 | @ if(window.pageXOffset!=null){ |
| 767 | 742 | @ x += window.pageXOffset; |
| 768 | 743 | @ y += window.pageYOffset; |
| @@ -770,16 +745,18 @@ | ||
| 770 | 745 | @ var d = window.document.documentElement; |
| 771 | 746 | @ if(document.compatMode!="CSS1Compat") d = d.body; |
| 772 | 747 | @ x += d.scrollLeft; |
| 773 | 748 | @ y += d.scrollTop; |
| 774 | 749 | @ } |
| 775 | -#endif | |
| 750 | + if( P("clicktest")!=0 ){ | |
| 751 | + @ alert("click at "+x+","+y) | |
| 752 | + } | |
| 776 | 753 | @ for(var i in rowinfo){ |
| 777 | 754 | @ 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 ){ | |
| 781 | 758 | @ clickOnRow(p); |
| 782 | 759 | @ break; |
| 783 | 760 | @ } |
| 784 | 761 | @ } |
| 785 | 762 | @ } |
| 786 | 763 | |
| 787 | 764 | 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 @@ | ||
| 715 | 715 | int vid; |
| 716 | 716 | vid = db_lget_int("checkout", 0); |
| 717 | 717 | vfile_check_signature(vid, 0); |
| 718 | 718 | db_multi_exec( |
| 719 | 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;" | |
| 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;" | |
| 724 | 728 | ); |
| 725 | 729 | } |
| 726 | 730 | blob_zero(&record); |
| 727 | 731 | db_prepare(&q, "SELECT name FROM torevert"); |
| 728 | 732 | if( zRevision==0 ){ |
| @@ -736,11 +740,12 @@ | ||
| 736 | 740 | zFile = db_column_text(&q, 0); |
| 737 | 741 | zFull = mprintf("%/%/", g.zLocalRoot, zFile); |
| 738 | 742 | errCode = historical_version_of_file(zRevision, zFile, &record, |
| 739 | 743 | &isLink, &isExe, 0, 2); |
| 740 | 744 | 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 ){ | |
| 742 | 747 | fossil_print("UNMANAGE: %s\n", zFile); |
| 743 | 748 | }else{ |
| 744 | 749 | undo_save(zFile); |
| 745 | 750 | file_delete(zFull); |
| 746 | 751 | fossil_print("DELETE: %s\n", zFile); |
| 747 | 752 |
| --- 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 @@ | ||
| 667 | 667 | if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){ |
| 668 | 668 | blob_init(&w2, pW2->zWiki, -1); |
| 669 | 669 | } |
| 670 | 670 | blob_zero(&d); |
| 671 | 671 | 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); | |
| 673 | 673 | @ <div class="udiff"> |
| 674 | 674 | @ %s(blob_str(&d)) |
| 675 | 675 | @ </div> |
| 676 | 676 | manifest_destroy(pW1); |
| 677 | 677 | manifest_destroy(pW2); |
| 678 | 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, 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 @@ | ||
| 26 | 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | 28 | |
| 29 | 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 | 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 | |
| 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 | 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 | |
| 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 | 34 | |
| 35 | 35 | |
| 36 | 36 | RC=$(DMDIR)\bin\rcc |
| 37 | 37 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 38 | 38 | |
| @@ -46,11 +46,11 @@ | ||
| 46 | 46 | |
| 47 | 47 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 48 | 48 | $(RC) $(RCFLAGS) -o$@ $** |
| 49 | 49 | |
| 50 | 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 > $@ | |
| 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 | 52 | +echo fossil >> $@ |
| 53 | 53 | +echo fossil >> $@ |
| 54 | 54 | +echo $(LIBS) >> $@ |
| 55 | 55 | +echo. >> $@ |
| 56 | 56 | +echo fossil >> $@ |
| @@ -523,10 +523,16 @@ | ||
| 523 | 523 | $(OBJDIR)\rebuild$O : rebuild_.c rebuild.h |
| 524 | 524 | $(TCC) -o$@ -c rebuild_.c |
| 525 | 525 | |
| 526 | 526 | rebuild_.c : $(SRCDIR)\rebuild.c |
| 527 | 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 $** > $@ | |
| 528 | 534 | |
| 529 | 535 | $(OBJDIR)\report$O : report_.c report.h |
| 530 | 536 | $(TCC) -o$@ -c report_.c |
| 531 | 537 | |
| 532 | 538 | report_.c : $(SRCDIR)\report.c |
| @@ -643,10 +649,16 @@ | ||
| 643 | 649 | $(OBJDIR)\undo$O : undo_.c undo.h |
| 644 | 650 | $(TCC) -o$@ -c undo_.c |
| 645 | 651 | |
| 646 | 652 | undo_.c : $(SRCDIR)\undo.c |
| 647 | 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 $** > $@ | |
| 648 | 660 | |
| 649 | 661 | $(OBJDIR)\update$O : update_.c update.h |
| 650 | 662 | $(TCC) -o$@ -c update_.c |
| 651 | 663 | |
| 652 | 664 | update_.c : $(SRCDIR)\update.c |
| @@ -723,7 +735,7 @@ | ||
| 723 | 735 | |
| 724 | 736 | zip_.c : $(SRCDIR)\zip.c |
| 725 | 737 | +translate$E $** > $@ |
| 726 | 738 | |
| 727 | 739 | 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 | |
| 729 | 741 | @copy /Y nul: headers |
| 730 | 742 |
| --- 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 |
+24
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -322,10 +322,11 @@ | ||
| 322 | 322 | $(SRCDIR)/pivot.c \ |
| 323 | 323 | $(SRCDIR)/popen.c \ |
| 324 | 324 | $(SRCDIR)/pqueue.c \ |
| 325 | 325 | $(SRCDIR)/printf.c \ |
| 326 | 326 | $(SRCDIR)/rebuild.c \ |
| 327 | + $(SRCDIR)/regexp.c \ | |
| 327 | 328 | $(SRCDIR)/report.c \ |
| 328 | 329 | $(SRCDIR)/rss.c \ |
| 329 | 330 | $(SRCDIR)/schema.c \ |
| 330 | 331 | $(SRCDIR)/search.c \ |
| 331 | 332 | $(SRCDIR)/setup.c \ |
| @@ -342,10 +343,11 @@ | ||
| 342 | 343 | $(SRCDIR)/th_main.c \ |
| 343 | 344 | $(SRCDIR)/timeline.c \ |
| 344 | 345 | $(SRCDIR)/tkt.c \ |
| 345 | 346 | $(SRCDIR)/tktsetup.c \ |
| 346 | 347 | $(SRCDIR)/undo.c \ |
| 348 | + $(SRCDIR)/unicode.c \ | |
| 347 | 349 | $(SRCDIR)/update.c \ |
| 348 | 350 | $(SRCDIR)/url.c \ |
| 349 | 351 | $(SRCDIR)/user.c \ |
| 350 | 352 | $(SRCDIR)/utf8.c \ |
| 351 | 353 | $(SRCDIR)/verify.c \ |
| @@ -426,10 +428,11 @@ | ||
| 426 | 428 | $(OBJDIR)/pivot_.c \ |
| 427 | 429 | $(OBJDIR)/popen_.c \ |
| 428 | 430 | $(OBJDIR)/pqueue_.c \ |
| 429 | 431 | $(OBJDIR)/printf_.c \ |
| 430 | 432 | $(OBJDIR)/rebuild_.c \ |
| 433 | + $(OBJDIR)/regexp_.c \ | |
| 431 | 434 | $(OBJDIR)/report_.c \ |
| 432 | 435 | $(OBJDIR)/rss_.c \ |
| 433 | 436 | $(OBJDIR)/schema_.c \ |
| 434 | 437 | $(OBJDIR)/search_.c \ |
| 435 | 438 | $(OBJDIR)/setup_.c \ |
| @@ -446,10 +449,11 @@ | ||
| 446 | 449 | $(OBJDIR)/th_main_.c \ |
| 447 | 450 | $(OBJDIR)/timeline_.c \ |
| 448 | 451 | $(OBJDIR)/tkt_.c \ |
| 449 | 452 | $(OBJDIR)/tktsetup_.c \ |
| 450 | 453 | $(OBJDIR)/undo_.c \ |
| 454 | + $(OBJDIR)/unicode_.c \ | |
| 451 | 455 | $(OBJDIR)/update_.c \ |
| 452 | 456 | $(OBJDIR)/url_.c \ |
| 453 | 457 | $(OBJDIR)/user_.c \ |
| 454 | 458 | $(OBJDIR)/utf8_.c \ |
| 455 | 459 | $(OBJDIR)/verify_.c \ |
| @@ -530,10 +534,11 @@ | ||
| 530 | 534 | $(OBJDIR)/pivot.o \ |
| 531 | 535 | $(OBJDIR)/popen.o \ |
| 532 | 536 | $(OBJDIR)/pqueue.o \ |
| 533 | 537 | $(OBJDIR)/printf.o \ |
| 534 | 538 | $(OBJDIR)/rebuild.o \ |
| 539 | + $(OBJDIR)/regexp.o \ | |
| 535 | 540 | $(OBJDIR)/report.o \ |
| 536 | 541 | $(OBJDIR)/rss.o \ |
| 537 | 542 | $(OBJDIR)/schema.o \ |
| 538 | 543 | $(OBJDIR)/search.o \ |
| 539 | 544 | $(OBJDIR)/setup.o \ |
| @@ -550,10 +555,11 @@ | ||
| 550 | 555 | $(OBJDIR)/th_main.o \ |
| 551 | 556 | $(OBJDIR)/timeline.o \ |
| 552 | 557 | $(OBJDIR)/tkt.o \ |
| 553 | 558 | $(OBJDIR)/tktsetup.o \ |
| 554 | 559 | $(OBJDIR)/undo.o \ |
| 560 | + $(OBJDIR)/unicode.o \ | |
| 555 | 561 | $(OBJDIR)/update.o \ |
| 556 | 562 | $(OBJDIR)/url.o \ |
| 557 | 563 | $(OBJDIR)/user.o \ |
| 558 | 564 | $(OBJDIR)/utf8.o \ |
| 559 | 565 | $(OBJDIR)/verify.o \ |
| @@ -747,10 +753,11 @@ | ||
| 747 | 753 | $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ |
| 748 | 754 | $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ |
| 749 | 755 | $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ |
| 750 | 756 | $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ |
| 751 | 757 | $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ |
| 758 | + $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \ | |
| 752 | 759 | $(OBJDIR)/report_.c:$(OBJDIR)/report.h \ |
| 753 | 760 | $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \ |
| 754 | 761 | $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \ |
| 755 | 762 | $(OBJDIR)/search_.c:$(OBJDIR)/search.h \ |
| 756 | 763 | $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \ |
| @@ -767,10 +774,11 @@ | ||
| 767 | 774 | $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \ |
| 768 | 775 | $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \ |
| 769 | 776 | $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \ |
| 770 | 777 | $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \ |
| 771 | 778 | $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \ |
| 779 | + $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h \ | |
| 772 | 780 | $(OBJDIR)/update_.c:$(OBJDIR)/update.h \ |
| 773 | 781 | $(OBJDIR)/url_.c:$(OBJDIR)/url.h \ |
| 774 | 782 | $(OBJDIR)/user_.c:$(OBJDIR)/user.h \ |
| 775 | 783 | $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \ |
| 776 | 784 | $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \ |
| @@ -1340,10 +1348,18 @@ | ||
| 1340 | 1348 | |
| 1341 | 1349 | $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h |
| 1342 | 1350 | $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c |
| 1343 | 1351 | |
| 1344 | 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 | |
| 1345 | 1361 | |
| 1346 | 1362 | $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate |
| 1347 | 1363 | $(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c |
| 1348 | 1364 | |
| 1349 | 1365 | $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h |
| @@ -1500,10 +1516,18 @@ | ||
| 1500 | 1516 | |
| 1501 | 1517 | $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h |
| 1502 | 1518 | $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c |
| 1503 | 1519 | |
| 1504 | 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 | |
| 1505 | 1529 | |
| 1506 | 1530 | $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate |
| 1507 | 1531 | $(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c |
| 1508 | 1532 | |
| 1509 | 1533 | $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h |
| 1510 | 1534 |
| --- 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 @@ | ||
| 322 | 322 | $(SRCDIR)/pivot.c \ |
| 323 | 323 | $(SRCDIR)/popen.c \ |
| 324 | 324 | $(SRCDIR)/pqueue.c \ |
| 325 | 325 | $(SRCDIR)/printf.c \ |
| 326 | 326 | $(SRCDIR)/rebuild.c \ |
| 327 | + $(SRCDIR)/regexp.c \ | |
| 327 | 328 | $(SRCDIR)/report.c \ |
| 328 | 329 | $(SRCDIR)/rss.c \ |
| 329 | 330 | $(SRCDIR)/schema.c \ |
| 330 | 331 | $(SRCDIR)/search.c \ |
| 331 | 332 | $(SRCDIR)/setup.c \ |
| @@ -342,10 +343,11 @@ | ||
| 342 | 343 | $(SRCDIR)/th_main.c \ |
| 343 | 344 | $(SRCDIR)/timeline.c \ |
| 344 | 345 | $(SRCDIR)/tkt.c \ |
| 345 | 346 | $(SRCDIR)/tktsetup.c \ |
| 346 | 347 | $(SRCDIR)/undo.c \ |
| 348 | + $(SRCDIR)/unicode.c \ | |
| 347 | 349 | $(SRCDIR)/update.c \ |
| 348 | 350 | $(SRCDIR)/url.c \ |
| 349 | 351 | $(SRCDIR)/user.c \ |
| 350 | 352 | $(SRCDIR)/utf8.c \ |
| 351 | 353 | $(SRCDIR)/verify.c \ |
| @@ -426,10 +428,11 @@ | ||
| 426 | 428 | $(OBJDIR)/pivot_.c \ |
| 427 | 429 | $(OBJDIR)/popen_.c \ |
| 428 | 430 | $(OBJDIR)/pqueue_.c \ |
| 429 | 431 | $(OBJDIR)/printf_.c \ |
| 430 | 432 | $(OBJDIR)/rebuild_.c \ |
| 433 | + $(OBJDIR)/regexp_.c \ | |
| 431 | 434 | $(OBJDIR)/report_.c \ |
| 432 | 435 | $(OBJDIR)/rss_.c \ |
| 433 | 436 | $(OBJDIR)/schema_.c \ |
| 434 | 437 | $(OBJDIR)/search_.c \ |
| 435 | 438 | $(OBJDIR)/setup_.c \ |
| @@ -446,10 +449,11 @@ | ||
| 446 | 449 | $(OBJDIR)/th_main_.c \ |
| 447 | 450 | $(OBJDIR)/timeline_.c \ |
| 448 | 451 | $(OBJDIR)/tkt_.c \ |
| 449 | 452 | $(OBJDIR)/tktsetup_.c \ |
| 450 | 453 | $(OBJDIR)/undo_.c \ |
| 454 | + $(OBJDIR)/unicode_.c \ | |
| 451 | 455 | $(OBJDIR)/update_.c \ |
| 452 | 456 | $(OBJDIR)/url_.c \ |
| 453 | 457 | $(OBJDIR)/user_.c \ |
| 454 | 458 | $(OBJDIR)/utf8_.c \ |
| 455 | 459 | $(OBJDIR)/verify_.c \ |
| @@ -530,10 +534,11 @@ | ||
| 530 | 534 | $(OBJDIR)/pivot.o \ |
| 531 | 535 | $(OBJDIR)/popen.o \ |
| 532 | 536 | $(OBJDIR)/pqueue.o \ |
| 533 | 537 | $(OBJDIR)/printf.o \ |
| 534 | 538 | $(OBJDIR)/rebuild.o \ |
| 539 | + $(OBJDIR)/regexp.o \ | |
| 535 | 540 | $(OBJDIR)/report.o \ |
| 536 | 541 | $(OBJDIR)/rss.o \ |
| 537 | 542 | $(OBJDIR)/schema.o \ |
| 538 | 543 | $(OBJDIR)/search.o \ |
| 539 | 544 | $(OBJDIR)/setup.o \ |
| @@ -550,10 +555,11 @@ | ||
| 550 | 555 | $(OBJDIR)/th_main.o \ |
| 551 | 556 | $(OBJDIR)/timeline.o \ |
| 552 | 557 | $(OBJDIR)/tkt.o \ |
| 553 | 558 | $(OBJDIR)/tktsetup.o \ |
| 554 | 559 | $(OBJDIR)/undo.o \ |
| 560 | + $(OBJDIR)/unicode.o \ | |
| 555 | 561 | $(OBJDIR)/update.o \ |
| 556 | 562 | $(OBJDIR)/url.o \ |
| 557 | 563 | $(OBJDIR)/user.o \ |
| 558 | 564 | $(OBJDIR)/utf8.o \ |
| 559 | 565 | $(OBJDIR)/verify.o \ |
| @@ -747,10 +753,11 @@ | ||
| 747 | 753 | $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ |
| 748 | 754 | $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ |
| 749 | 755 | $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ |
| 750 | 756 | $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ |
| 751 | 757 | $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ |
| 758 | + $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h \ | |
| 752 | 759 | $(OBJDIR)/report_.c:$(OBJDIR)/report.h \ |
| 753 | 760 | $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h \ |
| 754 | 761 | $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h \ |
| 755 | 762 | $(OBJDIR)/search_.c:$(OBJDIR)/search.h \ |
| 756 | 763 | $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h \ |
| @@ -767,10 +774,11 @@ | ||
| 767 | 774 | $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \ |
| 768 | 775 | $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h \ |
| 769 | 776 | $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h \ |
| 770 | 777 | $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h \ |
| 771 | 778 | $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h \ |
| 779 | + $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h \ | |
| 772 | 780 | $(OBJDIR)/update_.c:$(OBJDIR)/update.h \ |
| 773 | 781 | $(OBJDIR)/url_.c:$(OBJDIR)/url.h \ |
| 774 | 782 | $(OBJDIR)/user_.c:$(OBJDIR)/user.h \ |
| 775 | 783 | $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h \ |
| 776 | 784 | $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h \ |
| @@ -1340,10 +1348,18 @@ | ||
| 1340 | 1348 | |
| 1341 | 1349 | $(OBJDIR)/rebuild.o: $(OBJDIR)/rebuild_.c $(OBJDIR)/rebuild.h $(SRCDIR)/config.h |
| 1342 | 1350 | $(XTCC) -o $(OBJDIR)/rebuild.o -c $(OBJDIR)/rebuild_.c |
| 1343 | 1351 | |
| 1344 | 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 | |
| 1345 | 1361 | |
| 1346 | 1362 | $(OBJDIR)/report_.c: $(SRCDIR)/report.c $(OBJDIR)/translate |
| 1347 | 1363 | $(TRANSLATE) $(SRCDIR)/report.c >$(OBJDIR)/report_.c |
| 1348 | 1364 | |
| 1349 | 1365 | $(OBJDIR)/report.o: $(OBJDIR)/report_.c $(OBJDIR)/report.h $(SRCDIR)/config.h |
| @@ -1500,10 +1516,18 @@ | ||
| 1500 | 1516 | |
| 1501 | 1517 | $(OBJDIR)/undo.o: $(OBJDIR)/undo_.c $(OBJDIR)/undo.h $(SRCDIR)/config.h |
| 1502 | 1518 | $(XTCC) -o $(OBJDIR)/undo.o -c $(OBJDIR)/undo_.c |
| 1503 | 1519 | |
| 1504 | 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 | |
| 1505 | 1529 | |
| 1506 | 1530 | $(OBJDIR)/update_.c: $(SRCDIR)/update.c $(OBJDIR)/translate |
| 1507 | 1531 | $(TRANSLATE) $(SRCDIR)/update.c >$(OBJDIR)/update_.c |
| 1508 | 1532 | |
| 1509 | 1533 | $(OBJDIR)/update.o: $(OBJDIR)/update_.c $(OBJDIR)/update.h $(SRCDIR)/config.h |
| 1510 | 1534 |
| --- 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 |
+20
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -107,10 +107,11 @@ | ||
| 107 | 107 | pivot_.c \ |
| 108 | 108 | popen_.c \ |
| 109 | 109 | pqueue_.c \ |
| 110 | 110 | printf_.c \ |
| 111 | 111 | rebuild_.c \ |
| 112 | + regexp_.c \ | |
| 112 | 113 | report_.c \ |
| 113 | 114 | rss_.c \ |
| 114 | 115 | schema_.c \ |
| 115 | 116 | search_.c \ |
| 116 | 117 | setup_.c \ |
| @@ -127,10 +128,11 @@ | ||
| 127 | 128 | th_main_.c \ |
| 128 | 129 | timeline_.c \ |
| 129 | 130 | tkt_.c \ |
| 130 | 131 | tktsetup_.c \ |
| 131 | 132 | undo_.c \ |
| 133 | + unicode_.c \ | |
| 132 | 134 | update_.c \ |
| 133 | 135 | url_.c \ |
| 134 | 136 | user_.c \ |
| 135 | 137 | utf8_.c \ |
| 136 | 138 | verify_.c \ |
| @@ -210,10 +212,11 @@ | ||
| 210 | 212 | $(OX)\pivot$O \ |
| 211 | 213 | $(OX)\popen$O \ |
| 212 | 214 | $(OX)\pqueue$O \ |
| 213 | 215 | $(OX)\printf$O \ |
| 214 | 216 | $(OX)\rebuild$O \ |
| 217 | + $(OX)\regexp$O \ | |
| 215 | 218 | $(OX)\report$O \ |
| 216 | 219 | $(OX)\rss$O \ |
| 217 | 220 | $(OX)\schema$O \ |
| 218 | 221 | $(OX)\search$O \ |
| 219 | 222 | $(OX)\setup$O \ |
| @@ -230,10 +233,11 @@ | ||
| 230 | 233 | $(OX)\th_main$O \ |
| 231 | 234 | $(OX)\timeline$O \ |
| 232 | 235 | $(OX)\tkt$O \ |
| 233 | 236 | $(OX)\tktsetup$O \ |
| 234 | 237 | $(OX)\undo$O \ |
| 238 | + $(OX)\unicode$O \ | |
| 235 | 239 | $(OX)\update$O \ |
| 236 | 240 | $(OX)\url$O \ |
| 237 | 241 | $(OX)\user$O \ |
| 238 | 242 | $(OX)\utf8$O \ |
| 239 | 243 | $(OX)\verify$O \ |
| @@ -330,10 +334,11 @@ | ||
| 330 | 334 | echo $(OX)\pivot.obj >> $@ |
| 331 | 335 | echo $(OX)\popen.obj >> $@ |
| 332 | 336 | echo $(OX)\pqueue.obj >> $@ |
| 333 | 337 | echo $(OX)\printf.obj >> $@ |
| 334 | 338 | echo $(OX)\rebuild.obj >> $@ |
| 339 | + echo $(OX)\regexp.obj >> $@ | |
| 335 | 340 | echo $(OX)\report.obj >> $@ |
| 336 | 341 | echo $(OX)\rss.obj >> $@ |
| 337 | 342 | echo $(OX)\schema.obj >> $@ |
| 338 | 343 | echo $(OX)\search.obj >> $@ |
| 339 | 344 | echo $(OX)\setup.obj >> $@ |
| @@ -354,10 +359,11 @@ | ||
| 354 | 359 | echo $(OX)\th_main.obj >> $@ |
| 355 | 360 | echo $(OX)\timeline.obj >> $@ |
| 356 | 361 | echo $(OX)\tkt.obj >> $@ |
| 357 | 362 | echo $(OX)\tktsetup.obj >> $@ |
| 358 | 363 | echo $(OX)\undo.obj >> $@ |
| 364 | + echo $(OX)\unicode.obj >> $@ | |
| 359 | 365 | echo $(OX)\update.obj >> $@ |
| 360 | 366 | echo $(OX)\url.obj >> $@ |
| 361 | 367 | echo $(OX)\user.obj >> $@ |
| 362 | 368 | echo $(OX)\utf8.obj >> $@ |
| 363 | 369 | echo $(OX)\verify.obj >> $@ |
| @@ -853,10 +859,16 @@ | ||
| 853 | 859 | $(OX)\rebuild$O : rebuild_.c rebuild.h |
| 854 | 860 | $(TCC) /Fo$@ -c rebuild_.c |
| 855 | 861 | |
| 856 | 862 | rebuild_.c : $(SRCDIR)\rebuild.c |
| 857 | 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 $** > $@ | |
| 858 | 870 | |
| 859 | 871 | $(OX)\report$O : report_.c report.h |
| 860 | 872 | $(TCC) /Fo$@ -c report_.c |
| 861 | 873 | |
| 862 | 874 | report_.c : $(SRCDIR)\report.c |
| @@ -973,10 +985,16 @@ | ||
| 973 | 985 | $(OX)\undo$O : undo_.c undo.h |
| 974 | 986 | $(TCC) /Fo$@ -c undo_.c |
| 975 | 987 | |
| 976 | 988 | undo_.c : $(SRCDIR)\undo.c |
| 977 | 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 $** > $@ | |
| 978 | 996 | |
| 979 | 997 | $(OX)\update$O : update_.c update.h |
| 980 | 998 | $(TCC) /Fo$@ -c update_.c |
| 981 | 999 | |
| 982 | 1000 | update_.c : $(SRCDIR)\update.c |
| @@ -1122,10 +1140,11 @@ | ||
| 1122 | 1140 | pivot_.c:pivot.h \ |
| 1123 | 1141 | popen_.c:popen.h \ |
| 1124 | 1142 | pqueue_.c:pqueue.h \ |
| 1125 | 1143 | printf_.c:printf.h \ |
| 1126 | 1144 | rebuild_.c:rebuild.h \ |
| 1145 | + regexp_.c:regexp.h \ | |
| 1127 | 1146 | report_.c:report.h \ |
| 1128 | 1147 | rss_.c:rss.h \ |
| 1129 | 1148 | schema_.c:schema.h \ |
| 1130 | 1149 | search_.c:search.h \ |
| 1131 | 1150 | setup_.c:setup.h \ |
| @@ -1142,10 +1161,11 @@ | ||
| 1142 | 1161 | th_main_.c:th_main.h \ |
| 1143 | 1162 | timeline_.c:timeline.h \ |
| 1144 | 1163 | tkt_.c:tkt.h \ |
| 1145 | 1164 | tktsetup_.c:tktsetup.h \ |
| 1146 | 1165 | undo_.c:undo.h \ |
| 1166 | + unicode_.c:unicode.h \ | |
| 1147 | 1167 | update_.c:update.h \ |
| 1148 | 1168 | url_.c:url.h \ |
| 1149 | 1169 | user_.c:user.h \ |
| 1150 | 1170 | utf8_.c:utf8.h \ |
| 1151 | 1171 | verify_.c:verify.h \ |
| 1152 | 1172 |
| --- 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 |
+3
-4
| --- www/checkin_names.wiki | ||
| +++ www/checkin_names.wiki | ||
| @@ -14,12 +14,11 @@ | ||
| 14 | 14 | <li> Special names: |
| 15 | 15 | <ul> |
| 16 | 16 | <li> <b>tip</b> |
| 17 | 17 | <li> <b>current</b> |
| 18 | 18 | <li> <b>next</b> |
| 19 | -<li> <b>previous</b> | |
| 20 | -<li> <b>ckout</b> | |
| 19 | +<li> <b>previous</b> or <b>prev</b> | |
| 21 | 20 | </ul> |
| 22 | 21 | </ul> |
| 23 | 22 | </td></tr> |
| 24 | 23 | </table> |
| 25 | 24 | Many Fossil [/help|commands] and [./webui.wiki | web-interface] URLs accept |
| @@ -194,12 +193,12 @@ | ||
| 194 | 193 | equivalent to the timestamp tag "5000-01-01". |
| 195 | 194 | |
| 196 | 195 | If the command is being run from a working check-out (not against a bare |
| 197 | 196 | repository) then a few extra tags apply. The "current" tag means the |
| 198 | 197 | 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. | |
| 201 | 200 | |
| 202 | 201 | <h2>Additional Examples</h2> |
| 203 | 202 | |
| 204 | 203 | To view the changes in the most recent check-in prior to the version currently |
| 205 | 204 | checked out: |
| 206 | 205 | |
| 207 | 206 | 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 |
+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 "commit" | |
| 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 "commit" | |
| 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 "commit" |
| 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 "commit" |
| 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 |
+2
| --- www/index.wiki | ||
| +++ www/index.wiki | ||
| @@ -149,10 +149,12 @@ | ||
| 149 | 149 | * How to [./server.wiki | set up a server] for your repository. |
| 150 | 150 | * Customizing the [./custom_ticket.wiki | ticket system]. |
| 151 | 151 | * Methods to [./checkin_names.wiki | identify a specific check-in]. |
| 152 | 152 | * [./inout.wiki | Import and export] from and to Git. |
| 153 | 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). | |
| 154 | 156 | |
| 155 | 157 | <h3>Links For Fossil Developer:</h3> |
| 156 | 158 | |
| 157 | 159 | * [./contribute.wiki | Contributing] code or documentation to the |
| 158 | 160 | Fossil project. |
| 159 | 161 |
| --- 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 |
+1
| --- www/mkindex.tcl | ||
| +++ www/mkindex.tcl | ||
| @@ -21,10 +21,11 @@ | ||
| 21 | 21 | delta_format.wiki {Fossil Delta Format} |
| 22 | 22 | embeddeddoc.wiki {Embedded Project Documentation} |
| 23 | 23 | event.wiki {Events} |
| 24 | 24 | faq.wiki {Frequently Asked Questions} |
| 25 | 25 | fileformat.wiki {Fossil File Format} |
| 26 | + fiveminutes.wiki {Update and Running in 5 Minutes as a Single User} | |
| 26 | 27 | foss-cklist.wiki {Checklist For Successful Open-Source Projects} |
| 27 | 28 | fossil-v-git.wiki {Fossil Versus Git} |
| 28 | 29 | index.wiki {Home Page} |
| 29 | 30 | inout.wiki {Import And Export To And From Git} |
| 30 | 31 | makefile.wiki {The Fossil Build Process} |
| 31 | 32 |
| --- 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 @@ | ||
| 10 | 10 | <li> [/help | Command-line help] |
| 11 | 11 | </ul> |
| 12 | 12 | <a name="pindex"></a> |
| 13 | 13 | <h2>Permuted Index:</h2> |
| 14 | 14 | <ul> |
| 15 | +<li><a href="fiveminutes.wiki">5 Minutes as a Single User — Update and Running in</a></li> | |
| 15 | 16 | <li><a href="tech_overview.wiki">A Technical Overview Of The Design And Implementation Of Fossil</a></li> |
| 16 | 17 | <li><a href="copyright-release.html">Agreement — Contributor License</a></li> |
| 17 | 18 | <li><a href="delta_encoder_algorithm.wiki">Algorithm — Fossil Delta Encoding</a></li> |
| 19 | +<li><a href="fiveminutes.wiki">as a Single User — Update and Running in 5 Minutes</a></li> | |
| 18 | 20 | <li><a href="faq.wiki">Asked Questions — Frequently</a></li> |
| 19 | 21 | <li><a href="password.wiki">Authentication — Password Management And</a></li> |
| 20 | 22 | <li><a href="private.wiki">Branches — Creating, Syncing, and Deleting Private</a></li> |
| 21 | 23 | <li><a href="branching.wiki">Branching, Forking, Merging, and Tagging</a></li> |
| 22 | 24 | <li><a href="bugtheory.wiki">Bug Tracking In Fossil</a></li> |
| @@ -90,10 +92,11 @@ | ||
| 90 | 92 | <li><a href="selfcheck.wiki">Integrity Self Checks — Fossil Repository</a></li> |
| 91 | 93 | <li><a href="webui.wiki">Interface — The Fossil Web</a></li> |
| 92 | 94 | <li><a href="copyright-release.html">License Agreement — Contributor</a></li> |
| 93 | 95 | <li><a href="password.wiki">Management And Authentication — Password</a></li> |
| 94 | 96 | <li><a href="branching.wiki">Merging, and Tagging — Branching, Forking,</a></li> |
| 97 | +<li><a href="fiveminutes.wiki">Minutes as a Single User — Update and Running in 5</a></li> | |
| 95 | 98 | <li><a href="checkin_names.wiki">Names — Checkin And Version</a></li> |
| 96 | 99 | <li><a href="newrepo.wiki">New Fossil Repository — How To Create A</a></li> |
| 97 | 100 | <li><a href="foss-cklist.wiki">Open-Source Projects — Checklist For Successful</a></li> |
| 98 | 101 | <li><a href="pop.wiki">Operations — Principles Of</a></li> |
| 99 | 102 | <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil — A Technical</a></li> |
| @@ -115,16 +118,18 @@ | ||
| 115 | 118 | <li><a href="quotes.wiki">Quotes: What People Are Saying About Fossil, Git, and DVCSes in General</a></li> |
| 116 | 119 | <li><a href="selfhost.wiki">Repositories — Fossil Self Hosting</a></li> |
| 117 | 120 | <li><a href="newrepo.wiki">Repository — How To Create A New Fossil</a></li> |
| 118 | 121 | <li><a href="selfcheck.wiki">Repository Integrity Self Checks — Fossil</a></li> |
| 119 | 122 | <li><a href="reviews.wiki">Reviews</a></li> |
| 123 | +<li><a href="fiveminutes.wiki">Running in 5 Minutes as a Single User — Update and</a></li> | |
| 120 | 124 | <li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General — Quotes: What People Are</a></li> |
| 121 | 125 | <li><a href="selfcheck.wiki">Self Checks — Fossil Repository Integrity</a></li> |
| 122 | 126 | <li><a href="selfhost.wiki">Self Hosting Repositories — Fossil</a></li> |
| 123 | 127 | <li><a href="server.wiki">Server — How To Configure A Fossil</a></li> |
| 124 | 128 | <li><a href="settings.wiki">Settings — Fossil</a></li> |
| 125 | 129 | <li><a href="shunning.wiki">Shunning: Deleting Content From Fossil</a></li> |
| 130 | +<li><a href="fiveminutes.wiki">Single User — Update and Running in 5 Minutes as a</a></li> | |
| 126 | 131 | <li><a href="style.wiki">Source Code Style Guidelines</a></li> |
| 127 | 132 | <li><a href="tech_overview.wiki">SQLite Databases Used By Fossil</a></li> |
| 128 | 133 | <li><a href="ssl.wiki">SSL with Fossil — Using</a></li> |
| 129 | 134 | <li><a href="quickstart.wiki">Start Guide — Fossil Quick</a></li> |
| 130 | 135 | <li><a href="stats.wiki">Statistics — Performance</a></li> |
| @@ -140,13 +145,15 @@ | ||
| 140 | 145 | <li><a href="sync.wiki">The Fossil Sync Protocol</a></li> |
| 141 | 146 | <li><a href="webui.wiki">The Fossil Web Interface</a></li> |
| 142 | 147 | <li><a href="theory1.wiki">Thoughts On The Design Of The Fossil DVCS</a></li> |
| 143 | 148 | <li><a href="custom_ticket.wiki">Ticket System — Customizing The</a></li> |
| 144 | 149 | <li><a href="bugtheory.wiki">Tracking In Fossil — 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 — Update and Running in 5 Minutes as a Single</a></li> | |
| 145 | 152 | <li><a href="ssl.wiki">Using SSL with Fossil</a></li> |
| 146 | 153 | <li><a href="checkin_names.wiki">Version Names — Checkin And</a></li> |
| 147 | 154 | <li><a href="fossil-v-git.wiki">Versus Git — Fossil</a></li> |
| 148 | 155 | <li><a href="webui.wiki">Web Interface — The Fossil</a></li> |
| 149 | 156 | <li><a href="quotes.wiki">What People Are Saying About Fossil, Git, and DVCSes in General — Quotes:</a></li> |
| 150 | 157 | <li><a href="wikitheory.wiki">Wiki In Fossil</a></li> |
| 151 | 158 | <li><a href="ssl.wiki">with Fossil — Using SSL</a></li> |
| 152 | 159 | </ul> |
| 153 | 160 |
| --- 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 — Contributor License</a></li> |
| 17 | <li><a href="delta_encoder_algorithm.wiki">Algorithm — Fossil Delta Encoding</a></li> |
| 18 | <li><a href="faq.wiki">Asked Questions — Frequently</a></li> |
| 19 | <li><a href="password.wiki">Authentication — Password Management And</a></li> |
| 20 | <li><a href="private.wiki">Branches — 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 — Fossil Repository</a></li> |
| 91 | <li><a href="webui.wiki">Interface — The Fossil Web</a></li> |
| 92 | <li><a href="copyright-release.html">License Agreement — Contributor</a></li> |
| 93 | <li><a href="password.wiki">Management And Authentication — Password</a></li> |
| 94 | <li><a href="branching.wiki">Merging, and Tagging — Branching, Forking,</a></li> |
| 95 | <li><a href="checkin_names.wiki">Names — Checkin And Version</a></li> |
| 96 | <li><a href="newrepo.wiki">New Fossil Repository — How To Create A</a></li> |
| 97 | <li><a href="foss-cklist.wiki">Open-Source Projects — Checklist For Successful</a></li> |
| 98 | <li><a href="pop.wiki">Operations — Principles Of</a></li> |
| 99 | <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil — 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 — Fossil Self Hosting</a></li> |
| 117 | <li><a href="newrepo.wiki">Repository — How To Create A New Fossil</a></li> |
| 118 | <li><a href="selfcheck.wiki">Repository Integrity Self Checks — 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 — Quotes: What People Are</a></li> |
| 121 | <li><a href="selfcheck.wiki">Self Checks — Fossil Repository Integrity</a></li> |
| 122 | <li><a href="selfhost.wiki">Self Hosting Repositories — Fossil</a></li> |
| 123 | <li><a href="server.wiki">Server — How To Configure A Fossil</a></li> |
| 124 | <li><a href="settings.wiki">Settings — 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 — Using</a></li> |
| 129 | <li><a href="quickstart.wiki">Start Guide — Fossil Quick</a></li> |
| 130 | <li><a href="stats.wiki">Statistics — 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 — Customizing The</a></li> |
| 144 | <li><a href="bugtheory.wiki">Tracking In Fossil — Bug</a></li> |
| 145 | <li><a href="ssl.wiki">Using SSL with Fossil</a></li> |
| 146 | <li><a href="checkin_names.wiki">Version Names — Checkin And</a></li> |
| 147 | <li><a href="fossil-v-git.wiki">Versus Git — Fossil</a></li> |
| 148 | <li><a href="webui.wiki">Web Interface — The Fossil</a></li> |
| 149 | <li><a href="quotes.wiki">What People Are Saying About Fossil, Git, and DVCSes in General — Quotes:</a></li> |
| 150 | <li><a href="wikitheory.wiki">Wiki In Fossil</a></li> |
| 151 | <li><a href="ssl.wiki">with Fossil — 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 — 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 — Contributor License</a></li> |
| 18 | <li><a href="delta_encoder_algorithm.wiki">Algorithm — Fossil Delta Encoding</a></li> |
| 19 | <li><a href="fiveminutes.wiki">as a Single User — Update and Running in 5 Minutes</a></li> |
| 20 | <li><a href="faq.wiki">Asked Questions — Frequently</a></li> |
| 21 | <li><a href="password.wiki">Authentication — Password Management And</a></li> |
| 22 | <li><a href="private.wiki">Branches — 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 — Fossil Repository</a></li> |
| 93 | <li><a href="webui.wiki">Interface — The Fossil Web</a></li> |
| 94 | <li><a href="copyright-release.html">License Agreement — Contributor</a></li> |
| 95 | <li><a href="password.wiki">Management And Authentication — Password</a></li> |
| 96 | <li><a href="branching.wiki">Merging, and Tagging — Branching, Forking,</a></li> |
| 97 | <li><a href="fiveminutes.wiki">Minutes as a Single User — Update and Running in 5</a></li> |
| 98 | <li><a href="checkin_names.wiki">Names — Checkin And Version</a></li> |
| 99 | <li><a href="newrepo.wiki">New Fossil Repository — How To Create A</a></li> |
| 100 | <li><a href="foss-cklist.wiki">Open-Source Projects — Checklist For Successful</a></li> |
| 101 | <li><a href="pop.wiki">Operations — Principles Of</a></li> |
| 102 | <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil — 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 — Fossil Self Hosting</a></li> |
| 120 | <li><a href="newrepo.wiki">Repository — How To Create A New Fossil</a></li> |
| 121 | <li><a href="selfcheck.wiki">Repository Integrity Self Checks — 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 — Update and</a></li> |
| 124 | <li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General — Quotes: What People Are</a></li> |
| 125 | <li><a href="selfcheck.wiki">Self Checks — Fossil Repository Integrity</a></li> |
| 126 | <li><a href="selfhost.wiki">Self Hosting Repositories — Fossil</a></li> |
| 127 | <li><a href="server.wiki">Server — How To Configure A Fossil</a></li> |
| 128 | <li><a href="settings.wiki">Settings — Fossil</a></li> |
| 129 | <li><a href="shunning.wiki">Shunning: Deleting Content From Fossil</a></li> |
| 130 | <li><a href="fiveminutes.wiki">Single User — 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 — Using</a></li> |
| 134 | <li><a href="quickstart.wiki">Start Guide — Fossil Quick</a></li> |
| 135 | <li><a href="stats.wiki">Statistics — 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 — Customizing The</a></li> |
| 149 | <li><a href="bugtheory.wiki">Tracking In Fossil — 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 — 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 — Checkin And</a></li> |
| 154 | <li><a href="fossil-v-git.wiki">Versus Git — Fossil</a></li> |
| 155 | <li><a href="webui.wiki">Web Interface — The Fossil</a></li> |
| 156 | <li><a href="quotes.wiki">What People Are Saying About Fossil, Git, and DVCSes in General — Quotes:</a></li> |
| 157 | <li><a href="wikitheory.wiki">Wiki In Fossil</a></li> |
| 158 | <li><a href="ssl.wiki">with Fossil — Using SSL</a></li> |
| 159 | </ul> |
| 160 |