Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | merge trunk. Broken on win32! |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | ticket-d17d6e5b17 |
| Files: | files | file ages | folders |
| SHA1: |
258cedd6255b0a8c97936f40baac0645 |
| User & Date: | jan.nijtmans 2012-11-29 15:13:53.399 |
Context
|
2012-11-29
| ||
| 21:21 | merge trunk. Seems to work now. Still to be tested more. check-in: 49bdd78b75 user: jan.nijtmans tags: ticket-d17d6e5b17 | |
| 15:13 | merge trunk. Broken on win32! check-in: 258cedd625 user: jan.nijtmans tags: ticket-d17d6e5b17 | |
| 13:15 | Translate decomposed-UTF8 filenames on MacOS into precomposed-UTF8. Fix for ticket [e399bc1edfe45b] check-in: ca728447a6 user: drh tags: trunk | |
|
2012-11-28
| ||
| 08:45 | merge trunk check-in: 58a98df4a5 user: jan.nijtmans tags: ticket-d17d6e5b17 | |
Changes
Changes to auto.def.
| ︙ | ︙ | |||
77 78 79 80 81 82 83 |
}
if {[opt-bool static]} {
# XXX: This will not work on all systems.
define-append EXTRA_LDFLAGS -static
}
| < | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
}
if {[opt-bool static]} {
# XXX: This will not work on all systems.
define-append EXTRA_LDFLAGS -static
}
# Check for zlib, using the given location if specified
set zlibpath [opt-val with-zlib]
if {$zlibpath ne ""} {
cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
define-append EXTRA_CFLAGS -I$zlibpath
define-append EXTRA_LDFLAGS -L$zlibpath
}
|
| ︙ | ︙ | |||
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
cc-check-function-in-lib gethostbyname nsl
if {![cc-check-function-in-lib socket {socket network}]} {
# Last resort, may be Windows
if {[string match *mingw* [get-define host]]} {
define-append LIBS -lwsock32
}
}
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
if {![cc-check-functions getpassphrase]} {
# Haiku needs this
cc-check-function-in-lib getpass bsd
}
make-template Makefile.in
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
| > | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
cc-check-function-in-lib gethostbyname nsl
if {![cc-check-function-in-lib socket {socket network}]} {
# Last resort, may be Windows
if {[string match *mingw* [get-define host]]} {
define-append LIBS -lwsock32
}
}
cc-check-function-in-lib iconv iconv
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
if {![cc-check-functions getpassphrase]} {
# Haiku needs this
cc-check-function-in-lib getpass bsd
}
make-template Makefile.in
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
|
Changes to src/add.c.
| ︙ | ︙ | |||
27 28 29 30 31 32 33 | ** This routine returns the names of files in a working checkout that ** are created by Fossil itself, and hence should not be added, deleted, ** or merge, and should be omitted from "clean" and "extra" lists. ** ** Return the N-th name. The first name has N==0. When all names have ** been used, return 0. */ | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
** This routine returns the names of files in a working checkout that
** are created by Fossil itself, and hence should not be added, deleted,
** or merge, and should be omitted from "clean" and "extra" lists.
**
** Return the N-th name. The first name has N==0. When all names have
** been used, return 0.
*/
const char *fossil_reserved_name(int N, int omitRepo){
/* Possible names of the local per-checkout database file and
** its associated journals
*/
static const char *const azName[] = {
"_FOSSIL_",
"_FOSSIL_-journal",
"_FOSSIL_-wal",
|
| ︙ | ︙ | |||
86 87 88 89 90 91 92 |
if( N<0 ) return 0;
if( N<count(azName) ) return azName[N];
N -= count(azName);
if( cachedManifest ){
if( N<count(azManifest) ) return azManifest[N];
N -= count(azManifest);
}
| | | | > > > | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
if( N<0 ) return 0;
if( N<count(azName) ) return azName[N];
N -= count(azName);
if( cachedManifest ){
if( N<count(azManifest) ) return azManifest[N];
N -= count(azManifest);
}
if( !omitRepo && N<count(azRepo) ) return azRepo[N];
return 0;
}
/*
** Return a list of all reserved filenames as an SQL list.
*/
const char *fossil_all_reserved_names(int omitRepo){
static char *zAll = 0;
if( zAll==0 ){
Blob x;
int i;
const char *z;
blob_zero(&x);
for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){
if( i>0 ) blob_append(&x, ",", 1);
blob_appendf(&x, "'%q'", z);
}
zAll = blob_str(&x);
}
return zAll;
}
/*
** COMMAND: test-reserved-names
**
** Usage: %fossil test-reserved-names [-omitrepo]
**
** Show all reserved filenames for the current check-out.
*/
void test_reserved_names(void){
int i;
const char *z;
int omitRepo = find_option("omitrepo",0,0)!=0;
db_must_be_within_tree();
for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){
fossil_print("%3d: %s\n", i, z);
}
fossil_print("ALL: (%s)\n", fossil_all_reserved_names(omitRepo));
}
/*
** Add a single file named zName to the VFILE table with vid.
**
** Omit any file whose name is pOmit.
*/
|
| ︙ | ︙ | |||
193 194 195 196 197 198 199 |
" ON vfile(pathname COLLATE nocase)"
);
}
db_prepare(&loop, "SELECT x FROM sfile ORDER BY x");
while( db_step(&loop)==SQLITE_ROW ){
const char *zToAdd = db_column_text(&loop, 0);
if( fossil_strcmp(zToAdd, zRepo)==0 ) continue;
| | | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
" ON vfile(pathname COLLATE nocase)"
);
}
db_prepare(&loop, "SELECT x FROM sfile ORDER BY x");
while( db_step(&loop)==SQLITE_ROW ){
const char *zToAdd = db_column_text(&loop, 0);
if( fossil_strcmp(zToAdd, zRepo)==0 ) continue;
for(i=0; (zReserved = fossil_reserved_name(i, 0))!=0; i++){
if( xCmp(zToAdd, zReserved)==0 ) break;
}
if( zReserved ) continue;
nAdd += add_one_file(zToAdd, vid, caseSensitive);
}
db_finalize(&loop);
blob_reset(&repoName);
|
| ︙ | ︙ |
Changes to src/blob.c.
| ︙ | ︙ | |||
1109 1110 1111 1112 1113 1114 1115 |
}else if( starts_with_utf16le_bom(pBlob, &bomSize) ){
/* Make sure the blob contains two terminating 0-bytes */
blob_append(pBlob, "", 1);
zUtf8 = blob_str(pBlob) + bomSize;
zUtf8 = fossil_unicode_to_utf8(zUtf8);
blob_zero(pBlob);
blob_append(pBlob, zUtf8, -1);
| | | | 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 |
}else if( starts_with_utf16le_bom(pBlob, &bomSize) ){
/* Make sure the blob contains two terminating 0-bytes */
blob_append(pBlob, "", 1);
zUtf8 = blob_str(pBlob) + bomSize;
zUtf8 = fossil_unicode_to_utf8(zUtf8);
blob_zero(pBlob);
blob_append(pBlob, zUtf8, -1);
fossil_unicode_free(zUtf8);
}else if( starts_with_utf16be_bom(pBlob, &bomSize) ){
unsigned int i = blob_size(pBlob);
zUtf8 = blob_buffer(pBlob);
while( i > 0 ){
/* swap bytes of unicode representation */
char zTemp = zUtf8[--i];
zUtf8[i] = zUtf8[i-1];
zUtf8[--i] = zTemp;
}
/* Make sure the blob contains two terminating 0-bytes */
blob_append(pBlob, "", 1);
zUtf8 = blob_str(pBlob) + bomSize;
zUtf8 = fossil_unicode_to_utf8(zUtf8);
blob_zero(pBlob);
blob_append(pBlob, zUtf8, -1);
fossil_unicode_free(zUtf8);
}else if( useMbcs ){
zUtf8 = fossil_mbcs_to_utf8(blob_str(pBlob));
blob_reset(pBlob);
blob_append(pBlob, zUtf8, -1);
fossil_mbcs_free(zUtf8);
#endif /* _WIN32 */
}
}
|
Changes to src/checkin.c.
| ︙ | ︙ | |||
348 349 350 351 352 353 354 |
pIgnore = glob_create(zIgnoreFlag);
vfile_scan(&path, blob_size(&path), scanFlags, pIgnore);
glob_free(pIgnore);
db_prepare(&q,
"SELECT x FROM sfile"
" WHERE x NOT IN (%s)"
" ORDER BY 1",
| | | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
pIgnore = glob_create(zIgnoreFlag);
vfile_scan(&path, blob_size(&path), scanFlags, pIgnore);
glob_free(pIgnore);
db_prepare(&q,
"SELECT x FROM sfile"
" WHERE x NOT IN (%s)"
" ORDER BY 1",
fossil_all_reserved_names(0)
);
db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
blob_zero(&rewrittenPathname);
while( db_step(&q)==SQLITE_ROW ){
zDisplayName = zPathname = db_column_text(&q, 0);
if( cwdRelative ) {
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
|
| ︙ | ︙ | |||
428 429 430 431 432 433 434 |
pIgnore = glob_create(zIgnoreFlag);
vfile_scan(&path, blob_size(&path), scanFlags, pIgnore);
glob_free(pIgnore);
db_prepare(&q,
"SELECT %Q || x FROM sfile"
" WHERE x NOT IN (%s)"
" ORDER BY 1",
| | | 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
pIgnore = glob_create(zIgnoreFlag);
vfile_scan(&path, blob_size(&path), scanFlags, pIgnore);
glob_free(pIgnore);
db_prepare(&q,
"SELECT %Q || x FROM sfile"
" WHERE x NOT IN (%s)"
" ORDER BY 1",
g.zLocalRoot, fossil_all_reserved_names(0)
);
if( file_tree_name(g.zRepositoryName, &repo, 0) ){
db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
}
db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
while( db_step(&q)==SQLITE_ROW ){
if( testFlag ){
|
| ︙ | ︙ | |||
884 885 886 887 888 889 890 891 | if( pnFBcard ) *pnFBcard = nFBcard; } /* ** Issue a warning and give the user an opportunity to abandon out ** if a Unicode (UTF-16) byte-order-mark (BOM) or a \r\n line ending ** is seen in a text file. */ | > > > > | | | > | | | > | > > > | | > > > > > > > > > > > > > > > > > | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 |
if( pnFBcard ) *pnFBcard = nFBcard;
}
/*
** Issue a warning and give the user an opportunity to abandon out
** if a Unicode (UTF-16) byte-order-mark (BOM) or a \r\n line ending
** is seen in a text file.
**
** Return 1 if the user pressed 'c'. In that case, the file will have
** been converted to UTF-8 (if it was UTF-16) with NL line-endings,
** and the original file will have been renamed to "<filename>-original".
*/
static int commit_warning(
Blob *p, /* The content of the file being committed. */
int crnlOk, /* Non-zero if CR/NL warnings should be disabled. */
int binOk, /* Non-zero if binary warnings should be disabled. */
int unicodeOk, /* Non-zero if unicode warnings should be disabled. */
const char *zFilename /* The full name of the file being committed. */
){
int eType; /* return value of looks_like_utf8/utf16() */
int fUnicode; /* return value of starts_with_utf16_bom() */
char *zMsg; /* Warning message */
Blob fname; /* Relative pathname of the file */
static int allOk = 0; /* Set to true to disable this routine */
if( allOk ) return 0;
fUnicode = starts_with_utf16_bom(p, 0);
eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p);
if( eType==0 || eType==-1 || fUnicode ){
const char *zWarning;
const char *zConvert = "c=convert/";
Blob ans;
char cReply;
if( eType==-1 && fUnicode ){
if ( crnlOk && unicodeOk ){
return 0; /* We don't want Unicode/CR/NL warnings for this file. */
}
zWarning = "Unicode and CR/NL line endings";
}else if( eType==-1 ){
if( crnlOk ){
return 0; /* We don't want CR/NL warnings for this file. */
}
zWarning = "CR/NL line endings";
}else if( eType==0 ){
if( binOk ){
return 0; /* We don't want binary warnings for this file. */
}
zWarning = "binary data";
zConvert = ""; /* We cannot convert binary files. */
}else{
if ( unicodeOk ){
return 0; /* We don't want unicode warnings for this file. */
}
zWarning = "Unicode";
#ifndef _WIN32
zConvert = ""; /* On Unix, we cannot easily convert Unicode files. */
#endif
}
file_relative_name(zFilename, &fname, 0);
blob_zero(&ans);
zMsg = mprintf(
"%s contains %s. commit anyhow (a=all/%sy/N)? ",
blob_str(&fname), zWarning, zConvert);
prompt_user(zMsg, &ans);
fossil_free(zMsg);
cReply = blob_str(&ans)[0];
if( cReply=='a' || cReply=='A' ){
allOk = 1;
}else if( *zConvert && (cReply=='c' || cReply=='C') ){
char *zOrig = file_newname(zFilename, "original", 1);
FILE *f;
blob_write_to_file(p, zOrig);
fossil_free(zOrig);
f = fossil_fopen(zFilename, "wb");
if( fUnicode ) {
int bomSize;
const unsigned char *bom = get_utf8_bom(&bomSize);
fwrite(bom, 1, bomSize, f);
blob_to_utf8_no_bom(p, 0);
}
blob_remove_cr(p);
fwrite(blob_buffer(p), 1, blob_size(p), f);
fclose(f);
return 1;
}else if( cReply!='y' && cReply!='Y' ){
fossil_fatal("Abandoning commit due to %s in %s",
zWarning, blob_str(&fname));
}
blob_reset(&ans);
blob_reset(&fname);
}
return 0;
}
/*
** qsort() comparison routine for an array of pointers to strings.
*/
static int tagCmp(const void *a, const void *b){
char **pA = (char**)a;
|
| ︙ | ︙ | |||
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 |
Blob manifest; /* Manifest in baseline form */
Blob muuid; /* Manifest uuid */
Blob cksum1, cksum2; /* Before and after commit checksums */
Blob cksum1b; /* Checksum recorded in the manifest */
int szD; /* Size of the delta manifest */
int szB; /* Size of the baseline manifest */
int nConflict = 0; /* Number of unresolved merge conflicts */
Blob ans;
char cReply;
url_proxy_options();
noSign = find_option("nosign",0,0)!=0;
forceDelta = find_option("delta",0,0)!=0;
forceBaseline = find_option("baseline",0,0)!=0;
| > | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
Blob manifest; /* Manifest in baseline form */
Blob muuid; /* Manifest uuid */
Blob cksum1, cksum2; /* Before and after commit checksums */
Blob cksum1b; /* Checksum recorded in the manifest */
int szD; /* Size of the delta manifest */
int szB; /* Size of the baseline manifest */
int nConflict = 0; /* Number of unresolved merge conflicts */
int abortCommit = 0;
Blob ans;
char cReply;
url_proxy_options();
noSign = find_option("nosign",0,0)!=0;
forceDelta = find_option("delta",0,0)!=0;
forceBaseline = find_option("baseline",0,0)!=0;
|
| ︙ | ︙ | |||
1310 1311 1312 1313 1314 1315 1316 |
/* Instead of file content, put link destination path */
blob_read_link(&content, zFullname);
}else{
blob_read_from_file(&content, zFullname);
}
/* Do not emit any warnings when they are disabled. */
if( !noWarningFlag ){
| | > | 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 |
/* Instead of file content, put link destination path */
blob_read_link(&content, zFullname);
}else{
blob_read_from_file(&content, zFullname);
}
/* Do not emit any warnings when they are disabled. */
if( !noWarningFlag ){
abortCommit |= commit_warning(&content, crnlOk, binOk,
unicodeOk, zFullname);
}
if( chnged==1 && contains_merge_marker(&content) ){
Blob fname; /* Relative pathname of the file */
nConflict++;
file_relative_name(zFullname, &fname, 0);
fossil_print("possible unresolved merge conflict in %s\n",
|
| ︙ | ︙ | |||
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 |
db_multi_exec("UPDATE vfile SET mrid=%d, rid=%d WHERE id=%d", nrid,nrid,id);
db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
}
db_finalize(&q);
if( nConflict && !allowConflict ){
fossil_fatal("abort due to unresolved merge conflicts; "
"use --allow-conflict to override");
}
/* Create the new manifest */
if( blob_size(&comment)==0 ){
blob_append(&comment, "(no comment)", -1);
}
if( forceDelta ){
| > > > | 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 |
db_multi_exec("UPDATE vfile SET mrid=%d, rid=%d WHERE id=%d", nrid,nrid,id);
db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
}
db_finalize(&q);
if( nConflict && !allowConflict ){
fossil_fatal("abort due to unresolved merge conflicts; "
"use --allow-conflict to override");
} else if( abortCommit ){
fossil_fatal("one or more files were converted on your request; "
"please re-test before committing");
}
/* Create the new manifest */
if( blob_size(&comment)==0 ){
blob_append(&comment, "(no comment)", -1);
}
if( forceDelta ){
|
| ︙ | ︙ |
Changes to src/checkout.c.
| ︙ | ︙ | |||
259 260 261 262 263 264 265 |
/*
** Unlink the local database file
*/
static void unlink_local_database(int manifestOnly){
const char *zReserved;
int i;
| | | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
/*
** Unlink the local database file
*/
static void unlink_local_database(int manifestOnly){
const char *zReserved;
int i;
for(i=0; (zReserved = fossil_reserved_name(i, 1))!=0; i++){
if( manifestOnly==0 || zReserved[0]=='m' ){
char *z;
z = mprintf("%s%s", g.zLocalRoot, zReserved);
file_delete(z);
free(z);
}
}
|
| ︙ | ︙ |
Changes to src/file.c.
| ︙ | ︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ** On Windows, include the Platform SDK header file. */ #ifdef _WIN32 # include <direct.h> # include <windows.h> # include <sys/utime.h> #endif /* ** The file status information from the most recent stat() call. ** ** Use _stati64 rather than stat on windows, in order to handle files ** larger than 2GB. */ | > > > | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ** On Windows, include the Platform SDK header file. */ #ifdef _WIN32 # include <direct.h> # include <windows.h> # include <sys/utime.h> #endif #ifdef __CYGWIN__ # include <sys/time.h> #endif /* ** The file status information from the most recent stat() call. ** ** Use _stati64 rather than stat on windows, in order to handle files ** larger than 2GB. */ |
| ︙ | ︙ | |||
70 71 72 73 74 75 76 |
}else{
return stat(zFilename, buf);
}
#else
int rc = 0;
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
rc = _wstati64(zMbcs, buf);
| | | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
}else{
return stat(zFilename, buf);
}
#else
int rc = 0;
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
rc = _wstati64(zMbcs, buf);
fossil_filename_free(zMbcs);
return rc;
#endif
}
/*
** Fill in the fileStat variable for the file named zFilename.
** If zFilename==0, then use the previous value of fileStat if
|
| ︙ | ︙ | |||
301 302 303 304 305 306 307 |
/*
** Wrapper around the access() system call.
*/
int file_access(const char *zFilename, int flags){
#ifdef _WIN32
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
int rc = _waccess(zMbcs, flags);
| | | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
/*
** Wrapper around the access() system call.
*/
int file_access(const char *zFilename, int flags){
#ifdef _WIN32
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
int rc = _waccess(zMbcs, flags);
fossil_filename_free(zMbcs);
#else
int rc = access(zFilename, flags);
#endif
return rc;
}
/*
|
| ︙ | ︙ | |||
405 406 407 408 409 410 411 | utimes(zFilename, tv); #else struct _utimbuf tb; wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); tb.actime = newMTime; tb.modtime = newMTime; _wutime(zMbcs, &tb); | | | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | utimes(zFilename, tv); #else struct _utimbuf tb; wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); tb.actime = newMTime; tb.modtime = newMTime; _wutime(zMbcs, &tb); fossil_filename_free(zMbcs); #endif } /* ** COMMAND: test-set-mtime ** ** Usage: %fossil test-set-mtime FILENAME DATE/TIME |
| ︙ | ︙ | |||
437 438 439 440 441 442 443 |
}
/*
** Delete a file.
*/
void file_delete(const char *zFilename){
#ifdef _WIN32
| | | | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 |
}
/*
** Delete a file.
*/
void file_delete(const char *zFilename){
#ifdef _WIN32
wchar_t *z = fossil_utf8_to_unicode(zFilename);
_wunlink(z);
fossil_unicode_free(z);
#else
unlink(zFilename);
#endif
}
/*
** Create the directory named in the argument, if it does not already
|
| ︙ | ︙ | |||
463 464 465 466 467 468 469 |
file_delete(zName);
}
if( rc!=1 ){
#if defined(_WIN32)
int rc;
wchar_t *zMbcs = fossil_utf8_to_filename(zName);
rc = _wmkdir(zMbcs);
| | | | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
file_delete(zName);
}
if( rc!=1 ){
#if defined(_WIN32)
int rc;
wchar_t *zMbcs = fossil_utf8_to_filename(zName);
rc = _wmkdir(zMbcs);
fossil_filename_free(zMbcs);
return rc;
#else
return mkdir(zName, 0755);
#endif
}
return 0;
}
/*
** Return true if the filename given is a valid filename for
** a file in a repository. Valid filenames follow all of the
** following rules:
**
** * Does not begin with "/"
** * Does not contain any path element named "." or ".."
** * Does not contain any of these characters in the path: "\*[]?"
** * Does not end with "/".
** * Does not contain two or more "/" characters in a row.
** * Contains at least one character
*/
int file_is_simple_pathname(const char *z){
int i;
char c = z[0];
|
| ︙ | ︙ | |||
518 519 520 521 522 523 524 |
}
if( ((c & 0xff) == 0xed) && ((z[i+1] & 0xe0) == 0xa0) ){
/* Unicode character in the range U+D800 - U+DFFF are for
* surrogate pairs, they shouldn't occur in filenames. */
return 0;
}
}
| | | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
}
if( ((c & 0xff) == 0xed) && ((z[i+1] & 0xe0) == 0xa0) ){
/* Unicode character in the range U+D800 - U+DFFF are for
* surrogate pairs, they shouldn't occur in filenames. */
return 0;
}
}
if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){
return 0;
}
if( c=='/' ){
if( z[i+1]=='/' ) return 0;
if( z[i+1]=='.' ){
if( z[i+2]=='/' || z[i+2]==0 ) return 0;
if( z[i+2]=='.' && (z[i+3]=='/' || z[i+3]==0) ) return 0;
|
| ︙ | ︙ | |||
650 651 652 653 654 655 656 |
char *zPwdUtf8;
int nPwd;
int i;
wchar_t zPwd[2000];
if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){
fossil_fatal("cannot find the current working directory.");
}
| | | | 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 |
char *zPwdUtf8;
int nPwd;
int i;
wchar_t zPwd[2000];
if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){
fossil_fatal("cannot find the current working directory.");
}
zPwdUtf8 = fossil_filename_to_utf8(zPwd);
nPwd = strlen(zPwdUtf8);
if( nPwd > nBuf-1 ){
fossil_fatal("pwd too big: max %d\n", nBuf-1);
}
for(i=0; zPwdUtf8[i]; i++) if( zPwdUtf8[i]=='\\' ) zPwdUtf8[i] = '/';
memcpy(zBuf, zPwdUtf8, nPwd+1);
fossil_filename_free(zPwdUtf8);
#else
if( getcwd(zBuf, nBuf-1)==0 ){
if( errno==ERANGE ){
fossil_fatal("pwd too big: max %d\n", nBuf-1);
}else{
fossil_fatal("cannot find current working directory; %s",
strerror(errno));
|
| ︙ | ︙ | |||
1007 1008 1009 1010 1011 1012 1013 |
const char *zDir = ".";
int cnt = 0;
#if defined(_WIN32)
wchar_t zTmpPath[MAX_PATH];
if( GetTempPathW(MAX_PATH, zTmpPath) ){
| | | 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 |
const char *zDir = ".";
int cnt = 0;
#if defined(_WIN32)
wchar_t zTmpPath[MAX_PATH];
if( GetTempPathW(MAX_PATH, zTmpPath) ){
azDirs[0] = fossil_filename_to_utf8(zTmpPath);
}
azDirs[1] = fossil_getenv("TEMP");
azDirs[2] = fossil_getenv("TMP");
#endif
|
| ︙ | ︙ | |||
1041 1042 1043 1044 1045 1046 1047 |
for(i=0; i<15; i++, j++){
zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
}
zBuf[j] = 0;
}while( file_size(zBuf)>=0 );
#if defined(_WIN32)
| | | | 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
for(i=0; i<15; i++, j++){
zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
}
zBuf[j] = 0;
}while( file_size(zBuf)>=0 );
#if defined(_WIN32)
fossil_unicode_free((char *)azDirs[1]);
fossil_unicode_free((char *)azDirs[2]);
#endif
}
/*
** Return true if a file named zName exists and has identical content
** to the blob pContent. If zName does not exist or if the content is
|
| ︙ | ︙ | |||
1086 1087 1088 1089 1090 1091 1092 | # define opendir _wopendir # define readdir _wreaddir # define closedir _wclosedir #endif /* _WIN32 */ #endif /* INTERFACE */ | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > | < < < | < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 |
# define opendir _wopendir
# define readdir _wreaddir
# define closedir _wclosedir
#endif /* _WIN32 */
#endif /* INTERFACE */
/*
** Return the value of an environment variable as UTF8.
** Use fossil_filename_free() to release resources.
*/
char *fossil_getenv(const char *zName){
#ifdef _WIN32
wchar_t *uName = fossil_utf8_to_unicode(zName);
void *zValue = _wgetenv(uName);
fossil_unicode_free(uName);
#else
char *zValue = getenv(zName);
#endif
if( zValue ) zValue = fossil_filename_to_utf8(zValue);
return zValue;
}
/*
** Like fopen() but always takes a UTF8 argument.
*/
FILE *fossil_fopen(const char *zName, const char *zMode){
#ifdef _WIN32
wchar_t *uMode = fossil_utf8_to_unicode(zMode);
wchar_t *uName = fossil_utf8_to_filename(zName);
FILE *f = _wfopen(uName, uMode);
fossil_filename_free(uName);
fossil_unicode_free(uMode);
#else
FILE *f = fopen(zName, zMode);
#endif
return f;
}
|
Changes to src/finfo.c.
| ︙ | ︙ | |||
22 23 24 25 26 27 28 | /* ** COMMAND: finfo ** ** Usage: %fossil finfo ?OPTIONS? FILENAME ** ** Print the complete change history for a single file going backwards | | | | | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
/*
** COMMAND: finfo
**
** Usage: %fossil finfo ?OPTIONS? FILENAME
**
** Print the complete change history for a single file going backwards
** in time. The default mode is -l.
**
** For the -l|--log mode: If "-b|--brief" is specified one line per revision
** is printed, otherwise the full comment is printed. The "--limit N"
** and "--offset P" options limits the output to the first N changes
** after skipping P changes.
**
** In the -s mode prints the status as <status> <revision>. This is
** a quick status and does not check for up-to-date-ness of the file.
**
** In the -p mode, there's an optional flag "-r|--revision REVISION".
** The specified version (or the latest checked out version) is printed
** to stdout. The -p mode is another form of the "cat" command.
**
** Options:
** --brief|-b display a brief (one line / revision) summary
** --limit N display the first N changes
** --log|-l select log mode (the default)
** --offset P skip P changes
** -p select print mode
** --revision|-r R print the given revision (or ckout, if none is given)
** to stdout (only in print mode)
** -s select status mode (print a status indicator for FILE)
** --case-sensitive B Enable or disable case-sensitive filenames. B is a
** boolean: "yes", "no", "true", "false", etc.
**
** See also: artifact, cat, descendants, info, leaves
*/
void finfo_cmd(void){
capture_case_sensitive_option();
db_must_be_within_tree();
if (find_option("status","s",0)) {
Stmt q;
Blob line;
|
| ︙ | ︙ | |||
183 184 185 186 187 188 189 |
const char *zCom = db_column_text(&q, 3);
const char *zUser = db_column_text(&q, 4);
const char *zBr = db_column_text(&q, 5);
char *zOut;
if( zBr==0 ) zBr = "trunk";
if( iBrief ){
fossil_print("%s ", zDate);
| > | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
const char *zCom = db_column_text(&q, 3);
const char *zUser = db_column_text(&q, 4);
const char *zBr = db_column_text(&q, 5);
char *zOut;
if( zBr==0 ) zBr = "trunk";
if( iBrief ){
fossil_print("%s ", zDate);
zOut = sqlite3_mprintf(
"[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)",
zCiUuid, zCom, zUser, zFileUuid, zBr);
comment_print(zOut, 11, 79);
sqlite3_free(zOut);
}else{
blob_reset(&line);
blob_appendf(&line, "%.10s ", zCiUuid);
blob_appendf(&line, "%.10s ", zDate);
blob_appendf(&line, "%8.8s ", zUser);
blob_appendf(&line, "%8.8s ", zBr);
blob_appendf(&line,"%-40.40s\n", zCom );
comment_print(blob_str(&line), 0, 79);
}
}
db_finalize(&q);
blob_reset(&fname);
}
}
/*
** COMMAND: cat
**
** Usage: %fossil cat FILENAME ... ?OPTIONS?
**
** Print on standard output the content of one or more files as they exist
** in the repository. The version currently checked out is shown by default.
** Other versions may be specified using the -r option.
**
** Options:
** -R|--repository FILE Extract artifacts from repository FILE
** -r VERSION The specific check-in containing the file
**
** See also: finfo
*/
void cat_cmd(void){
int i;
int rc;
Blob content, fname;
const char *zRev;
db_find_and_open_repository(0, 0);
zRev = find_option("r","r",1);
for(i=2; i<g.argc; i++){
file_tree_name(g.argv[i], &fname, 1);
blob_zero(&content);
rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0);
if( rc==0 ){
fossil_fatal("no such file: %s", g.argv[i]);
}
blob_write_to_file(&content, "-");
blob_reset(&fname);
blob_reset(&content);
}
}
/* Values for the debug= query parameter to finfo */
#define FINFO_DEBUG_MLINK 0x01
/*
** WEBPAGE: finfo
** URL: /finfo?name=FILENAME
|
| ︙ | ︙ |
Changes to src/http_transport.c.
| ︙ | ︙ | |||
191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
if( g.urlPort!=g.urlDfltPort ){
#ifdef __MINGW32__
blob_appendf(&zCmd, " -P %d", g.urlPort);
#else
blob_appendf(&zCmd, " -p %d", g.urlPort);
#endif
}
fossil_print("%s", blob_str(&zCmd)); /* Show the base of the SSH command */
if( g.urlUser && g.urlUser[0] ){
zHost = mprintf("%s@%s", g.urlUser, g.urlName);
#ifdef __MINGW32__
/* Only win32 (and specifically PLINK.EXE) support the -pw option */
if( g.urlPasswd && g.urlPasswd[0] ){
Blob pw;
| > | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
if( g.urlPort!=g.urlDfltPort ){
#ifdef __MINGW32__
blob_appendf(&zCmd, " -P %d", g.urlPort);
#else
blob_appendf(&zCmd, " -p %d", g.urlPort);
#endif
}
fossil_force_newline();
fossil_print("%s", blob_str(&zCmd)); /* Show the base of the SSH command */
if( g.urlUser && g.urlUser[0] ){
zHost = mprintf("%s@%s", g.urlUser, g.urlName);
#ifdef __MINGW32__
/* Only win32 (and specifically PLINK.EXE) support the -pw option */
if( g.urlPasswd && g.urlPasswd[0] ){
Blob pw;
|
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
489 490 491 492 493 494 495 | #endif g.argc = argc; g.argv = argv; #if defined(_WIN32) && !defined(__MINGW32__) parse_windows_command_line(&g.argc, &g.argv); GetModuleFileNameW(NULL, buf, MAX_PATH); | | < > | 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
#endif
g.argc = argc;
g.argv = argv;
#if defined(_WIN32) && !defined(__MINGW32__)
parse_windows_command_line(&g.argc, &g.argv);
GetModuleFileNameW(NULL, buf, MAX_PATH);
g.nameOfExe = fossil_filename_to_utf8(buf);
#else
g.nameOfExe = g.argv[0];
#endif
for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
for(i=1; i<g.argc-1; i++){
z = g.argv[i];
if( z[0]!='-' ) continue;
z++;
if( z[0]=='-' ) z++;
if( z[0]==0 ) return; /* Stop searching at "--" */
if( fossil_strcmp(z, "args")==0 ) break;
|
| ︙ | ︙ | |||
710 711 712 713 714 715 716 717 718 719 720 721 722 723 |
{
if( g.cgiOutput && once ){
once = 0;
cgi_printf("<p class=\"generalError\">%h</p>", z);
cgi_reply();
}else if( !g.fQuiet ){
char *zOut = mprintf("%s: %s\n", g.argv[0], z);
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
free(z);
db_force_rollback();
fossil_exit(rc);
| > | 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 |
{
if( g.cgiOutput && once ){
once = 0;
cgi_printf("<p class=\"generalError\">%h</p>", z);
cgi_reply();
}else if( !g.fQuiet ){
char *zOut = mprintf("%s: %s\n", g.argv[0], z);
fossil_force_newline();
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
free(z);
db_force_rollback();
fossil_exit(rc);
|
| ︙ | ︙ | |||
743 744 745 746 747 748 749 750 751 752 753 754 755 756 |
{
if( g.cgiOutput ){
g.cgiOutput = 0;
cgi_printf("<p class=\"generalError\">%h</p>", z);
cgi_reply();
}else if( !g.fQuiet ){
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
free(z);
db_force_rollback();
fossil_exit(rc);
| > | 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
{
if( g.cgiOutput ){
g.cgiOutput = 0;
cgi_printf("<p class=\"generalError\">%h</p>", z);
cgi_reply();
}else if( !g.fQuiet ){
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
fossil_force_newline();
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
free(z);
db_force_rollback();
fossil_exit(rc);
|
| ︙ | ︙ | |||
785 786 787 788 789 790 791 792 793 794 795 796 797 798 |
{
if( g.cgiOutput ){
g.cgiOutput = 0;
cgi_printf("<p class=\"generalError\">%h</p>", z);
cgi_reply();
}else{
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
db_force_rollback();
fossil_exit(rc);
}
| > | 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
{
if( g.cgiOutput ){
g.cgiOutput = 0;
cgi_printf("<p class=\"generalError\">%h</p>", z);
cgi_reply();
}else{
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
fossil_force_newline();
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
db_force_rollback();
fossil_exit(rc);
}
|
| ︙ | ︙ | |||
811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
}else
#endif
{
if( g.cgiOutput ){
cgi_printf("<p class=\"generalError\">%h</p>", z);
}else{
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
free(z);
}
| > | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 |
}else
#endif
{
if( g.cgiOutput ){
cgi_printf("<p class=\"generalError\">%h</p>", z);
}else{
char *zOut = mprintf("\r%s: %s\n", g.argv[0], z);
fossil_force_newline();
fossil_puts(zOut, 1);
fossil_free(zOut);
}
}
free(z);
}
|
| ︙ | ︙ | |||
852 853 854 855 856 857 858 |
WCHAR *zUnicode = fossil_utf8_to_unicode(zNewCmd);
if( g.fSystemTrace ) {
char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);
fossil_puts(zOut, 1);
fossil_free(zOut);
}
rc = _wsystem(zUnicode);
| | | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
WCHAR *zUnicode = fossil_utf8_to_unicode(zNewCmd);
if( g.fSystemTrace ) {
char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);
fossil_puts(zOut, 1);
fossil_free(zOut);
}
rc = _wsystem(zUnicode);
fossil_unicode_free(zUnicode);
free(zNewCmd);
#else
/* On unix, evaluate the command directly.
*/
if( g.fSystemTrace ) fprintf(stderr, "SYSTEM: %s\n", zOrigCmd);
rc = system(zOrigCmd);
#endif
|
| ︙ | ︙ | |||
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 |
zStopperFile, zNotFound, flags);
}
#endif
}
/*
** COMMAND: test-echo
**
** Echo all command-line arguments (enclosed in [...]) to the screen so that
** wildcard expansion behavior of the host shell can be investigated.
*/
void test_echo_cmd(void){
| > > > > > | > | | | > > > > > > > | > > > > | 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 |
zStopperFile, zNotFound, flags);
}
#endif
}
/*
** COMMAND: test-echo
**
** Usage: %fossil test-echo [--hex] ARGS...
**
** Echo all command-line arguments (enclosed in [...]) to the screen so that
** wildcard expansion behavior of the host shell can be investigated.
**
** With the --hex option, show the output as hexadecimal. This can be used
** to verify the fossil_filename_to_utf8() routine on Windows and Mac.
*/
void test_echo_cmd(void){
int i, j;
if( find_option("hex",0,0)==0 ){
for(i=0; i<g.argc; i++){
fossil_print("argv[%d] = [%s]\n", i, g.argv[i]);
}
}else{
unsigned char *z, c;
for(i=0; i<g.argc; i++){
fossil_print("argv[%d] = [", i);
z = (unsigned char*)g.argv[i];
for(j=0; (c = z[j])!=0; j++){
fossil_print("%02x", c);
}
fossil_print("]\n");
}
}
}
|
Changes to src/main.mk.
| ︙ | ︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 | $(SRCDIR)/timeline.c \ $(SRCDIR)/tkt.c \ $(SRCDIR)/tktsetup.c \ $(SRCDIR)/undo.c \ $(SRCDIR)/update.c \ $(SRCDIR)/url.c \ $(SRCDIR)/user.c \ $(SRCDIR)/verify.c \ $(SRCDIR)/vfile.c \ $(SRCDIR)/wiki.c \ $(SRCDIR)/wikiformat.c \ $(SRCDIR)/winhttp.c \ $(SRCDIR)/wysiwyg.c \ $(SRCDIR)/xfer.c \ | > | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | $(SRCDIR)/timeline.c \ $(SRCDIR)/tkt.c \ $(SRCDIR)/tktsetup.c \ $(SRCDIR)/undo.c \ $(SRCDIR)/update.c \ $(SRCDIR)/url.c \ $(SRCDIR)/user.c \ $(SRCDIR)/utf8.c \ $(SRCDIR)/verify.c \ $(SRCDIR)/vfile.c \ $(SRCDIR)/wiki.c \ $(SRCDIR)/wikiformat.c \ $(SRCDIR)/winhttp.c \ $(SRCDIR)/wysiwyg.c \ $(SRCDIR)/xfer.c \ |
| ︙ | ︙ | |||
201 202 203 204 205 206 207 208 209 210 211 212 213 214 | $(OBJDIR)/timeline_.c \ $(OBJDIR)/tkt_.c \ $(OBJDIR)/tktsetup_.c \ $(OBJDIR)/undo_.c \ $(OBJDIR)/update_.c \ $(OBJDIR)/url_.c \ $(OBJDIR)/user_.c \ $(OBJDIR)/verify_.c \ $(OBJDIR)/vfile_.c \ $(OBJDIR)/wiki_.c \ $(OBJDIR)/wikiformat_.c \ $(OBJDIR)/winhttp_.c \ $(OBJDIR)/wysiwyg_.c \ $(OBJDIR)/xfer_.c \ | > | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | $(OBJDIR)/timeline_.c \ $(OBJDIR)/tkt_.c \ $(OBJDIR)/tktsetup_.c \ $(OBJDIR)/undo_.c \ $(OBJDIR)/update_.c \ $(OBJDIR)/url_.c \ $(OBJDIR)/user_.c \ $(OBJDIR)/utf8_.c \ $(OBJDIR)/verify_.c \ $(OBJDIR)/vfile_.c \ $(OBJDIR)/wiki_.c \ $(OBJDIR)/wikiformat_.c \ $(OBJDIR)/winhttp_.c \ $(OBJDIR)/wysiwyg_.c \ $(OBJDIR)/xfer_.c \ |
| ︙ | ︙ | |||
302 303 304 305 306 307 308 309 310 311 312 313 314 315 | $(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 \ | > | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | $(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 \ |
| ︙ | ︙ | |||
379 380 381 382 383 384 385 | clean: rm -rf $(OBJDIR)/* $(APPNAME) $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex $(OBJDIR)/mkindex $(TRANS_SRC) >$@ $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h | | | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | clean: rm -rf $(OBJDIR)/* $(APPNAME) $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex $(OBJDIR)/mkindex $(TRANS_SRC) >$@ $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h $(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 touch $(OBJDIR)/headers $(OBJDIR)/headers: Makefile $(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 Makefile: $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/add.c >$(OBJDIR)/add_.c |
| ︙ | ︙ | |||
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 | $(OBJDIR)/user_.c: $(SRCDIR)/user.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/user.c >$(OBJDIR)/user_.c $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c $(OBJDIR)/user.h: $(OBJDIR)/headers $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c $(OBJDIR)/verify.h: $(OBJDIR)/headers | > > > > > > > | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 | $(OBJDIR)/user_.c: $(SRCDIR)/user.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/user.c >$(OBJDIR)/user_.c $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c $(OBJDIR)/user.h: $(OBJDIR)/headers $(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c $(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h: $(OBJDIR)/headers $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c $(OBJDIR)/verify.h: $(OBJDIR)/headers |
| ︙ | ︙ |
Changes to src/makemake.tcl.
| ︙ | ︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 | tktsetup undo update url user verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip | > | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | tktsetup undo update url user verify vfile utf8 wiki wikiformat winhttp wysiwyg xfer xfersetup zip |
| ︙ | ︙ |
Changes to src/printf.c.
| ︙ | ︙ | |||
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 |
}
void fossil_error_reset(void){
free(g.zErrMsg);
g.zErrMsg = 0;
g.iErrPriority = 0;
}
/*
** Write to standard output or standard error.
**
** On windows, transform the output into the current terminal encoding
** if the output is going to the screen. If output is redirected into
** a file, no translation occurs. No translation ever occurs on unix.
*/
void fossil_puts(const char *z, int toStdErr){
#if defined(_WIN32)
| > > > > > > > > > > > | | > > > > > > > > | 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 |
}
void fossil_error_reset(void){
free(g.zErrMsg);
g.zErrMsg = 0;
g.iErrPriority = 0;
}
/* True if the last character standard output cursor is setting at
** the beginning of a blank link. False if a \r has been to move the
** cursor to the beginning of the line or if not at the beginning of
** a line.
** was a \n
*/
static int stdoutAtBOL = 1;
/*
** Write to standard output or standard error.
**
** On windows, transform the output into the current terminal encoding
** if the output is going to the screen. If output is redirected into
** a file, no translation occurs. No translation ever occurs on unix.
*/
void fossil_puts(const char *z, int toStdErr){
int n = (int)strlen(z);
if( n==0 ) return;
if( toStdErr==0 ) stdoutAtBOL = (z[n-1]=='\n');
#if defined(_WIN32)
if( fossil_utf8_to_console(z, n, toStdErr) >= 0 ){
return;
}
#endif
assert( toStdErr==0 || toStdErr==1 );
fwrite(z, 1, n, toStdErr ? stderr : stdout);
fflush(toStdErr ? stderr : stdout);
}
/*
** Force the the standard output cursor to move to the beginning
** of a line, if it is not there already.
*/
void fossil_force_newline(void){
if( g.cgiOutput==0 && stdoutAtBOL==0 ) fossil_puts("\n", 0);
}
/*
** Write output for user consumption. If g.cgiOutput is enabled, then
** send the output as part of the CGI reply. If g.cgiOutput is false,
** then write on standard output.
*/
void fossil_print(const char *zFormat, ...){
|
| ︙ | ︙ |
Changes to src/rebuild.c.
| ︙ | ︙ | |||
843 844 845 846 847 848 849 |
char *zSubpath;
if( pEntry->d_name[0]=='.' ){
continue;
}
zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
| | | 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 |
char *zSubpath;
if( pEntry->d_name[0]=='.' ){
continue;
}
zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
fossil_filename_free(zUtf8Name);
if( file_isdir(zSubpath)==1 ){
recon_read_dir(zSubpath);
}
blob_init(&path, 0, 0);
blob_appendf(&path, "%s", zSubpath);
if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
fossil_panic("some unknown error occurred while reading \"%s\"",
|
| ︙ | ︙ | |||
865 866 867 868 869 870 871 |
fflush(stdout);
}
closedir(d);
}else {
fossil_panic("encountered error %d while trying to open \"%s\".",
errno, g.argv[3]);
}
| | | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 |
fflush(stdout);
}
closedir(d);
}else {
fossil_panic("encountered error %d while trying to open \"%s\".",
errno, g.argv[3]);
}
fossil_filename_free(zUnicodePath);
}
/*
** COMMAND: reconstruct*
**
** Usage: %fossil reconstruct FILENAME DIRECTORY
**
|
| ︙ | ︙ |
Changes to src/user.c.
| ︙ | ︙ | |||
130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
/*
** Prompt the user to enter a single line of text.
*/
void prompt_user(const char *zPrompt, Blob *pIn){
char *z;
char zLine[1000];
blob_zero(pIn);
fossil_print("%s", zPrompt);
fflush(stdout);
z = fgets(zLine, sizeof(zLine), stdin);
if( z ){
strip_string(pIn, z);
}
}
| > | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
/*
** Prompt the user to enter a single line of text.
*/
void prompt_user(const char *zPrompt, Blob *pIn){
char *z;
char zLine[1000];
blob_zero(pIn);
fossil_force_newline();
fossil_print("%s", zPrompt);
fflush(stdout);
z = fgets(zLine, sizeof(zLine), stdin);
if( z ){
strip_string(pIn, z);
}
}
|
| ︙ | ︙ |
Added src/utf8.c.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
/*
** Copyright (c) 2012 D. Richard Hipp
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the Simplified BSD License (also
** known as the "2-Clause License" or "FreeBSD License".)
** This program is distributed in the hope that it will be useful,
** but without any warranty; without even the implied warranty of
** merchantability or fitness for a particular purpose.
**
** Author contact information:
** drh@hwaci.com
** http://www.hwaci.com/drh/
**
*******************************************************************************
**
** This file contains utilities for converting text between UTF-8 (which
** is always used internally) and whatever encodings are used by the underlying
** filesystem and operating system.
*/
#include "config.h"
#include "utf8.h"
#include <sqlite3.h>
#ifdef _WIN32
# include <windows.h>
#endif
/*
** Translate MBCS to UTF8. Return a pointer to the translated text.
** Call fossil_mbcs_free() to deallocate any memory used to store the
** returned pointer when done.
*/
char *fossil_mbcs_to_utf8(const char *zMbcs){
#ifdef _WIN32
extern char *sqlite3_win32_mbcs_to_utf8(const char*);
return sqlite3_win32_mbcs_to_utf8(zMbcs);
#else
return (char*)zMbcs; /* No-op on unix */
#endif
}
/*
** After translating from UTF8 to MBCS, invoke this routine to deallocate
** any memory used to hold the translation
*/
void fossil_mbcs_free(char *zOld){
#ifdef _WIN32
sqlite3_free(zOld);
#else
/* No-op on unix */
#endif
}
/*
** Translate Unicode text into UTF8.
** Return a pointer to the translated text.
** Call fossil_unicode_free() to deallocate any memory used to store the
** returned pointer when done.
*/
char *fossil_unicode_to_utf8(const void *zUnicode){
#ifdef _WIN32
int nByte = WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, 0, 0, 0, 0);
char *zUtf = sqlite3_malloc( nByte );
if( zUtf==0 ){
return 0;
}
WideCharToMultiByte(CP_UTF8, 0, zUnicode, -1, zUtf, nByte, 0, 0);
return zUtf;
#else
return (char *)zUnicode; /* No-op on unix */
#endif
}
/*
** Translate UTF8 to unicode for use in system calls. Return a pointer to the
** translated text.. Call fossil_unicode_free() to deallocate any memory
** used to store the returned pointer when done.
*/
void *fossil_utf8_to_unicode(const char *zUtf8){
#ifdef _WIN32
int nByte = MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, 0, 0);
wchar_t *zUnicode = sqlite3_malloc( nByte * 2 );
if( zUnicode==0 ){
return 0;
}
MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, nByte);
return zUnicode;
#else
return (void *)zUtf8; /* No-op on unix */
#endif
}
/*
** Deallocate any memory that was previously allocated by
** fossil_unicode_to_utf8().
*/
void fossil_unicode_free(void *pOld){
#ifdef _WIN32
sqlite3_free(pOld);
#else
/* No-op on unix */
#endif
}
#if defined(__APPLE__)
# include <iconv.h>
#endif
/*
** Translate text from the filename character set into
** to precomposed UTF8. Return a pointer to the translated text.
** Call fossil_filename_free() to deallocate any memory used to store the
** returned pointer when done.
*/
char *fossil_filename_to_utf8(void *zFilename){
#ifdef _WIN32
int nByte;
char *zUtf;
WCHAR *wUnicode = zFilename;
while( *wUnicode != 0 ){
if ( (*wUnicode & 0xFF80) == 0xF000 ){
WCHAR converted = (*wUnicode & 0x7F);
/* Only really convert it when the resulting char is in the given range*/
if ( (converted < 32) || wcschr(L"\"*<>?|:", converted) ){
*wUnicode = converted;
}
}
++wUnicode;
}
nByte = WideCharToMultiByte(CP_UTF8, 0, zFilename, -1, 0, 0, 0, 0);
zUtf = sqlite3_malloc( nByte );
if( zUtf==0 ){
return 0;
}
WideCharToMultiByte(CP_UTF8, 0, zFilename, -1, zUtf, nByte, 0, 0);
return zUtf;
#elif defined(__APPLE__)
char *zOut;
iconv_t cd;
size_t n, x;
const char *zUtf = zFilename1
for(n=0; zUtf[n]>0 && zUtf[n]<=0x7f; n++){}
if( zUtf[n]!=0 && (cd = iconv_open("UTF-8", "UTF-8-MAC"))!=(iconv_t)-1 ){
char *zIn = (char*)zUtf;
char *zOutx;
size_t nIn, nOutx;
nIn = n = strlen(zUtf);
nOutx = nIn+100;
zOutx = zOut = fossil_malloc( nOutx+1 );
x = iconv(cd, &zIn, &nIn, &zOutx, &nOutx);
if( x==(size_t)-1 ){
fossil_free(zOut);
zOut = fossil_strdup(zUtf);
}else{
zOut[n+100-nOutx] = 0;
}
iconv_close(cd);
}else{
zOut = fossil_strdup(zUtf);
}
return zOut;
#elif defined(__APPLE__)
return fossil_strdup(zFilename);
#else
return (char *)zFilename; /* No-op on non-mac unix */
#endif
}
/*
** Translate UTF8 to unicode for use in filename translations.
** Return a pointer to the translated text.. Call fossil_filename_free()
** to deallocate any memory used to store the returned pointer when done.
**
** On Windows, characters in the range U+0001 to U+0031 and the
** characters '"', '*', ':', '<', '>', '?', '|' and '\\' are invalid
** to be used. Therefore, translated those to characters in the
** (private use area), in the range U+F001 - U+F07F, so those
** characters never arrive in any Windows API. The filenames might
** look strange in Windows explorer, but in the cygwin shell
** everything looks as expected.
**
** See: <http://cygwin.com/cygwin-ug-net/using-specialnames.html>
**
*/
void *fossil_utf8_to_filename(const char *zUtf8){
#ifdef _WIN32
WCHAR *zUnicode = fossil_utf8_to_unicode(zUtf8);
WCHAR *wUnicode = zUnicode;
/* If path starts with "<drive>:/" or "<drive>:\", don't translate the ':' */
if( fossil_isalpha(zUtf8[0]) && zUtf8[1]==':'
&& (zUtf8[2]=='\\' || zUtf8[2]=='/')) {
wUnicode += 3;
}
while( *wUnicode != '\0' ){
if ( (*wUnicode < 32) || wcschr(L"\"*<>?|:", *wUnicode) ){
*wUnicode |= 0xF000;
}
++wUnicode;
}
return zUnicode;
#else
return (void *)zUtf8; /* No-op on unix */
#endif
}
/*
** Deallocate any memory that was previously allocated by
** fossil_filename_to_utf8() or fossil_utf8_to_filename().
*/
void fossil_filename_free(void *pOld){
#if defined(_WIN32)
sqlite3_free(pOld);
#elif defined(__APPLE__)
fossil_free(pOld);
#else
/* No-op on all other unix */
#endif
}
/*
** Display UTF8 on the console. Return the number of
** Characters written. If stdout or stderr is redirected
** to a file, -1 is returned and nothing is written
** to the console.
*/
int fossil_utf8_to_console(const char *zUtf8, int nByte, int toStdErr){
#ifdef _WIN32
int nChar;
wchar_t *zUnicode; /* Unicode version of zUtf8 */
DWORD dummy;
static int istty[2] = { -1, -1 };
if( istty[toStdErr] == -1 ){
istty[toStdErr] = _isatty(toStdErr + 1) != 0;
}
if( !istty[toStdErr] ){
/* stdout/stderr is not a console. */
return -1;
}
nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, NULL, 0);
zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) );
if( zUnicode==0 ){
return 0;
}
nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, nByte, zUnicode, nChar);
if( nChar==0 ){
free(zUnicode);
return 0;
}
zUnicode[nChar] = '\0';
WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE - toStdErr), zUnicode, nChar,
&dummy, 0);
return nChar;
#else
return -1; /* No-op on unix */
#endif
}
|
Changes to src/vfile.c.
| ︙ | ︙ | |||
438 439 440 441 442 443 444 | DIR *d; int origSize; const char *zDir; struct dirent *pEntry; int skipAll = 0; static Stmt ins; static int depth = 0; | | | | | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
DIR *d;
int origSize;
const char *zDir;
struct dirent *pEntry;
int skipAll = 0;
static Stmt ins;
static int depth = 0;
void *zNative;
origSize = blob_size(pPath);
if( pIgnore ){
blob_appendf(pPath, "/");
if( glob_match(pIgnore, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1;
blob_resize(pPath, origSize);
}
if( skipAll ) return;
if( depth==0 ){
db_prepare(&ins,
"INSERT OR IGNORE INTO sfile(x) SELECT :file"
" WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE pathname=:file)"
);
}
depth++;
zDir = blob_str(pPath);
zNative = fossil_utf8_to_filename(zDir);
d = opendir(zNative);
if( d ){
while( (pEntry=readdir(d))!=0 ){
char *zPath;
char *zUtf8;
if( pEntry->d_name[0]=='.' ){
if( (scanFlags & SCAN_ALL)==0 ) continue;
if( pEntry->d_name[1]==0 ) continue;
|
| ︙ | ︙ | |||
484 485 486 487 488 489 490 |
}else if( file_wd_isfile_or_link(zPath) ){
if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
db_step(&ins);
db_reset(&ins);
}
}
| | | | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
}else if( file_wd_isfile_or_link(zPath) ){
if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
db_step(&ins);
db_reset(&ins);
}
}
fossil_filename_free(zUtf8);
blob_resize(pPath, origSize);
}
closedir(d);
}
fossil_filename_free(zNative);
depth--;
if( depth==0 ){
db_finalize(&ins);
}
}
|
| ︙ | ︙ |
Changes to src/winhttp.c.
| ︙ | ︙ | |||
260 261 262 263 264 265 266 |
*/
static HttpService hsData = {8080, NULL, 0, 0, NULL, INVALID_SOCKET};
static SERVICE_STATUS ssStatus;
static SERVICE_STATUS_HANDLE sshStatusHandle;
/*
** Get message string of the last system error. Return a pointer to the
| | | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
*/
static HttpService hsData = {8080, NULL, 0, 0, NULL, INVALID_SOCKET};
static SERVICE_STATUS ssStatus;
static SERVICE_STATUS_HANDLE sshStatusHandle;
/*
** Get message string of the last system error. Return a pointer to the
** message string. Call fossil_unicode_free() to deallocate any memory used
** to store the message string when done.
*/
static char *win32_get_last_errmsg(void){
DWORD nMsg;
DWORD nErr = GetLastError();
LPWSTR tmp = NULL;
char *zMsg = NULL;
|
| ︙ | ︙ |
Changes to src/xfer.c.
| ︙ | ︙ | |||
1690 1691 1692 1693 1694 1695 1696 |
if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){
char *zMsg = blob_terminate(&xfer.aToken[1]);
defossilize(zMsg);
if( (syncFlags & SYNC_PUSH) && zMsg && strglob("pull only *", zMsg) ){
syncFlags &= ~SYNC_PUSH;
zMsg = 0;
}
| > | | 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 |
if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){
char *zMsg = blob_terminate(&xfer.aToken[1]);
defossilize(zMsg);
if( (syncFlags & SYNC_PUSH) && zMsg && strglob("pull only *", zMsg) ){
syncFlags &= ~SYNC_PUSH;
zMsg = 0;
}
fossil_force_newline();
fossil_print("Server says: %s\n", zMsg);
}else
/* pragma NAME VALUE...
**
** The server can send pragmas to try to convey meta-information to
** the client. These are informational only. Unknown pragmas are
** silently ignored.
|
| ︙ | ︙ | |||
1802 1803 1804 1805 1806 1807 1808 |
** we have gone at least two rounds. Always go at least two rounds
** on a clone in order to be sure to retrieve the configuration
** information which is only sent on the second round.
*/
if( cloneSeqno<=0 && nCycle>1 ) go = 0;
};
transport_stats(&nSent, &nRcvd, 1);
| | | 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 |
** we have gone at least two rounds. Always go at least two rounds
** on a clone in order to be sure to retrieve the configuration
** information which is only sent on the second round.
*/
if( cloneSeqno<=0 && nCycle>1 ) go = 0;
};
transport_stats(&nSent, &nRcvd, 1);
fossil_force_newline();
fossil_print(
"%s finished with %lld bytes sent, %lld bytes received\n",
zOpType, nSent, nRcvd);
transport_close();
transport_global_shutdown();
db_multi_exec("DROP TABLE onremote");
manifest_crosslink_end();
content_enable_dephantomize(1);
db_end_transaction(0);
return nErr;
}
|
Changes to win/Makefile.dmc.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 | CFLAGS = -o BCC = $(DMDIR)\bin\dmc $(CFLAGS) TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 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 | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | CFLAGS = -o BCC = $(DMDIR)\bin\dmc $(CFLAGS) TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 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 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 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 RC=$(DMDIR)\bin\rcc RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ APPNAME = $(OBJDIR)\fossil$(E) all: $(APPNAME) $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link cd $(OBJDIR) $(DMDIR)\bin\link @link $(OBJDIR)\fossil.res: $B\win\fossil.rc $(RC) $(RCFLAGS) -o$@ $** $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res +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 > $@ +echo fossil >> $@ +echo fossil >> $@ +echo $(LIBS) >> $@ +echo. >> $@ +echo fossil >> $@ translate$E: $(SRCDIR)\translate.c |
| ︙ | ︙ | |||
647 648 649 650 651 652 653 654 655 656 657 658 659 660 | +translate$E $** > $@ $(OBJDIR)\user$O : user_.c user.h $(TCC) -o$@ -c user_.c user_.c : $(SRCDIR)\user.c +translate$E $** > $@ $(OBJDIR)\verify$O : verify_.c verify.h $(TCC) -o$@ -c verify_.c verify_.c : $(SRCDIR)\verify.c +translate$E $** > $@ | > > > > > > | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | +translate$E $** > $@ $(OBJDIR)\user$O : user_.c user.h $(TCC) -o$@ -c user_.c user_.c : $(SRCDIR)\user.c +translate$E $** > $@ $(OBJDIR)\utf8$O : utf8_.c utf8.h $(TCC) -o$@ -c utf8_.c utf8_.c : $(SRCDIR)\utf8.c +translate$E $** > $@ $(OBJDIR)\verify$O : verify_.c verify.h $(TCC) -o$@ -c verify_.c verify_.c : $(SRCDIR)\verify.c +translate$E $** > $@ |
| ︙ | ︙ | |||
703 704 705 706 707 708 709 | $(OBJDIR)\zip$O : zip_.c zip.h $(TCC) -o$@ -c zip_.c zip_.c : $(SRCDIR)\zip.c +translate$E $** > $@ headers: makeheaders$E page_index.h VERSION.h | | | 709 710 711 712 713 714 715 716 717 | $(OBJDIR)\zip$O : zip_.c zip.h $(TCC) -o$@ -c zip_.c zip_.c : $(SRCDIR)\zip.c +translate$E $** > $@ headers: makeheaders$E page_index.h VERSION.h +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 @copy /Y nul: headers |
Changes to win/Makefile.mingw.
| ︙ | ︙ | |||
11 12 13 14 15 16 17 | # This is a makefile for use on Windows/Linux/Darwin/Cygwin using MinGW or # MinGW-w64. # #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. # By default, this is an empty string (i.e. use the native compiler). # | | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # This is a makefile for use on Windows/Linux/Darwin/Cygwin using MinGW or # MinGW-w64. # #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. # By default, this is an empty string (i.e. use the native compiler). # # PREFIX = # PREFIX = mingw32- # PREFIX = i686-pc-mingw32- PREFIX = i686-w64-mingw32- # PREFIX = x86_64-w64-mingw32- #### The toplevel directory of the source tree. Fossil can be built # in a directory that is separate from the source tree. Just change # the following to point from the build directory to the src/ folder. # SRCDIR = src |
| ︙ | ︙ | |||
205 206 207 208 209 210 211 | else LIB += -lkernel32 -lws2_32 endif #### Tcl shell for use in running the fossil test suite. This is only # used for testing. # | | | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | else LIB += -lkernel32 -lws2_32 endif #### Tcl shell for use in running the fossil test suite. This is only # used for testing. # TCLSH = tclsh86 #### Nullsoft installer MakeNSIS location # MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" #### Include a configuration file that can override any one of these settings. # |
| ︙ | ︙ | |||
311 312 313 314 315 316 317 318 319 320 321 322 323 324 | $(SRCDIR)/timeline.c \ $(SRCDIR)/tkt.c \ $(SRCDIR)/tktsetup.c \ $(SRCDIR)/undo.c \ $(SRCDIR)/update.c \ $(SRCDIR)/url.c \ $(SRCDIR)/user.c \ $(SRCDIR)/verify.c \ $(SRCDIR)/vfile.c \ $(SRCDIR)/wiki.c \ $(SRCDIR)/wikiformat.c \ $(SRCDIR)/winhttp.c \ $(SRCDIR)/wysiwyg.c \ $(SRCDIR)/xfer.c \ | > | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | $(SRCDIR)/timeline.c \ $(SRCDIR)/tkt.c \ $(SRCDIR)/tktsetup.c \ $(SRCDIR)/undo.c \ $(SRCDIR)/update.c \ $(SRCDIR)/url.c \ $(SRCDIR)/user.c \ $(SRCDIR)/utf8.c \ $(SRCDIR)/verify.c \ $(SRCDIR)/vfile.c \ $(SRCDIR)/wiki.c \ $(SRCDIR)/wikiformat.c \ $(SRCDIR)/winhttp.c \ $(SRCDIR)/wysiwyg.c \ $(SRCDIR)/xfer.c \ |
| ︙ | ︙ | |||
412 413 414 415 416 417 418 419 420 421 422 423 424 425 | $(OBJDIR)/timeline_.c \ $(OBJDIR)/tkt_.c \ $(OBJDIR)/tktsetup_.c \ $(OBJDIR)/undo_.c \ $(OBJDIR)/update_.c \ $(OBJDIR)/url_.c \ $(OBJDIR)/user_.c \ $(OBJDIR)/verify_.c \ $(OBJDIR)/vfile_.c \ $(OBJDIR)/wiki_.c \ $(OBJDIR)/wikiformat_.c \ $(OBJDIR)/winhttp_.c \ $(OBJDIR)/wysiwyg_.c \ $(OBJDIR)/xfer_.c \ | > | 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | $(OBJDIR)/timeline_.c \ $(OBJDIR)/tkt_.c \ $(OBJDIR)/tktsetup_.c \ $(OBJDIR)/undo_.c \ $(OBJDIR)/update_.c \ $(OBJDIR)/url_.c \ $(OBJDIR)/user_.c \ $(OBJDIR)/utf8_.c \ $(OBJDIR)/verify_.c \ $(OBJDIR)/vfile_.c \ $(OBJDIR)/wiki_.c \ $(OBJDIR)/wikiformat_.c \ $(OBJDIR)/winhttp_.c \ $(OBJDIR)/wysiwyg_.c \ $(OBJDIR)/xfer_.c \ |
| ︙ | ︙ | |||
513 514 515 516 517 518 519 520 521 522 523 524 525 526 | $(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 \ | > | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | $(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 \ |
| ︙ | ︙ | |||
637 638 639 640 641 642 643 | setup: $(OBJDIR) $(APPNAME) $(MAKENSIS) ./fossil.nsi $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex $(MKINDEX) $(TRANS_SRC) >$@ $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h | | | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | setup: $(OBJDIR) $(APPNAME) $(MAKENSIS) ./fossil.nsi $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex $(MKINDEX) $(TRANS_SRC) >$@ $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h $(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 echo Done >$(OBJDIR)/headers $(OBJDIR)/headers: Makefile Makefile: $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| ︙ | ︙ | |||
1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | $(OBJDIR)/user_.c: $(SRCDIR)/user.c $(OBJDIR)/translate $(TRANSLATE) $(SRCDIR)/user.c >$(OBJDIR)/user_.c $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c $(OBJDIR)/user.h: $(OBJDIR)/headers $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c | > > > > > > > > | 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 | $(OBJDIR)/user_.c: $(SRCDIR)/user.c $(OBJDIR)/translate $(TRANSLATE) $(SRCDIR)/user.c >$(OBJDIR)/user_.c $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c $(OBJDIR)/user.h: $(OBJDIR)/headers $(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate $(TRANSLATE) $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c $(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h: $(OBJDIR)/headers $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate $(TRANSLATE) $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c |
| ︙ | ︙ |
Changes to win/Makefile.msc.
| ︙ | ︙ | |||
126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
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 \
| > | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
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 \
|
| ︙ | ︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
$(OX)\timeline$O \
$(OX)\tkt$O \
$(OX)\tktsetup$O \
$(OX)\undo$O \
$(OX)\update$O \
$(OX)\url$O \
$(OX)\user$O \
$(OX)\verify$O \
$(OX)\vfile$O \
$(OX)\wiki$O \
$(OX)\wikiformat$O \
$(OX)\winhttp$O \
$(OX)\wysiwyg$O \
$(OX)\xfer$O \
| > | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
$(OX)\timeline$O \
$(OX)\tkt$O \
$(OX)\tktsetup$O \
$(OX)\undo$O \
$(OX)\update$O \
$(OX)\url$O \
$(OX)\user$O \
$(OX)\utf8$O \
$(OX)\verify$O \
$(OX)\vfile$O \
$(OX)\wiki$O \
$(OX)\wikiformat$O \
$(OX)\winhttp$O \
$(OX)\wysiwyg$O \
$(OX)\xfer$O \
|
| ︙ | ︙ | |||
347 348 349 350 351 352 353 354 355 356 357 358 359 360 | echo $(OX)\timeline.obj >> $@ echo $(OX)\tkt.obj >> $@ echo $(OX)\tktsetup.obj >> $@ echo $(OX)\undo.obj >> $@ echo $(OX)\update.obj >> $@ echo $(OX)\url.obj >> $@ echo $(OX)\user.obj >> $@ echo $(OX)\verify.obj >> $@ echo $(OX)\vfile.obj >> $@ echo $(OX)\wiki.obj >> $@ echo $(OX)\wikiformat.obj >> $@ echo $(OX)\winhttp.obj >> $@ echo $(OX)\wysiwyg.obj >> $@ echo $(OX)\xfer.obj >> $@ | > | 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | echo $(OX)\timeline.obj >> $@ echo $(OX)\tkt.obj >> $@ echo $(OX)\tktsetup.obj >> $@ echo $(OX)\undo.obj >> $@ echo $(OX)\update.obj >> $@ echo $(OX)\url.obj >> $@ echo $(OX)\user.obj >> $@ echo $(OX)\utf8.obj >> $@ echo $(OX)\verify.obj >> $@ echo $(OX)\vfile.obj >> $@ echo $(OX)\wiki.obj >> $@ echo $(OX)\wikiformat.obj >> $@ echo $(OX)\winhttp.obj >> $@ echo $(OX)\wysiwyg.obj >> $@ echo $(OX)\xfer.obj >> $@ |
| ︙ | ︙ | |||
968 969 970 971 972 973 974 975 976 977 978 979 980 981 | translate$E $** > $@ $(OX)\user$O : user_.c user.h $(TCC) /Fo$@ -c user_.c user_.c : $(SRCDIR)\user.c translate$E $** > $@ $(OX)\verify$O : verify_.c verify.h $(TCC) /Fo$@ -c verify_.c verify_.c : $(SRCDIR)\verify.c translate$E $** > $@ | > > > > > > | 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 | translate$E $** > $@ $(OX)\user$O : user_.c user.h $(TCC) /Fo$@ -c user_.c user_.c : $(SRCDIR)\user.c translate$E $** > $@ $(OX)\utf8$O : utf8_.c utf8.h $(TCC) /Fo$@ -c utf8_.c utf8_.c : $(SRCDIR)\utf8.c translate$E $** > $@ $(OX)\verify$O : verify_.c verify.h $(TCC) /Fo$@ -c verify_.c verify_.c : $(SRCDIR)\verify.c translate$E $** > $@ |
| ︙ | ︙ | |||
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 | 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 \ | > | 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 | 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 \ |
| ︙ | ︙ |