Fossil SCM

merge trunk. Broken on win32!

jan.nijtmans 2012-11-29 15:13 ticket-d17d6e5b17 merge
Commit 258cedd6255b0a8c97936f40baac06457511356d
+1 -1
--- auto.def
+++ auto.def
@@ -79,11 +79,10 @@
7979
if {[opt-bool static]} {
8080
# XXX: This will not work on all systems.
8181
define-append EXTRA_LDFLAGS -static
8282
}
8383
84
-
8584
# Check for zlib, using the given location if specified
8685
set zlibpath [opt-val with-zlib]
8786
if {$zlibpath ne ""} {
8887
cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
8988
define-append EXTRA_CFLAGS -I$zlibpath
@@ -221,14 +220,15 @@
221220
# Last resort, may be Windows
222221
if {[string match *mingw* [get-define host]]} {
223222
define-append LIBS -lwsock32
224223
}
225224
}
225
+cc-check-function-in-lib iconv iconv
226226
227227
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
228228
if {![cc-check-functions getpassphrase]} {
229229
# Haiku needs this
230230
cc-check-function-in-lib getpass bsd
231231
}
232232
233233
make-template Makefile.in
234234
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
235235
--- 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 @@
2929
** or merge, and should be omitted from "clean" and "extra" lists.
3030
**
3131
** Return the N-th name. The first name has N==0. When all names have
3232
** been used, return 0.
3333
*/
34
-const char *fossil_reserved_name(int N){
34
+const char *fossil_reserved_name(int N, int omitRepo){
3535
/* Possible names of the local per-checkout database file and
3636
** its associated journals
3737
*/
3838
static const char *const azName[] = {
3939
"_FOSSIL_",
@@ -88,25 +88,25 @@
8888
N -= count(azName);
8989
if( cachedManifest ){
9090
if( N<count(azManifest) ) return azManifest[N];
9191
N -= count(azManifest);
9292
}
93
- if( N<count(azRepo) ) return azRepo[N];
93
+ if( !omitRepo && N<count(azRepo) ) return azRepo[N];
9494
return 0;
9595
}
9696
9797
/*
9898
** Return a list of all reserved filenames as an SQL list.
9999
*/
100
-const char *fossil_all_reserved_names(void){
100
+const char *fossil_all_reserved_names(int omitRepo){
101101
static char *zAll = 0;
102102
if( zAll==0 ){
103103
Blob x;
104104
int i;
105105
const char *z;
106106
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++){
108108
if( i>0 ) blob_append(&x, ",", 1);
109109
blob_appendf(&x, "'%q'", z);
110110
}
111111
zAll = blob_str(&x);
112112
}
@@ -113,21 +113,24 @@
113113
return zAll;
114114
}
115115
116116
/*
117117
** COMMAND: test-reserved-names
118
+**
119
+** Usage: %fossil test-reserved-names [-omitrepo]
118120
**
119121
** Show all reserved filenames for the current check-out.
120122
*/
121123
void test_reserved_names(void){
122124
int i;
123125
const char *z;
126
+ int omitRepo = find_option("omitrepo",0,0)!=0;
124127
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++){
126129
fossil_print("%3d: %s\n", i, z);
127130
}
128
- fossil_print("ALL: (%s)\n", fossil_all_reserved_names());
131
+ fossil_print("ALL: (%s)\n", fossil_all_reserved_names(omitRepo));
129132
}
130133
131134
/*
132135
** Add a single file named zName to the VFILE table with vid.
133136
**
@@ -195,11 +198,11 @@
195198
}
196199
db_prepare(&loop, "SELECT x FROM sfile ORDER BY x");
197200
while( db_step(&loop)==SQLITE_ROW ){
198201
const char *zToAdd = db_column_text(&loop, 0);
199202
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++){
201204
if( xCmp(zToAdd, zReserved)==0 ) break;
202205
}
203206
if( zReserved ) continue;
204207
nAdd += add_one_file(zToAdd, vid, caseSensitive);
205208
}
206209
--- 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 @@
11111111
blob_append(pBlob, "", 1);
11121112
zUtf8 = blob_str(pBlob) + bomSize;
11131113
zUtf8 = fossil_unicode_to_utf8(zUtf8);
11141114
blob_zero(pBlob);
11151115
blob_append(pBlob, zUtf8, -1);
1116
- fossil_mbcs_free(zUtf8);
1116
+ fossil_unicode_free(zUtf8);
11171117
}else if( starts_with_utf16be_bom(pBlob, &bomSize) ){
11181118
unsigned int i = blob_size(pBlob);
11191119
zUtf8 = blob_buffer(pBlob);
11201120
while( i > 0 ){
11211121
/* swap bytes of unicode representation */
@@ -1127,14 +1127,14 @@
11271127
blob_append(pBlob, "", 1);
11281128
zUtf8 = blob_str(pBlob) + bomSize;
11291129
zUtf8 = fossil_unicode_to_utf8(zUtf8);
11301130
blob_zero(pBlob);
11311131
blob_append(pBlob, zUtf8, -1);
1132
- fossil_mbcs_free(zUtf8);
1132
+ fossil_unicode_free(zUtf8);
11331133
}else if( useMbcs ){
11341134
zUtf8 = fossil_mbcs_to_utf8(blob_str(pBlob));
11351135
blob_reset(pBlob);
11361136
blob_append(pBlob, zUtf8, -1);
11371137
fossil_mbcs_free(zUtf8);
11381138
#endif /* _WIN32 */
11391139
}
11401140
}
11411141
--- 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 @@
350350
glob_free(pIgnore);
351351
db_prepare(&q,
352352
"SELECT x FROM sfile"
353353
" WHERE x NOT IN (%s)"
354354
" ORDER BY 1",
355
- fossil_all_reserved_names()
355
+ fossil_all_reserved_names(0)
356356
);
357357
db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
358358
blob_zero(&rewrittenPathname);
359359
while( db_step(&q)==SQLITE_ROW ){
360360
zDisplayName = zPathname = db_column_text(&q, 0);
@@ -430,11 +430,11 @@
430430
glob_free(pIgnore);
431431
db_prepare(&q,
432432
"SELECT %Q || x FROM sfile"
433433
" WHERE x NOT IN (%s)"
434434
" ORDER BY 1",
435
- g.zLocalRoot, fossil_all_reserved_names()
435
+ g.zLocalRoot, fossil_all_reserved_names(0)
436436
);
437437
if( file_tree_name(g.zRepositoryName, &repo, 0) ){
438438
db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
439439
}
440440
db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
@@ -886,13 +886,17 @@
886886
887887
/*
888888
** Issue a warning and give the user an opportunity to abandon out
889889
** if a Unicode (UTF-16) byte-order-mark (BOM) or a \r\n line ending
890890
** 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".
891895
*/
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. */
894898
int crnlOk, /* Non-zero if CR/NL warnings should be disabled. */
895899
int binOk, /* Non-zero if binary warnings should be disabled. */
896900
int unicodeOk, /* Non-zero if unicode warnings should be disabled. */
897901
const char *zFilename /* The full name of the file being committed. */
898902
){
@@ -900,56 +904,78 @@
900904
int fUnicode; /* return value of starts_with_utf16_bom() */
901905
char *zMsg; /* Warning message */
902906
Blob fname; /* Relative pathname of the file */
903907
static int allOk = 0; /* Set to true to disable this routine */
904908
905
- if( allOk ) return;
909
+ if( allOk ) return 0;
906910
fUnicode = starts_with_utf16_bom(p, 0);
907911
eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p);
908912
if( eType==0 || eType==-1 || fUnicode ){
909913
const char *zWarning;
914
+ const char *zConvert = "c=convert/";
910915
Blob ans;
911916
char cReply;
912917
913918
if( eType==-1 && fUnicode ){
914919
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. */
916921
}
917922
zWarning = "Unicode and CR/NL line endings";
918923
}else if( eType==-1 ){
919924
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. */
921926
}
922927
zWarning = "CR/NL line endings";
923928
}else if( eType==0 ){
924929
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. */
926931
}
927932
zWarning = "binary data";
933
+ zConvert = ""; /* We cannot convert binary files. */
928934
}else{
929935
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. */
931937
}
932938
zWarning = "Unicode";
939
+#ifndef _WIN32
940
+ zConvert = ""; /* On Unix, we cannot easily convert Unicode files. */
941
+#endif
933942
}
934943
file_relative_name(zFilename, &fname, 0);
935944
blob_zero(&ans);
936945
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);
939948
prompt_user(zMsg, &ans);
940949
fossil_free(zMsg);
941950
cReply = blob_str(&ans)[0];
942951
if( cReply=='a' || cReply=='A' ){
943952
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;
944969
}else if( cReply!='y' && cReply!='Y' ){
945970
fossil_fatal("Abandoning commit due to %s in %s",
946971
zWarning, blob_str(&fname));
947972
}
948973
blob_reset(&ans);
949974
blob_reset(&fname);
950975
}
976
+ return 0;
951977
}
952978
953979
/*
954980
** qsort() comparison routine for an array of pointers to strings.
955981
*/
@@ -1065,10 +1091,11 @@
10651091
Blob cksum1, cksum2; /* Before and after commit checksums */
10661092
Blob cksum1b; /* Checksum recorded in the manifest */
10671093
int szD; /* Size of the delta manifest */
10681094
int szB; /* Size of the baseline manifest */
10691095
int nConflict = 0; /* Number of unresolved merge conflicts */
1096
+ int abortCommit = 0;
10701097
Blob ans;
10711098
char cReply;
10721099
10731100
url_proxy_options();
10741101
noSign = find_option("nosign",0,0)!=0;
@@ -1312,11 +1339,12 @@
13121339
}else{
13131340
blob_read_from_file(&content, zFullname);
13141341
}
13151342
/* Do not emit any warnings when they are disabled. */
13161343
if( !noWarningFlag ){
1317
- commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
1344
+ abortCommit |= commit_warning(&content, crnlOk, binOk,
1345
+ unicodeOk, zFullname);
13181346
}
13191347
if( chnged==1 && contains_merge_marker(&content) ){
13201348
Blob fname; /* Relative pathname of the file */
13211349
13221350
nConflict++;
@@ -1335,10 +1363,13 @@
13351363
}
13361364
db_finalize(&q);
13371365
if( nConflict && !allowConflict ){
13381366
fossil_fatal("abort due to unresolved merge conflicts; "
13391367
"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");
13401371
}
13411372
13421373
/* Create the new manifest */
13431374
if( blob_size(&comment)==0 ){
13441375
blob_append(&comment, "(no comment)", -1);
13451376
--- 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 @@
261261
** Unlink the local database file
262262
*/
263263
static void unlink_local_database(int manifestOnly){
264264
const char *zReserved;
265265
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++){
267267
if( manifestOnly==0 || zReserved[0]=='m' ){
268268
char *z;
269269
z = mprintf("%s%s", g.zLocalRoot, zReserved);
270270
file_delete(z);
271271
free(z);
272272
--- 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 @@
3636
#ifdef _WIN32
3737
# include <direct.h>
3838
# include <windows.h>
3939
# include <sys/utime.h>
4040
#endif
41
+#ifdef __CYGWIN__
42
+# include <sys/time.h>
43
+#endif
4144
4245
/*
4346
** The file status information from the most recent stat() call.
4447
**
4548
** Use _stati64 rather than stat on windows, in order to handle files
@@ -72,11 +75,11 @@
7275
}
7376
#else
7477
int rc = 0;
7578
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
7679
rc = _wstati64(zMbcs, buf);
77
- fossil_mbcs_free(zMbcs);
80
+ fossil_filename_free(zMbcs);
7881
return rc;
7982
#endif
8083
}
8184
8285
/*
@@ -303,11 +306,11 @@
303306
*/
304307
int file_access(const char *zFilename, int flags){
305308
#ifdef _WIN32
306309
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
307310
int rc = _waccess(zMbcs, flags);
308
- fossil_mbcs_free(zMbcs);
311
+ fossil_filename_free(zMbcs);
309312
#else
310313
int rc = access(zFilename, flags);
311314
#endif
312315
return rc;
313316
}
@@ -407,11 +410,11 @@
407410
struct _utimbuf tb;
408411
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
409412
tb.actime = newMTime;
410413
tb.modtime = newMTime;
411414
_wutime(zMbcs, &tb);
412
- fossil_mbcs_free(zMbcs);
415
+ fossil_filename_free(zMbcs);
413416
#endif
414417
}
415418
416419
/*
417420
** COMMAND: test-set-mtime
@@ -439,13 +442,13 @@
439442
/*
440443
** Delete a file.
441444
*/
442445
void file_delete(const char *zFilename){
443446
#ifdef _WIN32
444
- wchar_t *z = fossil_utf8_to_filename(zFilename);
447
+ wchar_t *z = fossil_utf8_to_unicode(zFilename);
445448
_wunlink(z);
446
- fossil_mbcs_free(z);
449
+ fossil_unicode_free(z);
447450
#else
448451
unlink(zFilename);
449452
#endif
450453
}
451454
@@ -465,11 +468,11 @@
465468
if( rc!=1 ){
466469
#if defined(_WIN32)
467470
int rc;
468471
wchar_t *zMbcs = fossil_utf8_to_filename(zName);
469472
rc = _wmkdir(zMbcs);
470
- fossil_mbcs_free(zMbcs);
473
+ fossil_filename_free(zMbcs);
471474
return rc;
472475
#else
473476
return mkdir(zName, 0755);
474477
#endif
475478
}
@@ -481,11 +484,11 @@
481484
** a file in a repository. Valid filenames follow all of the
482485
** following rules:
483486
**
484487
** * Does not begin with "/"
485488
** * 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: "\*[]?"
487490
** * Does not end with "/".
488491
** * Does not contain two or more "/" characters in a row.
489492
** * Contains at least one character
490493
*/
491494
int file_is_simple_pathname(const char *z){
@@ -520,11 +523,11 @@
520523
/* Unicode character in the range U+D800 - U+DFFF are for
521524
* surrogate pairs, they shouldn't occur in filenames. */
522525
return 0;
523526
}
524527
}
525
- if( c=='\\' ){
528
+ if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){
526529
return 0;
527530
}
528531
if( c=='/' ){
529532
if( z[i+1]=='/' ) return 0;
530533
if( z[i+1]=='.' ){
@@ -652,18 +655,18 @@
652655
int i;
653656
wchar_t zPwd[2000];
654657
if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){
655658
fossil_fatal("cannot find the current working directory.");
656659
}
657
- zPwdUtf8 = fossil_unicode_to_utf8(zPwd);
660
+ zPwdUtf8 = fossil_filename_to_utf8(zPwd);
658661
nPwd = strlen(zPwdUtf8);
659662
if( nPwd > nBuf-1 ){
660663
fossil_fatal("pwd too big: max %d\n", nBuf-1);
661664
}
662665
for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/';
663666
memcpy(zBuf, zPwdUtf8, nPwd+1);
664
- fossil_mbcs_free(zPwdUtf8);
667
+ fossil_filename_free(zPwdUtf8);
665668
#else
666669
if( getcwd(zBuf, nBuf-1)==0 ){
667670
if( errno==ERANGE ){
668671
fossil_fatal("pwd too big: max %d\n", nBuf-1);
669672
}else{
@@ -1009,11 +1012,11 @@
10091012
10101013
#if defined(_WIN32)
10111014
wchar_t zTmpPath[MAX_PATH];
10121015
10131016
if( GetTempPathW(MAX_PATH, zTmpPath) ){
1014
- azDirs[0] = fossil_unicode_to_utf8(zTmpPath);
1017
+ azDirs[0] = fossil_filename_to_utf8(zTmpPath);
10151018
}
10161019
10171020
azDirs[1] = fossil_getenv("TEMP");
10181021
azDirs[2] = fossil_getenv("TMP");
10191022
#endif
@@ -1043,12 +1046,12 @@
10431046
}
10441047
zBuf[j] = 0;
10451048
}while( file_size(zBuf)>=0 );
10461049
10471050
#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]);
10501053
#endif
10511054
}
10521055
10531056
10541057
/*
@@ -1088,233 +1091,36 @@
10881091
# define closedir _wclosedir
10891092
#endif /* _WIN32 */
10901093
10911094
#endif /* INTERFACE */
10921095
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
-
12391096
/*
12401097
** Return the value of an environment variable as UTF8.
1098
+** Use fossil_filename_free() to release resources.
12411099
*/
12421100
char *fossil_getenv(const char *zName){
12431101
#ifdef _WIN32
12441102
wchar_t *uName = fossil_utf8_to_unicode(zName);
12451103
void *zValue = _wgetenv(uName);
1246
- fossil_mbcs_free(uName);
1247
- if( zValue ) zValue = fossil_unicode_to_utf8(zValue);
1104
+ fossil_unicode_free(uName);
12481105
#else
12491106
char *zValue = getenv(zName);
12501107
#endif
1108
+ if( zValue ) zValue = fossil_filename_to_utf8(zValue);
12511109
return zValue;
12521110
}
12531111
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
-
13061112
/*
13071113
** Like fopen() but always takes a UTF8 argument.
13081114
*/
13091115
FILE *fossil_fopen(const char *zName, const char *zMode){
13101116
#ifdef _WIN32
13111117
wchar_t *uMode = fossil_utf8_to_unicode(zMode);
13121118
wchar_t *uName = fossil_utf8_to_filename(zName);
13131119
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);
13161122
#else
13171123
FILE *f = fopen(zName, zMode);
13181124
#endif
13191125
return f;
13201126
}
13211127
--- 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 @@
3636
#ifdef _WIN32
3737
# include <direct.h>
3838
# include <windows.h>
3939
# include <sys/utime.h>
4040
#endif
41
+#ifdef __CYGWIN__
42
+# include <sys/time.h>
43
+#endif
4144
4245
/*
4346
** The file status information from the most recent stat() call.
4447
**
4548
** Use _stati64 rather than stat on windows, in order to handle files
@@ -72,11 +75,11 @@
7275
}
7376
#else
7477
int rc = 0;
7578
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
7679
rc = _wstati64(zMbcs, buf);
77
- fossil_mbcs_free(zMbcs);
80
+ fossil_filename_free(zMbcs);
7881
return rc;
7982
#endif
8083
}
8184
8285
/*
@@ -303,11 +306,11 @@
303306
*/
304307
int file_access(const char *zFilename, int flags){
305308
#ifdef _WIN32
306309
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
307310
int rc = _waccess(zMbcs, flags);
308
- fossil_mbcs_free(zMbcs);
311
+ fossil_filename_free(zMbcs);
309312
#else
310313
int rc = access(zFilename, flags);
311314
#endif
312315
return rc;
313316
}
@@ -407,11 +410,11 @@
407410
struct _utimbuf tb;
408411
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
409412
tb.actime = newMTime;
410413
tb.modtime = newMTime;
411414
_wutime(zMbcs, &tb);
412
- fossil_mbcs_free(zMbcs);
415
+ fossil_filename_free(zMbcs);
413416
#endif
414417
}
415418
416419
/*
417420
** COMMAND: test-set-mtime
@@ -439,13 +442,13 @@
439442
/*
440443
** Delete a file.
441444
*/
442445
void file_delete(const char *zFilename){
443446
#ifdef _WIN32
444
- wchar_t *z = fossil_utf8_to_filename(zFilename);
447
+ wchar_t *z = fossil_utf8_to_unicode(zFilename);
445448
_wunlink(z);
446
- fossil_mbcs_free(z);
449
+ fossil_unicode_free(z);
447450
#else
448451
unlink(zFilename);
449452
#endif
450453
}
451454
@@ -465,11 +468,11 @@
465468
if( rc!=1 ){
466469
#if defined(_WIN32)
467470
int rc;
468471
wchar_t *zMbcs = fossil_utf8_to_filename(zName);
469472
rc = _wmkdir(zMbcs);
470
- fossil_mbcs_free(zMbcs);
473
+ fossil_filename_free(zMbcs);
471474
return rc;
472475
#else
473476
return mkdir(zName, 0755);
474477
#endif
475478
}
@@ -481,11 +484,11 @@
481484
** a file in a repository. Valid filenames follow all of the
482485
** following rules:
483486
**
484487
** * Does not begin with "/"
485488
** * 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: "\*[]?"
487490
** * Does not end with "/".
488491
** * Does not contain two or more "/" characters in a row.
489492
** * Contains at least one character
490493
*/
491494
int file_is_simple_pathname(const char *z){
@@ -520,11 +523,11 @@
520523
/* Unicode character in the range U+D800 - U+DFFF are for
521524
* surrogate pairs, they shouldn't occur in filenames. */
522525
return 0;
523526
}
524527
}
525
- if( c=='\\' ){
528
+ if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){
526529
return 0;
527530
}
528531
if( c=='/' ){
529532
if( z[i+1]=='/' ) return 0;
530533
if( z[i+1]=='.' ){
@@ -652,18 +655,18 @@
652655
int i;
653656
wchar_t zPwd[2000];
654657
if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){
655658
fossil_fatal("cannot find the current working directory.");
656659
}
657
- zPwdUtf8 = fossil_unicode_to_utf8(zPwd);
660
+ zPwdUtf8 = fossil_filename_to_utf8(zPwd);
658661
nPwd = strlen(zPwdUtf8);
659662
if( nPwd > nBuf-1 ){
660663
fossil_fatal("pwd too big: max %d\n", nBuf-1);
661664
}
662665
for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/';
663666
memcpy(zBuf, zPwdUtf8, nPwd+1);
664
- fossil_mbcs_free(zPwdUtf8);
667
+ fossil_filename_free(zPwdUtf8);
665668
#else
666669
if( getcwd(zBuf, nBuf-1)==0 ){
667670
if( errno==ERANGE ){
668671
fossil_fatal("pwd too big: max %d\n", nBuf-1);
669672
}else{
@@ -1009,11 +1012,11 @@
10091012
10101013
#if defined(_WIN32)
10111014
wchar_t zTmpPath[MAX_PATH];
10121015
10131016
if( GetTempPathW(MAX_PATH, zTmpPath) ){
1014
- azDirs[0] = fossil_unicode_to_utf8(zTmpPath);
1017
+ azDirs[0] = fossil_filename_to_utf8(zTmpPath);
10151018
}
10161019
10171020
azDirs[1] = fossil_getenv("TEMP");
10181021
azDirs[2] = fossil_getenv("TMP");
10191022
#endif
@@ -1043,12 +1046,12 @@
10431046
}
10441047
zBuf[j] = 0;
10451048
}while( file_size(zBuf)>=0 );
10461049
10471050
#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]);
10501053
#endif
10511054
}
10521055
10531056
10541057
/*
@@ -1088,233 +1091,36 @@
10881091
# define closedir _wclosedir
10891092
#endif /* _WIN32 */
10901093
10911094
#endif /* INTERFACE */
10921095
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
-
12391096
/*
12401097
** Return the value of an environment variable as UTF8.
1098
+** Use fossil_filename_free() to release resources.
12411099
*/
12421100
char *fossil_getenv(const char *zName){
12431101
#ifdef _WIN32
12441102
wchar_t *uName = fossil_utf8_to_unicode(zName);
12451103
void *zValue = _wgetenv(uName);
1246
- fossil_mbcs_free(uName);
1247
- if( zValue ) zValue = fossil_unicode_to_utf8(zValue);
1104
+ fossil_unicode_free(uName);
12481105
#else
12491106
char *zValue = getenv(zName);
12501107
#endif
1108
+ if( zValue ) zValue = fossil_filename_to_utf8(zValue);
12511109
return zValue;
12521110
}
12531111
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
-
13061112
/*
13071113
** Like fopen() but always takes a UTF8 argument.
13081114
*/
13091115
FILE *fossil_fopen(const char *zName, const char *zMode){
13101116
#ifdef _WIN32
13111117
wchar_t *uMode = fossil_utf8_to_unicode(zMode);
13121118
wchar_t *uName = fossil_utf8_to_filename(zName);
13131119
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);
13161122
#else
13171123
FILE *f = fopen(zName, zMode);
13181124
#endif
13191125
return f;
13201126
}
13211127
--- 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 @@
2424
** COMMAND: finfo
2525
**
2626
** Usage: %fossil finfo ?OPTIONS? FILENAME
2727
**
2828
** 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.
3030
**
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
3232
** is printed, otherwise the full comment is printed. The "--limit N"
3333
** and "--offset P" options limits the output to the first N changes
3434
** after skipping P changes.
3535
**
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
3737
** a quick status and does not check for up-to-date-ness of the file.
3838
**
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".
4040
** 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.
4242
**
4343
** Options:
4444
** --brief|-b display a brief (one line / revision) summary
4545
** --limit N display the first N changes
4646
** --log|-l select log mode (the default)
@@ -50,11 +50,11 @@
5050
** to stdout (only in print mode)
5151
** -s select status mode (print a status indicator for FILE)
5252
** --case-sensitive B Enable or disable case-sensitive filenames. B is a
5353
** boolean: "yes", "no", "true", "false", etc.
5454
**
55
-** See also: artifact, descendants, info, leaves
55
+** See also: artifact, cat, descendants, info, leaves
5656
*/
5757
void finfo_cmd(void){
5858
capture_case_sensitive_option();
5959
db_must_be_within_tree();
6060
if (find_option("status","s",0)) {
@@ -185,12 +185,13 @@
185185
const char *zBr = db_column_text(&q, 5);
186186
char *zOut;
187187
if( zBr==0 ) zBr = "trunk";
188188
if( iBrief ){
189189
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);
192193
comment_print(zOut, 11, 79);
193194
sqlite3_free(zOut);
194195
}else{
195196
blob_reset(&line);
196197
blob_appendf(&line, "%.10s ", zCiUuid);
@@ -203,10 +204,45 @@
203204
}
204205
db_finalize(&q);
205206
blob_reset(&fname);
206207
}
207208
}
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
+}
208244
209245
/* Values for the debug= query parameter to finfo */
210246
#define FINFO_DEBUG_MLINK 0x01
211247
212248
/*
213249
--- 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
--- src/http_transport.c
+++ src/http_transport.c
@@ -193,10 +193,11 @@
193193
blob_appendf(&zCmd, " -P %d", g.urlPort);
194194
#else
195195
blob_appendf(&zCmd, " -p %d", g.urlPort);
196196
#endif
197197
}
198
+ fossil_force_newline();
198199
fossil_print("%s", blob_str(&zCmd)); /* Show the base of the SSH command */
199200
if( g.urlUser && g.urlUser[0] ){
200201
zHost = mprintf("%s@%s", g.urlUser, g.urlName);
201202
#ifdef __MINGW32__
202203
/* Only win32 (and specifically PLINK.EXE) support the -pw option */
203204
--- 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 @@
491491
g.argc = argc;
492492
g.argv = argv;
493493
#if defined(_WIN32) && !defined(__MINGW32__)
494494
parse_windows_command_line(&g.argc, &g.argv);
495495
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);
498497
#else
499498
g.nameOfExe = g.argv[0];
500499
#endif
500
+ for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
501501
for(i=1; i<g.argc-1; i++){
502502
z = g.argv[i];
503503
if( z[0]!='-' ) continue;
504504
z++;
505505
if( z[0]=='-' ) z++;
@@ -712,10 +712,11 @@
712712
once = 0;
713713
cgi_printf("<p class=\"generalError\">%h</p>", z);
714714
cgi_reply();
715715
}else if( !g.fQuiet ){
716716
char *zOut = mprintf("%s: %s\n", g.argv[0], z);
717
+ fossil_force_newline();
717718
fossil_puts(zOut, 1);
718719
fossil_free(zOut);
719720
}
720721
}
721722
free(z);
@@ -745,10 +746,11 @@
745746
g.cgiOutput = 0;
746747
cgi_printf("<p class=\"generalError\">%h</p>", z);
747748
cgi_reply();
748749
}else if( !g.fQuiet ){
749750
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
751
+ fossil_force_newline();
750752
fossil_puts(zOut, 1);
751753
fossil_free(zOut);
752754
}
753755
}
754756
free(z);
@@ -787,10 +789,11 @@
787789
g.cgiOutput = 0;
788790
cgi_printf("<p class=\"generalError\">%h</p>", z);
789791
cgi_reply();
790792
}else{
791793
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
794
+ fossil_force_newline();
792795
fossil_puts(zOut, 1);
793796
fossil_free(zOut);
794797
}
795798
}
796799
db_force_rollback();
@@ -813,10 +816,11 @@
813816
{
814817
if( g.cgiOutput ){
815818
cgi_printf("<p class=\"generalError\">%h</p>", z);
816819
}else{
817820
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
821
+ fossil_force_newline();
818822
fossil_puts(zOut, 1);
819823
fossil_free(zOut);
820824
}
821825
}
822826
free(z);
@@ -854,11 +858,11 @@
854858
char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);
855859
fossil_puts(zOut, 1);
856860
fossil_free(zOut);
857861
}
858862
rc = _wsystem(zUnicode);
859
- fossil_mbcs_free(zUnicode);
863
+ fossil_unicode_free(zUnicode);
860864
free(zNewCmd);
861865
#else
862866
/* On unix, evaluate the command directly.
863867
*/
864868
if( g.fSystemTrace ) fprintf(stderr, "SYSTEM: %s\n", zOrigCmd);
@@ -2018,15 +2022,32 @@
20182022
#endif
20192023
}
20202024
20212025
/*
20222026
** COMMAND: test-echo
2027
+**
2028
+** Usage: %fossil test-echo [--hex] ARGS...
20232029
**
20242030
** Echo all command-line arguments (enclosed in [...]) to the screen so that
20252031
** 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.
20262035
*/
20272036
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
+ }
20312052
}
20322053
}
20332054
--- 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 @@
102102
$(SRCDIR)/tktsetup.c \
103103
$(SRCDIR)/undo.c \
104104
$(SRCDIR)/update.c \
105105
$(SRCDIR)/url.c \
106106
$(SRCDIR)/user.c \
107
+ $(SRCDIR)/utf8.c \
107108
$(SRCDIR)/verify.c \
108109
$(SRCDIR)/vfile.c \
109110
$(SRCDIR)/wiki.c \
110111
$(SRCDIR)/wikiformat.c \
111112
$(SRCDIR)/winhttp.c \
@@ -203,10 +204,11 @@
203204
$(OBJDIR)/tktsetup_.c \
204205
$(OBJDIR)/undo_.c \
205206
$(OBJDIR)/update_.c \
206207
$(OBJDIR)/url_.c \
207208
$(OBJDIR)/user_.c \
209
+ $(OBJDIR)/utf8_.c \
208210
$(OBJDIR)/verify_.c \
209211
$(OBJDIR)/vfile_.c \
210212
$(OBJDIR)/wiki_.c \
211213
$(OBJDIR)/wikiformat_.c \
212214
$(OBJDIR)/winhttp_.c \
@@ -304,10 +306,11 @@
304306
$(OBJDIR)/tktsetup.o \
305307
$(OBJDIR)/undo.o \
306308
$(OBJDIR)/update.o \
307309
$(OBJDIR)/url.o \
308310
$(OBJDIR)/user.o \
311
+ $(OBJDIR)/utf8.o \
309312
$(OBJDIR)/verify.o \
310313
$(OBJDIR)/vfile.o \
311314
$(OBJDIR)/wiki.o \
312315
$(OBJDIR)/wikiformat.o \
313316
$(OBJDIR)/winhttp.o \
@@ -381,11 +384,11 @@
381384
382385
383386
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
384387
$(OBJDIR)/mkindex $(TRANS_SRC) >$@
385388
$(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
387390
touch $(OBJDIR)/headers
388391
$(OBJDIR)/headers: Makefile
389392
$(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
390393
Makefile:
391394
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -1016,10 +1019,17 @@
10161019
10171020
$(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h
10181021
$(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c
10191022
10201023
$(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
10211031
$(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate
10221032
$(OBJDIR)/translate $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c
10231033
10241034
$(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h
10251035
$(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c
10261036
--- 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
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -107,10 +107,11 @@
107107
update
108108
url
109109
user
110110
verify
111111
vfile
112
+ utf8
112113
wiki
113114
wikiformat
114115
winhttp
115116
wysiwyg
116117
xfer
117118
--- 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 @@
818818
free(g.zErrMsg);
819819
g.zErrMsg = 0;
820820
g.iErrPriority = 0;
821821
}
822822
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
+
823831
/*
824832
** Write to standard output or standard error.
825833
**
826834
** On windows, transform the output into the current terminal encoding
827835
** if the output is going to the screen. If output is redirected into
828836
** a file, no translation occurs. No translation ever occurs on unix.
829837
*/
830838
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');
831842
#if defined(_WIN32)
832
- if( fossil_utf8_to_console(z, strlen(z), toStdErr) >= 0 ){
843
+ if( fossil_utf8_to_console(z, n, toStdErr) >= 0 ){
833844
return;
834845
}
835846
#endif
836847
assert( toStdErr==0 || toStdErr==1 );
837
- fwrite(z, 1, strlen(z), toStdErr ? stderr : stdout);
848
+ fwrite(z, 1, n, toStdErr ? stderr : stdout);
838849
fflush(toStdErr ? stderr : stdout);
839850
}
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
+}
840859
841860
/*
842861
** Write output for user consumption. If g.cgiOutput is enabled, then
843862
** send the output as part of the CGI reply. If g.cgiOutput is false,
844863
** then write on standard output.
845864
--- 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 @@
845845
if( pEntry->d_name[0]=='.' ){
846846
continue;
847847
}
848848
zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
849849
zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
850
- fossil_mbcs_free(zUtf8Name);
850
+ fossil_filename_free(zUtf8Name);
851851
if( file_isdir(zSubpath)==1 ){
852852
recon_read_dir(zSubpath);
853853
}
854854
blob_init(&path, 0, 0);
855855
blob_appendf(&path, "%s", zSubpath);
@@ -867,11 +867,11 @@
867867
closedir(d);
868868
}else {
869869
fossil_panic("encountered error %d while trying to open \"%s\".",
870870
errno, g.argv[3]);
871871
}
872
- fossil_mbcs_free(zUnicodePath);
872
+ fossil_filename_free(zUnicodePath);
873873
}
874874
875875
/*
876876
** COMMAND: reconstruct*
877877
**
878878
--- 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 @@
845845
if( pEntry->d_name[0]=='.' ){
846846
continue;
847847
}
848848
zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
849849
zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
850
- fossil_mbcs_free(zUtf8Name);
850
+ fossil_filename_free(zUtf8Name);
851851
if( file_isdir(zSubpath)==1 ){
852852
recon_read_dir(zSubpath);
853853
}
854854
blob_init(&path, 0, 0);
855855
blob_appendf(&path, "%s", zSubpath);
@@ -867,11 +867,11 @@
867867
closedir(d);
868868
}else {
869869
fossil_panic("encountered error %d while trying to open \"%s\".",
870870
errno, g.argv[3]);
871871
}
872
- fossil_mbcs_free(zUnicodePath);
872
+ fossil_filename_free(zUnicodePath);
873873
}
874874
875875
/*
876876
** COMMAND: reconstruct*
877877
**
878878
--- 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 @@
132132
*/
133133
void prompt_user(const char *zPrompt, Blob *pIn){
134134
char *z;
135135
char zLine[1000];
136136
blob_zero(pIn);
137
+ fossil_force_newline();
137138
fossil_print("%s", zPrompt);
138139
fflush(stdout);
139140
z = fgets(zLine, sizeof(zLine), stdin);
140141
if( z ){
141142
strip_string(pIn, z);
142143
143144
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) {
22
/* If[/\]", don't process the ':' */
33
if( nChar>MAX_PATH ) {
44
memcpy(zUnicode, L"\\\\?\\", 8 -1, wUnicode, nChar2/" or "<drive>:\"fdef __CYGWIN__
@@ -10,42 +10,5 @@
1010
wch8. #ifdef _WIN32#else
1111
return (char*)zMbcsznicode text into UTF8(char *)zUnicode#
1212
** 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 @@
440440
const char *zDir;
441441
struct dirent *pEntry;
442442
int skipAll = 0;
443443
static Stmt ins;
444444
static int depth = 0;
445
- void *zMbcs;
445
+ void *zNative;
446446
447447
origSize = blob_size(pPath);
448448
if( pIgnore ){
449449
blob_appendf(pPath, "/");
450450
if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1;
@@ -459,12 +459,12 @@
459459
);
460460
}
461461
depth++;
462462
463463
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);
466466
if( d ){
467467
while( (pEntry=readdir(d))!=0 ){
468468
char *zPath;
469469
char *zUtf8;
470470
if( pEntry->d_name[0]=='.' ){
@@ -486,16 +486,16 @@
486486
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
487487
db_step(&ins);
488488
db_reset(&ins);
489489
}
490490
}
491
- fossil_mbcs_free(zUtf8);
491
+ fossil_filename_free(zUtf8);
492492
blob_resize(pPath, origSize);
493493
}
494494
closedir(d);
495495
}
496
- fossil_mbcs_free(zMbcs);
496
+ fossil_filename_free(zNative);
497497
498498
depth--;
499499
if( depth==0 ){
500500
db_finalize(&ins);
501501
}
502502
--- 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 @@
440440
const char *zDir;
441441
struct dirent *pEntry;
442442
int skipAll = 0;
443443
static Stmt ins;
444444
static int depth = 0;
445
- void *zMbcs;
445
+ void *zNative;
446446
447447
origSize = blob_size(pPath);
448448
if( pIgnore ){
449449
blob_appendf(pPath, "/");
450450
if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1;
@@ -459,12 +459,12 @@
459459
);
460460
}
461461
depth++;
462462
463463
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);
466466
if( d ){
467467
while( (pEntry=readdir(d))!=0 ){
468468
char *zPath;
469469
char *zUtf8;
470470
if( pEntry->d_name[0]=='.' ){
@@ -486,16 +486,16 @@
486486
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
487487
db_step(&ins);
488488
db_reset(&ins);
489489
}
490490
}
491
- fossil_mbcs_free(zUtf8);
491
+ fossil_filename_free(zUtf8);
492492
blob_resize(pPath, origSize);
493493
}
494494
closedir(d);
495495
}
496
- fossil_mbcs_free(zMbcs);
496
+ fossil_filename_free(zNative);
497497
498498
depth--;
499499
if( depth==0 ){
500500
db_finalize(&ins);
501501
}
502502
--- 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 @@
262262
static SERVICE_STATUS ssStatus;
263263
static SERVICE_STATUS_HANDLE sshStatusHandle;
264264
265265
/*
266266
** 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
268268
** to store the message string when done.
269269
*/
270270
static char *win32_get_last_errmsg(void){
271271
DWORD nMsg;
272272
DWORD nErr = GetLastError();
273273
--- 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 @@
16921692
defossilize(zMsg);
16931693
if( (syncFlags & SYNC_PUSH) && zMsg && strglob("pull only *", zMsg) ){
16941694
syncFlags &= ~SYNC_PUSH;
16951695
zMsg = 0;
16961696
}
1697
- fossil_print("\rServer says: %s\n", zMsg);
1697
+ fossil_force_newline();
1698
+ fossil_print("Server says: %s\n", zMsg);
16981699
}else
16991700
17001701
/* pragma NAME VALUE...
17011702
**
17021703
** The server can send pragmas to try to convey meta-information to
@@ -1804,11 +1805,11 @@
18041805
** information which is only sent on the second round.
18051806
*/
18061807
if( cloneSeqno<=0 && nCycle>1 ) go = 0;
18071808
};
18081809
transport_stats(&nSent, &nRcvd, 1);
1809
- if( (syncFlags & SYNC_VERBOSE)==0 ) fossil_print("\n");
1810
+ fossil_force_newline();
18101811
fossil_print(
18111812
"%s finished with %lld bytes sent, %lld bytes received\n",
18121813
zOpType, nSent, nRcvd);
18131814
transport_close();
18141815
transport_global_shutdown();
18151816
--- 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 @@
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
2929
SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
3030
31
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c 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
3232
33
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\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
3434
3535
3636
RC=$(DMDIR)\bin\rcc
3737
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
3838
@@ -46,11 +46,11 @@
4646
4747
$(OBJDIR)\fossil.res: $B\win\fossil.rc
4848
$(RC) $(RCFLAGS) -o$@ $**
4949
5050
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
51
- +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest 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 > $@
5252
+echo fossil >> $@
5353
+echo fossil >> $@
5454
+echo $(LIBS) >> $@
5555
+echo. >> $@
5656
+echo fossil >> $@
@@ -649,10 +649,16 @@
649649
$(OBJDIR)\user$O : user_.c user.h
650650
$(TCC) -o$@ -c user_.c
651651
652652
user_.c : $(SRCDIR)\user.c
653653
+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 $** > $@
654660
655661
$(OBJDIR)\verify$O : verify_.c verify.h
656662
$(TCC) -o$@ -c verify_.c
657663
658664
verify_.c : $(SRCDIR)\verify.c
@@ -705,7 +711,7 @@
705711
706712
zip_.c : $(SRCDIR)\zip.c
707713
+translate$E $** > $@
708714
709715
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
711717
@copy /Y nul: headers
712718
--- 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
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
1313
#
1414
1515
#### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
1616
# By default, this is an empty string (i.e. use the native compiler).
1717
#
18
-PREFIX =
18
+# PREFIX =
1919
# PREFIX = mingw32-
2020
# PREFIX = i686-pc-mingw32-
21
-# PREFIX = i686-w64-mingw32-
21
+PREFIX = i686-w64-mingw32-
2222
# PREFIX = x86_64-w64-mingw32-
2323
2424
#### The toplevel directory of the source tree. Fossil can be built
2525
# in a directory that is separate from the source tree. Just change
2626
# the following to point from the build directory to the src/ folder.
@@ -207,11 +207,11 @@
207207
endif
208208
209209
#### Tcl shell for use in running the fossil test suite. This is only
210210
# used for testing.
211211
#
212
-TCLSH = tclsh
212
+TCLSH = tclsh86
213213
214214
#### Nullsoft installer MakeNSIS location
215215
#
216216
MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe"
217217
@@ -313,10 +313,11 @@
313313
$(SRCDIR)/tktsetup.c \
314314
$(SRCDIR)/undo.c \
315315
$(SRCDIR)/update.c \
316316
$(SRCDIR)/url.c \
317317
$(SRCDIR)/user.c \
318
+ $(SRCDIR)/utf8.c \
318319
$(SRCDIR)/verify.c \
319320
$(SRCDIR)/vfile.c \
320321
$(SRCDIR)/wiki.c \
321322
$(SRCDIR)/wikiformat.c \
322323
$(SRCDIR)/winhttp.c \
@@ -414,10 +415,11 @@
414415
$(OBJDIR)/tktsetup_.c \
415416
$(OBJDIR)/undo_.c \
416417
$(OBJDIR)/update_.c \
417418
$(OBJDIR)/url_.c \
418419
$(OBJDIR)/user_.c \
420
+ $(OBJDIR)/utf8_.c \
419421
$(OBJDIR)/verify_.c \
420422
$(OBJDIR)/vfile_.c \
421423
$(OBJDIR)/wiki_.c \
422424
$(OBJDIR)/wikiformat_.c \
423425
$(OBJDIR)/winhttp_.c \
@@ -515,10 +517,11 @@
515517
$(OBJDIR)/tktsetup.o \
516518
$(OBJDIR)/undo.o \
517519
$(OBJDIR)/update.o \
518520
$(OBJDIR)/url.o \
519521
$(OBJDIR)/user.o \
522
+ $(OBJDIR)/utf8.o \
520523
$(OBJDIR)/verify.o \
521524
$(OBJDIR)/vfile.o \
522525
$(OBJDIR)/wiki.o \
523526
$(OBJDIR)/wikiformat.o \
524527
$(OBJDIR)/winhttp.o \
@@ -639,11 +642,11 @@
639642
640643
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
641644
$(MKINDEX) $(TRANS_SRC) >$@
642645
643646
$(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
645648
echo Done >$(OBJDIR)/headers
646649
647650
$(OBJDIR)/headers: Makefile
648651
649652
Makefile:
@@ -1365,10 +1368,18 @@
13651368
13661369
$(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h
13671370
$(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c
13681371
13691372
$(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
13701381
13711382
$(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate
13721383
$(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c
13731384
13741385
$(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h
13751386
--- 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
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
1313
#
1414
1515
#### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
1616
# By default, this is an empty string (i.e. use the native compiler).
1717
#
18
-PREFIX =
18
+# PREFIX =
1919
# PREFIX = mingw32-
2020
# PREFIX = i686-pc-mingw32-
21
-# PREFIX = i686-w64-mingw32-
21
+PREFIX = i686-w64-mingw32-
2222
# PREFIX = x86_64-w64-mingw32-
2323
2424
#### The toplevel directory of the source tree. Fossil can be built
2525
# in a directory that is separate from the source tree. Just change
2626
# the following to point from the build directory to the src/ folder.
@@ -207,11 +207,11 @@
207207
endif
208208
209209
#### Tcl shell for use in running the fossil test suite. This is only
210210
# used for testing.
211211
#
212
-TCLSH = tclsh
212
+TCLSH = tclsh86
213213
214214
#### Nullsoft installer MakeNSIS location
215215
#
216216
MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe"
217217
@@ -313,10 +313,11 @@
313313
$(SRCDIR)/tktsetup.c \
314314
$(SRCDIR)/undo.c \
315315
$(SRCDIR)/update.c \
316316
$(SRCDIR)/url.c \
317317
$(SRCDIR)/user.c \
318
+ $(SRCDIR)/utf8.c \
318319
$(SRCDIR)/verify.c \
319320
$(SRCDIR)/vfile.c \
320321
$(SRCDIR)/wiki.c \
321322
$(SRCDIR)/wikiformat.c \
322323
$(SRCDIR)/winhttp.c \
@@ -414,10 +415,11 @@
414415
$(OBJDIR)/tktsetup_.c \
415416
$(OBJDIR)/undo_.c \
416417
$(OBJDIR)/update_.c \
417418
$(OBJDIR)/url_.c \
418419
$(OBJDIR)/user_.c \
420
+ $(OBJDIR)/utf8_.c \
419421
$(OBJDIR)/verify_.c \
420422
$(OBJDIR)/vfile_.c \
421423
$(OBJDIR)/wiki_.c \
422424
$(OBJDIR)/wikiformat_.c \
423425
$(OBJDIR)/winhttp_.c \
@@ -515,10 +517,11 @@
515517
$(OBJDIR)/tktsetup.o \
516518
$(OBJDIR)/undo.o \
517519
$(OBJDIR)/update.o \
518520
$(OBJDIR)/url.o \
519521
$(OBJDIR)/user.o \
522
+ $(OBJDIR)/utf8.o \
520523
$(OBJDIR)/verify.o \
521524
$(OBJDIR)/vfile.o \
522525
$(OBJDIR)/wiki.o \
523526
$(OBJDIR)/wikiformat.o \
524527
$(OBJDIR)/winhttp.o \
@@ -639,11 +642,11 @@
639642
640643
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
641644
$(MKINDEX) $(TRANS_SRC) >$@
642645
643646
$(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
645648
echo Done >$(OBJDIR)/headers
646649
647650
$(OBJDIR)/headers: Makefile
648651
649652
Makefile:
@@ -1365,10 +1368,18 @@
13651368
13661369
$(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h
13671370
$(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c
13681371
13691372
$(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
13701381
13711382
$(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate
13721383
$(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c
13731384
13741385
$(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h
13751386
--- 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
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -128,10 +128,11 @@
128128
tktsetup_.c \
129129
undo_.c \
130130
update_.c \
131131
url_.c \
132132
user_.c \
133
+ utf8_.c \
133134
verify_.c \
134135
vfile_.c \
135136
wiki_.c \
136137
wikiformat_.c \
137138
winhttp_.c \
@@ -228,10 +229,11 @@
228229
$(OX)\tktsetup$O \
229230
$(OX)\undo$O \
230231
$(OX)\update$O \
231232
$(OX)\url$O \
232233
$(OX)\user$O \
234
+ $(OX)\utf8$O \
233235
$(OX)\verify$O \
234236
$(OX)\vfile$O \
235237
$(OX)\wiki$O \
236238
$(OX)\wikiformat$O \
237239
$(OX)\winhttp$O \
@@ -349,10 +351,11 @@
349351
echo $(OX)\tktsetup.obj >> $@
350352
echo $(OX)\undo.obj >> $@
351353
echo $(OX)\update.obj >> $@
352354
echo $(OX)\url.obj >> $@
353355
echo $(OX)\user.obj >> $@
356
+ echo $(OX)\utf8.obj >> $@
354357
echo $(OX)\verify.obj >> $@
355358
echo $(OX)\vfile.obj >> $@
356359
echo $(OX)\wiki.obj >> $@
357360
echo $(OX)\wikiformat.obj >> $@
358361
echo $(OX)\winhttp.obj >> $@
@@ -970,10 +973,16 @@
970973
$(OX)\user$O : user_.c user.h
971974
$(TCC) /Fo$@ -c user_.c
972975
973976
user_.c : $(SRCDIR)\user.c
974977
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 $** > $@
975984
976985
$(OX)\verify$O : verify_.c verify.h
977986
$(TCC) /Fo$@ -c verify_.c
978987
979988
verify_.c : $(SRCDIR)\verify.c
@@ -1116,10 +1125,11 @@
11161125
tktsetup_.c:tktsetup.h \
11171126
undo_.c:undo.h \
11181127
update_.c:update.h \
11191128
url_.c:url.h \
11201129
user_.c:user.h \
1130
+ utf8_.c:utf8.h \
11211131
verify_.c:verify.h \
11221132
vfile_.c:vfile.h \
11231133
wiki_.c:wiki.h \
11241134
wikiformat_.c:wikiformat.h \
11251135
winhttp_.c:winhttp.h \
11261136
--- 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

Keyboard Shortcuts

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