Fossil SCM
const-qualification
Commit
645f34834d2ebc8e6d6ead2341a7740a0a2f8a91
Parent
5d9f57a72104ffb…
21 files changed
+3
-3
+1
-1
+2
-2
+2
-2
+1
-1
+1
-1
+1
-1
+2
-2
+1
-1
+4
-4
+2
-2
+2
-2
+1
-1
+3
-3
+1
-1
+1
-1
+1
-1
+10
-9
+1
-1
+1
-1
+4
-6
~
src/add.c
~
src/allrepo.c
~
src/captcha.c
~
src/cgi.c
~
src/checkout.c
~
src/clearsign.c
~
src/diff.c
~
src/diffcmd.c
~
src/http_socket.c
~
src/main.c
~
src/makeheaders.c
~
src/rebuild.c
~
src/report.c
~
src/shell.c
~
src/tag.c
~
src/th.c
~
src/timeline.c
~
src/tkt.c
~
src/wiki.c
~
src/xfer.c
~
win/Makefile.mingw
+3
-3
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -39,11 +39,11 @@ | ||
| 39 | 39 | */ |
| 40 | 40 | const char *fossil_reserved_name(int N){ |
| 41 | 41 | /* Possible names of the local per-checkout database file and |
| 42 | 42 | ** its associated journals |
| 43 | 43 | */ |
| 44 | - static const char *azName[] = { | |
| 44 | + static const char *const azName[] = { | |
| 45 | 45 | "_FOSSIL_", |
| 46 | 46 | "_FOSSIL_-journal", |
| 47 | 47 | "_FOSSIL_-wal", |
| 48 | 48 | "_FOSSIL_-shm", |
| 49 | 49 | ".fslckout", |
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | 63 | /* Names of auxiliary files generated by SQLite when the "manifest" |
| 64 | 64 | ** properity is enabled |
| 65 | 65 | */ |
| 66 | - static const char *azManifest[] = { | |
| 66 | + static const char *const azManifest[] = { | |
| 67 | 67 | "manifest", |
| 68 | 68 | "manifest.uuid", |
| 69 | 69 | }; |
| 70 | 70 | |
| 71 | 71 | /* Cached setting "manifest" */ |
| @@ -531,11 +531,11 @@ | ||
| 531 | 531 | ** See also: changes, status |
| 532 | 532 | */ |
| 533 | 533 | void mv_cmd(void){ |
| 534 | 534 | int i; |
| 535 | 535 | int vid; |
| 536 | - char *zDest; | |
| 536 | + const char *zDest; | |
| 537 | 537 | Blob dest; |
| 538 | 538 | Stmt q; |
| 539 | 539 | |
| 540 | 540 | db_must_be_within_tree(); |
| 541 | 541 | vid = db_lget_int("checkout", 0); |
| 542 | 542 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -39,11 +39,11 @@ | |
| 39 | */ |
| 40 | const char *fossil_reserved_name(int N){ |
| 41 | /* Possible names of the local per-checkout database file and |
| 42 | ** its associated journals |
| 43 | */ |
| 44 | static const char *azName[] = { |
| 45 | "_FOSSIL_", |
| 46 | "_FOSSIL_-journal", |
| 47 | "_FOSSIL_-wal", |
| 48 | "_FOSSIL_-shm", |
| 49 | ".fslckout", |
| @@ -61,11 +61,11 @@ | |
| 61 | }; |
| 62 | |
| 63 | /* Names of auxiliary files generated by SQLite when the "manifest" |
| 64 | ** properity is enabled |
| 65 | */ |
| 66 | static const char *azManifest[] = { |
| 67 | "manifest", |
| 68 | "manifest.uuid", |
| 69 | }; |
| 70 | |
| 71 | /* Cached setting "manifest" */ |
| @@ -531,11 +531,11 @@ | |
| 531 | ** See also: changes, status |
| 532 | */ |
| 533 | void mv_cmd(void){ |
| 534 | int i; |
| 535 | int vid; |
| 536 | char *zDest; |
| 537 | Blob dest; |
| 538 | Stmt q; |
| 539 | |
| 540 | db_must_be_within_tree(); |
| 541 | vid = db_lget_int("checkout", 0); |
| 542 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -39,11 +39,11 @@ | |
| 39 | */ |
| 40 | const char *fossil_reserved_name(int N){ |
| 41 | /* Possible names of the local per-checkout database file and |
| 42 | ** its associated journals |
| 43 | */ |
| 44 | static const char *const azName[] = { |
| 45 | "_FOSSIL_", |
| 46 | "_FOSSIL_-journal", |
| 47 | "_FOSSIL_-wal", |
| 48 | "_FOSSIL_-shm", |
| 49 | ".fslckout", |
| @@ -61,11 +61,11 @@ | |
| 61 | }; |
| 62 | |
| 63 | /* Names of auxiliary files generated by SQLite when the "manifest" |
| 64 | ** properity is enabled |
| 65 | */ |
| 66 | static const char *const azManifest[] = { |
| 67 | "manifest", |
| 68 | "manifest.uuid", |
| 69 | }; |
| 70 | |
| 71 | /* Cached setting "manifest" */ |
| @@ -531,11 +531,11 @@ | |
| 531 | ** See also: changes, status |
| 532 | */ |
| 533 | void mv_cmd(void){ |
| 534 | int i; |
| 535 | int vid; |
| 536 | const char *zDest; |
| 537 | Blob dest; |
| 538 | Stmt q; |
| 539 | |
| 540 | db_must_be_within_tree(); |
| 541 | vid = db_lget_int("checkout", 0); |
| 542 |
+1
-1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -199,11 +199,11 @@ | ||
| 199 | 199 | /* If any repositories whose names appear in the ~/.fossil file could not |
| 200 | 200 | ** be found, remove those names from the ~/.fossil file. |
| 201 | 201 | */ |
| 202 | 202 | if( bag_count(&outOfDate)>0 ){ |
| 203 | 203 | Blob sql; |
| 204 | - char *zSep = "("; | |
| 204 | + const char *zSep = "("; | |
| 205 | 205 | int rowid; |
| 206 | 206 | blob_zero(&sql); |
| 207 | 207 | blob_appendf(&sql, "DELETE FROM global_config WHERE rowid IN "); |
| 208 | 208 | for(rowid=bag_first(&outOfDate); rowid>0; rowid=bag_next(&outOfDate,rowid)){ |
| 209 | 209 | blob_appendf(&sql, "%s%d", zSep, rowid); |
| 210 | 210 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -199,11 +199,11 @@ | |
| 199 | /* If any repositories whose names appear in the ~/.fossil file could not |
| 200 | ** be found, remove those names from the ~/.fossil file. |
| 201 | */ |
| 202 | if( bag_count(&outOfDate)>0 ){ |
| 203 | Blob sql; |
| 204 | char *zSep = "("; |
| 205 | int rowid; |
| 206 | blob_zero(&sql); |
| 207 | blob_appendf(&sql, "DELETE FROM global_config WHERE rowid IN "); |
| 208 | for(rowid=bag_first(&outOfDate); rowid>0; rowid=bag_next(&outOfDate,rowid)){ |
| 209 | blob_appendf(&sql, "%s%d", zSep, rowid); |
| 210 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -199,11 +199,11 @@ | |
| 199 | /* If any repositories whose names appear in the ~/.fossil file could not |
| 200 | ** be found, remove those names from the ~/.fossil file. |
| 201 | */ |
| 202 | if( bag_count(&outOfDate)>0 ){ |
| 203 | Blob sql; |
| 204 | const char *zSep = "("; |
| 205 | int rowid; |
| 206 | blob_zero(&sql); |
| 207 | blob_appendf(&sql, "DELETE FROM global_config WHERE rowid IN "); |
| 208 | for(rowid=bag_first(&outOfDate); rowid>0; rowid=bag_next(&outOfDate,rowid)){ |
| 209 | blob_appendf(&sql, "%s%d", zSep, rowid); |
| 210 |
+2
-2
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -98,11 +98,11 @@ | ||
| 98 | 98 | } |
| 99 | 99 | #endif /* CAPTCHA==1 */ |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | #if CAPTCHA==2 |
| 103 | -static const char *azFont2[] = { | |
| 103 | +static const char *const azFont2[] = { | |
| 104 | 104 | /* 0 */ |
| 105 | 105 | " __ ", |
| 106 | 106 | " / \\ ", |
| 107 | 107 | "| () |", |
| 108 | 108 | " \\__/ ", |
| @@ -223,11 +223,11 @@ | ||
| 223 | 223 | return z; |
| 224 | 224 | } |
| 225 | 225 | #endif /* CAPTCHA==2 */ |
| 226 | 226 | |
| 227 | 227 | #if CAPTCHA==3 |
| 228 | -static const char *azFont3[] = { | |
| 228 | +static const char *const azFont3[] = { | |
| 229 | 229 | /* 0 */ |
| 230 | 230 | " ___ ", |
| 231 | 231 | " / _ \\ ", |
| 232 | 232 | "| | | |", |
| 233 | 233 | "| | | |", |
| 234 | 234 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -98,11 +98,11 @@ | |
| 98 | } |
| 99 | #endif /* CAPTCHA==1 */ |
| 100 | |
| 101 | |
| 102 | #if CAPTCHA==2 |
| 103 | static const char *azFont2[] = { |
| 104 | /* 0 */ |
| 105 | " __ ", |
| 106 | " / \\ ", |
| 107 | "| () |", |
| 108 | " \\__/ ", |
| @@ -223,11 +223,11 @@ | |
| 223 | return z; |
| 224 | } |
| 225 | #endif /* CAPTCHA==2 */ |
| 226 | |
| 227 | #if CAPTCHA==3 |
| 228 | static const char *azFont3[] = { |
| 229 | /* 0 */ |
| 230 | " ___ ", |
| 231 | " / _ \\ ", |
| 232 | "| | | |", |
| 233 | "| | | |", |
| 234 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -98,11 +98,11 @@ | |
| 98 | } |
| 99 | #endif /* CAPTCHA==1 */ |
| 100 | |
| 101 | |
| 102 | #if CAPTCHA==2 |
| 103 | static const char *const azFont2[] = { |
| 104 | /* 0 */ |
| 105 | " __ ", |
| 106 | " / \\ ", |
| 107 | "| () |", |
| 108 | " \\__/ ", |
| @@ -223,11 +223,11 @@ | |
| 223 | return z; |
| 224 | } |
| 225 | #endif /* CAPTCHA==2 */ |
| 226 | |
| 227 | #if CAPTCHA==3 |
| 228 | static const char *const azFont3[] = { |
| 229 | /* 0 */ |
| 230 | " ___ ", |
| 231 | " / _ \\ ", |
| 232 | "| | | |", |
| 233 | "| | | |", |
| 234 |
+2
-2
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1355,13 +1355,13 @@ | ||
| 1355 | 1355 | |
| 1356 | 1356 | |
| 1357 | 1357 | /* |
| 1358 | 1358 | ** Name of days and months. |
| 1359 | 1359 | */ |
| 1360 | -static const char *azDays[] = | |
| 1360 | +static const char *const azDays[] = | |
| 1361 | 1361 | {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0}; |
| 1362 | -static const char *azMonths[] = | |
| 1362 | +static const char *const azMonths[] = | |
| 1363 | 1363 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1364 | 1364 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1365 | 1365 | |
| 1366 | 1366 | |
| 1367 | 1367 | /* |
| 1368 | 1368 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1355,13 +1355,13 @@ | |
| 1355 | |
| 1356 | |
| 1357 | /* |
| 1358 | ** Name of days and months. |
| 1359 | */ |
| 1360 | static const char *azDays[] = |
| 1361 | {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0}; |
| 1362 | static const char *azMonths[] = |
| 1363 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1364 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1365 | |
| 1366 | |
| 1367 | /* |
| 1368 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1355,13 +1355,13 @@ | |
| 1355 | |
| 1356 | |
| 1357 | /* |
| 1358 | ** Name of days and months. |
| 1359 | */ |
| 1360 | static const char *const azDays[] = |
| 1361 | {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0}; |
| 1362 | static const char *const azMonths[] = |
| 1363 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1364 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1365 | |
| 1366 | |
| 1367 | /* |
| 1368 |
+1
-1
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -186,11 +186,11 @@ | ||
| 186 | 186 | */ |
| 187 | 187 | void checkout_cmd(void){ |
| 188 | 188 | int forceFlag; /* Force checkout even if edits exist */ |
| 189 | 189 | int keepFlag; /* Do not change any files on disk */ |
| 190 | 190 | int latestFlag; /* Checkout the latest version */ |
| 191 | - char *zVers; /* Version to checkout */ | |
| 191 | + const char *zVers; /* Version to checkout */ | |
| 192 | 192 | int promptFlag; /* True to prompt before overwriting */ |
| 193 | 193 | int vid, prior; |
| 194 | 194 | Blob cksum1, cksum1b, cksum2; |
| 195 | 195 | |
| 196 | 196 | db_must_be_within_tree(); |
| 197 | 197 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -186,11 +186,11 @@ | |
| 186 | */ |
| 187 | void checkout_cmd(void){ |
| 188 | int forceFlag; /* Force checkout even if edits exist */ |
| 189 | int keepFlag; /* Do not change any files on disk */ |
| 190 | int latestFlag; /* Checkout the latest version */ |
| 191 | char *zVers; /* Version to checkout */ |
| 192 | int promptFlag; /* True to prompt before overwriting */ |
| 193 | int vid, prior; |
| 194 | Blob cksum1, cksum1b, cksum2; |
| 195 | |
| 196 | db_must_be_within_tree(); |
| 197 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -186,11 +186,11 @@ | |
| 186 | */ |
| 187 | void checkout_cmd(void){ |
| 188 | int forceFlag; /* Force checkout even if edits exist */ |
| 189 | int keepFlag; /* Do not change any files on disk */ |
| 190 | int latestFlag; /* Checkout the latest version */ |
| 191 | const char *zVers; /* Version to checkout */ |
| 192 | int promptFlag; /* True to prompt before overwriting */ |
| 193 | int vid, prior; |
| 194 | Blob cksum1, cksum1b, cksum2; |
| 195 | |
| 196 | db_must_be_within_tree(); |
| 197 |
+1
-1
| --- src/clearsign.c | ||
| +++ src/clearsign.c | ||
| @@ -28,11 +28,11 @@ | ||
| 28 | 28 | */ |
| 29 | 29 | int clearsign(Blob *pIn, Blob *pOut){ |
| 30 | 30 | char *zRand; |
| 31 | 31 | char *zIn; |
| 32 | 32 | char *zOut; |
| 33 | - char *zBase = db_get("pgp-command", "gpg --clearsign -o "); | |
| 33 | + const char *zBase = db_get("pgp-command", "gpg --clearsign -o "); | |
| 34 | 34 | char *zCmd; |
| 35 | 35 | int rc; |
| 36 | 36 | if( is_false(zBase) ){ |
| 37 | 37 | return 0; |
| 38 | 38 | } |
| 39 | 39 |
| --- src/clearsign.c | |
| +++ src/clearsign.c | |
| @@ -28,11 +28,11 @@ | |
| 28 | */ |
| 29 | int clearsign(Blob *pIn, Blob *pOut){ |
| 30 | char *zRand; |
| 31 | char *zIn; |
| 32 | char *zOut; |
| 33 | char *zBase = db_get("pgp-command", "gpg --clearsign -o "); |
| 34 | char *zCmd; |
| 35 | int rc; |
| 36 | if( is_false(zBase) ){ |
| 37 | return 0; |
| 38 | } |
| 39 |
| --- src/clearsign.c | |
| +++ src/clearsign.c | |
| @@ -28,11 +28,11 @@ | |
| 28 | */ |
| 29 | int clearsign(Blob *pIn, Blob *pOut){ |
| 30 | char *zRand; |
| 31 | char *zIn; |
| 32 | char *zOut; |
| 33 | const char *zBase = db_get("pgp-command", "gpg --clearsign -o "); |
| 34 | char *zCmd; |
| 35 | int rc; |
| 36 | if( is_false(zBase) ){ |
| 37 | return 0; |
| 38 | } |
| 39 |
+1
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -1649,11 +1649,11 @@ | ||
| 1649 | 1649 | ** being annotated. Do another step of the annotation. Return true |
| 1650 | 1650 | ** if additional annotation is required. zPName is the tag to insert |
| 1651 | 1651 | ** on each line of the file being annotated that was contributed by |
| 1652 | 1652 | ** pParent. Memory to hold zPName is leaked. |
| 1653 | 1653 | */ |
| 1654 | -static int annotation_step(Annotator *p, Blob *pParent, char *zPName){ | |
| 1654 | +static int annotation_step(Annotator *p, Blob *pParent, const char *zPName){ | |
| 1655 | 1655 | int i, j; |
| 1656 | 1656 | int lnTo; |
| 1657 | 1657 | int iPrevLevel; |
| 1658 | 1658 | int iThisLevel; |
| 1659 | 1659 | |
| 1660 | 1660 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1649,11 +1649,11 @@ | |
| 1649 | ** being annotated. Do another step of the annotation. Return true |
| 1650 | ** if additional annotation is required. zPName is the tag to insert |
| 1651 | ** on each line of the file being annotated that was contributed by |
| 1652 | ** pParent. Memory to hold zPName is leaked. |
| 1653 | */ |
| 1654 | static int annotation_step(Annotator *p, Blob *pParent, char *zPName){ |
| 1655 | int i, j; |
| 1656 | int lnTo; |
| 1657 | int iPrevLevel; |
| 1658 | int iThisLevel; |
| 1659 | |
| 1660 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1649,11 +1649,11 @@ | |
| 1649 | ** being annotated. Do another step of the annotation. Return true |
| 1650 | ** if additional annotation is required. zPName is the tag to insert |
| 1651 | ** on each line of the file being annotated that was contributed by |
| 1652 | ** pParent. Memory to hold zPName is leaked. |
| 1653 | */ |
| 1654 | static int annotation_step(Annotator *p, Blob *pParent, const char *zPName){ |
| 1655 | int i, j; |
| 1656 | int lnTo; |
| 1657 | int iPrevLevel; |
| 1658 | int iThisLevel; |
| 1659 | |
| 1660 |
+2
-2
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -287,12 +287,12 @@ | ||
| 287 | 287 | int isDeleted = db_column_int(&q, 1); |
| 288 | 288 | int isChnged = db_column_int(&q,2); |
| 289 | 289 | int isNew = db_column_int(&q,3); |
| 290 | 290 | int srcid = db_column_int(&q, 4); |
| 291 | 291 | int isLink = db_column_int(&q, 5); |
| 292 | - char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); | |
| 293 | - char *zToFree = zFullName; | |
| 292 | + char *zToFree = mprintf("%s%s", g.zLocalRoot, zPathname); | |
| 293 | + const char *zFullName = zToFree; | |
| 294 | 294 | int showDiff = 1; |
| 295 | 295 | if( isDeleted ){ |
| 296 | 296 | fossil_print("DELETED %s\n", zPathname); |
| 297 | 297 | if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; } |
| 298 | 298 | }else if( file_access(zFullName, 0) ){ |
| 299 | 299 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -287,12 +287,12 @@ | |
| 287 | int isDeleted = db_column_int(&q, 1); |
| 288 | int isChnged = db_column_int(&q,2); |
| 289 | int isNew = db_column_int(&q,3); |
| 290 | int srcid = db_column_int(&q, 4); |
| 291 | int isLink = db_column_int(&q, 5); |
| 292 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 293 | char *zToFree = zFullName; |
| 294 | int showDiff = 1; |
| 295 | if( isDeleted ){ |
| 296 | fossil_print("DELETED %s\n", zPathname); |
| 297 | if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; } |
| 298 | }else if( file_access(zFullName, 0) ){ |
| 299 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -287,12 +287,12 @@ | |
| 287 | int isDeleted = db_column_int(&q, 1); |
| 288 | int isChnged = db_column_int(&q,2); |
| 289 | int isNew = db_column_int(&q,3); |
| 290 | int srcid = db_column_int(&q, 4); |
| 291 | int isLink = db_column_int(&q, 5); |
| 292 | char *zToFree = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 293 | const char *zFullName = zToFree; |
| 294 | int showDiff = 1; |
| 295 | if( isDeleted ){ |
| 296 | fossil_print("DELETED %s\n", zPathname); |
| 297 | if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; } |
| 298 | }else if( file_access(zFullName, 0) ){ |
| 299 |
+1
-1
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -66,11 +66,11 @@ | ||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /* |
| 69 | 69 | ** Set the socket error message. |
| 70 | 70 | */ |
| 71 | -void socket_set_errmsg(char *zFormat, ...){ | |
| 71 | +void socket_set_errmsg(const char *zFormat, ...){ | |
| 72 | 72 | va_list ap; |
| 73 | 73 | socket_clear_errmsg(); |
| 74 | 74 | va_start(ap, zFormat); |
| 75 | 75 | socketErrMsg = vmprintf(zFormat, ap); |
| 76 | 76 | va_end(ap); |
| 77 | 77 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -66,11 +66,11 @@ | |
| 66 | } |
| 67 | |
| 68 | /* |
| 69 | ** Set the socket error message. |
| 70 | */ |
| 71 | void socket_set_errmsg(char *zFormat, ...){ |
| 72 | va_list ap; |
| 73 | socket_clear_errmsg(); |
| 74 | va_start(ap, zFormat); |
| 75 | socketErrMsg = vmprintf(zFormat, ap); |
| 76 | va_end(ap); |
| 77 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -66,11 +66,11 @@ | |
| 66 | } |
| 67 | |
| 68 | /* |
| 69 | ** Set the socket error message. |
| 70 | */ |
| 71 | void socket_set_errmsg(const char *zFormat, ...){ |
| 72 | va_list ap; |
| 73 | socket_clear_errmsg(); |
| 74 | va_start(ap, zFormat); |
| 75 | socketErrMsg = vmprintf(zFormat, ap); |
| 76 | va_end(ap); |
| 77 |
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -347,12 +347,12 @@ | ||
| 347 | 347 | Blob file = empty_blob; /* Content of the file */ |
| 348 | 348 | Blob line = empty_blob; /* One line of the file */ |
| 349 | 349 | unsigned int nLine; /* Number of lines in the file*/ |
| 350 | 350 | unsigned int i, j, k; /* Loop counters */ |
| 351 | 351 | int n; /* Number of bytes in one line */ |
| 352 | - char *z; /* General use string pointer */ | |
| 353 | - char **newArgv; /* New expanded g.argv under construction */ | |
| 352 | + char *z; /* General use string pointer */ | |
| 353 | + char **newArgv; /* New expanded g.argv under construction */ | |
| 354 | 354 | char const * zFileName; /* input file name */ |
| 355 | 355 | FILE * zInFile; /* input FILE */ |
| 356 | 356 | int foundBom = -1; /* -1= not searched yet, 0 = no; 1=yes */ |
| 357 | 357 | #ifdef _WIN32 |
| 358 | 358 | wchar_t buf[MAX_PATH]; |
| @@ -1749,11 +1749,11 @@ | ||
| 1749 | 1749 | ** See also: cgi, http, winsrv |
| 1750 | 1750 | */ |
| 1751 | 1751 | void cmd_webserver(void){ |
| 1752 | 1752 | int iPort, mxPort; /* Range of TCP ports allowed */ |
| 1753 | 1753 | const char *zPort; /* Value of the --port option */ |
| 1754 | - char *zBrowser; /* Name of web browser program */ | |
| 1754 | + const char *zBrowser; /* Name of web browser program */ | |
| 1755 | 1755 | char *zBrowserCmd = 0; /* Command to launch the web browser */ |
| 1756 | 1756 | int isUiCmd; /* True if command is "ui", not "server' */ |
| 1757 | 1757 | const char *zNotFound; /* The --notfound option or NULL */ |
| 1758 | 1758 | int flags = 0; /* Server flags */ |
| 1759 | 1759 | |
| @@ -1786,11 +1786,11 @@ | ||
| 1786 | 1786 | /* Unix implementation */ |
| 1787 | 1787 | if( isUiCmd ){ |
| 1788 | 1788 | #if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__) |
| 1789 | 1789 | zBrowser = db_get("web-browser", 0); |
| 1790 | 1790 | if( zBrowser==0 ){ |
| 1791 | - static char *azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" }; | |
| 1791 | + static const char *const azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" }; | |
| 1792 | 1792 | int i; |
| 1793 | 1793 | zBrowser = "echo"; |
| 1794 | 1794 | for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){ |
| 1795 | 1795 | if( binaryOnPath(azBrowserProg[i]) ){ |
| 1796 | 1796 | zBrowser = azBrowserProg[i]; |
| 1797 | 1797 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -347,12 +347,12 @@ | |
| 347 | Blob file = empty_blob; /* Content of the file */ |
| 348 | Blob line = empty_blob; /* One line of the file */ |
| 349 | unsigned int nLine; /* Number of lines in the file*/ |
| 350 | unsigned int i, j, k; /* Loop counters */ |
| 351 | int n; /* Number of bytes in one line */ |
| 352 | char *z; /* General use string pointer */ |
| 353 | char **newArgv; /* New expanded g.argv under construction */ |
| 354 | char const * zFileName; /* input file name */ |
| 355 | FILE * zInFile; /* input FILE */ |
| 356 | int foundBom = -1; /* -1= not searched yet, 0 = no; 1=yes */ |
| 357 | #ifdef _WIN32 |
| 358 | wchar_t buf[MAX_PATH]; |
| @@ -1749,11 +1749,11 @@ | |
| 1749 | ** See also: cgi, http, winsrv |
| 1750 | */ |
| 1751 | void cmd_webserver(void){ |
| 1752 | int iPort, mxPort; /* Range of TCP ports allowed */ |
| 1753 | const char *zPort; /* Value of the --port option */ |
| 1754 | char *zBrowser; /* Name of web browser program */ |
| 1755 | char *zBrowserCmd = 0; /* Command to launch the web browser */ |
| 1756 | int isUiCmd; /* True if command is "ui", not "server' */ |
| 1757 | const char *zNotFound; /* The --notfound option or NULL */ |
| 1758 | int flags = 0; /* Server flags */ |
| 1759 | |
| @@ -1786,11 +1786,11 @@ | |
| 1786 | /* Unix implementation */ |
| 1787 | if( isUiCmd ){ |
| 1788 | #if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__) |
| 1789 | zBrowser = db_get("web-browser", 0); |
| 1790 | if( zBrowser==0 ){ |
| 1791 | static char *azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" }; |
| 1792 | int i; |
| 1793 | zBrowser = "echo"; |
| 1794 | for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){ |
| 1795 | if( binaryOnPath(azBrowserProg[i]) ){ |
| 1796 | zBrowser = azBrowserProg[i]; |
| 1797 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -347,12 +347,12 @@ | |
| 347 | Blob file = empty_blob; /* Content of the file */ |
| 348 | Blob line = empty_blob; /* One line of the file */ |
| 349 | unsigned int nLine; /* Number of lines in the file*/ |
| 350 | unsigned int i, j, k; /* Loop counters */ |
| 351 | int n; /* Number of bytes in one line */ |
| 352 | char *z; /* General use string pointer */ |
| 353 | char **newArgv; /* New expanded g.argv under construction */ |
| 354 | char const * zFileName; /* input file name */ |
| 355 | FILE * zInFile; /* input FILE */ |
| 356 | int foundBom = -1; /* -1= not searched yet, 0 = no; 1=yes */ |
| 357 | #ifdef _WIN32 |
| 358 | wchar_t buf[MAX_PATH]; |
| @@ -1749,11 +1749,11 @@ | |
| 1749 | ** See also: cgi, http, winsrv |
| 1750 | */ |
| 1751 | void cmd_webserver(void){ |
| 1752 | int iPort, mxPort; /* Range of TCP ports allowed */ |
| 1753 | const char *zPort; /* Value of the --port option */ |
| 1754 | const char *zBrowser; /* Name of web browser program */ |
| 1755 | char *zBrowserCmd = 0; /* Command to launch the web browser */ |
| 1756 | int isUiCmd; /* True if command is "ui", not "server' */ |
| 1757 | const char *zNotFound; /* The --notfound option or NULL */ |
| 1758 | int flags = 0; /* Server flags */ |
| 1759 | |
| @@ -1786,11 +1786,11 @@ | |
| 1786 | /* Unix implementation */ |
| 1787 | if( isUiCmd ){ |
| 1788 | #if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__) |
| 1789 | zBrowser = db_get("web-browser", 0); |
| 1790 | if( zBrowser==0 ){ |
| 1791 | static const char *const azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" }; |
| 1792 | int i; |
| 1793 | zBrowser = "echo"; |
| 1794 | for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){ |
| 1795 | if( binaryOnPath(azBrowserProg[i]) ){ |
| 1796 | zBrowser = azBrowserProg[i]; |
| 1797 |
+2
-2
| --- src/makeheaders.c | ||
| +++ src/makeheaders.c | ||
| @@ -1644,11 +1644,11 @@ | ||
| 1644 | 1644 | pLast = pLast->pNext; |
| 1645 | 1645 | for(p=pFirst; p && p!=pLast; p=p->pNext){ |
| 1646 | 1646 | if( p->eType==TT_Id ){ |
| 1647 | 1647 | static IdentTable sReserved; |
| 1648 | 1648 | static int isInit = 0; |
| 1649 | - static char *aWords[] = { "char", "class", | |
| 1649 | + static const char *const aWords[] = { "char", "class", | |
| 1650 | 1650 | "const", "double", "enum", "extern", "EXPORT", "ET_PROC", |
| 1651 | 1651 | "float", "int", "long", |
| 1652 | 1652 | "PRIVATE", "PROTECTED", "PUBLIC", |
| 1653 | 1653 | "register", "static", "struct", "sizeof", "signed", "typedef", |
| 1654 | 1654 | "union", "volatile", "virtual", "void", }; |
| @@ -3253,11 +3253,11 @@ | ||
| 3253 | 3253 | |
| 3254 | 3254 | /* |
| 3255 | 3255 | ** The following text contains a few simple #defines that we want |
| 3256 | 3256 | ** to be available to every file. |
| 3257 | 3257 | */ |
| 3258 | -static char zInit[] = | |
| 3258 | +static const char zInit[] = | |
| 3259 | 3259 | "#define INTERFACE 0\n" |
| 3260 | 3260 | "#define EXPORT_INTERFACE 0\n" |
| 3261 | 3261 | "#define LOCAL_INTERFACE 0\n" |
| 3262 | 3262 | "#define EXPORT\n" |
| 3263 | 3263 | "#define LOCAL static\n" |
| 3264 | 3264 |
| --- src/makeheaders.c | |
| +++ src/makeheaders.c | |
| @@ -1644,11 +1644,11 @@ | |
| 1644 | pLast = pLast->pNext; |
| 1645 | for(p=pFirst; p && p!=pLast; p=p->pNext){ |
| 1646 | if( p->eType==TT_Id ){ |
| 1647 | static IdentTable sReserved; |
| 1648 | static int isInit = 0; |
| 1649 | static char *aWords[] = { "char", "class", |
| 1650 | "const", "double", "enum", "extern", "EXPORT", "ET_PROC", |
| 1651 | "float", "int", "long", |
| 1652 | "PRIVATE", "PROTECTED", "PUBLIC", |
| 1653 | "register", "static", "struct", "sizeof", "signed", "typedef", |
| 1654 | "union", "volatile", "virtual", "void", }; |
| @@ -3253,11 +3253,11 @@ | |
| 3253 | |
| 3254 | /* |
| 3255 | ** The following text contains a few simple #defines that we want |
| 3256 | ** to be available to every file. |
| 3257 | */ |
| 3258 | static char zInit[] = |
| 3259 | "#define INTERFACE 0\n" |
| 3260 | "#define EXPORT_INTERFACE 0\n" |
| 3261 | "#define LOCAL_INTERFACE 0\n" |
| 3262 | "#define EXPORT\n" |
| 3263 | "#define LOCAL static\n" |
| 3264 |
| --- src/makeheaders.c | |
| +++ src/makeheaders.c | |
| @@ -1644,11 +1644,11 @@ | |
| 1644 | pLast = pLast->pNext; |
| 1645 | for(p=pFirst; p && p!=pLast; p=p->pNext){ |
| 1646 | if( p->eType==TT_Id ){ |
| 1647 | static IdentTable sReserved; |
| 1648 | static int isInit = 0; |
| 1649 | static const char *const aWords[] = { "char", "class", |
| 1650 | "const", "double", "enum", "extern", "EXPORT", "ET_PROC", |
| 1651 | "float", "int", "long", |
| 1652 | "PRIVATE", "PROTECTED", "PUBLIC", |
| 1653 | "register", "static", "struct", "sizeof", "signed", "typedef", |
| 1654 | "union", "volatile", "virtual", "void", }; |
| @@ -3253,11 +3253,11 @@ | |
| 3253 | |
| 3254 | /* |
| 3255 | ** The following text contains a few simple #defines that we want |
| 3256 | ** to be available to every file. |
| 3257 | */ |
| 3258 | static const char zInit[] = |
| 3259 | "#define INTERFACE 0\n" |
| 3260 | "#define EXPORT_INTERFACE 0\n" |
| 3261 | "#define LOCAL_INTERFACE 0\n" |
| 3262 | "#define EXPORT\n" |
| 3263 | "#define LOCAL static\n" |
| 3264 |
+2
-2
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -608,11 +608,11 @@ | ||
| 608 | 608 | if( activateWal ){ |
| 609 | 609 | db_multi_exec("PRAGMA journal_mode=WAL;"); |
| 610 | 610 | } |
| 611 | 611 | } |
| 612 | 612 | if( showStats ){ |
| 613 | - static struct { int idx; const char *zLabel; } aStat[] = { | |
| 613 | + static const struct { int idx; const char *zLabel; } aStat[] = { | |
| 614 | 614 | { CFTYPE_ANY, "Artifacts:" }, |
| 615 | 615 | { CFTYPE_MANIFEST, "Manifests:" }, |
| 616 | 616 | { CFTYPE_CLUSTER, "Clusters:" }, |
| 617 | 617 | { CFTYPE_CONTROL, "Tags:" }, |
| 618 | 618 | { CFTYPE_WIKI, "Wikis:" }, |
| @@ -816,11 +816,11 @@ | ||
| 816 | 816 | |
| 817 | 817 | /* |
| 818 | 818 | ** Recursively read all files from the directory zPath and install |
| 819 | 819 | ** every file read as a new artifact in the repository. |
| 820 | 820 | */ |
| 821 | -void recon_read_dir(char *zPath){ | |
| 821 | +void recon_read_dir(const char *zPath){ | |
| 822 | 822 | FOSSIL_DIR *d; |
| 823 | 823 | struct fossil_dirent *pEntry; |
| 824 | 824 | Blob aContent; /* content of the just read artifact */ |
| 825 | 825 | static int nFileRead = 0; |
| 826 | 826 | void *zUnicodePath; |
| 827 | 827 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -608,11 +608,11 @@ | |
| 608 | if( activateWal ){ |
| 609 | db_multi_exec("PRAGMA journal_mode=WAL;"); |
| 610 | } |
| 611 | } |
| 612 | if( showStats ){ |
| 613 | static struct { int idx; const char *zLabel; } aStat[] = { |
| 614 | { CFTYPE_ANY, "Artifacts:" }, |
| 615 | { CFTYPE_MANIFEST, "Manifests:" }, |
| 616 | { CFTYPE_CLUSTER, "Clusters:" }, |
| 617 | { CFTYPE_CONTROL, "Tags:" }, |
| 618 | { CFTYPE_WIKI, "Wikis:" }, |
| @@ -816,11 +816,11 @@ | |
| 816 | |
| 817 | /* |
| 818 | ** Recursively read all files from the directory zPath and install |
| 819 | ** every file read as a new artifact in the repository. |
| 820 | */ |
| 821 | void recon_read_dir(char *zPath){ |
| 822 | FOSSIL_DIR *d; |
| 823 | struct fossil_dirent *pEntry; |
| 824 | Blob aContent; /* content of the just read artifact */ |
| 825 | static int nFileRead = 0; |
| 826 | void *zUnicodePath; |
| 827 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -608,11 +608,11 @@ | |
| 608 | if( activateWal ){ |
| 609 | db_multi_exec("PRAGMA journal_mode=WAL;"); |
| 610 | } |
| 611 | } |
| 612 | if( showStats ){ |
| 613 | static const struct { int idx; const char *zLabel; } aStat[] = { |
| 614 | { CFTYPE_ANY, "Artifacts:" }, |
| 615 | { CFTYPE_MANIFEST, "Manifests:" }, |
| 616 | { CFTYPE_CLUSTER, "Clusters:" }, |
| 617 | { CFTYPE_CONTROL, "Tags:" }, |
| 618 | { CFTYPE_WIKI, "Wikis:" }, |
| @@ -816,11 +816,11 @@ | |
| 816 | |
| 817 | /* |
| 818 | ** Recursively read all files from the directory zPath and install |
| 819 | ** every file read as a new artifact in the repository. |
| 820 | */ |
| 821 | void recon_read_dir(const char *zPath){ |
| 822 | FOSSIL_DIR *d; |
| 823 | struct fossil_dirent *pEntry; |
| 824 | Blob aContent; /* content of the just read artifact */ |
| 825 | static int nFileRead = 0; |
| 826 | void *zUnicodePath; |
| 827 |
+1
-1
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -170,11 +170,11 @@ | ||
| 170 | 170 | case SQLITE_SELECT: |
| 171 | 171 | case SQLITE_FUNCTION: { |
| 172 | 172 | break; |
| 173 | 173 | } |
| 174 | 174 | case SQLITE_READ: { |
| 175 | - static const char *azAllowed[] = { | |
| 175 | + static const char *const azAllowed[] = { | |
| 176 | 176 | "ticket", |
| 177 | 177 | "blob", |
| 178 | 178 | "filename", |
| 179 | 179 | "mlink", |
| 180 | 180 | "plink", |
| 181 | 181 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -170,11 +170,11 @@ | |
| 170 | case SQLITE_SELECT: |
| 171 | case SQLITE_FUNCTION: { |
| 172 | break; |
| 173 | } |
| 174 | case SQLITE_READ: { |
| 175 | static const char *azAllowed[] = { |
| 176 | "ticket", |
| 177 | "blob", |
| 178 | "filename", |
| 179 | "mlink", |
| 180 | "plink", |
| 181 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -170,11 +170,11 @@ | |
| 170 | case SQLITE_SELECT: |
| 171 | case SQLITE_FUNCTION: { |
| 172 | break; |
| 173 | } |
| 174 | case SQLITE_READ: { |
| 175 | static const char *const azAllowed[] = { |
| 176 | "ticket", |
| 177 | "blob", |
| 178 | "filename", |
| 179 | "mlink", |
| 180 | "plink", |
| 181 |
+3
-3
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -451,11 +451,11 @@ | ||
| 451 | 451 | #define MODE_Insert 5 /* Generate SQL "insert" statements */ |
| 452 | 452 | #define MODE_Tcl 6 /* Generate ANSI-C or TCL quoted elements */ |
| 453 | 453 | #define MODE_Csv 7 /* Quote strings, numbers are plain */ |
| 454 | 454 | #define MODE_Explain 8 /* Like MODE_Column, but do not truncate data */ |
| 455 | 455 | |
| 456 | -static const char *modeDescr[] = { | |
| 456 | +static const char *const modeDescr[] = { | |
| 457 | 457 | "line", |
| 458 | 458 | "column", |
| 459 | 459 | "list", |
| 460 | 460 | "semi", |
| 461 | 461 | "html", |
| @@ -1381,11 +1381,11 @@ | ||
| 1381 | 1381 | } |
| 1382 | 1382 | |
| 1383 | 1383 | /* |
| 1384 | 1384 | ** Text of a help message |
| 1385 | 1385 | */ |
| 1386 | -static char zHelp[] = | |
| 1386 | +static const char zHelp[] = | |
| 1387 | 1387 | ".backup ?DB? FILE Backup DB (default \"main\") to FILE\n" |
| 1388 | 1388 | ".bail ON|OFF Stop after hitting an error. Default OFF\n" |
| 1389 | 1389 | ".databases List names and files of attached databases\n" |
| 1390 | 1390 | ".dump ?TABLE? ... Dump the database in an SQL text format\n" |
| 1391 | 1391 | " If TABLE specified, only dump tables matching\n" |
| @@ -1436,11 +1436,11 @@ | ||
| 1436 | 1436 | ".trace FILE|off Output each SQL statement as it is run\n" |
| 1437 | 1437 | ".vfsname ?AUX? Print the name of the VFS stack\n" |
| 1438 | 1438 | ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" |
| 1439 | 1439 | ; |
| 1440 | 1440 | |
| 1441 | -static char zTimerHelp[] = | |
| 1441 | +static const char zTimerHelp[] = | |
| 1442 | 1442 | ".timer ON|OFF Turn the CPU timer measurement on or off\n" |
| 1443 | 1443 | ; |
| 1444 | 1444 | |
| 1445 | 1445 | /* Forward reference */ |
| 1446 | 1446 | static int process_input(struct callback_data *p, FILE *in); |
| 1447 | 1447 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -451,11 +451,11 @@ | |
| 451 | #define MODE_Insert 5 /* Generate SQL "insert" statements */ |
| 452 | #define MODE_Tcl 6 /* Generate ANSI-C or TCL quoted elements */ |
| 453 | #define MODE_Csv 7 /* Quote strings, numbers are plain */ |
| 454 | #define MODE_Explain 8 /* Like MODE_Column, but do not truncate data */ |
| 455 | |
| 456 | static const char *modeDescr[] = { |
| 457 | "line", |
| 458 | "column", |
| 459 | "list", |
| 460 | "semi", |
| 461 | "html", |
| @@ -1381,11 +1381,11 @@ | |
| 1381 | } |
| 1382 | |
| 1383 | /* |
| 1384 | ** Text of a help message |
| 1385 | */ |
| 1386 | static char zHelp[] = |
| 1387 | ".backup ?DB? FILE Backup DB (default \"main\") to FILE\n" |
| 1388 | ".bail ON|OFF Stop after hitting an error. Default OFF\n" |
| 1389 | ".databases List names and files of attached databases\n" |
| 1390 | ".dump ?TABLE? ... Dump the database in an SQL text format\n" |
| 1391 | " If TABLE specified, only dump tables matching\n" |
| @@ -1436,11 +1436,11 @@ | |
| 1436 | ".trace FILE|off Output each SQL statement as it is run\n" |
| 1437 | ".vfsname ?AUX? Print the name of the VFS stack\n" |
| 1438 | ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" |
| 1439 | ; |
| 1440 | |
| 1441 | static char zTimerHelp[] = |
| 1442 | ".timer ON|OFF Turn the CPU timer measurement on or off\n" |
| 1443 | ; |
| 1444 | |
| 1445 | /* Forward reference */ |
| 1446 | static int process_input(struct callback_data *p, FILE *in); |
| 1447 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -451,11 +451,11 @@ | |
| 451 | #define MODE_Insert 5 /* Generate SQL "insert" statements */ |
| 452 | #define MODE_Tcl 6 /* Generate ANSI-C or TCL quoted elements */ |
| 453 | #define MODE_Csv 7 /* Quote strings, numbers are plain */ |
| 454 | #define MODE_Explain 8 /* Like MODE_Column, but do not truncate data */ |
| 455 | |
| 456 | static const char *const modeDescr[] = { |
| 457 | "line", |
| 458 | "column", |
| 459 | "list", |
| 460 | "semi", |
| 461 | "html", |
| @@ -1381,11 +1381,11 @@ | |
| 1381 | } |
| 1382 | |
| 1383 | /* |
| 1384 | ** Text of a help message |
| 1385 | */ |
| 1386 | static const char zHelp[] = |
| 1387 | ".backup ?DB? FILE Backup DB (default \"main\") to FILE\n" |
| 1388 | ".bail ON|OFF Stop after hitting an error. Default OFF\n" |
| 1389 | ".databases List names and files of attached databases\n" |
| 1390 | ".dump ?TABLE? ... Dump the database in an SQL text format\n" |
| 1391 | " If TABLE specified, only dump tables matching\n" |
| @@ -1436,11 +1436,11 @@ | |
| 1436 | ".trace FILE|off Output each SQL statement as it is run\n" |
| 1437 | ".vfsname ?AUX? Print the name of the VFS stack\n" |
| 1438 | ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" |
| 1439 | ; |
| 1440 | |
| 1441 | static const char zTimerHelp[] = |
| 1442 | ".timer ON|OFF Turn the CPU timer measurement on or off\n" |
| 1443 | ; |
| 1444 | |
| 1445 | /* Forward reference */ |
| 1446 | static int process_input(struct callback_data *p, FILE *in); |
| 1447 |
+1
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -398,11 +398,11 @@ | ||
| 398 | 398 | if( n==0 ){ |
| 399 | 399 | goto tag_cmd_usage; |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | 402 | if( strncmp(g.argv[2],"add",n)==0 ){ |
| 403 | - char *zValue; | |
| 403 | + const char *zValue; | |
| 404 | 404 | const char *zDateOvrd = find_option("date-override",0,1); |
| 405 | 405 | const char *zUserOvrd = find_option("user-override",0,1); |
| 406 | 406 | if( g.argc!=5 && g.argc!=6 ){ |
| 407 | 407 | usage("add ?--raw? ?--propagate? TAGNAME CHECK-IN ?VALUE?"); |
| 408 | 408 | } |
| 409 | 409 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -398,11 +398,11 @@ | |
| 398 | if( n==0 ){ |
| 399 | goto tag_cmd_usage; |
| 400 | } |
| 401 | |
| 402 | if( strncmp(g.argv[2],"add",n)==0 ){ |
| 403 | char *zValue; |
| 404 | const char *zDateOvrd = find_option("date-override",0,1); |
| 405 | const char *zUserOvrd = find_option("user-override",0,1); |
| 406 | if( g.argc!=5 && g.argc!=6 ){ |
| 407 | usage("add ?--raw? ?--propagate? TAGNAME CHECK-IN ?VALUE?"); |
| 408 | } |
| 409 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -398,11 +398,11 @@ | |
| 398 | if( n==0 ){ |
| 399 | goto tag_cmd_usage; |
| 400 | } |
| 401 | |
| 402 | if( strncmp(g.argv[2],"add",n)==0 ){ |
| 403 | const char *zValue; |
| 404 | const char *zDateOvrd = find_option("date-override",0,1); |
| 405 | const char *zUserOvrd = find_option("user-override",0,1); |
| 406 | if( g.argc!=5 && g.argc!=6 ){ |
| 407 | usage("add ?--raw? ?--propagate? TAGNAME CHECK-IN ?VALUE?"); |
| 408 | } |
| 409 |
M
src/th.c
+1
-1
| --- src/th.c | ||
| +++ src/th.c | ||
| @@ -2296,11 +2296,11 @@ | ||
| 2296 | 2296 | ** { } [ ] \ ; ' " |
| 2297 | 2297 | ** |
| 2298 | 2298 | ** " 0x22 |
| 2299 | 2299 | ** |
| 2300 | 2300 | */ |
| 2301 | -static unsigned char aCharProp[256] = { | |
| 2301 | +static const unsigned char aCharProp[256] = { | |
| 2302 | 2302 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, /* 0x0. */ |
| 2303 | 2303 | 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1. */ |
| 2304 | 2304 | 5, 4, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x2. */ |
| 2305 | 2305 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 20, 4, 4, 4, 4, /* 0x3. */ |
| 2306 | 2306 | 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, /* 0x4. */ |
| 2307 | 2307 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -2296,11 +2296,11 @@ | |
| 2296 | ** { } [ ] \ ; ' " |
| 2297 | ** |
| 2298 | ** " 0x22 |
| 2299 | ** |
| 2300 | */ |
| 2301 | static unsigned char aCharProp[256] = { |
| 2302 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, /* 0x0. */ |
| 2303 | 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1. */ |
| 2304 | 5, 4, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x2. */ |
| 2305 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 20, 4, 4, 4, 4, /* 0x3. */ |
| 2306 | 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, /* 0x4. */ |
| 2307 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -2296,11 +2296,11 @@ | |
| 2296 | ** { } [ ] \ ; ' " |
| 2297 | ** |
| 2298 | ** " 0x22 |
| 2299 | ** |
| 2300 | */ |
| 2301 | static const unsigned char aCharProp[256] = { |
| 2302 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, /* 0x0. */ |
| 2303 | 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1. */ |
| 2304 | 5, 4, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x2. */ |
| 2305 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 20, 4, 4, 4, 4, /* 0x3. */ |
| 2306 | 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, /* 0x4. */ |
| 2307 |
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1451,11 +1451,11 @@ | ||
| 1451 | 1451 | void timeline_cmd(void){ |
| 1452 | 1452 | Stmt q; |
| 1453 | 1453 | int n, k; |
| 1454 | 1454 | const char *zCount; |
| 1455 | 1455 | const char *zType; |
| 1456 | - char *zOrigin; | |
| 1456 | + const char *zOrigin; | |
| 1457 | 1457 | char *zDate; |
| 1458 | 1458 | Blob sql; |
| 1459 | 1459 | int objid = 0; |
| 1460 | 1460 | Blob uuid; |
| 1461 | 1461 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1462 | 1462 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1451,11 +1451,11 @@ | |
| 1451 | void timeline_cmd(void){ |
| 1452 | Stmt q; |
| 1453 | int n, k; |
| 1454 | const char *zCount; |
| 1455 | const char *zType; |
| 1456 | char *zOrigin; |
| 1457 | char *zDate; |
| 1458 | Blob sql; |
| 1459 | int objid = 0; |
| 1460 | Blob uuid; |
| 1461 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1462 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1451,11 +1451,11 @@ | |
| 1451 | void timeline_cmd(void){ |
| 1452 | Stmt q; |
| 1453 | int n, k; |
| 1454 | const char *zCount; |
| 1455 | const char *zType; |
| 1456 | const char *zOrigin; |
| 1457 | char *zDate; |
| 1458 | Blob sql; |
| 1459 | int objid = 0; |
| 1460 | Blob uuid; |
| 1461 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1462 |
+10
-9
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -26,13 +26,13 @@ | ||
| 26 | 26 | ** The list of database user-defined fields in the TICKET table. |
| 27 | 27 | ** The real table also contains some addition fields for internal |
| 28 | 28 | ** used. The internal-use fields begin with "tkt_". |
| 29 | 29 | */ |
| 30 | 30 | static int nField = 0; |
| 31 | -static char **azField = 0; /* Names of database fields */ | |
| 32 | -static char **azValue = 0; /* Original values */ | |
| 33 | -static char **azAppend = 0; /* Value to be appended */ | |
| 31 | +static const char **azField = 0; /* Names of database fields */ | |
| 32 | +static const char **azValue = 0; /* Original values */ | |
| 33 | +static const char **azAppend = 0; /* Value to be appended */ | |
| 34 | 34 | |
| 35 | 35 | /* |
| 36 | 36 | ** Compare two entries in azField for sorting purposes |
| 37 | 37 | */ |
| 38 | 38 | static int nameCmpr(const void *a, const void *b){ |
| @@ -1117,23 +1117,24 @@ | ||
| 1117 | 1117 | fossil_fatal("empty %s command aborted!",g.argv[2]); |
| 1118 | 1118 | } |
| 1119 | 1119 | getAllTicketFields(); |
| 1120 | 1120 | /* read commandline and assign fields in the azValue array */ |
| 1121 | 1121 | while( i<g.argc ){ |
| 1122 | - char *zFName; | |
| 1123 | - char *zFValue; | |
| 1122 | + const char *zFName; | |
| 1123 | + const char *zFValue; | |
| 1124 | 1124 | int j; |
| 1125 | 1125 | int append = 0; |
| 1126 | 1126 | |
| 1127 | 1127 | zFName = g.argv[i++]; |
| 1128 | 1128 | if( i==g.argc ){ |
| 1129 | 1129 | fossil_fatal("missing value for '%s'!",zFName); |
| 1130 | 1130 | } |
| 1131 | 1131 | zFValue = g.argv[i++]; |
| 1132 | 1132 | if( tktEncoding == tktFossilize ){ |
| 1133 | - zFValue=mprintf("%s",zFValue); | |
| 1134 | - defossilize(zFValue); | |
| 1133 | + char *z = mprintf("%s",zFValue); | |
| 1134 | + defossilize(z); | |
| 1135 | + zFValue = z; | |
| 1135 | 1136 | } |
| 1136 | 1137 | append = (zFName[0] == '+'); |
| 1137 | 1138 | if (append){ |
| 1138 | 1139 | zFName++; |
| 1139 | 1140 | } |
| @@ -1153,12 +1154,12 @@ | ||
| 1153 | 1154 | blob_zero(&tktchng); |
| 1154 | 1155 | /* add the time to the ticket manifest */ |
| 1155 | 1156 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 1156 | 1157 | /* append defined elements */ |
| 1157 | 1158 | for(i=0; i<nField; i++){ |
| 1158 | - char *zValue = 0; | |
| 1159 | - char *zPfx; | |
| 1159 | + const char *zValue = 0; | |
| 1160 | + const char *zPfx; | |
| 1160 | 1161 | |
| 1161 | 1162 | if (azAppend[i] && azAppend[i][0] ){ |
| 1162 | 1163 | zPfx = " +"; |
| 1163 | 1164 | zValue = azAppend[i]; |
| 1164 | 1165 | } else if( azValue[i] && azValue[i][0] ){ |
| 1165 | 1166 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -26,13 +26,13 @@ | |
| 26 | ** The list of database user-defined fields in the TICKET table. |
| 27 | ** The real table also contains some addition fields for internal |
| 28 | ** used. The internal-use fields begin with "tkt_". |
| 29 | */ |
| 30 | static int nField = 0; |
| 31 | static char **azField = 0; /* Names of database fields */ |
| 32 | static char **azValue = 0; /* Original values */ |
| 33 | static char **azAppend = 0; /* Value to be appended */ |
| 34 | |
| 35 | /* |
| 36 | ** Compare two entries in azField for sorting purposes |
| 37 | */ |
| 38 | static int nameCmpr(const void *a, const void *b){ |
| @@ -1117,23 +1117,24 @@ | |
| 1117 | fossil_fatal("empty %s command aborted!",g.argv[2]); |
| 1118 | } |
| 1119 | getAllTicketFields(); |
| 1120 | /* read commandline and assign fields in the azValue array */ |
| 1121 | while( i<g.argc ){ |
| 1122 | char *zFName; |
| 1123 | char *zFValue; |
| 1124 | int j; |
| 1125 | int append = 0; |
| 1126 | |
| 1127 | zFName = g.argv[i++]; |
| 1128 | if( i==g.argc ){ |
| 1129 | fossil_fatal("missing value for '%s'!",zFName); |
| 1130 | } |
| 1131 | zFValue = g.argv[i++]; |
| 1132 | if( tktEncoding == tktFossilize ){ |
| 1133 | zFValue=mprintf("%s",zFValue); |
| 1134 | defossilize(zFValue); |
| 1135 | } |
| 1136 | append = (zFName[0] == '+'); |
| 1137 | if (append){ |
| 1138 | zFName++; |
| 1139 | } |
| @@ -1153,12 +1154,12 @@ | |
| 1153 | blob_zero(&tktchng); |
| 1154 | /* add the time to the ticket manifest */ |
| 1155 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 1156 | /* append defined elements */ |
| 1157 | for(i=0; i<nField; i++){ |
| 1158 | char *zValue = 0; |
| 1159 | char *zPfx; |
| 1160 | |
| 1161 | if (azAppend[i] && azAppend[i][0] ){ |
| 1162 | zPfx = " +"; |
| 1163 | zValue = azAppend[i]; |
| 1164 | } else if( azValue[i] && azValue[i][0] ){ |
| 1165 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -26,13 +26,13 @@ | |
| 26 | ** The list of database user-defined fields in the TICKET table. |
| 27 | ** The real table also contains some addition fields for internal |
| 28 | ** used. The internal-use fields begin with "tkt_". |
| 29 | */ |
| 30 | static int nField = 0; |
| 31 | static const char **azField = 0; /* Names of database fields */ |
| 32 | static const char **azValue = 0; /* Original values */ |
| 33 | static const char **azAppend = 0; /* Value to be appended */ |
| 34 | |
| 35 | /* |
| 36 | ** Compare two entries in azField for sorting purposes |
| 37 | */ |
| 38 | static int nameCmpr(const void *a, const void *b){ |
| @@ -1117,23 +1117,24 @@ | |
| 1117 | fossil_fatal("empty %s command aborted!",g.argv[2]); |
| 1118 | } |
| 1119 | getAllTicketFields(); |
| 1120 | /* read commandline and assign fields in the azValue array */ |
| 1121 | while( i<g.argc ){ |
| 1122 | const char *zFName; |
| 1123 | const char *zFValue; |
| 1124 | int j; |
| 1125 | int append = 0; |
| 1126 | |
| 1127 | zFName = g.argv[i++]; |
| 1128 | if( i==g.argc ){ |
| 1129 | fossil_fatal("missing value for '%s'!",zFName); |
| 1130 | } |
| 1131 | zFValue = g.argv[i++]; |
| 1132 | if( tktEncoding == tktFossilize ){ |
| 1133 | char *z = mprintf("%s",zFValue); |
| 1134 | defossilize(z); |
| 1135 | zFValue = z; |
| 1136 | } |
| 1137 | append = (zFName[0] == '+'); |
| 1138 | if (append){ |
| 1139 | zFName++; |
| 1140 | } |
| @@ -1153,12 +1154,12 @@ | |
| 1154 | blob_zero(&tktchng); |
| 1155 | /* add the time to the ticket manifest */ |
| 1156 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 1157 | /* append defined elements */ |
| 1158 | for(i=0; i<nField; i++){ |
| 1159 | const char *zValue = 0; |
| 1160 | const char *zPfx; |
| 1161 | |
| 1162 | if (azAppend[i] && azAppend[i][0] ){ |
| 1163 | zPfx = " +"; |
| 1164 | zValue = azAppend[i]; |
| 1165 | } else if( azValue[i] && azValue[i][0] ){ |
| 1166 |
+1
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -963,11 +963,11 @@ | ||
| 963 | 963 | manifest_destroy(pWiki); |
| 964 | 964 | return; |
| 965 | 965 | }else |
| 966 | 966 | if( strncmp(g.argv[2],"commit",n)==0 |
| 967 | 967 | || strncmp(g.argv[2],"create",n)==0 ){ |
| 968 | - char *zPageName; | |
| 968 | + const char *zPageName; | |
| 969 | 969 | Blob content; |
| 970 | 970 | if( g.argc!=4 && g.argc!=5 ){ |
| 971 | 971 | usage("commit PAGENAME ?FILE?"); |
| 972 | 972 | } |
| 973 | 973 | zPageName = g.argv[3]; |
| 974 | 974 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -963,11 +963,11 @@ | |
| 963 | manifest_destroy(pWiki); |
| 964 | return; |
| 965 | }else |
| 966 | if( strncmp(g.argv[2],"commit",n)==0 |
| 967 | || strncmp(g.argv[2],"create",n)==0 ){ |
| 968 | char *zPageName; |
| 969 | Blob content; |
| 970 | if( g.argc!=4 && g.argc!=5 ){ |
| 971 | usage("commit PAGENAME ?FILE?"); |
| 972 | } |
| 973 | zPageName = g.argv[3]; |
| 974 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -963,11 +963,11 @@ | |
| 963 | manifest_destroy(pWiki); |
| 964 | return; |
| 965 | }else |
| 966 | if( strncmp(g.argv[2],"commit",n)==0 |
| 967 | || strncmp(g.argv[2],"create",n)==0 ){ |
| 968 | const char *zPageName; |
| 969 | Blob content; |
| 970 | if( g.argc!=4 && g.argc!=5 ){ |
| 971 | usage("commit PAGENAME ?FILE?"); |
| 972 | } |
| 973 | zPageName = g.argv[3]; |
| 974 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -270,11 +270,11 @@ | ||
| 270 | 270 | int rid, /* record id of the file to send */ |
| 271 | 271 | int isPrivate, /* True if rid is a private artifact */ |
| 272 | 272 | Blob *pContent, /* The content of the file to send */ |
| 273 | 273 | Blob *pUuid /* The UUID of the file to send */ |
| 274 | 274 | ){ |
| 275 | - static const char *azQuery[] = { | |
| 275 | + static const char *const azQuery[] = { | |
| 276 | 276 | "SELECT pid FROM plink x" |
| 277 | 277 | " WHERE cid=%d" |
| 278 | 278 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" |
| 279 | 279 | " AND NOT EXISTS(SELECT 1 FROM plink y" |
| 280 | 280 | " WHERE y.pid=x.cid AND y.cid=x.pid)", |
| 281 | 281 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | int rid, /* record id of the file to send */ |
| 271 | int isPrivate, /* True if rid is a private artifact */ |
| 272 | Blob *pContent, /* The content of the file to send */ |
| 273 | Blob *pUuid /* The UUID of the file to send */ |
| 274 | ){ |
| 275 | static const char *azQuery[] = { |
| 276 | "SELECT pid FROM plink x" |
| 277 | " WHERE cid=%d" |
| 278 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" |
| 279 | " AND NOT EXISTS(SELECT 1 FROM plink y" |
| 280 | " WHERE y.pid=x.cid AND y.cid=x.pid)", |
| 281 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | int rid, /* record id of the file to send */ |
| 271 | int isPrivate, /* True if rid is a private artifact */ |
| 272 | Blob *pContent, /* The content of the file to send */ |
| 273 | Blob *pUuid /* The UUID of the file to send */ |
| 274 | ){ |
| 275 | static const char *const azQuery[] = { |
| 276 | "SELECT pid FROM plink x" |
| 277 | " WHERE cid=%d" |
| 278 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" |
| 279 | " AND NOT EXISTS(SELECT 1 FROM plink y" |
| 280 | " WHERE y.pid=x.cid AND y.cid=x.pid)", |
| 281 |
+4
-6
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -13,15 +13,15 @@ | ||
| 13 | 13 | # |
| 14 | 14 | |
| 15 | 15 | #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | 17 | # |
| 18 | -# PREFIX = | |
| 18 | +PREFIX = | |
| 19 | 19 | # PREFIX = mingw32- |
| 20 | 20 | # PREFIX = i686-pc-mingw32- |
| 21 | 21 | # PREFIX = i686-w64-mingw32- |
| 22 | -PREFIX = x86_64-w64-mingw32- | |
| 22 | +# PREFIX = x86_64-w64-mingw32- | |
| 23 | 23 | |
| 24 | 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | 25 | # in a directory that is separate from the source tree. Just change |
| 26 | 26 | # the following to point from the build directory to the src/ folder. |
| 27 | 27 | # |
| @@ -104,11 +104,11 @@ | ||
| 104 | 104 | # will run on the target platform. This is usually the same |
| 105 | 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | 107 | # for building intermediate code-generator tools. |
| 108 | 108 | # |
| 109 | -TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 109 | +TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 110 | 110 | |
| 111 | 111 | #### Compile resources for use in building executables that will run |
| 112 | 112 | # on the target platform. |
| 113 | 113 | # |
| 114 | 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -176,16 +176,14 @@ | ||
| 176 | 176 | LIB += -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32 |
| 177 | 177 | else |
| 178 | 178 | LIB += -lkernel32 -lws2_32 |
| 179 | 179 | endif |
| 180 | 180 | |
| 181 | -LIB += -municode | |
| 182 | - | |
| 183 | 181 | #### Tcl shell for use in running the fossil test suite. This is only |
| 184 | 182 | # used for testing. |
| 185 | 183 | # |
| 186 | -TCLSH = tclsh86 | |
| 184 | +TCLSH = tclsh | |
| 187 | 185 | |
| 188 | 186 | #### Nullsoft installer MakeNSIS location |
| 189 | 187 | # |
| 190 | 188 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 191 | 189 | |
| 192 | 190 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,15 +13,15 @@ | |
| 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. |
| 27 | # |
| @@ -104,11 +104,11 @@ | |
| 104 | # will run on the target platform. This is usually the same |
| 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | # for building intermediate code-generator tools. |
| 108 | # |
| 109 | TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) |
| 110 | |
| 111 | #### Compile resources for use in building executables that will run |
| 112 | # on the target platform. |
| 113 | # |
| 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -176,16 +176,14 @@ | |
| 176 | LIB += -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32 |
| 177 | else |
| 178 | LIB += -lkernel32 -lws2_32 |
| 179 | endif |
| 180 | |
| 181 | LIB += -municode |
| 182 | |
| 183 | #### Tcl shell for use in running the fossil test suite. This is only |
| 184 | # used for testing. |
| 185 | # |
| 186 | TCLSH = tclsh86 |
| 187 | |
| 188 | #### Nullsoft installer MakeNSIS location |
| 189 | # |
| 190 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 191 | |
| 192 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,15 +13,15 @@ | |
| 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. |
| 27 | # |
| @@ -104,11 +104,11 @@ | |
| 104 | # will run on the target platform. This is usually the same |
| 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | # for building intermediate code-generator tools. |
| 108 | # |
| 109 | TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 110 | |
| 111 | #### Compile resources for use in building executables that will run |
| 112 | # on the target platform. |
| 113 | # |
| 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -176,16 +176,14 @@ | |
| 176 | LIB += -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32 |
| 177 | else |
| 178 | LIB += -lkernel32 -lws2_32 |
| 179 | endif |
| 180 | |
| 181 | #### Tcl shell for use in running the fossil test suite. This is only |
| 182 | # used for testing. |
| 183 | # |
| 184 | TCLSH = tclsh |
| 185 | |
| 186 | #### Nullsoft installer MakeNSIS location |
| 187 | # |
| 188 | MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe" |
| 189 | |
| 190 |