Fossil SCM
merge trunk. Broken on win32!
Commit
258cedd6255b0a8c97936f40baac06457511356d
Parent
58a98df4a53e0bf…
26 files changed
+1
-1
+10
-7
+2
-2
+43
-12
+1
-1
+21
-215
+21
-215
+44
-8
+1
+27
-6
+11
-1
+1
+21
-2
+2
-2
+2
-2
+1
+14
+3
-40
+5
-5
+5
-5
+1
-1
+3
-2
+10
-4
+15
-4
+15
-4
+10
~
auto.def
~
src/add.c
~
src/blob.c
~
src/checkin.c
~
src/checkout.c
~
src/file.c
~
src/file.c
~
src/finfo.c
~
src/http_transport.c
~
src/main.c
~
src/main.mk
~
src/makemake.tcl
~
src/printf.c
~
src/rebuild.c
~
src/rebuild.c
~
src/user.c
+
src/utf8.c
~
src/utf8.c
~
src/vfile.c
~
src/vfile.c
~
src/winhttp.c
~
src/xfer.c
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.mingw
~
win/Makefile.msc
M
auto.def
+1
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -79,11 +79,10 @@ | ||
| 79 | 79 | if {[opt-bool static]} { |
| 80 | 80 | # XXX: This will not work on all systems. |
| 81 | 81 | define-append EXTRA_LDFLAGS -static |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - | |
| 85 | 84 | # Check for zlib, using the given location if specified |
| 86 | 85 | set zlibpath [opt-val with-zlib] |
| 87 | 86 | if {$zlibpath ne ""} { |
| 88 | 87 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 89 | 88 | define-append EXTRA_CFLAGS -I$zlibpath |
| @@ -221,14 +220,15 @@ | ||
| 221 | 220 | # Last resort, may be Windows |
| 222 | 221 | if {[string match *mingw* [get-define host]]} { |
| 223 | 222 | define-append LIBS -lwsock32 |
| 224 | 223 | } |
| 225 | 224 | } |
| 225 | +cc-check-function-in-lib iconv iconv | |
| 226 | 226 | |
| 227 | 227 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 228 | 228 | if {![cc-check-functions getpassphrase]} { |
| 229 | 229 | # Haiku needs this |
| 230 | 230 | cc-check-function-in-lib getpass bsd |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | make-template Makefile.in |
| 234 | 234 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 235 | 235 |
| --- auto.def | |
| +++ auto.def | |
| @@ -79,11 +79,10 @@ | |
| 79 | if {[opt-bool static]} { |
| 80 | # XXX: This will not work on all systems. |
| 81 | define-append EXTRA_LDFLAGS -static |
| 82 | } |
| 83 | |
| 84 | |
| 85 | # Check for zlib, using the given location if specified |
| 86 | set zlibpath [opt-val with-zlib] |
| 87 | if {$zlibpath ne ""} { |
| 88 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 89 | define-append EXTRA_CFLAGS -I$zlibpath |
| @@ -221,14 +220,15 @@ | |
| 221 | # Last resort, may be Windows |
| 222 | if {[string match *mingw* [get-define host]]} { |
| 223 | define-append LIBS -lwsock32 |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 228 | if {![cc-check-functions getpassphrase]} { |
| 229 | # Haiku needs this |
| 230 | cc-check-function-in-lib getpass bsd |
| 231 | } |
| 232 | |
| 233 | make-template Makefile.in |
| 234 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 235 |
| --- auto.def | |
| +++ auto.def | |
| @@ -79,11 +79,10 @@ | |
| 79 | if {[opt-bool static]} { |
| 80 | # XXX: This will not work on all systems. |
| 81 | define-append EXTRA_LDFLAGS -static |
| 82 | } |
| 83 | |
| 84 | # Check for zlib, using the given location if specified |
| 85 | set zlibpath [opt-val with-zlib] |
| 86 | if {$zlibpath ne ""} { |
| 87 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 88 | define-append EXTRA_CFLAGS -I$zlibpath |
| @@ -221,14 +220,15 @@ | |
| 220 | # Last resort, may be Windows |
| 221 | if {[string match *mingw* [get-define host]]} { |
| 222 | define-append LIBS -lwsock32 |
| 223 | } |
| 224 | } |
| 225 | cc-check-function-in-lib iconv iconv |
| 226 | |
| 227 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 228 | if {![cc-check-functions getpassphrase]} { |
| 229 | # Haiku needs this |
| 230 | cc-check-function-in-lib getpass bsd |
| 231 | } |
| 232 | |
| 233 | make-template Makefile.in |
| 234 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 235 |
+10
-7
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -29,11 +29,11 @@ | ||
| 29 | 29 | ** or merge, and should be omitted from "clean" and "extra" lists. |
| 30 | 30 | ** |
| 31 | 31 | ** Return the N-th name. The first name has N==0. When all names have |
| 32 | 32 | ** been used, return 0. |
| 33 | 33 | */ |
| 34 | -const char *fossil_reserved_name(int N){ | |
| 34 | +const char *fossil_reserved_name(int N, int omitRepo){ | |
| 35 | 35 | /* Possible names of the local per-checkout database file and |
| 36 | 36 | ** its associated journals |
| 37 | 37 | */ |
| 38 | 38 | static const char *const azName[] = { |
| 39 | 39 | "_FOSSIL_", |
| @@ -88,25 +88,25 @@ | ||
| 88 | 88 | N -= count(azName); |
| 89 | 89 | if( cachedManifest ){ |
| 90 | 90 | if( N<count(azManifest) ) return azManifest[N]; |
| 91 | 91 | N -= count(azManifest); |
| 92 | 92 | } |
| 93 | - if( N<count(azRepo) ) return azRepo[N]; | |
| 93 | + if( !omitRepo && N<count(azRepo) ) return azRepo[N]; | |
| 94 | 94 | return 0; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /* |
| 98 | 98 | ** Return a list of all reserved filenames as an SQL list. |
| 99 | 99 | */ |
| 100 | -const char *fossil_all_reserved_names(void){ | |
| 100 | +const char *fossil_all_reserved_names(int omitRepo){ | |
| 101 | 101 | static char *zAll = 0; |
| 102 | 102 | if( zAll==0 ){ |
| 103 | 103 | Blob x; |
| 104 | 104 | int i; |
| 105 | 105 | const char *z; |
| 106 | 106 | blob_zero(&x); |
| 107 | - for(i=0; (z = fossil_reserved_name(i))!=0; i++){ | |
| 107 | + for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){ | |
| 108 | 108 | if( i>0 ) blob_append(&x, ",", 1); |
| 109 | 109 | blob_appendf(&x, "'%q'", z); |
| 110 | 110 | } |
| 111 | 111 | zAll = blob_str(&x); |
| 112 | 112 | } |
| @@ -113,21 +113,24 @@ | ||
| 113 | 113 | return zAll; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /* |
| 117 | 117 | ** COMMAND: test-reserved-names |
| 118 | +** | |
| 119 | +** Usage: %fossil test-reserved-names [-omitrepo] | |
| 118 | 120 | ** |
| 119 | 121 | ** Show all reserved filenames for the current check-out. |
| 120 | 122 | */ |
| 121 | 123 | void test_reserved_names(void){ |
| 122 | 124 | int i; |
| 123 | 125 | const char *z; |
| 126 | + int omitRepo = find_option("omitrepo",0,0)!=0; | |
| 124 | 127 | db_must_be_within_tree(); |
| 125 | - for(i=0; (z = fossil_reserved_name(i))!=0; i++){ | |
| 128 | + for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){ | |
| 126 | 129 | fossil_print("%3d: %s\n", i, z); |
| 127 | 130 | } |
| 128 | - fossil_print("ALL: (%s)\n", fossil_all_reserved_names()); | |
| 131 | + fossil_print("ALL: (%s)\n", fossil_all_reserved_names(omitRepo)); | |
| 129 | 132 | } |
| 130 | 133 | |
| 131 | 134 | /* |
| 132 | 135 | ** Add a single file named zName to the VFILE table with vid. |
| 133 | 136 | ** |
| @@ -195,11 +198,11 @@ | ||
| 195 | 198 | } |
| 196 | 199 | db_prepare(&loop, "SELECT x FROM sfile ORDER BY x"); |
| 197 | 200 | while( db_step(&loop)==SQLITE_ROW ){ |
| 198 | 201 | const char *zToAdd = db_column_text(&loop, 0); |
| 199 | 202 | if( fossil_strcmp(zToAdd, zRepo)==0 ) continue; |
| 200 | - for(i=0; (zReserved = fossil_reserved_name(i))!=0; i++){ | |
| 203 | + for(i=0; (zReserved = fossil_reserved_name(i, 0))!=0; i++){ | |
| 201 | 204 | if( xCmp(zToAdd, zReserved)==0 ) break; |
| 202 | 205 | } |
| 203 | 206 | if( zReserved ) continue; |
| 204 | 207 | nAdd += add_one_file(zToAdd, vid, caseSensitive); |
| 205 | 208 | } |
| 206 | 209 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -29,11 +29,11 @@ | |
| 29 | ** or merge, and should be omitted from "clean" and "extra" lists. |
| 30 | ** |
| 31 | ** Return the N-th name. The first name has N==0. When all names have |
| 32 | ** been used, return 0. |
| 33 | */ |
| 34 | const char *fossil_reserved_name(int N){ |
| 35 | /* Possible names of the local per-checkout database file and |
| 36 | ** its associated journals |
| 37 | */ |
| 38 | static const char *const azName[] = { |
| 39 | "_FOSSIL_", |
| @@ -88,25 +88,25 @@ | |
| 88 | N -= count(azName); |
| 89 | if( cachedManifest ){ |
| 90 | if( N<count(azManifest) ) return azManifest[N]; |
| 91 | N -= count(azManifest); |
| 92 | } |
| 93 | if( N<count(azRepo) ) return azRepo[N]; |
| 94 | return 0; |
| 95 | } |
| 96 | |
| 97 | /* |
| 98 | ** Return a list of all reserved filenames as an SQL list. |
| 99 | */ |
| 100 | const char *fossil_all_reserved_names(void){ |
| 101 | static char *zAll = 0; |
| 102 | if( zAll==0 ){ |
| 103 | Blob x; |
| 104 | int i; |
| 105 | const char *z; |
| 106 | blob_zero(&x); |
| 107 | for(i=0; (z = fossil_reserved_name(i))!=0; i++){ |
| 108 | if( i>0 ) blob_append(&x, ",", 1); |
| 109 | blob_appendf(&x, "'%q'", z); |
| 110 | } |
| 111 | zAll = blob_str(&x); |
| 112 | } |
| @@ -113,21 +113,24 @@ | |
| 113 | return zAll; |
| 114 | } |
| 115 | |
| 116 | /* |
| 117 | ** COMMAND: test-reserved-names |
| 118 | ** |
| 119 | ** Show all reserved filenames for the current check-out. |
| 120 | */ |
| 121 | void test_reserved_names(void){ |
| 122 | int i; |
| 123 | const char *z; |
| 124 | db_must_be_within_tree(); |
| 125 | for(i=0; (z = fossil_reserved_name(i))!=0; i++){ |
| 126 | fossil_print("%3d: %s\n", i, z); |
| 127 | } |
| 128 | fossil_print("ALL: (%s)\n", fossil_all_reserved_names()); |
| 129 | } |
| 130 | |
| 131 | /* |
| 132 | ** Add a single file named zName to the VFILE table with vid. |
| 133 | ** |
| @@ -195,11 +198,11 @@ | |
| 195 | } |
| 196 | db_prepare(&loop, "SELECT x FROM sfile ORDER BY x"); |
| 197 | while( db_step(&loop)==SQLITE_ROW ){ |
| 198 | const char *zToAdd = db_column_text(&loop, 0); |
| 199 | if( fossil_strcmp(zToAdd, zRepo)==0 ) continue; |
| 200 | for(i=0; (zReserved = fossil_reserved_name(i))!=0; i++){ |
| 201 | if( xCmp(zToAdd, zReserved)==0 ) break; |
| 202 | } |
| 203 | if( zReserved ) continue; |
| 204 | nAdd += add_one_file(zToAdd, vid, caseSensitive); |
| 205 | } |
| 206 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -29,11 +29,11 @@ | |
| 29 | ** or merge, and should be omitted from "clean" and "extra" lists. |
| 30 | ** |
| 31 | ** Return the N-th name. The first name has N==0. When all names have |
| 32 | ** been used, return 0. |
| 33 | */ |
| 34 | const char *fossil_reserved_name(int N, int omitRepo){ |
| 35 | /* Possible names of the local per-checkout database file and |
| 36 | ** its associated journals |
| 37 | */ |
| 38 | static const char *const azName[] = { |
| 39 | "_FOSSIL_", |
| @@ -88,25 +88,25 @@ | |
| 88 | N -= count(azName); |
| 89 | if( cachedManifest ){ |
| 90 | if( N<count(azManifest) ) return azManifest[N]; |
| 91 | N -= count(azManifest); |
| 92 | } |
| 93 | if( !omitRepo && N<count(azRepo) ) return azRepo[N]; |
| 94 | return 0; |
| 95 | } |
| 96 | |
| 97 | /* |
| 98 | ** Return a list of all reserved filenames as an SQL list. |
| 99 | */ |
| 100 | const char *fossil_all_reserved_names(int omitRepo){ |
| 101 | static char *zAll = 0; |
| 102 | if( zAll==0 ){ |
| 103 | Blob x; |
| 104 | int i; |
| 105 | const char *z; |
| 106 | blob_zero(&x); |
| 107 | for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){ |
| 108 | if( i>0 ) blob_append(&x, ",", 1); |
| 109 | blob_appendf(&x, "'%q'", z); |
| 110 | } |
| 111 | zAll = blob_str(&x); |
| 112 | } |
| @@ -113,21 +113,24 @@ | |
| 113 | return zAll; |
| 114 | } |
| 115 | |
| 116 | /* |
| 117 | ** COMMAND: test-reserved-names |
| 118 | ** |
| 119 | ** Usage: %fossil test-reserved-names [-omitrepo] |
| 120 | ** |
| 121 | ** Show all reserved filenames for the current check-out. |
| 122 | */ |
| 123 | void test_reserved_names(void){ |
| 124 | int i; |
| 125 | const char *z; |
| 126 | int omitRepo = find_option("omitrepo",0,0)!=0; |
| 127 | db_must_be_within_tree(); |
| 128 | for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){ |
| 129 | fossil_print("%3d: %s\n", i, z); |
| 130 | } |
| 131 | fossil_print("ALL: (%s)\n", fossil_all_reserved_names(omitRepo)); |
| 132 | } |
| 133 | |
| 134 | /* |
| 135 | ** Add a single file named zName to the VFILE table with vid. |
| 136 | ** |
| @@ -195,11 +198,11 @@ | |
| 198 | } |
| 199 | db_prepare(&loop, "SELECT x FROM sfile ORDER BY x"); |
| 200 | while( db_step(&loop)==SQLITE_ROW ){ |
| 201 | const char *zToAdd = db_column_text(&loop, 0); |
| 202 | if( fossil_strcmp(zToAdd, zRepo)==0 ) continue; |
| 203 | for(i=0; (zReserved = fossil_reserved_name(i, 0))!=0; i++){ |
| 204 | if( xCmp(zToAdd, zReserved)==0 ) break; |
| 205 | } |
| 206 | if( zReserved ) continue; |
| 207 | nAdd += add_one_file(zToAdd, vid, caseSensitive); |
| 208 | } |
| 209 |
+2
-2
| --- src/blob.c | ||
| +++ src/blob.c | ||
| @@ -1111,11 +1111,11 @@ | ||
| 1111 | 1111 | blob_append(pBlob, "", 1); |
| 1112 | 1112 | zUtf8 = blob_str(pBlob) + bomSize; |
| 1113 | 1113 | zUtf8 = fossil_unicode_to_utf8(zUtf8); |
| 1114 | 1114 | blob_zero(pBlob); |
| 1115 | 1115 | blob_append(pBlob, zUtf8, -1); |
| 1116 | - fossil_mbcs_free(zUtf8); | |
| 1116 | + fossil_unicode_free(zUtf8); | |
| 1117 | 1117 | }else if( starts_with_utf16be_bom(pBlob, &bomSize) ){ |
| 1118 | 1118 | unsigned int i = blob_size(pBlob); |
| 1119 | 1119 | zUtf8 = blob_buffer(pBlob); |
| 1120 | 1120 | while( i > 0 ){ |
| 1121 | 1121 | /* swap bytes of unicode representation */ |
| @@ -1127,14 +1127,14 @@ | ||
| 1127 | 1127 | blob_append(pBlob, "", 1); |
| 1128 | 1128 | zUtf8 = blob_str(pBlob) + bomSize; |
| 1129 | 1129 | zUtf8 = fossil_unicode_to_utf8(zUtf8); |
| 1130 | 1130 | blob_zero(pBlob); |
| 1131 | 1131 | blob_append(pBlob, zUtf8, -1); |
| 1132 | - fossil_mbcs_free(zUtf8); | |
| 1132 | + fossil_unicode_free(zUtf8); | |
| 1133 | 1133 | }else if( useMbcs ){ |
| 1134 | 1134 | zUtf8 = fossil_mbcs_to_utf8(blob_str(pBlob)); |
| 1135 | 1135 | blob_reset(pBlob); |
| 1136 | 1136 | blob_append(pBlob, zUtf8, -1); |
| 1137 | 1137 | fossil_mbcs_free(zUtf8); |
| 1138 | 1138 | #endif /* _WIN32 */ |
| 1139 | 1139 | } |
| 1140 | 1140 | } |
| 1141 | 1141 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1111,11 +1111,11 @@ | |
| 1111 | blob_append(pBlob, "", 1); |
| 1112 | zUtf8 = blob_str(pBlob) + bomSize; |
| 1113 | zUtf8 = fossil_unicode_to_utf8(zUtf8); |
| 1114 | blob_zero(pBlob); |
| 1115 | blob_append(pBlob, zUtf8, -1); |
| 1116 | fossil_mbcs_free(zUtf8); |
| 1117 | }else if( starts_with_utf16be_bom(pBlob, &bomSize) ){ |
| 1118 | unsigned int i = blob_size(pBlob); |
| 1119 | zUtf8 = blob_buffer(pBlob); |
| 1120 | while( i > 0 ){ |
| 1121 | /* swap bytes of unicode representation */ |
| @@ -1127,14 +1127,14 @@ | |
| 1127 | blob_append(pBlob, "", 1); |
| 1128 | zUtf8 = blob_str(pBlob) + bomSize; |
| 1129 | zUtf8 = fossil_unicode_to_utf8(zUtf8); |
| 1130 | blob_zero(pBlob); |
| 1131 | blob_append(pBlob, zUtf8, -1); |
| 1132 | fossil_mbcs_free(zUtf8); |
| 1133 | }else if( useMbcs ){ |
| 1134 | zUtf8 = fossil_mbcs_to_utf8(blob_str(pBlob)); |
| 1135 | blob_reset(pBlob); |
| 1136 | blob_append(pBlob, zUtf8, -1); |
| 1137 | fossil_mbcs_free(zUtf8); |
| 1138 | #endif /* _WIN32 */ |
| 1139 | } |
| 1140 | } |
| 1141 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1111,11 +1111,11 @@ | |
| 1111 | blob_append(pBlob, "", 1); |
| 1112 | zUtf8 = blob_str(pBlob) + bomSize; |
| 1113 | zUtf8 = fossil_unicode_to_utf8(zUtf8); |
| 1114 | blob_zero(pBlob); |
| 1115 | blob_append(pBlob, zUtf8, -1); |
| 1116 | fossil_unicode_free(zUtf8); |
| 1117 | }else if( starts_with_utf16be_bom(pBlob, &bomSize) ){ |
| 1118 | unsigned int i = blob_size(pBlob); |
| 1119 | zUtf8 = blob_buffer(pBlob); |
| 1120 | while( i > 0 ){ |
| 1121 | /* swap bytes of unicode representation */ |
| @@ -1127,14 +1127,14 @@ | |
| 1127 | blob_append(pBlob, "", 1); |
| 1128 | zUtf8 = blob_str(pBlob) + bomSize; |
| 1129 | zUtf8 = fossil_unicode_to_utf8(zUtf8); |
| 1130 | blob_zero(pBlob); |
| 1131 | blob_append(pBlob, zUtf8, -1); |
| 1132 | fossil_unicode_free(zUtf8); |
| 1133 | }else if( useMbcs ){ |
| 1134 | zUtf8 = fossil_mbcs_to_utf8(blob_str(pBlob)); |
| 1135 | blob_reset(pBlob); |
| 1136 | blob_append(pBlob, zUtf8, -1); |
| 1137 | fossil_mbcs_free(zUtf8); |
| 1138 | #endif /* _WIN32 */ |
| 1139 | } |
| 1140 | } |
| 1141 |
+43
-12
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -350,11 +350,11 @@ | ||
| 350 | 350 | glob_free(pIgnore); |
| 351 | 351 | db_prepare(&q, |
| 352 | 352 | "SELECT x FROM sfile" |
| 353 | 353 | " WHERE x NOT IN (%s)" |
| 354 | 354 | " ORDER BY 1", |
| 355 | - fossil_all_reserved_names() | |
| 355 | + fossil_all_reserved_names(0) | |
| 356 | 356 | ); |
| 357 | 357 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 358 | 358 | blob_zero(&rewrittenPathname); |
| 359 | 359 | while( db_step(&q)==SQLITE_ROW ){ |
| 360 | 360 | zDisplayName = zPathname = db_column_text(&q, 0); |
| @@ -430,11 +430,11 @@ | ||
| 430 | 430 | glob_free(pIgnore); |
| 431 | 431 | db_prepare(&q, |
| 432 | 432 | "SELECT %Q || x FROM sfile" |
| 433 | 433 | " WHERE x NOT IN (%s)" |
| 434 | 434 | " ORDER BY 1", |
| 435 | - g.zLocalRoot, fossil_all_reserved_names() | |
| 435 | + g.zLocalRoot, fossil_all_reserved_names(0) | |
| 436 | 436 | ); |
| 437 | 437 | if( file_tree_name(g.zRepositoryName, &repo, 0) ){ |
| 438 | 438 | db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo); |
| 439 | 439 | } |
| 440 | 440 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| @@ -886,13 +886,17 @@ | ||
| 886 | 886 | |
| 887 | 887 | /* |
| 888 | 888 | ** Issue a warning and give the user an opportunity to abandon out |
| 889 | 889 | ** if a Unicode (UTF-16) byte-order-mark (BOM) or a \r\n line ending |
| 890 | 890 | ** is seen in a text file. |
| 891 | +** | |
| 892 | +** Return 1 if the user pressed 'c'. In that case, the file will have | |
| 893 | +** been converted to UTF-8 (if it was UTF-16) with NL line-endings, | |
| 894 | +** and the original file will have been renamed to "<filename>-original". | |
| 891 | 895 | */ |
| 892 | -static void commit_warning( | |
| 893 | - const Blob *p, /* The content of the file being committed. */ | |
| 896 | +static int commit_warning( | |
| 897 | + Blob *p, /* The content of the file being committed. */ | |
| 894 | 898 | int crnlOk, /* Non-zero if CR/NL warnings should be disabled. */ |
| 895 | 899 | int binOk, /* Non-zero if binary warnings should be disabled. */ |
| 896 | 900 | int unicodeOk, /* Non-zero if unicode warnings should be disabled. */ |
| 897 | 901 | const char *zFilename /* The full name of the file being committed. */ |
| 898 | 902 | ){ |
| @@ -900,56 +904,78 @@ | ||
| 900 | 904 | int fUnicode; /* return value of starts_with_utf16_bom() */ |
| 901 | 905 | char *zMsg; /* Warning message */ |
| 902 | 906 | Blob fname; /* Relative pathname of the file */ |
| 903 | 907 | static int allOk = 0; /* Set to true to disable this routine */ |
| 904 | 908 | |
| 905 | - if( allOk ) return; | |
| 909 | + if( allOk ) return 0; | |
| 906 | 910 | fUnicode = starts_with_utf16_bom(p, 0); |
| 907 | 911 | eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p); |
| 908 | 912 | if( eType==0 || eType==-1 || fUnicode ){ |
| 909 | 913 | const char *zWarning; |
| 914 | + const char *zConvert = "c=convert/"; | |
| 910 | 915 | Blob ans; |
| 911 | 916 | char cReply; |
| 912 | 917 | |
| 913 | 918 | if( eType==-1 && fUnicode ){ |
| 914 | 919 | if ( crnlOk && unicodeOk ){ |
| 915 | - return; /* We don't want Unicode/CR/NL warnings for this file. */ | |
| 920 | + return 0; /* We don't want Unicode/CR/NL warnings for this file. */ | |
| 916 | 921 | } |
| 917 | 922 | zWarning = "Unicode and CR/NL line endings"; |
| 918 | 923 | }else if( eType==-1 ){ |
| 919 | 924 | if( crnlOk ){ |
| 920 | - return; /* We don't want CR/NL warnings for this file. */ | |
| 925 | + return 0; /* We don't want CR/NL warnings for this file. */ | |
| 921 | 926 | } |
| 922 | 927 | zWarning = "CR/NL line endings"; |
| 923 | 928 | }else if( eType==0 ){ |
| 924 | 929 | if( binOk ){ |
| 925 | - return; /* We don't want binary warnings for this file. */ | |
| 930 | + return 0; /* We don't want binary warnings for this file. */ | |
| 926 | 931 | } |
| 927 | 932 | zWarning = "binary data"; |
| 933 | + zConvert = ""; /* We cannot convert binary files. */ | |
| 928 | 934 | }else{ |
| 929 | 935 | if ( unicodeOk ){ |
| 930 | - return; /* We don't want unicode warnings for this file. */ | |
| 936 | + return 0; /* We don't want unicode warnings for this file. */ | |
| 931 | 937 | } |
| 932 | 938 | zWarning = "Unicode"; |
| 939 | +#ifndef _WIN32 | |
| 940 | + zConvert = ""; /* On Unix, we cannot easily convert Unicode files. */ | |
| 941 | +#endif | |
| 933 | 942 | } |
| 934 | 943 | file_relative_name(zFilename, &fname, 0); |
| 935 | 944 | blob_zero(&ans); |
| 936 | 945 | zMsg = mprintf( |
| 937 | - "%s contains %s. commit anyhow (a=all/y/N)? ", | |
| 938 | - blob_str(&fname), zWarning); | |
| 946 | + "%s contains %s. commit anyhow (a=all/%sy/N)? ", | |
| 947 | + blob_str(&fname), zWarning, zConvert); | |
| 939 | 948 | prompt_user(zMsg, &ans); |
| 940 | 949 | fossil_free(zMsg); |
| 941 | 950 | cReply = blob_str(&ans)[0]; |
| 942 | 951 | if( cReply=='a' || cReply=='A' ){ |
| 943 | 952 | allOk = 1; |
| 953 | + }else if( *zConvert && (cReply=='c' || cReply=='C') ){ | |
| 954 | + char *zOrig = file_newname(zFilename, "original", 1); | |
| 955 | + FILE *f; | |
| 956 | + blob_write_to_file(p, zOrig); | |
| 957 | + fossil_free(zOrig); | |
| 958 | + f = fossil_fopen(zFilename, "wb"); | |
| 959 | + if( fUnicode ) { | |
| 960 | + int bomSize; | |
| 961 | + const unsigned char *bom = get_utf8_bom(&bomSize); | |
| 962 | + fwrite(bom, 1, bomSize, f); | |
| 963 | + blob_to_utf8_no_bom(p, 0); | |
| 964 | + } | |
| 965 | + blob_remove_cr(p); | |
| 966 | + fwrite(blob_buffer(p), 1, blob_size(p), f); | |
| 967 | + fclose(f); | |
| 968 | + return 1; | |
| 944 | 969 | }else if( cReply!='y' && cReply!='Y' ){ |
| 945 | 970 | fossil_fatal("Abandoning commit due to %s in %s", |
| 946 | 971 | zWarning, blob_str(&fname)); |
| 947 | 972 | } |
| 948 | 973 | blob_reset(&ans); |
| 949 | 974 | blob_reset(&fname); |
| 950 | 975 | } |
| 976 | + return 0; | |
| 951 | 977 | } |
| 952 | 978 | |
| 953 | 979 | /* |
| 954 | 980 | ** qsort() comparison routine for an array of pointers to strings. |
| 955 | 981 | */ |
| @@ -1065,10 +1091,11 @@ | ||
| 1065 | 1091 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| 1066 | 1092 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 1067 | 1093 | int szD; /* Size of the delta manifest */ |
| 1068 | 1094 | int szB; /* Size of the baseline manifest */ |
| 1069 | 1095 | int nConflict = 0; /* Number of unresolved merge conflicts */ |
| 1096 | + int abortCommit = 0; | |
| 1070 | 1097 | Blob ans; |
| 1071 | 1098 | char cReply; |
| 1072 | 1099 | |
| 1073 | 1100 | url_proxy_options(); |
| 1074 | 1101 | noSign = find_option("nosign",0,0)!=0; |
| @@ -1312,11 +1339,12 @@ | ||
| 1312 | 1339 | }else{ |
| 1313 | 1340 | blob_read_from_file(&content, zFullname); |
| 1314 | 1341 | } |
| 1315 | 1342 | /* Do not emit any warnings when they are disabled. */ |
| 1316 | 1343 | if( !noWarningFlag ){ |
| 1317 | - commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname); | |
| 1344 | + abortCommit |= commit_warning(&content, crnlOk, binOk, | |
| 1345 | + unicodeOk, zFullname); | |
| 1318 | 1346 | } |
| 1319 | 1347 | if( chnged==1 && contains_merge_marker(&content) ){ |
| 1320 | 1348 | Blob fname; /* Relative pathname of the file */ |
| 1321 | 1349 | |
| 1322 | 1350 | nConflict++; |
| @@ -1335,10 +1363,13 @@ | ||
| 1335 | 1363 | } |
| 1336 | 1364 | db_finalize(&q); |
| 1337 | 1365 | if( nConflict && !allowConflict ){ |
| 1338 | 1366 | fossil_fatal("abort due to unresolved merge conflicts; " |
| 1339 | 1367 | "use --allow-conflict to override"); |
| 1368 | + } else if( abortCommit ){ | |
| 1369 | + fossil_fatal("one or more files were converted on your request; " | |
| 1370 | + "please re-test before committing"); | |
| 1340 | 1371 | } |
| 1341 | 1372 | |
| 1342 | 1373 | /* Create the new manifest */ |
| 1343 | 1374 | if( blob_size(&comment)==0 ){ |
| 1344 | 1375 | blob_append(&comment, "(no comment)", -1); |
| 1345 | 1376 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -350,11 +350,11 @@ | |
| 350 | glob_free(pIgnore); |
| 351 | db_prepare(&q, |
| 352 | "SELECT x FROM sfile" |
| 353 | " WHERE x NOT IN (%s)" |
| 354 | " ORDER BY 1", |
| 355 | fossil_all_reserved_names() |
| 356 | ); |
| 357 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 358 | blob_zero(&rewrittenPathname); |
| 359 | while( db_step(&q)==SQLITE_ROW ){ |
| 360 | zDisplayName = zPathname = db_column_text(&q, 0); |
| @@ -430,11 +430,11 @@ | |
| 430 | glob_free(pIgnore); |
| 431 | db_prepare(&q, |
| 432 | "SELECT %Q || x FROM sfile" |
| 433 | " WHERE x NOT IN (%s)" |
| 434 | " ORDER BY 1", |
| 435 | g.zLocalRoot, fossil_all_reserved_names() |
| 436 | ); |
| 437 | if( file_tree_name(g.zRepositoryName, &repo, 0) ){ |
| 438 | db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo); |
| 439 | } |
| 440 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| @@ -886,13 +886,17 @@ | |
| 886 | |
| 887 | /* |
| 888 | ** Issue a warning and give the user an opportunity to abandon out |
| 889 | ** if a Unicode (UTF-16) byte-order-mark (BOM) or a \r\n line ending |
| 890 | ** is seen in a text file. |
| 891 | */ |
| 892 | static void commit_warning( |
| 893 | const Blob *p, /* The content of the file being committed. */ |
| 894 | int crnlOk, /* Non-zero if CR/NL warnings should be disabled. */ |
| 895 | int binOk, /* Non-zero if binary warnings should be disabled. */ |
| 896 | int unicodeOk, /* Non-zero if unicode warnings should be disabled. */ |
| 897 | const char *zFilename /* The full name of the file being committed. */ |
| 898 | ){ |
| @@ -900,56 +904,78 @@ | |
| 900 | int fUnicode; /* return value of starts_with_utf16_bom() */ |
| 901 | char *zMsg; /* Warning message */ |
| 902 | Blob fname; /* Relative pathname of the file */ |
| 903 | static int allOk = 0; /* Set to true to disable this routine */ |
| 904 | |
| 905 | if( allOk ) return; |
| 906 | fUnicode = starts_with_utf16_bom(p, 0); |
| 907 | eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p); |
| 908 | if( eType==0 || eType==-1 || fUnicode ){ |
| 909 | const char *zWarning; |
| 910 | Blob ans; |
| 911 | char cReply; |
| 912 | |
| 913 | if( eType==-1 && fUnicode ){ |
| 914 | if ( crnlOk && unicodeOk ){ |
| 915 | return; /* We don't want Unicode/CR/NL warnings for this file. */ |
| 916 | } |
| 917 | zWarning = "Unicode and CR/NL line endings"; |
| 918 | }else if( eType==-1 ){ |
| 919 | if( crnlOk ){ |
| 920 | return; /* We don't want CR/NL warnings for this file. */ |
| 921 | } |
| 922 | zWarning = "CR/NL line endings"; |
| 923 | }else if( eType==0 ){ |
| 924 | if( binOk ){ |
| 925 | return; /* We don't want binary warnings for this file. */ |
| 926 | } |
| 927 | zWarning = "binary data"; |
| 928 | }else{ |
| 929 | if ( unicodeOk ){ |
| 930 | return; /* We don't want unicode warnings for this file. */ |
| 931 | } |
| 932 | zWarning = "Unicode"; |
| 933 | } |
| 934 | file_relative_name(zFilename, &fname, 0); |
| 935 | blob_zero(&ans); |
| 936 | zMsg = mprintf( |
| 937 | "%s contains %s. commit anyhow (a=all/y/N)? ", |
| 938 | blob_str(&fname), zWarning); |
| 939 | prompt_user(zMsg, &ans); |
| 940 | fossil_free(zMsg); |
| 941 | cReply = blob_str(&ans)[0]; |
| 942 | if( cReply=='a' || cReply=='A' ){ |
| 943 | allOk = 1; |
| 944 | }else if( cReply!='y' && cReply!='Y' ){ |
| 945 | fossil_fatal("Abandoning commit due to %s in %s", |
| 946 | zWarning, blob_str(&fname)); |
| 947 | } |
| 948 | blob_reset(&ans); |
| 949 | blob_reset(&fname); |
| 950 | } |
| 951 | } |
| 952 | |
| 953 | /* |
| 954 | ** qsort() comparison routine for an array of pointers to strings. |
| 955 | */ |
| @@ -1065,10 +1091,11 @@ | |
| 1065 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| 1066 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 1067 | int szD; /* Size of the delta manifest */ |
| 1068 | int szB; /* Size of the baseline manifest */ |
| 1069 | int nConflict = 0; /* Number of unresolved merge conflicts */ |
| 1070 | Blob ans; |
| 1071 | char cReply; |
| 1072 | |
| 1073 | url_proxy_options(); |
| 1074 | noSign = find_option("nosign",0,0)!=0; |
| @@ -1312,11 +1339,12 @@ | |
| 1312 | }else{ |
| 1313 | blob_read_from_file(&content, zFullname); |
| 1314 | } |
| 1315 | /* Do not emit any warnings when they are disabled. */ |
| 1316 | if( !noWarningFlag ){ |
| 1317 | commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname); |
| 1318 | } |
| 1319 | if( chnged==1 && contains_merge_marker(&content) ){ |
| 1320 | Blob fname; /* Relative pathname of the file */ |
| 1321 | |
| 1322 | nConflict++; |
| @@ -1335,10 +1363,13 @@ | |
| 1335 | } |
| 1336 | db_finalize(&q); |
| 1337 | if( nConflict && !allowConflict ){ |
| 1338 | fossil_fatal("abort due to unresolved merge conflicts; " |
| 1339 | "use --allow-conflict to override"); |
| 1340 | } |
| 1341 | |
| 1342 | /* Create the new manifest */ |
| 1343 | if( blob_size(&comment)==0 ){ |
| 1344 | blob_append(&comment, "(no comment)", -1); |
| 1345 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -350,11 +350,11 @@ | |
| 350 | glob_free(pIgnore); |
| 351 | db_prepare(&q, |
| 352 | "SELECT x FROM sfile" |
| 353 | " WHERE x NOT IN (%s)" |
| 354 | " ORDER BY 1", |
| 355 | fossil_all_reserved_names(0) |
| 356 | ); |
| 357 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| 358 | blob_zero(&rewrittenPathname); |
| 359 | while( db_step(&q)==SQLITE_ROW ){ |
| 360 | zDisplayName = zPathname = db_column_text(&q, 0); |
| @@ -430,11 +430,11 @@ | |
| 430 | glob_free(pIgnore); |
| 431 | db_prepare(&q, |
| 432 | "SELECT %Q || x FROM sfile" |
| 433 | " WHERE x NOT IN (%s)" |
| 434 | " ORDER BY 1", |
| 435 | g.zLocalRoot, fossil_all_reserved_names(0) |
| 436 | ); |
| 437 | if( file_tree_name(g.zRepositoryName, &repo, 0) ){ |
| 438 | db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo); |
| 439 | } |
| 440 | db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)"); |
| @@ -886,13 +886,17 @@ | |
| 886 | |
| 887 | /* |
| 888 | ** Issue a warning and give the user an opportunity to abandon out |
| 889 | ** if a Unicode (UTF-16) byte-order-mark (BOM) or a \r\n line ending |
| 890 | ** is seen in a text file. |
| 891 | ** |
| 892 | ** Return 1 if the user pressed 'c'. In that case, the file will have |
| 893 | ** been converted to UTF-8 (if it was UTF-16) with NL line-endings, |
| 894 | ** and the original file will have been renamed to "<filename>-original". |
| 895 | */ |
| 896 | static int commit_warning( |
| 897 | Blob *p, /* The content of the file being committed. */ |
| 898 | int crnlOk, /* Non-zero if CR/NL warnings should be disabled. */ |
| 899 | int binOk, /* Non-zero if binary warnings should be disabled. */ |
| 900 | int unicodeOk, /* Non-zero if unicode warnings should be disabled. */ |
| 901 | const char *zFilename /* The full name of the file being committed. */ |
| 902 | ){ |
| @@ -900,56 +904,78 @@ | |
| 904 | int fUnicode; /* return value of starts_with_utf16_bom() */ |
| 905 | char *zMsg; /* Warning message */ |
| 906 | Blob fname; /* Relative pathname of the file */ |
| 907 | static int allOk = 0; /* Set to true to disable this routine */ |
| 908 | |
| 909 | if( allOk ) return 0; |
| 910 | fUnicode = starts_with_utf16_bom(p, 0); |
| 911 | eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p); |
| 912 | if( eType==0 || eType==-1 || fUnicode ){ |
| 913 | const char *zWarning; |
| 914 | const char *zConvert = "c=convert/"; |
| 915 | Blob ans; |
| 916 | char cReply; |
| 917 | |
| 918 | if( eType==-1 && fUnicode ){ |
| 919 | if ( crnlOk && unicodeOk ){ |
| 920 | return 0; /* We don't want Unicode/CR/NL warnings for this file. */ |
| 921 | } |
| 922 | zWarning = "Unicode and CR/NL line endings"; |
| 923 | }else if( eType==-1 ){ |
| 924 | if( crnlOk ){ |
| 925 | return 0; /* We don't want CR/NL warnings for this file. */ |
| 926 | } |
| 927 | zWarning = "CR/NL line endings"; |
| 928 | }else if( eType==0 ){ |
| 929 | if( binOk ){ |
| 930 | return 0; /* We don't want binary warnings for this file. */ |
| 931 | } |
| 932 | zWarning = "binary data"; |
| 933 | zConvert = ""; /* We cannot convert binary files. */ |
| 934 | }else{ |
| 935 | if ( unicodeOk ){ |
| 936 | return 0; /* We don't want unicode warnings for this file. */ |
| 937 | } |
| 938 | zWarning = "Unicode"; |
| 939 | #ifndef _WIN32 |
| 940 | zConvert = ""; /* On Unix, we cannot easily convert Unicode files. */ |
| 941 | #endif |
| 942 | } |
| 943 | file_relative_name(zFilename, &fname, 0); |
| 944 | blob_zero(&ans); |
| 945 | zMsg = mprintf( |
| 946 | "%s contains %s. commit anyhow (a=all/%sy/N)? ", |
| 947 | blob_str(&fname), zWarning, zConvert); |
| 948 | prompt_user(zMsg, &ans); |
| 949 | fossil_free(zMsg); |
| 950 | cReply = blob_str(&ans)[0]; |
| 951 | if( cReply=='a' || cReply=='A' ){ |
| 952 | allOk = 1; |
| 953 | }else if( *zConvert && (cReply=='c' || cReply=='C') ){ |
| 954 | char *zOrig = file_newname(zFilename, "original", 1); |
| 955 | FILE *f; |
| 956 | blob_write_to_file(p, zOrig); |
| 957 | fossil_free(zOrig); |
| 958 | f = fossil_fopen(zFilename, "wb"); |
| 959 | if( fUnicode ) { |
| 960 | int bomSize; |
| 961 | const unsigned char *bom = get_utf8_bom(&bomSize); |
| 962 | fwrite(bom, 1, bomSize, f); |
| 963 | blob_to_utf8_no_bom(p, 0); |
| 964 | } |
| 965 | blob_remove_cr(p); |
| 966 | fwrite(blob_buffer(p), 1, blob_size(p), f); |
| 967 | fclose(f); |
| 968 | return 1; |
| 969 | }else if( cReply!='y' && cReply!='Y' ){ |
| 970 | fossil_fatal("Abandoning commit due to %s in %s", |
| 971 | zWarning, blob_str(&fname)); |
| 972 | } |
| 973 | blob_reset(&ans); |
| 974 | blob_reset(&fname); |
| 975 | } |
| 976 | return 0; |
| 977 | } |
| 978 | |
| 979 | /* |
| 980 | ** qsort() comparison routine for an array of pointers to strings. |
| 981 | */ |
| @@ -1065,10 +1091,11 @@ | |
| 1091 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| 1092 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 1093 | int szD; /* Size of the delta manifest */ |
| 1094 | int szB; /* Size of the baseline manifest */ |
| 1095 | int nConflict = 0; /* Number of unresolved merge conflicts */ |
| 1096 | int abortCommit = 0; |
| 1097 | Blob ans; |
| 1098 | char cReply; |
| 1099 | |
| 1100 | url_proxy_options(); |
| 1101 | noSign = find_option("nosign",0,0)!=0; |
| @@ -1312,11 +1339,12 @@ | |
| 1339 | }else{ |
| 1340 | blob_read_from_file(&content, zFullname); |
| 1341 | } |
| 1342 | /* Do not emit any warnings when they are disabled. */ |
| 1343 | if( !noWarningFlag ){ |
| 1344 | abortCommit |= commit_warning(&content, crnlOk, binOk, |
| 1345 | unicodeOk, zFullname); |
| 1346 | } |
| 1347 | if( chnged==1 && contains_merge_marker(&content) ){ |
| 1348 | Blob fname; /* Relative pathname of the file */ |
| 1349 | |
| 1350 | nConflict++; |
| @@ -1335,10 +1363,13 @@ | |
| 1363 | } |
| 1364 | db_finalize(&q); |
| 1365 | if( nConflict && !allowConflict ){ |
| 1366 | fossil_fatal("abort due to unresolved merge conflicts; " |
| 1367 | "use --allow-conflict to override"); |
| 1368 | } else if( abortCommit ){ |
| 1369 | fossil_fatal("one or more files were converted on your request; " |
| 1370 | "please re-test before committing"); |
| 1371 | } |
| 1372 | |
| 1373 | /* Create the new manifest */ |
| 1374 | if( blob_size(&comment)==0 ){ |
| 1375 | blob_append(&comment, "(no comment)", -1); |
| 1376 |
+1
-1
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -261,11 +261,11 @@ | ||
| 261 | 261 | ** Unlink the local database file |
| 262 | 262 | */ |
| 263 | 263 | static void unlink_local_database(int manifestOnly){ |
| 264 | 264 | const char *zReserved; |
| 265 | 265 | int i; |
| 266 | - for(i=0; (zReserved = fossil_reserved_name(i))!=0; i++){ | |
| 266 | + for(i=0; (zReserved = fossil_reserved_name(i, 1))!=0; i++){ | |
| 267 | 267 | if( manifestOnly==0 || zReserved[0]=='m' ){ |
| 268 | 268 | char *z; |
| 269 | 269 | z = mprintf("%s%s", g.zLocalRoot, zReserved); |
| 270 | 270 | file_delete(z); |
| 271 | 271 | free(z); |
| 272 | 272 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -261,11 +261,11 @@ | |
| 261 | ** Unlink the local database file |
| 262 | */ |
| 263 | static void unlink_local_database(int manifestOnly){ |
| 264 | const char *zReserved; |
| 265 | int i; |
| 266 | for(i=0; (zReserved = fossil_reserved_name(i))!=0; i++){ |
| 267 | if( manifestOnly==0 || zReserved[0]=='m' ){ |
| 268 | char *z; |
| 269 | z = mprintf("%s%s", g.zLocalRoot, zReserved); |
| 270 | file_delete(z); |
| 271 | free(z); |
| 272 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -261,11 +261,11 @@ | |
| 261 | ** Unlink the local database file |
| 262 | */ |
| 263 | static void unlink_local_database(int manifestOnly){ |
| 264 | const char *zReserved; |
| 265 | int i; |
| 266 | for(i=0; (zReserved = fossil_reserved_name(i, 1))!=0; i++){ |
| 267 | if( manifestOnly==0 || zReserved[0]=='m' ){ |
| 268 | char *z; |
| 269 | z = mprintf("%s%s", g.zLocalRoot, zReserved); |
| 270 | file_delete(z); |
| 271 | free(z); |
| 272 |
+21
-215
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -36,10 +36,13 @@ | ||
| 36 | 36 | #ifdef _WIN32 |
| 37 | 37 | # include <direct.h> |
| 38 | 38 | # include <windows.h> |
| 39 | 39 | # include <sys/utime.h> |
| 40 | 40 | #endif |
| 41 | +#ifdef __CYGWIN__ | |
| 42 | +# include <sys/time.h> | |
| 43 | +#endif | |
| 41 | 44 | |
| 42 | 45 | /* |
| 43 | 46 | ** The file status information from the most recent stat() call. |
| 44 | 47 | ** |
| 45 | 48 | ** Use _stati64 rather than stat on windows, in order to handle files |
| @@ -72,11 +75,11 @@ | ||
| 72 | 75 | } |
| 73 | 76 | #else |
| 74 | 77 | int rc = 0; |
| 75 | 78 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 76 | 79 | rc = _wstati64(zMbcs, buf); |
| 77 | - fossil_mbcs_free(zMbcs); | |
| 80 | + fossil_filename_free(zMbcs); | |
| 78 | 81 | return rc; |
| 79 | 82 | #endif |
| 80 | 83 | } |
| 81 | 84 | |
| 82 | 85 | /* |
| @@ -303,11 +306,11 @@ | ||
| 303 | 306 | */ |
| 304 | 307 | int file_access(const char *zFilename, int flags){ |
| 305 | 308 | #ifdef _WIN32 |
| 306 | 309 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 307 | 310 | int rc = _waccess(zMbcs, flags); |
| 308 | - fossil_mbcs_free(zMbcs); | |
| 311 | + fossil_filename_free(zMbcs); | |
| 309 | 312 | #else |
| 310 | 313 | int rc = access(zFilename, flags); |
| 311 | 314 | #endif |
| 312 | 315 | return rc; |
| 313 | 316 | } |
| @@ -407,11 +410,11 @@ | ||
| 407 | 410 | struct _utimbuf tb; |
| 408 | 411 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 409 | 412 | tb.actime = newMTime; |
| 410 | 413 | tb.modtime = newMTime; |
| 411 | 414 | _wutime(zMbcs, &tb); |
| 412 | - fossil_mbcs_free(zMbcs); | |
| 415 | + fossil_filename_free(zMbcs); | |
| 413 | 416 | #endif |
| 414 | 417 | } |
| 415 | 418 | |
| 416 | 419 | /* |
| 417 | 420 | ** COMMAND: test-set-mtime |
| @@ -439,13 +442,13 @@ | ||
| 439 | 442 | /* |
| 440 | 443 | ** Delete a file. |
| 441 | 444 | */ |
| 442 | 445 | void file_delete(const char *zFilename){ |
| 443 | 446 | #ifdef _WIN32 |
| 444 | - wchar_t *z = fossil_utf8_to_filename(zFilename); | |
| 447 | + wchar_t *z = fossil_utf8_to_unicode(zFilename); | |
| 445 | 448 | _wunlink(z); |
| 446 | - fossil_mbcs_free(z); | |
| 449 | + fossil_unicode_free(z); | |
| 447 | 450 | #else |
| 448 | 451 | unlink(zFilename); |
| 449 | 452 | #endif |
| 450 | 453 | } |
| 451 | 454 | |
| @@ -465,11 +468,11 @@ | ||
| 465 | 468 | if( rc!=1 ){ |
| 466 | 469 | #if defined(_WIN32) |
| 467 | 470 | int rc; |
| 468 | 471 | wchar_t *zMbcs = fossil_utf8_to_filename(zName); |
| 469 | 472 | rc = _wmkdir(zMbcs); |
| 470 | - fossil_mbcs_free(zMbcs); | |
| 473 | + fossil_filename_free(zMbcs); | |
| 471 | 474 | return rc; |
| 472 | 475 | #else |
| 473 | 476 | return mkdir(zName, 0755); |
| 474 | 477 | #endif |
| 475 | 478 | } |
| @@ -481,11 +484,11 @@ | ||
| 481 | 484 | ** a file in a repository. Valid filenames follow all of the |
| 482 | 485 | ** following rules: |
| 483 | 486 | ** |
| 484 | 487 | ** * Does not begin with "/" |
| 485 | 488 | ** * Does not contain any path element named "." or ".." |
| 486 | -** * Does not contain any of these characters in the path: "\" | |
| 489 | +** * Does not contain any of these characters in the path: "\*[]?" | |
| 487 | 490 | ** * Does not end with "/". |
| 488 | 491 | ** * Does not contain two or more "/" characters in a row. |
| 489 | 492 | ** * Contains at least one character |
| 490 | 493 | */ |
| 491 | 494 | int file_is_simple_pathname(const char *z){ |
| @@ -520,11 +523,11 @@ | ||
| 520 | 523 | /* Unicode character in the range U+D800 - U+DFFF are for |
| 521 | 524 | * surrogate pairs, they shouldn't occur in filenames. */ |
| 522 | 525 | return 0; |
| 523 | 526 | } |
| 524 | 527 | } |
| 525 | - if( c=='\\' ){ | |
| 528 | + if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){ | |
| 526 | 529 | return 0; |
| 527 | 530 | } |
| 528 | 531 | if( c=='/' ){ |
| 529 | 532 | if( z[i+1]=='/' ) return 0; |
| 530 | 533 | if( z[i+1]=='.' ){ |
| @@ -652,18 +655,18 @@ | ||
| 652 | 655 | int i; |
| 653 | 656 | wchar_t zPwd[2000]; |
| 654 | 657 | if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ |
| 655 | 658 | fossil_fatal("cannot find the current working directory."); |
| 656 | 659 | } |
| 657 | - zPwdUtf8 = fossil_unicode_to_utf8(zPwd); | |
| 660 | + zPwdUtf8 = fossil_filename_to_utf8(zPwd); | |
| 658 | 661 | nPwd = strlen(zPwdUtf8); |
| 659 | 662 | if( nPwd > nBuf-1 ){ |
| 660 | 663 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 661 | 664 | } |
| 662 | 665 | for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/'; |
| 663 | 666 | memcpy(zBuf, zPwdUtf8, nPwd+1); |
| 664 | - fossil_mbcs_free(zPwdUtf8); | |
| 667 | + fossil_filename_free(zPwdUtf8); | |
| 665 | 668 | #else |
| 666 | 669 | if( getcwd(zBuf, nBuf-1)==0 ){ |
| 667 | 670 | if( errno==ERANGE ){ |
| 668 | 671 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 669 | 672 | }else{ |
| @@ -1009,11 +1012,11 @@ | ||
| 1009 | 1012 | |
| 1010 | 1013 | #if defined(_WIN32) |
| 1011 | 1014 | wchar_t zTmpPath[MAX_PATH]; |
| 1012 | 1015 | |
| 1013 | 1016 | if( GetTempPathW(MAX_PATH, zTmpPath) ){ |
| 1014 | - azDirs[0] = fossil_unicode_to_utf8(zTmpPath); | |
| 1017 | + azDirs[0] = fossil_filename_to_utf8(zTmpPath); | |
| 1015 | 1018 | } |
| 1016 | 1019 | |
| 1017 | 1020 | azDirs[1] = fossil_getenv("TEMP"); |
| 1018 | 1021 | azDirs[2] = fossil_getenv("TMP"); |
| 1019 | 1022 | #endif |
| @@ -1043,12 +1046,12 @@ | ||
| 1043 | 1046 | } |
| 1044 | 1047 | zBuf[j] = 0; |
| 1045 | 1048 | }while( file_size(zBuf)>=0 ); |
| 1046 | 1049 | |
| 1047 | 1050 | #if defined(_WIN32) |
| 1048 | - fossil_mbcs_free((char *)azDirs[1]); | |
| 1049 | - fossil_mbcs_free((char *)azDirs[2]); | |
| 1051 | + fossil_unicode_free((char *)azDirs[1]); | |
| 1052 | + fossil_unicode_free((char *)azDirs[2]); | |
| 1050 | 1053 | #endif |
| 1051 | 1054 | } |
| 1052 | 1055 | |
| 1053 | 1056 | |
| 1054 | 1057 | /* |
| @@ -1088,233 +1091,36 @@ | ||
| 1088 | 1091 | # define closedir _wclosedir |
| 1089 | 1092 | #endif /* _WIN32 */ |
| 1090 | 1093 | |
| 1091 | 1094 | #endif /* INTERFACE */ |
| 1092 | 1095 | |
| 1093 | - | |
| 1094 | - | |
| 1095 | -/************************************************************************** | |
| 1096 | -** The following routines translate between MBCS and UTF8 on windows. | |
| 1097 | -** Since everything is always UTF8 on unix, these routines are no-ops | |
| 1098 | -** there. | |
| 1099 | -*/ | |
| 1100 | - | |
| 1101 | -/* | |
| 1102 | -** Translate MBCS to UTF8. Return a pointer to the translated text. | |
| 1103 | -** Call fossil_mbcs_free() to deallocate any memory used to store the | |
| 1104 | -** returned pointer when done. | |
| 1105 | -*/ | |
| 1106 | -char *fossil_mbcs_to_utf8(const char *zMbcs){ | |
| 1107 | -#ifdef _WIN32 | |
| 1108 | - extern char *sqlite3_win32_mbcs_to_utf8(const char*); | |
| 1109 | - return sqlite3_win32_mbcs_to_utf8(zMbcs); | |
| 1110 | -#else | |
| 1111 | - return (char*)zMbcs; /* No-op on unix */ | |
| 1112 | -#endif | |
| 1113 | -} | |
| 1114 | - | |
| 1115 | -/* | |
| 1116 | -** Translate Unicode to UTF8. Return a pointer to the translated text. | |
| 1117 | -** Call fossil_mbcs_free() to deallocate any memory used to store the | |
| 1118 | -** returned pointer when done. | |
| 1119 | -*/ | |
| 1120 | -char *fossil_unicode_to_utf8(const void *zUnicode){ | |
| 1121 | -#ifdef _WIN32 | |
| 1122 | - int nByte = WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, 0, 0, 0, 0); | |
| 1123 | - char *zUtf = sqlite3_malloc( nByte ); | |
| 1124 | - if( zUtf==0 ){ | |
| 1125 | - return 0; | |
| 1126 | - } | |
| 1127 | - WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, zUtf, nByte, 0, 0); | |
| 1128 | - return zUtf; | |
| 1129 | -#else | |
| 1130 | - return (char *)zUnicode; /* No-op on unix */ | |
| 1131 | -#endif | |
| 1132 | -} | |
| 1133 | - | |
| 1134 | -/* | |
| 1135 | -** Translate Unicode (filename) to UTF8. Return a pointer to the | |
| 1136 | -** translated text. Call fossil_mbcs_free() to deallocate any | |
| 1137 | -** memory used to store the returned pointer when done. | |
| 1138 | -** | |
| 1139 | -** On Windows, characters in the range U+F001 to U+F07F (private use area) | |
| 1140 | -** are translated in ASCII characters in the range U+0001 - U+007F. The | |
| 1141 | -** only place they can come from are filenames using Cygwin's trick | |
| 1142 | -** to circumvent invalid characters in filenames. | |
| 1143 | -** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> | |
| 1144 | -** This way, fossil will work nicely together with the cygwin shell | |
| 1145 | -** handling those filenames. On other shells, the generated filename | |
| 1146 | -** might not be as expected, but apart from that nothing goes wrong. | |
| 1147 | -*/ | |
| 1148 | -char *fossil_filename_to_utf8(void *zUnicode){ | |
| 1149 | -#ifdef _WIN32 | |
| 1150 | - WCHAR *wUnicode = zUnicode; | |
| 1151 | - while( *wUnicode != 0 ){ | |
| 1152 | - if ( (*wUnicode & 0xFF80) == 0xF000 ){ | |
| 1153 | - WCHAR converted = (*wUnicode & 0x7F); | |
| 1154 | - /* Only really convert it when the resulting char is in the given range*/ | |
| 1155 | - if ( (converted < 32) || wcschr(L"\"*<>?|:", converted) ){ | |
| 1156 | - *wUnicode = converted; | |
| 1157 | - } | |
| 1158 | - } | |
| 1159 | - ++wUnicode; | |
| 1160 | - } | |
| 1161 | - return fossil_unicode_to_utf8(zUnicode); | |
| 1162 | -#else | |
| 1163 | - return (char *)zUnicode; /* No-op on unix */ | |
| 1164 | -#endif | |
| 1165 | -} | |
| 1166 | - | |
| 1167 | -/* | |
| 1168 | -** Translate UTF8 to MBCS for use in system calls. Return a pointer to the | |
| 1169 | -** translated text.. Call fossil_mbcs_free() to deallocate any memory | |
| 1170 | -** used to store the returned pointer when done. | |
| 1171 | -*/ | |
| 1172 | -char *fossil_utf8_to_mbcs(const char *zUtf8){ | |
| 1173 | -#ifdef _WIN32 | |
| 1174 | - extern char *sqlite3_win32_utf8_to_mbcs(const char*); | |
| 1175 | - return sqlite3_win32_utf8_to_mbcs(zUtf8); | |
| 1176 | -#else | |
| 1177 | - return (char*)zUtf8; /* No-op on unix */ | |
| 1178 | -#endif | |
| 1179 | -} | |
| 1180 | - | |
| 1181 | -/* | |
| 1182 | -** Translate UTF8 to unicode for use in system calls. Return a pointer to the | |
| 1183 | -** translated text.. Call fossil_mbcs_free() to deallocate any memory | |
| 1184 | -** used to store the returned pointer when done. | |
| 1185 | -*/ | |
| 1186 | -void *fossil_utf8_to_unicode(const char *zUtf8){ | |
| 1187 | -#ifdef _WIN32 | |
| 1188 | - int nByte = MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, 0, 0); | |
| 1189 | - wchar_t *zUnicode = sqlite3_malloc( nByte * 2 ); | |
| 1190 | - if( zUnicode==0 ){ | |
| 1191 | - return 0; | |
| 1192 | - } | |
| 1193 | - MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, nByte); | |
| 1194 | - | |
| 1195 | - return zUnicode; | |
| 1196 | -#else | |
| 1197 | - return (void *)zUtf8; /* No-op on unix */ | |
| 1198 | -#endif | |
| 1199 | -} | |
| 1200 | - | |
| 1201 | -/* | |
| 1202 | -** Translate UTF8 to unicode for use in filename translations. | |
| 1203 | -** Return a pointer to the translated text.. Call fossil_mbcs_free() | |
| 1204 | -** to deallocate any memory used to store the returned pointer when done. | |
| 1205 | -** | |
| 1206 | -** On Windows, characters in the range U+0001 to U+0031 and the | |
| 1207 | -** characters '"', '*', ':', '<', '>', '?', '|' and '\\' are invalid | |
| 1208 | -** to be used. Therefore, translated those to characters in the | |
| 1209 | -** (private use area), in the range U+F001 - U+F07F, so those | |
| 1210 | -** characters never arrive in any Windows API. The filenames might | |
| 1211 | -** look strange in Windows explorer, but in the cygwin shell | |
| 1212 | -** everything looks as expected. | |
| 1213 | -** | |
| 1214 | -** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> | |
| 1215 | -** | |
| 1216 | -*/ | |
| 1217 | -void *fossil_utf8_to_filename(const char *zUtf8){ | |
| 1218 | -#ifdef _WIN32 | |
| 1219 | - WCHAR *zUnicode = fossil_utf8_to_unicode(zUtf8); | |
| 1220 | - WCHAR *wUnicode = zUnicode; | |
| 1221 | - /* If path starts with "<drive>:/" or "<drive>:\", don't translate the ':' */ | |
| 1222 | - if( fossil_isalpha(zUtf8[0]) && zUtf8[1]==':' | |
| 1223 | - && (zUtf8[2]=='\\' || zUtf8[2]=='/')) { | |
| 1224 | - wUnicode += 3; | |
| 1225 | - } | |
| 1226 | - while( *wUnicode != '\0' ){ | |
| 1227 | - if ( (*wUnicode < 32) || wcschr(L"\"*<>?|:", *wUnicode) ){ | |
| 1228 | - *wUnicode |= 0xF000; | |
| 1229 | - } | |
| 1230 | - ++wUnicode; | |
| 1231 | - } | |
| 1232 | - | |
| 1233 | - return zUnicode; | |
| 1234 | -#else | |
| 1235 | - return (void *)zUtf8; /* No-op on unix */ | |
| 1236 | -#endif | |
| 1237 | -} | |
| 1238 | - | |
| 1239 | 1096 | /* |
| 1240 | 1097 | ** Return the value of an environment variable as UTF8. |
| 1098 | +** Use fossil_filename_free() to release resources. | |
| 1241 | 1099 | */ |
| 1242 | 1100 | char *fossil_getenv(const char *zName){ |
| 1243 | 1101 | #ifdef _WIN32 |
| 1244 | 1102 | wchar_t *uName = fossil_utf8_to_unicode(zName); |
| 1245 | 1103 | void *zValue = _wgetenv(uName); |
| 1246 | - fossil_mbcs_free(uName); | |
| 1247 | - if( zValue ) zValue = fossil_unicode_to_utf8(zValue); | |
| 1104 | + fossil_unicode_free(uName); | |
| 1248 | 1105 | #else |
| 1249 | 1106 | char *zValue = getenv(zName); |
| 1250 | 1107 | #endif |
| 1108 | + if( zValue ) zValue = fossil_filename_to_utf8(zValue); | |
| 1251 | 1109 | return zValue; |
| 1252 | 1110 | } |
| 1253 | 1111 | |
| 1254 | -/* | |
| 1255 | -** Display UTF8 on the console. Return the number of | |
| 1256 | -** Characters written. If stdout or stderr is redirected | |
| 1257 | -** to a file, -1 is returned and nothing is written | |
| 1258 | -** to the console. | |
| 1259 | -*/ | |
| 1260 | -int fossil_utf8_to_console(const char *zUtf8, int nByte, int toStdErr){ | |
| 1261 | -#ifdef _WIN32 | |
| 1262 | - int nChar; | |
| 1263 | - wchar_t *zUnicode; /* Unicode version of zUtf8 */ | |
| 1264 | - DWORD dummy; | |
| 1265 | - | |
| 1266 | - static int istty[2] = { -1, -1 }; | |
| 1267 | - if( istty[toStdErr] == -1 ){ | |
| 1268 | - istty[toStdErr] = _isatty(toStdErr + 1) != 0; | |
| 1269 | - } | |
| 1270 | - if( !istty[toStdErr] ){ | |
| 1271 | - /* stdout/stderr is not a console. */ | |
| 1272 | - return -1; | |
| 1273 | - } | |
| 1274 | - | |
| 1275 | - nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, NULL, 0); | |
| 1276 | - zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) ); | |
| 1277 | - if( zUnicode==0 ){ | |
| 1278 | - return 0; | |
| 1279 | - } | |
| 1280 | - nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, zUnicode, nChar); | |
| 1281 | - if( nChar==0 ){ | |
| 1282 | - free(zUnicode); | |
| 1283 | - return 0; | |
| 1284 | - } | |
| 1285 | - zUnicode[nChar] = '\0'; | |
| 1286 | - WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE - toStdErr), zUnicode, nChar, &dummy, 0); | |
| 1287 | - return nChar; | |
| 1288 | -#else | |
| 1289 | - return -1; /* No-op on unix */ | |
| 1290 | -#endif | |
| 1291 | -} | |
| 1292 | - | |
| 1293 | -/* | |
| 1294 | -** Translate MBCS to UTF8. Return a pointer. Call fossil_mbcs_free() | |
| 1295 | -** to deallocate any memory used to store the returned pointer when done. | |
| 1296 | -*/ | |
| 1297 | -void fossil_mbcs_free(void *zOld){ | |
| 1298 | -#ifdef _WIN32 | |
| 1299 | - extern void sqlite3_free(void*); | |
| 1300 | - sqlite3_free(zOld); | |
| 1301 | -#else | |
| 1302 | - /* No-op on unix */ | |
| 1303 | -#endif | |
| 1304 | -} | |
| 1305 | - | |
| 1306 | 1112 | /* |
| 1307 | 1113 | ** Like fopen() but always takes a UTF8 argument. |
| 1308 | 1114 | */ |
| 1309 | 1115 | FILE *fossil_fopen(const char *zName, const char *zMode){ |
| 1310 | 1116 | #ifdef _WIN32 |
| 1311 | 1117 | wchar_t *uMode = fossil_utf8_to_unicode(zMode); |
| 1312 | 1118 | wchar_t *uName = fossil_utf8_to_filename(zName); |
| 1313 | 1119 | FILE *f = _wfopen(uName, uMode); |
| 1314 | - fossil_mbcs_free(uName); | |
| 1315 | - fossil_mbcs_free(uMode); | |
| 1120 | + fossil_filename_free(uName); | |
| 1121 | + fossil_unicode_free(uMode); | |
| 1316 | 1122 | #else |
| 1317 | 1123 | FILE *f = fopen(zName, zMode); |
| 1318 | 1124 | #endif |
| 1319 | 1125 | return f; |
| 1320 | 1126 | } |
| 1321 | 1127 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -36,10 +36,13 @@ | |
| 36 | #ifdef _WIN32 |
| 37 | # include <direct.h> |
| 38 | # include <windows.h> |
| 39 | # include <sys/utime.h> |
| 40 | #endif |
| 41 | |
| 42 | /* |
| 43 | ** The file status information from the most recent stat() call. |
| 44 | ** |
| 45 | ** Use _stati64 rather than stat on windows, in order to handle files |
| @@ -72,11 +75,11 @@ | |
| 72 | } |
| 73 | #else |
| 74 | int rc = 0; |
| 75 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 76 | rc = _wstati64(zMbcs, buf); |
| 77 | fossil_mbcs_free(zMbcs); |
| 78 | return rc; |
| 79 | #endif |
| 80 | } |
| 81 | |
| 82 | /* |
| @@ -303,11 +306,11 @@ | |
| 303 | */ |
| 304 | int file_access(const char *zFilename, int flags){ |
| 305 | #ifdef _WIN32 |
| 306 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 307 | int rc = _waccess(zMbcs, flags); |
| 308 | fossil_mbcs_free(zMbcs); |
| 309 | #else |
| 310 | int rc = access(zFilename, flags); |
| 311 | #endif |
| 312 | return rc; |
| 313 | } |
| @@ -407,11 +410,11 @@ | |
| 407 | struct _utimbuf tb; |
| 408 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 409 | tb.actime = newMTime; |
| 410 | tb.modtime = newMTime; |
| 411 | _wutime(zMbcs, &tb); |
| 412 | fossil_mbcs_free(zMbcs); |
| 413 | #endif |
| 414 | } |
| 415 | |
| 416 | /* |
| 417 | ** COMMAND: test-set-mtime |
| @@ -439,13 +442,13 @@ | |
| 439 | /* |
| 440 | ** Delete a file. |
| 441 | */ |
| 442 | void file_delete(const char *zFilename){ |
| 443 | #ifdef _WIN32 |
| 444 | wchar_t *z = fossil_utf8_to_filename(zFilename); |
| 445 | _wunlink(z); |
| 446 | fossil_mbcs_free(z); |
| 447 | #else |
| 448 | unlink(zFilename); |
| 449 | #endif |
| 450 | } |
| 451 | |
| @@ -465,11 +468,11 @@ | |
| 465 | if( rc!=1 ){ |
| 466 | #if defined(_WIN32) |
| 467 | int rc; |
| 468 | wchar_t *zMbcs = fossil_utf8_to_filename(zName); |
| 469 | rc = _wmkdir(zMbcs); |
| 470 | fossil_mbcs_free(zMbcs); |
| 471 | return rc; |
| 472 | #else |
| 473 | return mkdir(zName, 0755); |
| 474 | #endif |
| 475 | } |
| @@ -481,11 +484,11 @@ | |
| 481 | ** a file in a repository. Valid filenames follow all of the |
| 482 | ** following rules: |
| 483 | ** |
| 484 | ** * Does not begin with "/" |
| 485 | ** * Does not contain any path element named "." or ".." |
| 486 | ** * Does not contain any of these characters in the path: "\" |
| 487 | ** * Does not end with "/". |
| 488 | ** * Does not contain two or more "/" characters in a row. |
| 489 | ** * Contains at least one character |
| 490 | */ |
| 491 | int file_is_simple_pathname(const char *z){ |
| @@ -520,11 +523,11 @@ | |
| 520 | /* Unicode character in the range U+D800 - U+DFFF are for |
| 521 | * surrogate pairs, they shouldn't occur in filenames. */ |
| 522 | return 0; |
| 523 | } |
| 524 | } |
| 525 | if( c=='\\' ){ |
| 526 | return 0; |
| 527 | } |
| 528 | if( c=='/' ){ |
| 529 | if( z[i+1]=='/' ) return 0; |
| 530 | if( z[i+1]=='.' ){ |
| @@ -652,18 +655,18 @@ | |
| 652 | int i; |
| 653 | wchar_t zPwd[2000]; |
| 654 | if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ |
| 655 | fossil_fatal("cannot find the current working directory."); |
| 656 | } |
| 657 | zPwdUtf8 = fossil_unicode_to_utf8(zPwd); |
| 658 | nPwd = strlen(zPwdUtf8); |
| 659 | if( nPwd > nBuf-1 ){ |
| 660 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 661 | } |
| 662 | for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/'; |
| 663 | memcpy(zBuf, zPwdUtf8, nPwd+1); |
| 664 | fossil_mbcs_free(zPwdUtf8); |
| 665 | #else |
| 666 | if( getcwd(zBuf, nBuf-1)==0 ){ |
| 667 | if( errno==ERANGE ){ |
| 668 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 669 | }else{ |
| @@ -1009,11 +1012,11 @@ | |
| 1009 | |
| 1010 | #if defined(_WIN32) |
| 1011 | wchar_t zTmpPath[MAX_PATH]; |
| 1012 | |
| 1013 | if( GetTempPathW(MAX_PATH, zTmpPath) ){ |
| 1014 | azDirs[0] = fossil_unicode_to_utf8(zTmpPath); |
| 1015 | } |
| 1016 | |
| 1017 | azDirs[1] = fossil_getenv("TEMP"); |
| 1018 | azDirs[2] = fossil_getenv("TMP"); |
| 1019 | #endif |
| @@ -1043,12 +1046,12 @@ | |
| 1043 | } |
| 1044 | zBuf[j] = 0; |
| 1045 | }while( file_size(zBuf)>=0 ); |
| 1046 | |
| 1047 | #if defined(_WIN32) |
| 1048 | fossil_mbcs_free((char *)azDirs[1]); |
| 1049 | fossil_mbcs_free((char *)azDirs[2]); |
| 1050 | #endif |
| 1051 | } |
| 1052 | |
| 1053 | |
| 1054 | /* |
| @@ -1088,233 +1091,36 @@ | |
| 1088 | # define closedir _wclosedir |
| 1089 | #endif /* _WIN32 */ |
| 1090 | |
| 1091 | #endif /* INTERFACE */ |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | /************************************************************************** |
| 1096 | ** The following routines translate between MBCS and UTF8 on windows. |
| 1097 | ** Since everything is always UTF8 on unix, these routines are no-ops |
| 1098 | ** there. |
| 1099 | */ |
| 1100 | |
| 1101 | /* |
| 1102 | ** Translate MBCS to UTF8. Return a pointer to the translated text. |
| 1103 | ** Call fossil_mbcs_free() to deallocate any memory used to store the |
| 1104 | ** returned pointer when done. |
| 1105 | */ |
| 1106 | char *fossil_mbcs_to_utf8(const char *zMbcs){ |
| 1107 | #ifdef _WIN32 |
| 1108 | extern char *sqlite3_win32_mbcs_to_utf8(const char*); |
| 1109 | return sqlite3_win32_mbcs_to_utf8(zMbcs); |
| 1110 | #else |
| 1111 | return (char*)zMbcs; /* No-op on unix */ |
| 1112 | #endif |
| 1113 | } |
| 1114 | |
| 1115 | /* |
| 1116 | ** Translate Unicode to UTF8. Return a pointer to the translated text. |
| 1117 | ** Call fossil_mbcs_free() to deallocate any memory used to store the |
| 1118 | ** returned pointer when done. |
| 1119 | */ |
| 1120 | char *fossil_unicode_to_utf8(const void *zUnicode){ |
| 1121 | #ifdef _WIN32 |
| 1122 | int nByte = WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, 0, 0, 0, 0); |
| 1123 | char *zUtf = sqlite3_malloc( nByte ); |
| 1124 | if( zUtf==0 ){ |
| 1125 | return 0; |
| 1126 | } |
| 1127 | WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, zUtf, nByte, 0, 0); |
| 1128 | return zUtf; |
| 1129 | #else |
| 1130 | return (char *)zUnicode; /* No-op on unix */ |
| 1131 | #endif |
| 1132 | } |
| 1133 | |
| 1134 | /* |
| 1135 | ** Translate Unicode (filename) to UTF8. Return a pointer to the |
| 1136 | ** translated text. Call fossil_mbcs_free() to deallocate any |
| 1137 | ** memory used to store the returned pointer when done. |
| 1138 | ** |
| 1139 | ** On Windows, characters in the range U+F001 to U+F07F (private use area) |
| 1140 | ** are translated in ASCII characters in the range U+0001 - U+007F. The |
| 1141 | ** only place they can come from are filenames using Cygwin's trick |
| 1142 | ** to circumvent invalid characters in filenames. |
| 1143 | ** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> |
| 1144 | ** This way, fossil will work nicely together with the cygwin shell |
| 1145 | ** handling those filenames. On other shells, the generated filename |
| 1146 | ** might not be as expected, but apart from that nothing goes wrong. |
| 1147 | */ |
| 1148 | char *fossil_filename_to_utf8(void *zUnicode){ |
| 1149 | #ifdef _WIN32 |
| 1150 | WCHAR *wUnicode = zUnicode; |
| 1151 | while( *wUnicode != 0 ){ |
| 1152 | if ( (*wUnicode & 0xFF80) == 0xF000 ){ |
| 1153 | WCHAR converted = (*wUnicode & 0x7F); |
| 1154 | /* Only really convert it when the resulting char is in the given range*/ |
| 1155 | if ( (converted < 32) || wcschr(L"\"*<>?|:", converted) ){ |
| 1156 | *wUnicode = converted; |
| 1157 | } |
| 1158 | } |
| 1159 | ++wUnicode; |
| 1160 | } |
| 1161 | return fossil_unicode_to_utf8(zUnicode); |
| 1162 | #else |
| 1163 | return (char *)zUnicode; /* No-op on unix */ |
| 1164 | #endif |
| 1165 | } |
| 1166 | |
| 1167 | /* |
| 1168 | ** Translate UTF8 to MBCS for use in system calls. Return a pointer to the |
| 1169 | ** translated text.. Call fossil_mbcs_free() to deallocate any memory |
| 1170 | ** used to store the returned pointer when done. |
| 1171 | */ |
| 1172 | char *fossil_utf8_to_mbcs(const char *zUtf8){ |
| 1173 | #ifdef _WIN32 |
| 1174 | extern char *sqlite3_win32_utf8_to_mbcs(const char*); |
| 1175 | return sqlite3_win32_utf8_to_mbcs(zUtf8); |
| 1176 | #else |
| 1177 | return (char*)zUtf8; /* No-op on unix */ |
| 1178 | #endif |
| 1179 | } |
| 1180 | |
| 1181 | /* |
| 1182 | ** Translate UTF8 to unicode for use in system calls. Return a pointer to the |
| 1183 | ** translated text.. Call fossil_mbcs_free() to deallocate any memory |
| 1184 | ** used to store the returned pointer when done. |
| 1185 | */ |
| 1186 | void *fossil_utf8_to_unicode(const char *zUtf8){ |
| 1187 | #ifdef _WIN32 |
| 1188 | int nByte = MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, 0, 0); |
| 1189 | wchar_t *zUnicode = sqlite3_malloc( nByte * 2 ); |
| 1190 | if( zUnicode==0 ){ |
| 1191 | return 0; |
| 1192 | } |
| 1193 | MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, nByte); |
| 1194 | |
| 1195 | return zUnicode; |
| 1196 | #else |
| 1197 | return (void *)zUtf8; /* No-op on unix */ |
| 1198 | #endif |
| 1199 | } |
| 1200 | |
| 1201 | /* |
| 1202 | ** Translate UTF8 to unicode for use in filename translations. |
| 1203 | ** Return a pointer to the translated text.. Call fossil_mbcs_free() |
| 1204 | ** to deallocate any memory used to store the returned pointer when done. |
| 1205 | ** |
| 1206 | ** On Windows, characters in the range U+0001 to U+0031 and the |
| 1207 | ** characters '"', '*', ':', '<', '>', '?', '|' and '\\' are invalid |
| 1208 | ** to be used. Therefore, translated those to characters in the |
| 1209 | ** (private use area), in the range U+F001 - U+F07F, so those |
| 1210 | ** characters never arrive in any Windows API. The filenames might |
| 1211 | ** look strange in Windows explorer, but in the cygwin shell |
| 1212 | ** everything looks as expected. |
| 1213 | ** |
| 1214 | ** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> |
| 1215 | ** |
| 1216 | */ |
| 1217 | void *fossil_utf8_to_filename(const char *zUtf8){ |
| 1218 | #ifdef _WIN32 |
| 1219 | WCHAR *zUnicode = fossil_utf8_to_unicode(zUtf8); |
| 1220 | WCHAR *wUnicode = zUnicode; |
| 1221 | /* If path starts with "<drive>:/" or "<drive>:\", don't translate the ':' */ |
| 1222 | if( fossil_isalpha(zUtf8[0]) && zUtf8[1]==':' |
| 1223 | && (zUtf8[2]=='\\' || zUtf8[2]=='/')) { |
| 1224 | wUnicode += 3; |
| 1225 | } |
| 1226 | while( *wUnicode != '\0' ){ |
| 1227 | if ( (*wUnicode < 32) || wcschr(L"\"*<>?|:", *wUnicode) ){ |
| 1228 | *wUnicode |= 0xF000; |
| 1229 | } |
| 1230 | ++wUnicode; |
| 1231 | } |
| 1232 | |
| 1233 | return zUnicode; |
| 1234 | #else |
| 1235 | return (void *)zUtf8; /* No-op on unix */ |
| 1236 | #endif |
| 1237 | } |
| 1238 | |
| 1239 | /* |
| 1240 | ** Return the value of an environment variable as UTF8. |
| 1241 | */ |
| 1242 | char *fossil_getenv(const char *zName){ |
| 1243 | #ifdef _WIN32 |
| 1244 | wchar_t *uName = fossil_utf8_to_unicode(zName); |
| 1245 | void *zValue = _wgetenv(uName); |
| 1246 | fossil_mbcs_free(uName); |
| 1247 | if( zValue ) zValue = fossil_unicode_to_utf8(zValue); |
| 1248 | #else |
| 1249 | char *zValue = getenv(zName); |
| 1250 | #endif |
| 1251 | return zValue; |
| 1252 | } |
| 1253 | |
| 1254 | /* |
| 1255 | ** Display UTF8 on the console. Return the number of |
| 1256 | ** Characters written. If stdout or stderr is redirected |
| 1257 | ** to a file, -1 is returned and nothing is written |
| 1258 | ** to the console. |
| 1259 | */ |
| 1260 | int fossil_utf8_to_console(const char *zUtf8, int nByte, int toStdErr){ |
| 1261 | #ifdef _WIN32 |
| 1262 | int nChar; |
| 1263 | wchar_t *zUnicode; /* Unicode version of zUtf8 */ |
| 1264 | DWORD dummy; |
| 1265 | |
| 1266 | static int istty[2] = { -1, -1 }; |
| 1267 | if( istty[toStdErr] == -1 ){ |
| 1268 | istty[toStdErr] = _isatty(toStdErr + 1) != 0; |
| 1269 | } |
| 1270 | if( !istty[toStdErr] ){ |
| 1271 | /* stdout/stderr is not a console. */ |
| 1272 | return -1; |
| 1273 | } |
| 1274 | |
| 1275 | nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, NULL, 0); |
| 1276 | zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) ); |
| 1277 | if( zUnicode==0 ){ |
| 1278 | return 0; |
| 1279 | } |
| 1280 | nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, zUnicode, nChar); |
| 1281 | if( nChar==0 ){ |
| 1282 | free(zUnicode); |
| 1283 | return 0; |
| 1284 | } |
| 1285 | zUnicode[nChar] = '\0'; |
| 1286 | WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE - toStdErr), zUnicode, nChar, &dummy, 0); |
| 1287 | return nChar; |
| 1288 | #else |
| 1289 | return -1; /* No-op on unix */ |
| 1290 | #endif |
| 1291 | } |
| 1292 | |
| 1293 | /* |
| 1294 | ** Translate MBCS to UTF8. Return a pointer. Call fossil_mbcs_free() |
| 1295 | ** to deallocate any memory used to store the returned pointer when done. |
| 1296 | */ |
| 1297 | void fossil_mbcs_free(void *zOld){ |
| 1298 | #ifdef _WIN32 |
| 1299 | extern void sqlite3_free(void*); |
| 1300 | sqlite3_free(zOld); |
| 1301 | #else |
| 1302 | /* No-op on unix */ |
| 1303 | #endif |
| 1304 | } |
| 1305 | |
| 1306 | /* |
| 1307 | ** Like fopen() but always takes a UTF8 argument. |
| 1308 | */ |
| 1309 | FILE *fossil_fopen(const char *zName, const char *zMode){ |
| 1310 | #ifdef _WIN32 |
| 1311 | wchar_t *uMode = fossil_utf8_to_unicode(zMode); |
| 1312 | wchar_t *uName = fossil_utf8_to_filename(zName); |
| 1313 | FILE *f = _wfopen(uName, uMode); |
| 1314 | fossil_mbcs_free(uName); |
| 1315 | fossil_mbcs_free(uMode); |
| 1316 | #else |
| 1317 | FILE *f = fopen(zName, zMode); |
| 1318 | #endif |
| 1319 | return f; |
| 1320 | } |
| 1321 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -36,10 +36,13 @@ | |
| 36 | #ifdef _WIN32 |
| 37 | # include <direct.h> |
| 38 | # include <windows.h> |
| 39 | # include <sys/utime.h> |
| 40 | #endif |
| 41 | #ifdef __CYGWIN__ |
| 42 | # include <sys/time.h> |
| 43 | #endif |
| 44 | |
| 45 | /* |
| 46 | ** The file status information from the most recent stat() call. |
| 47 | ** |
| 48 | ** Use _stati64 rather than stat on windows, in order to handle files |
| @@ -72,11 +75,11 @@ | |
| 75 | } |
| 76 | #else |
| 77 | int rc = 0; |
| 78 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 79 | rc = _wstati64(zMbcs, buf); |
| 80 | fossil_filename_free(zMbcs); |
| 81 | return rc; |
| 82 | #endif |
| 83 | } |
| 84 | |
| 85 | /* |
| @@ -303,11 +306,11 @@ | |
| 306 | */ |
| 307 | int file_access(const char *zFilename, int flags){ |
| 308 | #ifdef _WIN32 |
| 309 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 310 | int rc = _waccess(zMbcs, flags); |
| 311 | fossil_filename_free(zMbcs); |
| 312 | #else |
| 313 | int rc = access(zFilename, flags); |
| 314 | #endif |
| 315 | return rc; |
| 316 | } |
| @@ -407,11 +410,11 @@ | |
| 410 | struct _utimbuf tb; |
| 411 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 412 | tb.actime = newMTime; |
| 413 | tb.modtime = newMTime; |
| 414 | _wutime(zMbcs, &tb); |
| 415 | fossil_filename_free(zMbcs); |
| 416 | #endif |
| 417 | } |
| 418 | |
| 419 | /* |
| 420 | ** COMMAND: test-set-mtime |
| @@ -439,13 +442,13 @@ | |
| 442 | /* |
| 443 | ** Delete a file. |
| 444 | */ |
| 445 | void file_delete(const char *zFilename){ |
| 446 | #ifdef _WIN32 |
| 447 | wchar_t *z = fossil_utf8_to_unicode(zFilename); |
| 448 | _wunlink(z); |
| 449 | fossil_unicode_free(z); |
| 450 | #else |
| 451 | unlink(zFilename); |
| 452 | #endif |
| 453 | } |
| 454 | |
| @@ -465,11 +468,11 @@ | |
| 468 | if( rc!=1 ){ |
| 469 | #if defined(_WIN32) |
| 470 | int rc; |
| 471 | wchar_t *zMbcs = fossil_utf8_to_filename(zName); |
| 472 | rc = _wmkdir(zMbcs); |
| 473 | fossil_filename_free(zMbcs); |
| 474 | return rc; |
| 475 | #else |
| 476 | return mkdir(zName, 0755); |
| 477 | #endif |
| 478 | } |
| @@ -481,11 +484,11 @@ | |
| 484 | ** a file in a repository. Valid filenames follow all of the |
| 485 | ** following rules: |
| 486 | ** |
| 487 | ** * Does not begin with "/" |
| 488 | ** * Does not contain any path element named "." or ".." |
| 489 | ** * Does not contain any of these characters in the path: "\*[]?" |
| 490 | ** * Does not end with "/". |
| 491 | ** * Does not contain two or more "/" characters in a row. |
| 492 | ** * Contains at least one character |
| 493 | */ |
| 494 | int file_is_simple_pathname(const char *z){ |
| @@ -520,11 +523,11 @@ | |
| 523 | /* Unicode character in the range U+D800 - U+DFFF are for |
| 524 | * surrogate pairs, they shouldn't occur in filenames. */ |
| 525 | return 0; |
| 526 | } |
| 527 | } |
| 528 | if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){ |
| 529 | return 0; |
| 530 | } |
| 531 | if( c=='/' ){ |
| 532 | if( z[i+1]=='/' ) return 0; |
| 533 | if( z[i+1]=='.' ){ |
| @@ -652,18 +655,18 @@ | |
| 655 | int i; |
| 656 | wchar_t zPwd[2000]; |
| 657 | if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ |
| 658 | fossil_fatal("cannot find the current working directory."); |
| 659 | } |
| 660 | zPwdUtf8 = fossil_filename_to_utf8(zPwd); |
| 661 | nPwd = strlen(zPwdUtf8); |
| 662 | if( nPwd > nBuf-1 ){ |
| 663 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 664 | } |
| 665 | for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/'; |
| 666 | memcpy(zBuf, zPwdUtf8, nPwd+1); |
| 667 | fossil_filename_free(zPwdUtf8); |
| 668 | #else |
| 669 | if( getcwd(zBuf, nBuf-1)==0 ){ |
| 670 | if( errno==ERANGE ){ |
| 671 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 672 | }else{ |
| @@ -1009,11 +1012,11 @@ | |
| 1012 | |
| 1013 | #if defined(_WIN32) |
| 1014 | wchar_t zTmpPath[MAX_PATH]; |
| 1015 | |
| 1016 | if( GetTempPathW(MAX_PATH, zTmpPath) ){ |
| 1017 | azDirs[0] = fossil_filename_to_utf8(zTmpPath); |
| 1018 | } |
| 1019 | |
| 1020 | azDirs[1] = fossil_getenv("TEMP"); |
| 1021 | azDirs[2] = fossil_getenv("TMP"); |
| 1022 | #endif |
| @@ -1043,12 +1046,12 @@ | |
| 1046 | } |
| 1047 | zBuf[j] = 0; |
| 1048 | }while( file_size(zBuf)>=0 ); |
| 1049 | |
| 1050 | #if defined(_WIN32) |
| 1051 | fossil_unicode_free((char *)azDirs[1]); |
| 1052 | fossil_unicode_free((char *)azDirs[2]); |
| 1053 | #endif |
| 1054 | } |
| 1055 | |
| 1056 | |
| 1057 | /* |
| @@ -1088,233 +1091,36 @@ | |
| 1091 | # define closedir _wclosedir |
| 1092 | #endif /* _WIN32 */ |
| 1093 | |
| 1094 | #endif /* INTERFACE */ |
| 1095 | |
| 1096 | /* |
| 1097 | ** Return the value of an environment variable as UTF8. |
| 1098 | ** Use fossil_filename_free() to release resources. |
| 1099 | */ |
| 1100 | char *fossil_getenv(const char *zName){ |
| 1101 | #ifdef _WIN32 |
| 1102 | wchar_t *uName = fossil_utf8_to_unicode(zName); |
| 1103 | void *zValue = _wgetenv(uName); |
| 1104 | fossil_unicode_free(uName); |
| 1105 | #else |
| 1106 | char *zValue = getenv(zName); |
| 1107 | #endif |
| 1108 | if( zValue ) zValue = fossil_filename_to_utf8(zValue); |
| 1109 | return zValue; |
| 1110 | } |
| 1111 | |
| 1112 | /* |
| 1113 | ** Like fopen() but always takes a UTF8 argument. |
| 1114 | */ |
| 1115 | FILE *fossil_fopen(const char *zName, const char *zMode){ |
| 1116 | #ifdef _WIN32 |
| 1117 | wchar_t *uMode = fossil_utf8_to_unicode(zMode); |
| 1118 | wchar_t *uName = fossil_utf8_to_filename(zName); |
| 1119 | FILE *f = _wfopen(uName, uMode); |
| 1120 | fossil_filename_free(uName); |
| 1121 | fossil_unicode_free(uMode); |
| 1122 | #else |
| 1123 | FILE *f = fopen(zName, zMode); |
| 1124 | #endif |
| 1125 | return f; |
| 1126 | } |
| 1127 |
+21
-215
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -36,10 +36,13 @@ | ||
| 36 | 36 | #ifdef _WIN32 |
| 37 | 37 | # include <direct.h> |
| 38 | 38 | # include <windows.h> |
| 39 | 39 | # include <sys/utime.h> |
| 40 | 40 | #endif |
| 41 | +#ifdef __CYGWIN__ | |
| 42 | +# include <sys/time.h> | |
| 43 | +#endif | |
| 41 | 44 | |
| 42 | 45 | /* |
| 43 | 46 | ** The file status information from the most recent stat() call. |
| 44 | 47 | ** |
| 45 | 48 | ** Use _stati64 rather than stat on windows, in order to handle files |
| @@ -72,11 +75,11 @@ | ||
| 72 | 75 | } |
| 73 | 76 | #else |
| 74 | 77 | int rc = 0; |
| 75 | 78 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 76 | 79 | rc = _wstati64(zMbcs, buf); |
| 77 | - fossil_mbcs_free(zMbcs); | |
| 80 | + fossil_filename_free(zMbcs); | |
| 78 | 81 | return rc; |
| 79 | 82 | #endif |
| 80 | 83 | } |
| 81 | 84 | |
| 82 | 85 | /* |
| @@ -303,11 +306,11 @@ | ||
| 303 | 306 | */ |
| 304 | 307 | int file_access(const char *zFilename, int flags){ |
| 305 | 308 | #ifdef _WIN32 |
| 306 | 309 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 307 | 310 | int rc = _waccess(zMbcs, flags); |
| 308 | - fossil_mbcs_free(zMbcs); | |
| 311 | + fossil_filename_free(zMbcs); | |
| 309 | 312 | #else |
| 310 | 313 | int rc = access(zFilename, flags); |
| 311 | 314 | #endif |
| 312 | 315 | return rc; |
| 313 | 316 | } |
| @@ -407,11 +410,11 @@ | ||
| 407 | 410 | struct _utimbuf tb; |
| 408 | 411 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 409 | 412 | tb.actime = newMTime; |
| 410 | 413 | tb.modtime = newMTime; |
| 411 | 414 | _wutime(zMbcs, &tb); |
| 412 | - fossil_mbcs_free(zMbcs); | |
| 415 | + fossil_filename_free(zMbcs); | |
| 413 | 416 | #endif |
| 414 | 417 | } |
| 415 | 418 | |
| 416 | 419 | /* |
| 417 | 420 | ** COMMAND: test-set-mtime |
| @@ -439,13 +442,13 @@ | ||
| 439 | 442 | /* |
| 440 | 443 | ** Delete a file. |
| 441 | 444 | */ |
| 442 | 445 | void file_delete(const char *zFilename){ |
| 443 | 446 | #ifdef _WIN32 |
| 444 | - wchar_t *z = fossil_utf8_to_filename(zFilename); | |
| 447 | + wchar_t *z = fossil_utf8_to_unicode(zFilename); | |
| 445 | 448 | _wunlink(z); |
| 446 | - fossil_mbcs_free(z); | |
| 449 | + fossil_unicode_free(z); | |
| 447 | 450 | #else |
| 448 | 451 | unlink(zFilename); |
| 449 | 452 | #endif |
| 450 | 453 | } |
| 451 | 454 | |
| @@ -465,11 +468,11 @@ | ||
| 465 | 468 | if( rc!=1 ){ |
| 466 | 469 | #if defined(_WIN32) |
| 467 | 470 | int rc; |
| 468 | 471 | wchar_t *zMbcs = fossil_utf8_to_filename(zName); |
| 469 | 472 | rc = _wmkdir(zMbcs); |
| 470 | - fossil_mbcs_free(zMbcs); | |
| 473 | + fossil_filename_free(zMbcs); | |
| 471 | 474 | return rc; |
| 472 | 475 | #else |
| 473 | 476 | return mkdir(zName, 0755); |
| 474 | 477 | #endif |
| 475 | 478 | } |
| @@ -481,11 +484,11 @@ | ||
| 481 | 484 | ** a file in a repository. Valid filenames follow all of the |
| 482 | 485 | ** following rules: |
| 483 | 486 | ** |
| 484 | 487 | ** * Does not begin with "/" |
| 485 | 488 | ** * Does not contain any path element named "." or ".." |
| 486 | -** * Does not contain any of these characters in the path: "\" | |
| 489 | +** * Does not contain any of these characters in the path: "\*[]?" | |
| 487 | 490 | ** * Does not end with "/". |
| 488 | 491 | ** * Does not contain two or more "/" characters in a row. |
| 489 | 492 | ** * Contains at least one character |
| 490 | 493 | */ |
| 491 | 494 | int file_is_simple_pathname(const char *z){ |
| @@ -520,11 +523,11 @@ | ||
| 520 | 523 | /* Unicode character in the range U+D800 - U+DFFF are for |
| 521 | 524 | * surrogate pairs, they shouldn't occur in filenames. */ |
| 522 | 525 | return 0; |
| 523 | 526 | } |
| 524 | 527 | } |
| 525 | - if( c=='\\' ){ | |
| 528 | + if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){ | |
| 526 | 529 | return 0; |
| 527 | 530 | } |
| 528 | 531 | if( c=='/' ){ |
| 529 | 532 | if( z[i+1]=='/' ) return 0; |
| 530 | 533 | if( z[i+1]=='.' ){ |
| @@ -652,18 +655,18 @@ | ||
| 652 | 655 | int i; |
| 653 | 656 | wchar_t zPwd[2000]; |
| 654 | 657 | if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ |
| 655 | 658 | fossil_fatal("cannot find the current working directory."); |
| 656 | 659 | } |
| 657 | - zPwdUtf8 = fossil_unicode_to_utf8(zPwd); | |
| 660 | + zPwdUtf8 = fossil_filename_to_utf8(zPwd); | |
| 658 | 661 | nPwd = strlen(zPwdUtf8); |
| 659 | 662 | if( nPwd > nBuf-1 ){ |
| 660 | 663 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 661 | 664 | } |
| 662 | 665 | for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/'; |
| 663 | 666 | memcpy(zBuf, zPwdUtf8, nPwd+1); |
| 664 | - fossil_mbcs_free(zPwdUtf8); | |
| 667 | + fossil_filename_free(zPwdUtf8); | |
| 665 | 668 | #else |
| 666 | 669 | if( getcwd(zBuf, nBuf-1)==0 ){ |
| 667 | 670 | if( errno==ERANGE ){ |
| 668 | 671 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 669 | 672 | }else{ |
| @@ -1009,11 +1012,11 @@ | ||
| 1009 | 1012 | |
| 1010 | 1013 | #if defined(_WIN32) |
| 1011 | 1014 | wchar_t zTmpPath[MAX_PATH]; |
| 1012 | 1015 | |
| 1013 | 1016 | if( GetTempPathW(MAX_PATH, zTmpPath) ){ |
| 1014 | - azDirs[0] = fossil_unicode_to_utf8(zTmpPath); | |
| 1017 | + azDirs[0] = fossil_filename_to_utf8(zTmpPath); | |
| 1015 | 1018 | } |
| 1016 | 1019 | |
| 1017 | 1020 | azDirs[1] = fossil_getenv("TEMP"); |
| 1018 | 1021 | azDirs[2] = fossil_getenv("TMP"); |
| 1019 | 1022 | #endif |
| @@ -1043,12 +1046,12 @@ | ||
| 1043 | 1046 | } |
| 1044 | 1047 | zBuf[j] = 0; |
| 1045 | 1048 | }while( file_size(zBuf)>=0 ); |
| 1046 | 1049 | |
| 1047 | 1050 | #if defined(_WIN32) |
| 1048 | - fossil_mbcs_free((char *)azDirs[1]); | |
| 1049 | - fossil_mbcs_free((char *)azDirs[2]); | |
| 1051 | + fossil_unicode_free((char *)azDirs[1]); | |
| 1052 | + fossil_unicode_free((char *)azDirs[2]); | |
| 1050 | 1053 | #endif |
| 1051 | 1054 | } |
| 1052 | 1055 | |
| 1053 | 1056 | |
| 1054 | 1057 | /* |
| @@ -1088,233 +1091,36 @@ | ||
| 1088 | 1091 | # define closedir _wclosedir |
| 1089 | 1092 | #endif /* _WIN32 */ |
| 1090 | 1093 | |
| 1091 | 1094 | #endif /* INTERFACE */ |
| 1092 | 1095 | |
| 1093 | - | |
| 1094 | - | |
| 1095 | -/************************************************************************** | |
| 1096 | -** The following routines translate between MBCS and UTF8 on windows. | |
| 1097 | -** Since everything is always UTF8 on unix, these routines are no-ops | |
| 1098 | -** there. | |
| 1099 | -*/ | |
| 1100 | - | |
| 1101 | -/* | |
| 1102 | -** Translate MBCS to UTF8. Return a pointer to the translated text. | |
| 1103 | -** Call fossil_mbcs_free() to deallocate any memory used to store the | |
| 1104 | -** returned pointer when done. | |
| 1105 | -*/ | |
| 1106 | -char *fossil_mbcs_to_utf8(const char *zMbcs){ | |
| 1107 | -#ifdef _WIN32 | |
| 1108 | - extern char *sqlite3_win32_mbcs_to_utf8(const char*); | |
| 1109 | - return sqlite3_win32_mbcs_to_utf8(zMbcs); | |
| 1110 | -#else | |
| 1111 | - return (char*)zMbcs; /* No-op on unix */ | |
| 1112 | -#endif | |
| 1113 | -} | |
| 1114 | - | |
| 1115 | -/* | |
| 1116 | -** Translate Unicode to UTF8. Return a pointer to the translated text. | |
| 1117 | -** Call fossil_mbcs_free() to deallocate any memory used to store the | |
| 1118 | -** returned pointer when done. | |
| 1119 | -*/ | |
| 1120 | -char *fossil_unicode_to_utf8(const void *zUnicode){ | |
| 1121 | -#ifdef _WIN32 | |
| 1122 | - int nByte = WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, 0, 0, 0, 0); | |
| 1123 | - char *zUtf = sqlite3_malloc( nByte ); | |
| 1124 | - if( zUtf==0 ){ | |
| 1125 | - return 0; | |
| 1126 | - } | |
| 1127 | - WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, zUtf, nByte, 0, 0); | |
| 1128 | - return zUtf; | |
| 1129 | -#else | |
| 1130 | - return (char *)zUnicode; /* No-op on unix */ | |
| 1131 | -#endif | |
| 1132 | -} | |
| 1133 | - | |
| 1134 | -/* | |
| 1135 | -** Translate Unicode (filename) to UTF8. Return a pointer to the | |
| 1136 | -** translated text. Call fossil_mbcs_free() to deallocate any | |
| 1137 | -** memory used to store the returned pointer when done. | |
| 1138 | -** | |
| 1139 | -** On Windows, characters in the range U+F001 to U+F07F (private use area) | |
| 1140 | -** are translated in ASCII characters in the range U+0001 - U+007F. The | |
| 1141 | -** only place they can come from are filenames using Cygwin's trick | |
| 1142 | -** to circumvent invalid characters in filenames. | |
| 1143 | -** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> | |
| 1144 | -** This way, fossil will work nicely together with the cygwin shell | |
| 1145 | -** handling those filenames. On other shells, the generated filename | |
| 1146 | -** might not be as expected, but apart from that nothing goes wrong. | |
| 1147 | -*/ | |
| 1148 | -char *fossil_filename_to_utf8(void *zUnicode){ | |
| 1149 | -#ifdef _WIN32 | |
| 1150 | - WCHAR *wUnicode = zUnicode; | |
| 1151 | - while( *wUnicode != 0 ){ | |
| 1152 | - if ( (*wUnicode & 0xFF80) == 0xF000 ){ | |
| 1153 | - WCHAR converted = (*wUnicode & 0x7F); | |
| 1154 | - /* Only really convert it when the resulting char is in the given range*/ | |
| 1155 | - if ( (converted < 32) || wcschr(L"\"*<>?|:", converted) ){ | |
| 1156 | - *wUnicode = converted; | |
| 1157 | - } | |
| 1158 | - } | |
| 1159 | - ++wUnicode; | |
| 1160 | - } | |
| 1161 | - return fossil_unicode_to_utf8(zUnicode); | |
| 1162 | -#else | |
| 1163 | - return (char *)zUnicode; /* No-op on unix */ | |
| 1164 | -#endif | |
| 1165 | -} | |
| 1166 | - | |
| 1167 | -/* | |
| 1168 | -** Translate UTF8 to MBCS for use in system calls. Return a pointer to the | |
| 1169 | -** translated text.. Call fossil_mbcs_free() to deallocate any memory | |
| 1170 | -** used to store the returned pointer when done. | |
| 1171 | -*/ | |
| 1172 | -char *fossil_utf8_to_mbcs(const char *zUtf8){ | |
| 1173 | -#ifdef _WIN32 | |
| 1174 | - extern char *sqlite3_win32_utf8_to_mbcs(const char*); | |
| 1175 | - return sqlite3_win32_utf8_to_mbcs(zUtf8); | |
| 1176 | -#else | |
| 1177 | - return (char*)zUtf8; /* No-op on unix */ | |
| 1178 | -#endif | |
| 1179 | -} | |
| 1180 | - | |
| 1181 | -/* | |
| 1182 | -** Translate UTF8 to unicode for use in system calls. Return a pointer to the | |
| 1183 | -** translated text.. Call fossil_mbcs_free() to deallocate any memory | |
| 1184 | -** used to store the returned pointer when done. | |
| 1185 | -*/ | |
| 1186 | -void *fossil_utf8_to_unicode(const char *zUtf8){ | |
| 1187 | -#ifdef _WIN32 | |
| 1188 | - int nByte = MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, 0, 0); | |
| 1189 | - wchar_t *zUnicode = sqlite3_malloc( nByte * 2 ); | |
| 1190 | - if( zUnicode==0 ){ | |
| 1191 | - return 0; | |
| 1192 | - } | |
| 1193 | - MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, nByte); | |
| 1194 | - | |
| 1195 | - return zUnicode; | |
| 1196 | -#else | |
| 1197 | - return (void *)zUtf8; /* No-op on unix */ | |
| 1198 | -#endif | |
| 1199 | -} | |
| 1200 | - | |
| 1201 | -/* | |
| 1202 | -** Translate UTF8 to unicode for use in filename translations. | |
| 1203 | -** Return a pointer to the translated text.. Call fossil_mbcs_free() | |
| 1204 | -** to deallocate any memory used to store the returned pointer when done. | |
| 1205 | -** | |
| 1206 | -** On Windows, characters in the range U+0001 to U+0031 and the | |
| 1207 | -** characters '"', '*', ':', '<', '>', '?', '|' and '\\' are invalid | |
| 1208 | -** to be used. Therefore, translated those to characters in the | |
| 1209 | -** (private use area), in the range U+F001 - U+F07F, so those | |
| 1210 | -** characters never arrive in any Windows API. The filenames might | |
| 1211 | -** look strange in Windows explorer, but in the cygwin shell | |
| 1212 | -** everything looks as expected. | |
| 1213 | -** | |
| 1214 | -** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> | |
| 1215 | -** | |
| 1216 | -*/ | |
| 1217 | -void *fossil_utf8_to_filename(const char *zUtf8){ | |
| 1218 | -#ifdef _WIN32 | |
| 1219 | - WCHAR *zUnicode = fossil_utf8_to_unicode(zUtf8); | |
| 1220 | - WCHAR *wUnicode = zUnicode; | |
| 1221 | - /* If path starts with "<drive>:/" or "<drive>:\", don't translate the ':' */ | |
| 1222 | - if( fossil_isalpha(zUtf8[0]) && zUtf8[1]==':' | |
| 1223 | - && (zUtf8[2]=='\\' || zUtf8[2]=='/')) { | |
| 1224 | - wUnicode += 3; | |
| 1225 | - } | |
| 1226 | - while( *wUnicode != '\0' ){ | |
| 1227 | - if ( (*wUnicode < 32) || wcschr(L"\"*<>?|:", *wUnicode) ){ | |
| 1228 | - *wUnicode |= 0xF000; | |
| 1229 | - } | |
| 1230 | - ++wUnicode; | |
| 1231 | - } | |
| 1232 | - | |
| 1233 | - return zUnicode; | |
| 1234 | -#else | |
| 1235 | - return (void *)zUtf8; /* No-op on unix */ | |
| 1236 | -#endif | |
| 1237 | -} | |
| 1238 | - | |
| 1239 | 1096 | /* |
| 1240 | 1097 | ** Return the value of an environment variable as UTF8. |
| 1098 | +** Use fossil_filename_free() to release resources. | |
| 1241 | 1099 | */ |
| 1242 | 1100 | char *fossil_getenv(const char *zName){ |
| 1243 | 1101 | #ifdef _WIN32 |
| 1244 | 1102 | wchar_t *uName = fossil_utf8_to_unicode(zName); |
| 1245 | 1103 | void *zValue = _wgetenv(uName); |
| 1246 | - fossil_mbcs_free(uName); | |
| 1247 | - if( zValue ) zValue = fossil_unicode_to_utf8(zValue); | |
| 1104 | + fossil_unicode_free(uName); | |
| 1248 | 1105 | #else |
| 1249 | 1106 | char *zValue = getenv(zName); |
| 1250 | 1107 | #endif |
| 1108 | + if( zValue ) zValue = fossil_filename_to_utf8(zValue); | |
| 1251 | 1109 | return zValue; |
| 1252 | 1110 | } |
| 1253 | 1111 | |
| 1254 | -/* | |
| 1255 | -** Display UTF8 on the console. Return the number of | |
| 1256 | -** Characters written. If stdout or stderr is redirected | |
| 1257 | -** to a file, -1 is returned and nothing is written | |
| 1258 | -** to the console. | |
| 1259 | -*/ | |
| 1260 | -int fossil_utf8_to_console(const char *zUtf8, int nByte, int toStdErr){ | |
| 1261 | -#ifdef _WIN32 | |
| 1262 | - int nChar; | |
| 1263 | - wchar_t *zUnicode; /* Unicode version of zUtf8 */ | |
| 1264 | - DWORD dummy; | |
| 1265 | - | |
| 1266 | - static int istty[2] = { -1, -1 }; | |
| 1267 | - if( istty[toStdErr] == -1 ){ | |
| 1268 | - istty[toStdErr] = _isatty(toStdErr + 1) != 0; | |
| 1269 | - } | |
| 1270 | - if( !istty[toStdErr] ){ | |
| 1271 | - /* stdout/stderr is not a console. */ | |
| 1272 | - return -1; | |
| 1273 | - } | |
| 1274 | - | |
| 1275 | - nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, NULL, 0); | |
| 1276 | - zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) ); | |
| 1277 | - if( zUnicode==0 ){ | |
| 1278 | - return 0; | |
| 1279 | - } | |
| 1280 | - nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, zUnicode, nChar); | |
| 1281 | - if( nChar==0 ){ | |
| 1282 | - free(zUnicode); | |
| 1283 | - return 0; | |
| 1284 | - } | |
| 1285 | - zUnicode[nChar] = '\0'; | |
| 1286 | - WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE - toStdErr), zUnicode, nChar, &dummy, 0); | |
| 1287 | - return nChar; | |
| 1288 | -#else | |
| 1289 | - return -1; /* No-op on unix */ | |
| 1290 | -#endif | |
| 1291 | -} | |
| 1292 | - | |
| 1293 | -/* | |
| 1294 | -** Translate MBCS to UTF8. Return a pointer. Call fossil_mbcs_free() | |
| 1295 | -** to deallocate any memory used to store the returned pointer when done. | |
| 1296 | -*/ | |
| 1297 | -void fossil_mbcs_free(void *zOld){ | |
| 1298 | -#ifdef _WIN32 | |
| 1299 | - extern void sqlite3_free(void*); | |
| 1300 | - sqlite3_free(zOld); | |
| 1301 | -#else | |
| 1302 | - /* No-op on unix */ | |
| 1303 | -#endif | |
| 1304 | -} | |
| 1305 | - | |
| 1306 | 1112 | /* |
| 1307 | 1113 | ** Like fopen() but always takes a UTF8 argument. |
| 1308 | 1114 | */ |
| 1309 | 1115 | FILE *fossil_fopen(const char *zName, const char *zMode){ |
| 1310 | 1116 | #ifdef _WIN32 |
| 1311 | 1117 | wchar_t *uMode = fossil_utf8_to_unicode(zMode); |
| 1312 | 1118 | wchar_t *uName = fossil_utf8_to_filename(zName); |
| 1313 | 1119 | FILE *f = _wfopen(uName, uMode); |
| 1314 | - fossil_mbcs_free(uName); | |
| 1315 | - fossil_mbcs_free(uMode); | |
| 1120 | + fossil_filename_free(uName); | |
| 1121 | + fossil_unicode_free(uMode); | |
| 1316 | 1122 | #else |
| 1317 | 1123 | FILE *f = fopen(zName, zMode); |
| 1318 | 1124 | #endif |
| 1319 | 1125 | return f; |
| 1320 | 1126 | } |
| 1321 | 1127 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -36,10 +36,13 @@ | |
| 36 | #ifdef _WIN32 |
| 37 | # include <direct.h> |
| 38 | # include <windows.h> |
| 39 | # include <sys/utime.h> |
| 40 | #endif |
| 41 | |
| 42 | /* |
| 43 | ** The file status information from the most recent stat() call. |
| 44 | ** |
| 45 | ** Use _stati64 rather than stat on windows, in order to handle files |
| @@ -72,11 +75,11 @@ | |
| 72 | } |
| 73 | #else |
| 74 | int rc = 0; |
| 75 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 76 | rc = _wstati64(zMbcs, buf); |
| 77 | fossil_mbcs_free(zMbcs); |
| 78 | return rc; |
| 79 | #endif |
| 80 | } |
| 81 | |
| 82 | /* |
| @@ -303,11 +306,11 @@ | |
| 303 | */ |
| 304 | int file_access(const char *zFilename, int flags){ |
| 305 | #ifdef _WIN32 |
| 306 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 307 | int rc = _waccess(zMbcs, flags); |
| 308 | fossil_mbcs_free(zMbcs); |
| 309 | #else |
| 310 | int rc = access(zFilename, flags); |
| 311 | #endif |
| 312 | return rc; |
| 313 | } |
| @@ -407,11 +410,11 @@ | |
| 407 | struct _utimbuf tb; |
| 408 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 409 | tb.actime = newMTime; |
| 410 | tb.modtime = newMTime; |
| 411 | _wutime(zMbcs, &tb); |
| 412 | fossil_mbcs_free(zMbcs); |
| 413 | #endif |
| 414 | } |
| 415 | |
| 416 | /* |
| 417 | ** COMMAND: test-set-mtime |
| @@ -439,13 +442,13 @@ | |
| 439 | /* |
| 440 | ** Delete a file. |
| 441 | */ |
| 442 | void file_delete(const char *zFilename){ |
| 443 | #ifdef _WIN32 |
| 444 | wchar_t *z = fossil_utf8_to_filename(zFilename); |
| 445 | _wunlink(z); |
| 446 | fossil_mbcs_free(z); |
| 447 | #else |
| 448 | unlink(zFilename); |
| 449 | #endif |
| 450 | } |
| 451 | |
| @@ -465,11 +468,11 @@ | |
| 465 | if( rc!=1 ){ |
| 466 | #if defined(_WIN32) |
| 467 | int rc; |
| 468 | wchar_t *zMbcs = fossil_utf8_to_filename(zName); |
| 469 | rc = _wmkdir(zMbcs); |
| 470 | fossil_mbcs_free(zMbcs); |
| 471 | return rc; |
| 472 | #else |
| 473 | return mkdir(zName, 0755); |
| 474 | #endif |
| 475 | } |
| @@ -481,11 +484,11 @@ | |
| 481 | ** a file in a repository. Valid filenames follow all of the |
| 482 | ** following rules: |
| 483 | ** |
| 484 | ** * Does not begin with "/" |
| 485 | ** * Does not contain any path element named "." or ".." |
| 486 | ** * Does not contain any of these characters in the path: "\" |
| 487 | ** * Does not end with "/". |
| 488 | ** * Does not contain two or more "/" characters in a row. |
| 489 | ** * Contains at least one character |
| 490 | */ |
| 491 | int file_is_simple_pathname(const char *z){ |
| @@ -520,11 +523,11 @@ | |
| 520 | /* Unicode character in the range U+D800 - U+DFFF are for |
| 521 | * surrogate pairs, they shouldn't occur in filenames. */ |
| 522 | return 0; |
| 523 | } |
| 524 | } |
| 525 | if( c=='\\' ){ |
| 526 | return 0; |
| 527 | } |
| 528 | if( c=='/' ){ |
| 529 | if( z[i+1]=='/' ) return 0; |
| 530 | if( z[i+1]=='.' ){ |
| @@ -652,18 +655,18 @@ | |
| 652 | int i; |
| 653 | wchar_t zPwd[2000]; |
| 654 | if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ |
| 655 | fossil_fatal("cannot find the current working directory."); |
| 656 | } |
| 657 | zPwdUtf8 = fossil_unicode_to_utf8(zPwd); |
| 658 | nPwd = strlen(zPwdUtf8); |
| 659 | if( nPwd > nBuf-1 ){ |
| 660 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 661 | } |
| 662 | for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/'; |
| 663 | memcpy(zBuf, zPwdUtf8, nPwd+1); |
| 664 | fossil_mbcs_free(zPwdUtf8); |
| 665 | #else |
| 666 | if( getcwd(zBuf, nBuf-1)==0 ){ |
| 667 | if( errno==ERANGE ){ |
| 668 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 669 | }else{ |
| @@ -1009,11 +1012,11 @@ | |
| 1009 | |
| 1010 | #if defined(_WIN32) |
| 1011 | wchar_t zTmpPath[MAX_PATH]; |
| 1012 | |
| 1013 | if( GetTempPathW(MAX_PATH, zTmpPath) ){ |
| 1014 | azDirs[0] = fossil_unicode_to_utf8(zTmpPath); |
| 1015 | } |
| 1016 | |
| 1017 | azDirs[1] = fossil_getenv("TEMP"); |
| 1018 | azDirs[2] = fossil_getenv("TMP"); |
| 1019 | #endif |
| @@ -1043,12 +1046,12 @@ | |
| 1043 | } |
| 1044 | zBuf[j] = 0; |
| 1045 | }while( file_size(zBuf)>=0 ); |
| 1046 | |
| 1047 | #if defined(_WIN32) |
| 1048 | fossil_mbcs_free((char *)azDirs[1]); |
| 1049 | fossil_mbcs_free((char *)azDirs[2]); |
| 1050 | #endif |
| 1051 | } |
| 1052 | |
| 1053 | |
| 1054 | /* |
| @@ -1088,233 +1091,36 @@ | |
| 1088 | # define closedir _wclosedir |
| 1089 | #endif /* _WIN32 */ |
| 1090 | |
| 1091 | #endif /* INTERFACE */ |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | /************************************************************************** |
| 1096 | ** The following routines translate between MBCS and UTF8 on windows. |
| 1097 | ** Since everything is always UTF8 on unix, these routines are no-ops |
| 1098 | ** there. |
| 1099 | */ |
| 1100 | |
| 1101 | /* |
| 1102 | ** Translate MBCS to UTF8. Return a pointer to the translated text. |
| 1103 | ** Call fossil_mbcs_free() to deallocate any memory used to store the |
| 1104 | ** returned pointer when done. |
| 1105 | */ |
| 1106 | char *fossil_mbcs_to_utf8(const char *zMbcs){ |
| 1107 | #ifdef _WIN32 |
| 1108 | extern char *sqlite3_win32_mbcs_to_utf8(const char*); |
| 1109 | return sqlite3_win32_mbcs_to_utf8(zMbcs); |
| 1110 | #else |
| 1111 | return (char*)zMbcs; /* No-op on unix */ |
| 1112 | #endif |
| 1113 | } |
| 1114 | |
| 1115 | /* |
| 1116 | ** Translate Unicode to UTF8. Return a pointer to the translated text. |
| 1117 | ** Call fossil_mbcs_free() to deallocate any memory used to store the |
| 1118 | ** returned pointer when done. |
| 1119 | */ |
| 1120 | char *fossil_unicode_to_utf8(const void *zUnicode){ |
| 1121 | #ifdef _WIN32 |
| 1122 | int nByte = WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, 0, 0, 0, 0); |
| 1123 | char *zUtf = sqlite3_malloc( nByte ); |
| 1124 | if( zUtf==0 ){ |
| 1125 | return 0; |
| 1126 | } |
| 1127 | WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, zUtf, nByte, 0, 0); |
| 1128 | return zUtf; |
| 1129 | #else |
| 1130 | return (char *)zUnicode; /* No-op on unix */ |
| 1131 | #endif |
| 1132 | } |
| 1133 | |
| 1134 | /* |
| 1135 | ** Translate Unicode (filename) to UTF8. Return a pointer to the |
| 1136 | ** translated text. Call fossil_mbcs_free() to deallocate any |
| 1137 | ** memory used to store the returned pointer when done. |
| 1138 | ** |
| 1139 | ** On Windows, characters in the range U+F001 to U+F07F (private use area) |
| 1140 | ** are translated in ASCII characters in the range U+0001 - U+007F. The |
| 1141 | ** only place they can come from are filenames using Cygwin's trick |
| 1142 | ** to circumvent invalid characters in filenames. |
| 1143 | ** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> |
| 1144 | ** This way, fossil will work nicely together with the cygwin shell |
| 1145 | ** handling those filenames. On other shells, the generated filename |
| 1146 | ** might not be as expected, but apart from that nothing goes wrong. |
| 1147 | */ |
| 1148 | char *fossil_filename_to_utf8(void *zUnicode){ |
| 1149 | #ifdef _WIN32 |
| 1150 | WCHAR *wUnicode = zUnicode; |
| 1151 | while( *wUnicode != 0 ){ |
| 1152 | if ( (*wUnicode & 0xFF80) == 0xF000 ){ |
| 1153 | WCHAR converted = (*wUnicode & 0x7F); |
| 1154 | /* Only really convert it when the resulting char is in the given range*/ |
| 1155 | if ( (converted < 32) || wcschr(L"\"*<>?|:", converted) ){ |
| 1156 | *wUnicode = converted; |
| 1157 | } |
| 1158 | } |
| 1159 | ++wUnicode; |
| 1160 | } |
| 1161 | return fossil_unicode_to_utf8(zUnicode); |
| 1162 | #else |
| 1163 | return (char *)zUnicode; /* No-op on unix */ |
| 1164 | #endif |
| 1165 | } |
| 1166 | |
| 1167 | /* |
| 1168 | ** Translate UTF8 to MBCS for use in system calls. Return a pointer to the |
| 1169 | ** translated text.. Call fossil_mbcs_free() to deallocate any memory |
| 1170 | ** used to store the returned pointer when done. |
| 1171 | */ |
| 1172 | char *fossil_utf8_to_mbcs(const char *zUtf8){ |
| 1173 | #ifdef _WIN32 |
| 1174 | extern char *sqlite3_win32_utf8_to_mbcs(const char*); |
| 1175 | return sqlite3_win32_utf8_to_mbcs(zUtf8); |
| 1176 | #else |
| 1177 | return (char*)zUtf8; /* No-op on unix */ |
| 1178 | #endif |
| 1179 | } |
| 1180 | |
| 1181 | /* |
| 1182 | ** Translate UTF8 to unicode for use in system calls. Return a pointer to the |
| 1183 | ** translated text.. Call fossil_mbcs_free() to deallocate any memory |
| 1184 | ** used to store the returned pointer when done. |
| 1185 | */ |
| 1186 | void *fossil_utf8_to_unicode(const char *zUtf8){ |
| 1187 | #ifdef _WIN32 |
| 1188 | int nByte = MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, 0, 0); |
| 1189 | wchar_t *zUnicode = sqlite3_malloc( nByte * 2 ); |
| 1190 | if( zUnicode==0 ){ |
| 1191 | return 0; |
| 1192 | } |
| 1193 | MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, nByte); |
| 1194 | |
| 1195 | return zUnicode; |
| 1196 | #else |
| 1197 | return (void *)zUtf8; /* No-op on unix */ |
| 1198 | #endif |
| 1199 | } |
| 1200 | |
| 1201 | /* |
| 1202 | ** Translate UTF8 to unicode for use in filename translations. |
| 1203 | ** Return a pointer to the translated text.. Call fossil_mbcs_free() |
| 1204 | ** to deallocate any memory used to store the returned pointer when done. |
| 1205 | ** |
| 1206 | ** On Windows, characters in the range U+0001 to U+0031 and the |
| 1207 | ** characters '"', '*', ':', '<', '>', '?', '|' and '\\' are invalid |
| 1208 | ** to be used. Therefore, translated those to characters in the |
| 1209 | ** (private use area), in the range U+F001 - U+F07F, so those |
| 1210 | ** characters never arrive in any Windows API. The filenames might |
| 1211 | ** look strange in Windows explorer, but in the cygwin shell |
| 1212 | ** everything looks as expected. |
| 1213 | ** |
| 1214 | ** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html> |
| 1215 | ** |
| 1216 | */ |
| 1217 | void *fossil_utf8_to_filename(const char *zUtf8){ |
| 1218 | #ifdef _WIN32 |
| 1219 | WCHAR *zUnicode = fossil_utf8_to_unicode(zUtf8); |
| 1220 | WCHAR *wUnicode = zUnicode; |
| 1221 | /* If path starts with "<drive>:/" or "<drive>:\", don't translate the ':' */ |
| 1222 | if( fossil_isalpha(zUtf8[0]) && zUtf8[1]==':' |
| 1223 | && (zUtf8[2]=='\\' || zUtf8[2]=='/')) { |
| 1224 | wUnicode += 3; |
| 1225 | } |
| 1226 | while( *wUnicode != '\0' ){ |
| 1227 | if ( (*wUnicode < 32) || wcschr(L"\"*<>?|:", *wUnicode) ){ |
| 1228 | *wUnicode |= 0xF000; |
| 1229 | } |
| 1230 | ++wUnicode; |
| 1231 | } |
| 1232 | |
| 1233 | return zUnicode; |
| 1234 | #else |
| 1235 | return (void *)zUtf8; /* No-op on unix */ |
| 1236 | #endif |
| 1237 | } |
| 1238 | |
| 1239 | /* |
| 1240 | ** Return the value of an environment variable as UTF8. |
| 1241 | */ |
| 1242 | char *fossil_getenv(const char *zName){ |
| 1243 | #ifdef _WIN32 |
| 1244 | wchar_t *uName = fossil_utf8_to_unicode(zName); |
| 1245 | void *zValue = _wgetenv(uName); |
| 1246 | fossil_mbcs_free(uName); |
| 1247 | if( zValue ) zValue = fossil_unicode_to_utf8(zValue); |
| 1248 | #else |
| 1249 | char *zValue = getenv(zName); |
| 1250 | #endif |
| 1251 | return zValue; |
| 1252 | } |
| 1253 | |
| 1254 | /* |
| 1255 | ** Display UTF8 on the console. Return the number of |
| 1256 | ** Characters written. If stdout or stderr is redirected |
| 1257 | ** to a file, -1 is returned and nothing is written |
| 1258 | ** to the console. |
| 1259 | */ |
| 1260 | int fossil_utf8_to_console(const char *zUtf8, int nByte, int toStdErr){ |
| 1261 | #ifdef _WIN32 |
| 1262 | int nChar; |
| 1263 | wchar_t *zUnicode; /* Unicode version of zUtf8 */ |
| 1264 | DWORD dummy; |
| 1265 | |
| 1266 | static int istty[2] = { -1, -1 }; |
| 1267 | if( istty[toStdErr] == -1 ){ |
| 1268 | istty[toStdErr] = _isatty(toStdErr + 1) != 0; |
| 1269 | } |
| 1270 | if( !istty[toStdErr] ){ |
| 1271 | /* stdout/stderr is not a console. */ |
| 1272 | return -1; |
| 1273 | } |
| 1274 | |
| 1275 | nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, NULL, 0); |
| 1276 | zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) ); |
| 1277 | if( zUnicode==0 ){ |
| 1278 | return 0; |
| 1279 | } |
| 1280 | nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, zUnicode, nChar); |
| 1281 | if( nChar==0 ){ |
| 1282 | free(zUnicode); |
| 1283 | return 0; |
| 1284 | } |
| 1285 | zUnicode[nChar] = '\0'; |
| 1286 | WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE - toStdErr), zUnicode, nChar, &dummy, 0); |
| 1287 | return nChar; |
| 1288 | #else |
| 1289 | return -1; /* No-op on unix */ |
| 1290 | #endif |
| 1291 | } |
| 1292 | |
| 1293 | /* |
| 1294 | ** Translate MBCS to UTF8. Return a pointer. Call fossil_mbcs_free() |
| 1295 | ** to deallocate any memory used to store the returned pointer when done. |
| 1296 | */ |
| 1297 | void fossil_mbcs_free(void *zOld){ |
| 1298 | #ifdef _WIN32 |
| 1299 | extern void sqlite3_free(void*); |
| 1300 | sqlite3_free(zOld); |
| 1301 | #else |
| 1302 | /* No-op on unix */ |
| 1303 | #endif |
| 1304 | } |
| 1305 | |
| 1306 | /* |
| 1307 | ** Like fopen() but always takes a UTF8 argument. |
| 1308 | */ |
| 1309 | FILE *fossil_fopen(const char *zName, const char *zMode){ |
| 1310 | #ifdef _WIN32 |
| 1311 | wchar_t *uMode = fossil_utf8_to_unicode(zMode); |
| 1312 | wchar_t *uName = fossil_utf8_to_filename(zName); |
| 1313 | FILE *f = _wfopen(uName, uMode); |
| 1314 | fossil_mbcs_free(uName); |
| 1315 | fossil_mbcs_free(uMode); |
| 1316 | #else |
| 1317 | FILE *f = fopen(zName, zMode); |
| 1318 | #endif |
| 1319 | return f; |
| 1320 | } |
| 1321 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -36,10 +36,13 @@ | |
| 36 | #ifdef _WIN32 |
| 37 | # include <direct.h> |
| 38 | # include <windows.h> |
| 39 | # include <sys/utime.h> |
| 40 | #endif |
| 41 | #ifdef __CYGWIN__ |
| 42 | # include <sys/time.h> |
| 43 | #endif |
| 44 | |
| 45 | /* |
| 46 | ** The file status information from the most recent stat() call. |
| 47 | ** |
| 48 | ** Use _stati64 rather than stat on windows, in order to handle files |
| @@ -72,11 +75,11 @@ | |
| 75 | } |
| 76 | #else |
| 77 | int rc = 0; |
| 78 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 79 | rc = _wstati64(zMbcs, buf); |
| 80 | fossil_filename_free(zMbcs); |
| 81 | return rc; |
| 82 | #endif |
| 83 | } |
| 84 | |
| 85 | /* |
| @@ -303,11 +306,11 @@ | |
| 306 | */ |
| 307 | int file_access(const char *zFilename, int flags){ |
| 308 | #ifdef _WIN32 |
| 309 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 310 | int rc = _waccess(zMbcs, flags); |
| 311 | fossil_filename_free(zMbcs); |
| 312 | #else |
| 313 | int rc = access(zFilename, flags); |
| 314 | #endif |
| 315 | return rc; |
| 316 | } |
| @@ -407,11 +410,11 @@ | |
| 410 | struct _utimbuf tb; |
| 411 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 412 | tb.actime = newMTime; |
| 413 | tb.modtime = newMTime; |
| 414 | _wutime(zMbcs, &tb); |
| 415 | fossil_filename_free(zMbcs); |
| 416 | #endif |
| 417 | } |
| 418 | |
| 419 | /* |
| 420 | ** COMMAND: test-set-mtime |
| @@ -439,13 +442,13 @@ | |
| 442 | /* |
| 443 | ** Delete a file. |
| 444 | */ |
| 445 | void file_delete(const char *zFilename){ |
| 446 | #ifdef _WIN32 |
| 447 | wchar_t *z = fossil_utf8_to_unicode(zFilename); |
| 448 | _wunlink(z); |
| 449 | fossil_unicode_free(z); |
| 450 | #else |
| 451 | unlink(zFilename); |
| 452 | #endif |
| 453 | } |
| 454 | |
| @@ -465,11 +468,11 @@ | |
| 468 | if( rc!=1 ){ |
| 469 | #if defined(_WIN32) |
| 470 | int rc; |
| 471 | wchar_t *zMbcs = fossil_utf8_to_filename(zName); |
| 472 | rc = _wmkdir(zMbcs); |
| 473 | fossil_filename_free(zMbcs); |
| 474 | return rc; |
| 475 | #else |
| 476 | return mkdir(zName, 0755); |
| 477 | #endif |
| 478 | } |
| @@ -481,11 +484,11 @@ | |
| 484 | ** a file in a repository. Valid filenames follow all of the |
| 485 | ** following rules: |
| 486 | ** |
| 487 | ** * Does not begin with "/" |
| 488 | ** * Does not contain any path element named "." or ".." |
| 489 | ** * Does not contain any of these characters in the path: "\*[]?" |
| 490 | ** * Does not end with "/". |
| 491 | ** * Does not contain two or more "/" characters in a row. |
| 492 | ** * Contains at least one character |
| 493 | */ |
| 494 | int file_is_simple_pathname(const char *z){ |
| @@ -520,11 +523,11 @@ | |
| 523 | /* Unicode character in the range U+D800 - U+DFFF are for |
| 524 | * surrogate pairs, they shouldn't occur in filenames. */ |
| 525 | return 0; |
| 526 | } |
| 527 | } |
| 528 | if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){ |
| 529 | return 0; |
| 530 | } |
| 531 | if( c=='/' ){ |
| 532 | if( z[i+1]=='/' ) return 0; |
| 533 | if( z[i+1]=='.' ){ |
| @@ -652,18 +655,18 @@ | |
| 655 | int i; |
| 656 | wchar_t zPwd[2000]; |
| 657 | if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ |
| 658 | fossil_fatal("cannot find the current working directory."); |
| 659 | } |
| 660 | zPwdUtf8 = fossil_filename_to_utf8(zPwd); |
| 661 | nPwd = strlen(zPwdUtf8); |
| 662 | if( nPwd > nBuf-1 ){ |
| 663 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 664 | } |
| 665 | for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/'; |
| 666 | memcpy(zBuf, zPwdUtf8, nPwd+1); |
| 667 | fossil_filename_free(zPwdUtf8); |
| 668 | #else |
| 669 | if( getcwd(zBuf, nBuf-1)==0 ){ |
| 670 | if( errno==ERANGE ){ |
| 671 | fossil_fatal("pwd too big: max %d\n", nBuf-1); |
| 672 | }else{ |
| @@ -1009,11 +1012,11 @@ | |
| 1012 | |
| 1013 | #if defined(_WIN32) |
| 1014 | wchar_t zTmpPath[MAX_PATH]; |
| 1015 | |
| 1016 | if( GetTempPathW(MAX_PATH, zTmpPath) ){ |
| 1017 | azDirs[0] = fossil_filename_to_utf8(zTmpPath); |
| 1018 | } |
| 1019 | |
| 1020 | azDirs[1] = fossil_getenv("TEMP"); |
| 1021 | azDirs[2] = fossil_getenv("TMP"); |
| 1022 | #endif |
| @@ -1043,12 +1046,12 @@ | |
| 1046 | } |
| 1047 | zBuf[j] = 0; |
| 1048 | }while( file_size(zBuf)>=0 ); |
| 1049 | |
| 1050 | #if defined(_WIN32) |
| 1051 | fossil_unicode_free((char *)azDirs[1]); |
| 1052 | fossil_unicode_free((char *)azDirs[2]); |
| 1053 | #endif |
| 1054 | } |
| 1055 | |
| 1056 | |
| 1057 | /* |
| @@ -1088,233 +1091,36 @@ | |
| 1091 | # define closedir _wclosedir |
| 1092 | #endif /* _WIN32 */ |
| 1093 | |
| 1094 | #endif /* INTERFACE */ |
| 1095 | |
| 1096 | /* |
| 1097 | ** Return the value of an environment variable as UTF8. |
| 1098 | ** Use fossil_filename_free() to release resources. |
| 1099 | */ |
| 1100 | char *fossil_getenv(const char *zName){ |
| 1101 | #ifdef _WIN32 |
| 1102 | wchar_t *uName = fossil_utf8_to_unicode(zName); |
| 1103 | void *zValue = _wgetenv(uName); |
| 1104 | fossil_unicode_free(uName); |
| 1105 | #else |
| 1106 | char *zValue = getenv(zName); |
| 1107 | #endif |
| 1108 | if( zValue ) zValue = fossil_filename_to_utf8(zValue); |
| 1109 | return zValue; |
| 1110 | } |
| 1111 | |
| 1112 | /* |
| 1113 | ** Like fopen() but always takes a UTF8 argument. |
| 1114 | */ |
| 1115 | FILE *fossil_fopen(const char *zName, const char *zMode){ |
| 1116 | #ifdef _WIN32 |
| 1117 | wchar_t *uMode = fossil_utf8_to_unicode(zMode); |
| 1118 | wchar_t *uName = fossil_utf8_to_filename(zName); |
| 1119 | FILE *f = _wfopen(uName, uMode); |
| 1120 | fossil_filename_free(uName); |
| 1121 | fossil_unicode_free(uMode); |
| 1122 | #else |
| 1123 | FILE *f = fopen(zName, zMode); |
| 1124 | #endif |
| 1125 | return f; |
| 1126 | } |
| 1127 |
+44
-8
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -24,23 +24,23 @@ | ||
| 24 | 24 | ** COMMAND: finfo |
| 25 | 25 | ** |
| 26 | 26 | ** Usage: %fossil finfo ?OPTIONS? FILENAME |
| 27 | 27 | ** |
| 28 | 28 | ** Print the complete change history for a single file going backwards |
| 29 | -** in time. The default is -l. | |
| 29 | +** in time. The default mode is -l. | |
| 30 | 30 | ** |
| 31 | -** For the -l|--log option: If "-b|--brief" is specified one line per revision | |
| 31 | +** For the -l|--log mode: If "-b|--brief" is specified one line per revision | |
| 32 | 32 | ** is printed, otherwise the full comment is printed. The "--limit N" |
| 33 | 33 | ** and "--offset P" options limits the output to the first N changes |
| 34 | 34 | ** after skipping P changes. |
| 35 | 35 | ** |
| 36 | -** In the -s form prints the status as <status> <revision>. This is | |
| 36 | +** In the -s mode prints the status as <status> <revision>. This is | |
| 37 | 37 | ** a quick status and does not check for up-to-date-ness of the file. |
| 38 | 38 | ** |
| 39 | -** In the -p form, there's an optional flag "-r|--revision REVISION". | |
| 39 | +** In the -p mode, there's an optional flag "-r|--revision REVISION". | |
| 40 | 40 | ** The specified version (or the latest checked out version) is printed |
| 41 | -** to stdout. | |
| 41 | +** to stdout. The -p mode is another form of the "cat" command. | |
| 42 | 42 | ** |
| 43 | 43 | ** Options: |
| 44 | 44 | ** --brief|-b display a brief (one line / revision) summary |
| 45 | 45 | ** --limit N display the first N changes |
| 46 | 46 | ** --log|-l select log mode (the default) |
| @@ -50,11 +50,11 @@ | ||
| 50 | 50 | ** to stdout (only in print mode) |
| 51 | 51 | ** -s select status mode (print a status indicator for FILE) |
| 52 | 52 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 53 | 53 | ** boolean: "yes", "no", "true", "false", etc. |
| 54 | 54 | ** |
| 55 | -** See also: artifact, descendants, info, leaves | |
| 55 | +** See also: artifact, cat, descendants, info, leaves | |
| 56 | 56 | */ |
| 57 | 57 | void finfo_cmd(void){ |
| 58 | 58 | capture_case_sensitive_option(); |
| 59 | 59 | db_must_be_within_tree(); |
| 60 | 60 | if (find_option("status","s",0)) { |
| @@ -185,12 +185,13 @@ | ||
| 185 | 185 | const char *zBr = db_column_text(&q, 5); |
| 186 | 186 | char *zOut; |
| 187 | 187 | if( zBr==0 ) zBr = "trunk"; |
| 188 | 188 | if( iBrief ){ |
| 189 | 189 | fossil_print("%s ", zDate); |
| 190 | - zOut = sqlite3_mprintf("[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)", | |
| 191 | - zCiUuid, zCom, zUser, zFileUuid, zBr); | |
| 190 | + zOut = sqlite3_mprintf( | |
| 191 | + "[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)", | |
| 192 | + zCiUuid, zCom, zUser, zFileUuid, zBr); | |
| 192 | 193 | comment_print(zOut, 11, 79); |
| 193 | 194 | sqlite3_free(zOut); |
| 194 | 195 | }else{ |
| 195 | 196 | blob_reset(&line); |
| 196 | 197 | blob_appendf(&line, "%.10s ", zCiUuid); |
| @@ -203,10 +204,45 @@ | ||
| 203 | 204 | } |
| 204 | 205 | db_finalize(&q); |
| 205 | 206 | blob_reset(&fname); |
| 206 | 207 | } |
| 207 | 208 | } |
| 209 | + | |
| 210 | +/* | |
| 211 | +** COMMAND: cat | |
| 212 | +** | |
| 213 | +** Usage: %fossil cat FILENAME ... ?OPTIONS? | |
| 214 | +** | |
| 215 | +** Print on standard output the content of one or more files as they exist | |
| 216 | +** in the repository. The version currently checked out is shown by default. | |
| 217 | +** Other versions may be specified using the -r option. | |
| 218 | +** | |
| 219 | +** Options: | |
| 220 | +** -R|--repository FILE Extract artifacts from repository FILE | |
| 221 | +** -r VERSION The specific check-in containing the file | |
| 222 | +** | |
| 223 | +** See also: finfo | |
| 224 | +*/ | |
| 225 | +void cat_cmd(void){ | |
| 226 | + int i; | |
| 227 | + int rc; | |
| 228 | + Blob content, fname; | |
| 229 | + const char *zRev; | |
| 230 | + db_find_and_open_repository(0, 0); | |
| 231 | + zRev = find_option("r","r",1); | |
| 232 | + for(i=2; i<g.argc; i++){ | |
| 233 | + file_tree_name(g.argv[i], &fname, 1); | |
| 234 | + blob_zero(&content); | |
| 235 | + rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0); | |
| 236 | + if( rc==0 ){ | |
| 237 | + fossil_fatal("no such file: %s", g.argv[i]); | |
| 238 | + } | |
| 239 | + blob_write_to_file(&content, "-"); | |
| 240 | + blob_reset(&fname); | |
| 241 | + blob_reset(&content); | |
| 242 | + } | |
| 243 | +} | |
| 208 | 244 | |
| 209 | 245 | /* Values for the debug= query parameter to finfo */ |
| 210 | 246 | #define FINFO_DEBUG_MLINK 0x01 |
| 211 | 247 | |
| 212 | 248 | /* |
| 213 | 249 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -24,23 +24,23 @@ | |
| 24 | ** COMMAND: finfo |
| 25 | ** |
| 26 | ** Usage: %fossil finfo ?OPTIONS? FILENAME |
| 27 | ** |
| 28 | ** Print the complete change history for a single file going backwards |
| 29 | ** in time. The default is -l. |
| 30 | ** |
| 31 | ** For the -l|--log option: If "-b|--brief" is specified one line per revision |
| 32 | ** is printed, otherwise the full comment is printed. The "--limit N" |
| 33 | ** and "--offset P" options limits the output to the first N changes |
| 34 | ** after skipping P changes. |
| 35 | ** |
| 36 | ** In the -s form prints the status as <status> <revision>. This is |
| 37 | ** a quick status and does not check for up-to-date-ness of the file. |
| 38 | ** |
| 39 | ** In the -p form, there's an optional flag "-r|--revision REVISION". |
| 40 | ** The specified version (or the latest checked out version) is printed |
| 41 | ** to stdout. |
| 42 | ** |
| 43 | ** Options: |
| 44 | ** --brief|-b display a brief (one line / revision) summary |
| 45 | ** --limit N display the first N changes |
| 46 | ** --log|-l select log mode (the default) |
| @@ -50,11 +50,11 @@ | |
| 50 | ** to stdout (only in print mode) |
| 51 | ** -s select status mode (print a status indicator for FILE) |
| 52 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 53 | ** boolean: "yes", "no", "true", "false", etc. |
| 54 | ** |
| 55 | ** See also: artifact, descendants, info, leaves |
| 56 | */ |
| 57 | void finfo_cmd(void){ |
| 58 | capture_case_sensitive_option(); |
| 59 | db_must_be_within_tree(); |
| 60 | if (find_option("status","s",0)) { |
| @@ -185,12 +185,13 @@ | |
| 185 | const char *zBr = db_column_text(&q, 5); |
| 186 | char *zOut; |
| 187 | if( zBr==0 ) zBr = "trunk"; |
| 188 | if( iBrief ){ |
| 189 | fossil_print("%s ", zDate); |
| 190 | zOut = sqlite3_mprintf("[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)", |
| 191 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 192 | comment_print(zOut, 11, 79); |
| 193 | sqlite3_free(zOut); |
| 194 | }else{ |
| 195 | blob_reset(&line); |
| 196 | blob_appendf(&line, "%.10s ", zCiUuid); |
| @@ -203,10 +204,45 @@ | |
| 203 | } |
| 204 | db_finalize(&q); |
| 205 | blob_reset(&fname); |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | /* Values for the debug= query parameter to finfo */ |
| 210 | #define FINFO_DEBUG_MLINK 0x01 |
| 211 | |
| 212 | /* |
| 213 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -24,23 +24,23 @@ | |
| 24 | ** COMMAND: finfo |
| 25 | ** |
| 26 | ** Usage: %fossil finfo ?OPTIONS? FILENAME |
| 27 | ** |
| 28 | ** Print the complete change history for a single file going backwards |
| 29 | ** in time. The default mode is -l. |
| 30 | ** |
| 31 | ** For the -l|--log mode: If "-b|--brief" is specified one line per revision |
| 32 | ** is printed, otherwise the full comment is printed. The "--limit N" |
| 33 | ** and "--offset P" options limits the output to the first N changes |
| 34 | ** after skipping P changes. |
| 35 | ** |
| 36 | ** In the -s mode prints the status as <status> <revision>. This is |
| 37 | ** a quick status and does not check for up-to-date-ness of the file. |
| 38 | ** |
| 39 | ** In the -p mode, there's an optional flag "-r|--revision REVISION". |
| 40 | ** The specified version (or the latest checked out version) is printed |
| 41 | ** to stdout. The -p mode is another form of the "cat" command. |
| 42 | ** |
| 43 | ** Options: |
| 44 | ** --brief|-b display a brief (one line / revision) summary |
| 45 | ** --limit N display the first N changes |
| 46 | ** --log|-l select log mode (the default) |
| @@ -50,11 +50,11 @@ | |
| 50 | ** to stdout (only in print mode) |
| 51 | ** -s select status mode (print a status indicator for FILE) |
| 52 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 53 | ** boolean: "yes", "no", "true", "false", etc. |
| 54 | ** |
| 55 | ** See also: artifact, cat, descendants, info, leaves |
| 56 | */ |
| 57 | void finfo_cmd(void){ |
| 58 | capture_case_sensitive_option(); |
| 59 | db_must_be_within_tree(); |
| 60 | if (find_option("status","s",0)) { |
| @@ -185,12 +185,13 @@ | |
| 185 | const char *zBr = db_column_text(&q, 5); |
| 186 | char *zOut; |
| 187 | if( zBr==0 ) zBr = "trunk"; |
| 188 | if( iBrief ){ |
| 189 | fossil_print("%s ", zDate); |
| 190 | zOut = sqlite3_mprintf( |
| 191 | "[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)", |
| 192 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 193 | comment_print(zOut, 11, 79); |
| 194 | sqlite3_free(zOut); |
| 195 | }else{ |
| 196 | blob_reset(&line); |
| 197 | blob_appendf(&line, "%.10s ", zCiUuid); |
| @@ -203,10 +204,45 @@ | |
| 204 | } |
| 205 | db_finalize(&q); |
| 206 | blob_reset(&fname); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | /* |
| 211 | ** COMMAND: cat |
| 212 | ** |
| 213 | ** Usage: %fossil cat FILENAME ... ?OPTIONS? |
| 214 | ** |
| 215 | ** Print on standard output the content of one or more files as they exist |
| 216 | ** in the repository. The version currently checked out is shown by default. |
| 217 | ** Other versions may be specified using the -r option. |
| 218 | ** |
| 219 | ** Options: |
| 220 | ** -R|--repository FILE Extract artifacts from repository FILE |
| 221 | ** -r VERSION The specific check-in containing the file |
| 222 | ** |
| 223 | ** See also: finfo |
| 224 | */ |
| 225 | void cat_cmd(void){ |
| 226 | int i; |
| 227 | int rc; |
| 228 | Blob content, fname; |
| 229 | const char *zRev; |
| 230 | db_find_and_open_repository(0, 0); |
| 231 | zRev = find_option("r","r",1); |
| 232 | for(i=2; i<g.argc; i++){ |
| 233 | file_tree_name(g.argv[i], &fname, 1); |
| 234 | blob_zero(&content); |
| 235 | rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0); |
| 236 | if( rc==0 ){ |
| 237 | fossil_fatal("no such file: %s", g.argv[i]); |
| 238 | } |
| 239 | blob_write_to_file(&content, "-"); |
| 240 | blob_reset(&fname); |
| 241 | blob_reset(&content); |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | /* Values for the debug= query parameter to finfo */ |
| 246 | #define FINFO_DEBUG_MLINK 0x01 |
| 247 | |
| 248 | /* |
| 249 |
+1
| --- src/http_transport.c | ||
| +++ src/http_transport.c | ||
| @@ -193,10 +193,11 @@ | ||
| 193 | 193 | blob_appendf(&zCmd, " -P %d", g.urlPort); |
| 194 | 194 | #else |
| 195 | 195 | blob_appendf(&zCmd, " -p %d", g.urlPort); |
| 196 | 196 | #endif |
| 197 | 197 | } |
| 198 | + fossil_force_newline(); | |
| 198 | 199 | fossil_print("%s", blob_str(&zCmd)); /* Show the base of the SSH command */ |
| 199 | 200 | if( g.urlUser && g.urlUser[0] ){ |
| 200 | 201 | zHost = mprintf("%s@%s", g.urlUser, g.urlName); |
| 201 | 202 | #ifdef __MINGW32__ |
| 202 | 203 | /* Only win32 (and specifically PLINK.EXE) support the -pw option */ |
| 203 | 204 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -193,10 +193,11 @@ | |
| 193 | blob_appendf(&zCmd, " -P %d", g.urlPort); |
| 194 | #else |
| 195 | blob_appendf(&zCmd, " -p %d", g.urlPort); |
| 196 | #endif |
| 197 | } |
| 198 | fossil_print("%s", blob_str(&zCmd)); /* Show the base of the SSH command */ |
| 199 | if( g.urlUser && g.urlUser[0] ){ |
| 200 | zHost = mprintf("%s@%s", g.urlUser, g.urlName); |
| 201 | #ifdef __MINGW32__ |
| 202 | /* Only win32 (and specifically PLINK.EXE) support the -pw option */ |
| 203 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -193,10 +193,11 @@ | |
| 193 | blob_appendf(&zCmd, " -P %d", g.urlPort); |
| 194 | #else |
| 195 | blob_appendf(&zCmd, " -p %d", g.urlPort); |
| 196 | #endif |
| 197 | } |
| 198 | fossil_force_newline(); |
| 199 | fossil_print("%s", blob_str(&zCmd)); /* Show the base of the SSH command */ |
| 200 | if( g.urlUser && g.urlUser[0] ){ |
| 201 | zHost = mprintf("%s@%s", g.urlUser, g.urlName); |
| 202 | #ifdef __MINGW32__ |
| 203 | /* Only win32 (and specifically PLINK.EXE) support the -pw option */ |
| 204 |
+27
-6
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -491,15 +491,15 @@ | ||
| 491 | 491 | g.argc = argc; |
| 492 | 492 | g.argv = argv; |
| 493 | 493 | #if defined(_WIN32) && !defined(__MINGW32__) |
| 494 | 494 | parse_windows_command_line(&g.argc, &g.argv); |
| 495 | 495 | GetModuleFileNameW(NULL, buf, MAX_PATH); |
| 496 | - g.nameOfExe = fossil_unicode_to_utf8(buf); | |
| 497 | - for(i=0; i<g.argc; i++) g.argv[i] = fossil_unicode_to_utf8(g.argv[i]); | |
| 496 | + g.nameOfExe = fossil_filename_to_utf8(buf); | |
| 498 | 497 | #else |
| 499 | 498 | g.nameOfExe = g.argv[0]; |
| 500 | 499 | #endif |
| 500 | + for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]); | |
| 501 | 501 | for(i=1; i<g.argc-1; i++){ |
| 502 | 502 | z = g.argv[i]; |
| 503 | 503 | if( z[0]!='-' ) continue; |
| 504 | 504 | z++; |
| 505 | 505 | if( z[0]=='-' ) z++; |
| @@ -712,10 +712,11 @@ | ||
| 712 | 712 | once = 0; |
| 713 | 713 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 714 | 714 | cgi_reply(); |
| 715 | 715 | }else if( !g.fQuiet ){ |
| 716 | 716 | char *zOut = mprintf("%s: %s\n", g.argv[0], z); |
| 717 | + fossil_force_newline(); | |
| 717 | 718 | fossil_puts(zOut, 1); |
| 718 | 719 | fossil_free(zOut); |
| 719 | 720 | } |
| 720 | 721 | } |
| 721 | 722 | free(z); |
| @@ -745,10 +746,11 @@ | ||
| 745 | 746 | g.cgiOutput = 0; |
| 746 | 747 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 747 | 748 | cgi_reply(); |
| 748 | 749 | }else if( !g.fQuiet ){ |
| 749 | 750 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 751 | + fossil_force_newline(); | |
| 750 | 752 | fossil_puts(zOut, 1); |
| 751 | 753 | fossil_free(zOut); |
| 752 | 754 | } |
| 753 | 755 | } |
| 754 | 756 | free(z); |
| @@ -787,10 +789,11 @@ | ||
| 787 | 789 | g.cgiOutput = 0; |
| 788 | 790 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 789 | 791 | cgi_reply(); |
| 790 | 792 | }else{ |
| 791 | 793 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 794 | + fossil_force_newline(); | |
| 792 | 795 | fossil_puts(zOut, 1); |
| 793 | 796 | fossil_free(zOut); |
| 794 | 797 | } |
| 795 | 798 | } |
| 796 | 799 | db_force_rollback(); |
| @@ -813,10 +816,11 @@ | ||
| 813 | 816 | { |
| 814 | 817 | if( g.cgiOutput ){ |
| 815 | 818 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 816 | 819 | }else{ |
| 817 | 820 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 821 | + fossil_force_newline(); | |
| 818 | 822 | fossil_puts(zOut, 1); |
| 819 | 823 | fossil_free(zOut); |
| 820 | 824 | } |
| 821 | 825 | } |
| 822 | 826 | free(z); |
| @@ -854,11 +858,11 @@ | ||
| 854 | 858 | char *zOut = mprintf("SYSTEM: %s\n", zNewCmd); |
| 855 | 859 | fossil_puts(zOut, 1); |
| 856 | 860 | fossil_free(zOut); |
| 857 | 861 | } |
| 858 | 862 | rc = _wsystem(zUnicode); |
| 859 | - fossil_mbcs_free(zUnicode); | |
| 863 | + fossil_unicode_free(zUnicode); | |
| 860 | 864 | free(zNewCmd); |
| 861 | 865 | #else |
| 862 | 866 | /* On unix, evaluate the command directly. |
| 863 | 867 | */ |
| 864 | 868 | if( g.fSystemTrace ) fprintf(stderr, "SYSTEM: %s\n", zOrigCmd); |
| @@ -2018,15 +2022,32 @@ | ||
| 2018 | 2022 | #endif |
| 2019 | 2023 | } |
| 2020 | 2024 | |
| 2021 | 2025 | /* |
| 2022 | 2026 | ** COMMAND: test-echo |
| 2027 | +** | |
| 2028 | +** Usage: %fossil test-echo [--hex] ARGS... | |
| 2023 | 2029 | ** |
| 2024 | 2030 | ** Echo all command-line arguments (enclosed in [...]) to the screen so that |
| 2025 | 2031 | ** wildcard expansion behavior of the host shell can be investigated. |
| 2032 | +** | |
| 2033 | +** With the --hex option, show the output as hexadecimal. This can be used | |
| 2034 | +** to verify the fossil_filename_to_utf8() routine on Windows and Mac. | |
| 2026 | 2035 | */ |
| 2027 | 2036 | void test_echo_cmd(void){ |
| 2028 | - int i; | |
| 2029 | - for(i=0; i<g.argc; i++){ | |
| 2030 | - fossil_print("argv[%d] = [%s]\n", i, g.argv[i]); | |
| 2037 | + int i, j; | |
| 2038 | + if( find_option("hex",0,0)==0 ){ | |
| 2039 | + for(i=0; i<g.argc; i++){ | |
| 2040 | + fossil_print("argv[%d] = [%s]\n", i, g.argv[i]); | |
| 2041 | + } | |
| 2042 | + }else{ | |
| 2043 | + unsigned char *z, c; | |
| 2044 | + for(i=0; i<g.argc; i++){ | |
| 2045 | + fossil_print("argv[%d] = [", i); | |
| 2046 | + z = (unsigned char*)g.argv[i]; | |
| 2047 | + for(j=0; (c = z[j])!=0; j++){ | |
| 2048 | + fossil_print("%02x", c); | |
| 2049 | + } | |
| 2050 | + fossil_print("]\n"); | |
| 2051 | + } | |
| 2031 | 2052 | } |
| 2032 | 2053 | } |
| 2033 | 2054 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -491,15 +491,15 @@ | |
| 491 | g.argc = argc; |
| 492 | g.argv = argv; |
| 493 | #if defined(_WIN32) && !defined(__MINGW32__) |
| 494 | parse_windows_command_line(&g.argc, &g.argv); |
| 495 | GetModuleFileNameW(NULL, buf, MAX_PATH); |
| 496 | g.nameOfExe = fossil_unicode_to_utf8(buf); |
| 497 | for(i=0; i<g.argc; i++) g.argv[i] = fossil_unicode_to_utf8(g.argv[i]); |
| 498 | #else |
| 499 | g.nameOfExe = g.argv[0]; |
| 500 | #endif |
| 501 | for(i=1; i<g.argc-1; i++){ |
| 502 | z = g.argv[i]; |
| 503 | if( z[0]!='-' ) continue; |
| 504 | z++; |
| 505 | if( z[0]=='-' ) z++; |
| @@ -712,10 +712,11 @@ | |
| 712 | once = 0; |
| 713 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 714 | cgi_reply(); |
| 715 | }else if( !g.fQuiet ){ |
| 716 | char *zOut = mprintf("%s: %s\n", g.argv[0], z); |
| 717 | fossil_puts(zOut, 1); |
| 718 | fossil_free(zOut); |
| 719 | } |
| 720 | } |
| 721 | free(z); |
| @@ -745,10 +746,11 @@ | |
| 745 | g.cgiOutput = 0; |
| 746 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 747 | cgi_reply(); |
| 748 | }else if( !g.fQuiet ){ |
| 749 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 750 | fossil_puts(zOut, 1); |
| 751 | fossil_free(zOut); |
| 752 | } |
| 753 | } |
| 754 | free(z); |
| @@ -787,10 +789,11 @@ | |
| 787 | g.cgiOutput = 0; |
| 788 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 789 | cgi_reply(); |
| 790 | }else{ |
| 791 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 792 | fossil_puts(zOut, 1); |
| 793 | fossil_free(zOut); |
| 794 | } |
| 795 | } |
| 796 | db_force_rollback(); |
| @@ -813,10 +816,11 @@ | |
| 813 | { |
| 814 | if( g.cgiOutput ){ |
| 815 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 816 | }else{ |
| 817 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 818 | fossil_puts(zOut, 1); |
| 819 | fossil_free(zOut); |
| 820 | } |
| 821 | } |
| 822 | free(z); |
| @@ -854,11 +858,11 @@ | |
| 854 | char *zOut = mprintf("SYSTEM: %s\n", zNewCmd); |
| 855 | fossil_puts(zOut, 1); |
| 856 | fossil_free(zOut); |
| 857 | } |
| 858 | rc = _wsystem(zUnicode); |
| 859 | fossil_mbcs_free(zUnicode); |
| 860 | free(zNewCmd); |
| 861 | #else |
| 862 | /* On unix, evaluate the command directly. |
| 863 | */ |
| 864 | if( g.fSystemTrace ) fprintf(stderr, "SYSTEM: %s\n", zOrigCmd); |
| @@ -2018,15 +2022,32 @@ | |
| 2018 | #endif |
| 2019 | } |
| 2020 | |
| 2021 | /* |
| 2022 | ** COMMAND: test-echo |
| 2023 | ** |
| 2024 | ** Echo all command-line arguments (enclosed in [...]) to the screen so that |
| 2025 | ** wildcard expansion behavior of the host shell can be investigated. |
| 2026 | */ |
| 2027 | void test_echo_cmd(void){ |
| 2028 | int i; |
| 2029 | for(i=0; i<g.argc; i++){ |
| 2030 | fossil_print("argv[%d] = [%s]\n", i, g.argv[i]); |
| 2031 | } |
| 2032 | } |
| 2033 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -491,15 +491,15 @@ | |
| 491 | g.argc = argc; |
| 492 | g.argv = argv; |
| 493 | #if defined(_WIN32) && !defined(__MINGW32__) |
| 494 | parse_windows_command_line(&g.argc, &g.argv); |
| 495 | GetModuleFileNameW(NULL, buf, MAX_PATH); |
| 496 | g.nameOfExe = fossil_filename_to_utf8(buf); |
| 497 | #else |
| 498 | g.nameOfExe = g.argv[0]; |
| 499 | #endif |
| 500 | for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]); |
| 501 | for(i=1; i<g.argc-1; i++){ |
| 502 | z = g.argv[i]; |
| 503 | if( z[0]!='-' ) continue; |
| 504 | z++; |
| 505 | if( z[0]=='-' ) z++; |
| @@ -712,10 +712,11 @@ | |
| 712 | once = 0; |
| 713 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 714 | cgi_reply(); |
| 715 | }else if( !g.fQuiet ){ |
| 716 | char *zOut = mprintf("%s: %s\n", g.argv[0], z); |
| 717 | fossil_force_newline(); |
| 718 | fossil_puts(zOut, 1); |
| 719 | fossil_free(zOut); |
| 720 | } |
| 721 | } |
| 722 | free(z); |
| @@ -745,10 +746,11 @@ | |
| 746 | g.cgiOutput = 0; |
| 747 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 748 | cgi_reply(); |
| 749 | }else if( !g.fQuiet ){ |
| 750 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 751 | fossil_force_newline(); |
| 752 | fossil_puts(zOut, 1); |
| 753 | fossil_free(zOut); |
| 754 | } |
| 755 | } |
| 756 | free(z); |
| @@ -787,10 +789,11 @@ | |
| 789 | g.cgiOutput = 0; |
| 790 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 791 | cgi_reply(); |
| 792 | }else{ |
| 793 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 794 | fossil_force_newline(); |
| 795 | fossil_puts(zOut, 1); |
| 796 | fossil_free(zOut); |
| 797 | } |
| 798 | } |
| 799 | db_force_rollback(); |
| @@ -813,10 +816,11 @@ | |
| 816 | { |
| 817 | if( g.cgiOutput ){ |
| 818 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 819 | }else{ |
| 820 | char *zOut = mprintf("\r%s: %s\n", g.argv[0], z); |
| 821 | fossil_force_newline(); |
| 822 | fossil_puts(zOut, 1); |
| 823 | fossil_free(zOut); |
| 824 | } |
| 825 | } |
| 826 | free(z); |
| @@ -854,11 +858,11 @@ | |
| 858 | char *zOut = mprintf("SYSTEM: %s\n", zNewCmd); |
| 859 | fossil_puts(zOut, 1); |
| 860 | fossil_free(zOut); |
| 861 | } |
| 862 | rc = _wsystem(zUnicode); |
| 863 | fossil_unicode_free(zUnicode); |
| 864 | free(zNewCmd); |
| 865 | #else |
| 866 | /* On unix, evaluate the command directly. |
| 867 | */ |
| 868 | if( g.fSystemTrace ) fprintf(stderr, "SYSTEM: %s\n", zOrigCmd); |
| @@ -2018,15 +2022,32 @@ | |
| 2022 | #endif |
| 2023 | } |
| 2024 | |
| 2025 | /* |
| 2026 | ** COMMAND: test-echo |
| 2027 | ** |
| 2028 | ** Usage: %fossil test-echo [--hex] ARGS... |
| 2029 | ** |
| 2030 | ** Echo all command-line arguments (enclosed in [...]) to the screen so that |
| 2031 | ** wildcard expansion behavior of the host shell can be investigated. |
| 2032 | ** |
| 2033 | ** With the --hex option, show the output as hexadecimal. This can be used |
| 2034 | ** to verify the fossil_filename_to_utf8() routine on Windows and Mac. |
| 2035 | */ |
| 2036 | void test_echo_cmd(void){ |
| 2037 | int i, j; |
| 2038 | if( find_option("hex",0,0)==0 ){ |
| 2039 | for(i=0; i<g.argc; i++){ |
| 2040 | fossil_print("argv[%d] = [%s]\n", i, g.argv[i]); |
| 2041 | } |
| 2042 | }else{ |
| 2043 | unsigned char *z, c; |
| 2044 | for(i=0; i<g.argc; i++){ |
| 2045 | fossil_print("argv[%d] = [", i); |
| 2046 | z = (unsigned char*)g.argv[i]; |
| 2047 | for(j=0; (c = z[j])!=0; j++){ |
| 2048 | fossil_print("%02x", c); |
| 2049 | } |
| 2050 | fossil_print("]\n"); |
| 2051 | } |
| 2052 | } |
| 2053 | } |
| 2054 |
+11
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -102,10 +102,11 @@ | ||
| 102 | 102 | $(SRCDIR)/tktsetup.c \ |
| 103 | 103 | $(SRCDIR)/undo.c \ |
| 104 | 104 | $(SRCDIR)/update.c \ |
| 105 | 105 | $(SRCDIR)/url.c \ |
| 106 | 106 | $(SRCDIR)/user.c \ |
| 107 | + $(SRCDIR)/utf8.c \ | |
| 107 | 108 | $(SRCDIR)/verify.c \ |
| 108 | 109 | $(SRCDIR)/vfile.c \ |
| 109 | 110 | $(SRCDIR)/wiki.c \ |
| 110 | 111 | $(SRCDIR)/wikiformat.c \ |
| 111 | 112 | $(SRCDIR)/winhttp.c \ |
| @@ -203,10 +204,11 @@ | ||
| 203 | 204 | $(OBJDIR)/tktsetup_.c \ |
| 204 | 205 | $(OBJDIR)/undo_.c \ |
| 205 | 206 | $(OBJDIR)/update_.c \ |
| 206 | 207 | $(OBJDIR)/url_.c \ |
| 207 | 208 | $(OBJDIR)/user_.c \ |
| 209 | + $(OBJDIR)/utf8_.c \ | |
| 208 | 210 | $(OBJDIR)/verify_.c \ |
| 209 | 211 | $(OBJDIR)/vfile_.c \ |
| 210 | 212 | $(OBJDIR)/wiki_.c \ |
| 211 | 213 | $(OBJDIR)/wikiformat_.c \ |
| 212 | 214 | $(OBJDIR)/winhttp_.c \ |
| @@ -304,10 +306,11 @@ | ||
| 304 | 306 | $(OBJDIR)/tktsetup.o \ |
| 305 | 307 | $(OBJDIR)/undo.o \ |
| 306 | 308 | $(OBJDIR)/update.o \ |
| 307 | 309 | $(OBJDIR)/url.o \ |
| 308 | 310 | $(OBJDIR)/user.o \ |
| 311 | + $(OBJDIR)/utf8.o \ | |
| 309 | 312 | $(OBJDIR)/verify.o \ |
| 310 | 313 | $(OBJDIR)/vfile.o \ |
| 311 | 314 | $(OBJDIR)/wiki.o \ |
| 312 | 315 | $(OBJDIR)/wikiformat.o \ |
| 313 | 316 | $(OBJDIR)/winhttp.o \ |
| @@ -381,11 +384,11 @@ | ||
| 381 | 384 | |
| 382 | 385 | |
| 383 | 386 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 384 | 387 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 385 | 388 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 386 | - $(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)/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)/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 | |
| 389 | + $(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)/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 | |
| 387 | 390 | touch $(OBJDIR)/headers |
| 388 | 391 | $(OBJDIR)/headers: Makefile |
| 389 | 392 | $(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 |
| 390 | 393 | Makefile: |
| 391 | 394 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -1016,10 +1019,17 @@ | ||
| 1016 | 1019 | |
| 1017 | 1020 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1018 | 1021 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1019 | 1022 | |
| 1020 | 1023 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1024 | +$(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate | |
| 1025 | + $(OBJDIR)/translate $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c | |
| 1026 | + | |
| 1027 | +$(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h | |
| 1028 | + $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c | |
| 1029 | + | |
| 1030 | +$(OBJDIR)/utf8.h: $(OBJDIR)/headers | |
| 1021 | 1031 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1022 | 1032 | $(OBJDIR)/translate $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1023 | 1033 | |
| 1024 | 1034 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1025 | 1035 | $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c |
| 1026 | 1036 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -102,10 +102,11 @@ | |
| 102 | $(SRCDIR)/tktsetup.c \ |
| 103 | $(SRCDIR)/undo.c \ |
| 104 | $(SRCDIR)/update.c \ |
| 105 | $(SRCDIR)/url.c \ |
| 106 | $(SRCDIR)/user.c \ |
| 107 | $(SRCDIR)/verify.c \ |
| 108 | $(SRCDIR)/vfile.c \ |
| 109 | $(SRCDIR)/wiki.c \ |
| 110 | $(SRCDIR)/wikiformat.c \ |
| 111 | $(SRCDIR)/winhttp.c \ |
| @@ -203,10 +204,11 @@ | |
| 203 | $(OBJDIR)/tktsetup_.c \ |
| 204 | $(OBJDIR)/undo_.c \ |
| 205 | $(OBJDIR)/update_.c \ |
| 206 | $(OBJDIR)/url_.c \ |
| 207 | $(OBJDIR)/user_.c \ |
| 208 | $(OBJDIR)/verify_.c \ |
| 209 | $(OBJDIR)/vfile_.c \ |
| 210 | $(OBJDIR)/wiki_.c \ |
| 211 | $(OBJDIR)/wikiformat_.c \ |
| 212 | $(OBJDIR)/winhttp_.c \ |
| @@ -304,10 +306,11 @@ | |
| 304 | $(OBJDIR)/tktsetup.o \ |
| 305 | $(OBJDIR)/undo.o \ |
| 306 | $(OBJDIR)/update.o \ |
| 307 | $(OBJDIR)/url.o \ |
| 308 | $(OBJDIR)/user.o \ |
| 309 | $(OBJDIR)/verify.o \ |
| 310 | $(OBJDIR)/vfile.o \ |
| 311 | $(OBJDIR)/wiki.o \ |
| 312 | $(OBJDIR)/wikiformat.o \ |
| 313 | $(OBJDIR)/winhttp.o \ |
| @@ -381,11 +384,11 @@ | |
| 381 | |
| 382 | |
| 383 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 384 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 385 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 386 | $(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)/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)/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 |
| 387 | touch $(OBJDIR)/headers |
| 388 | $(OBJDIR)/headers: Makefile |
| 389 | $(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 |
| 390 | Makefile: |
| 391 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -1016,10 +1019,17 @@ | |
| 1016 | |
| 1017 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1018 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1019 | |
| 1020 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1021 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1022 | $(OBJDIR)/translate $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1023 | |
| 1024 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1025 | $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c |
| 1026 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -102,10 +102,11 @@ | |
| 102 | $(SRCDIR)/tktsetup.c \ |
| 103 | $(SRCDIR)/undo.c \ |
| 104 | $(SRCDIR)/update.c \ |
| 105 | $(SRCDIR)/url.c \ |
| 106 | $(SRCDIR)/user.c \ |
| 107 | $(SRCDIR)/utf8.c \ |
| 108 | $(SRCDIR)/verify.c \ |
| 109 | $(SRCDIR)/vfile.c \ |
| 110 | $(SRCDIR)/wiki.c \ |
| 111 | $(SRCDIR)/wikiformat.c \ |
| 112 | $(SRCDIR)/winhttp.c \ |
| @@ -203,10 +204,11 @@ | |
| 204 | $(OBJDIR)/tktsetup_.c \ |
| 205 | $(OBJDIR)/undo_.c \ |
| 206 | $(OBJDIR)/update_.c \ |
| 207 | $(OBJDIR)/url_.c \ |
| 208 | $(OBJDIR)/user_.c \ |
| 209 | $(OBJDIR)/utf8_.c \ |
| 210 | $(OBJDIR)/verify_.c \ |
| 211 | $(OBJDIR)/vfile_.c \ |
| 212 | $(OBJDIR)/wiki_.c \ |
| 213 | $(OBJDIR)/wikiformat_.c \ |
| 214 | $(OBJDIR)/winhttp_.c \ |
| @@ -304,10 +306,11 @@ | |
| 306 | $(OBJDIR)/tktsetup.o \ |
| 307 | $(OBJDIR)/undo.o \ |
| 308 | $(OBJDIR)/update.o \ |
| 309 | $(OBJDIR)/url.o \ |
| 310 | $(OBJDIR)/user.o \ |
| 311 | $(OBJDIR)/utf8.o \ |
| 312 | $(OBJDIR)/verify.o \ |
| 313 | $(OBJDIR)/vfile.o \ |
| 314 | $(OBJDIR)/wiki.o \ |
| 315 | $(OBJDIR)/wikiformat.o \ |
| 316 | $(OBJDIR)/winhttp.o \ |
| @@ -381,11 +384,11 @@ | |
| 384 | |
| 385 | |
| 386 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 387 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 388 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 389 | $(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)/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 |
| 390 | touch $(OBJDIR)/headers |
| 391 | $(OBJDIR)/headers: Makefile |
| 392 | $(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 |
| 393 | Makefile: |
| 394 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -1016,10 +1019,17 @@ | |
| 1019 | |
| 1020 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1021 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1022 | |
| 1023 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1024 | $(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate |
| 1025 | $(OBJDIR)/translate $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c |
| 1026 | |
| 1027 | $(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h |
| 1028 | $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c |
| 1029 | |
| 1030 | $(OBJDIR)/utf8.h: $(OBJDIR)/headers |
| 1031 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1032 | $(OBJDIR)/translate $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1033 | |
| 1034 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1035 | $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c |
| 1036 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -107,10 +107,11 @@ | ||
| 107 | 107 | update |
| 108 | 108 | url |
| 109 | 109 | user |
| 110 | 110 | verify |
| 111 | 111 | vfile |
| 112 | + utf8 | |
| 112 | 113 | wiki |
| 113 | 114 | wikiformat |
| 114 | 115 | winhttp |
| 115 | 116 | wysiwyg |
| 116 | 117 | xfer |
| 117 | 118 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -107,10 +107,11 @@ | |
| 107 | update |
| 108 | url |
| 109 | user |
| 110 | verify |
| 111 | vfile |
| 112 | wiki |
| 113 | wikiformat |
| 114 | winhttp |
| 115 | wysiwyg |
| 116 | xfer |
| 117 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -107,10 +107,11 @@ | |
| 107 | update |
| 108 | url |
| 109 | user |
| 110 | verify |
| 111 | vfile |
| 112 | utf8 |
| 113 | wiki |
| 114 | wikiformat |
| 115 | winhttp |
| 116 | wysiwyg |
| 117 | xfer |
| 118 |
+21
-2
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -818,27 +818,46 @@ | ||
| 818 | 818 | free(g.zErrMsg); |
| 819 | 819 | g.zErrMsg = 0; |
| 820 | 820 | g.iErrPriority = 0; |
| 821 | 821 | } |
| 822 | 822 | |
| 823 | +/* True if the last character standard output cursor is setting at | |
| 824 | +** the beginning of a blank link. False if a \r has been to move the | |
| 825 | +** cursor to the beginning of the line or if not at the beginning of | |
| 826 | +** a line. | |
| 827 | +** was a \n | |
| 828 | +*/ | |
| 829 | +static int stdoutAtBOL = 1; | |
| 830 | + | |
| 823 | 831 | /* |
| 824 | 832 | ** Write to standard output or standard error. |
| 825 | 833 | ** |
| 826 | 834 | ** On windows, transform the output into the current terminal encoding |
| 827 | 835 | ** if the output is going to the screen. If output is redirected into |
| 828 | 836 | ** a file, no translation occurs. No translation ever occurs on unix. |
| 829 | 837 | */ |
| 830 | 838 | void fossil_puts(const char *z, int toStdErr){ |
| 839 | + int n = (int)strlen(z); | |
| 840 | + if( n==0 ) return; | |
| 841 | + if( toStdErr==0 ) stdoutAtBOL = (z[n-1]=='\n'); | |
| 831 | 842 | #if defined(_WIN32) |
| 832 | - if( fossil_utf8_to_console(z, strlen(z), toStdErr) >= 0 ){ | |
| 843 | + if( fossil_utf8_to_console(z, n, toStdErr) >= 0 ){ | |
| 833 | 844 | return; |
| 834 | 845 | } |
| 835 | 846 | #endif |
| 836 | 847 | assert( toStdErr==0 || toStdErr==1 ); |
| 837 | - fwrite(z, 1, strlen(z), toStdErr ? stderr : stdout); | |
| 848 | + fwrite(z, 1, n, toStdErr ? stderr : stdout); | |
| 838 | 849 | fflush(toStdErr ? stderr : stdout); |
| 839 | 850 | } |
| 851 | + | |
| 852 | +/* | |
| 853 | +** Force the the standard output cursor to move to the beginning | |
| 854 | +** of a line, if it is not there already. | |
| 855 | +*/ | |
| 856 | +void fossil_force_newline(void){ | |
| 857 | + if( g.cgiOutput==0 && stdoutAtBOL==0 ) fossil_puts("\n", 0); | |
| 858 | +} | |
| 840 | 859 | |
| 841 | 860 | /* |
| 842 | 861 | ** Write output for user consumption. If g.cgiOutput is enabled, then |
| 843 | 862 | ** send the output as part of the CGI reply. If g.cgiOutput is false, |
| 844 | 863 | ** then write on standard output. |
| 845 | 864 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -818,27 +818,46 @@ | |
| 818 | free(g.zErrMsg); |
| 819 | g.zErrMsg = 0; |
| 820 | g.iErrPriority = 0; |
| 821 | } |
| 822 | |
| 823 | /* |
| 824 | ** Write to standard output or standard error. |
| 825 | ** |
| 826 | ** On windows, transform the output into the current terminal encoding |
| 827 | ** if the output is going to the screen. If output is redirected into |
| 828 | ** a file, no translation occurs. No translation ever occurs on unix. |
| 829 | */ |
| 830 | void fossil_puts(const char *z, int toStdErr){ |
| 831 | #if defined(_WIN32) |
| 832 | if( fossil_utf8_to_console(z, strlen(z), toStdErr) >= 0 ){ |
| 833 | return; |
| 834 | } |
| 835 | #endif |
| 836 | assert( toStdErr==0 || toStdErr==1 ); |
| 837 | fwrite(z, 1, strlen(z), toStdErr ? stderr : stdout); |
| 838 | fflush(toStdErr ? stderr : stdout); |
| 839 | } |
| 840 | |
| 841 | /* |
| 842 | ** Write output for user consumption. If g.cgiOutput is enabled, then |
| 843 | ** send the output as part of the CGI reply. If g.cgiOutput is false, |
| 844 | ** then write on standard output. |
| 845 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -818,27 +818,46 @@ | |
| 818 | free(g.zErrMsg); |
| 819 | g.zErrMsg = 0; |
| 820 | g.iErrPriority = 0; |
| 821 | } |
| 822 | |
| 823 | /* True if the last character standard output cursor is setting at |
| 824 | ** the beginning of a blank link. False if a \r has been to move the |
| 825 | ** cursor to the beginning of the line or if not at the beginning of |
| 826 | ** a line. |
| 827 | ** was a \n |
| 828 | */ |
| 829 | static int stdoutAtBOL = 1; |
| 830 | |
| 831 | /* |
| 832 | ** Write to standard output or standard error. |
| 833 | ** |
| 834 | ** On windows, transform the output into the current terminal encoding |
| 835 | ** if the output is going to the screen. If output is redirected into |
| 836 | ** a file, no translation occurs. No translation ever occurs on unix. |
| 837 | */ |
| 838 | void fossil_puts(const char *z, int toStdErr){ |
| 839 | int n = (int)strlen(z); |
| 840 | if( n==0 ) return; |
| 841 | if( toStdErr==0 ) stdoutAtBOL = (z[n-1]=='\n'); |
| 842 | #if defined(_WIN32) |
| 843 | if( fossil_utf8_to_console(z, n, toStdErr) >= 0 ){ |
| 844 | return; |
| 845 | } |
| 846 | #endif |
| 847 | assert( toStdErr==0 || toStdErr==1 ); |
| 848 | fwrite(z, 1, n, toStdErr ? stderr : stdout); |
| 849 | fflush(toStdErr ? stderr : stdout); |
| 850 | } |
| 851 | |
| 852 | /* |
| 853 | ** Force the the standard output cursor to move to the beginning |
| 854 | ** of a line, if it is not there already. |
| 855 | */ |
| 856 | void fossil_force_newline(void){ |
| 857 | if( g.cgiOutput==0 && stdoutAtBOL==0 ) fossil_puts("\n", 0); |
| 858 | } |
| 859 | |
| 860 | /* |
| 861 | ** Write output for user consumption. If g.cgiOutput is enabled, then |
| 862 | ** send the output as part of the CGI reply. If g.cgiOutput is false, |
| 863 | ** then write on standard output. |
| 864 |
+2
-2
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -845,11 +845,11 @@ | ||
| 845 | 845 | if( pEntry->d_name[0]=='.' ){ |
| 846 | 846 | continue; |
| 847 | 847 | } |
| 848 | 848 | zUtf8Name = fossil_filename_to_utf8(pEntry->d_name); |
| 849 | 849 | zSubpath = mprintf("%s/%s", zPath, zUtf8Name); |
| 850 | - fossil_mbcs_free(zUtf8Name); | |
| 850 | + fossil_filename_free(zUtf8Name); | |
| 851 | 851 | if( file_isdir(zSubpath)==1 ){ |
| 852 | 852 | recon_read_dir(zSubpath); |
| 853 | 853 | } |
| 854 | 854 | blob_init(&path, 0, 0); |
| 855 | 855 | blob_appendf(&path, "%s", zSubpath); |
| @@ -867,11 +867,11 @@ | ||
| 867 | 867 | closedir(d); |
| 868 | 868 | }else { |
| 869 | 869 | fossil_panic("encountered error %d while trying to open \"%s\".", |
| 870 | 870 | errno, g.argv[3]); |
| 871 | 871 | } |
| 872 | - fossil_mbcs_free(zUnicodePath); | |
| 872 | + fossil_filename_free(zUnicodePath); | |
| 873 | 873 | } |
| 874 | 874 | |
| 875 | 875 | /* |
| 876 | 876 | ** COMMAND: reconstruct* |
| 877 | 877 | ** |
| 878 | 878 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -845,11 +845,11 @@ | |
| 845 | if( pEntry->d_name[0]=='.' ){ |
| 846 | continue; |
| 847 | } |
| 848 | zUtf8Name = fossil_filename_to_utf8(pEntry->d_name); |
| 849 | zSubpath = mprintf("%s/%s", zPath, zUtf8Name); |
| 850 | fossil_mbcs_free(zUtf8Name); |
| 851 | if( file_isdir(zSubpath)==1 ){ |
| 852 | recon_read_dir(zSubpath); |
| 853 | } |
| 854 | blob_init(&path, 0, 0); |
| 855 | blob_appendf(&path, "%s", zSubpath); |
| @@ -867,11 +867,11 @@ | |
| 867 | closedir(d); |
| 868 | }else { |
| 869 | fossil_panic("encountered error %d while trying to open \"%s\".", |
| 870 | errno, g.argv[3]); |
| 871 | } |
| 872 | fossil_mbcs_free(zUnicodePath); |
| 873 | } |
| 874 | |
| 875 | /* |
| 876 | ** COMMAND: reconstruct* |
| 877 | ** |
| 878 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -845,11 +845,11 @@ | |
| 845 | if( pEntry->d_name[0]=='.' ){ |
| 846 | continue; |
| 847 | } |
| 848 | zUtf8Name = fossil_filename_to_utf8(pEntry->d_name); |
| 849 | zSubpath = mprintf("%s/%s", zPath, zUtf8Name); |
| 850 | fossil_filename_free(zUtf8Name); |
| 851 | if( file_isdir(zSubpath)==1 ){ |
| 852 | recon_read_dir(zSubpath); |
| 853 | } |
| 854 | blob_init(&path, 0, 0); |
| 855 | blob_appendf(&path, "%s", zSubpath); |
| @@ -867,11 +867,11 @@ | |
| 867 | closedir(d); |
| 868 | }else { |
| 869 | fossil_panic("encountered error %d while trying to open \"%s\".", |
| 870 | errno, g.argv[3]); |
| 871 | } |
| 872 | fossil_filename_free(zUnicodePath); |
| 873 | } |
| 874 | |
| 875 | /* |
| 876 | ** COMMAND: reconstruct* |
| 877 | ** |
| 878 |
+2
-2
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -845,11 +845,11 @@ | ||
| 845 | 845 | if( pEntry->d_name[0]=='.' ){ |
| 846 | 846 | continue; |
| 847 | 847 | } |
| 848 | 848 | zUtf8Name = fossil_filename_to_utf8(pEntry->d_name); |
| 849 | 849 | zSubpath = mprintf("%s/%s", zPath, zUtf8Name); |
| 850 | - fossil_mbcs_free(zUtf8Name); | |
| 850 | + fossil_filename_free(zUtf8Name); | |
| 851 | 851 | if( file_isdir(zSubpath)==1 ){ |
| 852 | 852 | recon_read_dir(zSubpath); |
| 853 | 853 | } |
| 854 | 854 | blob_init(&path, 0, 0); |
| 855 | 855 | blob_appendf(&path, "%s", zSubpath); |
| @@ -867,11 +867,11 @@ | ||
| 867 | 867 | closedir(d); |
| 868 | 868 | }else { |
| 869 | 869 | fossil_panic("encountered error %d while trying to open \"%s\".", |
| 870 | 870 | errno, g.argv[3]); |
| 871 | 871 | } |
| 872 | - fossil_mbcs_free(zUnicodePath); | |
| 872 | + fossil_filename_free(zUnicodePath); | |
| 873 | 873 | } |
| 874 | 874 | |
| 875 | 875 | /* |
| 876 | 876 | ** COMMAND: reconstruct* |
| 877 | 877 | ** |
| 878 | 878 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -845,11 +845,11 @@ | |
| 845 | if( pEntry->d_name[0]=='.' ){ |
| 846 | continue; |
| 847 | } |
| 848 | zUtf8Name = fossil_filename_to_utf8(pEntry->d_name); |
| 849 | zSubpath = mprintf("%s/%s", zPath, zUtf8Name); |
| 850 | fossil_mbcs_free(zUtf8Name); |
| 851 | if( file_isdir(zSubpath)==1 ){ |
| 852 | recon_read_dir(zSubpath); |
| 853 | } |
| 854 | blob_init(&path, 0, 0); |
| 855 | blob_appendf(&path, "%s", zSubpath); |
| @@ -867,11 +867,11 @@ | |
| 867 | closedir(d); |
| 868 | }else { |
| 869 | fossil_panic("encountered error %d while trying to open \"%s\".", |
| 870 | errno, g.argv[3]); |
| 871 | } |
| 872 | fossil_mbcs_free(zUnicodePath); |
| 873 | } |
| 874 | |
| 875 | /* |
| 876 | ** COMMAND: reconstruct* |
| 877 | ** |
| 878 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -845,11 +845,11 @@ | |
| 845 | if( pEntry->d_name[0]=='.' ){ |
| 846 | continue; |
| 847 | } |
| 848 | zUtf8Name = fossil_filename_to_utf8(pEntry->d_name); |
| 849 | zSubpath = mprintf("%s/%s", zPath, zUtf8Name); |
| 850 | fossil_filename_free(zUtf8Name); |
| 851 | if( file_isdir(zSubpath)==1 ){ |
| 852 | recon_read_dir(zSubpath); |
| 853 | } |
| 854 | blob_init(&path, 0, 0); |
| 855 | blob_appendf(&path, "%s", zSubpath); |
| @@ -867,11 +867,11 @@ | |
| 867 | closedir(d); |
| 868 | }else { |
| 869 | fossil_panic("encountered error %d while trying to open \"%s\".", |
| 870 | errno, g.argv[3]); |
| 871 | } |
| 872 | fossil_filename_free(zUnicodePath); |
| 873 | } |
| 874 | |
| 875 | /* |
| 876 | ** COMMAND: reconstruct* |
| 877 | ** |
| 878 |
+1
| --- src/user.c | ||
| +++ src/user.c | ||
| @@ -132,10 +132,11 @@ | ||
| 132 | 132 | */ |
| 133 | 133 | void prompt_user(const char *zPrompt, Blob *pIn){ |
| 134 | 134 | char *z; |
| 135 | 135 | char zLine[1000]; |
| 136 | 136 | blob_zero(pIn); |
| 137 | + fossil_force_newline(); | |
| 137 | 138 | fossil_print("%s", zPrompt); |
| 138 | 139 | fflush(stdout); |
| 139 | 140 | z = fgets(zLine, sizeof(zLine), stdin); |
| 140 | 141 | if( z ){ |
| 141 | 142 | strip_string(pIn, z); |
| 142 | 143 | |
| 143 | 144 | ADDED src/utf8.c |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -132,10 +132,11 @@ | |
| 132 | */ |
| 133 | void prompt_user(const char *zPrompt, Blob *pIn){ |
| 134 | char *z; |
| 135 | char zLine[1000]; |
| 136 | blob_zero(pIn); |
| 137 | fossil_print("%s", zPrompt); |
| 138 | fflush(stdout); |
| 139 | z = fgets(zLine, sizeof(zLine), stdin); |
| 140 | if( z ){ |
| 141 | strip_string(pIn, z); |
| 142 | |
| 143 | DDED src/utf8.c |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -132,10 +132,11 @@ | |
| 132 | */ |
| 133 | void prompt_user(const char *zPrompt, Blob *pIn){ |
| 134 | char *z; |
| 135 | char zLine[1000]; |
| 136 | blob_zero(pIn); |
| 137 | fossil_force_newline(); |
| 138 | fossil_print("%s", zPrompt); |
| 139 | fflush(stdout); |
| 140 | z = fgets(zLine, sizeof(zLine), stdin); |
| 141 | if( z ){ |
| 142 | strip_string(pIn, z); |
| 143 | |
| 144 | DDED src/utf8.c |
+14
| --- a/src/utf8.c | ||
| +++ b/src/utf8.c | ||
| @@ -0,0 +1,14 @@ | ||
| 1 | +>MAX_PATHfilename_to_ut#indif in the) { | |
| 2 | + /* If[/\]", don't process the ':' */ | |
| 3 | + if( nChar>MAX_PATH ) { | |
| 4 | + memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ | |
| 5 | +# include <sys/cygwin.h> | |
| 6 | +# define CP_UTF8 65001 | |
| 7 | + __declspec(dllidef _WIN32def _WIN32def _WIN32 | |
| 8 | + sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; | |
| 9 | + char *zUtf; | |
| 10 | + wch8. #ifdef _WIN32#else | |
| 11 | + return (char*)zMbcsznicode text into UTF8(char *)zUnicode# | |
| 12 | +** to precomposed UTF8. WCHARFF80) == 0xF000 ){ | |
| 13 | + WCHARFWCHAR *zUnicode = fossil_utf8#ifdef _WIN32 | |
| 14 | +APPLE__def _WIN32UtfFilename)>MAX_PATHfilenam>MAX_PATHfilena |
| --- a/src/utf8.c | |
| +++ b/src/utf8.c | |
| @@ -0,0 +1,14 @@ | |
| --- a/src/utf8.c | |
| +++ b/src/utf8.c | |
| @@ -0,0 +1,14 @@ | |
| 1 | >MAX_PATHfilename_to_ut#indif in the) { |
| 2 | /* If[/\]", don't process the ':' */ |
| 3 | if( nChar>MAX_PATH ) { |
| 4 | memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ |
| 5 | # include <sys/cygwin.h> |
| 6 | # define CP_UTF8 65001 |
| 7 | __declspec(dllidef _WIN32def _WIN32def _WIN32 |
| 8 | sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; |
| 9 | char *zUtf; |
| 10 | wch8. #ifdef _WIN32#else |
| 11 | return (char*)zMbcsznicode text into UTF8(char *)zUnicode# |
| 12 | ** to precomposed UTF8. WCHARFF80) == 0xF000 ){ |
| 13 | WCHARFWCHAR *zUnicode = fossil_utf8#ifdef _WIN32 |
| 14 | APPLE__def _WIN32UtfFilename)>MAX_PATHfilenam>MAX_PATHfilena |
+3
-40
| --- a/src/utf8.c | ||
| +++ b/src/utf8.c | ||
| @@ -1,4 +1,4 @@ | ||
| 1 | -#ifdef _WIN32f _WIN32nicode* 2IN32>MAX_PATHfilename_to_ut#indif in the) { | |
| 1 | +>MAX_PATHfilename_to_ut#indif in the) { | |
| 2 | 2 | /* If[/\]", don't process the ':' */ |
| 3 | 3 | if( nChar>MAX_PATH ) { |
| 4 | 4 | memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ |
| @@ -10,42 +10,5 @@ | ||
| 10 | 10 | wch8. #ifdef _WIN32#else |
| 11 | 11 | return (char*)zMbcsznicode text into UTF8(char *)zUnicode# |
| 12 | 12 | ** to precomposed UTF8. WCHARFF80) == 0xF000 ){ |
| 13 | - WCHARFWCHAR *zUnicode = fossil_utf8const =>MAX_PATHfilename_to_ut#indif in the) { | |
| 14 | - /* If[/\]", don't process the ':' */ | |
| 15 | - if( nChar>MAX_PATH ) { | |
| 16 | - memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ | |
| 17 | -# include <sys/cygwin.h> | |
| 18 | -# define CP_UTF8 65001 | |
| 19 | - __declspec(dllidef _WIN32def _WIN32def _WIN32 | |
| 20 | - sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; | |
| 21 | - char *zUtf; | |
| 22 | - wch8. #ifdef _WIN32#else | |
| 23 | - return (char*)zMbcsznicode text into UTF8(char *)zUnicode# | |
| 24 | -** to precomposed UTF8. WCHARFF80) == 0xF000 ){ | |
| 25 | - WCHARFWCHAR *z2>MAX_PATHfilename_to_ut#indif in the) { | |
| 26 | - /* Iifdef _WIN32f _WIN32nicode* 2IN#ifdef _WIchar *zUnicodeicode* 2IN32>MAX_P#ifdef _WIN32f _WIN32nicode* 2IN32>MAX_PATHfilename_to_ut#indif in the) { | |
| 27 | - /* If[/\]", don't process the ':' */ | |
| 28 | - if( nChar>MAX_PATH ) { | |
| 29 | - memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ | |
| 30 | -# include <sys/cygwin.h> | |
| 31 | -# define CP_UTF8 65001 | |
| 32 | - __declspec(dllidef _WIN32def _WIN32def _WIN32 | |
| 33 | - sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; | |
| 34 | - char *zUtf; | |
| 35 | - wch8. #ifdef _WIN32#else | |
| 36 | - return (char*)zMbcsznicode text into UTF8(char *)zUnicode# | |
| 37 | -** to precomposed UTF8. WCHARFF80) == 0xF000 ){ | |
| 38 | - WCHARFWCHAR *zUnicode = fossil_utf8const =>MAX_PATHfilename_to_ut#indif in the) { | |
| 39 | - /* If[/\]", don't process the ':' */ | |
| 40 | - if( nChar>MAX_PATH ) { | |
| 41 | - memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ | |
| 42 | -# include <sys/cygwin.h> | |
| 43 | -# define CP_UTF8 65001 | |
| 44 | - __declspec(dllidef _WIN32def _WIN32def _WIN32 | |
| 45 | - sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; | |
| 46 | - char *zUtf; | |
| 47 | - wch8. #ifdef _WIN32#else | |
| 48 | - return (char*)zMbcsznicode text into UTF8(char *)zUnicode# | |
| 49 | -** to precomposed UTF8. WCHARFF80) == 0xF000 ){ | |
| 50 | - WCHARFWCHAR *z2>MAX_PATHfilename_to_ut#indif in the) { | |
| 51 | - /* Iifdef _WIN32f _WIN32nicode* 2IN#ifdef _WIcharFilename[n]>0 && zFilename[n]<=0 | |
| 13 | + WCHARFWCHAR *zUnicode = fossil_utf8#ifdef _WIN32 | |
| 14 | +APPLE__def _WIN32UtfFilename)>MAX_PATHfilenam>MAX_PATHfilena |
| --- a/src/utf8.c | |
| +++ b/src/utf8.c | |
| @@ -1,4 +1,4 @@ | |
| 1 | #ifdef _WIN32f _WIN32nicode* 2IN32>MAX_PATHfilename_to_ut#indif in the) { |
| 2 | /* If[/\]", don't process the ':' */ |
| 3 | if( nChar>MAX_PATH ) { |
| 4 | memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ |
| @@ -10,42 +10,5 @@ | |
| 10 | wch8. #ifdef _WIN32#else |
| 11 | return (char*)zMbcsznicode text into UTF8(char *)zUnicode# |
| 12 | ** to precomposed UTF8. WCHARFF80) == 0xF000 ){ |
| 13 | WCHARFWCHAR *zUnicode = fossil_utf8const =>MAX_PATHfilename_to_ut#indif in the) { |
| 14 | /* If[/\]", don't process the ':' */ |
| 15 | if( nChar>MAX_PATH ) { |
| 16 | memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ |
| 17 | # include <sys/cygwin.h> |
| 18 | # define CP_UTF8 65001 |
| 19 | __declspec(dllidef _WIN32def _WIN32def _WIN32 |
| 20 | sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; |
| 21 | char *zUtf; |
| 22 | wch8. #ifdef _WIN32#else |
| 23 | return (char*)zMbcsznicode text into UTF8(char *)zUnicode# |
| 24 | ** to precomposed UTF8. WCHARFF80) == 0xF000 ){ |
| 25 | WCHARFWCHAR *z2>MAX_PATHfilename_to_ut#indif in the) { |
| 26 | /* Iifdef _WIN32f _WIN32nicode* 2IN#ifdef _WIchar *zUnicodeicode* 2IN32>MAX_P#ifdef _WIN32f _WIN32nicode* 2IN32>MAX_PATHfilename_to_ut#indif in the) { |
| 27 | /* If[/\]", don't process the ':' */ |
| 28 | if( nChar>MAX_PATH ) { |
| 29 | memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ |
| 30 | # include <sys/cygwin.h> |
| 31 | # define CP_UTF8 65001 |
| 32 | __declspec(dllidef _WIN32def _WIN32def _WIN32 |
| 33 | sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; |
| 34 | char *zUtf; |
| 35 | wch8. #ifdef _WIN32#else |
| 36 | return (char*)zMbcsznicode text into UTF8(char *)zUnicode# |
| 37 | ** to precomposed UTF8. WCHARFF80) == 0xF000 ){ |
| 38 | WCHARFWCHAR *zUnicode = fossil_utf8const =>MAX_PATHfilename_to_ut#indif in the) { |
| 39 | /* If[/\]", don't process the ':' */ |
| 40 | if( nChar>MAX_PATH ) { |
| 41 | memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ |
| 42 | # include <sys/cygwin.h> |
| 43 | # define CP_UTF8 65001 |
| 44 | __declspec(dllidef _WIN32def _WIN32def _WIN32 |
| 45 | sqlite3ifdef _WIN32f _WIN32nMAX_PATHfilename_to_ut#in; |
| 46 | char *zUtf; |
| 47 | wch8. #ifdef _WIN32#else |
| 48 | return (char*)zMbcsznicode text into UTF8(char *)zUnicode# |
| 49 | ** to precomposed UTF8. WCHARFF80) == 0xF000 ){ |
| 50 | WCHARFWCHAR *z2>MAX_PATHfilename_to_ut#indif in the) { |
| 51 | /* Iifdef _WIN32f _WIN32nicode* 2IN#ifdef _WIcharFilename[n]>0 && zFilename[n]<=0 |
| --- a/src/utf8.c | |
| +++ b/src/utf8.c | |
| @@ -1,4 +1,4 @@ | |
| 1 | >MAX_PATHfilename_to_ut#indif in the) { |
| 2 | /* If[/\]", don't process the ':' */ |
| 3 | if( nChar>MAX_PATH ) { |
| 4 | memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__ |
| @@ -10,42 +10,5 @@ | |
| 10 | wch8. #ifdef _WIN32#else |
| 11 | return (char*)zMbcsznicode text into UTF8(char *)zUnicode# |
| 12 | ** to precomposed UTF8. WCHARFF80) == 0xF000 ){ |
| 13 | WCHARFWCHAR *zUnicode = fossil_utf8#ifdef _WIN32 |
| 14 | APPLE__def _WIN32UtfFilename)>MAX_PATHfilenam>MAX_PATHfilena |
+5
-5
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -440,11 +440,11 @@ | ||
| 440 | 440 | const char *zDir; |
| 441 | 441 | struct dirent *pEntry; |
| 442 | 442 | int skipAll = 0; |
| 443 | 443 | static Stmt ins; |
| 444 | 444 | static int depth = 0; |
| 445 | - void *zMbcs; | |
| 445 | + void *zNative; | |
| 446 | 446 | |
| 447 | 447 | origSize = blob_size(pPath); |
| 448 | 448 | if( pIgnore ){ |
| 449 | 449 | blob_appendf(pPath, "/"); |
| 450 | 450 | if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| @@ -459,12 +459,12 @@ | ||
| 459 | 459 | ); |
| 460 | 460 | } |
| 461 | 461 | depth++; |
| 462 | 462 | |
| 463 | 463 | zDir = blob_str(pPath); |
| 464 | - zMbcs = fossil_utf8_to_filename(zDir); | |
| 465 | - d = opendir(zMbcs); | |
| 464 | + zNative = fossil_utf8_to_filename(zDir); | |
| 465 | + d = opendir(zNative); | |
| 466 | 466 | if( d ){ |
| 467 | 467 | while( (pEntry=readdir(d))!=0 ){ |
| 468 | 468 | char *zPath; |
| 469 | 469 | char *zUtf8; |
| 470 | 470 | if( pEntry->d_name[0]=='.' ){ |
| @@ -486,16 +486,16 @@ | ||
| 486 | 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | 487 | db_step(&ins); |
| 488 | 488 | db_reset(&ins); |
| 489 | 489 | } |
| 490 | 490 | } |
| 491 | - fossil_mbcs_free(zUtf8); | |
| 491 | + fossil_filename_free(zUtf8); | |
| 492 | 492 | blob_resize(pPath, origSize); |
| 493 | 493 | } |
| 494 | 494 | closedir(d); |
| 495 | 495 | } |
| 496 | - fossil_mbcs_free(zMbcs); | |
| 496 | + fossil_filename_free(zNative); | |
| 497 | 497 | |
| 498 | 498 | depth--; |
| 499 | 499 | if( depth==0 ){ |
| 500 | 500 | db_finalize(&ins); |
| 501 | 501 | } |
| 502 | 502 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -440,11 +440,11 @@ | |
| 440 | const char *zDir; |
| 441 | struct dirent *pEntry; |
| 442 | int skipAll = 0; |
| 443 | static Stmt ins; |
| 444 | static int depth = 0; |
| 445 | void *zMbcs; |
| 446 | |
| 447 | origSize = blob_size(pPath); |
| 448 | if( pIgnore ){ |
| 449 | blob_appendf(pPath, "/"); |
| 450 | if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| @@ -459,12 +459,12 @@ | |
| 459 | ); |
| 460 | } |
| 461 | depth++; |
| 462 | |
| 463 | zDir = blob_str(pPath); |
| 464 | zMbcs = fossil_utf8_to_filename(zDir); |
| 465 | d = opendir(zMbcs); |
| 466 | if( d ){ |
| 467 | while( (pEntry=readdir(d))!=0 ){ |
| 468 | char *zPath; |
| 469 | char *zUtf8; |
| 470 | if( pEntry->d_name[0]=='.' ){ |
| @@ -486,16 +486,16 @@ | |
| 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | db_step(&ins); |
| 488 | db_reset(&ins); |
| 489 | } |
| 490 | } |
| 491 | fossil_mbcs_free(zUtf8); |
| 492 | blob_resize(pPath, origSize); |
| 493 | } |
| 494 | closedir(d); |
| 495 | } |
| 496 | fossil_mbcs_free(zMbcs); |
| 497 | |
| 498 | depth--; |
| 499 | if( depth==0 ){ |
| 500 | db_finalize(&ins); |
| 501 | } |
| 502 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -440,11 +440,11 @@ | |
| 440 | const char *zDir; |
| 441 | struct dirent *pEntry; |
| 442 | int skipAll = 0; |
| 443 | static Stmt ins; |
| 444 | static int depth = 0; |
| 445 | void *zNative; |
| 446 | |
| 447 | origSize = blob_size(pPath); |
| 448 | if( pIgnore ){ |
| 449 | blob_appendf(pPath, "/"); |
| 450 | if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| @@ -459,12 +459,12 @@ | |
| 459 | ); |
| 460 | } |
| 461 | depth++; |
| 462 | |
| 463 | zDir = blob_str(pPath); |
| 464 | zNative = fossil_utf8_to_filename(zDir); |
| 465 | d = opendir(zNative); |
| 466 | if( d ){ |
| 467 | while( (pEntry=readdir(d))!=0 ){ |
| 468 | char *zPath; |
| 469 | char *zUtf8; |
| 470 | if( pEntry->d_name[0]=='.' ){ |
| @@ -486,16 +486,16 @@ | |
| 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | db_step(&ins); |
| 488 | db_reset(&ins); |
| 489 | } |
| 490 | } |
| 491 | fossil_filename_free(zUtf8); |
| 492 | blob_resize(pPath, origSize); |
| 493 | } |
| 494 | closedir(d); |
| 495 | } |
| 496 | fossil_filename_free(zNative); |
| 497 | |
| 498 | depth--; |
| 499 | if( depth==0 ){ |
| 500 | db_finalize(&ins); |
| 501 | } |
| 502 |
+5
-5
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -440,11 +440,11 @@ | ||
| 440 | 440 | const char *zDir; |
| 441 | 441 | struct dirent *pEntry; |
| 442 | 442 | int skipAll = 0; |
| 443 | 443 | static Stmt ins; |
| 444 | 444 | static int depth = 0; |
| 445 | - void *zMbcs; | |
| 445 | + void *zNative; | |
| 446 | 446 | |
| 447 | 447 | origSize = blob_size(pPath); |
| 448 | 448 | if( pIgnore ){ |
| 449 | 449 | blob_appendf(pPath, "/"); |
| 450 | 450 | if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| @@ -459,12 +459,12 @@ | ||
| 459 | 459 | ); |
| 460 | 460 | } |
| 461 | 461 | depth++; |
| 462 | 462 | |
| 463 | 463 | zDir = blob_str(pPath); |
| 464 | - zMbcs = fossil_utf8_to_filename(zDir); | |
| 465 | - d = opendir(zMbcs); | |
| 464 | + zNative = fossil_utf8_to_filename(zDir); | |
| 465 | + d = opendir(zNative); | |
| 466 | 466 | if( d ){ |
| 467 | 467 | while( (pEntry=readdir(d))!=0 ){ |
| 468 | 468 | char *zPath; |
| 469 | 469 | char *zUtf8; |
| 470 | 470 | if( pEntry->d_name[0]=='.' ){ |
| @@ -486,16 +486,16 @@ | ||
| 486 | 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | 487 | db_step(&ins); |
| 488 | 488 | db_reset(&ins); |
| 489 | 489 | } |
| 490 | 490 | } |
| 491 | - fossil_mbcs_free(zUtf8); | |
| 491 | + fossil_filename_free(zUtf8); | |
| 492 | 492 | blob_resize(pPath, origSize); |
| 493 | 493 | } |
| 494 | 494 | closedir(d); |
| 495 | 495 | } |
| 496 | - fossil_mbcs_free(zMbcs); | |
| 496 | + fossil_filename_free(zNative); | |
| 497 | 497 | |
| 498 | 498 | depth--; |
| 499 | 499 | if( depth==0 ){ |
| 500 | 500 | db_finalize(&ins); |
| 501 | 501 | } |
| 502 | 502 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -440,11 +440,11 @@ | |
| 440 | const char *zDir; |
| 441 | struct dirent *pEntry; |
| 442 | int skipAll = 0; |
| 443 | static Stmt ins; |
| 444 | static int depth = 0; |
| 445 | void *zMbcs; |
| 446 | |
| 447 | origSize = blob_size(pPath); |
| 448 | if( pIgnore ){ |
| 449 | blob_appendf(pPath, "/"); |
| 450 | if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| @@ -459,12 +459,12 @@ | |
| 459 | ); |
| 460 | } |
| 461 | depth++; |
| 462 | |
| 463 | zDir = blob_str(pPath); |
| 464 | zMbcs = fossil_utf8_to_filename(zDir); |
| 465 | d = opendir(zMbcs); |
| 466 | if( d ){ |
| 467 | while( (pEntry=readdir(d))!=0 ){ |
| 468 | char *zPath; |
| 469 | char *zUtf8; |
| 470 | if( pEntry->d_name[0]=='.' ){ |
| @@ -486,16 +486,16 @@ | |
| 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | db_step(&ins); |
| 488 | db_reset(&ins); |
| 489 | } |
| 490 | } |
| 491 | fossil_mbcs_free(zUtf8); |
| 492 | blob_resize(pPath, origSize); |
| 493 | } |
| 494 | closedir(d); |
| 495 | } |
| 496 | fossil_mbcs_free(zMbcs); |
| 497 | |
| 498 | depth--; |
| 499 | if( depth==0 ){ |
| 500 | db_finalize(&ins); |
| 501 | } |
| 502 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -440,11 +440,11 @@ | |
| 440 | const char *zDir; |
| 441 | struct dirent *pEntry; |
| 442 | int skipAll = 0; |
| 443 | static Stmt ins; |
| 444 | static int depth = 0; |
| 445 | void *zNative; |
| 446 | |
| 447 | origSize = blob_size(pPath); |
| 448 | if( pIgnore ){ |
| 449 | blob_appendf(pPath, "/"); |
| 450 | if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| @@ -459,12 +459,12 @@ | |
| 459 | ); |
| 460 | } |
| 461 | depth++; |
| 462 | |
| 463 | zDir = blob_str(pPath); |
| 464 | zNative = fossil_utf8_to_filename(zDir); |
| 465 | d = opendir(zNative); |
| 466 | if( d ){ |
| 467 | while( (pEntry=readdir(d))!=0 ){ |
| 468 | char *zPath; |
| 469 | char *zUtf8; |
| 470 | if( pEntry->d_name[0]=='.' ){ |
| @@ -486,16 +486,16 @@ | |
| 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | db_step(&ins); |
| 488 | db_reset(&ins); |
| 489 | } |
| 490 | } |
| 491 | fossil_filename_free(zUtf8); |
| 492 | blob_resize(pPath, origSize); |
| 493 | } |
| 494 | closedir(d); |
| 495 | } |
| 496 | fossil_filename_free(zNative); |
| 497 | |
| 498 | depth--; |
| 499 | if( depth==0 ){ |
| 500 | db_finalize(&ins); |
| 501 | } |
| 502 |
+1
-1
| --- src/winhttp.c | ||
| +++ src/winhttp.c | ||
| @@ -262,11 +262,11 @@ | ||
| 262 | 262 | static SERVICE_STATUS ssStatus; |
| 263 | 263 | static SERVICE_STATUS_HANDLE sshStatusHandle; |
| 264 | 264 | |
| 265 | 265 | /* |
| 266 | 266 | ** Get message string of the last system error. Return a pointer to the |
| 267 | -** message string. Call fossil_mbcs_free() to deallocate any memory used | |
| 267 | +** message string. Call fossil_unicode_free() to deallocate any memory used | |
| 268 | 268 | ** to store the message string when done. |
| 269 | 269 | */ |
| 270 | 270 | static char *win32_get_last_errmsg(void){ |
| 271 | 271 | DWORD nMsg; |
| 272 | 272 | DWORD nErr = GetLastError(); |
| 273 | 273 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -262,11 +262,11 @@ | |
| 262 | static SERVICE_STATUS ssStatus; |
| 263 | static SERVICE_STATUS_HANDLE sshStatusHandle; |
| 264 | |
| 265 | /* |
| 266 | ** Get message string of the last system error. Return a pointer to the |
| 267 | ** message string. Call fossil_mbcs_free() to deallocate any memory used |
| 268 | ** to store the message string when done. |
| 269 | */ |
| 270 | static char *win32_get_last_errmsg(void){ |
| 271 | DWORD nMsg; |
| 272 | DWORD nErr = GetLastError(); |
| 273 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -262,11 +262,11 @@ | |
| 262 | static SERVICE_STATUS ssStatus; |
| 263 | static SERVICE_STATUS_HANDLE sshStatusHandle; |
| 264 | |
| 265 | /* |
| 266 | ** Get message string of the last system error. Return a pointer to the |
| 267 | ** message string. Call fossil_unicode_free() to deallocate any memory used |
| 268 | ** to store the message string when done. |
| 269 | */ |
| 270 | static char *win32_get_last_errmsg(void){ |
| 271 | DWORD nMsg; |
| 272 | DWORD nErr = GetLastError(); |
| 273 |
+3
-2
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1692,11 +1692,12 @@ | ||
| 1692 | 1692 | defossilize(zMsg); |
| 1693 | 1693 | if( (syncFlags & SYNC_PUSH) && zMsg && strglob("pull only *", zMsg) ){ |
| 1694 | 1694 | syncFlags &= ~SYNC_PUSH; |
| 1695 | 1695 | zMsg = 0; |
| 1696 | 1696 | } |
| 1697 | - fossil_print("\rServer says: %s\n", zMsg); | |
| 1697 | + fossil_force_newline(); | |
| 1698 | + fossil_print("Server says: %s\n", zMsg); | |
| 1698 | 1699 | }else |
| 1699 | 1700 | |
| 1700 | 1701 | /* pragma NAME VALUE... |
| 1701 | 1702 | ** |
| 1702 | 1703 | ** The server can send pragmas to try to convey meta-information to |
| @@ -1804,11 +1805,11 @@ | ||
| 1804 | 1805 | ** information which is only sent on the second round. |
| 1805 | 1806 | */ |
| 1806 | 1807 | if( cloneSeqno<=0 && nCycle>1 ) go = 0; |
| 1807 | 1808 | }; |
| 1808 | 1809 | transport_stats(&nSent, &nRcvd, 1); |
| 1809 | - if( (syncFlags & SYNC_VERBOSE)==0 ) fossil_print("\n"); | |
| 1810 | + fossil_force_newline(); | |
| 1810 | 1811 | fossil_print( |
| 1811 | 1812 | "%s finished with %lld bytes sent, %lld bytes received\n", |
| 1812 | 1813 | zOpType, nSent, nRcvd); |
| 1813 | 1814 | transport_close(); |
| 1814 | 1815 | transport_global_shutdown(); |
| 1815 | 1816 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1692,11 +1692,12 @@ | |
| 1692 | defossilize(zMsg); |
| 1693 | if( (syncFlags & SYNC_PUSH) && zMsg && strglob("pull only *", zMsg) ){ |
| 1694 | syncFlags &= ~SYNC_PUSH; |
| 1695 | zMsg = 0; |
| 1696 | } |
| 1697 | fossil_print("\rServer says: %s\n", zMsg); |
| 1698 | }else |
| 1699 | |
| 1700 | /* pragma NAME VALUE... |
| 1701 | ** |
| 1702 | ** The server can send pragmas to try to convey meta-information to |
| @@ -1804,11 +1805,11 @@ | |
| 1804 | ** information which is only sent on the second round. |
| 1805 | */ |
| 1806 | if( cloneSeqno<=0 && nCycle>1 ) go = 0; |
| 1807 | }; |
| 1808 | transport_stats(&nSent, &nRcvd, 1); |
| 1809 | if( (syncFlags & SYNC_VERBOSE)==0 ) fossil_print("\n"); |
| 1810 | fossil_print( |
| 1811 | "%s finished with %lld bytes sent, %lld bytes received\n", |
| 1812 | zOpType, nSent, nRcvd); |
| 1813 | transport_close(); |
| 1814 | transport_global_shutdown(); |
| 1815 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1692,11 +1692,12 @@ | |
| 1692 | defossilize(zMsg); |
| 1693 | if( (syncFlags & SYNC_PUSH) && zMsg && strglob("pull only *", zMsg) ){ |
| 1694 | syncFlags &= ~SYNC_PUSH; |
| 1695 | zMsg = 0; |
| 1696 | } |
| 1697 | fossil_force_newline(); |
| 1698 | fossil_print("Server says: %s\n", zMsg); |
| 1699 | }else |
| 1700 | |
| 1701 | /* pragma NAME VALUE... |
| 1702 | ** |
| 1703 | ** The server can send pragmas to try to convey meta-information to |
| @@ -1804,11 +1805,11 @@ | |
| 1805 | ** information which is only sent on the second round. |
| 1806 | */ |
| 1807 | if( cloneSeqno<=0 && nCycle>1 ) go = 0; |
| 1808 | }; |
| 1809 | transport_stats(&nSent, &nRcvd, 1); |
| 1810 | fossil_force_newline(); |
| 1811 | fossil_print( |
| 1812 | "%s finished with %lld bytes sent, %lld bytes received\n", |
| 1813 | zOpType, nSent, nRcvd); |
| 1814 | transport_close(); |
| 1815 | transport_global_shutdown(); |
| 1816 |
+10
-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 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 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 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 | 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)\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)\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)\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 | 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 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 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 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 | 52 | +echo fossil >> $@ |
| 53 | 53 | +echo fossil >> $@ |
| 54 | 54 | +echo $(LIBS) >> $@ |
| 55 | 55 | +echo. >> $@ |
| 56 | 56 | +echo fossil >> $@ |
| @@ -649,10 +649,16 @@ | ||
| 649 | 649 | $(OBJDIR)\user$O : user_.c user.h |
| 650 | 650 | $(TCC) -o$@ -c user_.c |
| 651 | 651 | |
| 652 | 652 | user_.c : $(SRCDIR)\user.c |
| 653 | 653 | +translate$E $** > $@ |
| 654 | + | |
| 655 | +$(OBJDIR)\utf8$O : utf8_.c utf8.h | |
| 656 | + $(TCC) -o$@ -c utf8_.c | |
| 657 | + | |
| 658 | +utf8_.c : $(SRCDIR)\utf8.c | |
| 659 | + +translate$E $** > $@ | |
| 654 | 660 | |
| 655 | 661 | $(OBJDIR)\verify$O : verify_.c verify.h |
| 656 | 662 | $(TCC) -o$@ -c verify_.c |
| 657 | 663 | |
| 658 | 664 | verify_.c : $(SRCDIR)\verify.c |
| @@ -705,7 +711,7 @@ | ||
| 705 | 711 | |
| 706 | 712 | zip_.c : $(SRCDIR)\zip.c |
| 707 | 713 | +translate$E $** > $@ |
| 708 | 714 | |
| 709 | 715 | headers: makeheaders$E page_index.h VERSION.h |
| 710 | - +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 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 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 | |
| 716 | + +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 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 | |
| 711 | 717 | @copy /Y nul: headers |
| 712 | 718 |
| --- 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 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 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)\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)\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 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 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 >> $@ |
| @@ -649,10 +649,16 @@ | |
| 649 | $(OBJDIR)\user$O : user_.c user.h |
| 650 | $(TCC) -o$@ -c user_.c |
| 651 | |
| 652 | user_.c : $(SRCDIR)\user.c |
| 653 | +translate$E $** > $@ |
| 654 | |
| 655 | $(OBJDIR)\verify$O : verify_.c verify.h |
| 656 | $(TCC) -o$@ -c verify_.c |
| 657 | |
| 658 | verify_.c : $(SRCDIR)\verify.c |
| @@ -705,7 +711,7 @@ | |
| 705 | |
| 706 | zip_.c : $(SRCDIR)\zip.c |
| 707 | +translate$E $** > $@ |
| 708 | |
| 709 | headers: makeheaders$E page_index.h VERSION.h |
| 710 | +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 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 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 |
| 711 | @copy /Y nul: headers |
| 712 |
| --- 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 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)\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 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 >> $@ |
| @@ -649,10 +649,16 @@ | |
| 649 | $(OBJDIR)\user$O : user_.c user.h |
| 650 | $(TCC) -o$@ -c user_.c |
| 651 | |
| 652 | user_.c : $(SRCDIR)\user.c |
| 653 | +translate$E $** > $@ |
| 654 | |
| 655 | $(OBJDIR)\utf8$O : utf8_.c utf8.h |
| 656 | $(TCC) -o$@ -c utf8_.c |
| 657 | |
| 658 | utf8_.c : $(SRCDIR)\utf8.c |
| 659 | +translate$E $** > $@ |
| 660 | |
| 661 | $(OBJDIR)\verify$O : verify_.c verify.h |
| 662 | $(TCC) -o$@ -c verify_.c |
| 663 | |
| 664 | verify_.c : $(SRCDIR)\verify.c |
| @@ -705,7 +711,7 @@ | |
| 711 | |
| 712 | zip_.c : $(SRCDIR)\zip.c |
| 713 | +translate$E $** > $@ |
| 714 | |
| 715 | headers: makeheaders$E page_index.h VERSION.h |
| 716 | +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 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 |
| 717 | @copy /Y nul: headers |
| 718 |
+15
-4
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -13,14 +13,14 @@ | ||
| 13 | 13 | # |
| 14 | 14 | |
| 15 | 15 | #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | 17 | # |
| 18 | -PREFIX = | |
| 18 | +# PREFIX = | |
| 19 | 19 | # PREFIX = mingw32- |
| 20 | 20 | # PREFIX = i686-pc-mingw32- |
| 21 | -# PREFIX = i686-w64-mingw32- | |
| 21 | +PREFIX = i686-w64-mingw32- | |
| 22 | 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | 23 | |
| 24 | 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | 25 | # in a directory that is separate from the source tree. Just change |
| 26 | 26 | # the following to point from the build directory to the src/ folder. |
| @@ -207,11 +207,11 @@ | ||
| 207 | 207 | endif |
| 208 | 208 | |
| 209 | 209 | #### Tcl shell for use in running the fossil test suite. This is only |
| 210 | 210 | # used for testing. |
| 211 | 211 | # |
| 212 | -TCLSH = tclsh | |
| 212 | +TCLSH = tclsh86 | |
| 213 | 213 | |
| 214 | 214 | #### Nullsoft installer MakeNSIS location |
| 215 | 215 | # |
| 216 | 216 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 217 | 217 | |
| @@ -313,10 +313,11 @@ | ||
| 313 | 313 | $(SRCDIR)/tktsetup.c \ |
| 314 | 314 | $(SRCDIR)/undo.c \ |
| 315 | 315 | $(SRCDIR)/update.c \ |
| 316 | 316 | $(SRCDIR)/url.c \ |
| 317 | 317 | $(SRCDIR)/user.c \ |
| 318 | + $(SRCDIR)/utf8.c \ | |
| 318 | 319 | $(SRCDIR)/verify.c \ |
| 319 | 320 | $(SRCDIR)/vfile.c \ |
| 320 | 321 | $(SRCDIR)/wiki.c \ |
| 321 | 322 | $(SRCDIR)/wikiformat.c \ |
| 322 | 323 | $(SRCDIR)/winhttp.c \ |
| @@ -414,10 +415,11 @@ | ||
| 414 | 415 | $(OBJDIR)/tktsetup_.c \ |
| 415 | 416 | $(OBJDIR)/undo_.c \ |
| 416 | 417 | $(OBJDIR)/update_.c \ |
| 417 | 418 | $(OBJDIR)/url_.c \ |
| 418 | 419 | $(OBJDIR)/user_.c \ |
| 420 | + $(OBJDIR)/utf8_.c \ | |
| 419 | 421 | $(OBJDIR)/verify_.c \ |
| 420 | 422 | $(OBJDIR)/vfile_.c \ |
| 421 | 423 | $(OBJDIR)/wiki_.c \ |
| 422 | 424 | $(OBJDIR)/wikiformat_.c \ |
| 423 | 425 | $(OBJDIR)/winhttp_.c \ |
| @@ -515,10 +517,11 @@ | ||
| 515 | 517 | $(OBJDIR)/tktsetup.o \ |
| 516 | 518 | $(OBJDIR)/undo.o \ |
| 517 | 519 | $(OBJDIR)/update.o \ |
| 518 | 520 | $(OBJDIR)/url.o \ |
| 519 | 521 | $(OBJDIR)/user.o \ |
| 522 | + $(OBJDIR)/utf8.o \ | |
| 520 | 523 | $(OBJDIR)/verify.o \ |
| 521 | 524 | $(OBJDIR)/vfile.o \ |
| 522 | 525 | $(OBJDIR)/wiki.o \ |
| 523 | 526 | $(OBJDIR)/wikiformat.o \ |
| 524 | 527 | $(OBJDIR)/winhttp.o \ |
| @@ -639,11 +642,11 @@ | ||
| 639 | 642 | |
| 640 | 643 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 641 | 644 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 642 | 645 | |
| 643 | 646 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 644 | - $(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)/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)/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 | |
| 647 | + $(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)/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 | |
| 645 | 648 | echo Done >$(OBJDIR)/headers |
| 646 | 649 | |
| 647 | 650 | $(OBJDIR)/headers: Makefile |
| 648 | 651 | |
| 649 | 652 | Makefile: |
| @@ -1365,10 +1368,18 @@ | ||
| 1365 | 1368 | |
| 1366 | 1369 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1367 | 1370 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1368 | 1371 | |
| 1369 | 1372 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1373 | + | |
| 1374 | +$(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate | |
| 1375 | + $(TRANSLATE) $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c | |
| 1376 | + | |
| 1377 | +$(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h | |
| 1378 | + $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c | |
| 1379 | + | |
| 1380 | +$(OBJDIR)/utf8.h: $(OBJDIR)/headers | |
| 1370 | 1381 | |
| 1371 | 1382 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1372 | 1383 | $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1373 | 1384 | |
| 1374 | 1385 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1375 | 1386 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,14 +13,14 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | # PREFIX = i686-w64-mingw32- |
| 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| @@ -207,11 +207,11 @@ | |
| 207 | endif |
| 208 | |
| 209 | #### Tcl shell for use in running the fossil test suite. This is only |
| 210 | # used for testing. |
| 211 | # |
| 212 | TCLSH = tclsh |
| 213 | |
| 214 | #### Nullsoft installer MakeNSIS location |
| 215 | # |
| 216 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 217 | |
| @@ -313,10 +313,11 @@ | |
| 313 | $(SRCDIR)/tktsetup.c \ |
| 314 | $(SRCDIR)/undo.c \ |
| 315 | $(SRCDIR)/update.c \ |
| 316 | $(SRCDIR)/url.c \ |
| 317 | $(SRCDIR)/user.c \ |
| 318 | $(SRCDIR)/verify.c \ |
| 319 | $(SRCDIR)/vfile.c \ |
| 320 | $(SRCDIR)/wiki.c \ |
| 321 | $(SRCDIR)/wikiformat.c \ |
| 322 | $(SRCDIR)/winhttp.c \ |
| @@ -414,10 +415,11 @@ | |
| 414 | $(OBJDIR)/tktsetup_.c \ |
| 415 | $(OBJDIR)/undo_.c \ |
| 416 | $(OBJDIR)/update_.c \ |
| 417 | $(OBJDIR)/url_.c \ |
| 418 | $(OBJDIR)/user_.c \ |
| 419 | $(OBJDIR)/verify_.c \ |
| 420 | $(OBJDIR)/vfile_.c \ |
| 421 | $(OBJDIR)/wiki_.c \ |
| 422 | $(OBJDIR)/wikiformat_.c \ |
| 423 | $(OBJDIR)/winhttp_.c \ |
| @@ -515,10 +517,11 @@ | |
| 515 | $(OBJDIR)/tktsetup.o \ |
| 516 | $(OBJDIR)/undo.o \ |
| 517 | $(OBJDIR)/update.o \ |
| 518 | $(OBJDIR)/url.o \ |
| 519 | $(OBJDIR)/user.o \ |
| 520 | $(OBJDIR)/verify.o \ |
| 521 | $(OBJDIR)/vfile.o \ |
| 522 | $(OBJDIR)/wiki.o \ |
| 523 | $(OBJDIR)/wikiformat.o \ |
| 524 | $(OBJDIR)/winhttp.o \ |
| @@ -639,11 +642,11 @@ | |
| 639 | |
| 640 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 641 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 642 | |
| 643 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 644 | $(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)/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)/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 |
| 645 | echo Done >$(OBJDIR)/headers |
| 646 | |
| 647 | $(OBJDIR)/headers: Makefile |
| 648 | |
| 649 | Makefile: |
| @@ -1365,10 +1368,18 @@ | |
| 1365 | |
| 1366 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1367 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1368 | |
| 1369 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1370 | |
| 1371 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1372 | $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1373 | |
| 1374 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1375 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,14 +13,14 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | # PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | PREFIX = i686-w64-mingw32- |
| 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| @@ -207,11 +207,11 @@ | |
| 207 | endif |
| 208 | |
| 209 | #### Tcl shell for use in running the fossil test suite. This is only |
| 210 | # used for testing. |
| 211 | # |
| 212 | TCLSH = tclsh86 |
| 213 | |
| 214 | #### Nullsoft installer MakeNSIS location |
| 215 | # |
| 216 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 217 | |
| @@ -313,10 +313,11 @@ | |
| 313 | $(SRCDIR)/tktsetup.c \ |
| 314 | $(SRCDIR)/undo.c \ |
| 315 | $(SRCDIR)/update.c \ |
| 316 | $(SRCDIR)/url.c \ |
| 317 | $(SRCDIR)/user.c \ |
| 318 | $(SRCDIR)/utf8.c \ |
| 319 | $(SRCDIR)/verify.c \ |
| 320 | $(SRCDIR)/vfile.c \ |
| 321 | $(SRCDIR)/wiki.c \ |
| 322 | $(SRCDIR)/wikiformat.c \ |
| 323 | $(SRCDIR)/winhttp.c \ |
| @@ -414,10 +415,11 @@ | |
| 415 | $(OBJDIR)/tktsetup_.c \ |
| 416 | $(OBJDIR)/undo_.c \ |
| 417 | $(OBJDIR)/update_.c \ |
| 418 | $(OBJDIR)/url_.c \ |
| 419 | $(OBJDIR)/user_.c \ |
| 420 | $(OBJDIR)/utf8_.c \ |
| 421 | $(OBJDIR)/verify_.c \ |
| 422 | $(OBJDIR)/vfile_.c \ |
| 423 | $(OBJDIR)/wiki_.c \ |
| 424 | $(OBJDIR)/wikiformat_.c \ |
| 425 | $(OBJDIR)/winhttp_.c \ |
| @@ -515,10 +517,11 @@ | |
| 517 | $(OBJDIR)/tktsetup.o \ |
| 518 | $(OBJDIR)/undo.o \ |
| 519 | $(OBJDIR)/update.o \ |
| 520 | $(OBJDIR)/url.o \ |
| 521 | $(OBJDIR)/user.o \ |
| 522 | $(OBJDIR)/utf8.o \ |
| 523 | $(OBJDIR)/verify.o \ |
| 524 | $(OBJDIR)/vfile.o \ |
| 525 | $(OBJDIR)/wiki.o \ |
| 526 | $(OBJDIR)/wikiformat.o \ |
| 527 | $(OBJDIR)/winhttp.o \ |
| @@ -639,11 +642,11 @@ | |
| 642 | |
| 643 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 644 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 645 | |
| 646 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 647 | $(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)/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 |
| 648 | echo Done >$(OBJDIR)/headers |
| 649 | |
| 650 | $(OBJDIR)/headers: Makefile |
| 651 | |
| 652 | Makefile: |
| @@ -1365,10 +1368,18 @@ | |
| 1368 | |
| 1369 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1370 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1371 | |
| 1372 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1373 | |
| 1374 | $(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate |
| 1375 | $(TRANSLATE) $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c |
| 1376 | |
| 1377 | $(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h |
| 1378 | $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c |
| 1379 | |
| 1380 | $(OBJDIR)/utf8.h: $(OBJDIR)/headers |
| 1381 | |
| 1382 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1383 | $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1384 | |
| 1385 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1386 |
+15
-4
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -13,14 +13,14 @@ | ||
| 13 | 13 | # |
| 14 | 14 | |
| 15 | 15 | #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | 17 | # |
| 18 | -PREFIX = | |
| 18 | +# PREFIX = | |
| 19 | 19 | # PREFIX = mingw32- |
| 20 | 20 | # PREFIX = i686-pc-mingw32- |
| 21 | -# PREFIX = i686-w64-mingw32- | |
| 21 | +PREFIX = i686-w64-mingw32- | |
| 22 | 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | 23 | |
| 24 | 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | 25 | # in a directory that is separate from the source tree. Just change |
| 26 | 26 | # the following to point from the build directory to the src/ folder. |
| @@ -207,11 +207,11 @@ | ||
| 207 | 207 | endif |
| 208 | 208 | |
| 209 | 209 | #### Tcl shell for use in running the fossil test suite. This is only |
| 210 | 210 | # used for testing. |
| 211 | 211 | # |
| 212 | -TCLSH = tclsh | |
| 212 | +TCLSH = tclsh86 | |
| 213 | 213 | |
| 214 | 214 | #### Nullsoft installer MakeNSIS location |
| 215 | 215 | # |
| 216 | 216 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 217 | 217 | |
| @@ -313,10 +313,11 @@ | ||
| 313 | 313 | $(SRCDIR)/tktsetup.c \ |
| 314 | 314 | $(SRCDIR)/undo.c \ |
| 315 | 315 | $(SRCDIR)/update.c \ |
| 316 | 316 | $(SRCDIR)/url.c \ |
| 317 | 317 | $(SRCDIR)/user.c \ |
| 318 | + $(SRCDIR)/utf8.c \ | |
| 318 | 319 | $(SRCDIR)/verify.c \ |
| 319 | 320 | $(SRCDIR)/vfile.c \ |
| 320 | 321 | $(SRCDIR)/wiki.c \ |
| 321 | 322 | $(SRCDIR)/wikiformat.c \ |
| 322 | 323 | $(SRCDIR)/winhttp.c \ |
| @@ -414,10 +415,11 @@ | ||
| 414 | 415 | $(OBJDIR)/tktsetup_.c \ |
| 415 | 416 | $(OBJDIR)/undo_.c \ |
| 416 | 417 | $(OBJDIR)/update_.c \ |
| 417 | 418 | $(OBJDIR)/url_.c \ |
| 418 | 419 | $(OBJDIR)/user_.c \ |
| 420 | + $(OBJDIR)/utf8_.c \ | |
| 419 | 421 | $(OBJDIR)/verify_.c \ |
| 420 | 422 | $(OBJDIR)/vfile_.c \ |
| 421 | 423 | $(OBJDIR)/wiki_.c \ |
| 422 | 424 | $(OBJDIR)/wikiformat_.c \ |
| 423 | 425 | $(OBJDIR)/winhttp_.c \ |
| @@ -515,10 +517,11 @@ | ||
| 515 | 517 | $(OBJDIR)/tktsetup.o \ |
| 516 | 518 | $(OBJDIR)/undo.o \ |
| 517 | 519 | $(OBJDIR)/update.o \ |
| 518 | 520 | $(OBJDIR)/url.o \ |
| 519 | 521 | $(OBJDIR)/user.o \ |
| 522 | + $(OBJDIR)/utf8.o \ | |
| 520 | 523 | $(OBJDIR)/verify.o \ |
| 521 | 524 | $(OBJDIR)/vfile.o \ |
| 522 | 525 | $(OBJDIR)/wiki.o \ |
| 523 | 526 | $(OBJDIR)/wikiformat.o \ |
| 524 | 527 | $(OBJDIR)/winhttp.o \ |
| @@ -639,11 +642,11 @@ | ||
| 639 | 642 | |
| 640 | 643 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 641 | 644 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 642 | 645 | |
| 643 | 646 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 644 | - $(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)/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)/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 | |
| 647 | + $(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)/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 | |
| 645 | 648 | echo Done >$(OBJDIR)/headers |
| 646 | 649 | |
| 647 | 650 | $(OBJDIR)/headers: Makefile |
| 648 | 651 | |
| 649 | 652 | Makefile: |
| @@ -1365,10 +1368,18 @@ | ||
| 1365 | 1368 | |
| 1366 | 1369 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1367 | 1370 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1368 | 1371 | |
| 1369 | 1372 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1373 | + | |
| 1374 | +$(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate | |
| 1375 | + $(TRANSLATE) $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c | |
| 1376 | + | |
| 1377 | +$(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h | |
| 1378 | + $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c | |
| 1379 | + | |
| 1380 | +$(OBJDIR)/utf8.h: $(OBJDIR)/headers | |
| 1370 | 1381 | |
| 1371 | 1382 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1372 | 1383 | $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1373 | 1384 | |
| 1374 | 1385 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1375 | 1386 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,14 +13,14 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | # PREFIX = i686-w64-mingw32- |
| 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| @@ -207,11 +207,11 @@ | |
| 207 | endif |
| 208 | |
| 209 | #### Tcl shell for use in running the fossil test suite. This is only |
| 210 | # used for testing. |
| 211 | # |
| 212 | TCLSH = tclsh |
| 213 | |
| 214 | #### Nullsoft installer MakeNSIS location |
| 215 | # |
| 216 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 217 | |
| @@ -313,10 +313,11 @@ | |
| 313 | $(SRCDIR)/tktsetup.c \ |
| 314 | $(SRCDIR)/undo.c \ |
| 315 | $(SRCDIR)/update.c \ |
| 316 | $(SRCDIR)/url.c \ |
| 317 | $(SRCDIR)/user.c \ |
| 318 | $(SRCDIR)/verify.c \ |
| 319 | $(SRCDIR)/vfile.c \ |
| 320 | $(SRCDIR)/wiki.c \ |
| 321 | $(SRCDIR)/wikiformat.c \ |
| 322 | $(SRCDIR)/winhttp.c \ |
| @@ -414,10 +415,11 @@ | |
| 414 | $(OBJDIR)/tktsetup_.c \ |
| 415 | $(OBJDIR)/undo_.c \ |
| 416 | $(OBJDIR)/update_.c \ |
| 417 | $(OBJDIR)/url_.c \ |
| 418 | $(OBJDIR)/user_.c \ |
| 419 | $(OBJDIR)/verify_.c \ |
| 420 | $(OBJDIR)/vfile_.c \ |
| 421 | $(OBJDIR)/wiki_.c \ |
| 422 | $(OBJDIR)/wikiformat_.c \ |
| 423 | $(OBJDIR)/winhttp_.c \ |
| @@ -515,10 +517,11 @@ | |
| 515 | $(OBJDIR)/tktsetup.o \ |
| 516 | $(OBJDIR)/undo.o \ |
| 517 | $(OBJDIR)/update.o \ |
| 518 | $(OBJDIR)/url.o \ |
| 519 | $(OBJDIR)/user.o \ |
| 520 | $(OBJDIR)/verify.o \ |
| 521 | $(OBJDIR)/vfile.o \ |
| 522 | $(OBJDIR)/wiki.o \ |
| 523 | $(OBJDIR)/wikiformat.o \ |
| 524 | $(OBJDIR)/winhttp.o \ |
| @@ -639,11 +642,11 @@ | |
| 639 | |
| 640 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 641 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 642 | |
| 643 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 644 | $(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)/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)/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 |
| 645 | echo Done >$(OBJDIR)/headers |
| 646 | |
| 647 | $(OBJDIR)/headers: Makefile |
| 648 | |
| 649 | Makefile: |
| @@ -1365,10 +1368,18 @@ | |
| 1365 | |
| 1366 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1367 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1368 | |
| 1369 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1370 | |
| 1371 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1372 | $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1373 | |
| 1374 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1375 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,14 +13,14 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | # PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | PREFIX = i686-w64-mingw32- |
| 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| @@ -207,11 +207,11 @@ | |
| 207 | endif |
| 208 | |
| 209 | #### Tcl shell for use in running the fossil test suite. This is only |
| 210 | # used for testing. |
| 211 | # |
| 212 | TCLSH = tclsh86 |
| 213 | |
| 214 | #### Nullsoft installer MakeNSIS location |
| 215 | # |
| 216 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 217 | |
| @@ -313,10 +313,11 @@ | |
| 313 | $(SRCDIR)/tktsetup.c \ |
| 314 | $(SRCDIR)/undo.c \ |
| 315 | $(SRCDIR)/update.c \ |
| 316 | $(SRCDIR)/url.c \ |
| 317 | $(SRCDIR)/user.c \ |
| 318 | $(SRCDIR)/utf8.c \ |
| 319 | $(SRCDIR)/verify.c \ |
| 320 | $(SRCDIR)/vfile.c \ |
| 321 | $(SRCDIR)/wiki.c \ |
| 322 | $(SRCDIR)/wikiformat.c \ |
| 323 | $(SRCDIR)/winhttp.c \ |
| @@ -414,10 +415,11 @@ | |
| 415 | $(OBJDIR)/tktsetup_.c \ |
| 416 | $(OBJDIR)/undo_.c \ |
| 417 | $(OBJDIR)/update_.c \ |
| 418 | $(OBJDIR)/url_.c \ |
| 419 | $(OBJDIR)/user_.c \ |
| 420 | $(OBJDIR)/utf8_.c \ |
| 421 | $(OBJDIR)/verify_.c \ |
| 422 | $(OBJDIR)/vfile_.c \ |
| 423 | $(OBJDIR)/wiki_.c \ |
| 424 | $(OBJDIR)/wikiformat_.c \ |
| 425 | $(OBJDIR)/winhttp_.c \ |
| @@ -515,10 +517,11 @@ | |
| 517 | $(OBJDIR)/tktsetup.o \ |
| 518 | $(OBJDIR)/undo.o \ |
| 519 | $(OBJDIR)/update.o \ |
| 520 | $(OBJDIR)/url.o \ |
| 521 | $(OBJDIR)/user.o \ |
| 522 | $(OBJDIR)/utf8.o \ |
| 523 | $(OBJDIR)/verify.o \ |
| 524 | $(OBJDIR)/vfile.o \ |
| 525 | $(OBJDIR)/wiki.o \ |
| 526 | $(OBJDIR)/wikiformat.o \ |
| 527 | $(OBJDIR)/winhttp.o \ |
| @@ -639,11 +642,11 @@ | |
| 642 | |
| 643 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 644 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 645 | |
| 646 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 647 | $(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)/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 |
| 648 | echo Done >$(OBJDIR)/headers |
| 649 | |
| 650 | $(OBJDIR)/headers: Makefile |
| 651 | |
| 652 | Makefile: |
| @@ -1365,10 +1368,18 @@ | |
| 1368 | |
| 1369 | $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h |
| 1370 | $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c |
| 1371 | |
| 1372 | $(OBJDIR)/user.h: $(OBJDIR)/headers |
| 1373 | |
| 1374 | $(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate |
| 1375 | $(TRANSLATE) $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c |
| 1376 | |
| 1377 | $(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h |
| 1378 | $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c |
| 1379 | |
| 1380 | $(OBJDIR)/utf8.h: $(OBJDIR)/headers |
| 1381 | |
| 1382 | $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate |
| 1383 | $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c |
| 1384 | |
| 1385 | $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h |
| 1386 |
+10
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -128,10 +128,11 @@ | ||
| 128 | 128 | tktsetup_.c \ |
| 129 | 129 | undo_.c \ |
| 130 | 130 | update_.c \ |
| 131 | 131 | url_.c \ |
| 132 | 132 | user_.c \ |
| 133 | + utf8_.c \ | |
| 133 | 134 | verify_.c \ |
| 134 | 135 | vfile_.c \ |
| 135 | 136 | wiki_.c \ |
| 136 | 137 | wikiformat_.c \ |
| 137 | 138 | winhttp_.c \ |
| @@ -228,10 +229,11 @@ | ||
| 228 | 229 | $(OX)\tktsetup$O \ |
| 229 | 230 | $(OX)\undo$O \ |
| 230 | 231 | $(OX)\update$O \ |
| 231 | 232 | $(OX)\url$O \ |
| 232 | 233 | $(OX)\user$O \ |
| 234 | + $(OX)\utf8$O \ | |
| 233 | 235 | $(OX)\verify$O \ |
| 234 | 236 | $(OX)\vfile$O \ |
| 235 | 237 | $(OX)\wiki$O \ |
| 236 | 238 | $(OX)\wikiformat$O \ |
| 237 | 239 | $(OX)\winhttp$O \ |
| @@ -349,10 +351,11 @@ | ||
| 349 | 351 | echo $(OX)\tktsetup.obj >> $@ |
| 350 | 352 | echo $(OX)\undo.obj >> $@ |
| 351 | 353 | echo $(OX)\update.obj >> $@ |
| 352 | 354 | echo $(OX)\url.obj >> $@ |
| 353 | 355 | echo $(OX)\user.obj >> $@ |
| 356 | + echo $(OX)\utf8.obj >> $@ | |
| 354 | 357 | echo $(OX)\verify.obj >> $@ |
| 355 | 358 | echo $(OX)\vfile.obj >> $@ |
| 356 | 359 | echo $(OX)\wiki.obj >> $@ |
| 357 | 360 | echo $(OX)\wikiformat.obj >> $@ |
| 358 | 361 | echo $(OX)\winhttp.obj >> $@ |
| @@ -970,10 +973,16 @@ | ||
| 970 | 973 | $(OX)\user$O : user_.c user.h |
| 971 | 974 | $(TCC) /Fo$@ -c user_.c |
| 972 | 975 | |
| 973 | 976 | user_.c : $(SRCDIR)\user.c |
| 974 | 977 | translate$E $** > $@ |
| 978 | + | |
| 979 | +$(OX)\utf8$O : utf8_.c utf8.h | |
| 980 | + $(TCC) /Fo$@ -c utf8_.c | |
| 981 | + | |
| 982 | +utf8_.c : $(SRCDIR)\utf8.c | |
| 983 | + translate$E $** > $@ | |
| 975 | 984 | |
| 976 | 985 | $(OX)\verify$O : verify_.c verify.h |
| 977 | 986 | $(TCC) /Fo$@ -c verify_.c |
| 978 | 987 | |
| 979 | 988 | verify_.c : $(SRCDIR)\verify.c |
| @@ -1116,10 +1125,11 @@ | ||
| 1116 | 1125 | tktsetup_.c:tktsetup.h \ |
| 1117 | 1126 | undo_.c:undo.h \ |
| 1118 | 1127 | update_.c:update.h \ |
| 1119 | 1128 | url_.c:url.h \ |
| 1120 | 1129 | user_.c:user.h \ |
| 1130 | + utf8_.c:utf8.h \ | |
| 1121 | 1131 | verify_.c:verify.h \ |
| 1122 | 1132 | vfile_.c:vfile.h \ |
| 1123 | 1133 | wiki_.c:wiki.h \ |
| 1124 | 1134 | wikiformat_.c:wikiformat.h \ |
| 1125 | 1135 | winhttp_.c:winhttp.h \ |
| 1126 | 1136 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -128,10 +128,11 @@ | |
| 128 | tktsetup_.c \ |
| 129 | undo_.c \ |
| 130 | update_.c \ |
| 131 | url_.c \ |
| 132 | user_.c \ |
| 133 | verify_.c \ |
| 134 | vfile_.c \ |
| 135 | wiki_.c \ |
| 136 | wikiformat_.c \ |
| 137 | winhttp_.c \ |
| @@ -228,10 +229,11 @@ | |
| 228 | $(OX)\tktsetup$O \ |
| 229 | $(OX)\undo$O \ |
| 230 | $(OX)\update$O \ |
| 231 | $(OX)\url$O \ |
| 232 | $(OX)\user$O \ |
| 233 | $(OX)\verify$O \ |
| 234 | $(OX)\vfile$O \ |
| 235 | $(OX)\wiki$O \ |
| 236 | $(OX)\wikiformat$O \ |
| 237 | $(OX)\winhttp$O \ |
| @@ -349,10 +351,11 @@ | |
| 349 | echo $(OX)\tktsetup.obj >> $@ |
| 350 | echo $(OX)\undo.obj >> $@ |
| 351 | echo $(OX)\update.obj >> $@ |
| 352 | echo $(OX)\url.obj >> $@ |
| 353 | echo $(OX)\user.obj >> $@ |
| 354 | echo $(OX)\verify.obj >> $@ |
| 355 | echo $(OX)\vfile.obj >> $@ |
| 356 | echo $(OX)\wiki.obj >> $@ |
| 357 | echo $(OX)\wikiformat.obj >> $@ |
| 358 | echo $(OX)\winhttp.obj >> $@ |
| @@ -970,10 +973,16 @@ | |
| 970 | $(OX)\user$O : user_.c user.h |
| 971 | $(TCC) /Fo$@ -c user_.c |
| 972 | |
| 973 | user_.c : $(SRCDIR)\user.c |
| 974 | translate$E $** > $@ |
| 975 | |
| 976 | $(OX)\verify$O : verify_.c verify.h |
| 977 | $(TCC) /Fo$@ -c verify_.c |
| 978 | |
| 979 | verify_.c : $(SRCDIR)\verify.c |
| @@ -1116,10 +1125,11 @@ | |
| 1116 | tktsetup_.c:tktsetup.h \ |
| 1117 | undo_.c:undo.h \ |
| 1118 | update_.c:update.h \ |
| 1119 | url_.c:url.h \ |
| 1120 | user_.c:user.h \ |
| 1121 | verify_.c:verify.h \ |
| 1122 | vfile_.c:vfile.h \ |
| 1123 | wiki_.c:wiki.h \ |
| 1124 | wikiformat_.c:wikiformat.h \ |
| 1125 | winhttp_.c:winhttp.h \ |
| 1126 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -128,10 +128,11 @@ | |
| 128 | tktsetup_.c \ |
| 129 | undo_.c \ |
| 130 | update_.c \ |
| 131 | url_.c \ |
| 132 | user_.c \ |
| 133 | utf8_.c \ |
| 134 | verify_.c \ |
| 135 | vfile_.c \ |
| 136 | wiki_.c \ |
| 137 | wikiformat_.c \ |
| 138 | winhttp_.c \ |
| @@ -228,10 +229,11 @@ | |
| 229 | $(OX)\tktsetup$O \ |
| 230 | $(OX)\undo$O \ |
| 231 | $(OX)\update$O \ |
| 232 | $(OX)\url$O \ |
| 233 | $(OX)\user$O \ |
| 234 | $(OX)\utf8$O \ |
| 235 | $(OX)\verify$O \ |
| 236 | $(OX)\vfile$O \ |
| 237 | $(OX)\wiki$O \ |
| 238 | $(OX)\wikiformat$O \ |
| 239 | $(OX)\winhttp$O \ |
| @@ -349,10 +351,11 @@ | |
| 351 | echo $(OX)\tktsetup.obj >> $@ |
| 352 | echo $(OX)\undo.obj >> $@ |
| 353 | echo $(OX)\update.obj >> $@ |
| 354 | echo $(OX)\url.obj >> $@ |
| 355 | echo $(OX)\user.obj >> $@ |
| 356 | echo $(OX)\utf8.obj >> $@ |
| 357 | echo $(OX)\verify.obj >> $@ |
| 358 | echo $(OX)\vfile.obj >> $@ |
| 359 | echo $(OX)\wiki.obj >> $@ |
| 360 | echo $(OX)\wikiformat.obj >> $@ |
| 361 | echo $(OX)\winhttp.obj >> $@ |
| @@ -970,10 +973,16 @@ | |
| 973 | $(OX)\user$O : user_.c user.h |
| 974 | $(TCC) /Fo$@ -c user_.c |
| 975 | |
| 976 | user_.c : $(SRCDIR)\user.c |
| 977 | translate$E $** > $@ |
| 978 | |
| 979 | $(OX)\utf8$O : utf8_.c utf8.h |
| 980 | $(TCC) /Fo$@ -c utf8_.c |
| 981 | |
| 982 | utf8_.c : $(SRCDIR)\utf8.c |
| 983 | translate$E $** > $@ |
| 984 | |
| 985 | $(OX)\verify$O : verify_.c verify.h |
| 986 | $(TCC) /Fo$@ -c verify_.c |
| 987 | |
| 988 | verify_.c : $(SRCDIR)\verify.c |
| @@ -1116,10 +1125,11 @@ | |
| 1125 | tktsetup_.c:tktsetup.h \ |
| 1126 | undo_.c:undo.h \ |
| 1127 | update_.c:update.h \ |
| 1128 | url_.c:url.h \ |
| 1129 | user_.c:user.h \ |
| 1130 | utf8_.c:utf8.h \ |
| 1131 | verify_.c:verify.h \ |
| 1132 | vfile_.c:vfile.h \ |
| 1133 | wiki_.c:wiki.h \ |
| 1134 | wikiformat_.c:wikiformat.h \ |
| 1135 | winhttp_.c:winhttp.h \ |
| 1136 |