Fossil SCM

const-qualification

jan.nijtmans 2012-09-05 12:55 eclipse-project
Commit 645f34834d2ebc8e6d6ead2341a7740a0a2f8a91
+3 -3
--- src/add.c
+++ src/add.c
@@ -39,11 +39,11 @@
3939
*/
4040
const char *fossil_reserved_name(int N){
4141
/* Possible names of the local per-checkout database file and
4242
** its associated journals
4343
*/
44
- static const char *azName[] = {
44
+ static const char *const azName[] = {
4545
"_FOSSIL_",
4646
"_FOSSIL_-journal",
4747
"_FOSSIL_-wal",
4848
"_FOSSIL_-shm",
4949
".fslckout",
@@ -61,11 +61,11 @@
6161
};
6262
6363
/* Names of auxiliary files generated by SQLite when the "manifest"
6464
** properity is enabled
6565
*/
66
- static const char *azManifest[] = {
66
+ static const char *const azManifest[] = {
6767
"manifest",
6868
"manifest.uuid",
6969
};
7070
7171
/* Cached setting "manifest" */
@@ -531,11 +531,11 @@
531531
** See also: changes, status
532532
*/
533533
void mv_cmd(void){
534534
int i;
535535
int vid;
536
- char *zDest;
536
+ const char *zDest;
537537
Blob dest;
538538
Stmt q;
539539
540540
db_must_be_within_tree();
541541
vid = db_lget_int("checkout", 0);
542542
--- 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 @@
199199
/* If any repositories whose names appear in the ~/.fossil file could not
200200
** be found, remove those names from the ~/.fossil file.
201201
*/
202202
if( bag_count(&outOfDate)>0 ){
203203
Blob sql;
204
- char *zSep = "(";
204
+ const char *zSep = "(";
205205
int rowid;
206206
blob_zero(&sql);
207207
blob_appendf(&sql, "DELETE FROM global_config WHERE rowid IN ");
208208
for(rowid=bag_first(&outOfDate); rowid>0; rowid=bag_next(&outOfDate,rowid)){
209209
blob_appendf(&sql, "%s%d", zSep, rowid);
210210
--- 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 @@
9898
}
9999
#endif /* CAPTCHA==1 */
100100
101101
102102
#if CAPTCHA==2
103
-static const char *azFont2[] = {
103
+static const char *const azFont2[] = {
104104
/* 0 */
105105
" __ ",
106106
" / \\ ",
107107
"| () |",
108108
" \\__/ ",
@@ -223,11 +223,11 @@
223223
return z;
224224
}
225225
#endif /* CAPTCHA==2 */
226226
227227
#if CAPTCHA==3
228
-static const char *azFont3[] = {
228
+static const char *const azFont3[] = {
229229
/* 0 */
230230
" ___ ",
231231
" / _ \\ ",
232232
"| | | |",
233233
"| | | |",
234234
--- 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 @@
13551355
13561356
13571357
/*
13581358
** Name of days and months.
13591359
*/
1360
-static const char *azDays[] =
1360
+static const char *const azDays[] =
13611361
{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0};
1362
-static const char *azMonths[] =
1362
+static const char *const azMonths[] =
13631363
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
13641364
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0};
13651365
13661366
13671367
/*
13681368
--- 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 @@
186186
*/
187187
void checkout_cmd(void){
188188
int forceFlag; /* Force checkout even if edits exist */
189189
int keepFlag; /* Do not change any files on disk */
190190
int latestFlag; /* Checkout the latest version */
191
- char *zVers; /* Version to checkout */
191
+ const char *zVers; /* Version to checkout */
192192
int promptFlag; /* True to prompt before overwriting */
193193
int vid, prior;
194194
Blob cksum1, cksum1b, cksum2;
195195
196196
db_must_be_within_tree();
197197
--- 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 @@
2828
*/
2929
int clearsign(Blob *pIn, Blob *pOut){
3030
char *zRand;
3131
char *zIn;
3232
char *zOut;
33
- char *zBase = db_get("pgp-command", "gpg --clearsign -o ");
33
+ const char *zBase = db_get("pgp-command", "gpg --clearsign -o ");
3434
char *zCmd;
3535
int rc;
3636
if( is_false(zBase) ){
3737
return 0;
3838
}
3939
--- 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 @@
16491649
** being annotated. Do another step of the annotation. Return true
16501650
** if additional annotation is required. zPName is the tag to insert
16511651
** on each line of the file being annotated that was contributed by
16521652
** pParent. Memory to hold zPName is leaked.
16531653
*/
1654
-static int annotation_step(Annotator *p, Blob *pParent, char *zPName){
1654
+static int annotation_step(Annotator *p, Blob *pParent, const char *zPName){
16551655
int i, j;
16561656
int lnTo;
16571657
int iPrevLevel;
16581658
int iThisLevel;
16591659
16601660
--- 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 @@
287287
int isDeleted = db_column_int(&q, 1);
288288
int isChnged = db_column_int(&q,2);
289289
int isNew = db_column_int(&q,3);
290290
int srcid = db_column_int(&q, 4);
291291
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;
294294
int showDiff = 1;
295295
if( isDeleted ){
296296
fossil_print("DELETED %s\n", zPathname);
297297
if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
298298
}else if( file_access(zFullName, 0) ){
299299
--- 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
--- src/http_socket.c
+++ src/http_socket.c
@@ -66,11 +66,11 @@
6666
}
6767
6868
/*
6969
** Set the socket error message.
7070
*/
71
-void socket_set_errmsg(char *zFormat, ...){
71
+void socket_set_errmsg(const char *zFormat, ...){
7272
va_list ap;
7373
socket_clear_errmsg();
7474
va_start(ap, zFormat);
7575
socketErrMsg = vmprintf(zFormat, ap);
7676
va_end(ap);
7777
--- 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 @@
347347
Blob file = empty_blob; /* Content of the file */
348348
Blob line = empty_blob; /* One line of the file */
349349
unsigned int nLine; /* Number of lines in the file*/
350350
unsigned int i, j, k; /* Loop counters */
351351
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 */
354354
char const * zFileName; /* input file name */
355355
FILE * zInFile; /* input FILE */
356356
int foundBom = -1; /* -1= not searched yet, 0 = no; 1=yes */
357357
#ifdef _WIN32
358358
wchar_t buf[MAX_PATH];
@@ -1749,11 +1749,11 @@
17491749
** See also: cgi, http, winsrv
17501750
*/
17511751
void cmd_webserver(void){
17521752
int iPort, mxPort; /* Range of TCP ports allowed */
17531753
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 */
17551755
char *zBrowserCmd = 0; /* Command to launch the web browser */
17561756
int isUiCmd; /* True if command is "ui", not "server' */
17571757
const char *zNotFound; /* The --notfound option or NULL */
17581758
int flags = 0; /* Server flags */
17591759
@@ -1786,11 +1786,11 @@
17861786
/* Unix implementation */
17871787
if( isUiCmd ){
17881788
#if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__)
17891789
zBrowser = db_get("web-browser", 0);
17901790
if( zBrowser==0 ){
1791
- static char *azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" };
1791
+ static const char *const azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" };
17921792
int i;
17931793
zBrowser = "echo";
17941794
for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){
17951795
if( binaryOnPath(azBrowserProg[i]) ){
17961796
zBrowser = azBrowserProg[i];
17971797
--- 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
--- src/makeheaders.c
+++ src/makeheaders.c
@@ -1644,11 +1644,11 @@
16441644
pLast = pLast->pNext;
16451645
for(p=pFirst; p && p!=pLast; p=p->pNext){
16461646
if( p->eType==TT_Id ){
16471647
static IdentTable sReserved;
16481648
static int isInit = 0;
1649
- static char *aWords[] = { "char", "class",
1649
+ static const char *const aWords[] = { "char", "class",
16501650
"const", "double", "enum", "extern", "EXPORT", "ET_PROC",
16511651
"float", "int", "long",
16521652
"PRIVATE", "PROTECTED", "PUBLIC",
16531653
"register", "static", "struct", "sizeof", "signed", "typedef",
16541654
"union", "volatile", "virtual", "void", };
@@ -3253,11 +3253,11 @@
32533253
32543254
/*
32553255
** The following text contains a few simple #defines that we want
32563256
** to be available to every file.
32573257
*/
3258
-static char zInit[] =
3258
+static const char zInit[] =
32593259
"#define INTERFACE 0\n"
32603260
"#define EXPORT_INTERFACE 0\n"
32613261
"#define LOCAL_INTERFACE 0\n"
32623262
"#define EXPORT\n"
32633263
"#define LOCAL static\n"
32643264
--- 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 @@
608608
if( activateWal ){
609609
db_multi_exec("PRAGMA journal_mode=WAL;");
610610
}
611611
}
612612
if( showStats ){
613
- static struct { int idx; const char *zLabel; } aStat[] = {
613
+ static const struct { int idx; const char *zLabel; } aStat[] = {
614614
{ CFTYPE_ANY, "Artifacts:" },
615615
{ CFTYPE_MANIFEST, "Manifests:" },
616616
{ CFTYPE_CLUSTER, "Clusters:" },
617617
{ CFTYPE_CONTROL, "Tags:" },
618618
{ CFTYPE_WIKI, "Wikis:" },
@@ -816,11 +816,11 @@
816816
817817
/*
818818
** Recursively read all files from the directory zPath and install
819819
** every file read as a new artifact in the repository.
820820
*/
821
-void recon_read_dir(char *zPath){
821
+void recon_read_dir(const char *zPath){
822822
FOSSIL_DIR *d;
823823
struct fossil_dirent *pEntry;
824824
Blob aContent; /* content of the just read artifact */
825825
static int nFileRead = 0;
826826
void *zUnicodePath;
827827
--- 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 @@
170170
case SQLITE_SELECT:
171171
case SQLITE_FUNCTION: {
172172
break;
173173
}
174174
case SQLITE_READ: {
175
- static const char *azAllowed[] = {
175
+ static const char *const azAllowed[] = {
176176
"ticket",
177177
"blob",
178178
"filename",
179179
"mlink",
180180
"plink",
181181
--- 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 @@
451451
#define MODE_Insert 5 /* Generate SQL "insert" statements */
452452
#define MODE_Tcl 6 /* Generate ANSI-C or TCL quoted elements */
453453
#define MODE_Csv 7 /* Quote strings, numbers are plain */
454454
#define MODE_Explain 8 /* Like MODE_Column, but do not truncate data */
455455
456
-static const char *modeDescr[] = {
456
+static const char *const modeDescr[] = {
457457
"line",
458458
"column",
459459
"list",
460460
"semi",
461461
"html",
@@ -1381,11 +1381,11 @@
13811381
}
13821382
13831383
/*
13841384
** Text of a help message
13851385
*/
1386
-static char zHelp[] =
1386
+static const char zHelp[] =
13871387
".backup ?DB? FILE Backup DB (default \"main\") to FILE\n"
13881388
".bail ON|OFF Stop after hitting an error. Default OFF\n"
13891389
".databases List names and files of attached databases\n"
13901390
".dump ?TABLE? ... Dump the database in an SQL text format\n"
13911391
" If TABLE specified, only dump tables matching\n"
@@ -1436,11 +1436,11 @@
14361436
".trace FILE|off Output each SQL statement as it is run\n"
14371437
".vfsname ?AUX? Print the name of the VFS stack\n"
14381438
".width NUM1 NUM2 ... Set column widths for \"column\" mode\n"
14391439
;
14401440
1441
-static char zTimerHelp[] =
1441
+static const char zTimerHelp[] =
14421442
".timer ON|OFF Turn the CPU timer measurement on or off\n"
14431443
;
14441444
14451445
/* Forward reference */
14461446
static int process_input(struct callback_data *p, FILE *in);
14471447
--- 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 @@
398398
if( n==0 ){
399399
goto tag_cmd_usage;
400400
}
401401
402402
if( strncmp(g.argv[2],"add",n)==0 ){
403
- char *zValue;
403
+ const char *zValue;
404404
const char *zDateOvrd = find_option("date-override",0,1);
405405
const char *zUserOvrd = find_option("user-override",0,1);
406406
if( g.argc!=5 && g.argc!=6 ){
407407
usage("add ?--raw? ?--propagate? TAGNAME CHECK-IN ?VALUE?");
408408
}
409409
--- 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
+1 -1
--- src/th.c
+++ src/th.c
@@ -2296,11 +2296,11 @@
22962296
** { } [ ] \ ; ' "
22972297
**
22982298
** " 0x22
22992299
**
23002300
*/
2301
-static unsigned char aCharProp[256] = {
2301
+static const unsigned char aCharProp[256] = {
23022302
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, /* 0x0. */
23032303
0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1. */
23042304
5, 4, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x2. */
23052305
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 20, 4, 4, 4, 4, /* 0x3. */
23062306
4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, /* 0x4. */
23072307
--- 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 @@
14511451
void timeline_cmd(void){
14521452
Stmt q;
14531453
int n, k;
14541454
const char *zCount;
14551455
const char *zType;
1456
- char *zOrigin;
1456
+ const char *zOrigin;
14571457
char *zDate;
14581458
Blob sql;
14591459
int objid = 0;
14601460
Blob uuid;
14611461
int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */
14621462
--- 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 @@
2626
** The list of database user-defined fields in the TICKET table.
2727
** The real table also contains some addition fields for internal
2828
** used. The internal-use fields begin with "tkt_".
2929
*/
3030
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 */
3434
3535
/*
3636
** Compare two entries in azField for sorting purposes
3737
*/
3838
static int nameCmpr(const void *a, const void *b){
@@ -1117,23 +1117,24 @@
11171117
fossil_fatal("empty %s command aborted!",g.argv[2]);
11181118
}
11191119
getAllTicketFields();
11201120
/* read commandline and assign fields in the azValue array */
11211121
while( i<g.argc ){
1122
- char *zFName;
1123
- char *zFValue;
1122
+ const char *zFName;
1123
+ const char *zFValue;
11241124
int j;
11251125
int append = 0;
11261126
11271127
zFName = g.argv[i++];
11281128
if( i==g.argc ){
11291129
fossil_fatal("missing value for '%s'!",zFName);
11301130
}
11311131
zFValue = g.argv[i++];
11321132
if( tktEncoding == tktFossilize ){
1133
- zFValue=mprintf("%s",zFValue);
1134
- defossilize(zFValue);
1133
+ char *z = mprintf("%s",zFValue);
1134
+ defossilize(z);
1135
+ zFValue = z;
11351136
}
11361137
append = (zFName[0] == '+');
11371138
if (append){
11381139
zFName++;
11391140
}
@@ -1153,12 +1154,12 @@
11531154
blob_zero(&tktchng);
11541155
/* add the time to the ticket manifest */
11551156
blob_appendf(&tktchng, "D %s\n", zDate);
11561157
/* append defined elements */
11571158
for(i=0; i<nField; i++){
1158
- char *zValue = 0;
1159
- char *zPfx;
1159
+ const char *zValue = 0;
1160
+ const char *zPfx;
11601161
11611162
if (azAppend[i] && azAppend[i][0] ){
11621163
zPfx = " +";
11631164
zValue = azAppend[i];
11641165
} else if( azValue[i] && azValue[i][0] ){
11651166
--- 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 @@
963963
manifest_destroy(pWiki);
964964
return;
965965
}else
966966
if( strncmp(g.argv[2],"commit",n)==0
967967
|| strncmp(g.argv[2],"create",n)==0 ){
968
- char *zPageName;
968
+ const char *zPageName;
969969
Blob content;
970970
if( g.argc!=4 && g.argc!=5 ){
971971
usage("commit PAGENAME ?FILE?");
972972
}
973973
zPageName = g.argv[3];
974974
--- 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 @@
270270
int rid, /* record id of the file to send */
271271
int isPrivate, /* True if rid is a private artifact */
272272
Blob *pContent, /* The content of the file to send */
273273
Blob *pUuid /* The UUID of the file to send */
274274
){
275
- static const char *azQuery[] = {
275
+ static const char *const azQuery[] = {
276276
"SELECT pid FROM plink x"
277277
" WHERE cid=%d"
278278
" AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)"
279279
" AND NOT EXISTS(SELECT 1 FROM plink y"
280280
" WHERE y.pid=x.cid AND y.cid=x.pid)",
281281
--- 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
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,15 +13,15 @@
1313
#
1414
1515
#### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
1616
# By default, this is an empty string (i.e. use the native compiler).
1717
#
18
-# PREFIX =
18
+PREFIX =
1919
# PREFIX = mingw32-
2020
# PREFIX = i686-pc-mingw32-
2121
# PREFIX = i686-w64-mingw32-
22
-PREFIX = x86_64-w64-mingw32-
22
+# PREFIX = x86_64-w64-mingw32-
2323
2424
#### The toplevel directory of the source tree. Fossil can be built
2525
# in a directory that is separate from the source tree. Just change
2626
# the following to point from the build directory to the src/ folder.
2727
#
@@ -104,11 +104,11 @@
104104
# will run on the target platform. This is usually the same
105105
# as BCC, unless you are cross-compiling. This C compiler builds
106106
# the finished binary for fossil. The BCC compiler above is used
107107
# for building intermediate code-generator tools.
108108
#
109
-TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR)
109
+TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR)
110110
111111
#### Compile resources for use in building executables that will run
112112
# on the target platform.
113113
#
114114
RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR)
@@ -176,16 +176,14 @@
176176
LIB += -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32
177177
else
178178
LIB += -lkernel32 -lws2_32
179179
endif
180180
181
-LIB += -municode
182
-
183181
#### Tcl shell for use in running the fossil test suite. This is only
184182
# used for testing.
185183
#
186
-TCLSH = tclsh86
184
+TCLSH = tclsh
187185
188186
#### Nullsoft installer MakeNSIS location
189187
#
190188
MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe"
191189
192190
--- 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

Keyboard Shortcuts

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