Fossil SCM

Fix overlong lines and remove trailing whitespace from non-external C files.

danield 2024-02-02 22:22 trunk merge
Commit 275da70f8cc6b943752b1273a22b572f51018e01794b395814f9fa7bfdd2005c
89 files changed +3 -3 +1 -1 +2 -1 +1 -1 +3 -3 +11 -11 +4 -3 +4 -3 +4 -4 +2 -2 +1 -1 +5 -5 +6 -6 +2 -2 +1 -1 +1 -1 +13 -12 +9 -8 +14 -14 +16 -15 +4 -4 +4 -4 +8 -8 +1 -1 +10 -10 +4 -4 +3 -3 +7 -7 +1 -1 +3 -3 +4 -4 +49 -30 +9 -6 +3 -2 +2 -2 +15 -10 +4 -2 +2 -1 +20 -11 +2 -1 +11 -8 +11 -11 +1 -1 +7 -7 +3 -3 +4 -3 +2 -2 +2 -2 +1 -1 +4 -4 +13 -13 +2 -2 +3 -2 +3 -2 +9 -7 +2 -2 +7 -7 +3 -3 +1 -1 +2 -1 +2 -2 +2 -2 +2 -2 +1 -1 +12 -12 +1 -1 +13 -13 +3 -3 +2 -2 +2 -1 +2 -1 +6 -3 +20 -16 +2 -2 +2 -1 +1 -1 +3 -3 +2 -1 +5 -4 +12 -11 +1 -1 +7 -7 +4 -4 +17 -17 +1 -1 +4 -2 +1 -1 +2 -2 +4 -2
+3 -3
--- src/alerts.c
+++ src/alerts.c
@@ -1460,11 +1460,11 @@
14601460
}
14611461
14621462
/*
14631463
** Text of email message sent in order to confirm a subscription.
14641464
*/
1465
-static const char zConfirmMsg[] =
1465
+static const char zConfirmMsg[] =
14661466
@ Someone has signed you up for email alerts on the Fossil repository
14671467
@ at %s.
14681468
@
14691469
@ To confirm your subscription and begin receiving alerts, click on
14701470
@ the following hyperlink:
@@ -2563,11 +2563,11 @@
25632563
/*
25642564
** Compute a string that is appropriate for the EmailEvent.zPriors field
25652565
** for a particular forum post.
25662566
**
25672567
** This string is an encode list of sender names and rids for all ancestors
2568
-** of the fpdi post - the post that fpid answer, the post that that parent
2568
+** of the fpdi post - the post that fpid answer, the post that that parent
25692569
** post answers, and so forth back up to the root post. Duplicates sender
25702570
** names are omitted.
25712571
**
25722572
** The EmailEvent.zPriors field is used to screen events for people who
25732573
** only want to see replies to their own posts or to specific posts.
@@ -3223,11 +3223,11 @@
32233223
db_multi_exec("DELETE FROM pending_alert WHERE sentDigest AND sentSep;");
32243224
32253225
/* Send renewal messages to subscribers whose subscriptions are about
32263226
** to expire. Only do this if:
32273227
**
3228
- ** (1) email-renew-interval is 14 or greater (or in other words if
3228
+ ** (1) email-renew-interval is 14 or greater (or in other words if
32293229
** subscription expiration is enabled).
32303230
**
32313231
** (2) The SENDALERT_RENEWAL flag is set
32323232
*/
32333233
send_alert_expiration_warnings:
32343234
--- src/alerts.c
+++ src/alerts.c
@@ -1460,11 +1460,11 @@
1460 }
1461
1462 /*
1463 ** Text of email message sent in order to confirm a subscription.
1464 */
1465 static const char zConfirmMsg[] =
1466 @ Someone has signed you up for email alerts on the Fossil repository
1467 @ at %s.
1468 @
1469 @ To confirm your subscription and begin receiving alerts, click on
1470 @ the following hyperlink:
@@ -2563,11 +2563,11 @@
2563 /*
2564 ** Compute a string that is appropriate for the EmailEvent.zPriors field
2565 ** for a particular forum post.
2566 **
2567 ** This string is an encode list of sender names and rids for all ancestors
2568 ** of the fpdi post - the post that fpid answer, the post that that parent
2569 ** post answers, and so forth back up to the root post. Duplicates sender
2570 ** names are omitted.
2571 **
2572 ** The EmailEvent.zPriors field is used to screen events for people who
2573 ** only want to see replies to their own posts or to specific posts.
@@ -3223,11 +3223,11 @@
3223 db_multi_exec("DELETE FROM pending_alert WHERE sentDigest AND sentSep;");
3224
3225 /* Send renewal messages to subscribers whose subscriptions are about
3226 ** to expire. Only do this if:
3227 **
3228 ** (1) email-renew-interval is 14 or greater (or in other words if
3229 ** subscription expiration is enabled).
3230 **
3231 ** (2) The SENDALERT_RENEWAL flag is set
3232 */
3233 send_alert_expiration_warnings:
3234
--- src/alerts.c
+++ src/alerts.c
@@ -1460,11 +1460,11 @@
1460 }
1461
1462 /*
1463 ** Text of email message sent in order to confirm a subscription.
1464 */
1465 static const char zConfirmMsg[] =
1466 @ Someone has signed you up for email alerts on the Fossil repository
1467 @ at %s.
1468 @
1469 @ To confirm your subscription and begin receiving alerts, click on
1470 @ the following hyperlink:
@@ -2563,11 +2563,11 @@
2563 /*
2564 ** Compute a string that is appropriate for the EmailEvent.zPriors field
2565 ** for a particular forum post.
2566 **
2567 ** This string is an encode list of sender names and rids for all ancestors
2568 ** of the fpdi post - the post that fpid answer, the post that that parent
2569 ** post answers, and so forth back up to the root post. Duplicates sender
2570 ** names are omitted.
2571 **
2572 ** The EmailEvent.zPriors field is used to screen events for people who
2573 ** only want to see replies to their own posts or to specific posts.
@@ -3223,11 +3223,11 @@
3223 db_multi_exec("DELETE FROM pending_alert WHERE sentDigest AND sentSep;");
3224
3225 /* Send renewal messages to subscribers whose subscriptions are about
3226 ** to expire. Only do this if:
3227 **
3228 ** (1) email-renew-interval is 14 or greater (or in other words if
3229 ** subscription expiration is enabled).
3230 **
3231 ** (2) The SENDALERT_RENEWAL flag is set
3232 */
3233 send_alert_expiration_warnings:
3234
+1 -1
--- src/allrepo.c
+++ src/allrepo.c
@@ -134,11 +134,11 @@
134134
** but bind to the loopback TCP address only, enable
135135
** the --localauth option and automatically launch a
136136
** web-browser
137137
**
138138
** whatis Run the "whatis" command on all repositories. Only
139
-** show output for repositories that have a match.
139
+** show output for repositories that have a match.
140140
**
141141
**
142142
** In addition, the following maintenance operations are supported:
143143
**
144144
** add Add all the repositories named to the set of repositories
145145
--- src/allrepo.c
+++ src/allrepo.c
@@ -134,11 +134,11 @@
134 ** but bind to the loopback TCP address only, enable
135 ** the --localauth option and automatically launch a
136 ** web-browser
137 **
138 ** whatis Run the "whatis" command on all repositories. Only
139 ** show output for repositories that have a match.
140 **
141 **
142 ** In addition, the following maintenance operations are supported:
143 **
144 ** add Add all the repositories named to the set of repositories
145
--- src/allrepo.c
+++ src/allrepo.c
@@ -134,11 +134,11 @@
134 ** but bind to the loopback TCP address only, enable
135 ** the --localauth option and automatically launch a
136 ** web-browser
137 **
138 ** whatis Run the "whatis" command on all repositories. Only
139 ** show output for repositories that have a match.
140 **
141 **
142 ** In addition, the following maintenance operations are supported:
143 **
144 ** add Add all the repositories named to the set of repositories
145
+2 -1
--- src/attach.c
+++ src/attach.c
@@ -750,11 +750,12 @@
750750
}
751751
if( zBody==0 ){
752752
fossil_fatal("technote [%s] not found",zETime);
753753
}
754754
zTarget = db_text(0,
755
- "SELECT substr(tagname,7) FROM tag WHERE tagid=(SELECT tagid FROM event WHERE objid='%d')",
755
+ "SELECT substr(tagname,7) FROM tag "
756
+ " WHERE tagid=(SELECT tagid FROM event WHERE objid='%d')",
756757
rid
757758
);
758759
zFile = g.argv[3];
759760
}
760761
blob_read_from_file(&content, zFile, ExtFILE);
761762
--- src/attach.c
+++ src/attach.c
@@ -750,11 +750,12 @@
750 }
751 if( zBody==0 ){
752 fossil_fatal("technote [%s] not found",zETime);
753 }
754 zTarget = db_text(0,
755 "SELECT substr(tagname,7) FROM tag WHERE tagid=(SELECT tagid FROM event WHERE objid='%d')",
 
756 rid
757 );
758 zFile = g.argv[3];
759 }
760 blob_read_from_file(&content, zFile, ExtFILE);
761
--- src/attach.c
+++ src/attach.c
@@ -750,11 +750,12 @@
750 }
751 if( zBody==0 ){
752 fossil_fatal("technote [%s] not found",zETime);
753 }
754 zTarget = db_text(0,
755 "SELECT substr(tagname,7) FROM tag "
756 " WHERE tagid=(SELECT tagid FROM event WHERE objid='%d')",
757 rid
758 );
759 zFile = g.argv[3];
760 }
761 blob_read_from_file(&content, zFile, ExtFILE);
762
+1 -1
--- src/backlink.c
+++ src/backlink.c
@@ -249,11 +249,11 @@
249249
Backlink *p = (Backlink*)opaque;
250250
char *zTarget = blob_buffer(target);
251251
int nTarget = blob_size(target);
252252
253253
backlink_create(p, zTarget, nTarget);
254
- return 1;
254
+ return 1;
255255
}
256256
257257
/* No-op routines for the rendering callbacks that we do not need */
258258
static void mkdn_noop_prolog(Blob *b, void *v){ return; }
259259
static void (*mkdn_noop_epilog)(Blob*, void*) = mkdn_noop_prolog;
260260
--- src/backlink.c
+++ src/backlink.c
@@ -249,11 +249,11 @@
249 Backlink *p = (Backlink*)opaque;
250 char *zTarget = blob_buffer(target);
251 int nTarget = blob_size(target);
252
253 backlink_create(p, zTarget, nTarget);
254 return 1;
255 }
256
257 /* No-op routines for the rendering callbacks that we do not need */
258 static void mkdn_noop_prolog(Blob *b, void *v){ return; }
259 static void (*mkdn_noop_epilog)(Blob*, void*) = mkdn_noop_prolog;
260
--- src/backlink.c
+++ src/backlink.c
@@ -249,11 +249,11 @@
249 Backlink *p = (Backlink*)opaque;
250 char *zTarget = blob_buffer(target);
251 int nTarget = blob_size(target);
252
253 backlink_create(p, zTarget, nTarget);
254 return 1;
255 }
256
257 /* No-op routines for the rendering callbacks that we do not need */
258 static void mkdn_noop_prolog(Blob *b, void *v){ return; }
259 static void (*mkdn_noop_epilog)(Blob*, void*) = mkdn_noop_prolog;
260
--- src/backoffice.c
+++ src/backoffice.c
@@ -315,11 +315,11 @@
315315
static int backofficeProcessExists(sqlite3_uint64 pid){
316316
#if defined(_WIN32)
317317
return pid>0 && backofficeWin32ProcessExists((DWORD)pid)!=0;
318318
#else
319319
return pid>0 && kill((pid_t)pid, 0)==0;
320
-#endif
320
+#endif
321321
}
322322
323323
/*
324324
** Check to see if the process identified by pid has finished. If
325325
** we cannot prove that the process is still running, return true.
@@ -327,11 +327,11 @@
327327
static int backofficeProcessDone(sqlite3_uint64 pid){
328328
#if defined(_WIN32)
329329
return pid<=0 || backofficeWin32ProcessExists((DWORD)pid)==0;
330330
#else
331331
return pid<=0 || kill((pid_t)pid, 0)!=0;
332
-#endif
332
+#endif
333333
}
334334
335335
/*
336336
** Return a process id number for the current process
337337
*/
@@ -675,11 +675,11 @@
675675
** to run this command as a daemon that will periodically invoke backoffice
676676
** on a collection of repositories.
677677
**
678678
** If only a single repository is named and --poll is omitted, then the
679679
** backoffice work is done in-process. But if there are multiple repositories
680
-** or if --poll is used, a separate sub-process is started for each poll of
680
+** or if --poll is used, a separate sub-process is started for each poll of
681681
** each repository.
682682
**
683683
** Standard options:
684684
**
685685
** --debug Show what this command is doing
686686
--- src/backoffice.c
+++ src/backoffice.c
@@ -315,11 +315,11 @@
315 static int backofficeProcessExists(sqlite3_uint64 pid){
316 #if defined(_WIN32)
317 return pid>0 && backofficeWin32ProcessExists((DWORD)pid)!=0;
318 #else
319 return pid>0 && kill((pid_t)pid, 0)==0;
320 #endif
321 }
322
323 /*
324 ** Check to see if the process identified by pid has finished. If
325 ** we cannot prove that the process is still running, return true.
@@ -327,11 +327,11 @@
327 static int backofficeProcessDone(sqlite3_uint64 pid){
328 #if defined(_WIN32)
329 return pid<=0 || backofficeWin32ProcessExists((DWORD)pid)==0;
330 #else
331 return pid<=0 || kill((pid_t)pid, 0)!=0;
332 #endif
333 }
334
335 /*
336 ** Return a process id number for the current process
337 */
@@ -675,11 +675,11 @@
675 ** to run this command as a daemon that will periodically invoke backoffice
676 ** on a collection of repositories.
677 **
678 ** If only a single repository is named and --poll is omitted, then the
679 ** backoffice work is done in-process. But if there are multiple repositories
680 ** or if --poll is used, a separate sub-process is started for each poll of
681 ** each repository.
682 **
683 ** Standard options:
684 **
685 ** --debug Show what this command is doing
686
--- src/backoffice.c
+++ src/backoffice.c
@@ -315,11 +315,11 @@
315 static int backofficeProcessExists(sqlite3_uint64 pid){
316 #if defined(_WIN32)
317 return pid>0 && backofficeWin32ProcessExists((DWORD)pid)!=0;
318 #else
319 return pid>0 && kill((pid_t)pid, 0)==0;
320 #endif
321 }
322
323 /*
324 ** Check to see if the process identified by pid has finished. If
325 ** we cannot prove that the process is still running, return true.
@@ -327,11 +327,11 @@
327 static int backofficeProcessDone(sqlite3_uint64 pid){
328 #if defined(_WIN32)
329 return pid<=0 || backofficeWin32ProcessExists((DWORD)pid)==0;
330 #else
331 return pid<=0 || kill((pid_t)pid, 0)!=0;
332 #endif
333 }
334
335 /*
336 ** Return a process id number for the current process
337 */
@@ -675,11 +675,11 @@
675 ** to run this command as a daemon that will periodically invoke backoffice
676 ** on a collection of repositories.
677 **
678 ** If only a single repository is named and --poll is omitted, then the
679 ** backoffice work is done in-process. But if there are multiple repositories
680 ** or if --poll is used, a separate sub-process is started for each poll of
681 ** each repository.
682 **
683 ** Standard options:
684 **
685 ** --debug Show what this command is doing
686
+11 -11
--- src/blob.c
+++ src/blob.c
@@ -1551,19 +1551,19 @@
15511551
}
15521552
}
15531553
15541554
/*
15551555
** ASCII (for reference):
1556
-** x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf
1557
-** 0x ^` ^a ^b ^c ^d ^e ^f ^g \b \t \n () \f \r ^n ^o
1558
-** 1x ^p ^q ^r ^s ^t ^u ^v ^w ^x ^y ^z ^{ ^| ^} ^~ ^
1559
-** 2x () ! " # $ % & ' ( ) * + , - . /
1560
-** 3x 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
1561
-** 4x @ A B C D E F G H I J K L M N O
1562
-** 5x P Q R S T U V W X Y Z [ \ ] ^ _
1563
-** 6x ` a b c d e f g h i j k l m n o
1564
-** 7x p q r s t u v w x y z { | } ~ ^_
1556
+** x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf
1557
+** 0x ^` ^a ^b ^c ^d ^e ^f ^g \b \t \n () \f \r ^n ^o
1558
+** 1x ^p ^q ^r ^s ^t ^u ^v ^w ^x ^y ^z ^{ ^| ^} ^~ ^
1559
+** 2x () ! " # $ % & ' ( ) * + , - . /
1560
+** 3x 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
1561
+** 4x @ A B C D E F G H I J K L M N O
1562
+** 5x P Q R S T U V W X Y Z [ \ ] ^ _
1563
+** 6x ` a b c d e f g h i j k l m n o
1564
+** 7x p q r s t u v w x y z { | } ~ ^_
15651565
*/
15661566
15671567
/*
15681568
** Meanings for bytes in a filename:
15691569
**
@@ -1665,11 +1665,11 @@
16651665
"an illegal UTF-8 character",
16661666
zIn, blob_str(&bad));
16671667
}
16681668
i += x-2;
16691669
}
1670
- }
1670
+ }
16711671
}
16721672
16731673
/* Separate from the previous argument by a space */
16741674
if( n>0 && !fossil_isspace(z[n-1]) ){
16751675
blob_append_char(pBlob, ' ');
@@ -1795,11 +1795,11 @@
17951795
if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='\\' ) zArg += 2;
17961796
#else
17971797
if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='/' ) zArg += 2;
17981798
#endif
17991799
if( strcmp(zBuf, zArg)!=0 ){
1800
- fossil_fatal("argument disagree: \"%s\" (%s) versus \"%s\"",
1800
+ fossil_fatal("argument disagree: \"%s\" (%s) versus \"%s\"",
18011801
zBuf, g.argv[i-1], zArg);
18021802
}
18031803
continue;
18041804
}else if( fossil_strcmp(zArg, "--fuzz")==0 && i+1<g.argc ){
18051805
int n = atoi(g.argv[++i]);
18061806
--- src/blob.c
+++ src/blob.c
@@ -1551,19 +1551,19 @@
1551 }
1552 }
1553
1554 /*
1555 ** ASCII (for reference):
1556 ** x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf
1557 ** 0x ^` ^a ^b ^c ^d ^e ^f ^g \b \t \n () \f \r ^n ^o
1558 ** 1x ^p ^q ^r ^s ^t ^u ^v ^w ^x ^y ^z ^{ ^| ^} ^~ ^
1559 ** 2x () ! " # $ % & ' ( ) * + , - . /
1560 ** 3x 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
1561 ** 4x @ A B C D E F G H I J K L M N O
1562 ** 5x P Q R S T U V W X Y Z [ \ ] ^ _
1563 ** 6x ` a b c d e f g h i j k l m n o
1564 ** 7x p q r s t u v w x y z { | } ~ ^_
1565 */
1566
1567 /*
1568 ** Meanings for bytes in a filename:
1569 **
@@ -1665,11 +1665,11 @@
1665 "an illegal UTF-8 character",
1666 zIn, blob_str(&bad));
1667 }
1668 i += x-2;
1669 }
1670 }
1671 }
1672
1673 /* Separate from the previous argument by a space */
1674 if( n>0 && !fossil_isspace(z[n-1]) ){
1675 blob_append_char(pBlob, ' ');
@@ -1795,11 +1795,11 @@
1795 if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='\\' ) zArg += 2;
1796 #else
1797 if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='/' ) zArg += 2;
1798 #endif
1799 if( strcmp(zBuf, zArg)!=0 ){
1800 fossil_fatal("argument disagree: \"%s\" (%s) versus \"%s\"",
1801 zBuf, g.argv[i-1], zArg);
1802 }
1803 continue;
1804 }else if( fossil_strcmp(zArg, "--fuzz")==0 && i+1<g.argc ){
1805 int n = atoi(g.argv[++i]);
1806
--- src/blob.c
+++ src/blob.c
@@ -1551,19 +1551,19 @@
1551 }
1552 }
1553
1554 /*
1555 ** ASCII (for reference):
1556 ** x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf
1557 ** 0x ^` ^a ^b ^c ^d ^e ^f ^g \b \t \n () \f \r ^n ^o
1558 ** 1x ^p ^q ^r ^s ^t ^u ^v ^w ^x ^y ^z ^{ ^| ^} ^~ ^
1559 ** 2x () ! " # $ % & ' ( ) * + , - . /
1560 ** 3x 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
1561 ** 4x @ A B C D E F G H I J K L M N O
1562 ** 5x P Q R S T U V W X Y Z [ \ ] ^ _
1563 ** 6x ` a b c d e f g h i j k l m n o
1564 ** 7x p q r s t u v w x y z { | } ~ ^_
1565 */
1566
1567 /*
1568 ** Meanings for bytes in a filename:
1569 **
@@ -1665,11 +1665,11 @@
1665 "an illegal UTF-8 character",
1666 zIn, blob_str(&bad));
1667 }
1668 i += x-2;
1669 }
1670 }
1671 }
1672
1673 /* Separate from the previous argument by a space */
1674 if( n>0 && !fossil_isspace(z[n-1]) ){
1675 blob_append_char(pBlob, ' ');
@@ -1795,11 +1795,11 @@
1795 if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='\\' ) zArg += 2;
1796 #else
1797 if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='/' ) zArg += 2;
1798 #endif
1799 if( strcmp(zBuf, zArg)!=0 ){
1800 fossil_fatal("argument disagree: \"%s\" (%s) versus \"%s\"",
1801 zBuf, g.argv[i-1], zArg);
1802 }
1803 continue;
1804 }else if( fossil_strcmp(zArg, "--fuzz")==0 && i+1<g.argc ){
1805 int n = atoi(g.argv[++i]);
1806
+4 -3
--- src/branch.c
+++ src/branch.c
@@ -340,11 +340,12 @@
340340
);
341341
break;
342342
}
343343
case BRL_OPEN_ONLY: {
344344
blob_append_sql(&sql,
345
- "SELECT name, isprivate, mtime, mergeto FROM tmp_brlist WHERE NOT isclosed"
345
+ "SELECT name, isprivate, mtime, mergeto FROM tmp_brlist "
346
+ " WHERE NOT isclosed"
346347
);
347348
break;
348349
}
349350
}
350351
if( brFlags & BRL_PRIVATE ) blob_append_sql(&sql, " AND isprivate");
@@ -772,11 +773,11 @@
772773
int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0;
773774
const char *zUsers = db_column_text(&q, 3);
774775
if( (brFlags & BRL_MERGED) && fossil_strcmp(zCurrent,zMergeTo)!=0 ){
775776
continue;
776777
}
777
- if( (brFlags & BRL_UNMERGED) && (fossil_strcmp(zCurrent,zMergeTo)==0
778
+ if( (brFlags & BRL_UNMERGED) && (fossil_strcmp(zCurrent,zMergeTo)==0
778779
|| isCur) ){
779780
continue;
780781
}
781782
blob_appendf(&txt, "%s%s%s",
782783
( (brFlags & BRL_PRIVATE) ? " " : ( isPriv ? "#" : " ") ),
@@ -886,11 +887,11 @@
886887
if( zBgClr && zBgClr[0] && show_colors ){
887888
@ <tr style="background-color:%s(zBgClr)">
888889
}else{
889890
@ <tr>
890891
}
891
- @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a><input
892
+ @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a><input
892893
@ type="checkbox" disabled="disabled"/></td>
893894
@ <td data-sortkey="%016llx(iMtime)">%s(zAge)</td>
894895
@ <td>%d(nCkin)</td>
895896
fossil_free(zAge);
896897
@ <td>%s(isClosed?"closed":"")</td>
897898
--- src/branch.c
+++ src/branch.c
@@ -340,11 +340,12 @@
340 );
341 break;
342 }
343 case BRL_OPEN_ONLY: {
344 blob_append_sql(&sql,
345 "SELECT name, isprivate, mtime, mergeto FROM tmp_brlist WHERE NOT isclosed"
 
346 );
347 break;
348 }
349 }
350 if( brFlags & BRL_PRIVATE ) blob_append_sql(&sql, " AND isprivate");
@@ -772,11 +773,11 @@
772 int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0;
773 const char *zUsers = db_column_text(&q, 3);
774 if( (brFlags & BRL_MERGED) && fossil_strcmp(zCurrent,zMergeTo)!=0 ){
775 continue;
776 }
777 if( (brFlags & BRL_UNMERGED) && (fossil_strcmp(zCurrent,zMergeTo)==0
778 || isCur) ){
779 continue;
780 }
781 blob_appendf(&txt, "%s%s%s",
782 ( (brFlags & BRL_PRIVATE) ? " " : ( isPriv ? "#" : " ") ),
@@ -886,11 +887,11 @@
886 if( zBgClr && zBgClr[0] && show_colors ){
887 @ <tr style="background-color:%s(zBgClr)">
888 }else{
889 @ <tr>
890 }
891 @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a><input
892 @ type="checkbox" disabled="disabled"/></td>
893 @ <td data-sortkey="%016llx(iMtime)">%s(zAge)</td>
894 @ <td>%d(nCkin)</td>
895 fossil_free(zAge);
896 @ <td>%s(isClosed?"closed":"")</td>
897
--- src/branch.c
+++ src/branch.c
@@ -340,11 +340,12 @@
340 );
341 break;
342 }
343 case BRL_OPEN_ONLY: {
344 blob_append_sql(&sql,
345 "SELECT name, isprivate, mtime, mergeto FROM tmp_brlist "
346 " WHERE NOT isclosed"
347 );
348 break;
349 }
350 }
351 if( brFlags & BRL_PRIVATE ) blob_append_sql(&sql, " AND isprivate");
@@ -772,11 +773,11 @@
773 int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0;
774 const char *zUsers = db_column_text(&q, 3);
775 if( (brFlags & BRL_MERGED) && fossil_strcmp(zCurrent,zMergeTo)!=0 ){
776 continue;
777 }
778 if( (brFlags & BRL_UNMERGED) && (fossil_strcmp(zCurrent,zMergeTo)==0
779 || isCur) ){
780 continue;
781 }
782 blob_appendf(&txt, "%s%s%s",
783 ( (brFlags & BRL_PRIVATE) ? " " : ( isPriv ? "#" : " ") ),
@@ -886,11 +887,11 @@
887 if( zBgClr && zBgClr[0] && show_colors ){
888 @ <tr style="background-color:%s(zBgClr)">
889 }else{
890 @ <tr>
891 }
892 @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a><input
893 @ type="checkbox" disabled="disabled"/></td>
894 @ <td data-sortkey="%016llx(iMtime)">%s(zAge)</td>
895 @ <td>%d(nCkin)</td>
896 fossil_free(zAge);
897 @ <td>%s(isClosed?"closed":"")</td>
898
+4 -3
--- src/browse.c
+++ src/browse.c
@@ -358,11 +358,11 @@
358358
** directory.
359359
*/
360360
mxLen = db_int(12, "SELECT max(length(x)) FROM localfiles /*scan*/");
361361
if( mxLen<12 ) mxLen = 12;
362362
mxLen += (mxLen+9)/10;
363
- db_prepare(&q,
363
+ db_prepare(&q,
364364
"SELECT x, u FROM localfiles ORDER BY x COLLATE uintnocase /*scan*/");
365365
@ <div class="columns files" style="columns: %d(mxLen)ex auto">
366366
@ <ul class="browser">
367367
while( db_step(&q)==SQLITE_ROW ){
368368
const char *zFN;
@@ -471,11 +471,12 @@
471471
FileTreeNode *pLastChild; /* Last child on the pChild list */
472472
char *zName; /* Name of this entry. The "tail" */
473473
char *zFullName; /* Full pathname of this entry */
474474
char *zUuid; /* Artifact hash of this file. May be NULL. */
475475
double mtime; /* Modification time for this entry */
476
- double sortBy; /* Either mtime or size, depending on desired sort order */
476
+ double sortBy; /* Either mtime or size, depending on desired
477
+ sort order */
477478
int iSize; /* Size for this entry */
478479
unsigned nFullName; /* Length of zFullName */
479480
unsigned iLevel; /* Levels of parent directories */
480481
};
481482
@@ -508,11 +509,11 @@
508509
int size, /* Size for this entry */
509510
int sortOrder /* 0: filename, 1: mtime, 2: size */
510511
){
511512
int i;
512513
FileTreeNode *pParent; /* Parent (directory) of the next node to insert */
513
-
514
+
514515
/* Make pParent point to the most recent ancestor of zPath, or
515516
** NULL if there are no prior entires that are a container for zPath.
516517
*/
517518
pParent = pTree->pLast;
518519
while( pParent!=0 &&
519520
--- src/browse.c
+++ src/browse.c
@@ -358,11 +358,11 @@
358 ** directory.
359 */
360 mxLen = db_int(12, "SELECT max(length(x)) FROM localfiles /*scan*/");
361 if( mxLen<12 ) mxLen = 12;
362 mxLen += (mxLen+9)/10;
363 db_prepare(&q,
364 "SELECT x, u FROM localfiles ORDER BY x COLLATE uintnocase /*scan*/");
365 @ <div class="columns files" style="columns: %d(mxLen)ex auto">
366 @ <ul class="browser">
367 while( db_step(&q)==SQLITE_ROW ){
368 const char *zFN;
@@ -471,11 +471,12 @@
471 FileTreeNode *pLastChild; /* Last child on the pChild list */
472 char *zName; /* Name of this entry. The "tail" */
473 char *zFullName; /* Full pathname of this entry */
474 char *zUuid; /* Artifact hash of this file. May be NULL. */
475 double mtime; /* Modification time for this entry */
476 double sortBy; /* Either mtime or size, depending on desired sort order */
 
477 int iSize; /* Size for this entry */
478 unsigned nFullName; /* Length of zFullName */
479 unsigned iLevel; /* Levels of parent directories */
480 };
481
@@ -508,11 +509,11 @@
508 int size, /* Size for this entry */
509 int sortOrder /* 0: filename, 1: mtime, 2: size */
510 ){
511 int i;
512 FileTreeNode *pParent; /* Parent (directory) of the next node to insert */
513
514 /* Make pParent point to the most recent ancestor of zPath, or
515 ** NULL if there are no prior entires that are a container for zPath.
516 */
517 pParent = pTree->pLast;
518 while( pParent!=0 &&
519
--- src/browse.c
+++ src/browse.c
@@ -358,11 +358,11 @@
358 ** directory.
359 */
360 mxLen = db_int(12, "SELECT max(length(x)) FROM localfiles /*scan*/");
361 if( mxLen<12 ) mxLen = 12;
362 mxLen += (mxLen+9)/10;
363 db_prepare(&q,
364 "SELECT x, u FROM localfiles ORDER BY x COLLATE uintnocase /*scan*/");
365 @ <div class="columns files" style="columns: %d(mxLen)ex auto">
366 @ <ul class="browser">
367 while( db_step(&q)==SQLITE_ROW ){
368 const char *zFN;
@@ -471,11 +471,12 @@
471 FileTreeNode *pLastChild; /* Last child on the pChild list */
472 char *zName; /* Name of this entry. The "tail" */
473 char *zFullName; /* Full pathname of this entry */
474 char *zUuid; /* Artifact hash of this file. May be NULL. */
475 double mtime; /* Modification time for this entry */
476 double sortBy; /* Either mtime or size, depending on desired
477 sort order */
478 int iSize; /* Size for this entry */
479 unsigned nFullName; /* Length of zFullName */
480 unsigned iLevel; /* Levels of parent directories */
481 };
482
@@ -508,11 +509,11 @@
509 int size, /* Size for this entry */
510 int sortOrder /* 0: filename, 1: mtime, 2: size */
511 ){
512 int i;
513 FileTreeNode *pParent; /* Parent (directory) of the next node to insert */
514
515 /* Make pParent point to the most recent ancestor of zPath, or
516 ** NULL if there are no prior entires that are a container for zPath.
517 */
518 pParent = pTree->pLast;
519 while( pParent!=0 &&
520
+4 -4
--- src/builtin.c
+++ src/builtin.c
@@ -521,15 +521,15 @@
521521
}
522522
523523
/*
524524
** This method is called to "rewind" the builtinVtab_cursor object back
525525
** to the first row of output. This method is always called at least
526
-** once prior to any call to builtinVtabColumn() or builtinVtabRowid() or
526
+** once prior to any call to builtinVtabColumn() or builtinVtabRowid() or
527527
** builtinVtabEof().
528528
*/
529529
static int builtinVtabFilter(
530
- sqlite3_vtab_cursor *pVtabCursor,
530
+ sqlite3_vtab_cursor *pVtabCursor,
531531
int idxNum, const char *idxStr,
532532
int argc, sqlite3_value **argv
533533
){
534534
builtinVtab_cursor *pCur = (builtinVtab_cursor *)pVtabCursor;
535535
pCur->iRowid = 1;
@@ -550,11 +550,11 @@
550550
pIdxInfo->estimatedRows = count(aBuiltinFiles);
551551
return SQLITE_OK;
552552
}
553553
554554
/*
555
-** This following structure defines all the methods for the
555
+** This following structure defines all the methods for the
556556
** virtual table.
557557
*/
558558
static sqlite3_module builtinVtabModule = {
559559
/* iVersion */ 0,
560560
/* xCreate */ 0, /* The builtin vtab is eponymous and read-only */
@@ -816,11 +816,11 @@
816816
** This function has an internal mapping of the dependencies for each
817817
** of the known fossil.XYZ.js modules and ensures that the
818818
** dependencies also get queued (recursively) and that each module is
819819
** queued only once.
820820
**
821
-** If passed a name which is not a base fossil module name then it
821
+** If passed a name which is not a base fossil module name then it
822822
** will fail fatally!
823823
**
824824
** DO NOT use this for loading fossil.page.*.js: use
825825
** builtin_request_js() for those.
826826
**
827827
--- src/builtin.c
+++ src/builtin.c
@@ -521,15 +521,15 @@
521 }
522
523 /*
524 ** This method is called to "rewind" the builtinVtab_cursor object back
525 ** to the first row of output. This method is always called at least
526 ** once prior to any call to builtinVtabColumn() or builtinVtabRowid() or
527 ** builtinVtabEof().
528 */
529 static int builtinVtabFilter(
530 sqlite3_vtab_cursor *pVtabCursor,
531 int idxNum, const char *idxStr,
532 int argc, sqlite3_value **argv
533 ){
534 builtinVtab_cursor *pCur = (builtinVtab_cursor *)pVtabCursor;
535 pCur->iRowid = 1;
@@ -550,11 +550,11 @@
550 pIdxInfo->estimatedRows = count(aBuiltinFiles);
551 return SQLITE_OK;
552 }
553
554 /*
555 ** This following structure defines all the methods for the
556 ** virtual table.
557 */
558 static sqlite3_module builtinVtabModule = {
559 /* iVersion */ 0,
560 /* xCreate */ 0, /* The builtin vtab is eponymous and read-only */
@@ -816,11 +816,11 @@
816 ** This function has an internal mapping of the dependencies for each
817 ** of the known fossil.XYZ.js modules and ensures that the
818 ** dependencies also get queued (recursively) and that each module is
819 ** queued only once.
820 **
821 ** If passed a name which is not a base fossil module name then it
822 ** will fail fatally!
823 **
824 ** DO NOT use this for loading fossil.page.*.js: use
825 ** builtin_request_js() for those.
826 **
827
--- src/builtin.c
+++ src/builtin.c
@@ -521,15 +521,15 @@
521 }
522
523 /*
524 ** This method is called to "rewind" the builtinVtab_cursor object back
525 ** to the first row of output. This method is always called at least
526 ** once prior to any call to builtinVtabColumn() or builtinVtabRowid() or
527 ** builtinVtabEof().
528 */
529 static int builtinVtabFilter(
530 sqlite3_vtab_cursor *pVtabCursor,
531 int idxNum, const char *idxStr,
532 int argc, sqlite3_value **argv
533 ){
534 builtinVtab_cursor *pCur = (builtinVtab_cursor *)pVtabCursor;
535 pCur->iRowid = 1;
@@ -550,11 +550,11 @@
550 pIdxInfo->estimatedRows = count(aBuiltinFiles);
551 return SQLITE_OK;
552 }
553
554 /*
555 ** This following structure defines all the methods for the
556 ** virtual table.
557 */
558 static sqlite3_module builtinVtabModule = {
559 /* iVersion */ 0,
560 /* xCreate */ 0, /* The builtin vtab is eponymous and read-only */
@@ -816,11 +816,11 @@
816 ** This function has an internal mapping of the dependencies for each
817 ** of the known fossil.XYZ.js modules and ensures that the
818 ** dependencies also get queued (recursively) and that each module is
819 ** queued only once.
820 **
821 ** If passed a name which is not a base fossil module name then it
822 ** will fail fatally!
823 **
824 ** DO NOT use this for loading fossil.page.*.js: use
825 ** builtin_request_js() for those.
826 **
827
+2 -2
--- src/cache.c
+++ src/cache.c
@@ -313,11 +313,11 @@
313313
fossil_print("cache cleared\n");
314314
}else{
315315
fossil_print("nothing to clear; cache does not exist\n");
316316
}
317317
}else if( strncmp(zCmd, "list", nCmd)==0
318
- || strncmp(zCmd, "ls", nCmd)==0
318
+ || strncmp(zCmd, "ls", nCmd)==0
319319
|| strncmp(zCmd, "status", nCmd)==0
320320
){
321321
db = cacheOpen(0);
322322
if( db==0 ){
323323
fossil_print("cache does not exist\n");
@@ -432,11 +432,11 @@
432432
if( zHash ){
433433
@ %z(href("%R/timeline?c=%S",zHash))check-in</a>\
434434
fossil_free(zHash);
435435
}
436436
@ </p></li>
437
-
437
+
438438
}
439439
sqlite3_finalize(pStmt);
440440
@ </ol>
441441
}
442442
zDbName = cacheName();
443443
--- src/cache.c
+++ src/cache.c
@@ -313,11 +313,11 @@
313 fossil_print("cache cleared\n");
314 }else{
315 fossil_print("nothing to clear; cache does not exist\n");
316 }
317 }else if( strncmp(zCmd, "list", nCmd)==0
318 || strncmp(zCmd, "ls", nCmd)==0
319 || strncmp(zCmd, "status", nCmd)==0
320 ){
321 db = cacheOpen(0);
322 if( db==0 ){
323 fossil_print("cache does not exist\n");
@@ -432,11 +432,11 @@
432 if( zHash ){
433 @ %z(href("%R/timeline?c=%S",zHash))check-in</a>\
434 fossil_free(zHash);
435 }
436 @ </p></li>
437
438 }
439 sqlite3_finalize(pStmt);
440 @ </ol>
441 }
442 zDbName = cacheName();
443
--- src/cache.c
+++ src/cache.c
@@ -313,11 +313,11 @@
313 fossil_print("cache cleared\n");
314 }else{
315 fossil_print("nothing to clear; cache does not exist\n");
316 }
317 }else if( strncmp(zCmd, "list", nCmd)==0
318 || strncmp(zCmd, "ls", nCmd)==0
319 || strncmp(zCmd, "status", nCmd)==0
320 ){
321 db = cacheOpen(0);
322 if( db==0 ){
323 fossil_print("cache does not exist\n");
@@ -432,11 +432,11 @@
432 if( zHash ){
433 @ %z(href("%R/timeline?c=%S",zHash))check-in</a>\
434 fossil_free(zHash);
435 }
436 @ </p></li>
437
438 }
439 sqlite3_finalize(pStmt);
440 @ </ol>
441 }
442 zDbName = cacheName();
443
--- src/capabilities.c
+++ src/capabilities.c
@@ -401,11 +401,11 @@
401401
const char *zId = db_column_text(&q, 0);
402402
const char *zCap = db_column_text(&q, 1);
403403
int n = db_column_int(&q, 3);
404404
int eType;
405405
static const char *const azType[] = { "off", "read", "write" };
406
- static const char *const azClass[] =
406
+ static const char *const azClass[] =
407407
{ "capsumOff", "capsumRead", "capsumWrite" };
408408
409409
if( n==0 ) continue;
410410
411411
/* Code */
412412
--- src/capabilities.c
+++ src/capabilities.c
@@ -401,11 +401,11 @@
401 const char *zId = db_column_text(&q, 0);
402 const char *zCap = db_column_text(&q, 1);
403 int n = db_column_int(&q, 3);
404 int eType;
405 static const char *const azType[] = { "off", "read", "write" };
406 static const char *const azClass[] =
407 { "capsumOff", "capsumRead", "capsumWrite" };
408
409 if( n==0 ) continue;
410
411 /* Code */
412
--- src/capabilities.c
+++ src/capabilities.c
@@ -401,11 +401,11 @@
401 const char *zId = db_column_text(&q, 0);
402 const char *zCap = db_column_text(&q, 1);
403 int n = db_column_int(&q, 3);
404 int eType;
405 static const char *const azType[] = { "off", "read", "write" };
406 static const char *const azClass[] =
407 { "capsumOff", "capsumRead", "capsumWrite" };
408
409 if( n==0 ) continue;
410
411 /* Code */
412
+5 -5
--- src/cgi.c
+++ src/cgi.c
@@ -37,11 +37,11 @@
3737
** received by a variety of means, and to generate well-formatted replies
3838
** to those requests.
3939
**
4040
** The code in this file abstracts the web-request so that downstream
4141
** modules that generate the body of the reply (based on the requested page)
42
-** do not need to know if the request is coming from CGI, direct HTTP,
42
+** do not need to know if the request is coming from CGI, direct HTTP,
4343
** SCGI, or some other means.
4444
**
4545
** This module gathers information about web page request into a key/value
4646
** store. Keys and values come from:
4747
**
@@ -481,11 +481,11 @@
481481
zReplyStatus = "OK";
482482
}
483483
484484
if( g.fullHttpReply ){
485485
if( rangeEnd>0
486
- && iReplyStatus==200
486
+ && iReplyStatus==200
487487
&& fossil_strcmp(P("REQUEST_METHOD"),"GET")==0
488488
){
489489
iReplyStatus = 206;
490490
zReplyStatus = "Partial Content";
491491
}
@@ -562,11 +562,11 @@
562562
}
563563
total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]);
564564
if( iReplyStatus==206 ){
565565
blob_appendf(&hdr, "Content-Range: bytes %d-%d/%d\r\n",
566566
rangeStart, rangeEnd-1, total_size);
567
- total_size = rangeEnd - rangeStart;
567
+ total_size = rangeEnd - rangeStart;
568568
}
569569
blob_appendf(&hdr, "Content-Length: %d\r\n", total_size);
570570
}else{
571571
total_size = 0;
572572
}
@@ -1311,11 +1311,11 @@
13111311
** \___/ \____________/\____/\____________________/ \_/
13121312
** | | | | |
13131313
** | HTTP_HOST | PATH_INFO QUERY_STRING
13141314
** | |
13151315
** REQUEST_SCHEMA SCRIPT_NAME
1316
-**
1316
+**
13171317
*/
13181318
void cgi_init(void){
13191319
char *z;
13201320
const char *zType;
13211321
char *zSemi;
@@ -1348,11 +1348,11 @@
13481348
}
13491349
13501350
#ifdef _WIN32
13511351
/* The Microsoft IIS web server does not define REQUEST_URI, instead it uses
13521352
** PATH_INFO for virtually the same purpose. Define REQUEST_URI the same as
1353
- ** PATH_INFO and redefine PATH_INFO with SCRIPT_NAME removed from the
1353
+ ** PATH_INFO and redefine PATH_INFO with SCRIPT_NAME removed from the
13541354
** beginning. */
13551355
if( zServerSoftware && strstr(zServerSoftware, "Microsoft-IIS") ){
13561356
int i, j;
13571357
cgi_set_parameter("REQUEST_URI", zPathInfo);
13581358
for(i=0; zPathInfo[i]==zScriptName[i] && zPathInfo[i]; i++){}
13591359
--- src/cgi.c
+++ src/cgi.c
@@ -37,11 +37,11 @@
37 ** received by a variety of means, and to generate well-formatted replies
38 ** to those requests.
39 **
40 ** The code in this file abstracts the web-request so that downstream
41 ** modules that generate the body of the reply (based on the requested page)
42 ** do not need to know if the request is coming from CGI, direct HTTP,
43 ** SCGI, or some other means.
44 **
45 ** This module gathers information about web page request into a key/value
46 ** store. Keys and values come from:
47 **
@@ -481,11 +481,11 @@
481 zReplyStatus = "OK";
482 }
483
484 if( g.fullHttpReply ){
485 if( rangeEnd>0
486 && iReplyStatus==200
487 && fossil_strcmp(P("REQUEST_METHOD"),"GET")==0
488 ){
489 iReplyStatus = 206;
490 zReplyStatus = "Partial Content";
491 }
@@ -562,11 +562,11 @@
562 }
563 total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]);
564 if( iReplyStatus==206 ){
565 blob_appendf(&hdr, "Content-Range: bytes %d-%d/%d\r\n",
566 rangeStart, rangeEnd-1, total_size);
567 total_size = rangeEnd - rangeStart;
568 }
569 blob_appendf(&hdr, "Content-Length: %d\r\n", total_size);
570 }else{
571 total_size = 0;
572 }
@@ -1311,11 +1311,11 @@
1311 ** \___/ \____________/\____/\____________________/ \_/
1312 ** | | | | |
1313 ** | HTTP_HOST | PATH_INFO QUERY_STRING
1314 ** | |
1315 ** REQUEST_SCHEMA SCRIPT_NAME
1316 **
1317 */
1318 void cgi_init(void){
1319 char *z;
1320 const char *zType;
1321 char *zSemi;
@@ -1348,11 +1348,11 @@
1348 }
1349
1350 #ifdef _WIN32
1351 /* The Microsoft IIS web server does not define REQUEST_URI, instead it uses
1352 ** PATH_INFO for virtually the same purpose. Define REQUEST_URI the same as
1353 ** PATH_INFO and redefine PATH_INFO with SCRIPT_NAME removed from the
1354 ** beginning. */
1355 if( zServerSoftware && strstr(zServerSoftware, "Microsoft-IIS") ){
1356 int i, j;
1357 cgi_set_parameter("REQUEST_URI", zPathInfo);
1358 for(i=0; zPathInfo[i]==zScriptName[i] && zPathInfo[i]; i++){}
1359
--- src/cgi.c
+++ src/cgi.c
@@ -37,11 +37,11 @@
37 ** received by a variety of means, and to generate well-formatted replies
38 ** to those requests.
39 **
40 ** The code in this file abstracts the web-request so that downstream
41 ** modules that generate the body of the reply (based on the requested page)
42 ** do not need to know if the request is coming from CGI, direct HTTP,
43 ** SCGI, or some other means.
44 **
45 ** This module gathers information about web page request into a key/value
46 ** store. Keys and values come from:
47 **
@@ -481,11 +481,11 @@
481 zReplyStatus = "OK";
482 }
483
484 if( g.fullHttpReply ){
485 if( rangeEnd>0
486 && iReplyStatus==200
487 && fossil_strcmp(P("REQUEST_METHOD"),"GET")==0
488 ){
489 iReplyStatus = 206;
490 zReplyStatus = "Partial Content";
491 }
@@ -562,11 +562,11 @@
562 }
563 total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]);
564 if( iReplyStatus==206 ){
565 blob_appendf(&hdr, "Content-Range: bytes %d-%d/%d\r\n",
566 rangeStart, rangeEnd-1, total_size);
567 total_size = rangeEnd - rangeStart;
568 }
569 blob_appendf(&hdr, "Content-Length: %d\r\n", total_size);
570 }else{
571 total_size = 0;
572 }
@@ -1311,11 +1311,11 @@
1311 ** \___/ \____________/\____/\____________________/ \_/
1312 ** | | | | |
1313 ** | HTTP_HOST | PATH_INFO QUERY_STRING
1314 ** | |
1315 ** REQUEST_SCHEMA SCRIPT_NAME
1316 **
1317 */
1318 void cgi_init(void){
1319 char *z;
1320 const char *zType;
1321 char *zSemi;
@@ -1348,11 +1348,11 @@
1348 }
1349
1350 #ifdef _WIN32
1351 /* The Microsoft IIS web server does not define REQUEST_URI, instead it uses
1352 ** PATH_INFO for virtually the same purpose. Define REQUEST_URI the same as
1353 ** PATH_INFO and redefine PATH_INFO with SCRIPT_NAME removed from the
1354 ** beginning. */
1355 if( zServerSoftware && strstr(zServerSoftware, "Microsoft-IIS") ){
1356 int i, j;
1357 cgi_set_parameter("REQUEST_URI", zPathInfo);
1358 for(i=0; zPathInfo[i]==zScriptName[i] && zPathInfo[i]; i++){}
1359
+6 -6
--- src/chat.c
+++ src/chat.c
@@ -34,11 +34,11 @@
3434
**
3535
** Notification is accomplished using the "hanging GET" or "long poll" design
3636
** in which a GET request is issued but the server does not send a reply until
3737
** new content arrives. Newer Web Sockets and Server Sent Event protocols are
3838
** more elegant, but are not compatible with CGI, and would thus complicate
39
-** configuration.
39
+** configuration.
4040
*/
4141
#include "config.h"
4242
#include <assert.h>
4343
#include "chat.h"
4444
@@ -319,11 +319,11 @@
319319
msgid = db_int(0, "SELECT msgid FROM chat"
320320
" ORDER BY msgid DESC LIMIT 1 OFFSET %d", mxCnt);
321321
if( msgid>0 ){
322322
Stmt s;
323323
db_multi_exec("PRAGMA secure_delete=ON;");
324
- db_prepare(&s,
324
+ db_prepare(&s,
325325
"DELETE FROM chat WHERE mtime<julianday('now')-:mxage"
326326
" AND msgid<%d", msgid);
327327
db_bind_double(&s, ":mxage", mxDays);
328328
db_step(&s);
329329
db_finalize(&s);
@@ -693,11 +693,11 @@
693693
}
694694
} /* Exit by "break" */
695695
db_finalize(&q1);
696696
blob_append(&json, "\n]}", 3);
697697
cgi_set_content(&json);
698
- return;
698
+ return;
699699
}
700700
701701
/*
702702
** WEBPAGE: chat-fetch-one hidden loadavg-exempt
703703
**
@@ -726,11 +726,11 @@
726726
return;
727727
}
728728
zChatUser = db_get("chat-timeline-user",0);
729729
chat_create_tables();
730730
cgi_set_content_type("application/json");
731
- db_prepare(&q,
731
+ db_prepare(&q,
732732
"SELECT datetime(mtime), xfrom, xmsg, octet_length(file),"
733733
" fname, fmime, lmtime"
734734
" FROM chat WHERE msgid=%d AND mdel IS NULL",
735735
msgid);
736736
if(SQLITE_ROW==db_step(&q)){
@@ -769,11 +769,11 @@
769769
if( nByte==0 ){
770770
blob_appendf(&json, "\"fsize\":0");
771771
}else{
772772
blob_appendf(&json, "\"fsize\":%d,\"fname\":%!j,\"fmime\":%!j",
773773
nByte, zFName, zFMime);
774
- }
774
+ }
775775
blob_append(&json,"}",1);
776776
cgi_set_content(&json);
777777
}else{
778778
ajax_route_error(404,"Chat message #%d not found.", msgid);
779779
}
@@ -957,11 +957,11 @@
957957
const char *zType = (const char*)sqlite3_value_text(argv[0]);
958958
int rid = sqlite3_value_int(argv[1]);
959959
const char *zUser = (const char*)sqlite3_value_text(argv[2]);
960960
const char *zMsg = (const char*)sqlite3_value_text(argv[3]);
961961
char *zRes = 0;
962
-
962
+
963963
if( zType==0 || zUser==0 || zMsg==0 ) return;
964964
if( zType[0]=='c' ){
965965
/* Check-ins */
966966
char *zBranch;
967967
char *zUuid;
968968
--- src/chat.c
+++ src/chat.c
@@ -34,11 +34,11 @@
34 **
35 ** Notification is accomplished using the "hanging GET" or "long poll" design
36 ** in which a GET request is issued but the server does not send a reply until
37 ** new content arrives. Newer Web Sockets and Server Sent Event protocols are
38 ** more elegant, but are not compatible with CGI, and would thus complicate
39 ** configuration.
40 */
41 #include "config.h"
42 #include <assert.h>
43 #include "chat.h"
44
@@ -319,11 +319,11 @@
319 msgid = db_int(0, "SELECT msgid FROM chat"
320 " ORDER BY msgid DESC LIMIT 1 OFFSET %d", mxCnt);
321 if( msgid>0 ){
322 Stmt s;
323 db_multi_exec("PRAGMA secure_delete=ON;");
324 db_prepare(&s,
325 "DELETE FROM chat WHERE mtime<julianday('now')-:mxage"
326 " AND msgid<%d", msgid);
327 db_bind_double(&s, ":mxage", mxDays);
328 db_step(&s);
329 db_finalize(&s);
@@ -693,11 +693,11 @@
693 }
694 } /* Exit by "break" */
695 db_finalize(&q1);
696 blob_append(&json, "\n]}", 3);
697 cgi_set_content(&json);
698 return;
699 }
700
701 /*
702 ** WEBPAGE: chat-fetch-one hidden loadavg-exempt
703 **
@@ -726,11 +726,11 @@
726 return;
727 }
728 zChatUser = db_get("chat-timeline-user",0);
729 chat_create_tables();
730 cgi_set_content_type("application/json");
731 db_prepare(&q,
732 "SELECT datetime(mtime), xfrom, xmsg, octet_length(file),"
733 " fname, fmime, lmtime"
734 " FROM chat WHERE msgid=%d AND mdel IS NULL",
735 msgid);
736 if(SQLITE_ROW==db_step(&q)){
@@ -769,11 +769,11 @@
769 if( nByte==0 ){
770 blob_appendf(&json, "\"fsize\":0");
771 }else{
772 blob_appendf(&json, "\"fsize\":%d,\"fname\":%!j,\"fmime\":%!j",
773 nByte, zFName, zFMime);
774 }
775 blob_append(&json,"}",1);
776 cgi_set_content(&json);
777 }else{
778 ajax_route_error(404,"Chat message #%d not found.", msgid);
779 }
@@ -957,11 +957,11 @@
957 const char *zType = (const char*)sqlite3_value_text(argv[0]);
958 int rid = sqlite3_value_int(argv[1]);
959 const char *zUser = (const char*)sqlite3_value_text(argv[2]);
960 const char *zMsg = (const char*)sqlite3_value_text(argv[3]);
961 char *zRes = 0;
962
963 if( zType==0 || zUser==0 || zMsg==0 ) return;
964 if( zType[0]=='c' ){
965 /* Check-ins */
966 char *zBranch;
967 char *zUuid;
968
--- src/chat.c
+++ src/chat.c
@@ -34,11 +34,11 @@
34 **
35 ** Notification is accomplished using the "hanging GET" or "long poll" design
36 ** in which a GET request is issued but the server does not send a reply until
37 ** new content arrives. Newer Web Sockets and Server Sent Event protocols are
38 ** more elegant, but are not compatible with CGI, and would thus complicate
39 ** configuration.
40 */
41 #include "config.h"
42 #include <assert.h>
43 #include "chat.h"
44
@@ -319,11 +319,11 @@
319 msgid = db_int(0, "SELECT msgid FROM chat"
320 " ORDER BY msgid DESC LIMIT 1 OFFSET %d", mxCnt);
321 if( msgid>0 ){
322 Stmt s;
323 db_multi_exec("PRAGMA secure_delete=ON;");
324 db_prepare(&s,
325 "DELETE FROM chat WHERE mtime<julianday('now')-:mxage"
326 " AND msgid<%d", msgid);
327 db_bind_double(&s, ":mxage", mxDays);
328 db_step(&s);
329 db_finalize(&s);
@@ -693,11 +693,11 @@
693 }
694 } /* Exit by "break" */
695 db_finalize(&q1);
696 blob_append(&json, "\n]}", 3);
697 cgi_set_content(&json);
698 return;
699 }
700
701 /*
702 ** WEBPAGE: chat-fetch-one hidden loadavg-exempt
703 **
@@ -726,11 +726,11 @@
726 return;
727 }
728 zChatUser = db_get("chat-timeline-user",0);
729 chat_create_tables();
730 cgi_set_content_type("application/json");
731 db_prepare(&q,
732 "SELECT datetime(mtime), xfrom, xmsg, octet_length(file),"
733 " fname, fmime, lmtime"
734 " FROM chat WHERE msgid=%d AND mdel IS NULL",
735 msgid);
736 if(SQLITE_ROW==db_step(&q)){
@@ -769,11 +769,11 @@
769 if( nByte==0 ){
770 blob_appendf(&json, "\"fsize\":0");
771 }else{
772 blob_appendf(&json, "\"fsize\":%d,\"fname\":%!j,\"fmime\":%!j",
773 nByte, zFName, zFMime);
774 }
775 blob_append(&json,"}",1);
776 cgi_set_content(&json);
777 }else{
778 ajax_route_error(404,"Chat message #%d not found.", msgid);
779 }
@@ -957,11 +957,11 @@
957 const char *zType = (const char*)sqlite3_value_text(argv[0]);
958 int rid = sqlite3_value_int(argv[1]);
959 const char *zUser = (const char*)sqlite3_value_text(argv[2]);
960 const char *zMsg = (const char*)sqlite3_value_text(argv[3]);
961 char *zRes = 0;
962
963 if( zType==0 || zUser==0 || zMsg==0 ) return;
964 if( zType[0]=='c' ){
965 /* Check-ins */
966 char *zBranch;
967 char *zUuid;
968
+2 -2
--- src/checkin.c
+++ src/checkin.c
@@ -2535,11 +2535,11 @@
25352535
}else{
25362536
fossil_fatal("Would fork. \"update\" first or use --branch or "
25372537
"--allow-fork.");
25382538
}
25392539
}
2540
-
2540
+
25412541
/*
25422542
** Do not allow a commit against a closed leaf unless the commit
25432543
** ends up on a different branch.
25442544
*/
25452545
if(
@@ -2556,11 +2556,11 @@
25562556
}
25572557
25582558
/* Always exit the loop on the second pass */
25592559
if( bRecheck ) break;
25602560
2561
-
2561
+
25622562
/* Get the check-in comment. This might involve prompting the
25632563
** user for the check-in comment, in which case we should resync
25642564
** to renew the check-in lock and repeat the checks for conflicts.
25652565
*/
25662566
if( zComment ){
25672567
--- src/checkin.c
+++ src/checkin.c
@@ -2535,11 +2535,11 @@
2535 }else{
2536 fossil_fatal("Would fork. \"update\" first or use --branch or "
2537 "--allow-fork.");
2538 }
2539 }
2540
2541 /*
2542 ** Do not allow a commit against a closed leaf unless the commit
2543 ** ends up on a different branch.
2544 */
2545 if(
@@ -2556,11 +2556,11 @@
2556 }
2557
2558 /* Always exit the loop on the second pass */
2559 if( bRecheck ) break;
2560
2561
2562 /* Get the check-in comment. This might involve prompting the
2563 ** user for the check-in comment, in which case we should resync
2564 ** to renew the check-in lock and repeat the checks for conflicts.
2565 */
2566 if( zComment ){
2567
--- src/checkin.c
+++ src/checkin.c
@@ -2535,11 +2535,11 @@
2535 }else{
2536 fossil_fatal("Would fork. \"update\" first or use --branch or "
2537 "--allow-fork.");
2538 }
2539 }
2540
2541 /*
2542 ** Do not allow a commit against a closed leaf unless the commit
2543 ** ends up on a different branch.
2544 */
2545 if(
@@ -2556,11 +2556,11 @@
2556 }
2557
2558 /* Always exit the loop on the second pass */
2559 if( bRecheck ) break;
2560
2561
2562 /* Get the check-in comment. This might involve prompting the
2563 ** user for the check-in comment, in which case we should resync
2564 ** to renew the check-in lock and repeat the checks for conflicts.
2565 */
2566 if( zComment ){
2567
+1 -1
--- src/clone.c
+++ src/clone.c
@@ -196,11 +196,11 @@
196196
zRepo = mprintf("./%s.fossil", zBase);
197197
if( zWorkDir==0 ){
198198
zWorkDir = mprintf("./%s", zBase);
199199
}
200200
fossil_free(zBase);
201
- }
201
+ }
202202
if( -1 != file_size(zRepo, ExtFILE) ){
203203
fossil_fatal("file already exists: %s", zRepo);
204204
}
205205
/* Fail before clone if open will fail because inside an open check-out */
206206
if( zWorkDir!=0 && zWorkDir[0]!=0 && !noOpen ){
207207
--- src/clone.c
+++ src/clone.c
@@ -196,11 +196,11 @@
196 zRepo = mprintf("./%s.fossil", zBase);
197 if( zWorkDir==0 ){
198 zWorkDir = mprintf("./%s", zBase);
199 }
200 fossil_free(zBase);
201 }
202 if( -1 != file_size(zRepo, ExtFILE) ){
203 fossil_fatal("file already exists: %s", zRepo);
204 }
205 /* Fail before clone if open will fail because inside an open check-out */
206 if( zWorkDir!=0 && zWorkDir[0]!=0 && !noOpen ){
207
--- src/clone.c
+++ src/clone.c
@@ -196,11 +196,11 @@
196 zRepo = mprintf("./%s.fossil", zBase);
197 if( zWorkDir==0 ){
198 zWorkDir = mprintf("./%s", zBase);
199 }
200 fossil_free(zBase);
201 }
202 if( -1 != file_size(zRepo, ExtFILE) ){
203 fossil_fatal("file already exists: %s", zRepo);
204 }
205 /* Fail before clone if open will fail because inside an open check-out */
206 if( zWorkDir!=0 && zWorkDir[0]!=0 && !noOpen ){
207
+1 -1
--- src/cookies.c
+++ src/cookies.c
@@ -239,11 +239,11 @@
239239
cgi_set_cookie(zName, "", 0, -1);
240240
cgi_redirect("cookies");
241241
}
242242
nCookie++;
243243
@ <li><p><b>%h(zName)</b>: %h(zValue)
244
- @ <input type="submit" name="%h(zDel)" value="Delete">
244
+ @ <input type="submit" name="%h(zDel)" value="Delete">
245245
if( fossil_strcmp(zName, DISPLAY_SETTINGS_COOKIE)==0 && cookies.nParam>0 ){
246246
int j;
247247
@ <ul>
248248
for(j=0; j<cookies.nParam; j++){
249249
@ <li>%h(cookies.aParam[j].zPName): "%h(cookies.aParam[j].zPValue)"
250250
--- src/cookies.c
+++ src/cookies.c
@@ -239,11 +239,11 @@
239 cgi_set_cookie(zName, "", 0, -1);
240 cgi_redirect("cookies");
241 }
242 nCookie++;
243 @ <li><p><b>%h(zName)</b>: %h(zValue)
244 @ <input type="submit" name="%h(zDel)" value="Delete">
245 if( fossil_strcmp(zName, DISPLAY_SETTINGS_COOKIE)==0 && cookies.nParam>0 ){
246 int j;
247 @ <ul>
248 for(j=0; j<cookies.nParam; j++){
249 @ <li>%h(cookies.aParam[j].zPName): "%h(cookies.aParam[j].zPValue)"
250
--- src/cookies.c
+++ src/cookies.c
@@ -239,11 +239,11 @@
239 cgi_set_cookie(zName, "", 0, -1);
240 cgi_redirect("cookies");
241 }
242 nCookie++;
243 @ <li><p><b>%h(zName)</b>: %h(zValue)
244 @ <input type="submit" name="%h(zDel)" value="Delete">
245 if( fossil_strcmp(zName, DISPLAY_SETTINGS_COOKIE)==0 && cookies.nParam>0 ){
246 int j;
247 @ <ul>
248 for(j=0; j<cookies.nParam; j++){
249 @ <li>%h(cookies.aParam[j].zPName): "%h(cookies.aParam[j].zPValue)"
250
+13 -12
--- src/db.c
+++ src/db.c
@@ -457,11 +457,11 @@
457457
void db_protect_only(unsigned flags){
458458
if( db.nProtect>=count(db.aProtect)-2 ){
459459
fossil_panic("too many db_protect() calls");
460460
}
461461
db.aProtect[db.nProtect++] = db.protectMask;
462
- if( (flags & PROTECT_SENSITIVE)!=0
462
+ if( (flags & PROTECT_SENSITIVE)!=0
463463
&& db.bProtectTriggers==0
464464
&& g.repositoryOpen
465465
){
466466
/* Create the triggers needed to protect sensitive settings from
467467
** being created or modified the first time that PROTECT_SENSITIVE
@@ -1557,13 +1557,13 @@
15571557
sqlite3_create_function(db, "win_reserved", 1, SQLITE_UTF8, 0,
15581558
db_win_reserved_func,0,0);
15591559
sqlite3_create_function(db, "url_nouser", 1, SQLITE_UTF8, 0,
15601560
url_nouser_func,0,0);
15611561
sqlite3_create_function(db, "chat_msg_from_event", 4,
1562
- SQLITE_UTF8 | SQLITE_INNOCUOUS, 0,
1562
+ SQLITE_UTF8 | SQLITE_INNOCUOUS, 0,
15631563
chat_msg_from_event, 0, 0);
1564
-
1564
+
15651565
}
15661566
15671567
#if USE_SEE
15681568
/*
15691569
** This is a pointer to the saved database encryption key string.
@@ -2489,11 +2489,11 @@
24892489
if( db_local_table_exists_but_lacks_column("undo_vfile", "islink") ){
24902490
db_multi_exec("ALTER TABLE undo_vfile ADD COLUMN islink BOOL DEFAULT 0");
24912491
}
24922492
}
24932493
2494
- /* The design of the check-out database changed on 2019-01-19, adding the mhash
2494
+ /* The design of the check-out database changed on 2019-01-19 adding the mhash
24952495
** column to vfile and vmerge and changing the UNIQUE index on vmerge into
24962496
** a PRIMARY KEY that includes the new mhash column. However, we must have
24972497
** the repository database at hand in order to do the migration, so that
24982498
** step is deferred. */
24992499
return 1;
@@ -2606,11 +2606,11 @@
26062606
sz = file_size(zDbName, ExtFILE);
26072607
if( sz<16834 ) return 0;
26082608
db = db_open(zDbName);
26092609
if( !db ) return 0;
26102610
if( !g.zVfsName && sz%512 ) return 0;
2611
- rc = sqlite3_prepare_v2(db,
2611
+ rc = sqlite3_prepare_v2(db,
26122612
"SELECT count(*) FROM sqlite_schema"
26132613
" WHERE name COLLATE nocase IN"
26142614
"('blob','delta','rcvfrom','user','config','mlink','plink');",
26152615
-1, &pStmt, 0);
26162616
if( rc ) goto is_repo_end;
@@ -3716,11 +3716,12 @@
37163716
z = fossil_strdup(zDefault);
37173717
}
37183718
}
37193719
return z;
37203720
}
3721
-char *db_get_mtime(const char *zName, const char *zFormat, const char *zDefault){
3721
+char *db_get_mtime(const char *zName, const char *zFormat,
3722
+ const char *zDefault){
37223723
char *z = 0;
37233724
if( g.repositoryOpen ){
37243725
z = db_text(0, "SELECT mtime FROM config WHERE name=%Q", zName);
37253726
}
37263727
if( z==0 ){
@@ -4021,11 +4022,11 @@
40214022
}
40224023
file_canonical_name(zName, &full, 0);
40234024
(void)filename_collation(); /* Initialize before connection swap */
40244025
db_swap_connections();
40254026
zRepoSetting = mprintf("repo:%q", blob_str(&full));
4026
-
4027
+
40274028
db_unprotect(PROTECT_CONFIG);
40284029
db_multi_exec(
40294030
"DELETE FROM global_config WHERE name %s = %Q;",
40304031
filename_collation(), zRepoSetting
40314032
);
@@ -4185,11 +4186,11 @@
41854186
&& (nLocal = file_directory_size(".", 0, 1))>0
41864187
&& (nLocal>1 || isUri || !file_in_cwd(zRepo))
41874188
){
41884189
fossil_fatal("directory %s is not empty\n"
41894190
"use the -f (--force) option to override\n"
4190
- "or the -k (--keep) option to keep local files unchanged",
4191
+ "or the -k (--keep) option to keep local files unchanged",
41914192
file_getcwd(0,0));
41924193
}
41934194
41944195
if( db_open_local_v2(0, allowNested) ){
41954196
fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
@@ -4391,11 +4392,11 @@
43914392
** in the "admin_log" table of the repository.
43924393
*/
43934394
/*
43944395
** SETTING: allow-symlinks boolean default=off sensitive
43954396
**
4396
-** When allow-symlinks is OFF, Fossil does not see symbolic links
4397
+** When allow-symlinks is OFF, Fossil does not see symbolic links
43974398
** (a.k.a "symlinks") on disk as a separate class of object. Instead Fossil
43984399
** sees the object that the symlink points to. Fossil will only manage files
43994400
** and directories, not symlinks. When a symlink is added to a repository,
44004401
** the object that the symlink points to is added, not the symlink itself.
44014402
**
@@ -4449,11 +4450,11 @@
44494450
** after the page load. Suggested values: 50 to 200.
44504451
*/
44514452
/*
44524453
** SETTING: auto-hyperlink-mouseover boolean default=off
44534454
**
4454
-** When the auto-hyperlink setting is 1 and this setting is on, the
4455
+** When the auto-hyperlink setting is 1 and this setting is on, the
44554456
** javascript that runs to set the href= attributes of hyperlinks waits
44564457
** until either a mousedown or mousemove event is seen. This helps
44574458
** to distinguish real users from robots. For maximum robot defense,
44584459
** the recommended setting is ON.
44594460
*/
@@ -4673,11 +4674,11 @@
46734674
*/
46744675
/*
46754676
** SETTING: forbid-delta-manifests boolean default=off
46764677
** If enabled on a client, new delta manifests are prohibited on
46774678
** commits. If enabled on a server, whenever a client attempts
4678
-** to obtain a check-in lock during auto-sync, the server will
4679
+** to obtain a check-in lock during auto-sync, the server will
46794680
** send the "pragma avoid-delta-manifests" statement in its reply,
46804681
** which will cause the client to avoid generating a delta
46814682
** manifest.
46824683
*/
46834684
/*
@@ -5014,11 +5015,11 @@
50145015
*/
50155016
/*
50165017
** SETTING: large-file-size width=10 default=200000000
50175018
** Fossil considers any file whose size is greater than this value
50185019
** to be a "large file". Fossil might issue warnings if you try to
5019
-** "add" or "commit" a "large file". Set this value to 0 or less
5020
+** "add" or "commit" a "large file". Set this value to 0 or less
50205021
** to disable all such warnings.
50215022
*/
50225023
50235024
/*
50245025
** Look up a control setting by its name. Return a pointer to the Setting
50255026
--- src/db.c
+++ src/db.c
@@ -457,11 +457,11 @@
457 void db_protect_only(unsigned flags){
458 if( db.nProtect>=count(db.aProtect)-2 ){
459 fossil_panic("too many db_protect() calls");
460 }
461 db.aProtect[db.nProtect++] = db.protectMask;
462 if( (flags & PROTECT_SENSITIVE)!=0
463 && db.bProtectTriggers==0
464 && g.repositoryOpen
465 ){
466 /* Create the triggers needed to protect sensitive settings from
467 ** being created or modified the first time that PROTECT_SENSITIVE
@@ -1557,13 +1557,13 @@
1557 sqlite3_create_function(db, "win_reserved", 1, SQLITE_UTF8, 0,
1558 db_win_reserved_func,0,0);
1559 sqlite3_create_function(db, "url_nouser", 1, SQLITE_UTF8, 0,
1560 url_nouser_func,0,0);
1561 sqlite3_create_function(db, "chat_msg_from_event", 4,
1562 SQLITE_UTF8 | SQLITE_INNOCUOUS, 0,
1563 chat_msg_from_event, 0, 0);
1564
1565 }
1566
1567 #if USE_SEE
1568 /*
1569 ** This is a pointer to the saved database encryption key string.
@@ -2489,11 +2489,11 @@
2489 if( db_local_table_exists_but_lacks_column("undo_vfile", "islink") ){
2490 db_multi_exec("ALTER TABLE undo_vfile ADD COLUMN islink BOOL DEFAULT 0");
2491 }
2492 }
2493
2494 /* The design of the check-out database changed on 2019-01-19, adding the mhash
2495 ** column to vfile and vmerge and changing the UNIQUE index on vmerge into
2496 ** a PRIMARY KEY that includes the new mhash column. However, we must have
2497 ** the repository database at hand in order to do the migration, so that
2498 ** step is deferred. */
2499 return 1;
@@ -2606,11 +2606,11 @@
2606 sz = file_size(zDbName, ExtFILE);
2607 if( sz<16834 ) return 0;
2608 db = db_open(zDbName);
2609 if( !db ) return 0;
2610 if( !g.zVfsName && sz%512 ) return 0;
2611 rc = sqlite3_prepare_v2(db,
2612 "SELECT count(*) FROM sqlite_schema"
2613 " WHERE name COLLATE nocase IN"
2614 "('blob','delta','rcvfrom','user','config','mlink','plink');",
2615 -1, &pStmt, 0);
2616 if( rc ) goto is_repo_end;
@@ -3716,11 +3716,12 @@
3716 z = fossil_strdup(zDefault);
3717 }
3718 }
3719 return z;
3720 }
3721 char *db_get_mtime(const char *zName, const char *zFormat, const char *zDefault){
 
3722 char *z = 0;
3723 if( g.repositoryOpen ){
3724 z = db_text(0, "SELECT mtime FROM config WHERE name=%Q", zName);
3725 }
3726 if( z==0 ){
@@ -4021,11 +4022,11 @@
4021 }
4022 file_canonical_name(zName, &full, 0);
4023 (void)filename_collation(); /* Initialize before connection swap */
4024 db_swap_connections();
4025 zRepoSetting = mprintf("repo:%q", blob_str(&full));
4026
4027 db_unprotect(PROTECT_CONFIG);
4028 db_multi_exec(
4029 "DELETE FROM global_config WHERE name %s = %Q;",
4030 filename_collation(), zRepoSetting
4031 );
@@ -4185,11 +4186,11 @@
4185 && (nLocal = file_directory_size(".", 0, 1))>0
4186 && (nLocal>1 || isUri || !file_in_cwd(zRepo))
4187 ){
4188 fossil_fatal("directory %s is not empty\n"
4189 "use the -f (--force) option to override\n"
4190 "or the -k (--keep) option to keep local files unchanged",
4191 file_getcwd(0,0));
4192 }
4193
4194 if( db_open_local_v2(0, allowNested) ){
4195 fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
@@ -4391,11 +4392,11 @@
4391 ** in the "admin_log" table of the repository.
4392 */
4393 /*
4394 ** SETTING: allow-symlinks boolean default=off sensitive
4395 **
4396 ** When allow-symlinks is OFF, Fossil does not see symbolic links
4397 ** (a.k.a "symlinks") on disk as a separate class of object. Instead Fossil
4398 ** sees the object that the symlink points to. Fossil will only manage files
4399 ** and directories, not symlinks. When a symlink is added to a repository,
4400 ** the object that the symlink points to is added, not the symlink itself.
4401 **
@@ -4449,11 +4450,11 @@
4449 ** after the page load. Suggested values: 50 to 200.
4450 */
4451 /*
4452 ** SETTING: auto-hyperlink-mouseover boolean default=off
4453 **
4454 ** When the auto-hyperlink setting is 1 and this setting is on, the
4455 ** javascript that runs to set the href= attributes of hyperlinks waits
4456 ** until either a mousedown or mousemove event is seen. This helps
4457 ** to distinguish real users from robots. For maximum robot defense,
4458 ** the recommended setting is ON.
4459 */
@@ -4673,11 +4674,11 @@
4673 */
4674 /*
4675 ** SETTING: forbid-delta-manifests boolean default=off
4676 ** If enabled on a client, new delta manifests are prohibited on
4677 ** commits. If enabled on a server, whenever a client attempts
4678 ** to obtain a check-in lock during auto-sync, the server will
4679 ** send the "pragma avoid-delta-manifests" statement in its reply,
4680 ** which will cause the client to avoid generating a delta
4681 ** manifest.
4682 */
4683 /*
@@ -5014,11 +5015,11 @@
5014 */
5015 /*
5016 ** SETTING: large-file-size width=10 default=200000000
5017 ** Fossil considers any file whose size is greater than this value
5018 ** to be a "large file". Fossil might issue warnings if you try to
5019 ** "add" or "commit" a "large file". Set this value to 0 or less
5020 ** to disable all such warnings.
5021 */
5022
5023 /*
5024 ** Look up a control setting by its name. Return a pointer to the Setting
5025
--- src/db.c
+++ src/db.c
@@ -457,11 +457,11 @@
457 void db_protect_only(unsigned flags){
458 if( db.nProtect>=count(db.aProtect)-2 ){
459 fossil_panic("too many db_protect() calls");
460 }
461 db.aProtect[db.nProtect++] = db.protectMask;
462 if( (flags & PROTECT_SENSITIVE)!=0
463 && db.bProtectTriggers==0
464 && g.repositoryOpen
465 ){
466 /* Create the triggers needed to protect sensitive settings from
467 ** being created or modified the first time that PROTECT_SENSITIVE
@@ -1557,13 +1557,13 @@
1557 sqlite3_create_function(db, "win_reserved", 1, SQLITE_UTF8, 0,
1558 db_win_reserved_func,0,0);
1559 sqlite3_create_function(db, "url_nouser", 1, SQLITE_UTF8, 0,
1560 url_nouser_func,0,0);
1561 sqlite3_create_function(db, "chat_msg_from_event", 4,
1562 SQLITE_UTF8 | SQLITE_INNOCUOUS, 0,
1563 chat_msg_from_event, 0, 0);
1564
1565 }
1566
1567 #if USE_SEE
1568 /*
1569 ** This is a pointer to the saved database encryption key string.
@@ -2489,11 +2489,11 @@
2489 if( db_local_table_exists_but_lacks_column("undo_vfile", "islink") ){
2490 db_multi_exec("ALTER TABLE undo_vfile ADD COLUMN islink BOOL DEFAULT 0");
2491 }
2492 }
2493
2494 /* The design of the check-out database changed on 2019-01-19 adding the mhash
2495 ** column to vfile and vmerge and changing the UNIQUE index on vmerge into
2496 ** a PRIMARY KEY that includes the new mhash column. However, we must have
2497 ** the repository database at hand in order to do the migration, so that
2498 ** step is deferred. */
2499 return 1;
@@ -2606,11 +2606,11 @@
2606 sz = file_size(zDbName, ExtFILE);
2607 if( sz<16834 ) return 0;
2608 db = db_open(zDbName);
2609 if( !db ) return 0;
2610 if( !g.zVfsName && sz%512 ) return 0;
2611 rc = sqlite3_prepare_v2(db,
2612 "SELECT count(*) FROM sqlite_schema"
2613 " WHERE name COLLATE nocase IN"
2614 "('blob','delta','rcvfrom','user','config','mlink','plink');",
2615 -1, &pStmt, 0);
2616 if( rc ) goto is_repo_end;
@@ -3716,11 +3716,12 @@
3716 z = fossil_strdup(zDefault);
3717 }
3718 }
3719 return z;
3720 }
3721 char *db_get_mtime(const char *zName, const char *zFormat,
3722 const char *zDefault){
3723 char *z = 0;
3724 if( g.repositoryOpen ){
3725 z = db_text(0, "SELECT mtime FROM config WHERE name=%Q", zName);
3726 }
3727 if( z==0 ){
@@ -4021,11 +4022,11 @@
4022 }
4023 file_canonical_name(zName, &full, 0);
4024 (void)filename_collation(); /* Initialize before connection swap */
4025 db_swap_connections();
4026 zRepoSetting = mprintf("repo:%q", blob_str(&full));
4027
4028 db_unprotect(PROTECT_CONFIG);
4029 db_multi_exec(
4030 "DELETE FROM global_config WHERE name %s = %Q;",
4031 filename_collation(), zRepoSetting
4032 );
@@ -4185,11 +4186,11 @@
4186 && (nLocal = file_directory_size(".", 0, 1))>0
4187 && (nLocal>1 || isUri || !file_in_cwd(zRepo))
4188 ){
4189 fossil_fatal("directory %s is not empty\n"
4190 "use the -f (--force) option to override\n"
4191 "or the -k (--keep) option to keep local files unchanged",
4192 file_getcwd(0,0));
4193 }
4194
4195 if( db_open_local_v2(0, allowNested) ){
4196 fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
@@ -4391,11 +4392,11 @@
4392 ** in the "admin_log" table of the repository.
4393 */
4394 /*
4395 ** SETTING: allow-symlinks boolean default=off sensitive
4396 **
4397 ** When allow-symlinks is OFF, Fossil does not see symbolic links
4398 ** (a.k.a "symlinks") on disk as a separate class of object. Instead Fossil
4399 ** sees the object that the symlink points to. Fossil will only manage files
4400 ** and directories, not symlinks. When a symlink is added to a repository,
4401 ** the object that the symlink points to is added, not the symlink itself.
4402 **
@@ -4449,11 +4450,11 @@
4450 ** after the page load. Suggested values: 50 to 200.
4451 */
4452 /*
4453 ** SETTING: auto-hyperlink-mouseover boolean default=off
4454 **
4455 ** When the auto-hyperlink setting is 1 and this setting is on, the
4456 ** javascript that runs to set the href= attributes of hyperlinks waits
4457 ** until either a mousedown or mousemove event is seen. This helps
4458 ** to distinguish real users from robots. For maximum robot defense,
4459 ** the recommended setting is ON.
4460 */
@@ -4673,11 +4674,11 @@
4674 */
4675 /*
4676 ** SETTING: forbid-delta-manifests boolean default=off
4677 ** If enabled on a client, new delta manifests are prohibited on
4678 ** commits. If enabled on a server, whenever a client attempts
4679 ** to obtain a check-in lock during auto-sync, the server will
4680 ** send the "pragma avoid-delta-manifests" statement in its reply,
4681 ** which will cause the client to avoid generating a delta
4682 ** manifest.
4683 */
4684 /*
@@ -5014,11 +5015,11 @@
5015 */
5016 /*
5017 ** SETTING: large-file-size width=10 default=200000000
5018 ** Fossil considers any file whose size is greater than this value
5019 ** to be a "large file". Fossil might issue warnings if you try to
5020 ** "add" or "commit" a "large file". Set this value to 0 or less
5021 ** to disable all such warnings.
5022 */
5023
5024 /*
5025 ** Look up a control setting by its name. Return a pointer to the Setting
5026
+9 -8
--- src/diff.c
+++ src/diff.c
@@ -90,16 +90,16 @@
9090
** because not all diff operations are started from the command-line. But
9191
** the idea is sound.
9292
**
9393
** Information encoded by this object includes but is not limited to:
9494
**
95
-** * The desired output format (unified vs. side-by-side,
95
+** * The desired output format (unified vs. side-by-side,
9696
** TCL, JSON, HTML vs. plain-text).
9797
**
9898
** * Number of lines of context surrounding each difference block
9999
**
100
-** * Width of output columns for text side-by-side diffop
100
+** * Width of output columns for text side-by-side diffop
101101
*/
102102
struct DiffConfig {
103103
u64 diffFlags; /* Diff flags */
104104
int nContext; /* Number of lines of context */
105105
int wColumn; /* Column width in -y mode */
@@ -915,11 +915,11 @@
915915
** lines and formats them for display. Subclasses of this object format
916916
** the diff output in different ways.
917917
**
918918
** To subclass, create an instance of the DiffBuilder object and fill
919919
** in appropriate method implementations.
920
-*/
920
+*/
921921
typedef struct DiffBuilder DiffBuilder;
922922
struct DiffBuilder {
923923
void (*xSkip)(DiffBuilder*, unsigned int, int);
924924
void (*xCommon)(DiffBuilder*,const DLine*);
925925
void (*xInsert)(DiffBuilder*,const DLine*);
@@ -1100,11 +1100,11 @@
11001100
x = chng.a[i].iStart1;
11011101
blob_append_char(p->pOut, ' ');
11021102
blob_append_tcl_literal(p->pOut, pX->z + x, chng.a[i].iLen1);
11031103
x += chng.a[i].iLen1;
11041104
blob_append_char(p->pOut, ' ');
1105
- blob_append_tcl_literal(p->pOut,
1105
+ blob_append_tcl_literal(p->pOut,
11061106
pY->z + chng.a[i].iStart2, chng.a[i].iLen2);
11071107
}
11081108
if( x<pX->n ){
11091109
blob_append_char(p->pOut, ' ');
11101110
blob_append_tcl_literal(p->pOut, pX->z + x, pX->n - x);
@@ -1186,11 +1186,11 @@
11861186
x = chng.a[i].iStart1;
11871187
blob_append_char(p->pOut, ',');
11881188
blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iLen1);
11891189
x += chng.a[i].iLen1;
11901190
blob_append_char(p->pOut, ',');
1191
- blob_append_json_literal(p->pOut,
1191
+ blob_append_json_literal(p->pOut,
11921192
pY->z + chng.a[i].iStart2, chng.a[i].iLen2);
11931193
}
11941194
blob_append_char(p->pOut, ',');
11951195
blob_append_json_literal(p->pOut, pX->z + x, pX->n - x);
11961196
blob_append(p->pOut, "],\n",3);
@@ -1268,11 +1268,11 @@
12681268
12691269
/* Text of the inserted lines */
12701270
blob_append(&p->aCol[2], "<ins>", 5);
12711271
blob_append_xfer(&p->aCol[2], &p->aCol[4]);
12721272
blob_append(&p->aCol[2], "</ins>", 6);
1273
-
1273
+
12741274
p->nPending = 0;
12751275
}
12761276
static void dfunifiedFinishRow(DiffBuilder *p){
12771277
dfunifiedFinishDelete(p);
12781278
dfunifiedFinishInsert(p);
@@ -2005,11 +2005,11 @@
20052005
}
20062006
iDivBig = nBig/2;
20072007
iDivSmall = nSmall/2;
20082008
20092009
if( pCfg->diffFlags & DIFF_DEBUG ){
2010
- fossil_print(" Divide at [%.*s]\n",
2010
+ fossil_print(" Divide at [%.*s]\n",
20112011
aBig[iDivBig].n, aBig[iDivBig].z);
20122012
}
20132013
20142014
bestScore = 10000;
20152015
for(i=0; i<nSmall; i++){
@@ -3493,11 +3493,12 @@
34933493
cnt++;
34943494
}
34953495
34963496
if( p->nVers==0 ){
34973497
if( zRevision ){
3498
- fossil_fatal("file %s does not exist in check-in %s", zFilename, zRevision);
3498
+ fossil_fatal("file %s does not exist in check-in %s",
3499
+ zFilename, zRevision);
34993500
}else{
35003501
fossil_fatal("no history for file: %s", zFilename);
35013502
}
35023503
}
35033504
35043505
--- src/diff.c
+++ src/diff.c
@@ -90,16 +90,16 @@
90 ** because not all diff operations are started from the command-line. But
91 ** the idea is sound.
92 **
93 ** Information encoded by this object includes but is not limited to:
94 **
95 ** * The desired output format (unified vs. side-by-side,
96 ** TCL, JSON, HTML vs. plain-text).
97 **
98 ** * Number of lines of context surrounding each difference block
99 **
100 ** * Width of output columns for text side-by-side diffop
101 */
102 struct DiffConfig {
103 u64 diffFlags; /* Diff flags */
104 int nContext; /* Number of lines of context */
105 int wColumn; /* Column width in -y mode */
@@ -915,11 +915,11 @@
915 ** lines and formats them for display. Subclasses of this object format
916 ** the diff output in different ways.
917 **
918 ** To subclass, create an instance of the DiffBuilder object and fill
919 ** in appropriate method implementations.
920 */
921 typedef struct DiffBuilder DiffBuilder;
922 struct DiffBuilder {
923 void (*xSkip)(DiffBuilder*, unsigned int, int);
924 void (*xCommon)(DiffBuilder*,const DLine*);
925 void (*xInsert)(DiffBuilder*,const DLine*);
@@ -1100,11 +1100,11 @@
1100 x = chng.a[i].iStart1;
1101 blob_append_char(p->pOut, ' ');
1102 blob_append_tcl_literal(p->pOut, pX->z + x, chng.a[i].iLen1);
1103 x += chng.a[i].iLen1;
1104 blob_append_char(p->pOut, ' ');
1105 blob_append_tcl_literal(p->pOut,
1106 pY->z + chng.a[i].iStart2, chng.a[i].iLen2);
1107 }
1108 if( x<pX->n ){
1109 blob_append_char(p->pOut, ' ');
1110 blob_append_tcl_literal(p->pOut, pX->z + x, pX->n - x);
@@ -1186,11 +1186,11 @@
1186 x = chng.a[i].iStart1;
1187 blob_append_char(p->pOut, ',');
1188 blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iLen1);
1189 x += chng.a[i].iLen1;
1190 blob_append_char(p->pOut, ',');
1191 blob_append_json_literal(p->pOut,
1192 pY->z + chng.a[i].iStart2, chng.a[i].iLen2);
1193 }
1194 blob_append_char(p->pOut, ',');
1195 blob_append_json_literal(p->pOut, pX->z + x, pX->n - x);
1196 blob_append(p->pOut, "],\n",3);
@@ -1268,11 +1268,11 @@
1268
1269 /* Text of the inserted lines */
1270 blob_append(&p->aCol[2], "<ins>", 5);
1271 blob_append_xfer(&p->aCol[2], &p->aCol[4]);
1272 blob_append(&p->aCol[2], "</ins>", 6);
1273
1274 p->nPending = 0;
1275 }
1276 static void dfunifiedFinishRow(DiffBuilder *p){
1277 dfunifiedFinishDelete(p);
1278 dfunifiedFinishInsert(p);
@@ -2005,11 +2005,11 @@
2005 }
2006 iDivBig = nBig/2;
2007 iDivSmall = nSmall/2;
2008
2009 if( pCfg->diffFlags & DIFF_DEBUG ){
2010 fossil_print(" Divide at [%.*s]\n",
2011 aBig[iDivBig].n, aBig[iDivBig].z);
2012 }
2013
2014 bestScore = 10000;
2015 for(i=0; i<nSmall; i++){
@@ -3493,11 +3493,12 @@
3493 cnt++;
3494 }
3495
3496 if( p->nVers==0 ){
3497 if( zRevision ){
3498 fossil_fatal("file %s does not exist in check-in %s", zFilename, zRevision);
 
3499 }else{
3500 fossil_fatal("no history for file: %s", zFilename);
3501 }
3502 }
3503
3504
--- src/diff.c
+++ src/diff.c
@@ -90,16 +90,16 @@
90 ** because not all diff operations are started from the command-line. But
91 ** the idea is sound.
92 **
93 ** Information encoded by this object includes but is not limited to:
94 **
95 ** * The desired output format (unified vs. side-by-side,
96 ** TCL, JSON, HTML vs. plain-text).
97 **
98 ** * Number of lines of context surrounding each difference block
99 **
100 ** * Width of output columns for text side-by-side diffop
101 */
102 struct DiffConfig {
103 u64 diffFlags; /* Diff flags */
104 int nContext; /* Number of lines of context */
105 int wColumn; /* Column width in -y mode */
@@ -915,11 +915,11 @@
915 ** lines and formats them for display. Subclasses of this object format
916 ** the diff output in different ways.
917 **
918 ** To subclass, create an instance of the DiffBuilder object and fill
919 ** in appropriate method implementations.
920 */
921 typedef struct DiffBuilder DiffBuilder;
922 struct DiffBuilder {
923 void (*xSkip)(DiffBuilder*, unsigned int, int);
924 void (*xCommon)(DiffBuilder*,const DLine*);
925 void (*xInsert)(DiffBuilder*,const DLine*);
@@ -1100,11 +1100,11 @@
1100 x = chng.a[i].iStart1;
1101 blob_append_char(p->pOut, ' ');
1102 blob_append_tcl_literal(p->pOut, pX->z + x, chng.a[i].iLen1);
1103 x += chng.a[i].iLen1;
1104 blob_append_char(p->pOut, ' ');
1105 blob_append_tcl_literal(p->pOut,
1106 pY->z + chng.a[i].iStart2, chng.a[i].iLen2);
1107 }
1108 if( x<pX->n ){
1109 blob_append_char(p->pOut, ' ');
1110 blob_append_tcl_literal(p->pOut, pX->z + x, pX->n - x);
@@ -1186,11 +1186,11 @@
1186 x = chng.a[i].iStart1;
1187 blob_append_char(p->pOut, ',');
1188 blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iLen1);
1189 x += chng.a[i].iLen1;
1190 blob_append_char(p->pOut, ',');
1191 blob_append_json_literal(p->pOut,
1192 pY->z + chng.a[i].iStart2, chng.a[i].iLen2);
1193 }
1194 blob_append_char(p->pOut, ',');
1195 blob_append_json_literal(p->pOut, pX->z + x, pX->n - x);
1196 blob_append(p->pOut, "],\n",3);
@@ -1268,11 +1268,11 @@
1268
1269 /* Text of the inserted lines */
1270 blob_append(&p->aCol[2], "<ins>", 5);
1271 blob_append_xfer(&p->aCol[2], &p->aCol[4]);
1272 blob_append(&p->aCol[2], "</ins>", 6);
1273
1274 p->nPending = 0;
1275 }
1276 static void dfunifiedFinishRow(DiffBuilder *p){
1277 dfunifiedFinishDelete(p);
1278 dfunifiedFinishInsert(p);
@@ -2005,11 +2005,11 @@
2005 }
2006 iDivBig = nBig/2;
2007 iDivSmall = nSmall/2;
2008
2009 if( pCfg->diffFlags & DIFF_DEBUG ){
2010 fossil_print(" Divide at [%.*s]\n",
2011 aBig[iDivBig].n, aBig[iDivBig].z);
2012 }
2013
2014 bestScore = 10000;
2015 for(i=0; i<nSmall; i++){
@@ -3493,11 +3493,12 @@
3493 cnt++;
3494 }
3495
3496 if( p->nVers==0 ){
3497 if( zRevision ){
3498 fossil_fatal("file %s does not exist in check-in %s",
3499 zFilename, zRevision);
3500 }else{
3501 fossil_fatal("no history for file: %s", zFilename);
3502 }
3503 }
3504
3505
+14 -14
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -113,11 +113,11 @@
113113
}
114114
115115
/*
116116
** Print details about the compared versions - possibly the working directory
117117
** or the undo buffer. For check-ins, show hash and commit time.
118
-**
118
+**
119119
** This is intended primarily to go into the "header garbage" that is ignored
120120
** by patch(1).
121121
**
122122
** zFrom and zTo are interpreted as symbolic version names, unless they
123123
** start with '(', in which case they are printed directly.
@@ -218,11 +218,11 @@
218218
219219
220220
/*
221221
** Default header texts for diff with --webpage
222222
*/
223
-static const char zWebpageHdr[] =
223
+static const char zWebpageHdr[] =
224224
@ <!DOCTYPE html>
225225
@ <html>
226226
@ <head>
227227
@ <meta charset="UTF-8">
228228
@ <style>
@@ -342,16 +342,16 @@
342342
@ }
343343
@ td.difftxt ins > ins {
344344
@ background-color: #559855;
345345
@ }
346346
@ }
347
-@
347
+@
348348
@ </style>
349349
@ </head>
350350
@ <body>
351351
;
352
-static const char zWebpageHdrDark[] =
352
+static const char zWebpageHdrDark[] =
353353
@ <!DOCTYPE html>
354354
@ <html>
355355
@ <head>
356356
@ <meta charset="UTF-8">
357357
@ <style>
@@ -360,11 +360,11 @@
360360
@ color: #ffffff;
361361
@ }
362362
@ h1 {
363363
@ font-size: 150%;
364364
@ }
365
-@
365
+@
366366
@ table.diff {
367367
@ width: 100%;
368368
@ border-spacing: 0;
369369
@ border: 1px solid black;
370370
@ line-height: inherit;
@@ -448,16 +448,16 @@
448448
@ td.difftxt ins > ins.edit {
449449
@ background-color: #c0c0ff;
450450
@ text-decoration: none;
451451
@ font-weight: bold;
452452
@ }
453
-@
453
+@
454454
@ </style>
455455
@ </head>
456456
@ <body>
457457
;
458
-const char zWebpageEnd[] =
458
+const char zWebpageEnd[] =
459459
@ </body>
460460
@ </html>
461461
;
462462
463463
/*
@@ -516,20 +516,20 @@
516516
#else
517517
SetConsoleCtrlHandler(diff_console_ctrl_handler, TRUE);
518518
#endif
519519
}
520520
if( (pCfg->diffFlags & DIFF_WEBPAGE)!=0 ){
521
- fossil_print("%s",(pCfg->diffFlags & DIFF_DARKMODE)!=0 ? zWebpageHdrDark :
521
+ fossil_print("%s",(pCfg->diffFlags & DIFF_DARKMODE)!=0 ? zWebpageHdrDark :
522522
zWebpageHdr);
523523
fflush(stdout);
524524
}
525525
}
526526
527527
/* Do any final output required by a diff and complete the diff
528528
** process.
529529
**
530
-** For --browser and --webpage, output any javascript required by
530
+** For --browser and --webpage, output any javascript required by
531531
** the diff. (Currently JS is only needed for side-by-side diffs).
532532
**
533533
** For --browser, close the connection to the temporary file, then
534534
** launch a web browser to view the file. After a delay
535535
** of FOSSIL_BROWSER_DIFF_DELAY milliseconds, delete the temp file.
@@ -947,11 +947,11 @@
947947
Blob content;
948948
db_prepare(&q, "SELECT pathname, content FROM undo");
949949
blob_init(&content, 0, 0);
950950
if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){
951951
diff_print_versions("(undo)", "(workdir)", pCfg);
952
- }
952
+ }
953953
while( db_step(&q)==SQLITE_ROW ){
954954
char *zFullName;
955955
const char *zFile = (const char*)db_column_text(&q, 0);
956956
if( !file_dir_match(pFileDir, zFile) ) continue;
957957
zFullName = mprintf("%s%s", g.zLocalRoot, zFile);
@@ -1034,11 +1034,11 @@
10341034
pTo = manifest_get_by_name(zTo, 0);
10351035
manifest_file_rewind(pTo);
10361036
pToFile = manifest_file_next(pTo,0);
10371037
if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){
10381038
diff_print_versions(zFrom, zTo, pCfg);
1039
- }
1039
+ }
10401040
while( pFromFile || pToFile ){
10411041
int cmp;
10421042
if( pFromFile==0 ){
10431043
cmp = +1;
10441044
}else if( pToFile==0 ){
@@ -1250,12 +1250,12 @@
12501250
** --brief Show filenames only
12511251
** -b|--browser Show the diff output in a web-browser
12521252
** --by Shorthand for "--browser -y"
12531253
** -ci|--checkin VERSION Show diff of all changes in VERSION
12541254
** --command PROG External diff program. Overrides "diff-command"
1255
-** -c|--context N Show N lines of context around each change, with
1256
-** negative N meaning show all content
1255
+** -c|--context N Show N lines of context around each change,
1256
+** with negative N meaning show all content
12571257
** --dark Use dark mode for the Tcl/Tk-based GUI and HTML
12581258
** --diff-binary BOOL Include binary files with external commands
12591259
** --exec-abs-paths Force absolute path names on external commands
12601260
** --exec-rel-paths Force relative path names on external commands
12611261
** -r|--from VERSION Select VERSION as source for the diff
@@ -1383,11 +1383,11 @@
13831383
}
13841384
fossil_free(pFileDir);
13851385
}
13861386
diff_end(&DCfg, 0);
13871387
if ( DCfg.diffFlags & DIFF_NUMSTAT ){
1388
- fossil_print("%10d %10d TOTAL over %d changed files\n",
1388
+ fossil_print("%10d %10d TOTAL over %d changed files\n",
13891389
g.diffCnt[1], g.diffCnt[2], g.diffCnt[0]);
13901390
}
13911391
}
13921392
13931393
/*
13941394
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -113,11 +113,11 @@
113 }
114
115 /*
116 ** Print details about the compared versions - possibly the working directory
117 ** or the undo buffer. For check-ins, show hash and commit time.
118 **
119 ** This is intended primarily to go into the "header garbage" that is ignored
120 ** by patch(1).
121 **
122 ** zFrom and zTo are interpreted as symbolic version names, unless they
123 ** start with '(', in which case they are printed directly.
@@ -218,11 +218,11 @@
218
219
220 /*
221 ** Default header texts for diff with --webpage
222 */
223 static const char zWebpageHdr[] =
224 @ <!DOCTYPE html>
225 @ <html>
226 @ <head>
227 @ <meta charset="UTF-8">
228 @ <style>
@@ -342,16 +342,16 @@
342 @ }
343 @ td.difftxt ins > ins {
344 @ background-color: #559855;
345 @ }
346 @ }
347 @
348 @ </style>
349 @ </head>
350 @ <body>
351 ;
352 static const char zWebpageHdrDark[] =
353 @ <!DOCTYPE html>
354 @ <html>
355 @ <head>
356 @ <meta charset="UTF-8">
357 @ <style>
@@ -360,11 +360,11 @@
360 @ color: #ffffff;
361 @ }
362 @ h1 {
363 @ font-size: 150%;
364 @ }
365 @
366 @ table.diff {
367 @ width: 100%;
368 @ border-spacing: 0;
369 @ border: 1px solid black;
370 @ line-height: inherit;
@@ -448,16 +448,16 @@
448 @ td.difftxt ins > ins.edit {
449 @ background-color: #c0c0ff;
450 @ text-decoration: none;
451 @ font-weight: bold;
452 @ }
453 @
454 @ </style>
455 @ </head>
456 @ <body>
457 ;
458 const char zWebpageEnd[] =
459 @ </body>
460 @ </html>
461 ;
462
463 /*
@@ -516,20 +516,20 @@
516 #else
517 SetConsoleCtrlHandler(diff_console_ctrl_handler, TRUE);
518 #endif
519 }
520 if( (pCfg->diffFlags & DIFF_WEBPAGE)!=0 ){
521 fossil_print("%s",(pCfg->diffFlags & DIFF_DARKMODE)!=0 ? zWebpageHdrDark :
522 zWebpageHdr);
523 fflush(stdout);
524 }
525 }
526
527 /* Do any final output required by a diff and complete the diff
528 ** process.
529 **
530 ** For --browser and --webpage, output any javascript required by
531 ** the diff. (Currently JS is only needed for side-by-side diffs).
532 **
533 ** For --browser, close the connection to the temporary file, then
534 ** launch a web browser to view the file. After a delay
535 ** of FOSSIL_BROWSER_DIFF_DELAY milliseconds, delete the temp file.
@@ -947,11 +947,11 @@
947 Blob content;
948 db_prepare(&q, "SELECT pathname, content FROM undo");
949 blob_init(&content, 0, 0);
950 if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){
951 diff_print_versions("(undo)", "(workdir)", pCfg);
952 }
953 while( db_step(&q)==SQLITE_ROW ){
954 char *zFullName;
955 const char *zFile = (const char*)db_column_text(&q, 0);
956 if( !file_dir_match(pFileDir, zFile) ) continue;
957 zFullName = mprintf("%s%s", g.zLocalRoot, zFile);
@@ -1034,11 +1034,11 @@
1034 pTo = manifest_get_by_name(zTo, 0);
1035 manifest_file_rewind(pTo);
1036 pToFile = manifest_file_next(pTo,0);
1037 if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){
1038 diff_print_versions(zFrom, zTo, pCfg);
1039 }
1040 while( pFromFile || pToFile ){
1041 int cmp;
1042 if( pFromFile==0 ){
1043 cmp = +1;
1044 }else if( pToFile==0 ){
@@ -1250,12 +1250,12 @@
1250 ** --brief Show filenames only
1251 ** -b|--browser Show the diff output in a web-browser
1252 ** --by Shorthand for "--browser -y"
1253 ** -ci|--checkin VERSION Show diff of all changes in VERSION
1254 ** --command PROG External diff program. Overrides "diff-command"
1255 ** -c|--context N Show N lines of context around each change, with
1256 ** negative N meaning show all content
1257 ** --dark Use dark mode for the Tcl/Tk-based GUI and HTML
1258 ** --diff-binary BOOL Include binary files with external commands
1259 ** --exec-abs-paths Force absolute path names on external commands
1260 ** --exec-rel-paths Force relative path names on external commands
1261 ** -r|--from VERSION Select VERSION as source for the diff
@@ -1383,11 +1383,11 @@
1383 }
1384 fossil_free(pFileDir);
1385 }
1386 diff_end(&DCfg, 0);
1387 if ( DCfg.diffFlags & DIFF_NUMSTAT ){
1388 fossil_print("%10d %10d TOTAL over %d changed files\n",
1389 g.diffCnt[1], g.diffCnt[2], g.diffCnt[0]);
1390 }
1391 }
1392
1393 /*
1394
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -113,11 +113,11 @@
113 }
114
115 /*
116 ** Print details about the compared versions - possibly the working directory
117 ** or the undo buffer. For check-ins, show hash and commit time.
118 **
119 ** This is intended primarily to go into the "header garbage" that is ignored
120 ** by patch(1).
121 **
122 ** zFrom and zTo are interpreted as symbolic version names, unless they
123 ** start with '(', in which case they are printed directly.
@@ -218,11 +218,11 @@
218
219
220 /*
221 ** Default header texts for diff with --webpage
222 */
223 static const char zWebpageHdr[] =
224 @ <!DOCTYPE html>
225 @ <html>
226 @ <head>
227 @ <meta charset="UTF-8">
228 @ <style>
@@ -342,16 +342,16 @@
342 @ }
343 @ td.difftxt ins > ins {
344 @ background-color: #559855;
345 @ }
346 @ }
347 @
348 @ </style>
349 @ </head>
350 @ <body>
351 ;
352 static const char zWebpageHdrDark[] =
353 @ <!DOCTYPE html>
354 @ <html>
355 @ <head>
356 @ <meta charset="UTF-8">
357 @ <style>
@@ -360,11 +360,11 @@
360 @ color: #ffffff;
361 @ }
362 @ h1 {
363 @ font-size: 150%;
364 @ }
365 @
366 @ table.diff {
367 @ width: 100%;
368 @ border-spacing: 0;
369 @ border: 1px solid black;
370 @ line-height: inherit;
@@ -448,16 +448,16 @@
448 @ td.difftxt ins > ins.edit {
449 @ background-color: #c0c0ff;
450 @ text-decoration: none;
451 @ font-weight: bold;
452 @ }
453 @
454 @ </style>
455 @ </head>
456 @ <body>
457 ;
458 const char zWebpageEnd[] =
459 @ </body>
460 @ </html>
461 ;
462
463 /*
@@ -516,20 +516,20 @@
516 #else
517 SetConsoleCtrlHandler(diff_console_ctrl_handler, TRUE);
518 #endif
519 }
520 if( (pCfg->diffFlags & DIFF_WEBPAGE)!=0 ){
521 fossil_print("%s",(pCfg->diffFlags & DIFF_DARKMODE)!=0 ? zWebpageHdrDark :
522 zWebpageHdr);
523 fflush(stdout);
524 }
525 }
526
527 /* Do any final output required by a diff and complete the diff
528 ** process.
529 **
530 ** For --browser and --webpage, output any javascript required by
531 ** the diff. (Currently JS is only needed for side-by-side diffs).
532 **
533 ** For --browser, close the connection to the temporary file, then
534 ** launch a web browser to view the file. After a delay
535 ** of FOSSIL_BROWSER_DIFF_DELAY milliseconds, delete the temp file.
@@ -947,11 +947,11 @@
947 Blob content;
948 db_prepare(&q, "SELECT pathname, content FROM undo");
949 blob_init(&content, 0, 0);
950 if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){
951 diff_print_versions("(undo)", "(workdir)", pCfg);
952 }
953 while( db_step(&q)==SQLITE_ROW ){
954 char *zFullName;
955 const char *zFile = (const char*)db_column_text(&q, 0);
956 if( !file_dir_match(pFileDir, zFile) ) continue;
957 zFullName = mprintf("%s%s", g.zLocalRoot, zFile);
@@ -1034,11 +1034,11 @@
1034 pTo = manifest_get_by_name(zTo, 0);
1035 manifest_file_rewind(pTo);
1036 pToFile = manifest_file_next(pTo,0);
1037 if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){
1038 diff_print_versions(zFrom, zTo, pCfg);
1039 }
1040 while( pFromFile || pToFile ){
1041 int cmp;
1042 if( pFromFile==0 ){
1043 cmp = +1;
1044 }else if( pToFile==0 ){
@@ -1250,12 +1250,12 @@
1250 ** --brief Show filenames only
1251 ** -b|--browser Show the diff output in a web-browser
1252 ** --by Shorthand for "--browser -y"
1253 ** -ci|--checkin VERSION Show diff of all changes in VERSION
1254 ** --command PROG External diff program. Overrides "diff-command"
1255 ** -c|--context N Show N lines of context around each change,
1256 ** with negative N meaning show all content
1257 ** --dark Use dark mode for the Tcl/Tk-based GUI and HTML
1258 ** --diff-binary BOOL Include binary files with external commands
1259 ** --exec-abs-paths Force absolute path names on external commands
1260 ** --exec-rel-paths Force relative path names on external commands
1261 ** -r|--from VERSION Select VERSION as source for the diff
@@ -1383,11 +1383,11 @@
1383 }
1384 fossil_free(pFileDir);
1385 }
1386 diff_end(&DCfg, 0);
1387 if ( DCfg.diffFlags & DIFF_NUMSTAT ){
1388 fossil_print("%10d %10d TOTAL over %d changed files\n",
1389 g.diffCnt[1], g.diffCnt[2], g.diffCnt[0]);
1390 }
1391 }
1392
1393 /*
1394
+16 -15
--- src/dispatch.c
+++ src/dispatch.c
@@ -453,11 +453,11 @@
453453
if( wantP ){
454454
blob_append(pHtml,"<p>", 3);
455455
wantP = 0;
456456
}
457457
blob_append(pHtml, "<ul>\n", 5);
458
- }else if( isDT
458
+ }else if( isDT
459459
|| zHelp[nIndent]=='-'
460460
|| hasGap(zHelp+nIndent,i-nIndent) ){
461461
iLevel++;
462462
aIndent[iLevel] = nIndent;
463463
azEnd[iLevel] = zEndDL;
@@ -547,15 +547,15 @@
547547
zHelp += i+2;
548548
blob_append(pText, zHelp, x-3);
549549
zHelp += x-1;
550550
i = -1;
551551
continue;
552
- }
552
+ }
553553
}
554554
if( i>0 ){
555555
blob_append(pText, zHelp, i);
556
- }
556
+ }
557557
}
558558
559559
/*
560560
** Display help for all commands based on provided flags.
561561
*/
@@ -635,11 +635,11 @@
635635
** Defaults to just the CLI commands. Specify --www to see only the
636636
** web pages, or --everything to see both commands and pages.
637637
**
638638
** Options:
639639
** -a|--aliases Show aliases
640
-** -e|--everything Show all commands and pages. Omit aliases to
640
+** -e|--everything Show all commands and pages. Omit aliases to
641641
** avoid duplicates.
642642
** -h|--html Transform output to HTML
643643
** -o|--options Show global options
644644
** -r|--raw No output formatting
645645
** -s|--settings Show settings
@@ -661,11 +661,11 @@
661661
if( find_option("settings","s",0) ){
662662
mask = CMDFLAG_SETTING;
663663
}
664664
if( find_option("aliases","a",0) ){
665665
mask = CMDFLAG_ALIAS;
666
- }
666
+ }
667667
if( find_option("test","t",0) ){
668668
mask |= CMDFLAG_TEST;
669669
}
670670
display_all_help(mask, useHtml, rawOut);
671671
}
@@ -768,11 +768,11 @@
768768
iFirst = FOSSIL_FIRST_CMD;
769769
iLast = MX_COMMAND-1;
770770
}
771771
772772
while( n<nArray ){
773
- bestScore = mxScore;
773
+ bestScore = mxScore;
774774
for(i=iFirst; i<=iLast; i++){
775775
m = edit_distance(zIn, aCommand[i].zName);
776776
if( m<mnScore ) continue;
777777
if( m==mnScore ){
778778
azArray[n++] = aCommand[i].zName;
@@ -897,11 +897,12 @@
897897
if( occHelp[aCommand[i].iHelp] > 1 ){
898898
int j;
899899
int aliases[MX_HELP_DUP], nAliases=0;
900900
for(j=0; j<occHelp[aCommand[i].iHelp]; j++){
901901
if( bktHelp[aCommand[i].iHelp][j] != i ){
902
- if( aCommand[bktHelp[aCommand[i].iHelp][j]].eCmdFlags & CMDFLAG_ALIAS ){
902
+ if( aCommand[bktHelp[aCommand[i].iHelp][j]].eCmdFlags
903
+ & CMDFLAG_ALIAS ){
903904
aliases[nAliases++] = bktHelp[aCommand[i].iHelp][j];
904905
}
905906
}
906907
}
907908
if( nAliases>0 ){
@@ -987,11 +988,11 @@
987988
@ <dl>
988989
/* Fill in help string buckets */
989990
for(i=0; i<MX_COMMAND; i++){
990991
if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue;
991992
bktHelp[aCommand[i].iHelp][occHelp[aCommand[i].iHelp]++] = i;
992
- }
993
+ }
993994
for(i=0; i<MX_COMMAND; i++){
994995
const char *zDesc;
995996
unsigned int e = aCommand[i].eCmdFlags;
996997
if( e & CMDFLAG_1ST_TIER ){
997998
zDesc = "1st tier command";
@@ -1039,11 +1040,11 @@
10391040
zDesc = "raw-content web page";
10401041
}else{
10411042
zDesc = "web page";
10421043
}
10431044
}
1044
-
1045
+
10451046
@ <dt><big><b>%s(aCommand[bktHelp[aCommand[i].iHelp][j]].zName)</b>
10461047
@</big> (%s(zDesc))</dt>
10471048
}
10481049
@ <p><dd>
10491050
help_to_html(aCommand[i].zHelp, cgi_output_blob());
@@ -1118,18 +1119,18 @@
11181119
** Documentation on universal command-line options.
11191120
*/
11201121
/* @-comment: # */
11211122
static const char zOptions[] =
11221123
@ Command-line options common to all commands:
1123
-@
1124
+@
11241125
@ --args FILENAME Read additional arguments and options from FILENAME
11251126
@ --case-sensitive BOOL Set case sensitivity for file names
11261127
@ --cgitrace Active CGI tracing
1127
-@ --chdir PATH Change to PATH before performing any operations
1128
+@ --chdir PATH Change to PATH before performing any operations
11281129
@ --comfmtflags VALUE Set comment formatting flags to VALUE
11291130
@ --comment-format VALUE Alias for --comfmtflags
1130
-@ --errorlog FILENAME Log errors to FILENAME
1131
+@ --errorlog FILENAME Log errors to FILENAME
11311132
@ --help Show help on the command rather than running it
11321133
@ --httptrace Trace outbound HTTP requests
11331134
@ --localtime Display times using the local timezone
11341135
@ --nocgi Do not act as CGI
11351136
@ --no-th-hook Do not run TH1 hooks
@@ -1487,15 +1488,15 @@
14871488
}
14881489
14891490
/*
14901491
** This method is called to "rewind" the helptextVtab_cursor object back
14911492
** to the first row of output. This method is always called at least
1492
-** once prior to any call to helptextVtabColumn() or helptextVtabRowid() or
1493
+** once prior to any call to helptextVtabColumn() or helptextVtabRowid() or
14931494
** helptextVtabEof().
14941495
*/
14951496
static int helptextVtabFilter(
1496
- sqlite3_vtab_cursor *pVtabCursor,
1497
+ sqlite3_vtab_cursor *pVtabCursor,
14971498
int idxNum, const char *idxStr,
14981499
int argc, sqlite3_value **argv
14991500
){
15001501
helptextVtab_cursor *pCur = (helptextVtab_cursor *)pVtabCursor;
15011502
pCur->iRowid = 1;
@@ -1516,11 +1517,11 @@
15161517
pIdxInfo->estimatedRows = MX_COMMAND;
15171518
return SQLITE_OK;
15181519
}
15191520
15201521
/*
1521
-** This following structure defines all the methods for the
1522
+** This following structure defines all the methods for the
15221523
** virtual table.
15231524
*/
15241525
static sqlite3_module helptextVtabModule = {
15251526
/* iVersion */ 0,
15261527
/* xCreate */ 0, /* Helptext is eponymous and read-only */
15271528
--- src/dispatch.c
+++ src/dispatch.c
@@ -453,11 +453,11 @@
453 if( wantP ){
454 blob_append(pHtml,"<p>", 3);
455 wantP = 0;
456 }
457 blob_append(pHtml, "<ul>\n", 5);
458 }else if( isDT
459 || zHelp[nIndent]=='-'
460 || hasGap(zHelp+nIndent,i-nIndent) ){
461 iLevel++;
462 aIndent[iLevel] = nIndent;
463 azEnd[iLevel] = zEndDL;
@@ -547,15 +547,15 @@
547 zHelp += i+2;
548 blob_append(pText, zHelp, x-3);
549 zHelp += x-1;
550 i = -1;
551 continue;
552 }
553 }
554 if( i>0 ){
555 blob_append(pText, zHelp, i);
556 }
557 }
558
559 /*
560 ** Display help for all commands based on provided flags.
561 */
@@ -635,11 +635,11 @@
635 ** Defaults to just the CLI commands. Specify --www to see only the
636 ** web pages, or --everything to see both commands and pages.
637 **
638 ** Options:
639 ** -a|--aliases Show aliases
640 ** -e|--everything Show all commands and pages. Omit aliases to
641 ** avoid duplicates.
642 ** -h|--html Transform output to HTML
643 ** -o|--options Show global options
644 ** -r|--raw No output formatting
645 ** -s|--settings Show settings
@@ -661,11 +661,11 @@
661 if( find_option("settings","s",0) ){
662 mask = CMDFLAG_SETTING;
663 }
664 if( find_option("aliases","a",0) ){
665 mask = CMDFLAG_ALIAS;
666 }
667 if( find_option("test","t",0) ){
668 mask |= CMDFLAG_TEST;
669 }
670 display_all_help(mask, useHtml, rawOut);
671 }
@@ -768,11 +768,11 @@
768 iFirst = FOSSIL_FIRST_CMD;
769 iLast = MX_COMMAND-1;
770 }
771
772 while( n<nArray ){
773 bestScore = mxScore;
774 for(i=iFirst; i<=iLast; i++){
775 m = edit_distance(zIn, aCommand[i].zName);
776 if( m<mnScore ) continue;
777 if( m==mnScore ){
778 azArray[n++] = aCommand[i].zName;
@@ -897,11 +897,12 @@
897 if( occHelp[aCommand[i].iHelp] > 1 ){
898 int j;
899 int aliases[MX_HELP_DUP], nAliases=0;
900 for(j=0; j<occHelp[aCommand[i].iHelp]; j++){
901 if( bktHelp[aCommand[i].iHelp][j] != i ){
902 if( aCommand[bktHelp[aCommand[i].iHelp][j]].eCmdFlags & CMDFLAG_ALIAS ){
 
903 aliases[nAliases++] = bktHelp[aCommand[i].iHelp][j];
904 }
905 }
906 }
907 if( nAliases>0 ){
@@ -987,11 +988,11 @@
987 @ <dl>
988 /* Fill in help string buckets */
989 for(i=0; i<MX_COMMAND; i++){
990 if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue;
991 bktHelp[aCommand[i].iHelp][occHelp[aCommand[i].iHelp]++] = i;
992 }
993 for(i=0; i<MX_COMMAND; i++){
994 const char *zDesc;
995 unsigned int e = aCommand[i].eCmdFlags;
996 if( e & CMDFLAG_1ST_TIER ){
997 zDesc = "1st tier command";
@@ -1039,11 +1040,11 @@
1039 zDesc = "raw-content web page";
1040 }else{
1041 zDesc = "web page";
1042 }
1043 }
1044
1045 @ <dt><big><b>%s(aCommand[bktHelp[aCommand[i].iHelp][j]].zName)</b>
1046 @</big> (%s(zDesc))</dt>
1047 }
1048 @ <p><dd>
1049 help_to_html(aCommand[i].zHelp, cgi_output_blob());
@@ -1118,18 +1119,18 @@
1118 ** Documentation on universal command-line options.
1119 */
1120 /* @-comment: # */
1121 static const char zOptions[] =
1122 @ Command-line options common to all commands:
1123 @
1124 @ --args FILENAME Read additional arguments and options from FILENAME
1125 @ --case-sensitive BOOL Set case sensitivity for file names
1126 @ --cgitrace Active CGI tracing
1127 @ --chdir PATH Change to PATH before performing any operations
1128 @ --comfmtflags VALUE Set comment formatting flags to VALUE
1129 @ --comment-format VALUE Alias for --comfmtflags
1130 @ --errorlog FILENAME Log errors to FILENAME
1131 @ --help Show help on the command rather than running it
1132 @ --httptrace Trace outbound HTTP requests
1133 @ --localtime Display times using the local timezone
1134 @ --nocgi Do not act as CGI
1135 @ --no-th-hook Do not run TH1 hooks
@@ -1487,15 +1488,15 @@
1487 }
1488
1489 /*
1490 ** This method is called to "rewind" the helptextVtab_cursor object back
1491 ** to the first row of output. This method is always called at least
1492 ** once prior to any call to helptextVtabColumn() or helptextVtabRowid() or
1493 ** helptextVtabEof().
1494 */
1495 static int helptextVtabFilter(
1496 sqlite3_vtab_cursor *pVtabCursor,
1497 int idxNum, const char *idxStr,
1498 int argc, sqlite3_value **argv
1499 ){
1500 helptextVtab_cursor *pCur = (helptextVtab_cursor *)pVtabCursor;
1501 pCur->iRowid = 1;
@@ -1516,11 +1517,11 @@
1516 pIdxInfo->estimatedRows = MX_COMMAND;
1517 return SQLITE_OK;
1518 }
1519
1520 /*
1521 ** This following structure defines all the methods for the
1522 ** virtual table.
1523 */
1524 static sqlite3_module helptextVtabModule = {
1525 /* iVersion */ 0,
1526 /* xCreate */ 0, /* Helptext is eponymous and read-only */
1527
--- src/dispatch.c
+++ src/dispatch.c
@@ -453,11 +453,11 @@
453 if( wantP ){
454 blob_append(pHtml,"<p>", 3);
455 wantP = 0;
456 }
457 blob_append(pHtml, "<ul>\n", 5);
458 }else if( isDT
459 || zHelp[nIndent]=='-'
460 || hasGap(zHelp+nIndent,i-nIndent) ){
461 iLevel++;
462 aIndent[iLevel] = nIndent;
463 azEnd[iLevel] = zEndDL;
@@ -547,15 +547,15 @@
547 zHelp += i+2;
548 blob_append(pText, zHelp, x-3);
549 zHelp += x-1;
550 i = -1;
551 continue;
552 }
553 }
554 if( i>0 ){
555 blob_append(pText, zHelp, i);
556 }
557 }
558
559 /*
560 ** Display help for all commands based on provided flags.
561 */
@@ -635,11 +635,11 @@
635 ** Defaults to just the CLI commands. Specify --www to see only the
636 ** web pages, or --everything to see both commands and pages.
637 **
638 ** Options:
639 ** -a|--aliases Show aliases
640 ** -e|--everything Show all commands and pages. Omit aliases to
641 ** avoid duplicates.
642 ** -h|--html Transform output to HTML
643 ** -o|--options Show global options
644 ** -r|--raw No output formatting
645 ** -s|--settings Show settings
@@ -661,11 +661,11 @@
661 if( find_option("settings","s",0) ){
662 mask = CMDFLAG_SETTING;
663 }
664 if( find_option("aliases","a",0) ){
665 mask = CMDFLAG_ALIAS;
666 }
667 if( find_option("test","t",0) ){
668 mask |= CMDFLAG_TEST;
669 }
670 display_all_help(mask, useHtml, rawOut);
671 }
@@ -768,11 +768,11 @@
768 iFirst = FOSSIL_FIRST_CMD;
769 iLast = MX_COMMAND-1;
770 }
771
772 while( n<nArray ){
773 bestScore = mxScore;
774 for(i=iFirst; i<=iLast; i++){
775 m = edit_distance(zIn, aCommand[i].zName);
776 if( m<mnScore ) continue;
777 if( m==mnScore ){
778 azArray[n++] = aCommand[i].zName;
@@ -897,11 +897,12 @@
897 if( occHelp[aCommand[i].iHelp] > 1 ){
898 int j;
899 int aliases[MX_HELP_DUP], nAliases=0;
900 for(j=0; j<occHelp[aCommand[i].iHelp]; j++){
901 if( bktHelp[aCommand[i].iHelp][j] != i ){
902 if( aCommand[bktHelp[aCommand[i].iHelp][j]].eCmdFlags
903 & CMDFLAG_ALIAS ){
904 aliases[nAliases++] = bktHelp[aCommand[i].iHelp][j];
905 }
906 }
907 }
908 if( nAliases>0 ){
@@ -987,11 +988,11 @@
988 @ <dl>
989 /* Fill in help string buckets */
990 for(i=0; i<MX_COMMAND; i++){
991 if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue;
992 bktHelp[aCommand[i].iHelp][occHelp[aCommand[i].iHelp]++] = i;
993 }
994 for(i=0; i<MX_COMMAND; i++){
995 const char *zDesc;
996 unsigned int e = aCommand[i].eCmdFlags;
997 if( e & CMDFLAG_1ST_TIER ){
998 zDesc = "1st tier command";
@@ -1039,11 +1040,11 @@
1040 zDesc = "raw-content web page";
1041 }else{
1042 zDesc = "web page";
1043 }
1044 }
1045
1046 @ <dt><big><b>%s(aCommand[bktHelp[aCommand[i].iHelp][j]].zName)</b>
1047 @</big> (%s(zDesc))</dt>
1048 }
1049 @ <p><dd>
1050 help_to_html(aCommand[i].zHelp, cgi_output_blob());
@@ -1118,18 +1119,18 @@
1119 ** Documentation on universal command-line options.
1120 */
1121 /* @-comment: # */
1122 static const char zOptions[] =
1123 @ Command-line options common to all commands:
1124 @
1125 @ --args FILENAME Read additional arguments and options from FILENAME
1126 @ --case-sensitive BOOL Set case sensitivity for file names
1127 @ --cgitrace Active CGI tracing
1128 @ --chdir PATH Change to PATH before performing any operations
1129 @ --comfmtflags VALUE Set comment formatting flags to VALUE
1130 @ --comment-format VALUE Alias for --comfmtflags
1131 @ --errorlog FILENAME Log errors to FILENAME
1132 @ --help Show help on the command rather than running it
1133 @ --httptrace Trace outbound HTTP requests
1134 @ --localtime Display times using the local timezone
1135 @ --nocgi Do not act as CGI
1136 @ --no-th-hook Do not run TH1 hooks
@@ -1487,15 +1488,15 @@
1488 }
1489
1490 /*
1491 ** This method is called to "rewind" the helptextVtab_cursor object back
1492 ** to the first row of output. This method is always called at least
1493 ** once prior to any call to helptextVtabColumn() or helptextVtabRowid() or
1494 ** helptextVtabEof().
1495 */
1496 static int helptextVtabFilter(
1497 sqlite3_vtab_cursor *pVtabCursor,
1498 int idxNum, const char *idxStr,
1499 int argc, sqlite3_value **argv
1500 ){
1501 helptextVtab_cursor *pCur = (helptextVtab_cursor *)pVtabCursor;
1502 pCur->iRowid = 1;
@@ -1516,11 +1517,11 @@
1517 pIdxInfo->estimatedRows = MX_COMMAND;
1518 return SQLITE_OK;
1519 }
1520
1521 /*
1522 ** This following structure defines all the methods for the
1523 ** virtual table.
1524 */
1525 static sqlite3_module helptextVtabModule = {
1526 /* iVersion */ 0,
1527 /* xCreate */ 0, /* Helptext is eponymous and read-only */
1528
+4 -4
--- src/doc.c
+++ src/doc.c
@@ -341,11 +341,11 @@
341341
static int once = 0;
342342
char * z;
343343
int tokenizerState /* 0=expecting a key, 1=skip next token,
344344
** 2=accept next token */;
345345
if(once==0){
346
- once = 1;
346
+ once = 1;
347347
zList = db_get("mimetypes",0);
348348
if(zList==0){
349349
return 0;
350350
}
351351
/* Transform zList to simplify the main loop:
@@ -729,13 +729,13 @@
729729
**
730730
** href="$ROOT/..."
731731
** action="$ROOT/..."
732732
** href=".../doc/$CURRENT/..."
733733
**
734
-** Convert $ROOT to the root URI of the repository, and $CURRENT to the
734
+** Convert $ROOT to the root URI of the repository, and $CURRENT to the
735735
** version number of the /doc/ document currently being displayed (if any).
736
-** Allow ' in place of " and any case for href or action.
736
+** Allow ' in place of " and any case for href or action.
737737
**
738738
** Efforts are made to limit this translation to cases where the text is
739739
** fully contained with an HTML markup element.
740740
*/
741741
void convert_href_and_output(Blob *pIn){
@@ -1211,11 +1211,11 @@
12111211
** command. For a permanent website, the recommended process is for
12121212
** the admin to set up a project-specific icon and reference that icon
12131213
** in the HTML header using a line like:
12141214
**
12151215
** <link rel="icon" href="URL-FOR-YOUR-ICON" type="MIMETYPE"/>
1216
-**
1216
+**
12171217
*/
12181218
void favicon_page(void){
12191219
Blob icon;
12201220
char *zMime;
12211221
12221222
--- src/doc.c
+++ src/doc.c
@@ -341,11 +341,11 @@
341 static int once = 0;
342 char * z;
343 int tokenizerState /* 0=expecting a key, 1=skip next token,
344 ** 2=accept next token */;
345 if(once==0){
346 once = 1;
347 zList = db_get("mimetypes",0);
348 if(zList==0){
349 return 0;
350 }
351 /* Transform zList to simplify the main loop:
@@ -729,13 +729,13 @@
729 **
730 ** href="$ROOT/..."
731 ** action="$ROOT/..."
732 ** href=".../doc/$CURRENT/..."
733 **
734 ** Convert $ROOT to the root URI of the repository, and $CURRENT to the
735 ** version number of the /doc/ document currently being displayed (if any).
736 ** Allow ' in place of " and any case for href or action.
737 **
738 ** Efforts are made to limit this translation to cases where the text is
739 ** fully contained with an HTML markup element.
740 */
741 void convert_href_and_output(Blob *pIn){
@@ -1211,11 +1211,11 @@
1211 ** command. For a permanent website, the recommended process is for
1212 ** the admin to set up a project-specific icon and reference that icon
1213 ** in the HTML header using a line like:
1214 **
1215 ** <link rel="icon" href="URL-FOR-YOUR-ICON" type="MIMETYPE"/>
1216 **
1217 */
1218 void favicon_page(void){
1219 Blob icon;
1220 char *zMime;
1221
1222
--- src/doc.c
+++ src/doc.c
@@ -341,11 +341,11 @@
341 static int once = 0;
342 char * z;
343 int tokenizerState /* 0=expecting a key, 1=skip next token,
344 ** 2=accept next token */;
345 if(once==0){
346 once = 1;
347 zList = db_get("mimetypes",0);
348 if(zList==0){
349 return 0;
350 }
351 /* Transform zList to simplify the main loop:
@@ -729,13 +729,13 @@
729 **
730 ** href="$ROOT/..."
731 ** action="$ROOT/..."
732 ** href=".../doc/$CURRENT/..."
733 **
734 ** Convert $ROOT to the root URI of the repository, and $CURRENT to the
735 ** version number of the /doc/ document currently being displayed (if any).
736 ** Allow ' in place of " and any case for href or action.
737 **
738 ** Efforts are made to limit this translation to cases where the text is
739 ** fully contained with an HTML markup element.
740 */
741 void convert_href_and_output(Blob *pIn){
@@ -1211,11 +1211,11 @@
1211 ** command. For a permanent website, the recommended process is for
1212 ** the admin to set up a project-specific icon and reference that icon
1213 ** in the HTML header using a line like:
1214 **
1215 ** <link rel="icon" href="URL-FOR-YOUR-ICON" type="MIMETYPE"/>
1216 **
1217 */
1218 void favicon_page(void){
1219 Blob icon;
1220 char *zMime;
1221
1222
+4 -4
--- src/etag.c
+++ src/etag.c
@@ -100,18 +100,18 @@
100100
101101
if( etagCancelled ) return;
102102
103103
/* By default, ETagged URLs never expire since the ETag will change
104104
* when the content changes. Approximate this policy as 10 years. */
105
- iMaxAge = 10 * 365 * 24 * 60 * 60;
105
+ iMaxAge = 10 * 365 * 24 * 60 * 60;
106106
md5sum_init();
107107
108108
/* Always include the executable ID as part of the hash */
109109
md5sum_step_text("exe-id: ", -1);
110110
md5sum_step_text(fossil_exe_id(), -1);
111111
md5sum_step_text("\n", 1);
112
-
112
+
113113
if( (eFlags & ETAG_HASH)!=0 && zHash ){
114114
md5sum_step_text("hash: ", -1);
115115
md5sum_step_text(zHash, -1);
116116
md5sum_step_text("\n", 1);
117117
iMaxAge = 0;
@@ -210,11 +210,11 @@
210210
zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE");
211211
if( zIfModifiedSince==0 ) return;
212212
x = cgi_rfc822_parsedate(zIfModifiedSince);
213213
if( x<mtime ) return;
214214
215
-#if 0
215
+#if 0
216216
/* If the Fossil executable is more recent than If-Modified-Since,
217217
** go ahead and regenerate the resource. */
218218
if( file_mtime(g.nameOfExe, ExtFILE)>x ) return;
219219
#endif
220220
@@ -244,11 +244,11 @@
244244
*/
245245
sqlite3_int64 etag_mtime(void){
246246
return iEtagMtime;
247247
}
248248
249
-/*
249
+/*
250250
** COMMAND: test-etag
251251
**
252252
** Usage: fossil test-etag -key KEY-NUMBER -hash HASH
253253
**
254254
** Generate an etag given a KEY-NUMBER and/or a HASH.
255255
--- src/etag.c
+++ src/etag.c
@@ -100,18 +100,18 @@
100
101 if( etagCancelled ) return;
102
103 /* By default, ETagged URLs never expire since the ETag will change
104 * when the content changes. Approximate this policy as 10 years. */
105 iMaxAge = 10 * 365 * 24 * 60 * 60;
106 md5sum_init();
107
108 /* Always include the executable ID as part of the hash */
109 md5sum_step_text("exe-id: ", -1);
110 md5sum_step_text(fossil_exe_id(), -1);
111 md5sum_step_text("\n", 1);
112
113 if( (eFlags & ETAG_HASH)!=0 && zHash ){
114 md5sum_step_text("hash: ", -1);
115 md5sum_step_text(zHash, -1);
116 md5sum_step_text("\n", 1);
117 iMaxAge = 0;
@@ -210,11 +210,11 @@
210 zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE");
211 if( zIfModifiedSince==0 ) return;
212 x = cgi_rfc822_parsedate(zIfModifiedSince);
213 if( x<mtime ) return;
214
215 #if 0
216 /* If the Fossil executable is more recent than If-Modified-Since,
217 ** go ahead and regenerate the resource. */
218 if( file_mtime(g.nameOfExe, ExtFILE)>x ) return;
219 #endif
220
@@ -244,11 +244,11 @@
244 */
245 sqlite3_int64 etag_mtime(void){
246 return iEtagMtime;
247 }
248
249 /*
250 ** COMMAND: test-etag
251 **
252 ** Usage: fossil test-etag -key KEY-NUMBER -hash HASH
253 **
254 ** Generate an etag given a KEY-NUMBER and/or a HASH.
255
--- src/etag.c
+++ src/etag.c
@@ -100,18 +100,18 @@
100
101 if( etagCancelled ) return;
102
103 /* By default, ETagged URLs never expire since the ETag will change
104 * when the content changes. Approximate this policy as 10 years. */
105 iMaxAge = 10 * 365 * 24 * 60 * 60;
106 md5sum_init();
107
108 /* Always include the executable ID as part of the hash */
109 md5sum_step_text("exe-id: ", -1);
110 md5sum_step_text(fossil_exe_id(), -1);
111 md5sum_step_text("\n", 1);
112
113 if( (eFlags & ETAG_HASH)!=0 && zHash ){
114 md5sum_step_text("hash: ", -1);
115 md5sum_step_text(zHash, -1);
116 md5sum_step_text("\n", 1);
117 iMaxAge = 0;
@@ -210,11 +210,11 @@
210 zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE");
211 if( zIfModifiedSince==0 ) return;
212 x = cgi_rfc822_parsedate(zIfModifiedSince);
213 if( x<mtime ) return;
214
215 #if 0
216 /* If the Fossil executable is more recent than If-Modified-Since,
217 ** go ahead and regenerate the resource. */
218 if( file_mtime(g.nameOfExe, ExtFILE)>x ) return;
219 #endif
220
@@ -244,11 +244,11 @@
244 */
245 sqlite3_int64 etag_mtime(void){
246 return iEtagMtime;
247 }
248
249 /*
250 ** COMMAND: test-etag
251 **
252 ** Usage: fossil test-etag -key KEY-NUMBER -hash HASH
253 **
254 ** Generate an etag given a KEY-NUMBER and/or a HASH.
255
+8 -8
--- src/export.c
+++ src/export.c
@@ -449,11 +449,11 @@
449449
}
450450
}
451451
452452
/* This is the original header command (and hence documentation) for
453453
** the "fossil export" command:
454
-**
454
+**
455455
** Usage: %fossil export --git ?OPTIONS? ?REPOSITORY?
456456
**
457457
** Write an export of all check-ins to standard output. The export is
458458
** written in the git-fast-export file format assuming the --git option is
459459
** provided. The git-fast-export format is currently the only VCS
@@ -1004,11 +1004,11 @@
10041004
db_reset(&sIns);
10051005
return mprintf(":%d", db_last_insert_rowid());
10061006
}
10071007
10081008
/* This is the SHA3-256 hash of an empty file */
1009
-static const char zEmptySha3[] =
1009
+static const char zEmptySha3[] =
10101010
"a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a";
10111011
10121012
/*
10131013
** Export a single file named by zUuid.
10141014
**
@@ -1037,11 +1037,11 @@
10371037
if( rc==0 ){
10381038
if( bPhantomOk ){
10391039
blob_init(&data, 0, 0);
10401040
gitmirror_message(VERB_EXTRA, "missing file: %s\n", zUuid);
10411041
zUuid = zEmptySha3;
1042
- }else{
1042
+ }else{
10431043
return 1;
10441044
}
10451045
}
10461046
}
10471047
zMark = gitmirror_find_mark(zUuid, 1, 1);
@@ -1350,11 +1350,11 @@
13501350
gitmirror_message(VERB_NORMAL, "%s\n", zCmd);
13511351
xCmd = popen(zCmd, "r");
13521352
if( xCmd==0 ){
13531353
fossil_fatal("git command failed: %s", zCmd);
13541354
}
1355
-
1355
+
13561356
z = fgets(zLine, sizeof(zLine), xCmd);
13571357
pclose(xCmd);
13581358
if( z==0 ){
13591359
fossil_fatal("no output from \"%s\"", zCmd);
13601360
}
@@ -1361,11 +1361,11 @@
13611361
for(i=0; z[i] && !fossil_isspace(z[i]); i++){}
13621362
z[i] = 0;
13631363
zMainBr = fossil_strdup(z);
13641364
}
13651365
return zMainBr;
1366
-}
1366
+}
13671367
13681368
/*
13691369
** Implementation of the "fossil git export" command.
13701370
*/
13711371
void gitmirror_export_command(void){
@@ -1436,11 +1436,11 @@
14361436
if( !file_isdir(z, ExtFILE) ){
14371437
zMainBr = gitmirror_init(zMirror, zMainBr);
14381438
bNeedRepack = 1;
14391439
}
14401440
fossil_free(z);
1441
-
1441
+
14421442
/* Make sure the .mirror_state subdirectory exists */
14431443
z = mprintf("%s/.mirror_state", zMirror);
14441444
rc = file_mkdir(z, ExtFILE, 0);
14451445
if( rc ) fossil_fatal("cannot create directory \"%s\"", z);
14461446
fossil_free(z);
@@ -1743,11 +1743,11 @@
17431743
int bByAll = 0; /* Undocumented option meaning this command was invoked
17441744
** from "fossil all" and should modify output accordingly */
17451745
17461746
db_find_and_open_repository(0, 0);
17471747
bQuiet = find_option("quiet","q",0)!=0;
1748
- bByAll = find_option("by-all",0,0)!=0;
1748
+ bByAll = find_option("by-all",0,0)!=0;
17491749
verify_all_options();
17501750
zMirror = db_get("last-git-export-repo", 0);
17511751
if( zMirror==0 ){
17521752
if( bQuiet ) return;
17531753
if( bByAll ) return;
@@ -1856,11 +1856,11 @@
18561856
** -q|--quiet Reduce output. Repeat for even less output.
18571857
** -v|--verbose More output
18581858
**
18591859
** > fossil git import MIRROR
18601860
**
1861
-** TBD...
1861
+** TBD...
18621862
**
18631863
** > fossil git status
18641864
**
18651865
** Show the status of the current Git mirror, if there is one.
18661866
**
18671867
--- src/export.c
+++ src/export.c
@@ -449,11 +449,11 @@
449 }
450 }
451
452 /* This is the original header command (and hence documentation) for
453 ** the "fossil export" command:
454 **
455 ** Usage: %fossil export --git ?OPTIONS? ?REPOSITORY?
456 **
457 ** Write an export of all check-ins to standard output. The export is
458 ** written in the git-fast-export file format assuming the --git option is
459 ** provided. The git-fast-export format is currently the only VCS
@@ -1004,11 +1004,11 @@
1004 db_reset(&sIns);
1005 return mprintf(":%d", db_last_insert_rowid());
1006 }
1007
1008 /* This is the SHA3-256 hash of an empty file */
1009 static const char zEmptySha3[] =
1010 "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a";
1011
1012 /*
1013 ** Export a single file named by zUuid.
1014 **
@@ -1037,11 +1037,11 @@
1037 if( rc==0 ){
1038 if( bPhantomOk ){
1039 blob_init(&data, 0, 0);
1040 gitmirror_message(VERB_EXTRA, "missing file: %s\n", zUuid);
1041 zUuid = zEmptySha3;
1042 }else{
1043 return 1;
1044 }
1045 }
1046 }
1047 zMark = gitmirror_find_mark(zUuid, 1, 1);
@@ -1350,11 +1350,11 @@
1350 gitmirror_message(VERB_NORMAL, "%s\n", zCmd);
1351 xCmd = popen(zCmd, "r");
1352 if( xCmd==0 ){
1353 fossil_fatal("git command failed: %s", zCmd);
1354 }
1355
1356 z = fgets(zLine, sizeof(zLine), xCmd);
1357 pclose(xCmd);
1358 if( z==0 ){
1359 fossil_fatal("no output from \"%s\"", zCmd);
1360 }
@@ -1361,11 +1361,11 @@
1361 for(i=0; z[i] && !fossil_isspace(z[i]); i++){}
1362 z[i] = 0;
1363 zMainBr = fossil_strdup(z);
1364 }
1365 return zMainBr;
1366 }
1367
1368 /*
1369 ** Implementation of the "fossil git export" command.
1370 */
1371 void gitmirror_export_command(void){
@@ -1436,11 +1436,11 @@
1436 if( !file_isdir(z, ExtFILE) ){
1437 zMainBr = gitmirror_init(zMirror, zMainBr);
1438 bNeedRepack = 1;
1439 }
1440 fossil_free(z);
1441
1442 /* Make sure the .mirror_state subdirectory exists */
1443 z = mprintf("%s/.mirror_state", zMirror);
1444 rc = file_mkdir(z, ExtFILE, 0);
1445 if( rc ) fossil_fatal("cannot create directory \"%s\"", z);
1446 fossil_free(z);
@@ -1743,11 +1743,11 @@
1743 int bByAll = 0; /* Undocumented option meaning this command was invoked
1744 ** from "fossil all" and should modify output accordingly */
1745
1746 db_find_and_open_repository(0, 0);
1747 bQuiet = find_option("quiet","q",0)!=0;
1748 bByAll = find_option("by-all",0,0)!=0;
1749 verify_all_options();
1750 zMirror = db_get("last-git-export-repo", 0);
1751 if( zMirror==0 ){
1752 if( bQuiet ) return;
1753 if( bByAll ) return;
@@ -1856,11 +1856,11 @@
1856 ** -q|--quiet Reduce output. Repeat for even less output.
1857 ** -v|--verbose More output
1858 **
1859 ** > fossil git import MIRROR
1860 **
1861 ** TBD...
1862 **
1863 ** > fossil git status
1864 **
1865 ** Show the status of the current Git mirror, if there is one.
1866 **
1867
--- src/export.c
+++ src/export.c
@@ -449,11 +449,11 @@
449 }
450 }
451
452 /* This is the original header command (and hence documentation) for
453 ** the "fossil export" command:
454 **
455 ** Usage: %fossil export --git ?OPTIONS? ?REPOSITORY?
456 **
457 ** Write an export of all check-ins to standard output. The export is
458 ** written in the git-fast-export file format assuming the --git option is
459 ** provided. The git-fast-export format is currently the only VCS
@@ -1004,11 +1004,11 @@
1004 db_reset(&sIns);
1005 return mprintf(":%d", db_last_insert_rowid());
1006 }
1007
1008 /* This is the SHA3-256 hash of an empty file */
1009 static const char zEmptySha3[] =
1010 "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a";
1011
1012 /*
1013 ** Export a single file named by zUuid.
1014 **
@@ -1037,11 +1037,11 @@
1037 if( rc==0 ){
1038 if( bPhantomOk ){
1039 blob_init(&data, 0, 0);
1040 gitmirror_message(VERB_EXTRA, "missing file: %s\n", zUuid);
1041 zUuid = zEmptySha3;
1042 }else{
1043 return 1;
1044 }
1045 }
1046 }
1047 zMark = gitmirror_find_mark(zUuid, 1, 1);
@@ -1350,11 +1350,11 @@
1350 gitmirror_message(VERB_NORMAL, "%s\n", zCmd);
1351 xCmd = popen(zCmd, "r");
1352 if( xCmd==0 ){
1353 fossil_fatal("git command failed: %s", zCmd);
1354 }
1355
1356 z = fgets(zLine, sizeof(zLine), xCmd);
1357 pclose(xCmd);
1358 if( z==0 ){
1359 fossil_fatal("no output from \"%s\"", zCmd);
1360 }
@@ -1361,11 +1361,11 @@
1361 for(i=0; z[i] && !fossil_isspace(z[i]); i++){}
1362 z[i] = 0;
1363 zMainBr = fossil_strdup(z);
1364 }
1365 return zMainBr;
1366 }
1367
1368 /*
1369 ** Implementation of the "fossil git export" command.
1370 */
1371 void gitmirror_export_command(void){
@@ -1436,11 +1436,11 @@
1436 if( !file_isdir(z, ExtFILE) ){
1437 zMainBr = gitmirror_init(zMirror, zMainBr);
1438 bNeedRepack = 1;
1439 }
1440 fossil_free(z);
1441
1442 /* Make sure the .mirror_state subdirectory exists */
1443 z = mprintf("%s/.mirror_state", zMirror);
1444 rc = file_mkdir(z, ExtFILE, 0);
1445 if( rc ) fossil_fatal("cannot create directory \"%s\"", z);
1446 fossil_free(z);
@@ -1743,11 +1743,11 @@
1743 int bByAll = 0; /* Undocumented option meaning this command was invoked
1744 ** from "fossil all" and should modify output accordingly */
1745
1746 db_find_and_open_repository(0, 0);
1747 bQuiet = find_option("quiet","q",0)!=0;
1748 bByAll = find_option("by-all",0,0)!=0;
1749 verify_all_options();
1750 zMirror = db_get("last-git-export-repo", 0);
1751 if( zMirror==0 ){
1752 if( bQuiet ) return;
1753 if( bByAll ) return;
@@ -1856,11 +1856,11 @@
1856 ** -q|--quiet Reduce output. Repeat for even less output.
1857 ** -v|--verbose More output
1858 **
1859 ** > fossil git import MIRROR
1860 **
1861 ** TBD...
1862 **
1863 ** > fossil git status
1864 **
1865 ** Show the status of the current Git mirror, if there is one.
1866 **
1867
+1 -1
--- src/file.c
+++ src/file.c
@@ -2245,11 +2245,11 @@
22452245
** Return non-NULL if zFilename contains pathname elements that
22462246
** are reserved on Windows. The returned string is the disallowed
22472247
** path element.
22482248
*/
22492249
const char *file_is_win_reserved(const char *zPath){
2250
- static const char *const azRes[] = { "CON", "PRN", "AUX", "NUL", "COM", "LPT" };
2250
+ static const char *const azRes[] = { "CON","PRN","AUX","NUL","COM","LPT" };
22512251
static char zReturn[5];
22522252
int i;
22532253
while( zPath[0] ){
22542254
for(i=0; i<count(azRes); i++){
22552255
if( sqlite3_strnicmp(zPath, azRes[i], 3)==0
22562256
--- src/file.c
+++ src/file.c
@@ -2245,11 +2245,11 @@
2245 ** Return non-NULL if zFilename contains pathname elements that
2246 ** are reserved on Windows. The returned string is the disallowed
2247 ** path element.
2248 */
2249 const char *file_is_win_reserved(const char *zPath){
2250 static const char *const azRes[] = { "CON", "PRN", "AUX", "NUL", "COM", "LPT" };
2251 static char zReturn[5];
2252 int i;
2253 while( zPath[0] ){
2254 for(i=0; i<count(azRes); i++){
2255 if( sqlite3_strnicmp(zPath, azRes[i], 3)==0
2256
--- src/file.c
+++ src/file.c
@@ -2245,11 +2245,11 @@
2245 ** Return non-NULL if zFilename contains pathname elements that
2246 ** are reserved on Windows. The returned string is the disallowed
2247 ** path element.
2248 */
2249 const char *file_is_win_reserved(const char *zPath){
2250 static const char *const azRes[] = { "CON","PRN","AUX","NUL","COM","LPT" };
2251 static char zReturn[5];
2252 int i;
2253 while( zPath[0] ){
2254 for(i=0; i<count(azRes); i++){
2255 if( sqlite3_strnicmp(zPath, azRes[i], 3)==0
2256
+10 -10
--- src/fileedit.c
+++ src/fileedit.c
@@ -436,11 +436,11 @@
436436
** This function validates pCI's state and fails if any validation
437437
** fails.
438438
**
439439
** On error, returns false (0) and, if pErr is not NULL, writes a
440440
** diagnostic message there.
441
-**
441
+**
442442
** Returns true on success. If pRid is not NULL, the RID of the
443443
** resulting manifest is written to *pRid.
444444
**
445445
** The check-in process is largely influenced by pCI->flags, and that
446446
** must be populated before calling this. See the fossil_cimini_flags
@@ -573,11 +573,11 @@
573573
/* Convert to the requested EOL style. Note that this inherently
574574
** runs a risk of breaking content, e.g. string literals which
575575
** contain embedded newlines. Note that HTML5 specifies that
576576
** form-submitted TEXTAREA content gets normalized to CRLF-style:
577577
**
578
- ** https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element
578
+ ** https://html.spec.whatwg.org/#the-textarea-element
579579
*/
580580
const int pseudoBinary = LOOK_LONG | LOOK_NUL;
581581
const int lookFlags = LOOK_CRLF | LOOK_LONE_LF | pseudoBinary;
582582
const int lookNew = looks_like_utf8( &pCI->fileContent, lookFlags );
583583
if(!(pseudoBinary & lookNew)){
@@ -981,11 +981,11 @@
981981
const char * zFilename,
982982
int * frid){
983983
char * zFileUuid = 0; /* file content UUID */
984984
const int checkFile = zFilename!=0 || frid!=0;
985985
int vid = 0;
986
-
986
+
987987
if(checkFile && !fileedit_ajax_check_filename(zFilename)){
988988
return 0;
989989
}
990990
vid = symbolic_name_to_rid(zRev, "ci");
991991
if(0==vid){
@@ -1176,11 +1176,11 @@
11761176
*/
11771177
static int fileedit_setup_cimi_from_p(CheckinMiniInfo * p, Blob * pErr,
11781178
int * bIsMissingArg){
11791179
char * zFileUuid = 0; /* UUID of file content */
11801180
const char * zFlag; /* generic flag */
1181
- int rc = 0, vid = 0, frid = 0; /* result code, check-in/file rids */
1181
+ int rc = 0, vid = 0, frid = 0; /* result code, check-in/file rids */
11821182
11831183
#define fail(EXPR) blob_appendf EXPR; goto end_fail
11841184
zFlag = PD("filename",P("fn"));
11851185
if(zFlag==0 || !*zFlag){
11861186
rc = 400;
@@ -1371,11 +1371,11 @@
13711371
}
13721372
CX("%!j", zFilename);
13731373
}
13741374
}
13751375
db_finalize(&q);
1376
- CX("]}");
1376
+ CX("]}");
13771377
}
13781378
13791379
/*
13801380
** AJAX route /fileedit?ajax=filelist
13811381
**
@@ -1427,11 +1427,11 @@
14271427
14281428
/*
14291429
** AJAX route /fileedit?ajax=commit
14301430
**
14311431
** Required query parameters:
1432
-**
1432
+**
14331433
** filename=FILENAME
14341434
** checkin=Parent check-in UUID
14351435
** content=text
14361436
** comment=non-empty text
14371437
**
@@ -1441,11 +1441,11 @@
14411441
**
14421442
** dry_run=int (1 or 0)
14431443
**
14441444
** include_manifest=int (1 or 0), whether to include
14451445
** the generated manifest in the response.
1446
-**
1446
+**
14471447
**
14481448
** User must have Write permissions to use this page.
14491449
**
14501450
** Responds with JSON (with some state repeated
14511451
** from the input in order to avoid certain race conditions
@@ -1577,11 +1577,11 @@
15771577
** Which additional parameters are used by each distinct ajax route
15781578
** is an internal implementation detail and may change with any
15791579
** given build of this code. An unknown "name" value triggers an
15801580
** error, as documented for ajax_route_error().
15811581
*/
1582
-
1582
+
15831583
/* Allow no access to this page without check-in privilege */
15841584
login_check_credentials();
15851585
if( !g.perm.Write ){
15861586
if(zAjax!=0){
15871587
ajax_route_error(403, "Write permissions required.");
@@ -1670,11 +1670,11 @@
16701670
** whatever CSS we wish...
16711671
*/
16721672
style_script_begin(__FILE__,__LINE__);
16731673
CX("document.body.classList.add('fileedit');\n");
16741674
style_script_end();
1675
-
1675
+
16761676
/* Status bar */
16771677
CX("<div id='fossil-status-bar' "
16781678
"title='Status message area. Double-click to clear them.'>"
16791679
"Status messages will go here.</div>\n"
16801680
/* will be moved into the tab container via JS */);
@@ -1939,11 +1939,11 @@
19391939
"Comment style:",
19401940
"Specify how fossil will interpret the "
19411941
"comment string.",
19421942
NULL,
19431943
"Fossil", "text/x-fossil-wiki",
1944
- "Markdown", "text/x-markdown",
1944
+ "Markdown", "text/x-markdown",
19451945
"Plain text", "text/plain",
19461946
NULL);
19471947
CX("</div>\n");
19481948
}
19491949
CX("<div class='fileedit-hint flex-container flex-row'>"
19501950
--- src/fileedit.c
+++ src/fileedit.c
@@ -436,11 +436,11 @@
436 ** This function validates pCI's state and fails if any validation
437 ** fails.
438 **
439 ** On error, returns false (0) and, if pErr is not NULL, writes a
440 ** diagnostic message there.
441 **
442 ** Returns true on success. If pRid is not NULL, the RID of the
443 ** resulting manifest is written to *pRid.
444 **
445 ** The check-in process is largely influenced by pCI->flags, and that
446 ** must be populated before calling this. See the fossil_cimini_flags
@@ -573,11 +573,11 @@
573 /* Convert to the requested EOL style. Note that this inherently
574 ** runs a risk of breaking content, e.g. string literals which
575 ** contain embedded newlines. Note that HTML5 specifies that
576 ** form-submitted TEXTAREA content gets normalized to CRLF-style:
577 **
578 ** https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element
579 */
580 const int pseudoBinary = LOOK_LONG | LOOK_NUL;
581 const int lookFlags = LOOK_CRLF | LOOK_LONE_LF | pseudoBinary;
582 const int lookNew = looks_like_utf8( &pCI->fileContent, lookFlags );
583 if(!(pseudoBinary & lookNew)){
@@ -981,11 +981,11 @@
981 const char * zFilename,
982 int * frid){
983 char * zFileUuid = 0; /* file content UUID */
984 const int checkFile = zFilename!=0 || frid!=0;
985 int vid = 0;
986
987 if(checkFile && !fileedit_ajax_check_filename(zFilename)){
988 return 0;
989 }
990 vid = symbolic_name_to_rid(zRev, "ci");
991 if(0==vid){
@@ -1176,11 +1176,11 @@
1176 */
1177 static int fileedit_setup_cimi_from_p(CheckinMiniInfo * p, Blob * pErr,
1178 int * bIsMissingArg){
1179 char * zFileUuid = 0; /* UUID of file content */
1180 const char * zFlag; /* generic flag */
1181 int rc = 0, vid = 0, frid = 0; /* result code, check-in/file rids */
1182
1183 #define fail(EXPR) blob_appendf EXPR; goto end_fail
1184 zFlag = PD("filename",P("fn"));
1185 if(zFlag==0 || !*zFlag){
1186 rc = 400;
@@ -1371,11 +1371,11 @@
1371 }
1372 CX("%!j", zFilename);
1373 }
1374 }
1375 db_finalize(&q);
1376 CX("]}");
1377 }
1378
1379 /*
1380 ** AJAX route /fileedit?ajax=filelist
1381 **
@@ -1427,11 +1427,11 @@
1427
1428 /*
1429 ** AJAX route /fileedit?ajax=commit
1430 **
1431 ** Required query parameters:
1432 **
1433 ** filename=FILENAME
1434 ** checkin=Parent check-in UUID
1435 ** content=text
1436 ** comment=non-empty text
1437 **
@@ -1441,11 +1441,11 @@
1441 **
1442 ** dry_run=int (1 or 0)
1443 **
1444 ** include_manifest=int (1 or 0), whether to include
1445 ** the generated manifest in the response.
1446 **
1447 **
1448 ** User must have Write permissions to use this page.
1449 **
1450 ** Responds with JSON (with some state repeated
1451 ** from the input in order to avoid certain race conditions
@@ -1577,11 +1577,11 @@
1577 ** Which additional parameters are used by each distinct ajax route
1578 ** is an internal implementation detail and may change with any
1579 ** given build of this code. An unknown "name" value triggers an
1580 ** error, as documented for ajax_route_error().
1581 */
1582
1583 /* Allow no access to this page without check-in privilege */
1584 login_check_credentials();
1585 if( !g.perm.Write ){
1586 if(zAjax!=0){
1587 ajax_route_error(403, "Write permissions required.");
@@ -1670,11 +1670,11 @@
1670 ** whatever CSS we wish...
1671 */
1672 style_script_begin(__FILE__,__LINE__);
1673 CX("document.body.classList.add('fileedit');\n");
1674 style_script_end();
1675
1676 /* Status bar */
1677 CX("<div id='fossil-status-bar' "
1678 "title='Status message area. Double-click to clear them.'>"
1679 "Status messages will go here.</div>\n"
1680 /* will be moved into the tab container via JS */);
@@ -1939,11 +1939,11 @@
1939 "Comment style:",
1940 "Specify how fossil will interpret the "
1941 "comment string.",
1942 NULL,
1943 "Fossil", "text/x-fossil-wiki",
1944 "Markdown", "text/x-markdown",
1945 "Plain text", "text/plain",
1946 NULL);
1947 CX("</div>\n");
1948 }
1949 CX("<div class='fileedit-hint flex-container flex-row'>"
1950
--- src/fileedit.c
+++ src/fileedit.c
@@ -436,11 +436,11 @@
436 ** This function validates pCI's state and fails if any validation
437 ** fails.
438 **
439 ** On error, returns false (0) and, if pErr is not NULL, writes a
440 ** diagnostic message there.
441 **
442 ** Returns true on success. If pRid is not NULL, the RID of the
443 ** resulting manifest is written to *pRid.
444 **
445 ** The check-in process is largely influenced by pCI->flags, and that
446 ** must be populated before calling this. See the fossil_cimini_flags
@@ -573,11 +573,11 @@
573 /* Convert to the requested EOL style. Note that this inherently
574 ** runs a risk of breaking content, e.g. string literals which
575 ** contain embedded newlines. Note that HTML5 specifies that
576 ** form-submitted TEXTAREA content gets normalized to CRLF-style:
577 **
578 ** https://html.spec.whatwg.org/#the-textarea-element
579 */
580 const int pseudoBinary = LOOK_LONG | LOOK_NUL;
581 const int lookFlags = LOOK_CRLF | LOOK_LONE_LF | pseudoBinary;
582 const int lookNew = looks_like_utf8( &pCI->fileContent, lookFlags );
583 if(!(pseudoBinary & lookNew)){
@@ -981,11 +981,11 @@
981 const char * zFilename,
982 int * frid){
983 char * zFileUuid = 0; /* file content UUID */
984 const int checkFile = zFilename!=0 || frid!=0;
985 int vid = 0;
986
987 if(checkFile && !fileedit_ajax_check_filename(zFilename)){
988 return 0;
989 }
990 vid = symbolic_name_to_rid(zRev, "ci");
991 if(0==vid){
@@ -1176,11 +1176,11 @@
1176 */
1177 static int fileedit_setup_cimi_from_p(CheckinMiniInfo * p, Blob * pErr,
1178 int * bIsMissingArg){
1179 char * zFileUuid = 0; /* UUID of file content */
1180 const char * zFlag; /* generic flag */
1181 int rc = 0, vid = 0, frid = 0; /* result code, check-in/file rids */
1182
1183 #define fail(EXPR) blob_appendf EXPR; goto end_fail
1184 zFlag = PD("filename",P("fn"));
1185 if(zFlag==0 || !*zFlag){
1186 rc = 400;
@@ -1371,11 +1371,11 @@
1371 }
1372 CX("%!j", zFilename);
1373 }
1374 }
1375 db_finalize(&q);
1376 CX("]}");
1377 }
1378
1379 /*
1380 ** AJAX route /fileedit?ajax=filelist
1381 **
@@ -1427,11 +1427,11 @@
1427
1428 /*
1429 ** AJAX route /fileedit?ajax=commit
1430 **
1431 ** Required query parameters:
1432 **
1433 ** filename=FILENAME
1434 ** checkin=Parent check-in UUID
1435 ** content=text
1436 ** comment=non-empty text
1437 **
@@ -1441,11 +1441,11 @@
1441 **
1442 ** dry_run=int (1 or 0)
1443 **
1444 ** include_manifest=int (1 or 0), whether to include
1445 ** the generated manifest in the response.
1446 **
1447 **
1448 ** User must have Write permissions to use this page.
1449 **
1450 ** Responds with JSON (with some state repeated
1451 ** from the input in order to avoid certain race conditions
@@ -1577,11 +1577,11 @@
1577 ** Which additional parameters are used by each distinct ajax route
1578 ** is an internal implementation detail and may change with any
1579 ** given build of this code. An unknown "name" value triggers an
1580 ** error, as documented for ajax_route_error().
1581 */
1582
1583 /* Allow no access to this page without check-in privilege */
1584 login_check_credentials();
1585 if( !g.perm.Write ){
1586 if(zAjax!=0){
1587 ajax_route_error(403, "Write permissions required.");
@@ -1670,11 +1670,11 @@
1670 ** whatever CSS we wish...
1671 */
1672 style_script_begin(__FILE__,__LINE__);
1673 CX("document.body.classList.add('fileedit');\n");
1674 style_script_end();
1675
1676 /* Status bar */
1677 CX("<div id='fossil-status-bar' "
1678 "title='Status message area. Double-click to clear them.'>"
1679 "Status messages will go here.</div>\n"
1680 /* will be moved into the tab container via JS */);
@@ -1939,11 +1939,11 @@
1939 "Comment style:",
1940 "Specify how fossil will interpret the "
1941 "comment string.",
1942 NULL,
1943 "Fossil", "text/x-fossil-wiki",
1944 "Markdown", "text/x-markdown",
1945 "Plain text", "text/plain",
1946 NULL);
1947 CX("</div>\n");
1948 }
1949 CX("<div class='fileedit-hint flex-container flex-row'>"
1950
+4 -4
--- src/graph.c
+++ src/graph.c
@@ -311,11 +311,11 @@
311311
if( dist<iBestDist ){
312312
iBestDist = dist;
313313
iBest = i;
314314
}
315315
}
316
-
316
+
317317
/* If no match, consider all possible rails */
318318
if( iBestDist>1000 ){
319319
for(i=0; i<=p->mxRail+1; i++){
320320
int dist;
321321
if( inUseMask & BIT(i) ) continue;
@@ -539,11 +539,11 @@
539539
if( (tmFlags & (TIMELINE_DISJOINT|TIMELINE_XMERGE))!=0 ){
540540
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
541541
for(i=1; i<pRow->nParent; i++){
542542
GraphRow *pParent = hashFind(p, pRow->aParent[i]);
543543
if( pParent==0 ){
544
- memmove(pRow->aParent+i, pRow->aParent+i+1,
544
+ memmove(pRow->aParent+i, pRow->aParent+i+1,
545545
sizeof(pRow->aParent[0])*(pRow->nParent-i-1));
546546
pRow->nParent--;
547547
if( i<pRow->nNonCherrypick ){
548548
pRow->nNonCherrypick--;
549549
}else{
@@ -552,11 +552,11 @@
552552
i--;
553553
}
554554
}
555555
}
556556
}
557
-
557
+
558558
/* Put the deepest (earliest) merge parent first in the list.
559559
** An off-screen merge parent is considered deepest.
560560
*/
561561
for(pRow=p->pFirst; pRow; pRow=pRow->pNext ){
562562
if( pRow->nParent<=1 ) continue;
@@ -940,11 +940,11 @@
940940
** branch directly above its parent. */
941941
continue;
942942
}
943943
944944
/* All clear. Make the translation
945
- */
945
+ */
946946
for(pLoop=pRow; pLoop && pLoop->idx<=pBottom->idx; pLoop=pLoop->pNext){
947947
if( pLoop->iRail==iFrom ){
948948
pLoop->iRail = iTo;
949949
pLoop->aiRiser[iTo] = pLoop->aiRiser[iFrom];
950950
pLoop->aiRiser[iFrom] = -1;
951951
--- src/graph.c
+++ src/graph.c
@@ -311,11 +311,11 @@
311 if( dist<iBestDist ){
312 iBestDist = dist;
313 iBest = i;
314 }
315 }
316
317 /* If no match, consider all possible rails */
318 if( iBestDist>1000 ){
319 for(i=0; i<=p->mxRail+1; i++){
320 int dist;
321 if( inUseMask & BIT(i) ) continue;
@@ -539,11 +539,11 @@
539 if( (tmFlags & (TIMELINE_DISJOINT|TIMELINE_XMERGE))!=0 ){
540 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
541 for(i=1; i<pRow->nParent; i++){
542 GraphRow *pParent = hashFind(p, pRow->aParent[i]);
543 if( pParent==0 ){
544 memmove(pRow->aParent+i, pRow->aParent+i+1,
545 sizeof(pRow->aParent[0])*(pRow->nParent-i-1));
546 pRow->nParent--;
547 if( i<pRow->nNonCherrypick ){
548 pRow->nNonCherrypick--;
549 }else{
@@ -552,11 +552,11 @@
552 i--;
553 }
554 }
555 }
556 }
557
558 /* Put the deepest (earliest) merge parent first in the list.
559 ** An off-screen merge parent is considered deepest.
560 */
561 for(pRow=p->pFirst; pRow; pRow=pRow->pNext ){
562 if( pRow->nParent<=1 ) continue;
@@ -940,11 +940,11 @@
940 ** branch directly above its parent. */
941 continue;
942 }
943
944 /* All clear. Make the translation
945 */
946 for(pLoop=pRow; pLoop && pLoop->idx<=pBottom->idx; pLoop=pLoop->pNext){
947 if( pLoop->iRail==iFrom ){
948 pLoop->iRail = iTo;
949 pLoop->aiRiser[iTo] = pLoop->aiRiser[iFrom];
950 pLoop->aiRiser[iFrom] = -1;
951
--- src/graph.c
+++ src/graph.c
@@ -311,11 +311,11 @@
311 if( dist<iBestDist ){
312 iBestDist = dist;
313 iBest = i;
314 }
315 }
316
317 /* If no match, consider all possible rails */
318 if( iBestDist>1000 ){
319 for(i=0; i<=p->mxRail+1; i++){
320 int dist;
321 if( inUseMask & BIT(i) ) continue;
@@ -539,11 +539,11 @@
539 if( (tmFlags & (TIMELINE_DISJOINT|TIMELINE_XMERGE))!=0 ){
540 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
541 for(i=1; i<pRow->nParent; i++){
542 GraphRow *pParent = hashFind(p, pRow->aParent[i]);
543 if( pParent==0 ){
544 memmove(pRow->aParent+i, pRow->aParent+i+1,
545 sizeof(pRow->aParent[0])*(pRow->nParent-i-1));
546 pRow->nParent--;
547 if( i<pRow->nNonCherrypick ){
548 pRow->nNonCherrypick--;
549 }else{
@@ -552,11 +552,11 @@
552 i--;
553 }
554 }
555 }
556 }
557
558 /* Put the deepest (earliest) merge parent first in the list.
559 ** An off-screen merge parent is considered deepest.
560 */
561 for(pRow=p->pFirst; pRow; pRow=pRow->pNext ){
562 if( pRow->nParent<=1 ) continue;
@@ -940,11 +940,11 @@
940 ** branch directly above its parent. */
941 continue;
942 }
943
944 /* All clear. Make the translation
945 */
946 for(pLoop=pRow; pLoop && pLoop->idx<=pBottom->idx; pLoop=pLoop->pNext){
947 if( pLoop->iRail==iFrom ){
948 pLoop->iRail = iTo;
949 pLoop->aiRiser[iTo] = pLoop->aiRiser[iFrom];
950 pLoop->aiRiser[iFrom] = -1;
951
+3 -3
--- src/http.c
+++ src/http.c
@@ -98,11 +98,11 @@
9898
**
9999
** We assume that a hexadecimal string of exactly 40 characters is a
100100
** SHA1 hash, not an original password. If a user has a password which
101101
** just happens to be a 40-character hex string, then this routine won't
102102
** be able to distinguish it from a hash, the translation will not be
103
- ** performed, and the sync won't work.
103
+ ** performed, and the sync won't work.
104104
*/
105105
if( zPw && zPw[0] && (strlen(zPw)!=40 || !validate16(zPw,40)) ){
106106
const char *zProjectCode = 0;
107107
if( g.url.flags & URL_USE_PARENT ){
108108
zProjectCode = db_get("parent-project-code", 0);
@@ -258,20 +258,20 @@
258258
fossil_print("RUN %s\n", zCmd);
259259
}
260260
rc = fossil_system(zCmd);
261261
if( rc ){
262262
fossil_warning("Transport command failed: %s\n", zCmd);
263
- }
263
+ }
264264
fossil_free(zCmd);
265265
file_delete(zUplink);
266266
if( file_size(zDownlink, ExtFILE)<0 ){
267267
blob_zero(pReply);
268268
}else{
269269
blob_read_from_file(pReply, zDownlink, ExtFILE);
270270
file_delete(zDownlink);
271271
}
272
- return rc;
272
+ return rc;
273273
}
274274
275275
/*
276276
** Sign the content in pSend, compress it, and send it to the server
277277
** via HTTP or HTTPS. Get a reply, uncompress the reply, and store the reply
278278
--- src/http.c
+++ src/http.c
@@ -98,11 +98,11 @@
98 **
99 ** We assume that a hexadecimal string of exactly 40 characters is a
100 ** SHA1 hash, not an original password. If a user has a password which
101 ** just happens to be a 40-character hex string, then this routine won't
102 ** be able to distinguish it from a hash, the translation will not be
103 ** performed, and the sync won't work.
104 */
105 if( zPw && zPw[0] && (strlen(zPw)!=40 || !validate16(zPw,40)) ){
106 const char *zProjectCode = 0;
107 if( g.url.flags & URL_USE_PARENT ){
108 zProjectCode = db_get("parent-project-code", 0);
@@ -258,20 +258,20 @@
258 fossil_print("RUN %s\n", zCmd);
259 }
260 rc = fossil_system(zCmd);
261 if( rc ){
262 fossil_warning("Transport command failed: %s\n", zCmd);
263 }
264 fossil_free(zCmd);
265 file_delete(zUplink);
266 if( file_size(zDownlink, ExtFILE)<0 ){
267 blob_zero(pReply);
268 }else{
269 blob_read_from_file(pReply, zDownlink, ExtFILE);
270 file_delete(zDownlink);
271 }
272 return rc;
273 }
274
275 /*
276 ** Sign the content in pSend, compress it, and send it to the server
277 ** via HTTP or HTTPS. Get a reply, uncompress the reply, and store the reply
278
--- src/http.c
+++ src/http.c
@@ -98,11 +98,11 @@
98 **
99 ** We assume that a hexadecimal string of exactly 40 characters is a
100 ** SHA1 hash, not an original password. If a user has a password which
101 ** just happens to be a 40-character hex string, then this routine won't
102 ** be able to distinguish it from a hash, the translation will not be
103 ** performed, and the sync won't work.
104 */
105 if( zPw && zPw[0] && (strlen(zPw)!=40 || !validate16(zPw,40)) ){
106 const char *zProjectCode = 0;
107 if( g.url.flags & URL_USE_PARENT ){
108 zProjectCode = db_get("parent-project-code", 0);
@@ -258,20 +258,20 @@
258 fossil_print("RUN %s\n", zCmd);
259 }
260 rc = fossil_system(zCmd);
261 if( rc ){
262 fossil_warning("Transport command failed: %s\n", zCmd);
263 }
264 fossil_free(zCmd);
265 file_delete(zUplink);
266 if( file_size(zDownlink, ExtFILE)<0 ){
267 blob_zero(pReply);
268 }else{
269 blob_read_from_file(pReply, zDownlink, ExtFILE);
270 file_delete(zDownlink);
271 }
272 return rc;
273 }
274
275 /*
276 ** Sign the content in pSend, compress it, and send it to the server
277 ** via HTTP or HTTPS. Get a reply, uncompress the reply, and store the reply
278
+7 -7
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -59,11 +59,11 @@
5959
6060
6161
/* This is a self-signed cert in the PEM format that can be used when
6262
** no other certs are available.
6363
*/
64
-static const char sslSelfCert[] =
64
+static const char sslSelfCert[] =
6565
"-----BEGIN CERTIFICATE-----\n"
6666
"MIIDMTCCAhkCFGrDmuJkkzWERP/ITBvzwwI2lv0TMA0GCSqGSIb3DQEBCwUAMFQx\n"
6767
"CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOQzESMBAGA1UEBwwJQ2hhcmxvdHRlMRMw\n"
6868
"EQYDVQQKDApGb3NzaWwtU0NNMQ8wDQYDVQQDDAZGb3NzaWwwIBcNMjExMjI3MTEz\n"
6969
"MTU2WhgPMjEyMTEyMjcxMTMxNTZaMFQxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJO\n"
@@ -83,11 +83,11 @@
8383
"s/TsrXk=\n"
8484
"-----END CERTIFICATE-----\n";
8585
8686
/* This is the private-key corresponding to the cert above
8787
*/
88
-static const char sslSelfPKey[] =
88
+static const char sslSelfPKey[] =
8989
"-----BEGIN PRIVATE KEY-----\n"
9090
"MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCCbTU26GRQHQqL\n"
9191
"q7vyZ0OxpAxmgfAKCxt6eIz+jBi2ZM/CB5vVXWVh2+SkSiWEA3UZiUqXxZlzmS/C\n"
9292
"glZdiwLLDJML8B4OiV72oivFH/vJ7+cbvh1dTxnYiHuww7GfQngPrLfefiIYPDk1\n"
9393
"GTUJHBQ7Ue477F7F8vKuHdVgwktF/JDM6M60aSqlo2D/oysirrb+dlurTlv0rjsY\n"
@@ -206,11 +206,11 @@
206206
}
207207
208208
/*
209209
** Convert an OpenSSL ASN1_TIME to an ISO8601 timestamp.
210210
**
211
-** Per RFC 5280, ASN1 timestamps in X.509 certificates must
211
+** Per RFC 5280, ASN1 timestamps in X.509 certificates must
212212
** be in UTC (Zulu timezone) with no fractional seconds.
213213
**
214214
** If showUtc==1, add " UTC" at the end of the returned string. This is
215215
** not ISO8601-compliant, but makes the displayed value more user-friendly.
216216
*/
@@ -412,11 +412,11 @@
412412
** be accepted. Communication will still be encrypted, but the
413413
** client has no way of knowing whether it is talking to the
414414
** real server or a man-in-the-middle imposter.
415415
*/
416416
void ssl_disable_cert_verification(void){
417
- sslNoCertVerify = 1;
417
+ sslNoCertVerify = 1;
418418
}
419419
420420
/*
421421
** Open an SSL connection as a client that is to connect to the server
422422
** identified by pUrlData.
@@ -565,16 +565,16 @@
565565
ssl_asn1time_to_iso8601(X509_get_notBefore(cert), 1));
566566
BIO_printf(mem, "\n notAfter: %s",
567567
ssl_asn1time_to_iso8601(X509_get_notAfter(cert), 1));
568568
BIO_printf(mem, "\n sha256: %s", zHash);
569569
desclen = BIO_get_mem_data(mem, &desc);
570
-
570
+
571571
prompt = mprintf("Unable to verify SSL cert from %s\n%.*s\n"
572572
"accept this cert and continue (y/N/fingerprint)? ",
573573
pUrlData->name, desclen, desc);
574574
BIO_free(mem);
575
-
575
+
576576
prompt_user(prompt, &ans);
577577
free(prompt);
578578
cReply = blob_str(&ans)[0];
579579
if( cReply!='y' && cReply!='Y'
580580
&& fossil_stricmp(blob_str(&ans),zHash)!=0
@@ -1185,12 +1185,12 @@
11851185
** Return the OpenSSL version number being used. Space to hold
11861186
** this name is obtained from fossil_malloc() and should be
11871187
** freed by the caller.
11881188
*/
11891189
char *fossil_openssl_version(void){
1190
-#if defined(FOSSIL_ENABLE_SSL)
1190
+#if defined(FOSSIL_ENABLE_SSL)
11911191
return mprintf("%s (0x%09x)\n",
11921192
SSLeay_version(SSLEAY_VERSION), OPENSSL_VERSION_NUMBER);
11931193
#else
11941194
return mprintf("none");
11951195
#endif
11961196
}
11971197
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -59,11 +59,11 @@
59
60
61 /* This is a self-signed cert in the PEM format that can be used when
62 ** no other certs are available.
63 */
64 static const char sslSelfCert[] =
65 "-----BEGIN CERTIFICATE-----\n"
66 "MIIDMTCCAhkCFGrDmuJkkzWERP/ITBvzwwI2lv0TMA0GCSqGSIb3DQEBCwUAMFQx\n"
67 "CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOQzESMBAGA1UEBwwJQ2hhcmxvdHRlMRMw\n"
68 "EQYDVQQKDApGb3NzaWwtU0NNMQ8wDQYDVQQDDAZGb3NzaWwwIBcNMjExMjI3MTEz\n"
69 "MTU2WhgPMjEyMTEyMjcxMTMxNTZaMFQxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJO\n"
@@ -83,11 +83,11 @@
83 "s/TsrXk=\n"
84 "-----END CERTIFICATE-----\n";
85
86 /* This is the private-key corresponding to the cert above
87 */
88 static const char sslSelfPKey[] =
89 "-----BEGIN PRIVATE KEY-----\n"
90 "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCCbTU26GRQHQqL\n"
91 "q7vyZ0OxpAxmgfAKCxt6eIz+jBi2ZM/CB5vVXWVh2+SkSiWEA3UZiUqXxZlzmS/C\n"
92 "glZdiwLLDJML8B4OiV72oivFH/vJ7+cbvh1dTxnYiHuww7GfQngPrLfefiIYPDk1\n"
93 "GTUJHBQ7Ue477F7F8vKuHdVgwktF/JDM6M60aSqlo2D/oysirrb+dlurTlv0rjsY\n"
@@ -206,11 +206,11 @@
206 }
207
208 /*
209 ** Convert an OpenSSL ASN1_TIME to an ISO8601 timestamp.
210 **
211 ** Per RFC 5280, ASN1 timestamps in X.509 certificates must
212 ** be in UTC (Zulu timezone) with no fractional seconds.
213 **
214 ** If showUtc==1, add " UTC" at the end of the returned string. This is
215 ** not ISO8601-compliant, but makes the displayed value more user-friendly.
216 */
@@ -412,11 +412,11 @@
412 ** be accepted. Communication will still be encrypted, but the
413 ** client has no way of knowing whether it is talking to the
414 ** real server or a man-in-the-middle imposter.
415 */
416 void ssl_disable_cert_verification(void){
417 sslNoCertVerify = 1;
418 }
419
420 /*
421 ** Open an SSL connection as a client that is to connect to the server
422 ** identified by pUrlData.
@@ -565,16 +565,16 @@
565 ssl_asn1time_to_iso8601(X509_get_notBefore(cert), 1));
566 BIO_printf(mem, "\n notAfter: %s",
567 ssl_asn1time_to_iso8601(X509_get_notAfter(cert), 1));
568 BIO_printf(mem, "\n sha256: %s", zHash);
569 desclen = BIO_get_mem_data(mem, &desc);
570
571 prompt = mprintf("Unable to verify SSL cert from %s\n%.*s\n"
572 "accept this cert and continue (y/N/fingerprint)? ",
573 pUrlData->name, desclen, desc);
574 BIO_free(mem);
575
576 prompt_user(prompt, &ans);
577 free(prompt);
578 cReply = blob_str(&ans)[0];
579 if( cReply!='y' && cReply!='Y'
580 && fossil_stricmp(blob_str(&ans),zHash)!=0
@@ -1185,12 +1185,12 @@
1185 ** Return the OpenSSL version number being used. Space to hold
1186 ** this name is obtained from fossil_malloc() and should be
1187 ** freed by the caller.
1188 */
1189 char *fossil_openssl_version(void){
1190 #if defined(FOSSIL_ENABLE_SSL)
1191 return mprintf("%s (0x%09x)\n",
1192 SSLeay_version(SSLEAY_VERSION), OPENSSL_VERSION_NUMBER);
1193 #else
1194 return mprintf("none");
1195 #endif
1196 }
1197
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -59,11 +59,11 @@
59
60
61 /* This is a self-signed cert in the PEM format that can be used when
62 ** no other certs are available.
63 */
64 static const char sslSelfCert[] =
65 "-----BEGIN CERTIFICATE-----\n"
66 "MIIDMTCCAhkCFGrDmuJkkzWERP/ITBvzwwI2lv0TMA0GCSqGSIb3DQEBCwUAMFQx\n"
67 "CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOQzESMBAGA1UEBwwJQ2hhcmxvdHRlMRMw\n"
68 "EQYDVQQKDApGb3NzaWwtU0NNMQ8wDQYDVQQDDAZGb3NzaWwwIBcNMjExMjI3MTEz\n"
69 "MTU2WhgPMjEyMTEyMjcxMTMxNTZaMFQxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJO\n"
@@ -83,11 +83,11 @@
83 "s/TsrXk=\n"
84 "-----END CERTIFICATE-----\n";
85
86 /* This is the private-key corresponding to the cert above
87 */
88 static const char sslSelfPKey[] =
89 "-----BEGIN PRIVATE KEY-----\n"
90 "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCCbTU26GRQHQqL\n"
91 "q7vyZ0OxpAxmgfAKCxt6eIz+jBi2ZM/CB5vVXWVh2+SkSiWEA3UZiUqXxZlzmS/C\n"
92 "glZdiwLLDJML8B4OiV72oivFH/vJ7+cbvh1dTxnYiHuww7GfQngPrLfefiIYPDk1\n"
93 "GTUJHBQ7Ue477F7F8vKuHdVgwktF/JDM6M60aSqlo2D/oysirrb+dlurTlv0rjsY\n"
@@ -206,11 +206,11 @@
206 }
207
208 /*
209 ** Convert an OpenSSL ASN1_TIME to an ISO8601 timestamp.
210 **
211 ** Per RFC 5280, ASN1 timestamps in X.509 certificates must
212 ** be in UTC (Zulu timezone) with no fractional seconds.
213 **
214 ** If showUtc==1, add " UTC" at the end of the returned string. This is
215 ** not ISO8601-compliant, but makes the displayed value more user-friendly.
216 */
@@ -412,11 +412,11 @@
412 ** be accepted. Communication will still be encrypted, but the
413 ** client has no way of knowing whether it is talking to the
414 ** real server or a man-in-the-middle imposter.
415 */
416 void ssl_disable_cert_verification(void){
417 sslNoCertVerify = 1;
418 }
419
420 /*
421 ** Open an SSL connection as a client that is to connect to the server
422 ** identified by pUrlData.
@@ -565,16 +565,16 @@
565 ssl_asn1time_to_iso8601(X509_get_notBefore(cert), 1));
566 BIO_printf(mem, "\n notAfter: %s",
567 ssl_asn1time_to_iso8601(X509_get_notAfter(cert), 1));
568 BIO_printf(mem, "\n sha256: %s", zHash);
569 desclen = BIO_get_mem_data(mem, &desc);
570
571 prompt = mprintf("Unable to verify SSL cert from %s\n%.*s\n"
572 "accept this cert and continue (y/N/fingerprint)? ",
573 pUrlData->name, desclen, desc);
574 BIO_free(mem);
575
576 prompt_user(prompt, &ans);
577 free(prompt);
578 cReply = blob_str(&ans)[0];
579 if( cReply!='y' && cReply!='Y'
580 && fossil_stricmp(blob_str(&ans),zHash)!=0
@@ -1185,12 +1185,12 @@
1185 ** Return the OpenSSL version number being used. Space to hold
1186 ** this name is obtained from fossil_malloc() and should be
1187 ** freed by the caller.
1188 */
1189 char *fossil_openssl_version(void){
1190 #if defined(FOSSIL_ENABLE_SSL)
1191 return mprintf("%s (0x%09x)\n",
1192 SSLeay_version(SSLEAY_VERSION), OPENSSL_VERSION_NUMBER);
1193 #else
1194 return mprintf("none");
1195 #endif
1196 }
1197
+1 -1
--- src/import.c
+++ src/import.c
@@ -817,11 +817,11 @@
817817
if( strncmp(zLine, "N ", 2)==0 ){
818818
/* No-op */
819819
}else
820820
if( strncmp(zLine, "property branch-nick ", 21)==0 ){
821821
/* Breezy uses this property to store the branch name.
822
- ** It has two values. Integer branch number, then the
822
+ ** It has two values. Integer branch number, then the
823823
** user-readable branch name. */
824824
z = &zLine[21];
825825
next_token(&z);
826826
fossil_free(gg.zBranch);
827827
gg.zBranch = fossil_strdup(next_token(&z));
828828
--- src/import.c
+++ src/import.c
@@ -817,11 +817,11 @@
817 if( strncmp(zLine, "N ", 2)==0 ){
818 /* No-op */
819 }else
820 if( strncmp(zLine, "property branch-nick ", 21)==0 ){
821 /* Breezy uses this property to store the branch name.
822 ** It has two values. Integer branch number, then the
823 ** user-readable branch name. */
824 z = &zLine[21];
825 next_token(&z);
826 fossil_free(gg.zBranch);
827 gg.zBranch = fossil_strdup(next_token(&z));
828
--- src/import.c
+++ src/import.c
@@ -817,11 +817,11 @@
817 if( strncmp(zLine, "N ", 2)==0 ){
818 /* No-op */
819 }else
820 if( strncmp(zLine, "property branch-nick ", 21)==0 ){
821 /* Breezy uses this property to store the branch name.
822 ** It has two values. Integer branch number, then the
823 ** user-readable branch name. */
824 z = &zLine[21];
825 next_token(&z);
826 fossil_free(gg.zBranch);
827 gg.zBranch = fossil_strdup(next_token(&z));
828
+3 -3
--- src/info.c
+++ src/info.c
@@ -2502,11 +2502,11 @@
25022502
page_tree();
25032503
return;
25042504
}
25052505
/* No directory found, look for an historic version of the file
25062506
** that was subsequently deleted. */
2507
- db_prepare(&q,
2507
+ db_prepare(&q,
25082508
"SELECT fid, uuid FROM mlink, filename, event, blob"
25092509
" WHERE filename.name=%Q"
25102510
" AND mlink.fnid=filename.fnid AND mlink.fid>0"
25112511
" AND event.objid=mlink.mid"
25122512
" AND blob.rid=mlink.mid"
@@ -2800,11 +2800,11 @@
28002800
if( strcmp(zModAction,"approve")==0 ){
28012801
moderation_approve('t', rid);
28022802
}
28032803
}
28042804
zTktTitle = db_table_has_column("repository", "ticket", "title" )
2805
- ? db_text("(No title)",
2805
+ ? db_text("(No title)",
28062806
"SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName)
28072807
: 0;
28082808
style_set_current_feature("tinfo");
28092809
style_header("Ticket Change Details");
28102810
style_submenu_element("Raw", "%R/artifact/%s", zUuid);
@@ -3832,11 +3832,11 @@
38323832
** If VERSION and the found ancestor refer to the same commit, the last two
38333833
** components are omitted, unless --long is provided. When no fitting tagged
38343834
** ancestor is found, show only the short hash of VERSION.
38353835
**
38363836
** Options:
3837
-** --digits Display so many hex digits of the hash
3837
+** --digits Display so many hex digits of the hash
38383838
** (default: the larger of 6 and the 'hash-digit' setting)
38393839
** -d|--dirty Show whether there are changes to be committed
38403840
** --long Always show all three components
38413841
** --match GLOB Consider only non-propagating tags matching GLOB
38423842
*/
38433843
--- src/info.c
+++ src/info.c
@@ -2502,11 +2502,11 @@
2502 page_tree();
2503 return;
2504 }
2505 /* No directory found, look for an historic version of the file
2506 ** that was subsequently deleted. */
2507 db_prepare(&q,
2508 "SELECT fid, uuid FROM mlink, filename, event, blob"
2509 " WHERE filename.name=%Q"
2510 " AND mlink.fnid=filename.fnid AND mlink.fid>0"
2511 " AND event.objid=mlink.mid"
2512 " AND blob.rid=mlink.mid"
@@ -2800,11 +2800,11 @@
2800 if( strcmp(zModAction,"approve")==0 ){
2801 moderation_approve('t', rid);
2802 }
2803 }
2804 zTktTitle = db_table_has_column("repository", "ticket", "title" )
2805 ? db_text("(No title)",
2806 "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName)
2807 : 0;
2808 style_set_current_feature("tinfo");
2809 style_header("Ticket Change Details");
2810 style_submenu_element("Raw", "%R/artifact/%s", zUuid);
@@ -3832,11 +3832,11 @@
3832 ** If VERSION and the found ancestor refer to the same commit, the last two
3833 ** components are omitted, unless --long is provided. When no fitting tagged
3834 ** ancestor is found, show only the short hash of VERSION.
3835 **
3836 ** Options:
3837 ** --digits Display so many hex digits of the hash
3838 ** (default: the larger of 6 and the 'hash-digit' setting)
3839 ** -d|--dirty Show whether there are changes to be committed
3840 ** --long Always show all three components
3841 ** --match GLOB Consider only non-propagating tags matching GLOB
3842 */
3843
--- src/info.c
+++ src/info.c
@@ -2502,11 +2502,11 @@
2502 page_tree();
2503 return;
2504 }
2505 /* No directory found, look for an historic version of the file
2506 ** that was subsequently deleted. */
2507 db_prepare(&q,
2508 "SELECT fid, uuid FROM mlink, filename, event, blob"
2509 " WHERE filename.name=%Q"
2510 " AND mlink.fnid=filename.fnid AND mlink.fid>0"
2511 " AND event.objid=mlink.mid"
2512 " AND blob.rid=mlink.mid"
@@ -2800,11 +2800,11 @@
2800 if( strcmp(zModAction,"approve")==0 ){
2801 moderation_approve('t', rid);
2802 }
2803 }
2804 zTktTitle = db_table_has_column("repository", "ticket", "title" )
2805 ? db_text("(No title)",
2806 "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName)
2807 : 0;
2808 style_set_current_feature("tinfo");
2809 style_header("Ticket Change Details");
2810 style_submenu_element("Raw", "%R/artifact/%s", zUuid);
@@ -3832,11 +3832,11 @@
3832 ** If VERSION and the found ancestor refer to the same commit, the last two
3833 ** components are omitted, unless --long is provided. When no fitting tagged
3834 ** ancestor is found, show only the short hash of VERSION.
3835 **
3836 ** Options:
3837 ** --digits Display so many hex digits of the hash
3838 ** (default: the larger of 6 and the 'hash-digit' setting)
3839 ** -d|--dirty Show whether there are changes to be committed
3840 ** --long Always show all three components
3841 ** --match GLOB Consider only non-propagating tags matching GLOB
3842 */
3843
+4 -4
--- src/interwiki.c
+++ src/interwiki.c
@@ -45,14 +45,14 @@
4545
** "base": Base URL for the remote site.
4646
** "hash": Append this to "base" for Hash targets.
4747
** "wiki": Append this to "base" for Wiki targets.
4848
** }
4949
**
50
-** If the remote wiki is Fossil, then the correct value for "hash"
50
+** If the remote wiki is Fossil, then the correct value for "hash"
5151
** is "/info/" and the correct value for "wiki" is "/wiki?name=".
5252
** If (for example) Wikipedia is the remote, then "hash" should be
53
-** omitted and the correct value for "wiki" is "/wiki/".
53
+** omitted and the correct value for "wiki" is "/wiki/".
5454
**
5555
** PageName is link name of the target wiki. Several different forms
5656
** of PageName are recognized.
5757
**
5858
** Path If PageName is empty or begins with a "/" character, then
@@ -82,11 +82,11 @@
8282
if( zTarget[i]!=':' ) return 0;
8383
nCode = i;
8484
if( nCode==4 && strncmp(zTarget,"wiki",4)==0 ) return 0;
8585
zPage = zTarget + nCode + 1;
8686
nPage = (int)strlen(zPage);
87
- db_static_prepare(&q,
87
+ db_static_prepare(&q,
8888
"SELECT value->>'base', value->>'hash', value->>'wiki'"
8989
" FROM config WHERE name=lower($name) AND json_valid(value)"
9090
);
9191
zName = mprintf("interwiki:%.*s", nCode, zTarget);
9292
db_bind_text(&q, "$name", zName);
@@ -222,11 +222,11 @@
222222
db_begin_write();
223223
db_unprotect(PROTECT_CONFIG);
224224
for(i=3; i<g.argc; i++){
225225
const char *zName = g.argv[i];
226226
db_multi_exec(
227
- "DELETE FROM config WHERE name='interwiki:%q'",
227
+ "DELETE FROM config WHERE name='interwiki:%q'",
228228
zName
229229
);
230230
}
231231
setup_incr_cfgcnt();
232232
db_protect_pop();
233233
--- src/interwiki.c
+++ src/interwiki.c
@@ -45,14 +45,14 @@
45 ** "base": Base URL for the remote site.
46 ** "hash": Append this to "base" for Hash targets.
47 ** "wiki": Append this to "base" for Wiki targets.
48 ** }
49 **
50 ** If the remote wiki is Fossil, then the correct value for "hash"
51 ** is "/info/" and the correct value for "wiki" is "/wiki?name=".
52 ** If (for example) Wikipedia is the remote, then "hash" should be
53 ** omitted and the correct value for "wiki" is "/wiki/".
54 **
55 ** PageName is link name of the target wiki. Several different forms
56 ** of PageName are recognized.
57 **
58 ** Path If PageName is empty or begins with a "/" character, then
@@ -82,11 +82,11 @@
82 if( zTarget[i]!=':' ) return 0;
83 nCode = i;
84 if( nCode==4 && strncmp(zTarget,"wiki",4)==0 ) return 0;
85 zPage = zTarget + nCode + 1;
86 nPage = (int)strlen(zPage);
87 db_static_prepare(&q,
88 "SELECT value->>'base', value->>'hash', value->>'wiki'"
89 " FROM config WHERE name=lower($name) AND json_valid(value)"
90 );
91 zName = mprintf("interwiki:%.*s", nCode, zTarget);
92 db_bind_text(&q, "$name", zName);
@@ -222,11 +222,11 @@
222 db_begin_write();
223 db_unprotect(PROTECT_CONFIG);
224 for(i=3; i<g.argc; i++){
225 const char *zName = g.argv[i];
226 db_multi_exec(
227 "DELETE FROM config WHERE name='interwiki:%q'",
228 zName
229 );
230 }
231 setup_incr_cfgcnt();
232 db_protect_pop();
233
--- src/interwiki.c
+++ src/interwiki.c
@@ -45,14 +45,14 @@
45 ** "base": Base URL for the remote site.
46 ** "hash": Append this to "base" for Hash targets.
47 ** "wiki": Append this to "base" for Wiki targets.
48 ** }
49 **
50 ** If the remote wiki is Fossil, then the correct value for "hash"
51 ** is "/info/" and the correct value for "wiki" is "/wiki?name=".
52 ** If (for example) Wikipedia is the remote, then "hash" should be
53 ** omitted and the correct value for "wiki" is "/wiki/".
54 **
55 ** PageName is link name of the target wiki. Several different forms
56 ** of PageName are recognized.
57 **
58 ** Path If PageName is empty or begins with a "/" character, then
@@ -82,11 +82,11 @@
82 if( zTarget[i]!=':' ) return 0;
83 nCode = i;
84 if( nCode==4 && strncmp(zTarget,"wiki",4)==0 ) return 0;
85 zPage = zTarget + nCode + 1;
86 nPage = (int)strlen(zPage);
87 db_static_prepare(&q,
88 "SELECT value->>'base', value->>'hash', value->>'wiki'"
89 " FROM config WHERE name=lower($name) AND json_valid(value)"
90 );
91 zName = mprintf("interwiki:%.*s", nCode, zTarget);
92 db_bind_text(&q, "$name", zName);
@@ -222,11 +222,11 @@
222 db_begin_write();
223 db_unprotect(PROTECT_CONFIG);
224 for(i=3; i<g.argc; i++){
225 const char *zName = g.argv[i];
226 db_multi_exec(
227 "DELETE FROM config WHERE name='interwiki:%q'",
228 zName
229 );
230 }
231 setup_incr_cfgcnt();
232 db_protect_pop();
233
+49 -30
--- src/json.c
+++ src/json.c
@@ -23,12 +23,13 @@
2323
** https://fossil-scm.org/fossil/doc/trunk/www/json-api/index.md
2424
**
2525
** Notes for hackers...
2626
**
2727
** Here's how command/page dispatching works: json_page_top() (in HTTP mode) or
28
-** json_cmd_top() (in CLI mode) catch the "json" path/command. Those functions then
29
-** dispatch to a JSON-mode-specific command/page handler with the type fossil_json_f().
28
+** json_cmd_top() (in CLI mode) catch the "json" path/command. Those functions
29
+** then dispatch to a JSON-mode-specific command/page handler with the type
30
+** fossil_json_f().
3031
** See the API docs for that typedef (below) for the semantics of the callbacks.
3132
**
3233
**
3334
*/
3435
#include "VERSION.h"
@@ -36,11 +37,12 @@
3637
#include "json.h"
3738
#include <assert.h>
3839
#include <time.h>
3940
4041
#if INTERFACE
41
-#include "json_detail.h" /* workaround for apparent enum limitation in makeheaders */
42
+#include "json_detail.h" /* workaround for apparent enum limitation
43
+ in makeheaders */
4244
#endif
4345
4446
const FossilJsonKeys_ FossilJsonKeys = {
4547
"anonymousSeed" /*anonymousSeed*/,
4648
"authToken" /*authToken*/,
@@ -176,11 +178,12 @@
176178
177179
/*
178180
** Convenience wrapper around cson_output() which appends the output
179181
** to pDest. pOpt may be NULL, in which case g.json.outOpt will be used.
180182
*/
181
-int cson_output_Blob( cson_value const * pVal, Blob * pDest, cson_output_opt const * pOpt ){
183
+int cson_output_Blob( cson_value const * pVal, Blob * pDest,
184
+ cson_output_opt const * pOpt ){
182185
return cson_output( pVal, cson_data_dest_Blob,
183186
pDest, pOpt ? pOpt : &g.json.outOpt );
184187
}
185188
186189
/*
@@ -707,11 +710,12 @@
707710
the form: login_cookie_name()=...
708711
709712
Then again, the hardened cookie value helps ensure that
710713
only a proper key/value match is valid.
711714
*/
712
- cgi_replace_parameter( login_cookie_name(), cson_value_get_cstr(g.json.authToken) );
715
+ cgi_replace_parameter( login_cookie_name(),
716
+ cson_value_get_cstr(g.json.authToken) );
713717
}else if( g.isHTTP ){
714718
/* try fossil's conventional cookie. */
715719
/* Reminder: chicken/egg scenario regarding db access in CLI
716720
mode because login_cookie_name() needs the db. CLI
717721
mode does not use any authentication, so we don't need
@@ -904,11 +908,12 @@
904908
memcpy(zPart, head, len);
905909
zPart[len] = 0;
906910
if(doDeHttp){
907911
dehttpize(zPart);
908912
}
909
- if( *zPart ){ /* should only fail if someone manages to url-encoded a NUL byte */
913
+ if( *zPart ){
914
+ /* should only fail if someone manages to url-encoded a NUL byte */
910915
part = cson_value_new_string(zPart, strlen(zPart));
911916
if( 0 != cson_array_append( target, part ) ){
912917
cson_value_free(part);
913918
rc = -rc;
914919
break;
@@ -1086,11 +1091,11 @@
10861091
10871092
/* g.json.reqPayload exists only to simplify some of our access to
10881093
the request payload. We currently only use this in the context of
10891094
Object payloads, not Arrays, strings, etc.
10901095
*/
1091
- g.json.reqPayload.v = cson_object_get( g.json.post.o, FossilJsonKeys.payload );
1096
+ g.json.reqPayload.v = cson_object_get( g.json.post.o,FossilJsonKeys.payload );
10921097
if( g.json.reqPayload.v ){
10931098
g.json.reqPayload.o = cson_value_get_object( g.json.reqPayload.v )
10941099
/* g.json.reqPayload.o may legally be NULL, which means only that
10951100
g.json.reqPayload.v is-not-a Object.
10961101
*/;
@@ -1115,11 +1120,11 @@
11151120
11161121
if(!g.json.jsonp){
11171122
g.json.jsonp = json_find_option_cstr("jsonp",NULL,NULL);
11181123
}
11191124
if(!g.isHTTP){
1120
- g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/;
1125
+ g.json.errorDetailParanoia = 0;/*disable error code dumb-down for CLI mode*/
11211126
}
11221127
11231128
{/* set up JSON output formatting options. */
11241129
int indent = -1;
11251130
indent = json_find_option_int("indent",NULL,"I",-1);
@@ -1166,11 +1171,11 @@
11661171
**
11671172
*/
11681173
char const * json_command_arg(unsigned short ndx){
11691174
cson_array * ar = g.json.cmd.a;
11701175
assert((NULL!=ar) && "Internal error. Was json_bootstrap_late() called?");
1171
- assert((g.argc>1) && "Internal error - we never should have gotten this far.");
1176
+ assert((g.argc>1) &&"Internal error - we never should have gotten this far.");
11721177
if( g.json.cmd.offset < 0 ){
11731178
/* first-time setup. */
11741179
short i = 0;
11751180
#define NEXT cson_string_cstr( \
11761181
cson_value_get_string( \
@@ -1192,11 +1197,12 @@
11921197
#undef NEXT
11931198
if(g.json.cmd.offset < 0){
11941199
return NULL;
11951200
}else{
11961201
ndx = g.json.cmd.offset + ndx;
1197
- return cson_string_cstr(cson_value_get_string(cson_array_get( ar, g.json.cmd.offset + ndx )));
1202
+ return cson_string_cstr(cson_value_get_string(
1203
+ cson_array_get( ar, g.json.cmd.offset + ndx )));
11981204
}
11991205
}
12001206
12011207
/* Returns the C-string form of json_auth_token(), or NULL
12021208
** if json_auth_token() returns NULL.
@@ -1210,11 +1216,12 @@
12101216
** found.
12111217
**
12121218
** head must be a pointer to an array of JsonPageDefs in which the
12131219
** last entry has a NULL name.
12141220
*/
1215
-JsonPageDef const * json_handler_for_name( char const * name, JsonPageDef const * head ){
1221
+JsonPageDef const * json_handler_for_name( char const * name,
1222
+ JsonPageDef const * head ){
12161223
JsonPageDef const * pageDef = head;
12171224
assert( head != NULL );
12181225
if(name && *name) for( ; pageDef->name; ++pageDef ){
12191226
if( 0 == strcmp(name, pageDef->name) ){
12201227
return pageDef;
@@ -1292,14 +1299,16 @@
12921299
if(!g.json.cmd.a){
12931300
return NULL;
12941301
}else{
12951302
cson_value * rc = NULL;
12961303
Blob path = empty_blob;
1297
- unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/
1304
+ unsigned int aLen = g.json.dispatchDepth+1;
1305
+ /*cson_array_length_get(g.json.cmd.a);*/
12981306
unsigned int i = 1;
12991307
for( ; i < aLen; ++i ){
1300
- char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i)));
1308
+ char const * part = cson_string_cstr(cson_value_get_string(
1309
+ cson_array_get(g.json.cmd.a, i)));
13011310
if(!part){
13021311
#if 1
13031312
fossil_warning("Iterating further than expected in %s.",
13041313
__FILE__);
13051314
#endif
@@ -1329,11 +1338,12 @@
13291338
cson_object * o = NULL;
13301339
cson_object * pay = NULL;
13311340
pay = o = cson_new_object();
13321341
13331342
#define INT(OBJ,K) cson_object_set(o, #K, json_new_int(OBJ.K))
1334
-#define CSTR(OBJ,K) cson_object_set(o, #K, OBJ.K ? json_new_string(OBJ.K) : cson_value_null())
1343
+#define CSTR(OBJ,K) cson_object_set(o, #K, OBJ.K ? json_new_string(OBJ.K) \
1344
+ : cson_value_null())
13351345
#define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null())
13361346
VAL(capabilities, json_cap_value());
13371347
INT(g, argc);
13381348
INT(g, isConst);
13391349
CSTR(g, zConfigDbName);
@@ -1813,14 +1823,15 @@
18131823
kRC = cson_new_string("resultCode",10);
18141824
kSymbol = cson_new_string("cSymbol",7);
18151825
kNumber = cson_new_string("number",6);
18161826
kDesc = cson_new_string("description",11);
18171827
#define C(K) obj = cson_new_object(); \
1818
- cson_object_set_s(obj, kRC, json_new_string(json_rc_cstr(FSL_JSON_E_##K)) ); \
1819
- cson_object_set_s(obj, kSymbol, json_new_string("FSL_JSON_E_"#K) ); \
1820
- cson_object_set_s(obj, kNumber, cson_value_new_integer(FSL_JSON_E_##K) ); \
1821
- cson_object_set_s(obj, kDesc, json_new_string(json_err_cstr(FSL_JSON_E_##K))); \
1828
+ cson_object_set_s(obj, kRC,json_new_string(json_rc_cstr(FSL_JSON_E_##K))); \
1829
+ cson_object_set_s(obj, kSymbol, json_new_string("FSL_JSON_E_"#K) ); \
1830
+ cson_object_set_s(obj, kNumber, cson_value_new_integer(FSL_JSON_E_##K) ); \
1831
+ cson_object_set_s(obj, kDesc, \
1832
+ json_new_string(json_err_cstr(FSL_JSON_E_##K))); \
18221833
cson_array_append( list, cson_object_value(obj) ); obj = NULL;
18231834
18241835
C(GENERIC);
18251836
C(INVALID_REQUEST);
18261837
C(UNKNOWN_COMMAND);
@@ -2006,11 +2017,12 @@
20062017
"Requires 'o' permissions.");
20072018
return NULL;
20082019
}
20092020
full = json_find_option_bool("full",NULL,"f",
20102021
json_find_option_bool("verbose",NULL,"v",0));
2011
-#define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf)));
2022
+#define SETBUF(O,K) cson_object_set(O, K, \
2023
+ cson_value_new_string(zBuf, strlen(zBuf)));
20122024
20132025
jv = cson_value_new_object();
20142026
jo = cson_value_get_object(jv);
20152027
20162028
zTmp = db_get("project-name",NULL);
@@ -2019,11 +2031,11 @@
20192031
zTmp = db_get("project-description",NULL);
20202032
cson_object_set(jo, "projectDescription", json_new_string(zTmp));
20212033
fossil_free(zTmp);
20222034
zTmp = NULL;
20232035
fsize = file_size(g.zRepositoryName, ExtFILE);
2024
- cson_object_set(jo, "repositorySize",
2036
+ cson_object_set(jo, "repositorySize",
20252037
cson_value_new_integer((cson_int_t)fsize));
20262038
20272039
if(full){
20282040
n = db_int(0, "SELECT count(*) FROM blob");
20292041
m = db_int(0, "SELECT count(*) FROM delta");
@@ -2068,25 +2080,31 @@
20682080
" + 0.99");
20692081
cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
20702082
cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
20712083
sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
20722084
SETBUF(jo, "projectCode");
2073
- cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME)));
2085
+ cson_object_set(jo, "compiler",
2086
+ cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME)));
20742087
20752088
jv2 = cson_value_new_object();
20762089
jo2 = cson_value_get_object(jv2);
20772090
cson_object_set(jo, "sqlite", jv2);
2078
- sqlite3_snprintf(BufLen, zBuf, "%.19s [%.10s] (%s)",
2079
- sqlite3_sourceid(), &sqlite3_sourceid()[20], sqlite3_libversion());
2091
+ sqlite3_snprintf(BufLen, zBuf, "%.19s [%.10s] (%s)", sqlite3_sourceid(),
2092
+ &sqlite3_sourceid()[20], sqlite3_libversion());
20802093
SETBUF(jo2, "version");
2081
- cson_object_set(jo2, "pageCount", cson_value_new_integer((cson_int_t)db_int(0, "PRAGMA repository.page_count")));
2082
- cson_object_set(jo2, "pageSize", cson_value_new_integer((cson_int_t)db_int(0, "PRAGMA repository.page_size")));
2083
- cson_object_set(jo2, "freeList", cson_value_new_integer((cson_int_t)db_int(0, "PRAGMA repository.freelist_count")));
2084
- sqlite3_snprintf(BufLen, zBuf, "%s", db_text(0, "PRAGMA repository.encoding"));
2094
+ cson_object_set(jo2, "pageCount", cson_value_new_integer(
2095
+ (cson_int_t)db_int(0, "PRAGMA repository.page_count")));
2096
+ cson_object_set(jo2, "pageSize", cson_value_new_integer(
2097
+ (cson_int_t)db_int(0, "PRAGMA repository.page_size")));
2098
+ cson_object_set(jo2, "freeList", cson_value_new_integer(
2099
+ (cson_int_t)db_int(0, "PRAGMA repository.freelist_count")));
2100
+ sqlite3_snprintf(BufLen, zBuf, "%s", db_text(0,"PRAGMA repository.encoding"));
20852101
SETBUF(jo2, "encoding");
2086
- sqlite3_snprintf(BufLen, zBuf, "%s", db_text(0, "PRAGMA repository.journal_mode"));
2087
- cson_object_set(jo2, "journalMode", *zBuf ? cson_value_new_string(zBuf, strlen(zBuf)) : cson_value_null());
2102
+ sqlite3_snprintf(BufLen, zBuf, "%s",
2103
+ db_text(0, "PRAGMA repository.journal_mode"));
2104
+ cson_object_set(jo2, "journalMode", *zBuf ?
2105
+ cson_value_new_string(zBuf, strlen(zBuf)) : cson_value_null());
20882106
return jv;
20892107
#undef SETBUF
20902108
}
20912109
20922110
@@ -2237,11 +2255,12 @@
22372255
/*
22382256
** Mapping of names to JSON pages/commands. Each name is a subpath of
22392257
** /json (in CGI mode) or a subcommand of the json command in CLI mode
22402258
*/
22412259
static const JsonPageDef JsonPageDefs[] = {
2242
-/* please keep alphabetically sorted (case-insensitive) for maintenance reasons. */
2260
+/* please keep alphabetically sorted (case-insensitive)
2261
+ for maintenance reasons. */
22432262
{"anonymousPassword", json_page_anon_password, 0},
22442263
{"artifact", json_page_artifact, 0},
22452264
{"branch", json_page_branch,0},
22462265
{"cap", json_page_cap, 0},
22472266
{"config", json_page_config, 0 },
22482267
--- src/json.c
+++ src/json.c
@@ -23,12 +23,13 @@
23 ** https://fossil-scm.org/fossil/doc/trunk/www/json-api/index.md
24 **
25 ** Notes for hackers...
26 **
27 ** Here's how command/page dispatching works: json_page_top() (in HTTP mode) or
28 ** json_cmd_top() (in CLI mode) catch the "json" path/command. Those functions then
29 ** dispatch to a JSON-mode-specific command/page handler with the type fossil_json_f().
 
30 ** See the API docs for that typedef (below) for the semantics of the callbacks.
31 **
32 **
33 */
34 #include "VERSION.h"
@@ -36,11 +37,12 @@
36 #include "json.h"
37 #include <assert.h>
38 #include <time.h>
39
40 #if INTERFACE
41 #include "json_detail.h" /* workaround for apparent enum limitation in makeheaders */
 
42 #endif
43
44 const FossilJsonKeys_ FossilJsonKeys = {
45 "anonymousSeed" /*anonymousSeed*/,
46 "authToken" /*authToken*/,
@@ -176,11 +178,12 @@
176
177 /*
178 ** Convenience wrapper around cson_output() which appends the output
179 ** to pDest. pOpt may be NULL, in which case g.json.outOpt will be used.
180 */
181 int cson_output_Blob( cson_value const * pVal, Blob * pDest, cson_output_opt const * pOpt ){
 
182 return cson_output( pVal, cson_data_dest_Blob,
183 pDest, pOpt ? pOpt : &g.json.outOpt );
184 }
185
186 /*
@@ -707,11 +710,12 @@
707 the form: login_cookie_name()=...
708
709 Then again, the hardened cookie value helps ensure that
710 only a proper key/value match is valid.
711 */
712 cgi_replace_parameter( login_cookie_name(), cson_value_get_cstr(g.json.authToken) );
 
713 }else if( g.isHTTP ){
714 /* try fossil's conventional cookie. */
715 /* Reminder: chicken/egg scenario regarding db access in CLI
716 mode because login_cookie_name() needs the db. CLI
717 mode does not use any authentication, so we don't need
@@ -904,11 +908,12 @@
904 memcpy(zPart, head, len);
905 zPart[len] = 0;
906 if(doDeHttp){
907 dehttpize(zPart);
908 }
909 if( *zPart ){ /* should only fail if someone manages to url-encoded a NUL byte */
 
910 part = cson_value_new_string(zPart, strlen(zPart));
911 if( 0 != cson_array_append( target, part ) ){
912 cson_value_free(part);
913 rc = -rc;
914 break;
@@ -1086,11 +1091,11 @@
1086
1087 /* g.json.reqPayload exists only to simplify some of our access to
1088 the request payload. We currently only use this in the context of
1089 Object payloads, not Arrays, strings, etc.
1090 */
1091 g.json.reqPayload.v = cson_object_get( g.json.post.o, FossilJsonKeys.payload );
1092 if( g.json.reqPayload.v ){
1093 g.json.reqPayload.o = cson_value_get_object( g.json.reqPayload.v )
1094 /* g.json.reqPayload.o may legally be NULL, which means only that
1095 g.json.reqPayload.v is-not-a Object.
1096 */;
@@ -1115,11 +1120,11 @@
1115
1116 if(!g.json.jsonp){
1117 g.json.jsonp = json_find_option_cstr("jsonp",NULL,NULL);
1118 }
1119 if(!g.isHTTP){
1120 g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/;
1121 }
1122
1123 {/* set up JSON output formatting options. */
1124 int indent = -1;
1125 indent = json_find_option_int("indent",NULL,"I",-1);
@@ -1166,11 +1171,11 @@
1166 **
1167 */
1168 char const * json_command_arg(unsigned short ndx){
1169 cson_array * ar = g.json.cmd.a;
1170 assert((NULL!=ar) && "Internal error. Was json_bootstrap_late() called?");
1171 assert((g.argc>1) && "Internal error - we never should have gotten this far.");
1172 if( g.json.cmd.offset < 0 ){
1173 /* first-time setup. */
1174 short i = 0;
1175 #define NEXT cson_string_cstr( \
1176 cson_value_get_string( \
@@ -1192,11 +1197,12 @@
1192 #undef NEXT
1193 if(g.json.cmd.offset < 0){
1194 return NULL;
1195 }else{
1196 ndx = g.json.cmd.offset + ndx;
1197 return cson_string_cstr(cson_value_get_string(cson_array_get( ar, g.json.cmd.offset + ndx )));
 
1198 }
1199 }
1200
1201 /* Returns the C-string form of json_auth_token(), or NULL
1202 ** if json_auth_token() returns NULL.
@@ -1210,11 +1216,12 @@
1210 ** found.
1211 **
1212 ** head must be a pointer to an array of JsonPageDefs in which the
1213 ** last entry has a NULL name.
1214 */
1215 JsonPageDef const * json_handler_for_name( char const * name, JsonPageDef const * head ){
 
1216 JsonPageDef const * pageDef = head;
1217 assert( head != NULL );
1218 if(name && *name) for( ; pageDef->name; ++pageDef ){
1219 if( 0 == strcmp(name, pageDef->name) ){
1220 return pageDef;
@@ -1292,14 +1299,16 @@
1292 if(!g.json.cmd.a){
1293 return NULL;
1294 }else{
1295 cson_value * rc = NULL;
1296 Blob path = empty_blob;
1297 unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/
 
1298 unsigned int i = 1;
1299 for( ; i < aLen; ++i ){
1300 char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i)));
 
1301 if(!part){
1302 #if 1
1303 fossil_warning("Iterating further than expected in %s.",
1304 __FILE__);
1305 #endif
@@ -1329,11 +1338,12 @@
1329 cson_object * o = NULL;
1330 cson_object * pay = NULL;
1331 pay = o = cson_new_object();
1332
1333 #define INT(OBJ,K) cson_object_set(o, #K, json_new_int(OBJ.K))
1334 #define CSTR(OBJ,K) cson_object_set(o, #K, OBJ.K ? json_new_string(OBJ.K) : cson_value_null())
 
1335 #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null())
1336 VAL(capabilities, json_cap_value());
1337 INT(g, argc);
1338 INT(g, isConst);
1339 CSTR(g, zConfigDbName);
@@ -1813,14 +1823,15 @@
1813 kRC = cson_new_string("resultCode",10);
1814 kSymbol = cson_new_string("cSymbol",7);
1815 kNumber = cson_new_string("number",6);
1816 kDesc = cson_new_string("description",11);
1817 #define C(K) obj = cson_new_object(); \
1818 cson_object_set_s(obj, kRC, json_new_string(json_rc_cstr(FSL_JSON_E_##K)) ); \
1819 cson_object_set_s(obj, kSymbol, json_new_string("FSL_JSON_E_"#K) ); \
1820 cson_object_set_s(obj, kNumber, cson_value_new_integer(FSL_JSON_E_##K) ); \
1821 cson_object_set_s(obj, kDesc, json_new_string(json_err_cstr(FSL_JSON_E_##K))); \
 
1822 cson_array_append( list, cson_object_value(obj) ); obj = NULL;
1823
1824 C(GENERIC);
1825 C(INVALID_REQUEST);
1826 C(UNKNOWN_COMMAND);
@@ -2006,11 +2017,12 @@
2006 "Requires 'o' permissions.");
2007 return NULL;
2008 }
2009 full = json_find_option_bool("full",NULL,"f",
2010 json_find_option_bool("verbose",NULL,"v",0));
2011 #define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf)));
 
2012
2013 jv = cson_value_new_object();
2014 jo = cson_value_get_object(jv);
2015
2016 zTmp = db_get("project-name",NULL);
@@ -2019,11 +2031,11 @@
2019 zTmp = db_get("project-description",NULL);
2020 cson_object_set(jo, "projectDescription", json_new_string(zTmp));
2021 fossil_free(zTmp);
2022 zTmp = NULL;
2023 fsize = file_size(g.zRepositoryName, ExtFILE);
2024 cson_object_set(jo, "repositorySize",
2025 cson_value_new_integer((cson_int_t)fsize));
2026
2027 if(full){
2028 n = db_int(0, "SELECT count(*) FROM blob");
2029 m = db_int(0, "SELECT count(*) FROM delta");
@@ -2068,25 +2080,31 @@
2068 " + 0.99");
2069 cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
2070 cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
2071 sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
2072 SETBUF(jo, "projectCode");
2073 cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME)));
 
2074
2075 jv2 = cson_value_new_object();
2076 jo2 = cson_value_get_object(jv2);
2077 cson_object_set(jo, "sqlite", jv2);
2078 sqlite3_snprintf(BufLen, zBuf, "%.19s [%.10s] (%s)",
2079 sqlite3_sourceid(), &sqlite3_sourceid()[20], sqlite3_libversion());
2080 SETBUF(jo2, "version");
2081 cson_object_set(jo2, "pageCount", cson_value_new_integer((cson_int_t)db_int(0, "PRAGMA repository.page_count")));
2082 cson_object_set(jo2, "pageSize", cson_value_new_integer((cson_int_t)db_int(0, "PRAGMA repository.page_size")));
2083 cson_object_set(jo2, "freeList", cson_value_new_integer((cson_int_t)db_int(0, "PRAGMA repository.freelist_count")));
2084 sqlite3_snprintf(BufLen, zBuf, "%s", db_text(0, "PRAGMA repository.encoding"));
 
 
 
2085 SETBUF(jo2, "encoding");
2086 sqlite3_snprintf(BufLen, zBuf, "%s", db_text(0, "PRAGMA repository.journal_mode"));
2087 cson_object_set(jo2, "journalMode", *zBuf ? cson_value_new_string(zBuf, strlen(zBuf)) : cson_value_null());
 
 
2088 return jv;
2089 #undef SETBUF
2090 }
2091
2092
@@ -2237,11 +2255,12 @@
2237 /*
2238 ** Mapping of names to JSON pages/commands. Each name is a subpath of
2239 ** /json (in CGI mode) or a subcommand of the json command in CLI mode
2240 */
2241 static const JsonPageDef JsonPageDefs[] = {
2242 /* please keep alphabetically sorted (case-insensitive) for maintenance reasons. */
 
2243 {"anonymousPassword", json_page_anon_password, 0},
2244 {"artifact", json_page_artifact, 0},
2245 {"branch", json_page_branch,0},
2246 {"cap", json_page_cap, 0},
2247 {"config", json_page_config, 0 },
2248
--- src/json.c
+++ src/json.c
@@ -23,12 +23,13 @@
23 ** https://fossil-scm.org/fossil/doc/trunk/www/json-api/index.md
24 **
25 ** Notes for hackers...
26 **
27 ** Here's how command/page dispatching works: json_page_top() (in HTTP mode) or
28 ** json_cmd_top() (in CLI mode) catch the "json" path/command. Those functions
29 ** then dispatch to a JSON-mode-specific command/page handler with the type
30 ** fossil_json_f().
31 ** See the API docs for that typedef (below) for the semantics of the callbacks.
32 **
33 **
34 */
35 #include "VERSION.h"
@@ -36,11 +37,12 @@
37 #include "json.h"
38 #include <assert.h>
39 #include <time.h>
40
41 #if INTERFACE
42 #include "json_detail.h" /* workaround for apparent enum limitation
43 in makeheaders */
44 #endif
45
46 const FossilJsonKeys_ FossilJsonKeys = {
47 "anonymousSeed" /*anonymousSeed*/,
48 "authToken" /*authToken*/,
@@ -176,11 +178,12 @@
178
179 /*
180 ** Convenience wrapper around cson_output() which appends the output
181 ** to pDest. pOpt may be NULL, in which case g.json.outOpt will be used.
182 */
183 int cson_output_Blob( cson_value const * pVal, Blob * pDest,
184 cson_output_opt const * pOpt ){
185 return cson_output( pVal, cson_data_dest_Blob,
186 pDest, pOpt ? pOpt : &g.json.outOpt );
187 }
188
189 /*
@@ -707,11 +710,12 @@
710 the form: login_cookie_name()=...
711
712 Then again, the hardened cookie value helps ensure that
713 only a proper key/value match is valid.
714 */
715 cgi_replace_parameter( login_cookie_name(),
716 cson_value_get_cstr(g.json.authToken) );
717 }else if( g.isHTTP ){
718 /* try fossil's conventional cookie. */
719 /* Reminder: chicken/egg scenario regarding db access in CLI
720 mode because login_cookie_name() needs the db. CLI
721 mode does not use any authentication, so we don't need
@@ -904,11 +908,12 @@
908 memcpy(zPart, head, len);
909 zPart[len] = 0;
910 if(doDeHttp){
911 dehttpize(zPart);
912 }
913 if( *zPart ){
914 /* should only fail if someone manages to url-encoded a NUL byte */
915 part = cson_value_new_string(zPart, strlen(zPart));
916 if( 0 != cson_array_append( target, part ) ){
917 cson_value_free(part);
918 rc = -rc;
919 break;
@@ -1086,11 +1091,11 @@
1091
1092 /* g.json.reqPayload exists only to simplify some of our access to
1093 the request payload. We currently only use this in the context of
1094 Object payloads, not Arrays, strings, etc.
1095 */
1096 g.json.reqPayload.v = cson_object_get( g.json.post.o,FossilJsonKeys.payload );
1097 if( g.json.reqPayload.v ){
1098 g.json.reqPayload.o = cson_value_get_object( g.json.reqPayload.v )
1099 /* g.json.reqPayload.o may legally be NULL, which means only that
1100 g.json.reqPayload.v is-not-a Object.
1101 */;
@@ -1115,11 +1120,11 @@
1120
1121 if(!g.json.jsonp){
1122 g.json.jsonp = json_find_option_cstr("jsonp",NULL,NULL);
1123 }
1124 if(!g.isHTTP){
1125 g.json.errorDetailParanoia = 0;/*disable error code dumb-down for CLI mode*/
1126 }
1127
1128 {/* set up JSON output formatting options. */
1129 int indent = -1;
1130 indent = json_find_option_int("indent",NULL,"I",-1);
@@ -1166,11 +1171,11 @@
1171 **
1172 */
1173 char const * json_command_arg(unsigned short ndx){
1174 cson_array * ar = g.json.cmd.a;
1175 assert((NULL!=ar) && "Internal error. Was json_bootstrap_late() called?");
1176 assert((g.argc>1) &&"Internal error - we never should have gotten this far.");
1177 if( g.json.cmd.offset < 0 ){
1178 /* first-time setup. */
1179 short i = 0;
1180 #define NEXT cson_string_cstr( \
1181 cson_value_get_string( \
@@ -1192,11 +1197,12 @@
1197 #undef NEXT
1198 if(g.json.cmd.offset < 0){
1199 return NULL;
1200 }else{
1201 ndx = g.json.cmd.offset + ndx;
1202 return cson_string_cstr(cson_value_get_string(
1203 cson_array_get( ar, g.json.cmd.offset + ndx )));
1204 }
1205 }
1206
1207 /* Returns the C-string form of json_auth_token(), or NULL
1208 ** if json_auth_token() returns NULL.
@@ -1210,11 +1216,12 @@
1216 ** found.
1217 **
1218 ** head must be a pointer to an array of JsonPageDefs in which the
1219 ** last entry has a NULL name.
1220 */
1221 JsonPageDef const * json_handler_for_name( char const * name,
1222 JsonPageDef const * head ){
1223 JsonPageDef const * pageDef = head;
1224 assert( head != NULL );
1225 if(name && *name) for( ; pageDef->name; ++pageDef ){
1226 if( 0 == strcmp(name, pageDef->name) ){
1227 return pageDef;
@@ -1292,14 +1299,16 @@
1299 if(!g.json.cmd.a){
1300 return NULL;
1301 }else{
1302 cson_value * rc = NULL;
1303 Blob path = empty_blob;
1304 unsigned int aLen = g.json.dispatchDepth+1;
1305 /*cson_array_length_get(g.json.cmd.a);*/
1306 unsigned int i = 1;
1307 for( ; i < aLen; ++i ){
1308 char const * part = cson_string_cstr(cson_value_get_string(
1309 cson_array_get(g.json.cmd.a, i)));
1310 if(!part){
1311 #if 1
1312 fossil_warning("Iterating further than expected in %s.",
1313 __FILE__);
1314 #endif
@@ -1329,11 +1338,12 @@
1338 cson_object * o = NULL;
1339 cson_object * pay = NULL;
1340 pay = o = cson_new_object();
1341
1342 #define INT(OBJ,K) cson_object_set(o, #K, json_new_int(OBJ.K))
1343 #define CSTR(OBJ,K) cson_object_set(o, #K, OBJ.K ? json_new_string(OBJ.K) \
1344 : cson_value_null())
1345 #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null())
1346 VAL(capabilities, json_cap_value());
1347 INT(g, argc);
1348 INT(g, isConst);
1349 CSTR(g, zConfigDbName);
@@ -1813,14 +1823,15 @@
1823 kRC = cson_new_string("resultCode",10);
1824 kSymbol = cson_new_string("cSymbol",7);
1825 kNumber = cson_new_string("number",6);
1826 kDesc = cson_new_string("description",11);
1827 #define C(K) obj = cson_new_object(); \
1828 cson_object_set_s(obj, kRC,json_new_string(json_rc_cstr(FSL_JSON_E_##K))); \
1829 cson_object_set_s(obj, kSymbol, json_new_string("FSL_JSON_E_"#K) ); \
1830 cson_object_set_s(obj, kNumber, cson_value_new_integer(FSL_JSON_E_##K) ); \
1831 cson_object_set_s(obj, kDesc, \
1832 json_new_string(json_err_cstr(FSL_JSON_E_##K))); \
1833 cson_array_append( list, cson_object_value(obj) ); obj = NULL;
1834
1835 C(GENERIC);
1836 C(INVALID_REQUEST);
1837 C(UNKNOWN_COMMAND);
@@ -2006,11 +2017,12 @@
2017 "Requires 'o' permissions.");
2018 return NULL;
2019 }
2020 full = json_find_option_bool("full",NULL,"f",
2021 json_find_option_bool("verbose",NULL,"v",0));
2022 #define SETBUF(O,K) cson_object_set(O, K, \
2023 cson_value_new_string(zBuf, strlen(zBuf)));
2024
2025 jv = cson_value_new_object();
2026 jo = cson_value_get_object(jv);
2027
2028 zTmp = db_get("project-name",NULL);
@@ -2019,11 +2031,11 @@
2031 zTmp = db_get("project-description",NULL);
2032 cson_object_set(jo, "projectDescription", json_new_string(zTmp));
2033 fossil_free(zTmp);
2034 zTmp = NULL;
2035 fsize = file_size(g.zRepositoryName, ExtFILE);
2036 cson_object_set(jo, "repositorySize",
2037 cson_value_new_integer((cson_int_t)fsize));
2038
2039 if(full){
2040 n = db_int(0, "SELECT count(*) FROM blob");
2041 m = db_int(0, "SELECT count(*) FROM delta");
@@ -2068,25 +2080,31 @@
2080 " + 0.99");
2081 cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
2082 cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
2083 sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
2084 SETBUF(jo, "projectCode");
2085 cson_object_set(jo, "compiler",
2086 cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME)));
2087
2088 jv2 = cson_value_new_object();
2089 jo2 = cson_value_get_object(jv2);
2090 cson_object_set(jo, "sqlite", jv2);
2091 sqlite3_snprintf(BufLen, zBuf, "%.19s [%.10s] (%s)", sqlite3_sourceid(),
2092 &sqlite3_sourceid()[20], sqlite3_libversion());
2093 SETBUF(jo2, "version");
2094 cson_object_set(jo2, "pageCount", cson_value_new_integer(
2095 (cson_int_t)db_int(0, "PRAGMA repository.page_count")));
2096 cson_object_set(jo2, "pageSize", cson_value_new_integer(
2097 (cson_int_t)db_int(0, "PRAGMA repository.page_size")));
2098 cson_object_set(jo2, "freeList", cson_value_new_integer(
2099 (cson_int_t)db_int(0, "PRAGMA repository.freelist_count")));
2100 sqlite3_snprintf(BufLen, zBuf, "%s", db_text(0,"PRAGMA repository.encoding"));
2101 SETBUF(jo2, "encoding");
2102 sqlite3_snprintf(BufLen, zBuf, "%s",
2103 db_text(0, "PRAGMA repository.journal_mode"));
2104 cson_object_set(jo2, "journalMode", *zBuf ?
2105 cson_value_new_string(zBuf, strlen(zBuf)) : cson_value_null());
2106 return jv;
2107 #undef SETBUF
2108 }
2109
2110
@@ -2237,11 +2255,12 @@
2255 /*
2256 ** Mapping of names to JSON pages/commands. Each name is a subpath of
2257 ** /json (in CGI mode) or a subcommand of the json command in CLI mode
2258 */
2259 static const JsonPageDef JsonPageDefs[] = {
2260 /* please keep alphabetically sorted (case-insensitive)
2261 for maintenance reasons. */
2262 {"anonymousPassword", json_page_anon_password, 0},
2263 {"artifact", json_page_artifact, 0},
2264 {"branch", json_page_branch,0},
2265 {"cap", json_page_cap, 0},
2266 {"config", json_page_config, 0 },
2267
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -211,11 +211,12 @@
211211
/*
212212
** Sub-impl of /json/artifact for check-ins.
213213
*/
214214
static cson_value * json_artifact_ci( cson_object * zParent, int rid ){
215215
if(!g.perm.Read){
216
- json_set_err( FSL_JSON_E_DENIED, "Viewing check-ins requires 'o' privileges." );
216
+ json_set_err( FSL_JSON_E_DENIED,
217
+ "Viewing check-ins requires 'o' privileges." );
217218
return NULL;
218219
}else{
219220
cson_value * artV = json_artifact_for_ci(rid, 1);
220221
cson_object * art = cson_value_get_object(artV);
221222
if(art){
@@ -250,16 +251,17 @@
250251
*/
251252
static int json_artifact_get_content_format_flag(void){
252253
enum { MagicValue = -9 };
253254
int contentFormat = json_wiki_get_content_format_flag(MagicValue);
254255
if(MagicValue == contentFormat){
255
- contentFormat = json_find_option_bool("includeContent","content","c",0) /* deprecated */ ? -1 : 0;
256
+ contentFormat = json_find_option_bool("includeContent",
257
+ "content","c",0) /* deprecated */ ? -1 : 0;
256258
}
257259
return contentFormat;
258260
}
259261
260
-extern int json_wiki_get_content_format_flag( int defaultValue ) /* json_wiki.c */;
262
+extern int json_wiki_get_content_format_flag(int defaultValue) /* json_wiki.c*/;
261263
262264
cson_value * json_artifact_wiki(cson_object * zParent, int rid){
263265
if( ! g.perm.RdWiki ){
264266
json_set_err(FSL_JSON_E_DENIED,
265267
"Requires 'j' privileges.");
@@ -380,18 +382,19 @@
380382
e.g. "modified", "new", "deleted".
381383
*/
382384
checkin_arr = cson_new_array();
383385
cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
384386
while( (SQLITE_ROW==db_step(&q) ) ){
385
- cson_object * row = cson_value_get_object(cson_sqlite3_row_to_object(q.pStmt));
387
+ cson_object * row = cson_value_get_object(
388
+ cson_sqlite3_row_to_object(q.pStmt));
386389
/* FIXME: move this isNew/isDel stuff into an SQL CASE statement. */
387390
char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
388391
char const isDel = cson_value_get_bool(cson_object_get(row,"isDel"));
389392
cson_object_set(row, "isNew", NULL);
390393
cson_object_set(row, "isDel", NULL);
391
- cson_object_set(row, "state",
392
- json_new_string(json_artifact_status_to_string(isNew, isDel)));
394
+ cson_object_set(row, "state", json_new_string(
395
+ json_artifact_status_to_string(isNew, isDel)));
393396
cson_array_append( checkin_arr, cson_object_value(row) );
394397
}
395398
db_finalize(&q);
396399
return cson_object_value(pay);
397400
}
398401
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -211,11 +211,12 @@
211 /*
212 ** Sub-impl of /json/artifact for check-ins.
213 */
214 static cson_value * json_artifact_ci( cson_object * zParent, int rid ){
215 if(!g.perm.Read){
216 json_set_err( FSL_JSON_E_DENIED, "Viewing check-ins requires 'o' privileges." );
 
217 return NULL;
218 }else{
219 cson_value * artV = json_artifact_for_ci(rid, 1);
220 cson_object * art = cson_value_get_object(artV);
221 if(art){
@@ -250,16 +251,17 @@
250 */
251 static int json_artifact_get_content_format_flag(void){
252 enum { MagicValue = -9 };
253 int contentFormat = json_wiki_get_content_format_flag(MagicValue);
254 if(MagicValue == contentFormat){
255 contentFormat = json_find_option_bool("includeContent","content","c",0) /* deprecated */ ? -1 : 0;
 
256 }
257 return contentFormat;
258 }
259
260 extern int json_wiki_get_content_format_flag( int defaultValue ) /* json_wiki.c */;
261
262 cson_value * json_artifact_wiki(cson_object * zParent, int rid){
263 if( ! g.perm.RdWiki ){
264 json_set_err(FSL_JSON_E_DENIED,
265 "Requires 'j' privileges.");
@@ -380,18 +382,19 @@
380 e.g. "modified", "new", "deleted".
381 */
382 checkin_arr = cson_new_array();
383 cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
384 while( (SQLITE_ROW==db_step(&q) ) ){
385 cson_object * row = cson_value_get_object(cson_sqlite3_row_to_object(q.pStmt));
 
386 /* FIXME: move this isNew/isDel stuff into an SQL CASE statement. */
387 char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
388 char const isDel = cson_value_get_bool(cson_object_get(row,"isDel"));
389 cson_object_set(row, "isNew", NULL);
390 cson_object_set(row, "isDel", NULL);
391 cson_object_set(row, "state",
392 json_new_string(json_artifact_status_to_string(isNew, isDel)));
393 cson_array_append( checkin_arr, cson_object_value(row) );
394 }
395 db_finalize(&q);
396 return cson_object_value(pay);
397 }
398
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -211,11 +211,12 @@
211 /*
212 ** Sub-impl of /json/artifact for check-ins.
213 */
214 static cson_value * json_artifact_ci( cson_object * zParent, int rid ){
215 if(!g.perm.Read){
216 json_set_err( FSL_JSON_E_DENIED,
217 "Viewing check-ins requires 'o' privileges." );
218 return NULL;
219 }else{
220 cson_value * artV = json_artifact_for_ci(rid, 1);
221 cson_object * art = cson_value_get_object(artV);
222 if(art){
@@ -250,16 +251,17 @@
251 */
252 static int json_artifact_get_content_format_flag(void){
253 enum { MagicValue = -9 };
254 int contentFormat = json_wiki_get_content_format_flag(MagicValue);
255 if(MagicValue == contentFormat){
256 contentFormat = json_find_option_bool("includeContent",
257 "content","c",0) /* deprecated */ ? -1 : 0;
258 }
259 return contentFormat;
260 }
261
262 extern int json_wiki_get_content_format_flag(int defaultValue) /* json_wiki.c*/;
263
264 cson_value * json_artifact_wiki(cson_object * zParent, int rid){
265 if( ! g.perm.RdWiki ){
266 json_set_err(FSL_JSON_E_DENIED,
267 "Requires 'j' privileges.");
@@ -380,18 +382,19 @@
382 e.g. "modified", "new", "deleted".
383 */
384 checkin_arr = cson_new_array();
385 cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
386 while( (SQLITE_ROW==db_step(&q) ) ){
387 cson_object * row = cson_value_get_object(
388 cson_sqlite3_row_to_object(q.pStmt));
389 /* FIXME: move this isNew/isDel stuff into an SQL CASE statement. */
390 char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
391 char const isDel = cson_value_get_bool(cson_object_get(row,"isDel"));
392 cson_object_set(row, "isNew", NULL);
393 cson_object_set(row, "isDel", NULL);
394 cson_object_set(row, "state", json_new_string(
395 json_artifact_status_to_string(isNew, isDel)));
396 cson_array_append( checkin_arr, cson_object_value(row) );
397 }
398 db_finalize(&q);
399 return cson_object_value(pay);
400 }
401
--- src/json_branch.c
+++ src/json_branch.c
@@ -202,11 +202,11 @@
202202
int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
203203
204204
if( fossil_strncmp(zColor, "auto", 4)==0 ) {
205205
bAutoColor = 1;
206206
zColor = 0;
207
- }
207
+ }
208208
/* fossil branch new name */
209209
if( zBranch==0 || zBranch[0]==0 ){
210210
zOpt->rcErrMsg = "Branch name may not be null/empty.";
211211
return FSL_JSON_E_INVALID_ARGS;
212212
}
@@ -335,11 +335,12 @@
335335
if(!opt.zName){
336336
opt.zName = json_command_arg(g.json.dispatchDepth+1);
337337
}
338338
339339
if(!opt.zName){
340
- json_set_err(FSL_JSON_E_MISSING_ARGS, "'name' parameter was not specified." );
340
+ json_set_err(FSL_JSON_E_MISSING_ARGS,
341
+ "'name' parameter was not specified." );
341342
return NULL;
342343
}
343344
344345
opt.zColor = json_find_option_cstr("bgColor","bgcolor",NULL);
345346
opt.zBasis = json_find_option_cstr("basis",NULL,NULL);
346347
--- src/json_branch.c
+++ src/json_branch.c
@@ -202,11 +202,11 @@
202 int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
203
204 if( fossil_strncmp(zColor, "auto", 4)==0 ) {
205 bAutoColor = 1;
206 zColor = 0;
207 }
208 /* fossil branch new name */
209 if( zBranch==0 || zBranch[0]==0 ){
210 zOpt->rcErrMsg = "Branch name may not be null/empty.";
211 return FSL_JSON_E_INVALID_ARGS;
212 }
@@ -335,11 +335,12 @@
335 if(!opt.zName){
336 opt.zName = json_command_arg(g.json.dispatchDepth+1);
337 }
338
339 if(!opt.zName){
340 json_set_err(FSL_JSON_E_MISSING_ARGS, "'name' parameter was not specified." );
 
341 return NULL;
342 }
343
344 opt.zColor = json_find_option_cstr("bgColor","bgcolor",NULL);
345 opt.zBasis = json_find_option_cstr("basis",NULL,NULL);
346
--- src/json_branch.c
+++ src/json_branch.c
@@ -202,11 +202,11 @@
202 int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
203
204 if( fossil_strncmp(zColor, "auto", 4)==0 ) {
205 bAutoColor = 1;
206 zColor = 0;
207 }
208 /* fossil branch new name */
209 if( zBranch==0 || zBranch[0]==0 ){
210 zOpt->rcErrMsg = "Branch name may not be null/empty.";
211 return FSL_JSON_E_INVALID_ARGS;
212 }
@@ -335,11 +335,12 @@
335 if(!opt.zName){
336 opt.zName = json_command_arg(g.json.dispatchDepth+1);
337 }
338
339 if(!opt.zName){
340 json_set_err(FSL_JSON_E_MISSING_ARGS,
341 "'name' parameter was not specified." );
342 return NULL;
343 }
344
345 opt.zColor = json_find_option_cstr("bgColor","bgcolor",NULL);
346 opt.zBasis = json_find_option_cstr("basis",NULL,NULL);
347
--- src/json_config.c
+++ src/json_config.c
@@ -257,11 +257,11 @@
257257
const Setting *pSet = &aSetting[i];
258258
cson_object * jSet;
259259
cson_value * pVal = 0, * pSrc = 0;
260260
jSet = cson_new_object();
261261
cson_object_set(pay, pSet->name, cson_object_value(jSet));
262
- cson_object_set(jSet, "versionable", cson_value_new_bool(pSet->versionable));
262
+ cson_object_set(jSet, "versionable",cson_value_new_bool(pSet->versionable));
263263
cson_object_set(jSet, "sensitive", cson_value_new_bool(pSet->sensitive));
264264
cson_object_set(jSet, "defaultValue", (pSet->def && pSet->def[0])
265265
? json_new_string(pSet->def)
266266
: cson_value_null());
267267
if( 0==pSet->sensitive || 0!=g.perm.Setup ){
@@ -292,11 +292,11 @@
292292
blob_appendf(&versionedPathname, "%s.fossil-settings/%s",
293293
g.zLocalRoot, pSet->name);
294294
if( file_size(blob_str(&versionedPathname), ExtFILE)>=0 ){
295295
Blob content;
296296
blob_zero(&content);
297
- blob_read_from_file(&content, blob_str(&versionedPathname), ExtFILE);
297
+ blob_read_from_file(&content, blob_str(&versionedPathname),ExtFILE);
298298
pSrc = json_new_string("versioned");
299299
pVal = json_new_string(blob_str(&content));
300300
blob_reset(&content);
301301
}
302302
blob_reset(&versionedPathname);
303303
--- src/json_config.c
+++ src/json_config.c
@@ -257,11 +257,11 @@
257 const Setting *pSet = &aSetting[i];
258 cson_object * jSet;
259 cson_value * pVal = 0, * pSrc = 0;
260 jSet = cson_new_object();
261 cson_object_set(pay, pSet->name, cson_object_value(jSet));
262 cson_object_set(jSet, "versionable", cson_value_new_bool(pSet->versionable));
263 cson_object_set(jSet, "sensitive", cson_value_new_bool(pSet->sensitive));
264 cson_object_set(jSet, "defaultValue", (pSet->def && pSet->def[0])
265 ? json_new_string(pSet->def)
266 : cson_value_null());
267 if( 0==pSet->sensitive || 0!=g.perm.Setup ){
@@ -292,11 +292,11 @@
292 blob_appendf(&versionedPathname, "%s.fossil-settings/%s",
293 g.zLocalRoot, pSet->name);
294 if( file_size(blob_str(&versionedPathname), ExtFILE)>=0 ){
295 Blob content;
296 blob_zero(&content);
297 blob_read_from_file(&content, blob_str(&versionedPathname), ExtFILE);
298 pSrc = json_new_string("versioned");
299 pVal = json_new_string(blob_str(&content));
300 blob_reset(&content);
301 }
302 blob_reset(&versionedPathname);
303
--- src/json_config.c
+++ src/json_config.c
@@ -257,11 +257,11 @@
257 const Setting *pSet = &aSetting[i];
258 cson_object * jSet;
259 cson_value * pVal = 0, * pSrc = 0;
260 jSet = cson_new_object();
261 cson_object_set(pay, pSet->name, cson_object_value(jSet));
262 cson_object_set(jSet, "versionable",cson_value_new_bool(pSet->versionable));
263 cson_object_set(jSet, "sensitive", cson_value_new_bool(pSet->sensitive));
264 cson_object_set(jSet, "defaultValue", (pSet->def && pSet->def[0])
265 ? json_new_string(pSet->def)
266 : cson_value_null());
267 if( 0==pSet->sensitive || 0!=g.perm.Setup ){
@@ -292,11 +292,11 @@
292 blob_appendf(&versionedPathname, "%s.fossil-settings/%s",
293 g.zLocalRoot, pSet->name);
294 if( file_size(blob_str(&versionedPathname), ExtFILE)>=0 ){
295 Blob content;
296 blob_zero(&content);
297 blob_read_from_file(&content, blob_str(&versionedPathname),ExtFILE);
298 pSrc = json_new_string("versioned");
299 pVal = json_new_string(blob_str(&content));
300 blob_reset(&content);
301 }
302 blob_reset(&versionedPathname);
303
+15 -10
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -41,14 +41,15 @@
4141
signed char sort = -1;
4242
if(!g.perm.Read){
4343
json_set_err(FSL_JSON_E_DENIED,"Requires 'o' privileges.");
4444
return NULL;
4545
}
46
- json_warn( FSL_JSON_W_UNKNOWN, "Achtung: the output of the finfo command is up for change.");
46
+ json_warn( FSL_JSON_W_UNKNOWN,
47
+ "Achtung: the output of the finfo command is up for change.");
4748
48
- /* For the "name" argument we have to jump through some hoops to make sure that we don't
49
- get the fossil-internally-assigned "name" option.
49
+ /* For the "name" argument we have to jump through some hoops to make sure
50
+ that we don't get the fossil-internally-assigned "name" option.
5051
*/
5152
zFilename = json_find_option_cstr2("name",NULL,NULL, g.json.dispatchDepth+1);
5253
if(!zFilename || !*zFilename){
5354
json_set_err(FSL_JSON_E_MISSING_ARGS, "Missing 'name' parameter.");
5455
return NULL;
@@ -65,11 +66,11 @@
6566
zCheckin = json_find_option_cstr("checkin",NULL,"ci");
6667
6768
blob_append_sql(&sql,
6869
/*0*/ "SELECT b.uuid,"
6970
/*1*/ " ci.uuid,"
70
-/*2*/ " (SELECT uuid FROM blob WHERE rid=mlink.fid)," /* Current file uuid */
71
+/*2*/ " (SELECT uuid FROM blob WHERE rid=mlink.fid),"/* Current file uuid */
7172
/*3*/ " cast(strftime('%%s',event.mtime) AS INTEGER),"
7273
/*4*/ " coalesce(event.euser, event.user),"
7374
/*5*/ " coalesce(event.ecomment, event.comment),"
7475
/*6*/ " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
7576
/*7*/ " event.bgcolor,"
@@ -88,11 +89,12 @@
8889
if( zCheckin && *zCheckin ){
8990
char * zU = NULL;
9091
int rc = name_to_uuid2( zCheckin, "ci", &zU );
9192
/*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/
9293
if(rc<=0){
93
- json_set_err((rc<0) ? FSL_JSON_E_AMBIGUOUS_UUID : FSL_JSON_E_RESOURCE_NOT_FOUND,
94
+ json_set_err((rc<0) ? FSL_JSON_E_AMBIGUOUS_UUID :
95
+ FSL_JSON_E_RESOURCE_NOT_FOUND,
9496
"Check-in hash %s.", (rc<0) ? "is ambiguous" : "not found");
9597
blob_reset(&sql);
9698
return NULL;
9799
}
98100
blob_append_sql(&sql, " AND ci.uuid='%q'", zU);
@@ -104,11 +106,12 @@
104106
}else if( zBefore && *zBefore ){
105107
blob_append_sql(&sql, " AND event.mtime<=julianday('%q')", zBefore);
106108
}
107109
}
108110
109
- blob_append_sql(&sql," ORDER BY event.mtime %s /*sort*/", (sort>0?"ASC":"DESC"));
111
+ blob_append_sql(&sql," ORDER BY event.mtime %s /*sort*/",
112
+ (sort>0 ? "ASC" : "DESC"));
110113
/*printf("SQL=\n%s\n",blob_str(&sql));*/
111114
db_prepare(&q, "%s", blob_sql_text(&sql));
112115
blob_reset(&sql);
113116
114117
pay = cson_new_object();
@@ -123,18 +126,20 @@
123126
int const isNew = db_column_int(&q,9);
124127
int const isDel = db_column_int(&q,10);
125128
cson_array_append( checkins, cson_object_value(row) );
126129
cson_object_set(row, "checkin", json_new_string( db_column_text(&q,1) ));
127130
cson_object_set(row, "uuid", json_new_string( db_column_text(&q,2) ));
128
- /*cson_object_set(row, "parentArtifact", json_new_string( db_column_text(&q,6) ));*/
131
+ /*cson_object_set(row, "parentArtifact",
132
+ json_new_string( db_column_text(&q,6) ));*/
129133
cson_object_set(row, "timestamp", json_new_int( db_column_int64(&q,3) ));
130134
cson_object_set(row, "user", json_new_string( db_column_text(&q,4) ));
131135
cson_object_set(row, "comment", json_new_string( db_column_text(&q,5) ));
132
- /*cson_object_set(row, "bgColor", json_new_string( db_column_text(&q,7) ));*/
136
+ /*cson_object_set(row, "bgColor",
137
+ json_new_string( db_column_text(&q,7) ));*/
133138
cson_object_set(row, "size", json_new_int( db_column_int64(&q,8) ));
134
- cson_object_set(row, "state",
135
- json_new_string(json_artifact_status_to_string(isNew,isDel)));
139
+ cson_object_set(row, "state", json_new_string(
140
+ json_artifact_status_to_string(isNew, isDel)));
136141
if( (0 < limit) && (++currentRow >= limit) ){
137142
break;
138143
}
139144
}
140145
db_finalize(&q);
141146
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -41,14 +41,15 @@
41 signed char sort = -1;
42 if(!g.perm.Read){
43 json_set_err(FSL_JSON_E_DENIED,"Requires 'o' privileges.");
44 return NULL;
45 }
46 json_warn( FSL_JSON_W_UNKNOWN, "Achtung: the output of the finfo command is up for change.");
 
47
48 /* For the "name" argument we have to jump through some hoops to make sure that we don't
49 get the fossil-internally-assigned "name" option.
50 */
51 zFilename = json_find_option_cstr2("name",NULL,NULL, g.json.dispatchDepth+1);
52 if(!zFilename || !*zFilename){
53 json_set_err(FSL_JSON_E_MISSING_ARGS, "Missing 'name' parameter.");
54 return NULL;
@@ -65,11 +66,11 @@
65 zCheckin = json_find_option_cstr("checkin",NULL,"ci");
66
67 blob_append_sql(&sql,
68 /*0*/ "SELECT b.uuid,"
69 /*1*/ " ci.uuid,"
70 /*2*/ " (SELECT uuid FROM blob WHERE rid=mlink.fid)," /* Current file uuid */
71 /*3*/ " cast(strftime('%%s',event.mtime) AS INTEGER),"
72 /*4*/ " coalesce(event.euser, event.user),"
73 /*5*/ " coalesce(event.ecomment, event.comment),"
74 /*6*/ " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
75 /*7*/ " event.bgcolor,"
@@ -88,11 +89,12 @@
88 if( zCheckin && *zCheckin ){
89 char * zU = NULL;
90 int rc = name_to_uuid2( zCheckin, "ci", &zU );
91 /*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/
92 if(rc<=0){
93 json_set_err((rc<0) ? FSL_JSON_E_AMBIGUOUS_UUID : FSL_JSON_E_RESOURCE_NOT_FOUND,
 
94 "Check-in hash %s.", (rc<0) ? "is ambiguous" : "not found");
95 blob_reset(&sql);
96 return NULL;
97 }
98 blob_append_sql(&sql, " AND ci.uuid='%q'", zU);
@@ -104,11 +106,12 @@
104 }else if( zBefore && *zBefore ){
105 blob_append_sql(&sql, " AND event.mtime<=julianday('%q')", zBefore);
106 }
107 }
108
109 blob_append_sql(&sql," ORDER BY event.mtime %s /*sort*/", (sort>0?"ASC":"DESC"));
 
110 /*printf("SQL=\n%s\n",blob_str(&sql));*/
111 db_prepare(&q, "%s", blob_sql_text(&sql));
112 blob_reset(&sql);
113
114 pay = cson_new_object();
@@ -123,18 +126,20 @@
123 int const isNew = db_column_int(&q,9);
124 int const isDel = db_column_int(&q,10);
125 cson_array_append( checkins, cson_object_value(row) );
126 cson_object_set(row, "checkin", json_new_string( db_column_text(&q,1) ));
127 cson_object_set(row, "uuid", json_new_string( db_column_text(&q,2) ));
128 /*cson_object_set(row, "parentArtifact", json_new_string( db_column_text(&q,6) ));*/
 
129 cson_object_set(row, "timestamp", json_new_int( db_column_int64(&q,3) ));
130 cson_object_set(row, "user", json_new_string( db_column_text(&q,4) ));
131 cson_object_set(row, "comment", json_new_string( db_column_text(&q,5) ));
132 /*cson_object_set(row, "bgColor", json_new_string( db_column_text(&q,7) ));*/
 
133 cson_object_set(row, "size", json_new_int( db_column_int64(&q,8) ));
134 cson_object_set(row, "state",
135 json_new_string(json_artifact_status_to_string(isNew,isDel)));
136 if( (0 < limit) && (++currentRow >= limit) ){
137 break;
138 }
139 }
140 db_finalize(&q);
141
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -41,14 +41,15 @@
41 signed char sort = -1;
42 if(!g.perm.Read){
43 json_set_err(FSL_JSON_E_DENIED,"Requires 'o' privileges.");
44 return NULL;
45 }
46 json_warn( FSL_JSON_W_UNKNOWN,
47 "Achtung: the output of the finfo command is up for change.");
48
49 /* For the "name" argument we have to jump through some hoops to make sure
50 that we don't get the fossil-internally-assigned "name" option.
51 */
52 zFilename = json_find_option_cstr2("name",NULL,NULL, g.json.dispatchDepth+1);
53 if(!zFilename || !*zFilename){
54 json_set_err(FSL_JSON_E_MISSING_ARGS, "Missing 'name' parameter.");
55 return NULL;
@@ -65,11 +66,11 @@
66 zCheckin = json_find_option_cstr("checkin",NULL,"ci");
67
68 blob_append_sql(&sql,
69 /*0*/ "SELECT b.uuid,"
70 /*1*/ " ci.uuid,"
71 /*2*/ " (SELECT uuid FROM blob WHERE rid=mlink.fid),"/* Current file uuid */
72 /*3*/ " cast(strftime('%%s',event.mtime) AS INTEGER),"
73 /*4*/ " coalesce(event.euser, event.user),"
74 /*5*/ " coalesce(event.ecomment, event.comment),"
75 /*6*/ " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
76 /*7*/ " event.bgcolor,"
@@ -88,11 +89,12 @@
89 if( zCheckin && *zCheckin ){
90 char * zU = NULL;
91 int rc = name_to_uuid2( zCheckin, "ci", &zU );
92 /*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/
93 if(rc<=0){
94 json_set_err((rc<0) ? FSL_JSON_E_AMBIGUOUS_UUID :
95 FSL_JSON_E_RESOURCE_NOT_FOUND,
96 "Check-in hash %s.", (rc<0) ? "is ambiguous" : "not found");
97 blob_reset(&sql);
98 return NULL;
99 }
100 blob_append_sql(&sql, " AND ci.uuid='%q'", zU);
@@ -104,11 +106,12 @@
106 }else if( zBefore && *zBefore ){
107 blob_append_sql(&sql, " AND event.mtime<=julianday('%q')", zBefore);
108 }
109 }
110
111 blob_append_sql(&sql," ORDER BY event.mtime %s /*sort*/",
112 (sort>0 ? "ASC" : "DESC"));
113 /*printf("SQL=\n%s\n",blob_str(&sql));*/
114 db_prepare(&q, "%s", blob_sql_text(&sql));
115 blob_reset(&sql);
116
117 pay = cson_new_object();
@@ -123,18 +126,20 @@
126 int const isNew = db_column_int(&q,9);
127 int const isDel = db_column_int(&q,10);
128 cson_array_append( checkins, cson_object_value(row) );
129 cson_object_set(row, "checkin", json_new_string( db_column_text(&q,1) ));
130 cson_object_set(row, "uuid", json_new_string( db_column_text(&q,2) ));
131 /*cson_object_set(row, "parentArtifact",
132 json_new_string( db_column_text(&q,6) ));*/
133 cson_object_set(row, "timestamp", json_new_int( db_column_int64(&q,3) ));
134 cson_object_set(row, "user", json_new_string( db_column_text(&q,4) ));
135 cson_object_set(row, "comment", json_new_string( db_column_text(&q,5) ));
136 /*cson_object_set(row, "bgColor",
137 json_new_string( db_column_text(&q,7) ));*/
138 cson_object_set(row, "size", json_new_int( db_column_int64(&q,8) ));
139 cson_object_set(row, "state", json_new_string(
140 json_artifact_status_to_string(isNew, isDel)));
141 if( (0 < limit) && (++currentRow >= limit) ){
142 break;
143 }
144 }
145 db_finalize(&q);
146
--- src/json_login.c
+++ src/json_login.c
@@ -155,13 +155,15 @@
155155
po = cson_value_get_object(payload);
156156
cson_object_set(po, "authToken", json_new_string(cookie));
157157
free(cookie);
158158
cson_object_set(po, "name", json_new_string(name));
159159
cap = db_text(NULL, "SELECT cap FROM user WHERE login=%Q", name);
160
- cson_object_set(po, "capabilities", cap ? json_new_string(cap) : cson_value_null() );
160
+ cson_object_set(po, "capabilities",
161
+ cap ? json_new_string(cap) : cson_value_null() );
161162
free(cap);
162
- cson_object_set(po, "loginCookieName", json_new_string( login_cookie_name() ) );
163
+ cson_object_set(po, "loginCookieName",
164
+ json_new_string( login_cookie_name() ) );
163165
/* TODO: add loginExpiryTime to the payload. To do this properly
164166
we "should" add an ([unsigned] int *) to
165167
login_set_user_cookie() and login_set_anon_cookie(), to which
166168
the expiry time is assigned. (Remember that JSON doesn't do
167169
unsigned int.)
168170
--- src/json_login.c
+++ src/json_login.c
@@ -155,13 +155,15 @@
155 po = cson_value_get_object(payload);
156 cson_object_set(po, "authToken", json_new_string(cookie));
157 free(cookie);
158 cson_object_set(po, "name", json_new_string(name));
159 cap = db_text(NULL, "SELECT cap FROM user WHERE login=%Q", name);
160 cson_object_set(po, "capabilities", cap ? json_new_string(cap) : cson_value_null() );
 
161 free(cap);
162 cson_object_set(po, "loginCookieName", json_new_string( login_cookie_name() ) );
 
163 /* TODO: add loginExpiryTime to the payload. To do this properly
164 we "should" add an ([unsigned] int *) to
165 login_set_user_cookie() and login_set_anon_cookie(), to which
166 the expiry time is assigned. (Remember that JSON doesn't do
167 unsigned int.)
168
--- src/json_login.c
+++ src/json_login.c
@@ -155,13 +155,15 @@
155 po = cson_value_get_object(payload);
156 cson_object_set(po, "authToken", json_new_string(cookie));
157 free(cookie);
158 cson_object_set(po, "name", json_new_string(name));
159 cap = db_text(NULL, "SELECT cap FROM user WHERE login=%Q", name);
160 cson_object_set(po, "capabilities",
161 cap ? json_new_string(cap) : cson_value_null() );
162 free(cap);
163 cson_object_set(po, "loginCookieName",
164 json_new_string( login_cookie_name() ) );
165 /* TODO: add loginExpiryTime to the payload. To do this properly
166 we "should" add an ([unsigned] int *) to
167 login_set_user_cookie() and login_set_anon_cookie(), to which
168 the expiry time is assigned. (Remember that JSON doesn't do
169 unsigned int.)
170
+2 -1
--- src/json_tag.c
+++ src/json_tag.c
@@ -117,11 +117,12 @@
117117
Blob uu = empty_blob;
118118
int rc;
119119
blob_append(&uu, zName, -1);
120120
rc = name_to_uuid(&uu, 9, "*");
121121
if(0!=rc){
122
- json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to artifact hash!");
122
+ json_set_err(FSL_JSON_E_UNKNOWN,
123
+ "Could not convert name back to artifact hash!");
123124
blob_reset(&uu);
124125
goto error;
125126
}
126127
cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
127128
blob_reset(&uu);
128129
--- src/json_tag.c
+++ src/json_tag.c
@@ -117,11 +117,12 @@
117 Blob uu = empty_blob;
118 int rc;
119 blob_append(&uu, zName, -1);
120 rc = name_to_uuid(&uu, 9, "*");
121 if(0!=rc){
122 json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to artifact hash!");
 
123 blob_reset(&uu);
124 goto error;
125 }
126 cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
127 blob_reset(&uu);
128
--- src/json_tag.c
+++ src/json_tag.c
@@ -117,11 +117,12 @@
117 Blob uu = empty_blob;
118 int rc;
119 blob_append(&uu, zName, -1);
120 rc = name_to_uuid(&uu, 9, "*");
121 if(0!=rc){
122 json_set_err(FSL_JSON_E_UNKNOWN,
123 "Could not convert name back to artifact hash!");
124 blob_reset(&uu);
125 goto error;
126 }
127 cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
128 blob_reset(&uu);
129
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -169,20 +169,22 @@
169169
zTag);
170170
if(tagid<=0){
171171
return -1;
172172
}
173173
if(pPayload){
174
- cson_object_set( pPayload, zBranch ? "branch" : "tag", json_new_string(zTag) );
174
+ cson_object_set( pPayload, zBranch ? "branch" : "tag",
175
+ json_new_string(zTag) );
175176
}
176177
blob_appendf(pSql,
177178
" AND ("
178179
" EXISTS(SELECT 1 FROM tagxref"
179180
" WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
180181
tagid);
181182
if(!zUnhide){
182183
blob_appendf(pSql,
183
- " AND NOT EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=blob.rid"
184
+ " AND NOT EXISTS(SELECT 1 FROM plink "
185
+ " JOIN tagxref ON rid=blob.rid"
184186
" WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
185187
TAG_HIDDEN);
186188
}
187189
if(zBranch){
188190
/* from "r" flag code in page_timeline().*/
@@ -352,13 +354,14 @@
352354
cson_object_set(row, "parent", json_new_string(db_column_text(&q,4)));
353355
}
354356
cson_object_set(row, "size", json_new_int(db_column_int(&q,5)));
355357
356358
cson_object_set(row, "state",
357
- json_new_string(json_artifact_status_to_string(isNew,isDel)));
359
+ json_new_string(json_artifact_status_to_string(isNew,isDel)));
358360
zDownload = mprintf("/raw/%s?name=%s",
359
- /* reminder: g.zBaseURL is of course not set for CLI mode. */
361
+ /* reminder: g.zBaseURL is of course not set
362
+ for CLI mode. */
360363
db_column_text(&q,2),
361364
db_column_text(&q,3));
362365
cson_object_set(row, "downloadPath", json_new_string(zDownload));
363366
free(zDownload);
364367
}
@@ -505,11 +508,11 @@
505508
cson_object * row = cson_value_get_object(rowV);
506509
if(!row){
507510
if( !warnRowToJsonFailed ){
508511
warnRowToJsonFailed = 1;
509512
json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
510
- "Could not convert at least one timeline result row to JSON." );
513
+ "Could not convert at least one timeline result row to JSON." );
511514
}
512515
continue;
513516
}
514517
cson_array_append(list, rowV);
515518
}
@@ -548,19 +551,22 @@
548551
goto error;
549552
}
550553
551554
#if 0
552555
/* only for testing! */
553
- cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
556
+ cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),
557
+ strlen(blob_buffer(&sql))));
554558
#endif
555559
db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
556560
blob_reset(&sql);
557561
db_prepare(&q, "SELECT"
558562
/* For events, the name is generally more useful than
559563
the uuid, but the uuid is unambiguous and can be used
560564
with commands like 'artifact'. */
561
- " substr((SELECT tagname FROM tag AS tn WHERE tn.tagid=json_timeline.tagId AND tagname LIKE 'event-%%'),7) AS name,"
565
+ " substr((SELECT tagname FROM tag AS tn "
566
+ " WHERE tn.tagid=json_timeline.tagId "
567
+ " AND tagname LIKE 'event-%%'),7) AS name,"
562568
" uuid as uuid,"
563569
" mtime AS timestamp,"
564570
" comment AS comment, "
565571
" user AS user,"
566572
" eventType AS eventType"
@@ -591,11 +597,12 @@
591597
cson_array * list = NULL;
592598
int check = 0;
593599
Stmt q = empty_Stmt;
594600
Blob sql = empty_blob;
595601
if( !g.perm.RdWiki && !g.perm.Read ){
596
- json_set_err( FSL_JSON_E_DENIED, "Wiki timeline requires 'o' or 'j' access.");
602
+ json_set_err( FSL_JSON_E_DENIED,
603
+ "Wiki timeline requires 'o' or 'j' access.");
597604
return NULL;
598605
}
599606
payV = cson_value_new_object();
600607
pay = cson_value_get_object(payV);
601608
check = json_timeline_setup_sql( "w", &sql, pay );
@@ -604,11 +611,12 @@
604611
goto error;
605612
}
606613
607614
#if 0
608615
/* only for testing! */
609
- cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
616
+ cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),
617
+ strlen(blob_buffer(&sql))));
610618
#endif
611619
db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
612620
blob_reset(&sql);
613621
db_prepare(&q, "SELECT"
614622
" uuid AS uuid,"
@@ -654,11 +662,12 @@
654662
cson_array * list = NULL;
655663
int check = 0;
656664
Stmt q = empty_Stmt;
657665
Blob sql = empty_blob;
658666
if( !g.perm.RdTkt && !g.perm.Read ){
659
- json_set_err(FSL_JSON_E_DENIED, "Ticket timeline requires 'o' or 'r' access.");
667
+ json_set_err(FSL_JSON_E_DENIED,
668
+ "Ticket timeline requires 'o' or 'r' access.");
660669
return NULL;
661670
}
662671
payV = cson_value_new_object();
663672
pay = cson_value_get_object(payV);
664673
check = json_timeline_setup_sql( "t", &sql, pay );
@@ -726,11 +735,11 @@
726735
rowV = cson_sqlite3_row_to_object(q.pStmt);
727736
row = cson_value_get_object(rowV);
728737
if(!row){
729738
manifest_destroy(pMan);
730739
json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
731
- "Could not convert at least one timeline result row to JSON." );
740
+ "Could not convert at least one timeline result row to JSON." );
732741
continue;
733742
}
734743
/* FIXME: certainly there's a more efficient way for use to get
735744
the ticket UUIDs?
736745
*/
737746
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -169,20 +169,22 @@
169 zTag);
170 if(tagid<=0){
171 return -1;
172 }
173 if(pPayload){
174 cson_object_set( pPayload, zBranch ? "branch" : "tag", json_new_string(zTag) );
 
175 }
176 blob_appendf(pSql,
177 " AND ("
178 " EXISTS(SELECT 1 FROM tagxref"
179 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
180 tagid);
181 if(!zUnhide){
182 blob_appendf(pSql,
183 " AND NOT EXISTS(SELECT 1 FROM plink JOIN tagxref ON rid=blob.rid"
 
184 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
185 TAG_HIDDEN);
186 }
187 if(zBranch){
188 /* from "r" flag code in page_timeline().*/
@@ -352,13 +354,14 @@
352 cson_object_set(row, "parent", json_new_string(db_column_text(&q,4)));
353 }
354 cson_object_set(row, "size", json_new_int(db_column_int(&q,5)));
355
356 cson_object_set(row, "state",
357 json_new_string(json_artifact_status_to_string(isNew,isDel)));
358 zDownload = mprintf("/raw/%s?name=%s",
359 /* reminder: g.zBaseURL is of course not set for CLI mode. */
 
360 db_column_text(&q,2),
361 db_column_text(&q,3));
362 cson_object_set(row, "downloadPath", json_new_string(zDownload));
363 free(zDownload);
364 }
@@ -505,11 +508,11 @@
505 cson_object * row = cson_value_get_object(rowV);
506 if(!row){
507 if( !warnRowToJsonFailed ){
508 warnRowToJsonFailed = 1;
509 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
510 "Could not convert at least one timeline result row to JSON." );
511 }
512 continue;
513 }
514 cson_array_append(list, rowV);
515 }
@@ -548,19 +551,22 @@
548 goto error;
549 }
550
551 #if 0
552 /* only for testing! */
553 cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
 
554 #endif
555 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
556 blob_reset(&sql);
557 db_prepare(&q, "SELECT"
558 /* For events, the name is generally more useful than
559 the uuid, but the uuid is unambiguous and can be used
560 with commands like 'artifact'. */
561 " substr((SELECT tagname FROM tag AS tn WHERE tn.tagid=json_timeline.tagId AND tagname LIKE 'event-%%'),7) AS name,"
 
 
562 " uuid as uuid,"
563 " mtime AS timestamp,"
564 " comment AS comment, "
565 " user AS user,"
566 " eventType AS eventType"
@@ -591,11 +597,12 @@
591 cson_array * list = NULL;
592 int check = 0;
593 Stmt q = empty_Stmt;
594 Blob sql = empty_blob;
595 if( !g.perm.RdWiki && !g.perm.Read ){
596 json_set_err( FSL_JSON_E_DENIED, "Wiki timeline requires 'o' or 'j' access.");
 
597 return NULL;
598 }
599 payV = cson_value_new_object();
600 pay = cson_value_get_object(payV);
601 check = json_timeline_setup_sql( "w", &sql, pay );
@@ -604,11 +611,12 @@
604 goto error;
605 }
606
607 #if 0
608 /* only for testing! */
609 cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
 
610 #endif
611 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
612 blob_reset(&sql);
613 db_prepare(&q, "SELECT"
614 " uuid AS uuid,"
@@ -654,11 +662,12 @@
654 cson_array * list = NULL;
655 int check = 0;
656 Stmt q = empty_Stmt;
657 Blob sql = empty_blob;
658 if( !g.perm.RdTkt && !g.perm.Read ){
659 json_set_err(FSL_JSON_E_DENIED, "Ticket timeline requires 'o' or 'r' access.");
 
660 return NULL;
661 }
662 payV = cson_value_new_object();
663 pay = cson_value_get_object(payV);
664 check = json_timeline_setup_sql( "t", &sql, pay );
@@ -726,11 +735,11 @@
726 rowV = cson_sqlite3_row_to_object(q.pStmt);
727 row = cson_value_get_object(rowV);
728 if(!row){
729 manifest_destroy(pMan);
730 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
731 "Could not convert at least one timeline result row to JSON." );
732 continue;
733 }
734 /* FIXME: certainly there's a more efficient way for use to get
735 the ticket UUIDs?
736 */
737
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -169,20 +169,22 @@
169 zTag);
170 if(tagid<=0){
171 return -1;
172 }
173 if(pPayload){
174 cson_object_set( pPayload, zBranch ? "branch" : "tag",
175 json_new_string(zTag) );
176 }
177 blob_appendf(pSql,
178 " AND ("
179 " EXISTS(SELECT 1 FROM tagxref"
180 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
181 tagid);
182 if(!zUnhide){
183 blob_appendf(pSql,
184 " AND NOT EXISTS(SELECT 1 FROM plink "
185 " JOIN tagxref ON rid=blob.rid"
186 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
187 TAG_HIDDEN);
188 }
189 if(zBranch){
190 /* from "r" flag code in page_timeline().*/
@@ -352,13 +354,14 @@
354 cson_object_set(row, "parent", json_new_string(db_column_text(&q,4)));
355 }
356 cson_object_set(row, "size", json_new_int(db_column_int(&q,5)));
357
358 cson_object_set(row, "state",
359 json_new_string(json_artifact_status_to_string(isNew,isDel)));
360 zDownload = mprintf("/raw/%s?name=%s",
361 /* reminder: g.zBaseURL is of course not set
362 for CLI mode. */
363 db_column_text(&q,2),
364 db_column_text(&q,3));
365 cson_object_set(row, "downloadPath", json_new_string(zDownload));
366 free(zDownload);
367 }
@@ -505,11 +508,11 @@
508 cson_object * row = cson_value_get_object(rowV);
509 if(!row){
510 if( !warnRowToJsonFailed ){
511 warnRowToJsonFailed = 1;
512 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
513 "Could not convert at least one timeline result row to JSON." );
514 }
515 continue;
516 }
517 cson_array_append(list, rowV);
518 }
@@ -548,19 +551,22 @@
551 goto error;
552 }
553
554 #if 0
555 /* only for testing! */
556 cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),
557 strlen(blob_buffer(&sql))));
558 #endif
559 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
560 blob_reset(&sql);
561 db_prepare(&q, "SELECT"
562 /* For events, the name is generally more useful than
563 the uuid, but the uuid is unambiguous and can be used
564 with commands like 'artifact'. */
565 " substr((SELECT tagname FROM tag AS tn "
566 " WHERE tn.tagid=json_timeline.tagId "
567 " AND tagname LIKE 'event-%%'),7) AS name,"
568 " uuid as uuid,"
569 " mtime AS timestamp,"
570 " comment AS comment, "
571 " user AS user,"
572 " eventType AS eventType"
@@ -591,11 +597,12 @@
597 cson_array * list = NULL;
598 int check = 0;
599 Stmt q = empty_Stmt;
600 Blob sql = empty_blob;
601 if( !g.perm.RdWiki && !g.perm.Read ){
602 json_set_err( FSL_JSON_E_DENIED,
603 "Wiki timeline requires 'o' or 'j' access.");
604 return NULL;
605 }
606 payV = cson_value_new_object();
607 pay = cson_value_get_object(payV);
608 check = json_timeline_setup_sql( "w", &sql, pay );
@@ -604,11 +611,12 @@
611 goto error;
612 }
613
614 #if 0
615 /* only for testing! */
616 cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),
617 strlen(blob_buffer(&sql))));
618 #endif
619 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
620 blob_reset(&sql);
621 db_prepare(&q, "SELECT"
622 " uuid AS uuid,"
@@ -654,11 +662,12 @@
662 cson_array * list = NULL;
663 int check = 0;
664 Stmt q = empty_Stmt;
665 Blob sql = empty_blob;
666 if( !g.perm.RdTkt && !g.perm.Read ){
667 json_set_err(FSL_JSON_E_DENIED,
668 "Ticket timeline requires 'o' or 'r' access.");
669 return NULL;
670 }
671 payV = cson_value_new_object();
672 pay = cson_value_get_object(payV);
673 check = json_timeline_setup_sql( "t", &sql, pay );
@@ -726,11 +735,11 @@
735 rowV = cson_sqlite3_row_to_object(q.pStmt);
736 row = cson_value_get_object(rowV);
737 if(!row){
738 manifest_destroy(pMan);
739 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
740 "Could not convert at least one timeline result row to JSON." );
741 continue;
742 }
743 /* FIXME: certainly there's a more efficient way for use to get
744 the ticket UUIDs?
745 */
746
+2 -1
--- src/json_user.c
+++ src/json_user.c
@@ -170,11 +170,12 @@
170170
** not modify the 's' permission. Admin users without setup
171171
** permissions may not edit any other user who has the 's' permission.
172172
**
173173
*/
174174
int json_user_update_from_json( cson_object * pUser ){
175
-#define CSTR(X) cson_string_cstr(cson_value_get_string( cson_object_get(pUser, X ) ))
175
+#define CSTR(X) cson_string_cstr(cson_value_get_string( cson_object_get(pUser, \
176
+ X ) ))
176177
char const * zName = CSTR("name");
177178
char const * zNameNew = zName;
178179
char * zNameFree = NULL;
179180
char const * zInfo = CSTR("info");
180181
char const * zCap = CSTR("capabilities");
181182
--- src/json_user.c
+++ src/json_user.c
@@ -170,11 +170,12 @@
170 ** not modify the 's' permission. Admin users without setup
171 ** permissions may not edit any other user who has the 's' permission.
172 **
173 */
174 int json_user_update_from_json( cson_object * pUser ){
175 #define CSTR(X) cson_string_cstr(cson_value_get_string( cson_object_get(pUser, X ) ))
 
176 char const * zName = CSTR("name");
177 char const * zNameNew = zName;
178 char * zNameFree = NULL;
179 char const * zInfo = CSTR("info");
180 char const * zCap = CSTR("capabilities");
181
--- src/json_user.c
+++ src/json_user.c
@@ -170,11 +170,12 @@
170 ** not modify the 's' permission. Admin users without setup
171 ** permissions may not edit any other user who has the 's' permission.
172 **
173 */
174 int json_user_update_from_json( cson_object * pUser ){
175 #define CSTR(X) cson_string_cstr(cson_value_get_string( cson_object_get(pUser, \
176 X ) ))
177 char const * zName = CSTR("name");
178 char const * zNameNew = zName;
179 char * zNameFree = NULL;
180 char const * zInfo = CSTR("info");
181 char const * zCap = CSTR("capabilities");
182
+11 -8
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -163,11 +163,12 @@
163163
/*
164164
** Searches for the latest version of a wiki page with the given
165165
** name. If found it behaves like json_get_wiki_page_by_rid(theRid,
166166
** contentFormat), else it returns NULL.
167167
*/
168
-cson_value * json_get_wiki_page_by_name(char const * zPageName, int contentFormat){
168
+cson_value * json_get_wiki_page_by_name(char const * zPageName,
169
+ int contentFormat){
169170
int rid;
170171
rid = db_int(0,
171172
"SELECT x.rid FROM tag t, tagxref x, blob b"
172173
" WHERE x.tagid=t.tagid AND t.tagname='wiki-%q' "
173174
" AND b.rid=x.rid"
@@ -259,11 +260,11 @@
259260
260261
zSymName = json_find_option_cstr("uuid",NULL,"u");
261262
262263
if((!zPageName||!*zPageName) && (!zSymName || !*zSymName)){
263264
json_set_err(FSL_JSON_E_MISSING_ARGS,
264
- "At least one of the 'name' or 'uuid' arguments must be provided.");
265
+ "At least one of the 'name' or 'uuid' arguments must be provided.");
265266
return NULL;
266267
}
267268
268269
/* TODO: see if we have a page named zPageName. If not, try to resolve
269270
zPageName as a UUID.
@@ -297,17 +298,17 @@
297298
}else{
298299
sContent = cson_value_get_string(g.json.reqPayload.v);
299300
}
300301
if(!sContent) {
301302
json_set_err(FSL_JSON_E_MISSING_ARGS,
302
- "The 'payload' property must be either a string containing the "
303
- "Fossil wiki code to preview or an object with body + mimetype "
304
- "properties.");
303
+ "The 'payload' property must be either a string containing the "
304
+ "Fossil wiki code to preview or an object with body + mimetype "
305
+ "properties.");
305306
return NULL;
306307
}
307308
zContent = cson_string_cstr(sContent);
308
- blob_append( &contentOrig, zContent, (int)cson_string_length_bytes(sContent) );
309
+ blob_append( &contentOrig, zContent, (int)cson_string_length_bytes(sContent));
309310
zMime = wiki_filter_mimetypes(zMime);
310311
if( 0==fossil_strcmp(zMime, "text/x-markdown") ){
311312
markdown_to_html(&contentOrig, 0, &contentHtml);
312313
}else if( 0==fossil_strcmp(zMime, "text/plain") ){
313314
blob_append(&contentHtml, "<pre class='textPlain'>", -1);
@@ -315,11 +316,12 @@
315316
blob_append(&contentHtml, "</pre>", -1);
316317
}else{
317318
wiki_convert( &contentOrig, &contentHtml, 0 );
318319
}
319320
blob_reset( &contentOrig );
320
- pay = cson_value_new_string( blob_str(&contentHtml), (unsigned int)blob_size(&contentHtml));
321
+ pay = cson_value_new_string( blob_str(&contentHtml),
322
+ (unsigned int)blob_size(&contentHtml));
321323
blob_reset( &contentHtml );
322324
return pay;
323325
}
324326
325327
@@ -346,11 +348,12 @@
346348
cson_value * nameV; /* wiki page name */
347349
char const * zPageName; /* cstr form of page name */
348350
cson_value * contentV; /* passed-in content */
349351
cson_value * emptyContent = NULL; /* placeholder for empty content. */
350352
cson_value * payV = NULL; /* payload/return value */
351
- cson_string const * jstr = NULL; /* temp for cson_value-to-cson_string conversions. */
353
+ cson_string const * jstr = NULL; /* temp for cson_value-to-cson_string
354
+ conversions. */
352355
char const * zMimeType = 0;
353356
unsigned int contentLen = 0;
354357
int rid;
355358
if( (createMode && !g.perm.NewWiki)
356359
|| (!createMode && !g.perm.WrWiki)){
357360
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -163,11 +163,12 @@
163 /*
164 ** Searches for the latest version of a wiki page with the given
165 ** name. If found it behaves like json_get_wiki_page_by_rid(theRid,
166 ** contentFormat), else it returns NULL.
167 */
168 cson_value * json_get_wiki_page_by_name(char const * zPageName, int contentFormat){
 
169 int rid;
170 rid = db_int(0,
171 "SELECT x.rid FROM tag t, tagxref x, blob b"
172 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q' "
173 " AND b.rid=x.rid"
@@ -259,11 +260,11 @@
259
260 zSymName = json_find_option_cstr("uuid",NULL,"u");
261
262 if((!zPageName||!*zPageName) && (!zSymName || !*zSymName)){
263 json_set_err(FSL_JSON_E_MISSING_ARGS,
264 "At least one of the 'name' or 'uuid' arguments must be provided.");
265 return NULL;
266 }
267
268 /* TODO: see if we have a page named zPageName. If not, try to resolve
269 zPageName as a UUID.
@@ -297,17 +298,17 @@
297 }else{
298 sContent = cson_value_get_string(g.json.reqPayload.v);
299 }
300 if(!sContent) {
301 json_set_err(FSL_JSON_E_MISSING_ARGS,
302 "The 'payload' property must be either a string containing the "
303 "Fossil wiki code to preview or an object with body + mimetype "
304 "properties.");
305 return NULL;
306 }
307 zContent = cson_string_cstr(sContent);
308 blob_append( &contentOrig, zContent, (int)cson_string_length_bytes(sContent) );
309 zMime = wiki_filter_mimetypes(zMime);
310 if( 0==fossil_strcmp(zMime, "text/x-markdown") ){
311 markdown_to_html(&contentOrig, 0, &contentHtml);
312 }else if( 0==fossil_strcmp(zMime, "text/plain") ){
313 blob_append(&contentHtml, "<pre class='textPlain'>", -1);
@@ -315,11 +316,12 @@
315 blob_append(&contentHtml, "</pre>", -1);
316 }else{
317 wiki_convert( &contentOrig, &contentHtml, 0 );
318 }
319 blob_reset( &contentOrig );
320 pay = cson_value_new_string( blob_str(&contentHtml), (unsigned int)blob_size(&contentHtml));
 
321 blob_reset( &contentHtml );
322 return pay;
323 }
324
325
@@ -346,11 +348,12 @@
346 cson_value * nameV; /* wiki page name */
347 char const * zPageName; /* cstr form of page name */
348 cson_value * contentV; /* passed-in content */
349 cson_value * emptyContent = NULL; /* placeholder for empty content. */
350 cson_value * payV = NULL; /* payload/return value */
351 cson_string const * jstr = NULL; /* temp for cson_value-to-cson_string conversions. */
 
352 char const * zMimeType = 0;
353 unsigned int contentLen = 0;
354 int rid;
355 if( (createMode && !g.perm.NewWiki)
356 || (!createMode && !g.perm.WrWiki)){
357
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -163,11 +163,12 @@
163 /*
164 ** Searches for the latest version of a wiki page with the given
165 ** name. If found it behaves like json_get_wiki_page_by_rid(theRid,
166 ** contentFormat), else it returns NULL.
167 */
168 cson_value * json_get_wiki_page_by_name(char const * zPageName,
169 int contentFormat){
170 int rid;
171 rid = db_int(0,
172 "SELECT x.rid FROM tag t, tagxref x, blob b"
173 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q' "
174 " AND b.rid=x.rid"
@@ -259,11 +260,11 @@
260
261 zSymName = json_find_option_cstr("uuid",NULL,"u");
262
263 if((!zPageName||!*zPageName) && (!zSymName || !*zSymName)){
264 json_set_err(FSL_JSON_E_MISSING_ARGS,
265 "At least one of the 'name' or 'uuid' arguments must be provided.");
266 return NULL;
267 }
268
269 /* TODO: see if we have a page named zPageName. If not, try to resolve
270 zPageName as a UUID.
@@ -297,17 +298,17 @@
298 }else{
299 sContent = cson_value_get_string(g.json.reqPayload.v);
300 }
301 if(!sContent) {
302 json_set_err(FSL_JSON_E_MISSING_ARGS,
303 "The 'payload' property must be either a string containing the "
304 "Fossil wiki code to preview or an object with body + mimetype "
305 "properties.");
306 return NULL;
307 }
308 zContent = cson_string_cstr(sContent);
309 blob_append( &contentOrig, zContent, (int)cson_string_length_bytes(sContent));
310 zMime = wiki_filter_mimetypes(zMime);
311 if( 0==fossil_strcmp(zMime, "text/x-markdown") ){
312 markdown_to_html(&contentOrig, 0, &contentHtml);
313 }else if( 0==fossil_strcmp(zMime, "text/plain") ){
314 blob_append(&contentHtml, "<pre class='textPlain'>", -1);
@@ -315,11 +316,12 @@
316 blob_append(&contentHtml, "</pre>", -1);
317 }else{
318 wiki_convert( &contentOrig, &contentHtml, 0 );
319 }
320 blob_reset( &contentOrig );
321 pay = cson_value_new_string( blob_str(&contentHtml),
322 (unsigned int)blob_size(&contentHtml));
323 blob_reset( &contentHtml );
324 return pay;
325 }
326
327
@@ -346,11 +348,12 @@
348 cson_value * nameV; /* wiki page name */
349 char const * zPageName; /* cstr form of page name */
350 cson_value * contentV; /* passed-in content */
351 cson_value * emptyContent = NULL; /* placeholder for empty content. */
352 cson_value * payV = NULL; /* payload/return value */
353 cson_string const * jstr = NULL; /* temp for cson_value-to-cson_string
354 conversions. */
355 char const * zMimeType = 0;
356 unsigned int contentLen = 0;
357 int rid;
358 if( (createMode && !g.perm.NewWiki)
359 || (!createMode && !g.perm.WrWiki)){
360
+11 -11
--- src/login.c
+++ src/login.c
@@ -254,11 +254,11 @@
254254
*pzUsername = fossil_strdup(zLogin);
255255
break;
256256
}
257257
}
258258
db_finalize(&q);
259
- }
259
+ }
260260
free(zSha1Pw);
261261
return uid;
262262
}
263263
264264
/*
@@ -775,11 +775,11 @@
775775
}
776776
@ <table class="login_out">
777777
if( P("HTTPS")==0 ){
778778
@ <tr><td class="form_label">Warning:</td>
779779
@ <td><span class='securityWarning'>
780
- @ Login information, including the password,
780
+ @ Login information, including the password,
781781
@ will be sent in the clear over an unencrypted connection.
782782
if( !g.sslNotAvailable ){
783783
@ Consider logging in at
784784
@ <a href='%s(g.zHttpsURL)'>%h(g.zHttpsURL)</a> instead.
785785
}
@@ -824,11 +824,11 @@
824824
@ </table>
825825
if( zAnonPw && !noAnon ){
826826
const char *zDecoded = captcha_decode(uSeed);
827827
int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
828828
char *zCaptcha = captcha_render(zDecoded);
829
-
829
+
830830
@ <p><input type="hidden" name="cs" value="%u(uSeed)">
831831
@ Visitors may enter <b>anonymous</b> as the user-ID with
832832
@ the 8-character hexadecimal password shown below:</p>
833833
@ <div class="captcha"><table class="captcha"><tr><td>\
834834
@ <pre class="captcha">
@@ -1029,11 +1029,11 @@
10291029
@ <p><span class="loginError">
10301030
@ This password-reset URL is invalid, probably because it has expired.
10311031
@ Password-reset URLs have a short lifespan.
10321032
@ </span></p>
10331033
style_finish_page();
1034
- sleep(1); /* Introduce a small delay on an invalid suffix as an
1034
+ sleep(1); /* Introduce a small delay on an invalid suffix as an
10351035
** extra defense against search attacks */
10361036
return;
10371037
}
10381038
fossil_redirect_to_https_if_needed(1);
10391039
login_set_uid(uid, 0);
@@ -1163,11 +1163,11 @@
11631163
if( rc==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){
11641164
db_unprotect(PROTECT_USER);
11651165
db_multi_exec(
11661166
"UPDATE user SET cookie=%Q, cexpire=%.17g"
11671167
" WHERE login=%Q",
1168
- zHash,
1168
+ zHash,
11691169
sqlite3_column_double(pStmt, 0), zLogin
11701170
);
11711171
db_protect_pop();
11721172
nXfer++;
11731173
}
@@ -1580,11 +1580,11 @@
15801580
p->ApndWiki = p->Hyperlink = p->Clone =
15811581
p->NewTkt = p->Password = p->RdAddr =
15821582
p->TktFmt = p->Attach = p->ApndTkt =
15831583
p->ModWiki = p->ModTkt =
15841584
p->RdForum = p->WrForum = p->ModForum =
1585
- p->WrTForum = p->AdminForum = p->Chat =
1585
+ p->WrTForum = p->AdminForum = p->Chat =
15861586
p->EmailAlert = p->Announce = p->Debug = 1;
15871587
/* Fall thru into Read/Write */
15881588
case 'i': p->Read = p->Write = 1; break;
15891589
case 'o': p->Read = 1; break;
15901590
case 'z': p->Zip = 1; break;
@@ -1827,11 +1827,11 @@
18271827
@ <input type="hidden" name="csrf" value="%s(g.zCsrfToken)">
18281828
}
18291829
18301830
/*
18311831
** Check to see if the candidate username zUserID is already used.
1832
-** Return 1 if it is already in use. Return 0 if the name is
1832
+** Return 1 if it is already in use. Return 0 if the name is
18331833
** available for a self-registeration.
18341834
*/
18351835
static int login_self_choosen_userid_already_exists(const char *zUserID){
18361836
int rc = db_exists(
18371837
"SELECT 1 FROM user WHERE login=%Q "
@@ -1849,11 +1849,11 @@
18491849
** address is assigned to a particular user return the UID for that user.
18501850
** If the email address is used, but not by a particular user, return -1.
18511851
*/
18521852
static int email_address_in_use(const char *zEMail){
18531853
int uid;
1854
- uid = db_int(0,
1854
+ uid = db_int(0,
18551855
"SELECT uid FROM user"
18561856
" WHERE info LIKE '%%<%q>%%'", zEMail);
18571857
if( uid>0 ){
18581858
if( db_exists("SELECT 1 FROM user WHERE uid=%d AND ("
18591859
" cap GLOB '*[as]*' OR"
@@ -1878,11 +1878,11 @@
18781878
}
18791879
18801880
/*
18811881
** COMMAND: test-email-used
18821882
** Usage: fossil test-email-used EMAIL ...
1883
-**
1883
+**
18841884
** Given a list of email addresses, show the UID and LOGIN associated
18851885
** with each one.
18861886
*/
18871887
void test_email_used(void){
18881888
int i;
@@ -1903,11 +1903,11 @@
19031903
fossil_print("%s: UID %d (%s)\n", zEMail, uid, zLogin);
19041904
fossil_free(zLogin);
19051905
}
19061906
}
19071907
}
1908
-
1908
+
19091909
19101910
/*
19111911
** Check an email address and confirm that it is valid for self-registration.
19121912
** The email address is known already to be well-formed. Return true
19131913
** if the email address is on the allowed list.
@@ -1995,11 +1995,11 @@
19951995
iErrLine = 1;
19961996
zErr = "User ID too short. Must be at least 6 characters.";
19971997
}else if( sqlite3_strglob("*[^-a-zA-Z0-9_.]*",zUserID)==0 ){
19981998
iErrLine = 1;
19991999
zErr = "User ID may not contain spaces or special characters.";
2000
- }else if( sqlite3_strlike("anonymous%", zUserID, 0)==0
2000
+ }else if( sqlite3_strlike("anonymous%", zUserID, 0)==0
20012001
|| sqlite3_strlike("nobody%", zUserID, 0)==0
20022002
|| sqlite3_strlike("reader%", zUserID, 0)==0
20032003
|| sqlite3_strlike("developer%", zUserID, 0)==0
20042004
){
20052005
iErrLine = 1;
20062006
--- src/login.c
+++ src/login.c
@@ -254,11 +254,11 @@
254 *pzUsername = fossil_strdup(zLogin);
255 break;
256 }
257 }
258 db_finalize(&q);
259 }
260 free(zSha1Pw);
261 return uid;
262 }
263
264 /*
@@ -775,11 +775,11 @@
775 }
776 @ <table class="login_out">
777 if( P("HTTPS")==0 ){
778 @ <tr><td class="form_label">Warning:</td>
779 @ <td><span class='securityWarning'>
780 @ Login information, including the password,
781 @ will be sent in the clear over an unencrypted connection.
782 if( !g.sslNotAvailable ){
783 @ Consider logging in at
784 @ <a href='%s(g.zHttpsURL)'>%h(g.zHttpsURL)</a> instead.
785 }
@@ -824,11 +824,11 @@
824 @ </table>
825 if( zAnonPw && !noAnon ){
826 const char *zDecoded = captcha_decode(uSeed);
827 int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
828 char *zCaptcha = captcha_render(zDecoded);
829
830 @ <p><input type="hidden" name="cs" value="%u(uSeed)">
831 @ Visitors may enter <b>anonymous</b> as the user-ID with
832 @ the 8-character hexadecimal password shown below:</p>
833 @ <div class="captcha"><table class="captcha"><tr><td>\
834 @ <pre class="captcha">
@@ -1029,11 +1029,11 @@
1029 @ <p><span class="loginError">
1030 @ This password-reset URL is invalid, probably because it has expired.
1031 @ Password-reset URLs have a short lifespan.
1032 @ </span></p>
1033 style_finish_page();
1034 sleep(1); /* Introduce a small delay on an invalid suffix as an
1035 ** extra defense against search attacks */
1036 return;
1037 }
1038 fossil_redirect_to_https_if_needed(1);
1039 login_set_uid(uid, 0);
@@ -1163,11 +1163,11 @@
1163 if( rc==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){
1164 db_unprotect(PROTECT_USER);
1165 db_multi_exec(
1166 "UPDATE user SET cookie=%Q, cexpire=%.17g"
1167 " WHERE login=%Q",
1168 zHash,
1169 sqlite3_column_double(pStmt, 0), zLogin
1170 );
1171 db_protect_pop();
1172 nXfer++;
1173 }
@@ -1580,11 +1580,11 @@
1580 p->ApndWiki = p->Hyperlink = p->Clone =
1581 p->NewTkt = p->Password = p->RdAddr =
1582 p->TktFmt = p->Attach = p->ApndTkt =
1583 p->ModWiki = p->ModTkt =
1584 p->RdForum = p->WrForum = p->ModForum =
1585 p->WrTForum = p->AdminForum = p->Chat =
1586 p->EmailAlert = p->Announce = p->Debug = 1;
1587 /* Fall thru into Read/Write */
1588 case 'i': p->Read = p->Write = 1; break;
1589 case 'o': p->Read = 1; break;
1590 case 'z': p->Zip = 1; break;
@@ -1827,11 +1827,11 @@
1827 @ <input type="hidden" name="csrf" value="%s(g.zCsrfToken)">
1828 }
1829
1830 /*
1831 ** Check to see if the candidate username zUserID is already used.
1832 ** Return 1 if it is already in use. Return 0 if the name is
1833 ** available for a self-registeration.
1834 */
1835 static int login_self_choosen_userid_already_exists(const char *zUserID){
1836 int rc = db_exists(
1837 "SELECT 1 FROM user WHERE login=%Q "
@@ -1849,11 +1849,11 @@
1849 ** address is assigned to a particular user return the UID for that user.
1850 ** If the email address is used, but not by a particular user, return -1.
1851 */
1852 static int email_address_in_use(const char *zEMail){
1853 int uid;
1854 uid = db_int(0,
1855 "SELECT uid FROM user"
1856 " WHERE info LIKE '%%<%q>%%'", zEMail);
1857 if( uid>0 ){
1858 if( db_exists("SELECT 1 FROM user WHERE uid=%d AND ("
1859 " cap GLOB '*[as]*' OR"
@@ -1878,11 +1878,11 @@
1878 }
1879
1880 /*
1881 ** COMMAND: test-email-used
1882 ** Usage: fossil test-email-used EMAIL ...
1883 **
1884 ** Given a list of email addresses, show the UID and LOGIN associated
1885 ** with each one.
1886 */
1887 void test_email_used(void){
1888 int i;
@@ -1903,11 +1903,11 @@
1903 fossil_print("%s: UID %d (%s)\n", zEMail, uid, zLogin);
1904 fossil_free(zLogin);
1905 }
1906 }
1907 }
1908
1909
1910 /*
1911 ** Check an email address and confirm that it is valid for self-registration.
1912 ** The email address is known already to be well-formed. Return true
1913 ** if the email address is on the allowed list.
@@ -1995,11 +1995,11 @@
1995 iErrLine = 1;
1996 zErr = "User ID too short. Must be at least 6 characters.";
1997 }else if( sqlite3_strglob("*[^-a-zA-Z0-9_.]*",zUserID)==0 ){
1998 iErrLine = 1;
1999 zErr = "User ID may not contain spaces or special characters.";
2000 }else if( sqlite3_strlike("anonymous%", zUserID, 0)==0
2001 || sqlite3_strlike("nobody%", zUserID, 0)==0
2002 || sqlite3_strlike("reader%", zUserID, 0)==0
2003 || sqlite3_strlike("developer%", zUserID, 0)==0
2004 ){
2005 iErrLine = 1;
2006
--- src/login.c
+++ src/login.c
@@ -254,11 +254,11 @@
254 *pzUsername = fossil_strdup(zLogin);
255 break;
256 }
257 }
258 db_finalize(&q);
259 }
260 free(zSha1Pw);
261 return uid;
262 }
263
264 /*
@@ -775,11 +775,11 @@
775 }
776 @ <table class="login_out">
777 if( P("HTTPS")==0 ){
778 @ <tr><td class="form_label">Warning:</td>
779 @ <td><span class='securityWarning'>
780 @ Login information, including the password,
781 @ will be sent in the clear over an unencrypted connection.
782 if( !g.sslNotAvailable ){
783 @ Consider logging in at
784 @ <a href='%s(g.zHttpsURL)'>%h(g.zHttpsURL)</a> instead.
785 }
@@ -824,11 +824,11 @@
824 @ </table>
825 if( zAnonPw && !noAnon ){
826 const char *zDecoded = captcha_decode(uSeed);
827 int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
828 char *zCaptcha = captcha_render(zDecoded);
829
830 @ <p><input type="hidden" name="cs" value="%u(uSeed)">
831 @ Visitors may enter <b>anonymous</b> as the user-ID with
832 @ the 8-character hexadecimal password shown below:</p>
833 @ <div class="captcha"><table class="captcha"><tr><td>\
834 @ <pre class="captcha">
@@ -1029,11 +1029,11 @@
1029 @ <p><span class="loginError">
1030 @ This password-reset URL is invalid, probably because it has expired.
1031 @ Password-reset URLs have a short lifespan.
1032 @ </span></p>
1033 style_finish_page();
1034 sleep(1); /* Introduce a small delay on an invalid suffix as an
1035 ** extra defense against search attacks */
1036 return;
1037 }
1038 fossil_redirect_to_https_if_needed(1);
1039 login_set_uid(uid, 0);
@@ -1163,11 +1163,11 @@
1163 if( rc==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){
1164 db_unprotect(PROTECT_USER);
1165 db_multi_exec(
1166 "UPDATE user SET cookie=%Q, cexpire=%.17g"
1167 " WHERE login=%Q",
1168 zHash,
1169 sqlite3_column_double(pStmt, 0), zLogin
1170 );
1171 db_protect_pop();
1172 nXfer++;
1173 }
@@ -1580,11 +1580,11 @@
1580 p->ApndWiki = p->Hyperlink = p->Clone =
1581 p->NewTkt = p->Password = p->RdAddr =
1582 p->TktFmt = p->Attach = p->ApndTkt =
1583 p->ModWiki = p->ModTkt =
1584 p->RdForum = p->WrForum = p->ModForum =
1585 p->WrTForum = p->AdminForum = p->Chat =
1586 p->EmailAlert = p->Announce = p->Debug = 1;
1587 /* Fall thru into Read/Write */
1588 case 'i': p->Read = p->Write = 1; break;
1589 case 'o': p->Read = 1; break;
1590 case 'z': p->Zip = 1; break;
@@ -1827,11 +1827,11 @@
1827 @ <input type="hidden" name="csrf" value="%s(g.zCsrfToken)">
1828 }
1829
1830 /*
1831 ** Check to see if the candidate username zUserID is already used.
1832 ** Return 1 if it is already in use. Return 0 if the name is
1833 ** available for a self-registeration.
1834 */
1835 static int login_self_choosen_userid_already_exists(const char *zUserID){
1836 int rc = db_exists(
1837 "SELECT 1 FROM user WHERE login=%Q "
@@ -1849,11 +1849,11 @@
1849 ** address is assigned to a particular user return the UID for that user.
1850 ** If the email address is used, but not by a particular user, return -1.
1851 */
1852 static int email_address_in_use(const char *zEMail){
1853 int uid;
1854 uid = db_int(0,
1855 "SELECT uid FROM user"
1856 " WHERE info LIKE '%%<%q>%%'", zEMail);
1857 if( uid>0 ){
1858 if( db_exists("SELECT 1 FROM user WHERE uid=%d AND ("
1859 " cap GLOB '*[as]*' OR"
@@ -1878,11 +1878,11 @@
1878 }
1879
1880 /*
1881 ** COMMAND: test-email-used
1882 ** Usage: fossil test-email-used EMAIL ...
1883 **
1884 ** Given a list of email addresses, show the UID and LOGIN associated
1885 ** with each one.
1886 */
1887 void test_email_used(void){
1888 int i;
@@ -1903,11 +1903,11 @@
1903 fossil_print("%s: UID %d (%s)\n", zEMail, uid, zLogin);
1904 fossil_free(zLogin);
1905 }
1906 }
1907 }
1908
1909
1910 /*
1911 ** Check an email address and confirm that it is valid for self-registration.
1912 ** The email address is known already to be well-formed. Return true
1913 ** if the email address is on the allowed list.
@@ -1995,11 +1995,11 @@
1995 iErrLine = 1;
1996 zErr = "User ID too short. Must be at least 6 characters.";
1997 }else if( sqlite3_strglob("*[^-a-zA-Z0-9_.]*",zUserID)==0 ){
1998 iErrLine = 1;
1999 zErr = "User ID may not contain spaces or special characters.";
2000 }else if( sqlite3_strlike("anonymous%", zUserID, 0)==0
2001 || sqlite3_strlike("nobody%", zUserID, 0)==0
2002 || sqlite3_strlike("reader%", zUserID, 0)==0
2003 || sqlite3_strlike("developer%", zUserID, 0)==0
2004 ){
2005 iErrLine = 1;
2006
+1 -1
--- src/lookslike.c
+++ src/lookslike.c
@@ -270,11 +270,11 @@
270270
int j, c, flags = LOOK_NONE; /* Assume UTF-16 text, prove otherwise */
271271
272272
if( n%sizeof(WCHAR_T) ){
273273
flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */
274274
}
275
- if( n<sizeof(WCHAR_T) ) return flags; /* Zero or One byte -> binary (UTF-8?) */
275
+ if( n<sizeof(WCHAR_T) ) return flags;/* Zero or One byte -> binary (UTF-8?) */
276276
c = *z;
277277
if( bReverse ){
278278
c = UTF16_SWAP(c);
279279
}
280280
if( c==0 ){
281281
--- src/lookslike.c
+++ src/lookslike.c
@@ -270,11 +270,11 @@
270 int j, c, flags = LOOK_NONE; /* Assume UTF-16 text, prove otherwise */
271
272 if( n%sizeof(WCHAR_T) ){
273 flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */
274 }
275 if( n<sizeof(WCHAR_T) ) return flags; /* Zero or One byte -> binary (UTF-8?) */
276 c = *z;
277 if( bReverse ){
278 c = UTF16_SWAP(c);
279 }
280 if( c==0 ){
281
--- src/lookslike.c
+++ src/lookslike.c
@@ -270,11 +270,11 @@
270 int j, c, flags = LOOK_NONE; /* Assume UTF-16 text, prove otherwise */
271
272 if( n%sizeof(WCHAR_T) ){
273 flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */
274 }
275 if( n<sizeof(WCHAR_T) ) return flags;/* Zero or One byte -> binary (UTF-8?) */
276 c = *z;
277 if( bReverse ){
278 c = UTF16_SWAP(c);
279 }
280 if( c==0 ){
281
+7 -7
--- src/main.c
+++ src/main.c
@@ -852,11 +852,11 @@
852852
zNewArgv[2] = g.argv[1];
853853
zNewArgv[3] = 0;
854854
g.argc = 3;
855855
g.argv = zNewArgv;
856856
#endif
857
- }
857
+ }
858858
zCmdName = g.argv[1];
859859
}
860860
#ifndef _WIN32
861861
/* There is a bug in stunnel4 in which it sometimes starts up client
862862
** processes without first opening file descriptor 2 (standard error).
@@ -1414,11 +1414,11 @@
14141414
i -= 4;
14151415
}
14161416
}else{
14171417
/* Remove trailing ":80" from the HOST */
14181418
if( i>3 && z[i-1]=='0' && z[i-2]=='8' && z[i-3]==':' ) i -= 3;
1419
- }
1419
+ }
14201420
if( i && z[i-1]=='.' ) i--;
14211421
z[i] = 0;
14221422
zCur = PD("SCRIPT_NAME","/");
14231423
i = strlen(zCur);
14241424
while( i>0 && zCur[i-1]=='/' ) i--;
@@ -1614,11 +1614,11 @@
16141614
return 1;
16151615
}
16161616
16171617
/*
16181618
** Redirect to the equivalent HTTPS request if the current connection is
1619
-** insecure and if the redirect-to-https flag greater than or equal to
1619
+** insecure and if the redirect-to-https flag greater than or equal to
16201620
** iLevel. iLevel is 1 for /login pages and 2 for every other page.
16211621
*/
16221622
int fossil_redirect_to_https_if_needed(int iLevel){
16231623
if( fossil_wants_https(iLevel) ){
16241624
const char *zQS = P("QUERY_STRING");
@@ -1969,11 +1969,11 @@
19691969
cgi_replace_parameter("PATH_INFO", zPathInfo);
19701970
cgi_replace_parameter("SCRIPT_NAME", zNewScript);
19711971
etag_cancel();
19721972
}
19731973
1974
- /* If the content type is application/x-fossil or
1974
+ /* If the content type is application/x-fossil or
19751975
** application/x-fossil-debug, then a sync/push/pull/clone is
19761976
** desired, so default the PATH_INFO to /xfer
19771977
*/
19781978
if( g.zContentType &&
19791979
strncmp(g.zContentType, "application/x-fossil", 20)==0 ){
@@ -2785,11 +2785,11 @@
27852785
** process exit
27862786
** --nojail Drop root privilege but do not enter the chroot jail
27872787
** --nossl Do not do http: to https: redirects, regardless of
27882788
** the redirect-to-https setting.
27892789
** --notfound URL Use URL as the "HTTP 404, object not found" page
2790
-** --out FILE Write the HTTP reply to FILE instead of to
2790
+** --out FILE Write the HTTP reply to FILE instead of to
27912791
** standard output
27922792
** --pkey FILE Read the private key used for TLS from FILE
27932793
** --repolist If REPOSITORY is directory, URL "/" lists all repos
27942794
** --scgi Interpret input as SCGI rather than HTTP
27952795
** --skin LABEL Use override skin LABEL. Use an empty string ("")
@@ -3175,11 +3175,11 @@
31753175
const char *zInitPage = 0; /* Start on this page. --page option */
31763176
int findServerArg = 2; /* argv index for find_server_repository() */
31773177
char *zRemote = 0; /* Remote host on which to run "fossil ui" */
31783178
const char *zJsMode; /* The --jsmode parameter */
31793179
const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
3180
-
3180
+
31813181
31823182
#if USE_SEE
31833183
db_setup_for_saved_encryption_key();
31843184
#endif
31853185
@@ -3347,11 +3347,11 @@
33473347
Blob ssh;
33483348
char zLine[1000];
33493349
blob_init(&ssh, 0, 0);
33503350
transport_ssh_command(&ssh);
33513351
db_close_config();
3352
- blob_appendf(&ssh,
3352
+ blob_appendf(&ssh,
33533353
" -t -L 127.0.0.1:%d:127.0.0.1:%d %!$",
33543354
iPort, iPort, zRemote
33553355
);
33563356
if( zFossilCmd==0 ){
33573357
blob_appendf(&ssh, " %$ fossil", "PATH=$HOME/bin:$PATH");
33583358
--- src/main.c
+++ src/main.c
@@ -852,11 +852,11 @@
852 zNewArgv[2] = g.argv[1];
853 zNewArgv[3] = 0;
854 g.argc = 3;
855 g.argv = zNewArgv;
856 #endif
857 }
858 zCmdName = g.argv[1];
859 }
860 #ifndef _WIN32
861 /* There is a bug in stunnel4 in which it sometimes starts up client
862 ** processes without first opening file descriptor 2 (standard error).
@@ -1414,11 +1414,11 @@
1414 i -= 4;
1415 }
1416 }else{
1417 /* Remove trailing ":80" from the HOST */
1418 if( i>3 && z[i-1]=='0' && z[i-2]=='8' && z[i-3]==':' ) i -= 3;
1419 }
1420 if( i && z[i-1]=='.' ) i--;
1421 z[i] = 0;
1422 zCur = PD("SCRIPT_NAME","/");
1423 i = strlen(zCur);
1424 while( i>0 && zCur[i-1]=='/' ) i--;
@@ -1614,11 +1614,11 @@
1614 return 1;
1615 }
1616
1617 /*
1618 ** Redirect to the equivalent HTTPS request if the current connection is
1619 ** insecure and if the redirect-to-https flag greater than or equal to
1620 ** iLevel. iLevel is 1 for /login pages and 2 for every other page.
1621 */
1622 int fossil_redirect_to_https_if_needed(int iLevel){
1623 if( fossil_wants_https(iLevel) ){
1624 const char *zQS = P("QUERY_STRING");
@@ -1969,11 +1969,11 @@
1969 cgi_replace_parameter("PATH_INFO", zPathInfo);
1970 cgi_replace_parameter("SCRIPT_NAME", zNewScript);
1971 etag_cancel();
1972 }
1973
1974 /* If the content type is application/x-fossil or
1975 ** application/x-fossil-debug, then a sync/push/pull/clone is
1976 ** desired, so default the PATH_INFO to /xfer
1977 */
1978 if( g.zContentType &&
1979 strncmp(g.zContentType, "application/x-fossil", 20)==0 ){
@@ -2785,11 +2785,11 @@
2785 ** process exit
2786 ** --nojail Drop root privilege but do not enter the chroot jail
2787 ** --nossl Do not do http: to https: redirects, regardless of
2788 ** the redirect-to-https setting.
2789 ** --notfound URL Use URL as the "HTTP 404, object not found" page
2790 ** --out FILE Write the HTTP reply to FILE instead of to
2791 ** standard output
2792 ** --pkey FILE Read the private key used for TLS from FILE
2793 ** --repolist If REPOSITORY is directory, URL "/" lists all repos
2794 ** --scgi Interpret input as SCGI rather than HTTP
2795 ** --skin LABEL Use override skin LABEL. Use an empty string ("")
@@ -3175,11 +3175,11 @@
3175 const char *zInitPage = 0; /* Start on this page. --page option */
3176 int findServerArg = 2; /* argv index for find_server_repository() */
3177 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
3178 const char *zJsMode; /* The --jsmode parameter */
3179 const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
3180
3181
3182 #if USE_SEE
3183 db_setup_for_saved_encryption_key();
3184 #endif
3185
@@ -3347,11 +3347,11 @@
3347 Blob ssh;
3348 char zLine[1000];
3349 blob_init(&ssh, 0, 0);
3350 transport_ssh_command(&ssh);
3351 db_close_config();
3352 blob_appendf(&ssh,
3353 " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$",
3354 iPort, iPort, zRemote
3355 );
3356 if( zFossilCmd==0 ){
3357 blob_appendf(&ssh, " %$ fossil", "PATH=$HOME/bin:$PATH");
3358
--- src/main.c
+++ src/main.c
@@ -852,11 +852,11 @@
852 zNewArgv[2] = g.argv[1];
853 zNewArgv[3] = 0;
854 g.argc = 3;
855 g.argv = zNewArgv;
856 #endif
857 }
858 zCmdName = g.argv[1];
859 }
860 #ifndef _WIN32
861 /* There is a bug in stunnel4 in which it sometimes starts up client
862 ** processes without first opening file descriptor 2 (standard error).
@@ -1414,11 +1414,11 @@
1414 i -= 4;
1415 }
1416 }else{
1417 /* Remove trailing ":80" from the HOST */
1418 if( i>3 && z[i-1]=='0' && z[i-2]=='8' && z[i-3]==':' ) i -= 3;
1419 }
1420 if( i && z[i-1]=='.' ) i--;
1421 z[i] = 0;
1422 zCur = PD("SCRIPT_NAME","/");
1423 i = strlen(zCur);
1424 while( i>0 && zCur[i-1]=='/' ) i--;
@@ -1614,11 +1614,11 @@
1614 return 1;
1615 }
1616
1617 /*
1618 ** Redirect to the equivalent HTTPS request if the current connection is
1619 ** insecure and if the redirect-to-https flag greater than or equal to
1620 ** iLevel. iLevel is 1 for /login pages and 2 for every other page.
1621 */
1622 int fossil_redirect_to_https_if_needed(int iLevel){
1623 if( fossil_wants_https(iLevel) ){
1624 const char *zQS = P("QUERY_STRING");
@@ -1969,11 +1969,11 @@
1969 cgi_replace_parameter("PATH_INFO", zPathInfo);
1970 cgi_replace_parameter("SCRIPT_NAME", zNewScript);
1971 etag_cancel();
1972 }
1973
1974 /* If the content type is application/x-fossil or
1975 ** application/x-fossil-debug, then a sync/push/pull/clone is
1976 ** desired, so default the PATH_INFO to /xfer
1977 */
1978 if( g.zContentType &&
1979 strncmp(g.zContentType, "application/x-fossil", 20)==0 ){
@@ -2785,11 +2785,11 @@
2785 ** process exit
2786 ** --nojail Drop root privilege but do not enter the chroot jail
2787 ** --nossl Do not do http: to https: redirects, regardless of
2788 ** the redirect-to-https setting.
2789 ** --notfound URL Use URL as the "HTTP 404, object not found" page
2790 ** --out FILE Write the HTTP reply to FILE instead of to
2791 ** standard output
2792 ** --pkey FILE Read the private key used for TLS from FILE
2793 ** --repolist If REPOSITORY is directory, URL "/" lists all repos
2794 ** --scgi Interpret input as SCGI rather than HTTP
2795 ** --skin LABEL Use override skin LABEL. Use an empty string ("")
@@ -3175,11 +3175,11 @@
3175 const char *zInitPage = 0; /* Start on this page. --page option */
3176 int findServerArg = 2; /* argv index for find_server_repository() */
3177 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
3178 const char *zJsMode; /* The --jsmode parameter */
3179 const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
3180
3181
3182 #if USE_SEE
3183 db_setup_for_saved_encryption_key();
3184 #endif
3185
@@ -3347,11 +3347,11 @@
3347 Blob ssh;
3348 char zLine[1000];
3349 blob_init(&ssh, 0, 0);
3350 transport_ssh_command(&ssh);
3351 db_close_config();
3352 blob_appendf(&ssh,
3353 " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$",
3354 iPort, iPort, zRemote
3355 );
3356 if( zFossilCmd==0 ){
3357 blob_appendf(&ssh, " %$ fossil", "PATH=$HOME/bin:$PATH");
3358
+3 -3
--- src/manifest.c
+++ src/manifest.c
@@ -1226,11 +1226,11 @@
12261226
*/
12271227
blob_init(&copy, 0, 0);
12281228
blob_init(&errmsg, 0, 0);
12291229
blob_append(&copy, zIn, nIn);
12301230
pManifest = manifest_parse(&copy, 0, &errmsg);
1231
- iRes = pManifest!=0;
1231
+ iRes = pManifest!=0;
12321232
manifest_destroy(pManifest);
12331233
blob_reset(&errmsg);
12341234
return iRes;
12351235
}
12361236
@@ -1338,11 +1338,11 @@
13381338
}else if( !isWF && p!=0 ){
13391339
fossil_print("%d ERROR: manifest_is_well_formed() reported false "
13401340
"but manifest_parse() found nothing wrong.\n", id);
13411341
nErr++;
13421342
}
1343
- }else{
1343
+ }else{
13441344
p = manifest_get(id, CFTYPE_ANY, &err);
13451345
if( p==0 ){
13461346
fossil_print("%d ERROR: %s\n", id, blob_str(&err));
13471347
nErr++;
13481348
}
@@ -2113,11 +2113,11 @@
21132113
void manifest_create_event_triggers(void){
21142114
if( manifest_event_triggers_are_enabled ){
21152115
return; /* Triggers already exists. No-op. */
21162116
}
21172117
alert_create_trigger();
2118
- manifest_event_triggers_are_enabled = 1;
2118
+ manifest_event_triggers_are_enabled = 1;
21192119
}
21202120
21212121
/*
21222122
** Disable manifest event triggers. Drop them if they exist, but mark
21232123
** them has having been created so that they won't be recreated. This
21242124
--- src/manifest.c
+++ src/manifest.c
@@ -1226,11 +1226,11 @@
1226 */
1227 blob_init(&copy, 0, 0);
1228 blob_init(&errmsg, 0, 0);
1229 blob_append(&copy, zIn, nIn);
1230 pManifest = manifest_parse(&copy, 0, &errmsg);
1231 iRes = pManifest!=0;
1232 manifest_destroy(pManifest);
1233 blob_reset(&errmsg);
1234 return iRes;
1235 }
1236
@@ -1338,11 +1338,11 @@
1338 }else if( !isWF && p!=0 ){
1339 fossil_print("%d ERROR: manifest_is_well_formed() reported false "
1340 "but manifest_parse() found nothing wrong.\n", id);
1341 nErr++;
1342 }
1343 }else{
1344 p = manifest_get(id, CFTYPE_ANY, &err);
1345 if( p==0 ){
1346 fossil_print("%d ERROR: %s\n", id, blob_str(&err));
1347 nErr++;
1348 }
@@ -2113,11 +2113,11 @@
2113 void manifest_create_event_triggers(void){
2114 if( manifest_event_triggers_are_enabled ){
2115 return; /* Triggers already exists. No-op. */
2116 }
2117 alert_create_trigger();
2118 manifest_event_triggers_are_enabled = 1;
2119 }
2120
2121 /*
2122 ** Disable manifest event triggers. Drop them if they exist, but mark
2123 ** them has having been created so that they won't be recreated. This
2124
--- src/manifest.c
+++ src/manifest.c
@@ -1226,11 +1226,11 @@
1226 */
1227 blob_init(&copy, 0, 0);
1228 blob_init(&errmsg, 0, 0);
1229 blob_append(&copy, zIn, nIn);
1230 pManifest = manifest_parse(&copy, 0, &errmsg);
1231 iRes = pManifest!=0;
1232 manifest_destroy(pManifest);
1233 blob_reset(&errmsg);
1234 return iRes;
1235 }
1236
@@ -1338,11 +1338,11 @@
1338 }else if( !isWF && p!=0 ){
1339 fossil_print("%d ERROR: manifest_is_well_formed() reported false "
1340 "but manifest_parse() found nothing wrong.\n", id);
1341 nErr++;
1342 }
1343 }else{
1344 p = manifest_get(id, CFTYPE_ANY, &err);
1345 if( p==0 ){
1346 fossil_print("%d ERROR: %s\n", id, blob_str(&err));
1347 nErr++;
1348 }
@@ -2113,11 +2113,11 @@
2113 void manifest_create_event_triggers(void){
2114 if( manifest_event_triggers_are_enabled ){
2115 return; /* Triggers already exists. No-op. */
2116 }
2117 alert_create_trigger();
2118 manifest_event_triggers_are_enabled = 1;
2119 }
2120
2121 /*
2122 ** Disable manifest event triggers. Drop them if they exist, but mark
2123 ** them has having been created so that they won't be recreated. This
2124
+4 -3
--- src/markdown.c
+++ src/markdown.c
@@ -64,11 +64,11 @@
6464
void *opaque);
6565
void (*table_cell)(struct Blob *ob, struct Blob *text, int flags,
6666
void *opaque);
6767
void (*table_row)(struct Blob *ob, struct Blob *cells, int flags,
6868
void *opaque);
69
- void (*footnote_item)(struct Blob *ob, const struct Blob *text,
69
+ void (*footnote_item)(struct Blob *ob, const struct Blob *text,
7070
int index, int nUsed, void *opaque);
7171
7272
/* span level callbacks - NULL or return 0 prints the span verbatim */
7373
int (*autolink)(struct Blob *ob, struct Blob *link,
7474
enum mkd_autolink type, void *opaque);
@@ -382,11 +382,12 @@
382382
/* release the given working buffer back to the cache */
383383
static void release_work_buffer(struct render *rndr, struct Blob *buf){
384384
if( !buf ) return;
385385
rndr->iDepth--;
386386
blob_reset(buf);
387
- if( rndr->nBlobCache < (int)(sizeof(rndr->aBlobCache)/sizeof(rndr->aBlobCache[0])) ){
387
+ if( rndr->nBlobCache <
388
+ (int)(sizeof(rndr->aBlobCache)/sizeof(rndr->aBlobCache[0])) ){
388389
rndr->aBlobCache[rndr->nBlobCache++] = buf;
389390
}else{
390391
fossil_free(buf);
391392
}
392393
}
@@ -2370,11 +2371,11 @@
23702371
beg += parse_list(ob, rndr, txt_data, end, 0);
23712372
}else if( prefix_oli(txt_data, end) ){
23722373
beg += parse_list(ob, rndr, txt_data, end, MKD_LIST_ORDERED);
23732374
}else if( has_table && is_tableline(txt_data, end) ){
23742375
beg += parse_table(ob, rndr, txt_data, end);
2375
- }else if( prefix_fencedcode(txt_data, end)
2376
+ }else if( prefix_fencedcode(txt_data, end)
23762377
&& (i = char_codespan(ob, rndr, txt_data, 0, end))!=0
23772378
){
23782379
beg += i;
23792380
}else{
23802381
beg += parse_paragraph(ob, rndr, txt_data, end);
23812382
--- src/markdown.c
+++ src/markdown.c
@@ -64,11 +64,11 @@
64 void *opaque);
65 void (*table_cell)(struct Blob *ob, struct Blob *text, int flags,
66 void *opaque);
67 void (*table_row)(struct Blob *ob, struct Blob *cells, int flags,
68 void *opaque);
69 void (*footnote_item)(struct Blob *ob, const struct Blob *text,
70 int index, int nUsed, void *opaque);
71
72 /* span level callbacks - NULL or return 0 prints the span verbatim */
73 int (*autolink)(struct Blob *ob, struct Blob *link,
74 enum mkd_autolink type, void *opaque);
@@ -382,11 +382,12 @@
382 /* release the given working buffer back to the cache */
383 static void release_work_buffer(struct render *rndr, struct Blob *buf){
384 if( !buf ) return;
385 rndr->iDepth--;
386 blob_reset(buf);
387 if( rndr->nBlobCache < (int)(sizeof(rndr->aBlobCache)/sizeof(rndr->aBlobCache[0])) ){
 
388 rndr->aBlobCache[rndr->nBlobCache++] = buf;
389 }else{
390 fossil_free(buf);
391 }
392 }
@@ -2370,11 +2371,11 @@
2370 beg += parse_list(ob, rndr, txt_data, end, 0);
2371 }else if( prefix_oli(txt_data, end) ){
2372 beg += parse_list(ob, rndr, txt_data, end, MKD_LIST_ORDERED);
2373 }else if( has_table && is_tableline(txt_data, end) ){
2374 beg += parse_table(ob, rndr, txt_data, end);
2375 }else if( prefix_fencedcode(txt_data, end)
2376 && (i = char_codespan(ob, rndr, txt_data, 0, end))!=0
2377 ){
2378 beg += i;
2379 }else{
2380 beg += parse_paragraph(ob, rndr, txt_data, end);
2381
--- src/markdown.c
+++ src/markdown.c
@@ -64,11 +64,11 @@
64 void *opaque);
65 void (*table_cell)(struct Blob *ob, struct Blob *text, int flags,
66 void *opaque);
67 void (*table_row)(struct Blob *ob, struct Blob *cells, int flags,
68 void *opaque);
69 void (*footnote_item)(struct Blob *ob, const struct Blob *text,
70 int index, int nUsed, void *opaque);
71
72 /* span level callbacks - NULL or return 0 prints the span verbatim */
73 int (*autolink)(struct Blob *ob, struct Blob *link,
74 enum mkd_autolink type, void *opaque);
@@ -382,11 +382,12 @@
382 /* release the given working buffer back to the cache */
383 static void release_work_buffer(struct render *rndr, struct Blob *buf){
384 if( !buf ) return;
385 rndr->iDepth--;
386 blob_reset(buf);
387 if( rndr->nBlobCache <
388 (int)(sizeof(rndr->aBlobCache)/sizeof(rndr->aBlobCache[0])) ){
389 rndr->aBlobCache[rndr->nBlobCache++] = buf;
390 }else{
391 fossil_free(buf);
392 }
393 }
@@ -2370,11 +2371,11 @@
2371 beg += parse_list(ob, rndr, txt_data, end, 0);
2372 }else if( prefix_oli(txt_data, end) ){
2373 beg += parse_list(ob, rndr, txt_data, end, MKD_LIST_ORDERED);
2374 }else if( has_table && is_tableline(txt_data, end) ){
2375 beg += parse_table(ob, rndr, txt_data, end);
2376 }else if( prefix_fencedcode(txt_data, end)
2377 && (i = char_codespan(ob, rndr, txt_data, 0, end))!=0
2378 ){
2379 beg += i;
2380 }else{
2381 beg += parse_paragraph(ob, rndr, txt_data, end);
2382
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -780,12 +780,12 @@
780780
char *zTitle = title!=0 && blob_size(title)>0 ? blob_str(title) : 0;
781781
char zClose[20];
782782
783783
if( zLink==0 || zLink[0]==0 ){
784784
zClose[0] = 0;
785
- }else{
786
- static const int flags =
785
+ }else{
786
+ static const int flags =
787787
WIKI_NOBADLINKS |
788788
WIKI_MARKDOWNLINKS
789789
;
790790
wiki_resolve_hyperlink(ob, flags, zLink, zClose, sizeof(zClose), 0, zTitle);
791791
}
792792
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -780,12 +780,12 @@
780 char *zTitle = title!=0 && blob_size(title)>0 ? blob_str(title) : 0;
781 char zClose[20];
782
783 if( zLink==0 || zLink[0]==0 ){
784 zClose[0] = 0;
785 }else{
786 static const int flags =
787 WIKI_NOBADLINKS |
788 WIKI_MARKDOWNLINKS
789 ;
790 wiki_resolve_hyperlink(ob, flags, zLink, zClose, sizeof(zClose), 0, zTitle);
791 }
792
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -780,12 +780,12 @@
780 char *zTitle = title!=0 && blob_size(title)>0 ? blob_str(title) : 0;
781 char zClose[20];
782
783 if( zLink==0 || zLink[0]==0 ){
784 zClose[0] = 0;
785 }else{
786 static const int flags =
787 WIKI_NOBADLINKS |
788 WIKI_MARKDOWNLINKS
789 ;
790 wiki_resolve_hyperlink(ob, flags, zLink, zClose, sizeof(zClose), 0, zTitle);
791 }
792
+2 -2
--- src/merge.c
+++ src/merge.c
@@ -268,11 +268,11 @@
268268
if( g.argc!=2 ){
269269
fossil_fatal("unknown arguments to the %s command\n", g.argv[1]);
270270
}
271271
verify_all_options();
272272
db_must_be_within_tree();
273
- debug_show_vfile();
273
+ debug_show_vfile();
274274
}
275275
276276
277277
/*
278278
** COMMAND: merge
@@ -375,11 +375,11 @@
375375
**
376376
** When included on the command-line, --debug causes lots of state
377377
** information to be displayed. This option is undocumented as it
378378
** might change or be eliminated in future releases.
379379
**
380
- ** The --show-vfile flag does a dump of the VFILE table for reference.
380
+ ** The --show-vfile flag does a dump of the VFILE table for reference.
381381
**
382382
** Hints:
383383
** * Combine --debug and --verbose for still more output.
384384
** * The --dry-run option is also useful in combination with --debug.
385385
*/
386386
--- src/merge.c
+++ src/merge.c
@@ -268,11 +268,11 @@
268 if( g.argc!=2 ){
269 fossil_fatal("unknown arguments to the %s command\n", g.argv[1]);
270 }
271 verify_all_options();
272 db_must_be_within_tree();
273 debug_show_vfile();
274 }
275
276
277 /*
278 ** COMMAND: merge
@@ -375,11 +375,11 @@
375 **
376 ** When included on the command-line, --debug causes lots of state
377 ** information to be displayed. This option is undocumented as it
378 ** might change or be eliminated in future releases.
379 **
380 ** The --show-vfile flag does a dump of the VFILE table for reference.
381 **
382 ** Hints:
383 ** * Combine --debug and --verbose for still more output.
384 ** * The --dry-run option is also useful in combination with --debug.
385 */
386
--- src/merge.c
+++ src/merge.c
@@ -268,11 +268,11 @@
268 if( g.argc!=2 ){
269 fossil_fatal("unknown arguments to the %s command\n", g.argv[1]);
270 }
271 verify_all_options();
272 db_must_be_within_tree();
273 debug_show_vfile();
274 }
275
276
277 /*
278 ** COMMAND: merge
@@ -375,11 +375,11 @@
375 **
376 ** When included on the command-line, --debug causes lots of state
377 ** information to be displayed. This option is undocumented as it
378 ** might change or be eliminated in future releases.
379 **
380 ** The --show-vfile flag does a dump of the VFILE table for reference.
381 **
382 ** Hints:
383 ** * Combine --debug and --verbose for still more output.
384 ** * The --dry-run option is also useful in combination with --debug.
385 */
386
+1 -1
--- src/merge3.c
+++ src/merge3.c
@@ -211,11 +211,11 @@
211211
int useCrLf = 0;
212212
int ln1, ln2, lnPivot; /* Line numbers for all files */
213213
DiffConfig DCfg;
214214
215215
blob_zero(pOut); /* Merge results stored in pOut */
216
-
216
+
217217
/* If both pV1 and pV2 start with a UTF-8 byte-order-mark (BOM),
218218
** keep it in the output. This should be secure enough not to cause
219219
** unintended changes to the merged file and consistent with what
220220
** users are using in their source files.
221221
*/
222222
--- src/merge3.c
+++ src/merge3.c
@@ -211,11 +211,11 @@
211 int useCrLf = 0;
212 int ln1, ln2, lnPivot; /* Line numbers for all files */
213 DiffConfig DCfg;
214
215 blob_zero(pOut); /* Merge results stored in pOut */
216
217 /* If both pV1 and pV2 start with a UTF-8 byte-order-mark (BOM),
218 ** keep it in the output. This should be secure enough not to cause
219 ** unintended changes to the merged file and consistent with what
220 ** users are using in their source files.
221 */
222
--- src/merge3.c
+++ src/merge3.c
@@ -211,11 +211,11 @@
211 int useCrLf = 0;
212 int ln1, ln2, lnPivot; /* Line numbers for all files */
213 DiffConfig DCfg;
214
215 blob_zero(pOut); /* Merge results stored in pOut */
216
217 /* If both pV1 and pV2 start with a UTF-8 byte-order-mark (BOM),
218 ** keep it in the output. This should be secure enough not to cause
219 ** unintended changes to the merged file and consistent with what
220 ** users are using in their source files.
221 */
222
+4 -4
--- src/name.c
+++ src/name.c
@@ -513,22 +513,22 @@
513513
514514
/* start:BR -> The first check-in on branch named BR */
515515
if( strncmp(zTag, "start:", 6)==0 ){
516516
rid = symbolic_name_to_rid(zTag+6, zType);
517517
return start_of_branch(rid, 1);
518
- }
519
-
518
+ }
519
+
520520
/* merge-in:BR -> Most recent merge-in for the branch named BR */
521521
if( strncmp(zTag, "merge-in:", 9)==0 ){
522522
rid = symbolic_name_to_rid(zTag+9, zType);
523523
return start_of_branch(rid, 2);
524524
}
525525
526526
/* symbolic-name ":" date-time */
527527
nTag = strlen(zTag);
528528
for(i=0; i<nTag-8 && zTag[i]!=':'; i++){}
529
- if( zTag[i]==':'
529
+ if( zTag[i]==':'
530530
&& (fossil_isdate(&zTag[i+1]) || fossil_expand_datetime(&zTag[i+1],0)!=0)
531531
){
532532
char *zDate = mprintf("%s", &zTag[i+1]);
533533
char *zTagBase = mprintf("%.*s", i, zTag);
534534
char *zXDate;
@@ -1087,11 +1087,11 @@
10871087
" WHERE mlink.fid=%d"
10881088
" AND filename.fnid=mlink.fnid"
10891089
" AND event.objid=mlink.mid"
10901090
" AND blob.rid=mlink.mid"
10911091
" ORDER BY event.mtime %s /*sort*/",
1092
- rid,
1092
+ rid,
10931093
(flags & WHATIS_BRIEF) ? "LIMIT 1" : "DESC");
10941094
while( db_step(&q)==SQLITE_ROW ){
10951095
if( flags & WHATIS_BRIEF ){
10961096
fossil_print("mtime: %s\n", db_column_text(&q,2));
10971097
}
10981098
--- src/name.c
+++ src/name.c
@@ -513,22 +513,22 @@
513
514 /* start:BR -> The first check-in on branch named BR */
515 if( strncmp(zTag, "start:", 6)==0 ){
516 rid = symbolic_name_to_rid(zTag+6, zType);
517 return start_of_branch(rid, 1);
518 }
519
520 /* merge-in:BR -> Most recent merge-in for the branch named BR */
521 if( strncmp(zTag, "merge-in:", 9)==0 ){
522 rid = symbolic_name_to_rid(zTag+9, zType);
523 return start_of_branch(rid, 2);
524 }
525
526 /* symbolic-name ":" date-time */
527 nTag = strlen(zTag);
528 for(i=0; i<nTag-8 && zTag[i]!=':'; i++){}
529 if( zTag[i]==':'
530 && (fossil_isdate(&zTag[i+1]) || fossil_expand_datetime(&zTag[i+1],0)!=0)
531 ){
532 char *zDate = mprintf("%s", &zTag[i+1]);
533 char *zTagBase = mprintf("%.*s", i, zTag);
534 char *zXDate;
@@ -1087,11 +1087,11 @@
1087 " WHERE mlink.fid=%d"
1088 " AND filename.fnid=mlink.fnid"
1089 " AND event.objid=mlink.mid"
1090 " AND blob.rid=mlink.mid"
1091 " ORDER BY event.mtime %s /*sort*/",
1092 rid,
1093 (flags & WHATIS_BRIEF) ? "LIMIT 1" : "DESC");
1094 while( db_step(&q)==SQLITE_ROW ){
1095 if( flags & WHATIS_BRIEF ){
1096 fossil_print("mtime: %s\n", db_column_text(&q,2));
1097 }
1098
--- src/name.c
+++ src/name.c
@@ -513,22 +513,22 @@
513
514 /* start:BR -> The first check-in on branch named BR */
515 if( strncmp(zTag, "start:", 6)==0 ){
516 rid = symbolic_name_to_rid(zTag+6, zType);
517 return start_of_branch(rid, 1);
518 }
519
520 /* merge-in:BR -> Most recent merge-in for the branch named BR */
521 if( strncmp(zTag, "merge-in:", 9)==0 ){
522 rid = symbolic_name_to_rid(zTag+9, zType);
523 return start_of_branch(rid, 2);
524 }
525
526 /* symbolic-name ":" date-time */
527 nTag = strlen(zTag);
528 for(i=0; i<nTag-8 && zTag[i]!=':'; i++){}
529 if( zTag[i]==':'
530 && (fossil_isdate(&zTag[i+1]) || fossil_expand_datetime(&zTag[i+1],0)!=0)
531 ){
532 char *zDate = mprintf("%s", &zTag[i+1]);
533 char *zTagBase = mprintf("%.*s", i, zTag);
534 char *zXDate;
@@ -1087,11 +1087,11 @@
1087 " WHERE mlink.fid=%d"
1088 " AND filename.fnid=mlink.fnid"
1089 " AND event.objid=mlink.mid"
1090 " AND blob.rid=mlink.mid"
1091 " ORDER BY event.mtime %s /*sort*/",
1092 rid,
1093 (flags & WHATIS_BRIEF) ? "LIMIT 1" : "DESC");
1094 while( db_step(&q)==SQLITE_ROW ){
1095 if( flags & WHATIS_BRIEF ){
1096 fossil_print("mtime: %s\n", db_column_text(&q,2));
1097 }
1098
+13 -13
--- src/patch.c
+++ src/patch.c
@@ -71,11 +71,11 @@
7171
/*
7272
** mkdelta(X,Y)
7373
**
7474
** X is an numeric artifact id. Y is a filename.
7575
**
76
-** Compute a compressed delta that carries X into Y. Or return
76
+** Compute a compressed delta that carries X into Y. Or return
7777
** and zero-length blob if X is equal to Y.
7878
*/
7979
static void mkdeltaFunc(
8080
sqlite3_context *context,
8181
int argc,
@@ -162,11 +162,11 @@
162162
" pathname TEXT,\n" /* Filename */
163163
" origname TEXT,\n" /* Name before rename. NULL if not renamed */
164164
" hash TEXT,\n" /* Baseline hash. NULL for new files. */
165165
" isexe BOOL,\n" /* True if executable */
166166
" islink BOOL,\n" /* True if is a symbolic link */
167
- " delta BLOB\n" /* compressed delta. NULL if deleted.
167
+ " delta BLOB\n" /* compressed delta. NULL if deleted.
168168
** length 0 if unchanged */
169169
");"
170170
"CREATE TABLE patch.cfg(\n"
171171
" key TEXT,\n"
172172
" value ANY\n"
@@ -196,11 +196,11 @@
196196
if( z ){
197197
db_multi_exec(
198198
"INSERT INTO patch.cfg(key,value)VALUES('hostname',%Q)", z);
199199
fossil_free(z);
200200
}
201
-
201
+
202202
/* New files */
203203
db_multi_exec(
204204
"INSERT INTO patch.chng(pathname,hash,isexe,islink,delta)"
205205
" SELECT pathname, NULL, isexe, islink,"
206206
" compress(read_co_file(%Q||pathname))"
@@ -249,11 +249,11 @@
249249
#ifdef _WIN32
250250
fflush(out);
251251
_setmode(_fileno(out), _O_BINARY);
252252
#endif
253253
fwrite(pData, sz, 1, out);
254
- sqlite3_free(pData);
254
+ sqlite3_free(pData);
255255
fflush(out);
256256
}
257257
}
258258
259259
/*
@@ -301,11 +301,11 @@
301301
/*
302302
** Show a summary of the content of a patch on standard output
303303
*/
304304
void patch_view(unsigned mFlags){
305305
Stmt q;
306
- db_prepare(&q,
306
+ db_prepare(&q,
307307
"WITH nmap(nkey,nm) AS (VALUES"
308308
"('baseline','BASELINE'),"
309309
"('project-name','PROJECT-NAME'))"
310310
"SELECT nm, value FROM nmap, patch.cfg WHERE nkey=key;"
311311
);
@@ -312,11 +312,11 @@
312312
while( db_step(&q)==SQLITE_ROW ){
313313
fossil_print("%-12s %s\n", db_column_text(&q,0), db_column_text(&q,1));
314314
}
315315
db_finalize(&q);
316316
if( mFlags & PATCH_VERBOSE ){
317
- db_prepare(&q,
317
+ db_prepare(&q,
318318
"WITH nmap(nkey,nm,isDate) AS (VALUES"
319319
"('project-code','PROJECT-CODE',0),"
320320
"('date','TIMESTAMP',1),"
321321
"('user','USER',0),"
322322
"('hostname','HOSTNAME',0),"
@@ -433,11 +433,11 @@
433433
blob_appendf(&cmd, " merge %s\n", db_column_text(&q,1));
434434
}else{
435435
blob_appendf(&cmd, " merge --%s %s\n", zType, db_column_text(&q,1));
436436
}
437437
if( mFlags & PATCH_VERBOSE ){
438
- fossil_print("%-10s %s\n", db_column_text(&q,2),
438
+ fossil_print("%-10s %s\n", db_column_text(&q,2),
439439
db_column_text(&q,0));
440440
}
441441
}
442442
db_finalize(&q);
443443
if( mFlags & PATCH_DRYRUN ){
@@ -561,11 +561,11 @@
561561
blob_appendf(&cmd, " add %$\n", zPathname);
562562
if( mFlags & PATCH_VERBOSE ){
563563
fossil_print("%-10s %s\n", "NEW", zPathname);
564564
}
565565
}
566
- if( (mFlags & PATCH_DRYRUN)==0 ){
566
+ if( (mFlags & PATCH_DRYRUN)==0 ){
567567
if( isLink ){
568568
symlink_create(blob_str(&data), zPathname);
569569
}else{
570570
blob_write_to_file(&data, zPathname);
571571
}
@@ -697,11 +697,11 @@
697697
blob_init(&remote, 0, 0);
698698
if( zFossilCmd==0 ){
699699
blob_append_escaped_arg(&cmd, "PATH=$HOME/bin:$PATH", 0);
700700
zFossilCmd = "fossil";
701701
}
702
- blob_appendf(&remote, "%$ patch %s%s --dir64 %z -",
702
+ blob_appendf(&remote, "%$ patch %s%s --dir64 %z -",
703703
zFossilCmd, zRemoteCmd, zForce, encode64(zDir, -1));
704704
blob_append_escaped_arg(&cmd, blob_str(&remote), 0);
705705
blob_reset(&remote);
706706
}
707707
fossil_print("%s\n", blob_str(&cmd));
@@ -777,11 +777,11 @@
777777
);
778778
while( db_step(&q)==SQLITE_ROW ){
779779
int rid;
780780
const char *zName;
781781
Blob a, b;
782
-
782
+
783783
if( db_column_type(&q,0)!=SQLITE_INTEGER
784784
&& db_column_type(&q,4)==SQLITE_TEXT
785785
){
786786
char *zUuid = fossil_strdup(db_column_text(&q,4));
787787
char *zName = fossil_strdup(db_column_text(&q,1));
@@ -899,11 +899,11 @@
899899
**
900900
** -f|--force Apply the patch even though there are unsaved
901901
** changes in the current check-out. Unsaved
902902
** changes will be reverted and then the patch is
903903
** applied.
904
-** --fossilcmd EXE Name of the "fossil" executable on the remote
904
+** --fossilcmd EXE Name of the "fossil" executable on the remote
905905
** -n|--dry-run Do nothing, but print what would have happened
906906
** -v|--verbose Extra output explaining what happens
907907
**
908908
**
909909
** > fossil patch pull REMOTE-CHECKOUT
@@ -976,11 +976,11 @@
976976
if( find_option("dry-run","n",0) ) flags |= PATCH_DRYRUN;
977977
if( find_option("verbose","v",0) ) flags |= PATCH_VERBOSE;
978978
if( find_option("force","f",0) ) flags |= PATCH_FORCE;
979979
db_must_be_within_tree();
980980
verify_all_options();
981
- pIn = patch_remote_command(flags & (~PATCH_FORCE),
981
+ pIn = patch_remote_command(flags & (~PATCH_FORCE),
982982
"pull", "create", zFossilCmd, "r");
983983
if( pIn ){
984984
patch_attach(0, pIn);
985985
pclose(pIn);
986986
patch_apply(flags);
@@ -1014,7 +1014,7 @@
10141014
patch_attach(zIn, stdin);
10151015
patch_view(flags);
10161016
}else
10171017
{
10181018
goto patch_usage;
1019
- }
1019
+ }
10201020
}
10211021
--- src/patch.c
+++ src/patch.c
@@ -71,11 +71,11 @@
71 /*
72 ** mkdelta(X,Y)
73 **
74 ** X is an numeric artifact id. Y is a filename.
75 **
76 ** Compute a compressed delta that carries X into Y. Or return
77 ** and zero-length blob if X is equal to Y.
78 */
79 static void mkdeltaFunc(
80 sqlite3_context *context,
81 int argc,
@@ -162,11 +162,11 @@
162 " pathname TEXT,\n" /* Filename */
163 " origname TEXT,\n" /* Name before rename. NULL if not renamed */
164 " hash TEXT,\n" /* Baseline hash. NULL for new files. */
165 " isexe BOOL,\n" /* True if executable */
166 " islink BOOL,\n" /* True if is a symbolic link */
167 " delta BLOB\n" /* compressed delta. NULL if deleted.
168 ** length 0 if unchanged */
169 ");"
170 "CREATE TABLE patch.cfg(\n"
171 " key TEXT,\n"
172 " value ANY\n"
@@ -196,11 +196,11 @@
196 if( z ){
197 db_multi_exec(
198 "INSERT INTO patch.cfg(key,value)VALUES('hostname',%Q)", z);
199 fossil_free(z);
200 }
201
202 /* New files */
203 db_multi_exec(
204 "INSERT INTO patch.chng(pathname,hash,isexe,islink,delta)"
205 " SELECT pathname, NULL, isexe, islink,"
206 " compress(read_co_file(%Q||pathname))"
@@ -249,11 +249,11 @@
249 #ifdef _WIN32
250 fflush(out);
251 _setmode(_fileno(out), _O_BINARY);
252 #endif
253 fwrite(pData, sz, 1, out);
254 sqlite3_free(pData);
255 fflush(out);
256 }
257 }
258
259 /*
@@ -301,11 +301,11 @@
301 /*
302 ** Show a summary of the content of a patch on standard output
303 */
304 void patch_view(unsigned mFlags){
305 Stmt q;
306 db_prepare(&q,
307 "WITH nmap(nkey,nm) AS (VALUES"
308 "('baseline','BASELINE'),"
309 "('project-name','PROJECT-NAME'))"
310 "SELECT nm, value FROM nmap, patch.cfg WHERE nkey=key;"
311 );
@@ -312,11 +312,11 @@
312 while( db_step(&q)==SQLITE_ROW ){
313 fossil_print("%-12s %s\n", db_column_text(&q,0), db_column_text(&q,1));
314 }
315 db_finalize(&q);
316 if( mFlags & PATCH_VERBOSE ){
317 db_prepare(&q,
318 "WITH nmap(nkey,nm,isDate) AS (VALUES"
319 "('project-code','PROJECT-CODE',0),"
320 "('date','TIMESTAMP',1),"
321 "('user','USER',0),"
322 "('hostname','HOSTNAME',0),"
@@ -433,11 +433,11 @@
433 blob_appendf(&cmd, " merge %s\n", db_column_text(&q,1));
434 }else{
435 blob_appendf(&cmd, " merge --%s %s\n", zType, db_column_text(&q,1));
436 }
437 if( mFlags & PATCH_VERBOSE ){
438 fossil_print("%-10s %s\n", db_column_text(&q,2),
439 db_column_text(&q,0));
440 }
441 }
442 db_finalize(&q);
443 if( mFlags & PATCH_DRYRUN ){
@@ -561,11 +561,11 @@
561 blob_appendf(&cmd, " add %$\n", zPathname);
562 if( mFlags & PATCH_VERBOSE ){
563 fossil_print("%-10s %s\n", "NEW", zPathname);
564 }
565 }
566 if( (mFlags & PATCH_DRYRUN)==0 ){
567 if( isLink ){
568 symlink_create(blob_str(&data), zPathname);
569 }else{
570 blob_write_to_file(&data, zPathname);
571 }
@@ -697,11 +697,11 @@
697 blob_init(&remote, 0, 0);
698 if( zFossilCmd==0 ){
699 blob_append_escaped_arg(&cmd, "PATH=$HOME/bin:$PATH", 0);
700 zFossilCmd = "fossil";
701 }
702 blob_appendf(&remote, "%$ patch %s%s --dir64 %z -",
703 zFossilCmd, zRemoteCmd, zForce, encode64(zDir, -1));
704 blob_append_escaped_arg(&cmd, blob_str(&remote), 0);
705 blob_reset(&remote);
706 }
707 fossil_print("%s\n", blob_str(&cmd));
@@ -777,11 +777,11 @@
777 );
778 while( db_step(&q)==SQLITE_ROW ){
779 int rid;
780 const char *zName;
781 Blob a, b;
782
783 if( db_column_type(&q,0)!=SQLITE_INTEGER
784 && db_column_type(&q,4)==SQLITE_TEXT
785 ){
786 char *zUuid = fossil_strdup(db_column_text(&q,4));
787 char *zName = fossil_strdup(db_column_text(&q,1));
@@ -899,11 +899,11 @@
899 **
900 ** -f|--force Apply the patch even though there are unsaved
901 ** changes in the current check-out. Unsaved
902 ** changes will be reverted and then the patch is
903 ** applied.
904 ** --fossilcmd EXE Name of the "fossil" executable on the remote
905 ** -n|--dry-run Do nothing, but print what would have happened
906 ** -v|--verbose Extra output explaining what happens
907 **
908 **
909 ** > fossil patch pull REMOTE-CHECKOUT
@@ -976,11 +976,11 @@
976 if( find_option("dry-run","n",0) ) flags |= PATCH_DRYRUN;
977 if( find_option("verbose","v",0) ) flags |= PATCH_VERBOSE;
978 if( find_option("force","f",0) ) flags |= PATCH_FORCE;
979 db_must_be_within_tree();
980 verify_all_options();
981 pIn = patch_remote_command(flags & (~PATCH_FORCE),
982 "pull", "create", zFossilCmd, "r");
983 if( pIn ){
984 patch_attach(0, pIn);
985 pclose(pIn);
986 patch_apply(flags);
@@ -1014,7 +1014,7 @@
1014 patch_attach(zIn, stdin);
1015 patch_view(flags);
1016 }else
1017 {
1018 goto patch_usage;
1019 }
1020 }
1021
--- src/patch.c
+++ src/patch.c
@@ -71,11 +71,11 @@
71 /*
72 ** mkdelta(X,Y)
73 **
74 ** X is an numeric artifact id. Y is a filename.
75 **
76 ** Compute a compressed delta that carries X into Y. Or return
77 ** and zero-length blob if X is equal to Y.
78 */
79 static void mkdeltaFunc(
80 sqlite3_context *context,
81 int argc,
@@ -162,11 +162,11 @@
162 " pathname TEXT,\n" /* Filename */
163 " origname TEXT,\n" /* Name before rename. NULL if not renamed */
164 " hash TEXT,\n" /* Baseline hash. NULL for new files. */
165 " isexe BOOL,\n" /* True if executable */
166 " islink BOOL,\n" /* True if is a symbolic link */
167 " delta BLOB\n" /* compressed delta. NULL if deleted.
168 ** length 0 if unchanged */
169 ");"
170 "CREATE TABLE patch.cfg(\n"
171 " key TEXT,\n"
172 " value ANY\n"
@@ -196,11 +196,11 @@
196 if( z ){
197 db_multi_exec(
198 "INSERT INTO patch.cfg(key,value)VALUES('hostname',%Q)", z);
199 fossil_free(z);
200 }
201
202 /* New files */
203 db_multi_exec(
204 "INSERT INTO patch.chng(pathname,hash,isexe,islink,delta)"
205 " SELECT pathname, NULL, isexe, islink,"
206 " compress(read_co_file(%Q||pathname))"
@@ -249,11 +249,11 @@
249 #ifdef _WIN32
250 fflush(out);
251 _setmode(_fileno(out), _O_BINARY);
252 #endif
253 fwrite(pData, sz, 1, out);
254 sqlite3_free(pData);
255 fflush(out);
256 }
257 }
258
259 /*
@@ -301,11 +301,11 @@
301 /*
302 ** Show a summary of the content of a patch on standard output
303 */
304 void patch_view(unsigned mFlags){
305 Stmt q;
306 db_prepare(&q,
307 "WITH nmap(nkey,nm) AS (VALUES"
308 "('baseline','BASELINE'),"
309 "('project-name','PROJECT-NAME'))"
310 "SELECT nm, value FROM nmap, patch.cfg WHERE nkey=key;"
311 );
@@ -312,11 +312,11 @@
312 while( db_step(&q)==SQLITE_ROW ){
313 fossil_print("%-12s %s\n", db_column_text(&q,0), db_column_text(&q,1));
314 }
315 db_finalize(&q);
316 if( mFlags & PATCH_VERBOSE ){
317 db_prepare(&q,
318 "WITH nmap(nkey,nm,isDate) AS (VALUES"
319 "('project-code','PROJECT-CODE',0),"
320 "('date','TIMESTAMP',1),"
321 "('user','USER',0),"
322 "('hostname','HOSTNAME',0),"
@@ -433,11 +433,11 @@
433 blob_appendf(&cmd, " merge %s\n", db_column_text(&q,1));
434 }else{
435 blob_appendf(&cmd, " merge --%s %s\n", zType, db_column_text(&q,1));
436 }
437 if( mFlags & PATCH_VERBOSE ){
438 fossil_print("%-10s %s\n", db_column_text(&q,2),
439 db_column_text(&q,0));
440 }
441 }
442 db_finalize(&q);
443 if( mFlags & PATCH_DRYRUN ){
@@ -561,11 +561,11 @@
561 blob_appendf(&cmd, " add %$\n", zPathname);
562 if( mFlags & PATCH_VERBOSE ){
563 fossil_print("%-10s %s\n", "NEW", zPathname);
564 }
565 }
566 if( (mFlags & PATCH_DRYRUN)==0 ){
567 if( isLink ){
568 symlink_create(blob_str(&data), zPathname);
569 }else{
570 blob_write_to_file(&data, zPathname);
571 }
@@ -697,11 +697,11 @@
697 blob_init(&remote, 0, 0);
698 if( zFossilCmd==0 ){
699 blob_append_escaped_arg(&cmd, "PATH=$HOME/bin:$PATH", 0);
700 zFossilCmd = "fossil";
701 }
702 blob_appendf(&remote, "%$ patch %s%s --dir64 %z -",
703 zFossilCmd, zRemoteCmd, zForce, encode64(zDir, -1));
704 blob_append_escaped_arg(&cmd, blob_str(&remote), 0);
705 blob_reset(&remote);
706 }
707 fossil_print("%s\n", blob_str(&cmd));
@@ -777,11 +777,11 @@
777 );
778 while( db_step(&q)==SQLITE_ROW ){
779 int rid;
780 const char *zName;
781 Blob a, b;
782
783 if( db_column_type(&q,0)!=SQLITE_INTEGER
784 && db_column_type(&q,4)==SQLITE_TEXT
785 ){
786 char *zUuid = fossil_strdup(db_column_text(&q,4));
787 char *zName = fossil_strdup(db_column_text(&q,1));
@@ -899,11 +899,11 @@
899 **
900 ** -f|--force Apply the patch even though there are unsaved
901 ** changes in the current check-out. Unsaved
902 ** changes will be reverted and then the patch is
903 ** applied.
904 ** --fossilcmd EXE Name of the "fossil" executable on the remote
905 ** -n|--dry-run Do nothing, but print what would have happened
906 ** -v|--verbose Extra output explaining what happens
907 **
908 **
909 ** > fossil patch pull REMOTE-CHECKOUT
@@ -976,11 +976,11 @@
976 if( find_option("dry-run","n",0) ) flags |= PATCH_DRYRUN;
977 if( find_option("verbose","v",0) ) flags |= PATCH_VERBOSE;
978 if( find_option("force","f",0) ) flags |= PATCH_FORCE;
979 db_must_be_within_tree();
980 verify_all_options();
981 pIn = patch_remote_command(flags & (~PATCH_FORCE),
982 "pull", "create", zFossilCmd, "r");
983 if( pIn ){
984 patch_attach(0, pIn);
985 pclose(pIn);
986 patch_apply(flags);
@@ -1014,7 +1014,7 @@
1014 patch_attach(zIn, stdin);
1015 patch_view(flags);
1016 }else
1017 {
1018 goto patch_usage;
1019 }
1020 }
1021
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -135,11 +135,11 @@
135135
}
136136
if(!(PIKCHR_PROCESS_TH1 & pikFlags)
137137
/* If any TH1_xxx flags are set, set TH1 */
138138
&& (PIKCHR_PROCESS_TH1_NOSVG & pikFlags || thFlags!=0)){
139139
pikFlags |= PIKCHR_PROCESS_TH1;
140
- }
140
+ }
141141
if(zNonce){
142142
blob_appendf(pOut, "%s\n", zNonce);
143143
}
144144
if(PIKCHR_PROCESS_TH1 & pikFlags){
145145
Blob out = empty_blob;
@@ -546,11 +546,11 @@
546546
** CSS to hide the SVG and reveal the source by default.
547547
**
548548
** -src Store the input pikchr's source code in the output as
549549
** a separate element adjacent to the SVG one. Implied
550550
** by -div-source.
551
-**
551
+**
552552
**
553553
** -th Process the input using TH1 before passing it to pikchr
554554
**
555555
** -th-novar Disable $var and $<var> TH1 processing. Use this if the
556556
** pikchr script uses '$' for its own purposes and that
557557
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -135,11 +135,11 @@
135 }
136 if(!(PIKCHR_PROCESS_TH1 & pikFlags)
137 /* If any TH1_xxx flags are set, set TH1 */
138 && (PIKCHR_PROCESS_TH1_NOSVG & pikFlags || thFlags!=0)){
139 pikFlags |= PIKCHR_PROCESS_TH1;
140 }
141 if(zNonce){
142 blob_appendf(pOut, "%s\n", zNonce);
143 }
144 if(PIKCHR_PROCESS_TH1 & pikFlags){
145 Blob out = empty_blob;
@@ -546,11 +546,11 @@
546 ** CSS to hide the SVG and reveal the source by default.
547 **
548 ** -src Store the input pikchr's source code in the output as
549 ** a separate element adjacent to the SVG one. Implied
550 ** by -div-source.
551 **
552 **
553 ** -th Process the input using TH1 before passing it to pikchr
554 **
555 ** -th-novar Disable $var and $<var> TH1 processing. Use this if the
556 ** pikchr script uses '$' for its own purposes and that
557
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -135,11 +135,11 @@
135 }
136 if(!(PIKCHR_PROCESS_TH1 & pikFlags)
137 /* If any TH1_xxx flags are set, set TH1 */
138 && (PIKCHR_PROCESS_TH1_NOSVG & pikFlags || thFlags!=0)){
139 pikFlags |= PIKCHR_PROCESS_TH1;
140 }
141 if(zNonce){
142 blob_appendf(pOut, "%s\n", zNonce);
143 }
144 if(PIKCHR_PROCESS_TH1 & pikFlags){
145 Blob out = empty_blob;
@@ -546,11 +546,11 @@
546 ** CSS to hide the SVG and reveal the source by default.
547 **
548 ** -src Store the input pikchr's source code in the output as
549 ** a separate element adjacent to the SVG one. Implied
550 ** by -div-source.
551 **
552 **
553 ** -th Process the input using TH1 before passing it to pikchr
554 **
555 ** -th-novar Disable $var and $<var> TH1 processing. Use this if the
556 ** pikchr script uses '$' for its own purposes and that
557
+3 -2
--- src/rebuild.c
+++ src/rebuild.c
@@ -661,11 +661,11 @@
661661
** --force Force the rebuild to complete even if errors are seen
662662
** --ifneeded Only do the rebuild if it would change the schema version
663663
** --index Always add in the full-text search index
664664
** --noverify Skip the verification of changes to the BLOB table
665665
** --noindex Always omit the full-text search index
666
-** --pagesize N Set the database pagesize to N. (512..65536 and power of 2)
666
+** --pagesize N Set the database pagesize to N (512..65536, power of 2)
667667
** --quiet Only show output if there are errors
668668
** --stats Show artifact statistics after rebuilding
669669
** --vacuum Run VACUUM on the database after rebuilding
670670
** --wal Set Write-Ahead-Log journalling mode on the database
671671
*/
@@ -1395,11 +1395,12 @@
13951395
13961396
db_end_transaction(0);
13971397
fossil_print("project-id: %s\n", db_get("project-code", 0));
13981398
fossil_print("server-id: %s\n", db_get("server-code", 0));
13991399
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
1400
- fossil_print("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword);
1400
+ fossil_print("admin-user: %s (initial password is \"%s\")\n", g.zLogin,
1401
+ zPassword);
14011402
hash_user_password(g.zLogin);
14021403
}
14031404
14041405
/*
14051406
** COMMAND: deconstruct*
14061407
--- src/rebuild.c
+++ src/rebuild.c
@@ -661,11 +661,11 @@
661 ** --force Force the rebuild to complete even if errors are seen
662 ** --ifneeded Only do the rebuild if it would change the schema version
663 ** --index Always add in the full-text search index
664 ** --noverify Skip the verification of changes to the BLOB table
665 ** --noindex Always omit the full-text search index
666 ** --pagesize N Set the database pagesize to N. (512..65536 and power of 2)
667 ** --quiet Only show output if there are errors
668 ** --stats Show artifact statistics after rebuilding
669 ** --vacuum Run VACUUM on the database after rebuilding
670 ** --wal Set Write-Ahead-Log journalling mode on the database
671 */
@@ -1395,11 +1395,12 @@
1395
1396 db_end_transaction(0);
1397 fossil_print("project-id: %s\n", db_get("project-code", 0));
1398 fossil_print("server-id: %s\n", db_get("server-code", 0));
1399 zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
1400 fossil_print("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword);
 
1401 hash_user_password(g.zLogin);
1402 }
1403
1404 /*
1405 ** COMMAND: deconstruct*
1406
--- src/rebuild.c
+++ src/rebuild.c
@@ -661,11 +661,11 @@
661 ** --force Force the rebuild to complete even if errors are seen
662 ** --ifneeded Only do the rebuild if it would change the schema version
663 ** --index Always add in the full-text search index
664 ** --noverify Skip the verification of changes to the BLOB table
665 ** --noindex Always omit the full-text search index
666 ** --pagesize N Set the database pagesize to N (512..65536, power of 2)
667 ** --quiet Only show output if there are errors
668 ** --stats Show artifact statistics after rebuilding
669 ** --vacuum Run VACUUM on the database after rebuilding
670 ** --wal Set Write-Ahead-Log journalling mode on the database
671 */
@@ -1395,11 +1395,12 @@
1395
1396 db_end_transaction(0);
1397 fossil_print("project-id: %s\n", db_get("project-code", 0));
1398 fossil_print("server-id: %s\n", db_get("server-code", 0));
1399 zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
1400 fossil_print("admin-user: %s (initial password is \"%s\")\n", g.zLogin,
1401 zPassword);
1402 hash_user_password(g.zLogin);
1403 }
1404
1405 /*
1406 ** COMMAND: deconstruct*
1407
+3 -2
--- src/report.c
+++ src/report.c
@@ -1126,11 +1126,11 @@
11261126
char *zMimetype;
11271127
int tabs;
11281128
Stmt q;
11291129
char *zErr1 = 0;
11301130
char *zErr2 = 0;
1131
-
1131
+
11321132
login_check_credentials();
11331133
if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; }
11341134
report_update_reportfmt_table();
11351135
rn = report_number();
11361136
tabs = P("tablist")!=0;
@@ -1368,11 +1368,12 @@
13681368
char *zErr1 = 0;
13691369
char *zErr2 = 0;
13701370
int count = 0;
13711371
int rn;
13721372
1373
- if( !zRep || !strcmp(zRep,zFullTicketRptRn) || !strcmp(zRep,zFullTicketRptTitle) ){
1373
+ if( !zRep || !strcmp(zRep,zFullTicketRptRn)
1374
+ || !strcmp(zRep,zFullTicketRptTitle) ){
13741375
zSql = "SELECT * FROM ticket";
13751376
}else{
13761377
rn = atoi(zRep);
13771378
if( rn ){
13781379
db_prepare(&q,
13791380
--- src/report.c
+++ src/report.c
@@ -1126,11 +1126,11 @@
1126 char *zMimetype;
1127 int tabs;
1128 Stmt q;
1129 char *zErr1 = 0;
1130 char *zErr2 = 0;
1131
1132 login_check_credentials();
1133 if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; }
1134 report_update_reportfmt_table();
1135 rn = report_number();
1136 tabs = P("tablist")!=0;
@@ -1368,11 +1368,12 @@
1368 char *zErr1 = 0;
1369 char *zErr2 = 0;
1370 int count = 0;
1371 int rn;
1372
1373 if( !zRep || !strcmp(zRep,zFullTicketRptRn) || !strcmp(zRep,zFullTicketRptTitle) ){
 
1374 zSql = "SELECT * FROM ticket";
1375 }else{
1376 rn = atoi(zRep);
1377 if( rn ){
1378 db_prepare(&q,
1379
--- src/report.c
+++ src/report.c
@@ -1126,11 +1126,11 @@
1126 char *zMimetype;
1127 int tabs;
1128 Stmt q;
1129 char *zErr1 = 0;
1130 char *zErr2 = 0;
1131
1132 login_check_credentials();
1133 if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; }
1134 report_update_reportfmt_table();
1135 rn = report_number();
1136 tabs = P("tablist")!=0;
@@ -1368,11 +1368,12 @@
1368 char *zErr1 = 0;
1369 char *zErr2 = 0;
1370 int count = 0;
1371 int rn;
1372
1373 if( !zRep || !strcmp(zRep,zFullTicketRptRn)
1374 || !strcmp(zRep,zFullTicketRptTitle) ){
1375 zSql = "SELECT * FROM ticket";
1376 }else{
1377 rn = atoi(zRep);
1378 if( rn ){
1379 db_prepare(&q,
1380
+9 -7
--- src/rss.c
+++ src/rss.c
@@ -143,12 +143,12 @@
143143
144144
cgi_set_content_type("application/rss+xml");
145145
146146
zProjectName = db_get("project-name", 0);
147147
if( zProjectName==0 ){
148
- zFreeProjectName = zProjectName = mprintf("Fossil source repository for: %s",
149
- g.zBaseURL);
148
+ zFreeProjectName = zProjectName =
149
+ mprintf("Fossil source repository for: %s", g.zBaseURL);
150150
}
151151
zProjectDescr = db_get("project-description", 0);
152152
if( zProjectDescr==0 ){
153153
zProjectDescr = zProjectName;
154154
}
@@ -258,11 +258,11 @@
258258
void cmd_timeline_rss(void){
259259
Stmt q;
260260
int nLine=0;
261261
char *zPubDate, *zProjectName, *zProjectDescr, *zFreeProjectName=0;
262262
Blob bSQL;
263
- const char *zType = find_option("type","y",1); /* Type of events. All if NULL */
263
+ const char *zType = find_option("type","y",1); /* Type of events;All if NULL*/
264264
const char *zTicketUuid = find_option("tkt",NULL,1);
265265
const char *zTag = find_option("tag",NULL,1);
266266
const char *zFilename = find_option("name",NULL,1);
267267
const char *zWiki = find_option("wiki",NULL,1);
268268
const char *zLimit = find_option("limit", "n",1);
@@ -332,31 +332,33 @@
332332
" WHERE tagid=%d AND tagtype>0 AND rid=blob.rid))", nTagId);
333333
}
334334
335335
if( zFilename ){
336336
blob_append_sql(&bSQL,
337
- " AND (SELECT mlink.fnid FROM mlink WHERE event.objid=mlink.mid) IN (SELECT fnid FROM filename WHERE name=%Q %s)",
337
+ " AND (SELECT mlink.fnid FROM mlink WHERE event.objid=mlink.mid) "
338
+ " IN (SELECT fnid FROM filename WHERE name=%Q %s)",
338339
zFilename, filename_collation()
339340
);
340341
}
341342
342343
blob_append( &bSQL, " ORDER BY event.mtime DESC", -1 );
343344
344345
zProjectName = db_get("project-name", 0);
345346
if( zProjectName==0 ){
346
- zFreeProjectName = zProjectName = mprintf("Fossil source repository for: %s",
347
- zBaseURL);
347
+ zFreeProjectName = zProjectName =
348
+ mprintf("Fossil source repository for: %s", zBaseURL);
348349
}
349350
zProjectDescr = db_get("project-description", 0);
350351
if( zProjectDescr==0 ){
351352
zProjectDescr = zProjectName;
352353
}
353354
354355
zPubDate = cgi_rfc822_datestamp(time(NULL));
355356
356357
fossil_print("<?xml version=\"1.0\"?>");
357
- fossil_print("<rss xmlns:dc=\"http://purl.org/dc/elements/1.1/\" version=\"2.0\">");
358
+ fossil_print("<rss xmlns:dc=\"http://purl.org/dc/elements/1.1/\" "
359
+ " version=\"2.0\">");
358360
fossil_print("<channel>\n");
359361
fossil_print("<title>%h</title>\n", zProjectName);
360362
fossil_print("<link>%s</link>\n", zBaseURL);
361363
fossil_print("<description>%h</description>\n", zProjectDescr);
362364
fossil_print("<pubDate>%s</pubDate>\n", zPubDate);
363365
--- src/rss.c
+++ src/rss.c
@@ -143,12 +143,12 @@
143
144 cgi_set_content_type("application/rss+xml");
145
146 zProjectName = db_get("project-name", 0);
147 if( zProjectName==0 ){
148 zFreeProjectName = zProjectName = mprintf("Fossil source repository for: %s",
149 g.zBaseURL);
150 }
151 zProjectDescr = db_get("project-description", 0);
152 if( zProjectDescr==0 ){
153 zProjectDescr = zProjectName;
154 }
@@ -258,11 +258,11 @@
258 void cmd_timeline_rss(void){
259 Stmt q;
260 int nLine=0;
261 char *zPubDate, *zProjectName, *zProjectDescr, *zFreeProjectName=0;
262 Blob bSQL;
263 const char *zType = find_option("type","y",1); /* Type of events. All if NULL */
264 const char *zTicketUuid = find_option("tkt",NULL,1);
265 const char *zTag = find_option("tag",NULL,1);
266 const char *zFilename = find_option("name",NULL,1);
267 const char *zWiki = find_option("wiki",NULL,1);
268 const char *zLimit = find_option("limit", "n",1);
@@ -332,31 +332,33 @@
332 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid))", nTagId);
333 }
334
335 if( zFilename ){
336 blob_append_sql(&bSQL,
337 " AND (SELECT mlink.fnid FROM mlink WHERE event.objid=mlink.mid) IN (SELECT fnid FROM filename WHERE name=%Q %s)",
 
338 zFilename, filename_collation()
339 );
340 }
341
342 blob_append( &bSQL, " ORDER BY event.mtime DESC", -1 );
343
344 zProjectName = db_get("project-name", 0);
345 if( zProjectName==0 ){
346 zFreeProjectName = zProjectName = mprintf("Fossil source repository for: %s",
347 zBaseURL);
348 }
349 zProjectDescr = db_get("project-description", 0);
350 if( zProjectDescr==0 ){
351 zProjectDescr = zProjectName;
352 }
353
354 zPubDate = cgi_rfc822_datestamp(time(NULL));
355
356 fossil_print("<?xml version=\"1.0\"?>");
357 fossil_print("<rss xmlns:dc=\"http://purl.org/dc/elements/1.1/\" version=\"2.0\">");
 
358 fossil_print("<channel>\n");
359 fossil_print("<title>%h</title>\n", zProjectName);
360 fossil_print("<link>%s</link>\n", zBaseURL);
361 fossil_print("<description>%h</description>\n", zProjectDescr);
362 fossil_print("<pubDate>%s</pubDate>\n", zPubDate);
363
--- src/rss.c
+++ src/rss.c
@@ -143,12 +143,12 @@
143
144 cgi_set_content_type("application/rss+xml");
145
146 zProjectName = db_get("project-name", 0);
147 if( zProjectName==0 ){
148 zFreeProjectName = zProjectName =
149 mprintf("Fossil source repository for: %s", g.zBaseURL);
150 }
151 zProjectDescr = db_get("project-description", 0);
152 if( zProjectDescr==0 ){
153 zProjectDescr = zProjectName;
154 }
@@ -258,11 +258,11 @@
258 void cmd_timeline_rss(void){
259 Stmt q;
260 int nLine=0;
261 char *zPubDate, *zProjectName, *zProjectDescr, *zFreeProjectName=0;
262 Blob bSQL;
263 const char *zType = find_option("type","y",1); /* Type of events;All if NULL*/
264 const char *zTicketUuid = find_option("tkt",NULL,1);
265 const char *zTag = find_option("tag",NULL,1);
266 const char *zFilename = find_option("name",NULL,1);
267 const char *zWiki = find_option("wiki",NULL,1);
268 const char *zLimit = find_option("limit", "n",1);
@@ -332,31 +332,33 @@
332 " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid))", nTagId);
333 }
334
335 if( zFilename ){
336 blob_append_sql(&bSQL,
337 " AND (SELECT mlink.fnid FROM mlink WHERE event.objid=mlink.mid) "
338 " IN (SELECT fnid FROM filename WHERE name=%Q %s)",
339 zFilename, filename_collation()
340 );
341 }
342
343 blob_append( &bSQL, " ORDER BY event.mtime DESC", -1 );
344
345 zProjectName = db_get("project-name", 0);
346 if( zProjectName==0 ){
347 zFreeProjectName = zProjectName =
348 mprintf("Fossil source repository for: %s", zBaseURL);
349 }
350 zProjectDescr = db_get("project-description", 0);
351 if( zProjectDescr==0 ){
352 zProjectDescr = zProjectName;
353 }
354
355 zPubDate = cgi_rfc822_datestamp(time(NULL));
356
357 fossil_print("<?xml version=\"1.0\"?>");
358 fossil_print("<rss xmlns:dc=\"http://purl.org/dc/elements/1.1/\" "
359 " version=\"2.0\">");
360 fossil_print("<channel>\n");
361 fossil_print("<title>%h</title>\n", zProjectName);
362 fossil_print("<link>%s</link>\n", zBaseURL);
363 fossil_print("<description>%h</description>\n", zProjectDescr);
364 fossil_print("<pubDate>%s</pubDate>\n", zPubDate);
365
+2 -2
--- src/search.c
+++ src/search.c
@@ -696,11 +696,11 @@
696696
}else{
697697
/* Legacy timeline search (the default) */
698698
(void)search_init(blob_str(&pattern),"*","*","...",SRCHFLG_STATIC);
699699
blob_reset(&pattern);
700700
search_sql_setup(g.db);
701
-
701
+
702702
db_multi_exec(
703703
"CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
704704
"CREATE INDEX srch_idx1 ON srch(x);"
705705
"INSERT INTO srch(rid,uuid,date,comment,x)"
706706
" SELECT blob.rid, uuid, datetime(event.mtime,toLocal()),"
@@ -2380,11 +2380,11 @@
23802380
}
23812381
23822382
23832383
/*
23842384
** Argument f should be a flag accepted by matchinfo() (a valid character
2385
-** in the string passed as the second argument). If it is not, -1 is
2385
+** in the string passed as the second argument). If it is not, -1 is
23862386
** returned. Otherwise, if f is a valid matchinfo flag, the value returned
23872387
** is the number of 32-bit integers added to the output array if the
23882388
** table has nCol columns and the query nPhrase phrases.
23892389
*/
23902390
static int fts5MatchinfoFlagsize(int nCol, int nPhrase, char f){
23912391
--- src/search.c
+++ src/search.c
@@ -696,11 +696,11 @@
696 }else{
697 /* Legacy timeline search (the default) */
698 (void)search_init(blob_str(&pattern),"*","*","...",SRCHFLG_STATIC);
699 blob_reset(&pattern);
700 search_sql_setup(g.db);
701
702 db_multi_exec(
703 "CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
704 "CREATE INDEX srch_idx1 ON srch(x);"
705 "INSERT INTO srch(rid,uuid,date,comment,x)"
706 " SELECT blob.rid, uuid, datetime(event.mtime,toLocal()),"
@@ -2380,11 +2380,11 @@
2380 }
2381
2382
2383 /*
2384 ** Argument f should be a flag accepted by matchinfo() (a valid character
2385 ** in the string passed as the second argument). If it is not, -1 is
2386 ** returned. Otherwise, if f is a valid matchinfo flag, the value returned
2387 ** is the number of 32-bit integers added to the output array if the
2388 ** table has nCol columns and the query nPhrase phrases.
2389 */
2390 static int fts5MatchinfoFlagsize(int nCol, int nPhrase, char f){
2391
--- src/search.c
+++ src/search.c
@@ -696,11 +696,11 @@
696 }else{
697 /* Legacy timeline search (the default) */
698 (void)search_init(blob_str(&pattern),"*","*","...",SRCHFLG_STATIC);
699 blob_reset(&pattern);
700 search_sql_setup(g.db);
701
702 db_multi_exec(
703 "CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
704 "CREATE INDEX srch_idx1 ON srch(x);"
705 "INSERT INTO srch(rid,uuid,date,comment,x)"
706 " SELECT blob.rid, uuid, datetime(event.mtime,toLocal()),"
@@ -2380,11 +2380,11 @@
2380 }
2381
2382
2383 /*
2384 ** Argument f should be a flag accepted by matchinfo() (a valid character
2385 ** in the string passed as the second argument). If it is not, -1 is
2386 ** returned. Otherwise, if f is a valid matchinfo flag, the value returned
2387 ** is the number of 32-bit integers added to the output array if the
2388 ** table has nCol columns and the query nPhrase phrases.
2389 */
2390 static int fts5MatchinfoFlagsize(int nCol, int nPhrase, char f){
2391
--- src/security_audit.c
+++ src/security_audit.c
@@ -336,11 +336,11 @@
336336
/* Anonymous users probably should not be allowed act as moderators
337337
** for wiki or tickets.
338338
*/
339339
if( hasAnyCap(zAnonCap, "lq5") ){
340340
@ <li><p><b>WARNING:</b>
341
- @ Anonymous users can act as moderators for wiki, tickets, or
341
+ @ Anonymous users can act as moderators for wiki, tickets, or
342342
@ forum posts. This defeats the whole purpose of moderation.
343343
@ Fix this by removing the "Mod-Wiki", "Mod-Tkt", and "Mod-Forum"
344344
@ privileges (<a href="%R/setup_ucap_list">capabilities</a> "fq5")
345345
@ from users "anonymous" and "nobody"
346346
@ on the <a href="setup_ulist">User Configuration</a> page.
@@ -353,11 +353,11 @@
353353
@ <li><p><b>WARNING:</b>
354354
@ TH1 scripts might be configured to run on any sync, push, pull, or
355355
@ clone operation. See the the <a href="%R/xfersetup">/xfersetup</a>
356356
@ page for more information. These TH1 scripts are a potential
357357
@ security concern and so should be carefully audited by a human.
358
- }
358
+ }
359359
360360
/* The strict-manifest-syntax setting should be on. */
361361
if( db_get_boolean("strict-manifest-syntax",1)==0 ){
362362
@ <li><p><b>WARNING:</b>
363363
@ The "strict-manifest-syntax" flag is off. This is a security
@@ -582,11 +582,11 @@
582582
if( r<=0.0 ){
583583
@ <li><p>
584584
@ Load average limiting is turned off. This can cause the server
585585
@ to bog down if many requests for expensive services (such as
586586
@ large diffs or tarballs) arrive at about the same time.
587
- @ To fix this, set the
587
+ @ To fix this, set the
588588
@ <a href='%R/setup_access#slal'>"Server Load Average Limit"</a> on the
589589
@ <a href='%R/setup_access'>Access Control</a> page to the approximate
590590
@ the number of available cores on your server, or maybe just a little
591591
@ less.
592592
}else if( r>=8.0 ){
@@ -604,11 +604,11 @@
604604
@ To set up an error log,
605605
if( fossil_strcmp(g.zCmdName, "cgi")==0 ){
606606
@ make an entry like "errorlog: <i>FILENAME</i>" in the
607607
@ CGI script at %h(P("SCRIPT_FILENAME")).
608608
}else{
609
- @ add the "--errorlog <i>FILENAME</i>" option to the
609
+ @ add the "--errorlog <i>FILENAME</i>" option to the
610610
@ "%h(g.argv[0]) %h(g.zCmdName)" command that launched this server.
611611
}
612612
}else{
613613
FILE *pTest = fossil_fopen(g.zErrlog,"a");
614614
if( pTest==0 ){
@@ -635,11 +635,11 @@
635635
@ %d(nCgi) CGIs and %d(nFile-nCgi) static content and data files.
636636
}
637637
638638
if( fileedit_glob()!=0 ){
639639
@ <li><p><a href='%R/fileedit'>Online File Editing</a> is enabled
640
- @ for this repository. Clear the
640
+ @ for this repository. Clear the
641641
@ <a href='%R/setup_settings'>"fileedit-glob" setting</a> to
642642
@ disable online editing.</p>
643643
}
644644
645645
@ <li><p> User capability summary:
@@ -651,11 +651,11 @@
651651
@ <li><p> WARNING: No Content Security Policy (CSP) is specified in the
652652
@ header. Though not required, a strong CSP is recommended. Fossil will
653653
@ automatically insert an appropriate CSP if you let it generate the
654654
@ HTML <tt>&lt;head&gt;</tt> element by omitting <tt>&lt;body&gt;</tt>
655655
@ from the header configuration in your customized skin.
656
- @
656
+ @
657657
}else{
658658
int ii;
659659
@ <li><p> Content Security Policy:
660660
@ <ol type="a">
661661
for(ii=0; azCSP[ii]; ii++){
@@ -787,11 +787,11 @@
787787
@ like this:
788788
@ <blockquote><pre>
789789
@ errorlog: <i>FILENAME</i>
790790
@ </pre></blockquote>
791791
@ <li><p>
792
- @ If the server is running using one of
792
+ @ If the server is running using one of
793793
@ the "fossil http" or "fossil server" commands then add
794794
@ a command-line option "--errorlog <i>FILENAME</i>" to that
795795
@ command.
796796
@ </ol>
797797
style_finish_page();
798798
--- src/security_audit.c
+++ src/security_audit.c
@@ -336,11 +336,11 @@
336 /* Anonymous users probably should not be allowed act as moderators
337 ** for wiki or tickets.
338 */
339 if( hasAnyCap(zAnonCap, "lq5") ){
340 @ <li><p><b>WARNING:</b>
341 @ Anonymous users can act as moderators for wiki, tickets, or
342 @ forum posts. This defeats the whole purpose of moderation.
343 @ Fix this by removing the "Mod-Wiki", "Mod-Tkt", and "Mod-Forum"
344 @ privileges (<a href="%R/setup_ucap_list">capabilities</a> "fq5")
345 @ from users "anonymous" and "nobody"
346 @ on the <a href="setup_ulist">User Configuration</a> page.
@@ -353,11 +353,11 @@
353 @ <li><p><b>WARNING:</b>
354 @ TH1 scripts might be configured to run on any sync, push, pull, or
355 @ clone operation. See the the <a href="%R/xfersetup">/xfersetup</a>
356 @ page for more information. These TH1 scripts are a potential
357 @ security concern and so should be carefully audited by a human.
358 }
359
360 /* The strict-manifest-syntax setting should be on. */
361 if( db_get_boolean("strict-manifest-syntax",1)==0 ){
362 @ <li><p><b>WARNING:</b>
363 @ The "strict-manifest-syntax" flag is off. This is a security
@@ -582,11 +582,11 @@
582 if( r<=0.0 ){
583 @ <li><p>
584 @ Load average limiting is turned off. This can cause the server
585 @ to bog down if many requests for expensive services (such as
586 @ large diffs or tarballs) arrive at about the same time.
587 @ To fix this, set the
588 @ <a href='%R/setup_access#slal'>"Server Load Average Limit"</a> on the
589 @ <a href='%R/setup_access'>Access Control</a> page to the approximate
590 @ the number of available cores on your server, or maybe just a little
591 @ less.
592 }else if( r>=8.0 ){
@@ -604,11 +604,11 @@
604 @ To set up an error log,
605 if( fossil_strcmp(g.zCmdName, "cgi")==0 ){
606 @ make an entry like "errorlog: <i>FILENAME</i>" in the
607 @ CGI script at %h(P("SCRIPT_FILENAME")).
608 }else{
609 @ add the "--errorlog <i>FILENAME</i>" option to the
610 @ "%h(g.argv[0]) %h(g.zCmdName)" command that launched this server.
611 }
612 }else{
613 FILE *pTest = fossil_fopen(g.zErrlog,"a");
614 if( pTest==0 ){
@@ -635,11 +635,11 @@
635 @ %d(nCgi) CGIs and %d(nFile-nCgi) static content and data files.
636 }
637
638 if( fileedit_glob()!=0 ){
639 @ <li><p><a href='%R/fileedit'>Online File Editing</a> is enabled
640 @ for this repository. Clear the
641 @ <a href='%R/setup_settings'>"fileedit-glob" setting</a> to
642 @ disable online editing.</p>
643 }
644
645 @ <li><p> User capability summary:
@@ -651,11 +651,11 @@
651 @ <li><p> WARNING: No Content Security Policy (CSP) is specified in the
652 @ header. Though not required, a strong CSP is recommended. Fossil will
653 @ automatically insert an appropriate CSP if you let it generate the
654 @ HTML <tt>&lt;head&gt;</tt> element by omitting <tt>&lt;body&gt;</tt>
655 @ from the header configuration in your customized skin.
656 @
657 }else{
658 int ii;
659 @ <li><p> Content Security Policy:
660 @ <ol type="a">
661 for(ii=0; azCSP[ii]; ii++){
@@ -787,11 +787,11 @@
787 @ like this:
788 @ <blockquote><pre>
789 @ errorlog: <i>FILENAME</i>
790 @ </pre></blockquote>
791 @ <li><p>
792 @ If the server is running using one of
793 @ the "fossil http" or "fossil server" commands then add
794 @ a command-line option "--errorlog <i>FILENAME</i>" to that
795 @ command.
796 @ </ol>
797 style_finish_page();
798
--- src/security_audit.c
+++ src/security_audit.c
@@ -336,11 +336,11 @@
336 /* Anonymous users probably should not be allowed act as moderators
337 ** for wiki or tickets.
338 */
339 if( hasAnyCap(zAnonCap, "lq5") ){
340 @ <li><p><b>WARNING:</b>
341 @ Anonymous users can act as moderators for wiki, tickets, or
342 @ forum posts. This defeats the whole purpose of moderation.
343 @ Fix this by removing the "Mod-Wiki", "Mod-Tkt", and "Mod-Forum"
344 @ privileges (<a href="%R/setup_ucap_list">capabilities</a> "fq5")
345 @ from users "anonymous" and "nobody"
346 @ on the <a href="setup_ulist">User Configuration</a> page.
@@ -353,11 +353,11 @@
353 @ <li><p><b>WARNING:</b>
354 @ TH1 scripts might be configured to run on any sync, push, pull, or
355 @ clone operation. See the the <a href="%R/xfersetup">/xfersetup</a>
356 @ page for more information. These TH1 scripts are a potential
357 @ security concern and so should be carefully audited by a human.
358 }
359
360 /* The strict-manifest-syntax setting should be on. */
361 if( db_get_boolean("strict-manifest-syntax",1)==0 ){
362 @ <li><p><b>WARNING:</b>
363 @ The "strict-manifest-syntax" flag is off. This is a security
@@ -582,11 +582,11 @@
582 if( r<=0.0 ){
583 @ <li><p>
584 @ Load average limiting is turned off. This can cause the server
585 @ to bog down if many requests for expensive services (such as
586 @ large diffs or tarballs) arrive at about the same time.
587 @ To fix this, set the
588 @ <a href='%R/setup_access#slal'>"Server Load Average Limit"</a> on the
589 @ <a href='%R/setup_access'>Access Control</a> page to the approximate
590 @ the number of available cores on your server, or maybe just a little
591 @ less.
592 }else if( r>=8.0 ){
@@ -604,11 +604,11 @@
604 @ To set up an error log,
605 if( fossil_strcmp(g.zCmdName, "cgi")==0 ){
606 @ make an entry like "errorlog: <i>FILENAME</i>" in the
607 @ CGI script at %h(P("SCRIPT_FILENAME")).
608 }else{
609 @ add the "--errorlog <i>FILENAME</i>" option to the
610 @ "%h(g.argv[0]) %h(g.zCmdName)" command that launched this server.
611 }
612 }else{
613 FILE *pTest = fossil_fopen(g.zErrlog,"a");
614 if( pTest==0 ){
@@ -635,11 +635,11 @@
635 @ %d(nCgi) CGIs and %d(nFile-nCgi) static content and data files.
636 }
637
638 if( fileedit_glob()!=0 ){
639 @ <li><p><a href='%R/fileedit'>Online File Editing</a> is enabled
640 @ for this repository. Clear the
641 @ <a href='%R/setup_settings'>"fileedit-glob" setting</a> to
642 @ disable online editing.</p>
643 }
644
645 @ <li><p> User capability summary:
@@ -651,11 +651,11 @@
651 @ <li><p> WARNING: No Content Security Policy (CSP) is specified in the
652 @ header. Though not required, a strong CSP is recommended. Fossil will
653 @ automatically insert an appropriate CSP if you let it generate the
654 @ HTML <tt>&lt;head&gt;</tt> element by omitting <tt>&lt;body&gt;</tt>
655 @ from the header configuration in your customized skin.
656 @
657 }else{
658 int ii;
659 @ <li><p> Content Security Policy:
660 @ <ol type="a">
661 for(ii=0; azCSP[ii]; ii++){
@@ -787,11 +787,11 @@
787 @ like this:
788 @ <blockquote><pre>
789 @ errorlog: <i>FILENAME</i>
790 @ </pre></blockquote>
791 @ <li><p>
792 @ If the server is running using one of
793 @ the "fossil http" or "fossil server" commands then add
794 @ a command-line option "--errorlog <i>FILENAME</i>" to that
795 @ command.
796 @ </ol>
797 style_finish_page();
798
+3 -3
--- src/setup.c
+++ src/setup.c
@@ -588,11 +588,11 @@
588588
@ <hr>
589589
entry_attribute("Public pages", 30, "public-pages",
590590
"pubpage", "", 0);
591591
@ <p>A comma-separated list of glob patterns for pages that are accessible
592592
@ without needing a login and using the privileges given by the
593
- @ "Default privileges" setting below.
593
+ @ "Default privileges" setting below.
594594
@
595595
@ <p>Example use case: Set this field to "/doc/trunk/www/*" and set
596596
@ the "Default privileges" to include the "o" privilege
597597
@ to give anonymous users read-only permission to the
598598
@ latest version of the embedded documentation in the www/ folder without
@@ -1201,11 +1201,11 @@
12011201
@ <p>
12021202
if(P("resetMenu")!=0){
12031203
db_unset("mainmenu", 0);
12041204
cgi_delete_parameter("mmenu");
12051205
}
1206
- textarea_attribute("Main Menu", 12, 80,
1206
+ textarea_attribute("Main Menu", 12, 80,
12071207
"mainmenu", "mmenu", style_default_mainmenu(), 0);
12081208
@ </p>
12091209
@ <p><input type='checkbox' id='cbResetMenu' name='resetMenu' value='1'>
12101210
@ <label for='cbResetMenu'>Reset menu to default value</label>
12111211
@ </p>
@@ -1229,11 +1229,11 @@
12291229
@ </ol>
12301230
@
12311231
@ <p>The default value is blank, meaning no added entries.
12321232
@ (Property: sitemap-extra)
12331233
@ <p>
1234
- textarea_attribute("Custom Sitemap Entries", 8, 80,
1234
+ textarea_attribute("Custom Sitemap Entries", 8, 80,
12351235
"sitemap-extra", "smextra", "", 0);
12361236
@ <hr>
12371237
@ <p><input type="submit" name="submit" value="Apply Changes"></p>
12381238
@ </div></form>
12391239
db_end_transaction(0);
12401240
--- src/setup.c
+++ src/setup.c
@@ -588,11 +588,11 @@
588 @ <hr>
589 entry_attribute("Public pages", 30, "public-pages",
590 "pubpage", "", 0);
591 @ <p>A comma-separated list of glob patterns for pages that are accessible
592 @ without needing a login and using the privileges given by the
593 @ "Default privileges" setting below.
594 @
595 @ <p>Example use case: Set this field to "/doc/trunk/www/*" and set
596 @ the "Default privileges" to include the "o" privilege
597 @ to give anonymous users read-only permission to the
598 @ latest version of the embedded documentation in the www/ folder without
@@ -1201,11 +1201,11 @@
1201 @ <p>
1202 if(P("resetMenu")!=0){
1203 db_unset("mainmenu", 0);
1204 cgi_delete_parameter("mmenu");
1205 }
1206 textarea_attribute("Main Menu", 12, 80,
1207 "mainmenu", "mmenu", style_default_mainmenu(), 0);
1208 @ </p>
1209 @ <p><input type='checkbox' id='cbResetMenu' name='resetMenu' value='1'>
1210 @ <label for='cbResetMenu'>Reset menu to default value</label>
1211 @ </p>
@@ -1229,11 +1229,11 @@
1229 @ </ol>
1230 @
1231 @ <p>The default value is blank, meaning no added entries.
1232 @ (Property: sitemap-extra)
1233 @ <p>
1234 textarea_attribute("Custom Sitemap Entries", 8, 80,
1235 "sitemap-extra", "smextra", "", 0);
1236 @ <hr>
1237 @ <p><input type="submit" name="submit" value="Apply Changes"></p>
1238 @ </div></form>
1239 db_end_transaction(0);
1240
--- src/setup.c
+++ src/setup.c
@@ -588,11 +588,11 @@
588 @ <hr>
589 entry_attribute("Public pages", 30, "public-pages",
590 "pubpage", "", 0);
591 @ <p>A comma-separated list of glob patterns for pages that are accessible
592 @ without needing a login and using the privileges given by the
593 @ "Default privileges" setting below.
594 @
595 @ <p>Example use case: Set this field to "/doc/trunk/www/*" and set
596 @ the "Default privileges" to include the "o" privilege
597 @ to give anonymous users read-only permission to the
598 @ latest version of the embedded documentation in the www/ folder without
@@ -1201,11 +1201,11 @@
1201 @ <p>
1202 if(P("resetMenu")!=0){
1203 db_unset("mainmenu", 0);
1204 cgi_delete_parameter("mmenu");
1205 }
1206 textarea_attribute("Main Menu", 12, 80,
1207 "mainmenu", "mmenu", style_default_mainmenu(), 0);
1208 @ </p>
1209 @ <p><input type='checkbox' id='cbResetMenu' name='resetMenu' value='1'>
1210 @ <label for='cbResetMenu'>Reset menu to default value</label>
1211 @ </p>
@@ -1229,11 +1229,11 @@
1229 @ </ol>
1230 @
1231 @ <p>The default value is blank, meaning no added entries.
1232 @ (Property: sitemap-extra)
1233 @ <p>
1234 textarea_attribute("Custom Sitemap Entries", 8, 80,
1235 "sitemap-extra", "smextra", "", 0);
1236 @ <hr>
1237 @ <p><input type="submit" name="submit" value="Apply Changes"></p>
1238 @ </div></form>
1239 db_end_transaction(0);
1240
+1 -1
--- src/setupuser.c
+++ src/setupuser.c
@@ -810,11 +810,11 @@
810810
@ are inherited by all logged-in users.
811811
@ </p></li>
812812
@
813813
@ <li><p>
814814
@ The "<span class="ueditInheritDeveloper"><sub>D</sub></span>"
815
- @ subscript suffix indicates the privileges of
815
+ @ subscript suffix indicates the privileges of
816816
@ <span class="usertype">developer</span> that
817817
@ are inherited by all users with the
818818
@ <span class="capability">Developer</span> privilege.
819819
@ </p></li>
820820
@
821821
--- src/setupuser.c
+++ src/setupuser.c
@@ -810,11 +810,11 @@
810 @ are inherited by all logged-in users.
811 @ </p></li>
812 @
813 @ <li><p>
814 @ The "<span class="ueditInheritDeveloper"><sub>D</sub></span>"
815 @ subscript suffix indicates the privileges of
816 @ <span class="usertype">developer</span> that
817 @ are inherited by all users with the
818 @ <span class="capability">Developer</span> privilege.
819 @ </p></li>
820 @
821
--- src/setupuser.c
+++ src/setupuser.c
@@ -810,11 +810,11 @@
810 @ are inherited by all logged-in users.
811 @ </p></li>
812 @
813 @ <li><p>
814 @ The "<span class="ueditInheritDeveloper"><sub>D</sub></span>"
815 @ subscript suffix indicates the privileges of
816 @ <span class="usertype">developer</span> that
817 @ are inherited by all users with the
818 @ <span class="capability">Developer</span> privilege.
819 @ </p></li>
820 @
821
+2 -1
--- src/sha1.c
+++ src/sha1.c
@@ -32,11 +32,12 @@
3232
** and makeheaders.
3333
*/
3434
#if FOSSIL_HARDENED_SHA1
3535
3636
#if INTERFACE
37
-typedef void(*collision_block_callback)(uint64_t, const uint32_t*, const uint32_t*, const uint32_t*, const uint32_t*);
37
+typedef void(*collision_block_callback)(uint64_t, const uint32_t*,
38
+ const uint32_t*, const uint32_t*, const uint32_t*);
3839
struct SHA1_CTX {
3940
uint64_t total;
4041
uint32_t ihv[5];
4142
unsigned char buffer[64];
4243
int bigendian;
4344
--- src/sha1.c
+++ src/sha1.c
@@ -32,11 +32,12 @@
32 ** and makeheaders.
33 */
34 #if FOSSIL_HARDENED_SHA1
35
36 #if INTERFACE
37 typedef void(*collision_block_callback)(uint64_t, const uint32_t*, const uint32_t*, const uint32_t*, const uint32_t*);
 
38 struct SHA1_CTX {
39 uint64_t total;
40 uint32_t ihv[5];
41 unsigned char buffer[64];
42 int bigendian;
43
--- src/sha1.c
+++ src/sha1.c
@@ -32,11 +32,12 @@
32 ** and makeheaders.
33 */
34 #if FOSSIL_HARDENED_SHA1
35
36 #if INTERFACE
37 typedef void(*collision_block_callback)(uint64_t, const uint32_t*,
38 const uint32_t*, const uint32_t*, const uint32_t*);
39 struct SHA1_CTX {
40 uint64_t total;
41 uint32_t ihv[5];
42 unsigned char buffer[64];
43 int bigendian;
44
+2 -2
--- src/sitemap.c
+++ src/sitemap.c
@@ -81,11 +81,11 @@
8181
srchFlags = search_restrict(SRCH_ALL);
8282
if( !isPopup ){
8383
style_header("Site Map");
8484
style_adunit_config(ADUNIT_RIGHT_OK);
8585
}
86
-
86
+
8787
@ <ul id="sitemap" class="columns" style="column-width:20em">
8888
if( (e&1)==0 ){
8989
@ <li>%z(href("%R/home"))Home Page</a>
9090
}
9191
@@ -152,11 +152,11 @@
152152
}
153153
#endif
154154
155155
if( inSublist ){
156156
@ </ul>
157
- inSublist = 0;
157
+ inSublist = 0;
158158
}
159159
@ </li>
160160
if( g.perm.Read ){
161161
const char *zEditGlob = db_get("fileedit-glob","");
162162
@ <li>%z(href("%R/tree"))File Browser</a>
163163
--- src/sitemap.c
+++ src/sitemap.c
@@ -81,11 +81,11 @@
81 srchFlags = search_restrict(SRCH_ALL);
82 if( !isPopup ){
83 style_header("Site Map");
84 style_adunit_config(ADUNIT_RIGHT_OK);
85 }
86
87 @ <ul id="sitemap" class="columns" style="column-width:20em">
88 if( (e&1)==0 ){
89 @ <li>%z(href("%R/home"))Home Page</a>
90 }
91
@@ -152,11 +152,11 @@
152 }
153 #endif
154
155 if( inSublist ){
156 @ </ul>
157 inSublist = 0;
158 }
159 @ </li>
160 if( g.perm.Read ){
161 const char *zEditGlob = db_get("fileedit-glob","");
162 @ <li>%z(href("%R/tree"))File Browser</a>
163
--- src/sitemap.c
+++ src/sitemap.c
@@ -81,11 +81,11 @@
81 srchFlags = search_restrict(SRCH_ALL);
82 if( !isPopup ){
83 style_header("Site Map");
84 style_adunit_config(ADUNIT_RIGHT_OK);
85 }
86
87 @ <ul id="sitemap" class="columns" style="column-width:20em">
88 if( (e&1)==0 ){
89 @ <li>%z(href("%R/home"))Home Page</a>
90 }
91
@@ -152,11 +152,11 @@
152 }
153 #endif
154
155 if( inSublist ){
156 @ </ul>
157 inSublist = 0;
158 }
159 @ </li>
160 if( g.perm.Read ){
161 const char *zEditGlob = db_get("fileedit-glob","");
162 @ <li>%z(href("%R/tree"))File Browser</a>
163
+2 -2
--- src/skins.c
+++ src/skins.c
@@ -885,11 +885,11 @@
885885
DCfg.diffFlags |= DIFF_STRIP_EOLCR;
886886
if( P("sbsdiff")!=0 ) DCfg.diffFlags |= DIFF_SIDEBYSIDE;
887887
blob_init(&to, zContent, -1);
888888
blob_init(&from, skin_file_content(zBasis, zFile), -1);
889889
blob_zero(&out);
890
- DCfg.diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
890
+ DCfg.diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
891891
if( DCfg.diffFlags & DIFF_SIDEBYSIDE ){
892892
text_diff(&from, &to, &out, &DCfg);
893893
@ %s(blob_str(&out))
894894
}else{
895895
DCfg.diffFlags |= DIFF_LINENO;
@@ -1206,11 +1206,11 @@
12061206
if( sqlite3_strglob(zPattern, zBase)==0 ){
12071207
nBase -= strlen(zPattern)-1;
12081208
zBase[nBase] = 0;
12091209
}
12101210
fossil_free(zPattern);
1211
- }
1211
+ }
12121212
login_check_credentials();
12131213
style_header("Skins");
12141214
if( iDraftSkin || nSkinRank<=1 ){
12151215
@ <p class="warning">Warning:
12161216
if( iDraftSkin>0 ){
12171217
--- src/skins.c
+++ src/skins.c
@@ -885,11 +885,11 @@
885 DCfg.diffFlags |= DIFF_STRIP_EOLCR;
886 if( P("sbsdiff")!=0 ) DCfg.diffFlags |= DIFF_SIDEBYSIDE;
887 blob_init(&to, zContent, -1);
888 blob_init(&from, skin_file_content(zBasis, zFile), -1);
889 blob_zero(&out);
890 DCfg.diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
891 if( DCfg.diffFlags & DIFF_SIDEBYSIDE ){
892 text_diff(&from, &to, &out, &DCfg);
893 @ %s(blob_str(&out))
894 }else{
895 DCfg.diffFlags |= DIFF_LINENO;
@@ -1206,11 +1206,11 @@
1206 if( sqlite3_strglob(zPattern, zBase)==0 ){
1207 nBase -= strlen(zPattern)-1;
1208 zBase[nBase] = 0;
1209 }
1210 fossil_free(zPattern);
1211 }
1212 login_check_credentials();
1213 style_header("Skins");
1214 if( iDraftSkin || nSkinRank<=1 ){
1215 @ <p class="warning">Warning:
1216 if( iDraftSkin>0 ){
1217
--- src/skins.c
+++ src/skins.c
@@ -885,11 +885,11 @@
885 DCfg.diffFlags |= DIFF_STRIP_EOLCR;
886 if( P("sbsdiff")!=0 ) DCfg.diffFlags |= DIFF_SIDEBYSIDE;
887 blob_init(&to, zContent, -1);
888 blob_init(&from, skin_file_content(zBasis, zFile), -1);
889 blob_zero(&out);
890 DCfg.diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
891 if( DCfg.diffFlags & DIFF_SIDEBYSIDE ){
892 text_diff(&from, &to, &out, &DCfg);
893 @ %s(blob_str(&out))
894 }else{
895 DCfg.diffFlags |= DIFF_LINENO;
@@ -1206,11 +1206,11 @@
1206 if( sqlite3_strglob(zPattern, zBase)==0 ){
1207 nBase -= strlen(zPattern)-1;
1208 zBase[nBase] = 0;
1209 }
1210 fossil_free(zPattern);
1211 }
1212 login_check_credentials();
1213 style_header("Skins");
1214 if( iDraftSkin || nSkinRank<=1 ){
1215 @ <p class="warning">Warning:
1216 if( iDraftSkin>0 ){
1217
+2 -2
--- src/smtp.c
+++ src/smtp.c
@@ -19,12 +19,12 @@
1919
** to RFC 5321.
2020
*/
2121
#include "config.h"
2222
#include "smtp.h"
2323
#include <assert.h>
24
-#if (HAVE_DN_EXPAND || HAVE___NS_NAME_UNCOMPRESS || HAVE_NS_NAME_UNCOMPRESS) && \
25
- (HAVE_NS_PARSERR || HAVE___NS_PARSERR) && !defined(FOSSIL_OMIT_DNS)
24
+#if (HAVE_DN_EXPAND || HAVE___NS_NAME_UNCOMPRESS || HAVE_NS_NAME_UNCOMPRESS) \
25
+ && (HAVE_NS_PARSERR || HAVE___NS_PARSERR) && !defined(FOSSIL_OMIT_DNS)
2626
# include <sys/types.h>
2727
# include <netinet/in.h>
2828
# if defined(HAVE_BIND_RESOLV_H)
2929
# include <bind/resolv.h>
3030
# include <bind/arpa/nameser_compat.h>
3131
--- src/smtp.c
+++ src/smtp.c
@@ -19,12 +19,12 @@
19 ** to RFC 5321.
20 */
21 #include "config.h"
22 #include "smtp.h"
23 #include <assert.h>
24 #if (HAVE_DN_EXPAND || HAVE___NS_NAME_UNCOMPRESS || HAVE_NS_NAME_UNCOMPRESS) && \
25 (HAVE_NS_PARSERR || HAVE___NS_PARSERR) && !defined(FOSSIL_OMIT_DNS)
26 # include <sys/types.h>
27 # include <netinet/in.h>
28 # if defined(HAVE_BIND_RESOLV_H)
29 # include <bind/resolv.h>
30 # include <bind/arpa/nameser_compat.h>
31
--- src/smtp.c
+++ src/smtp.c
@@ -19,12 +19,12 @@
19 ** to RFC 5321.
20 */
21 #include "config.h"
22 #include "smtp.h"
23 #include <assert.h>
24 #if (HAVE_DN_EXPAND || HAVE___NS_NAME_UNCOMPRESS || HAVE_NS_NAME_UNCOMPRESS) \
25 && (HAVE_NS_PARSERR || HAVE___NS_PARSERR) && !defined(FOSSIL_OMIT_DNS)
26 # include <sys/types.h>
27 # include <netinet/in.h>
28 # if defined(HAVE_BIND_RESOLV_H)
29 # include <bind/resolv.h>
30 # include <bind/arpa/nameser_compat.h>
31
+1 -1
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -384,11 +384,11 @@
384384
**
385385
** SELECT * FROM files_of_checkin('trunk');
386386
**
387387
** helptext A virtual table with one row for each command,
388388
** webpage, and setting together with the built-in
389
-** help text.
389
+** help text.
390390
**
391391
** now() Return the number of seconds since 1970.
392392
**
393393
** obscure(T) Obfuscate the text password T so that its
394394
** original value is not readily visible. Fossil
395395
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -384,11 +384,11 @@
384 **
385 ** SELECT * FROM files_of_checkin('trunk');
386 **
387 ** helptext A virtual table with one row for each command,
388 ** webpage, and setting together with the built-in
389 ** help text.
390 **
391 ** now() Return the number of seconds since 1970.
392 **
393 ** obscure(T) Obfuscate the text password T so that its
394 ** original value is not readily visible. Fossil
395
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -384,11 +384,11 @@
384 **
385 ** SELECT * FROM files_of_checkin('trunk');
386 **
387 ** helptext A virtual table with one row for each command,
388 ** webpage, and setting together with the built-in
389 ** help text.
390 **
391 ** now() Return the number of seconds since 1970.
392 **
393 ** obscure(T) Obfuscate the text password T so that its
394 ** original value is not readily visible. Fossil
395
+12 -12
--- src/stat.c
+++ src/stat.c
@@ -557,11 +557,11 @@
557557
@ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
558558
}
559559
cnt++;
560560
}
561561
db_finalize(&q);
562
-
562
+
563563
if( nOmitted ){
564564
@ <tr><td><a href="urllist?all"><i>Show %d(nOmitted) more...</i></a>
565565
}
566566
if( cnt ){
567567
@ </table>
@@ -715,11 +715,11 @@
715715
Blob sql;
716716
const char *zArg = P("n");
717717
login_check_credentials();
718718
if( !g.perm.Admin ){ login_needed(0); return; }
719719
720
- if( zArg!=0
720
+ if( zArg!=0
721721
&& db_table_exists("repository",zArg)
722722
&& cgi_csrf_safe(1)
723723
){
724724
if( P("analyze")!=0 ){
725725
db_multi_exec("ANALYZE \"%w\"", zArg);
@@ -934,11 +934,11 @@
934934
** Gather statistics on artifact types, counts, and sizes.
935935
**
936936
** Only populate the artstat.atype field if the bWithTypes parameter is true.
937937
*/
938938
void gather_artifact_stats(int bWithTypes){
939
- static const char zSql[] =
939
+ static const char zSql[] =
940940
@ CREATE TEMP TABLE artstat(
941941
@ id INTEGER PRIMARY KEY, -- Corresponds to BLOB.RID
942942
@ atype TEXT, -- 'data', 'manifest', 'tag', 'wiki', etc.
943943
@ isDelta BOOLEAN, -- true if stored as a delta
944944
@ szExp, -- expanded, uncompressed size
@@ -949,46 +949,46 @@
949949
@ delta.rid IS NOT NULL,
950950
@ size, octet_length(content)
951951
@ FROM blob LEFT JOIN delta ON blob.rid=delta.rid
952952
@ WHERE content IS NOT NULL;
953953
;
954
- static const char zSql2[] =
954
+ static const char zSql2[] =
955955
@ UPDATE artstat SET atype='file'
956956
@ WHERE +id IN (SELECT fid FROM mlink);
957957
@ UPDATE artstat SET atype='manifest'
958958
@ WHERE id IN (SELECT objid FROM event WHERE type='ci') AND atype IS NULL;
959959
@ UPDATE artstat SET atype='forum'
960960
@ WHERE id IN (SELECT objid FROM event WHERE type='f') AND atype IS NULL;
961961
@ UPDATE artstat SET atype='cluster'
962
- @ WHERE atype IS NULL
962
+ @ WHERE atype IS NULL
963963
@ AND id IN (SELECT rid FROM tagxref
964964
@ WHERE tagid=(SELECT tagid FROM tag
965965
@ WHERE tagname='cluster'));
966966
@ UPDATE artstat SET atype='ticket'
967
- @ WHERE atype IS NULL
967
+ @ WHERE atype IS NULL
968968
@ AND id IN (SELECT rid FROM tagxref
969969
@ WHERE tagid IN (SELECT tagid FROM tag
970970
@ WHERE tagname GLOB 'tkt-*'));
971971
@ UPDATE artstat SET atype='wiki'
972
- @ WHERE atype IS NULL
972
+ @ WHERE atype IS NULL
973973
@ AND id IN (SELECT rid FROM tagxref
974974
@ WHERE tagid IN (SELECT tagid FROM tag
975975
@ WHERE tagname GLOB 'wiki-*'));
976976
@ UPDATE artstat SET atype='technote'
977
- @ WHERE atype IS NULL
977
+ @ WHERE atype IS NULL
978978
@ AND id IN (SELECT rid FROM tagxref
979979
@ WHERE tagid IN (SELECT tagid FROM tag
980980
@ WHERE tagname GLOB 'event-*'));
981981
@ UPDATE artstat SET atype='attachment'
982
- @ WHERE atype IS NULL
983
- @ AND id IN (SELECT attachid FROM attachment UNION
982
+ @ WHERE atype IS NULL
983
+ @ AND id IN (SELECT attachid FROM attachment UNION
984984
@ SELECT blob.rid FROM attachment JOIN blob ON uuid=src);
985985
@ UPDATE artstat SET atype='tag'
986
- @ WHERE atype IS NULL
986
+ @ WHERE atype IS NULL
987987
@ AND id IN (SELECT srcid FROM tagxref);
988988
@ UPDATE artstat SET atype='tag'
989
- @ WHERE atype IS NULL
989
+ @ WHERE atype IS NULL
990990
@ AND id IN (SELECT objid FROM event WHERE type='g');
991991
@ UPDATE artstat SET atype='unused' WHERE atype IS NULL;
992992
;
993993
db_multi_exec("%s", zSql/*safe-for-%s*/);
994994
if( bWithTypes ){
995995
--- src/stat.c
+++ src/stat.c
@@ -557,11 +557,11 @@
557 @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
558 }
559 cnt++;
560 }
561 db_finalize(&q);
562
563 if( nOmitted ){
564 @ <tr><td><a href="urllist?all"><i>Show %d(nOmitted) more...</i></a>
565 }
566 if( cnt ){
567 @ </table>
@@ -715,11 +715,11 @@
715 Blob sql;
716 const char *zArg = P("n");
717 login_check_credentials();
718 if( !g.perm.Admin ){ login_needed(0); return; }
719
720 if( zArg!=0
721 && db_table_exists("repository",zArg)
722 && cgi_csrf_safe(1)
723 ){
724 if( P("analyze")!=0 ){
725 db_multi_exec("ANALYZE \"%w\"", zArg);
@@ -934,11 +934,11 @@
934 ** Gather statistics on artifact types, counts, and sizes.
935 **
936 ** Only populate the artstat.atype field if the bWithTypes parameter is true.
937 */
938 void gather_artifact_stats(int bWithTypes){
939 static const char zSql[] =
940 @ CREATE TEMP TABLE artstat(
941 @ id INTEGER PRIMARY KEY, -- Corresponds to BLOB.RID
942 @ atype TEXT, -- 'data', 'manifest', 'tag', 'wiki', etc.
943 @ isDelta BOOLEAN, -- true if stored as a delta
944 @ szExp, -- expanded, uncompressed size
@@ -949,46 +949,46 @@
949 @ delta.rid IS NOT NULL,
950 @ size, octet_length(content)
951 @ FROM blob LEFT JOIN delta ON blob.rid=delta.rid
952 @ WHERE content IS NOT NULL;
953 ;
954 static const char zSql2[] =
955 @ UPDATE artstat SET atype='file'
956 @ WHERE +id IN (SELECT fid FROM mlink);
957 @ UPDATE artstat SET atype='manifest'
958 @ WHERE id IN (SELECT objid FROM event WHERE type='ci') AND atype IS NULL;
959 @ UPDATE artstat SET atype='forum'
960 @ WHERE id IN (SELECT objid FROM event WHERE type='f') AND atype IS NULL;
961 @ UPDATE artstat SET atype='cluster'
962 @ WHERE atype IS NULL
963 @ AND id IN (SELECT rid FROM tagxref
964 @ WHERE tagid=(SELECT tagid FROM tag
965 @ WHERE tagname='cluster'));
966 @ UPDATE artstat SET atype='ticket'
967 @ WHERE atype IS NULL
968 @ AND id IN (SELECT rid FROM tagxref
969 @ WHERE tagid IN (SELECT tagid FROM tag
970 @ WHERE tagname GLOB 'tkt-*'));
971 @ UPDATE artstat SET atype='wiki'
972 @ WHERE atype IS NULL
973 @ AND id IN (SELECT rid FROM tagxref
974 @ WHERE tagid IN (SELECT tagid FROM tag
975 @ WHERE tagname GLOB 'wiki-*'));
976 @ UPDATE artstat SET atype='technote'
977 @ WHERE atype IS NULL
978 @ AND id IN (SELECT rid FROM tagxref
979 @ WHERE tagid IN (SELECT tagid FROM tag
980 @ WHERE tagname GLOB 'event-*'));
981 @ UPDATE artstat SET atype='attachment'
982 @ WHERE atype IS NULL
983 @ AND id IN (SELECT attachid FROM attachment UNION
984 @ SELECT blob.rid FROM attachment JOIN blob ON uuid=src);
985 @ UPDATE artstat SET atype='tag'
986 @ WHERE atype IS NULL
987 @ AND id IN (SELECT srcid FROM tagxref);
988 @ UPDATE artstat SET atype='tag'
989 @ WHERE atype IS NULL
990 @ AND id IN (SELECT objid FROM event WHERE type='g');
991 @ UPDATE artstat SET atype='unused' WHERE atype IS NULL;
992 ;
993 db_multi_exec("%s", zSql/*safe-for-%s*/);
994 if( bWithTypes ){
995
--- src/stat.c
+++ src/stat.c
@@ -557,11 +557,11 @@
557 @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
558 }
559 cnt++;
560 }
561 db_finalize(&q);
562
563 if( nOmitted ){
564 @ <tr><td><a href="urllist?all"><i>Show %d(nOmitted) more...</i></a>
565 }
566 if( cnt ){
567 @ </table>
@@ -715,11 +715,11 @@
715 Blob sql;
716 const char *zArg = P("n");
717 login_check_credentials();
718 if( !g.perm.Admin ){ login_needed(0); return; }
719
720 if( zArg!=0
721 && db_table_exists("repository",zArg)
722 && cgi_csrf_safe(1)
723 ){
724 if( P("analyze")!=0 ){
725 db_multi_exec("ANALYZE \"%w\"", zArg);
@@ -934,11 +934,11 @@
934 ** Gather statistics on artifact types, counts, and sizes.
935 **
936 ** Only populate the artstat.atype field if the bWithTypes parameter is true.
937 */
938 void gather_artifact_stats(int bWithTypes){
939 static const char zSql[] =
940 @ CREATE TEMP TABLE artstat(
941 @ id INTEGER PRIMARY KEY, -- Corresponds to BLOB.RID
942 @ atype TEXT, -- 'data', 'manifest', 'tag', 'wiki', etc.
943 @ isDelta BOOLEAN, -- true if stored as a delta
944 @ szExp, -- expanded, uncompressed size
@@ -949,46 +949,46 @@
949 @ delta.rid IS NOT NULL,
950 @ size, octet_length(content)
951 @ FROM blob LEFT JOIN delta ON blob.rid=delta.rid
952 @ WHERE content IS NOT NULL;
953 ;
954 static const char zSql2[] =
955 @ UPDATE artstat SET atype='file'
956 @ WHERE +id IN (SELECT fid FROM mlink);
957 @ UPDATE artstat SET atype='manifest'
958 @ WHERE id IN (SELECT objid FROM event WHERE type='ci') AND atype IS NULL;
959 @ UPDATE artstat SET atype='forum'
960 @ WHERE id IN (SELECT objid FROM event WHERE type='f') AND atype IS NULL;
961 @ UPDATE artstat SET atype='cluster'
962 @ WHERE atype IS NULL
963 @ AND id IN (SELECT rid FROM tagxref
964 @ WHERE tagid=(SELECT tagid FROM tag
965 @ WHERE tagname='cluster'));
966 @ UPDATE artstat SET atype='ticket'
967 @ WHERE atype IS NULL
968 @ AND id IN (SELECT rid FROM tagxref
969 @ WHERE tagid IN (SELECT tagid FROM tag
970 @ WHERE tagname GLOB 'tkt-*'));
971 @ UPDATE artstat SET atype='wiki'
972 @ WHERE atype IS NULL
973 @ AND id IN (SELECT rid FROM tagxref
974 @ WHERE tagid IN (SELECT tagid FROM tag
975 @ WHERE tagname GLOB 'wiki-*'));
976 @ UPDATE artstat SET atype='technote'
977 @ WHERE atype IS NULL
978 @ AND id IN (SELECT rid FROM tagxref
979 @ WHERE tagid IN (SELECT tagid FROM tag
980 @ WHERE tagname GLOB 'event-*'));
981 @ UPDATE artstat SET atype='attachment'
982 @ WHERE atype IS NULL
983 @ AND id IN (SELECT attachid FROM attachment UNION
984 @ SELECT blob.rid FROM attachment JOIN blob ON uuid=src);
985 @ UPDATE artstat SET atype='tag'
986 @ WHERE atype IS NULL
987 @ AND id IN (SELECT srcid FROM tagxref);
988 @ UPDATE artstat SET atype='tag'
989 @ WHERE atype IS NULL
990 @ AND id IN (SELECT objid FROM event WHERE type='g');
991 @ UPDATE artstat SET atype='unused' WHERE atype IS NULL;
992 ;
993 db_multi_exec("%s", zSql/*safe-for-%s*/);
994 if( bWithTypes ){
995
+1 -1
--- src/statrep.c
+++ src/statrep.c
@@ -130,11 +130,11 @@
130130
db_multi_exec(
131131
"CREATE TEMP VIEW v_reports AS "
132132
"SELECT * FROM event WHERE type='ci' AND %s"
133133
" AND objid %s IN (SELECT cid FROM plink WHERE NOT isprim)",
134134
zTimeSpan/*safe-for-%s*/, zNot/*safe-for-%s*/
135
- );
135
+ );
136136
}
137137
return statsReportType = rc;
138138
}
139139
140140
/*
141141
--- src/statrep.c
+++ src/statrep.c
@@ -130,11 +130,11 @@
130 db_multi_exec(
131 "CREATE TEMP VIEW v_reports AS "
132 "SELECT * FROM event WHERE type='ci' AND %s"
133 " AND objid %s IN (SELECT cid FROM plink WHERE NOT isprim)",
134 zTimeSpan/*safe-for-%s*/, zNot/*safe-for-%s*/
135 );
136 }
137 return statsReportType = rc;
138 }
139
140 /*
141
--- src/statrep.c
+++ src/statrep.c
@@ -130,11 +130,11 @@
130 db_multi_exec(
131 "CREATE TEMP VIEW v_reports AS "
132 "SELECT * FROM event WHERE type='ci' AND %s"
133 " AND objid %s IN (SELECT cid FROM plink WHERE NOT isprim)",
134 zTimeSpan/*safe-for-%s*/, zNot/*safe-for-%s*/
135 );
136 }
137 return statsReportType = rc;
138 }
139
140 /*
141
+13 -13
--- src/style.c
+++ src/style.c
@@ -452,11 +452,11 @@
452452
blob_appendf(&url, "?id=%x", skin_id("css"));
453453
if( P("once")!=0 && P("skin")!=0 ){
454454
blob_appendf(&url, "&skin=%s&once", skin_in_use());
455455
}
456456
457
- /* Generate the CSS URL variable */
457
+ /* Generate the CSS URL variable */
458458
Th_Store("stylesheet_url", blob_str(&url));
459459
blob_reset(&url);
460460
}
461461
462462
/*
@@ -472,11 +472,11 @@
472472
char *zUrl; /* The URL */
473473
474474
zResource = mprintf("%s-image", zImageName);
475475
zUrl = mprintf("%R/%s?id=%x", zImageName, skin_id(zResource));
476476
free(zResource);
477
- zVarName = mprintf("%s_image_url", zImageName);
477
+ zVarName = mprintf("%s_image_url", zImageName);
478478
Th_Store(zVarName, zUrl);
479479
free(zVarName);
480480
free(zUrl);
481481
}
482482
@@ -597,11 +597,11 @@
597597
**
598598
** The string returned is obtained from fossil_malloc() and
599599
** should be released by the caller.
600600
*/
601601
char *style_csp(int toHeader){
602
- static const char zBackupCSP[] =
602
+ static const char zBackupCSP[] =
603603
"default-src 'self' data:; "
604604
"script-src 'self' 'nonce-$nonce'; "
605605
"style-src 'self' 'unsafe-inline'; "
606606
"img-src * data:";
607607
const char *zFormat;
@@ -633,11 +633,11 @@
633633
634634
/*
635635
** Disable content security policy for the current page.
636636
** WARNING: Do not do this lightly!
637637
**
638
-** This routine must be called before the CSP is sued by
638
+** This routine must be called before the CSP is sued by
639639
** style_header().
640640
*/
641641
void style_disable_csp(void){
642642
disableCSP = 1;
643643
}
@@ -645,11 +645,11 @@
645645
/*
646646
** Default HTML page header text through <body>. If the repository-specific
647647
** header template lacks a <body> tag, then all of the following is
648648
** prepended.
649649
*/
650
-static const char zDfltHeader[] =
650
+static const char zDfltHeader[] =
651651
@ <html>
652652
@ <head>
653653
@ <meta charset="UTF-8">
654654
@ <base href="$baseurl/$current_page">
655655
@ <meta http-equiv="Content-Security-Policy" content="$default_csp">
@@ -670,11 +670,11 @@
670670
}
671671
672672
/*
673673
** The default TCL list that defines the main menu.
674674
*/
675
-static const char zDfltMainMenu[] =
675
+static const char zDfltMainMenu[] =
676676
@ Home /home * {}
677677
@ Timeline /timeline {o r j} {}
678678
@ Files /dir?ci=tip oh desktoponly
679679
@ Branches /brlist o wideonly
680680
@ Tags /taglist o wideonly
@@ -795,12 +795,12 @@
795795
}
796796
Th_MaybeStore("current_feature", feature_from_page_path(local_zCurrentPage) );
797797
if( g.ftntsIssues[0] || g.ftntsIssues[1] ||
798798
g.ftntsIssues[2] || g.ftntsIssues[3] ){
799799
char buf[80];
800
- sqlite3_snprintf(sizeof(buf),buf,"%i %i %i %i",g.ftntsIssues[0],g.ftntsIssues[1],
801
- g.ftntsIssues[2],g.ftntsIssues[3]);
800
+ sqlite3_snprintf(sizeof(buf), buf, "%i %i %i %i", g.ftntsIssues[0],
801
+ g.ftntsIssues[1], g.ftntsIssues[2], g.ftntsIssues[3]);
802802
Th_Store("footnotes_issues_counters", buf);
803803
}
804804
}
805805
806806
/*
@@ -1285,11 +1285,11 @@
12851285
** * $home
12861286
** * $logo
12871287
** * $background
12881288
**
12891289
** The output from TH1 becomes the style sheet. Fossil always reports
1290
-** that the style sheet is cacheable.
1290
+** that the style sheet is cacheable.
12911291
*/
12921292
void page_style_css(void){
12931293
Blob css = empty_blob;
12941294
int i;
12951295
const char * zDefaults;
@@ -1325,11 +1325,11 @@
13251325
}
13261326
13271327
/*
13281328
** All possible capabilities
13291329
*/
1330
-static const char allCap[] =
1330
+static const char allCap[] =
13311331
"abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKL";
13321332
13331333
/*
13341334
** Compute the current login capabilities
13351335
*/
@@ -1479,11 +1479,11 @@
14791479
default: {
14801480
@ CSRF safety = unsafe<br>
14811481
break;
14821482
}
14831483
}
1484
-
1484
+
14851485
@ fossil_exe_id() = %h(fossil_exe_id())<br>
14861486
if( g.perm.Admin ){
14871487
int k;
14881488
for(k=0; g.argvOrig[k]; k++){
14891489
Blob t;
@@ -1651,11 +1651,11 @@
16511651
** style_select_list_int("my-grapes", "my_grapes", "Grapes",
16521652
** "Select the number of grapes",
16531653
** atoi(PD("my_field","0")),
16541654
** "", 1, "2", 2, "Three", 3,
16551655
** NULL);
1656
-**
1656
+**
16571657
*/
16581658
void style_select_list_int(const char * zWrapperId,
16591659
const char *zFieldName, const char * zLabel,
16601660
const char * zToolTip, int selectedVal,
16611661
... ){
@@ -1775,11 +1775,11 @@
17751775
}
17761776
}
17771777
CX("<script nonce='%s'>/* %s:%d */\n", style_nonce(), zOrigin, iLine);
17781778
}
17791779
1780
-/* Generate the closing </script> tag
1780
+/* Generate the closing </script> tag
17811781
*/
17821782
void style_script_end(void){
17831783
CX("</script>\n");
17841784
}
17851785
17861786
--- src/style.c
+++ src/style.c
@@ -452,11 +452,11 @@
452 blob_appendf(&url, "?id=%x", skin_id("css"));
453 if( P("once")!=0 && P("skin")!=0 ){
454 blob_appendf(&url, "&skin=%s&once", skin_in_use());
455 }
456
457 /* Generate the CSS URL variable */
458 Th_Store("stylesheet_url", blob_str(&url));
459 blob_reset(&url);
460 }
461
462 /*
@@ -472,11 +472,11 @@
472 char *zUrl; /* The URL */
473
474 zResource = mprintf("%s-image", zImageName);
475 zUrl = mprintf("%R/%s?id=%x", zImageName, skin_id(zResource));
476 free(zResource);
477 zVarName = mprintf("%s_image_url", zImageName);
478 Th_Store(zVarName, zUrl);
479 free(zVarName);
480 free(zUrl);
481 }
482
@@ -597,11 +597,11 @@
597 **
598 ** The string returned is obtained from fossil_malloc() and
599 ** should be released by the caller.
600 */
601 char *style_csp(int toHeader){
602 static const char zBackupCSP[] =
603 "default-src 'self' data:; "
604 "script-src 'self' 'nonce-$nonce'; "
605 "style-src 'self' 'unsafe-inline'; "
606 "img-src * data:";
607 const char *zFormat;
@@ -633,11 +633,11 @@
633
634 /*
635 ** Disable content security policy for the current page.
636 ** WARNING: Do not do this lightly!
637 **
638 ** This routine must be called before the CSP is sued by
639 ** style_header().
640 */
641 void style_disable_csp(void){
642 disableCSP = 1;
643 }
@@ -645,11 +645,11 @@
645 /*
646 ** Default HTML page header text through <body>. If the repository-specific
647 ** header template lacks a <body> tag, then all of the following is
648 ** prepended.
649 */
650 static const char zDfltHeader[] =
651 @ <html>
652 @ <head>
653 @ <meta charset="UTF-8">
654 @ <base href="$baseurl/$current_page">
655 @ <meta http-equiv="Content-Security-Policy" content="$default_csp">
@@ -670,11 +670,11 @@
670 }
671
672 /*
673 ** The default TCL list that defines the main menu.
674 */
675 static const char zDfltMainMenu[] =
676 @ Home /home * {}
677 @ Timeline /timeline {o r j} {}
678 @ Files /dir?ci=tip oh desktoponly
679 @ Branches /brlist o wideonly
680 @ Tags /taglist o wideonly
@@ -795,12 +795,12 @@
795 }
796 Th_MaybeStore("current_feature", feature_from_page_path(local_zCurrentPage) );
797 if( g.ftntsIssues[0] || g.ftntsIssues[1] ||
798 g.ftntsIssues[2] || g.ftntsIssues[3] ){
799 char buf[80];
800 sqlite3_snprintf(sizeof(buf),buf,"%i %i %i %i",g.ftntsIssues[0],g.ftntsIssues[1],
801 g.ftntsIssues[2],g.ftntsIssues[3]);
802 Th_Store("footnotes_issues_counters", buf);
803 }
804 }
805
806 /*
@@ -1285,11 +1285,11 @@
1285 ** * $home
1286 ** * $logo
1287 ** * $background
1288 **
1289 ** The output from TH1 becomes the style sheet. Fossil always reports
1290 ** that the style sheet is cacheable.
1291 */
1292 void page_style_css(void){
1293 Blob css = empty_blob;
1294 int i;
1295 const char * zDefaults;
@@ -1325,11 +1325,11 @@
1325 }
1326
1327 /*
1328 ** All possible capabilities
1329 */
1330 static const char allCap[] =
1331 "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKL";
1332
1333 /*
1334 ** Compute the current login capabilities
1335 */
@@ -1479,11 +1479,11 @@
1479 default: {
1480 @ CSRF safety = unsafe<br>
1481 break;
1482 }
1483 }
1484
1485 @ fossil_exe_id() = %h(fossil_exe_id())<br>
1486 if( g.perm.Admin ){
1487 int k;
1488 for(k=0; g.argvOrig[k]; k++){
1489 Blob t;
@@ -1651,11 +1651,11 @@
1651 ** style_select_list_int("my-grapes", "my_grapes", "Grapes",
1652 ** "Select the number of grapes",
1653 ** atoi(PD("my_field","0")),
1654 ** "", 1, "2", 2, "Three", 3,
1655 ** NULL);
1656 **
1657 */
1658 void style_select_list_int(const char * zWrapperId,
1659 const char *zFieldName, const char * zLabel,
1660 const char * zToolTip, int selectedVal,
1661 ... ){
@@ -1775,11 +1775,11 @@
1775 }
1776 }
1777 CX("<script nonce='%s'>/* %s:%d */\n", style_nonce(), zOrigin, iLine);
1778 }
1779
1780 /* Generate the closing </script> tag
1781 */
1782 void style_script_end(void){
1783 CX("</script>\n");
1784 }
1785
1786
--- src/style.c
+++ src/style.c
@@ -452,11 +452,11 @@
452 blob_appendf(&url, "?id=%x", skin_id("css"));
453 if( P("once")!=0 && P("skin")!=0 ){
454 blob_appendf(&url, "&skin=%s&once", skin_in_use());
455 }
456
457 /* Generate the CSS URL variable */
458 Th_Store("stylesheet_url", blob_str(&url));
459 blob_reset(&url);
460 }
461
462 /*
@@ -472,11 +472,11 @@
472 char *zUrl; /* The URL */
473
474 zResource = mprintf("%s-image", zImageName);
475 zUrl = mprintf("%R/%s?id=%x", zImageName, skin_id(zResource));
476 free(zResource);
477 zVarName = mprintf("%s_image_url", zImageName);
478 Th_Store(zVarName, zUrl);
479 free(zVarName);
480 free(zUrl);
481 }
482
@@ -597,11 +597,11 @@
597 **
598 ** The string returned is obtained from fossil_malloc() and
599 ** should be released by the caller.
600 */
601 char *style_csp(int toHeader){
602 static const char zBackupCSP[] =
603 "default-src 'self' data:; "
604 "script-src 'self' 'nonce-$nonce'; "
605 "style-src 'self' 'unsafe-inline'; "
606 "img-src * data:";
607 const char *zFormat;
@@ -633,11 +633,11 @@
633
634 /*
635 ** Disable content security policy for the current page.
636 ** WARNING: Do not do this lightly!
637 **
638 ** This routine must be called before the CSP is sued by
639 ** style_header().
640 */
641 void style_disable_csp(void){
642 disableCSP = 1;
643 }
@@ -645,11 +645,11 @@
645 /*
646 ** Default HTML page header text through <body>. If the repository-specific
647 ** header template lacks a <body> tag, then all of the following is
648 ** prepended.
649 */
650 static const char zDfltHeader[] =
651 @ <html>
652 @ <head>
653 @ <meta charset="UTF-8">
654 @ <base href="$baseurl/$current_page">
655 @ <meta http-equiv="Content-Security-Policy" content="$default_csp">
@@ -670,11 +670,11 @@
670 }
671
672 /*
673 ** The default TCL list that defines the main menu.
674 */
675 static const char zDfltMainMenu[] =
676 @ Home /home * {}
677 @ Timeline /timeline {o r j} {}
678 @ Files /dir?ci=tip oh desktoponly
679 @ Branches /brlist o wideonly
680 @ Tags /taglist o wideonly
@@ -795,12 +795,12 @@
795 }
796 Th_MaybeStore("current_feature", feature_from_page_path(local_zCurrentPage) );
797 if( g.ftntsIssues[0] || g.ftntsIssues[1] ||
798 g.ftntsIssues[2] || g.ftntsIssues[3] ){
799 char buf[80];
800 sqlite3_snprintf(sizeof(buf), buf, "%i %i %i %i", g.ftntsIssues[0],
801 g.ftntsIssues[1], g.ftntsIssues[2], g.ftntsIssues[3]);
802 Th_Store("footnotes_issues_counters", buf);
803 }
804 }
805
806 /*
@@ -1285,11 +1285,11 @@
1285 ** * $home
1286 ** * $logo
1287 ** * $background
1288 **
1289 ** The output from TH1 becomes the style sheet. Fossil always reports
1290 ** that the style sheet is cacheable.
1291 */
1292 void page_style_css(void){
1293 Blob css = empty_blob;
1294 int i;
1295 const char * zDefaults;
@@ -1325,11 +1325,11 @@
1325 }
1326
1327 /*
1328 ** All possible capabilities
1329 */
1330 static const char allCap[] =
1331 "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKL";
1332
1333 /*
1334 ** Compute the current login capabilities
1335 */
@@ -1479,11 +1479,11 @@
1479 default: {
1480 @ CSRF safety = unsafe<br>
1481 break;
1482 }
1483 }
1484
1485 @ fossil_exe_id() = %h(fossil_exe_id())<br>
1486 if( g.perm.Admin ){
1487 int k;
1488 for(k=0; g.argvOrig[k]; k++){
1489 Blob t;
@@ -1651,11 +1651,11 @@
1651 ** style_select_list_int("my-grapes", "my_grapes", "Grapes",
1652 ** "Select the number of grapes",
1653 ** atoi(PD("my_field","0")),
1654 ** "", 1, "2", 2, "Three", 3,
1655 ** NULL);
1656 **
1657 */
1658 void style_select_list_int(const char * zWrapperId,
1659 const char *zFieldName, const char * zLabel,
1660 const char * zToolTip, int selectedVal,
1661 ... ){
@@ -1775,11 +1775,11 @@
1775 }
1776 }
1777 CX("<script nonce='%s'>/* %s:%d */\n", style_nonce(), zOrigin, iLine);
1778 }
1779
1780 /* Generate the closing </script> tag
1781 */
1782 void style_script_end(void){
1783 CX("</script>\n");
1784 }
1785
1786
+3 -3
--- src/sync.c
+++ src/sync.c
@@ -128,11 +128,11 @@
128128
return 0;
129129
}
130130
zAutosync = db_get_for_subsystem("autosync", zSubsys);
131131
if( zAutosync==0 ) zAutosync = "on"; /* defend against misconfig */
132132
if( is_false(zAutosync) ) return 0;
133
- if( db_get_boolean("dont-push",0)
133
+ if( db_get_boolean("dont-push",0)
134134
|| sqlite3_strglob("*pull*", zAutosync)==0
135135
){
136136
flags &= ~SYNC_CKIN_LOCK;
137137
if( flags & SYNC_PUSH ) return 0;
138138
}
@@ -533,11 +533,11 @@
533533
**
534534
** Show all remote repository URLs.
535535
**
536536
** > fossil remote off
537537
**
538
-** Forget the default URL. This disables autosync.
538
+** Forget the default URL. This disables autosync.
539539
**
540540
** This is a convenient way to enter "airplane mode". To enter
541541
** airplane mode, first save the current default URL, then turn the
542542
** default off. Perhaps like this:
543543
**
@@ -595,11 +595,11 @@
595595
**
596596
** The last-sync-url might be duplicated into one of the sync-url:NAME
597597
** entries. Thus, when doing a "fossil sync --all" or an autosync with
598598
** autosync=all, each sync-url:NAME entry is checked to see if it is the
599599
** same as last-sync-url and if it is then that entry is skipped.
600
- */
600
+ */
601601
602602
if( g.argc==2 ){
603603
/* "fossil remote" with no arguments: Show the last sync URL. */
604604
zUrl = db_get("last-sync-url", 0);
605605
if( zUrl==0 ){
606606
--- src/sync.c
+++ src/sync.c
@@ -128,11 +128,11 @@
128 return 0;
129 }
130 zAutosync = db_get_for_subsystem("autosync", zSubsys);
131 if( zAutosync==0 ) zAutosync = "on"; /* defend against misconfig */
132 if( is_false(zAutosync) ) return 0;
133 if( db_get_boolean("dont-push",0)
134 || sqlite3_strglob("*pull*", zAutosync)==0
135 ){
136 flags &= ~SYNC_CKIN_LOCK;
137 if( flags & SYNC_PUSH ) return 0;
138 }
@@ -533,11 +533,11 @@
533 **
534 ** Show all remote repository URLs.
535 **
536 ** > fossil remote off
537 **
538 ** Forget the default URL. This disables autosync.
539 **
540 ** This is a convenient way to enter "airplane mode". To enter
541 ** airplane mode, first save the current default URL, then turn the
542 ** default off. Perhaps like this:
543 **
@@ -595,11 +595,11 @@
595 **
596 ** The last-sync-url might be duplicated into one of the sync-url:NAME
597 ** entries. Thus, when doing a "fossil sync --all" or an autosync with
598 ** autosync=all, each sync-url:NAME entry is checked to see if it is the
599 ** same as last-sync-url and if it is then that entry is skipped.
600 */
601
602 if( g.argc==2 ){
603 /* "fossil remote" with no arguments: Show the last sync URL. */
604 zUrl = db_get("last-sync-url", 0);
605 if( zUrl==0 ){
606
--- src/sync.c
+++ src/sync.c
@@ -128,11 +128,11 @@
128 return 0;
129 }
130 zAutosync = db_get_for_subsystem("autosync", zSubsys);
131 if( zAutosync==0 ) zAutosync = "on"; /* defend against misconfig */
132 if( is_false(zAutosync) ) return 0;
133 if( db_get_boolean("dont-push",0)
134 || sqlite3_strglob("*pull*", zAutosync)==0
135 ){
136 flags &= ~SYNC_CKIN_LOCK;
137 if( flags & SYNC_PUSH ) return 0;
138 }
@@ -533,11 +533,11 @@
533 **
534 ** Show all remote repository URLs.
535 **
536 ** > fossil remote off
537 **
538 ** Forget the default URL. This disables autosync.
539 **
540 ** This is a convenient way to enter "airplane mode". To enter
541 ** airplane mode, first save the current default URL, then turn the
542 ** default off. Perhaps like this:
543 **
@@ -595,11 +595,11 @@
595 **
596 ** The last-sync-url might be duplicated into one of the sync-url:NAME
597 ** entries. Thus, when doing a "fossil sync --all" or an autosync with
598 ** autosync=all, each sync-url:NAME entry is checked to see if it is the
599 ** same as last-sync-url and if it is then that entry is skipped.
600 */
601
602 if( g.argc==2 ){
603 /* "fossil remote" with no arguments: Show the last sync URL. */
604 zUrl = db_get("last-sync-url", 0);
605 if( zUrl==0 ){
606
+2 -2
--- src/tag.c
+++ src/tag.c
@@ -640,13 +640,13 @@
640640
641641
if( zTagType!=0 ){
642642
int l = strlen(zTagType);
643643
if( strncmp(zTagType,"cancel",l)==0 ){
644644
nTagType = 0;
645
- }else if( strncmp(zTagType,"singleton",l)==0 ){
645
+ }else if( strncmp(zTagType,"singleton",l)==0 ){
646646
nTagType = 1;
647
- }else if( strncmp(zTagType,"propagated",l)==0 ){
647
+ }else if( strncmp(zTagType,"propagated",l)==0 ){
648648
nTagType = 2;
649649
}else{
650650
fossil_fatal("unrecognized tag type");
651651
}
652652
}
653653
--- src/tag.c
+++ src/tag.c
@@ -640,13 +640,13 @@
640
641 if( zTagType!=0 ){
642 int l = strlen(zTagType);
643 if( strncmp(zTagType,"cancel",l)==0 ){
644 nTagType = 0;
645 }else if( strncmp(zTagType,"singleton",l)==0 ){
646 nTagType = 1;
647 }else if( strncmp(zTagType,"propagated",l)==0 ){
648 nTagType = 2;
649 }else{
650 fossil_fatal("unrecognized tag type");
651 }
652 }
653
--- src/tag.c
+++ src/tag.c
@@ -640,13 +640,13 @@
640
641 if( zTagType!=0 ){
642 int l = strlen(zTagType);
643 if( strncmp(zTagType,"cancel",l)==0 ){
644 nTagType = 0;
645 }else if( strncmp(zTagType,"singleton",l)==0 ){
646 nTagType = 1;
647 }else if( strncmp(zTagType,"propagated",l)==0 ){
648 nTagType = 2;
649 }else{
650 fossil_fatal("unrecognized tag type");
651 }
652 }
653
+2 -1
--- src/tar.c
+++ src/tar.c
@@ -244,11 +244,12 @@
244244
/* adding the length extended the length field? */
245245
if(blen > next10){
246246
blen++;
247247
}
248248
/* build the string */
249
- blob_appendf(&tball.pax, "%d %s=%*.*s\n", blen, zField, nValue, nValue, zValue);
249
+ blob_appendf(&tball.pax, "%d %s=%*.*s\n",
250
+ blen, zField, nValue, nValue, zValue);
250251
/* this _must_ be right */
251252
if((int)blob_size(&tball.pax) != blen){
252253
fossil_panic("internal error: PAX tar header has bad length");
253254
}
254255
}
255256
--- src/tar.c
+++ src/tar.c
@@ -244,11 +244,12 @@
244 /* adding the length extended the length field? */
245 if(blen > next10){
246 blen++;
247 }
248 /* build the string */
249 blob_appendf(&tball.pax, "%d %s=%*.*s\n", blen, zField, nValue, nValue, zValue);
 
250 /* this _must_ be right */
251 if((int)blob_size(&tball.pax) != blen){
252 fossil_panic("internal error: PAX tar header has bad length");
253 }
254 }
255
--- src/tar.c
+++ src/tar.c
@@ -244,11 +244,12 @@
244 /* adding the length extended the length field? */
245 if(blen > next10){
246 blen++;
247 }
248 /* build the string */
249 blob_appendf(&tball.pax, "%d %s=%*.*s\n",
250 blen, zField, nValue, nValue, zValue);
251 /* this _must_ be right */
252 if((int)blob_size(&tball.pax) != blen){
253 fossil_panic("internal error: PAX tar header has bad length");
254 }
255 }
256
+2 -1
--- src/th_main.c
+++ src/th_main.c
@@ -31,11 +31,12 @@
3131
#define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */
3232
#define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */
3333
#define TH_INIT_FORCE_RESET ((u32)0x00000004) /* Force TH1 commands re-added? */
3434
#define TH_INIT_FORCE_SETUP ((u32)0x00000008) /* Force eval of setup script? */
3535
#define TH_INIT_NO_REPO ((u32)0x00000010) /* Skip opening repository. */
36
-#define TH_INIT_NO_ENCODE ((u32)0x00000020) /* Do not html-encode sendText() output. */
36
+#define TH_INIT_NO_ENCODE ((u32)0x00000020) /* Do not html-encode sendText()*/
37
+ /* output. */
3738
#define TH_INIT_MASK ((u32)0x0000003F) /* All possible init flags. */
3839
3940
/*
4041
** Useful and/or "well-known" combinations of flag values.
4142
*/
4243
--- src/th_main.c
+++ src/th_main.c
@@ -31,11 +31,12 @@
31 #define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */
32 #define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */
33 #define TH_INIT_FORCE_RESET ((u32)0x00000004) /* Force TH1 commands re-added? */
34 #define TH_INIT_FORCE_SETUP ((u32)0x00000008) /* Force eval of setup script? */
35 #define TH_INIT_NO_REPO ((u32)0x00000010) /* Skip opening repository. */
36 #define TH_INIT_NO_ENCODE ((u32)0x00000020) /* Do not html-encode sendText() output. */
 
37 #define TH_INIT_MASK ((u32)0x0000003F) /* All possible init flags. */
38
39 /*
40 ** Useful and/or "well-known" combinations of flag values.
41 */
42
--- src/th_main.c
+++ src/th_main.c
@@ -31,11 +31,12 @@
31 #define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */
32 #define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */
33 #define TH_INIT_FORCE_RESET ((u32)0x00000004) /* Force TH1 commands re-added? */
34 #define TH_INIT_FORCE_SETUP ((u32)0x00000008) /* Force eval of setup script? */
35 #define TH_INIT_NO_REPO ((u32)0x00000010) /* Skip opening repository. */
36 #define TH_INIT_NO_ENCODE ((u32)0x00000020) /* Do not html-encode sendText()*/
37 /* output. */
38 #define TH_INIT_MASK ((u32)0x0000003F) /* All possible init flags. */
39
40 /*
41 ** Useful and/or "well-known" combinations of flag values.
42 */
43
+6 -3
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -1164,18 +1164,20 @@
11641164
return TH_ERROR;
11651165
}
11661166
tclContext->interp = tclInterp;
11671167
if( Tcl_Init(tclInterp)!=TCL_OK ){
11681168
Th_ErrorMessage(interp,
1169
- "Tcl initialization error:", Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
1169
+ "Tcl initialization error:",
1170
+ Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
11701171
Tcl_DeleteInterp(tclInterp);
11711172
tclContext->interp = tclInterp = 0;
11721173
return TH_ERROR;
11731174
}
11741175
if( setTclArguments(tclInterp, argc, argv)!=TCL_OK ){
11751176
Th_ErrorMessage(interp,
1176
- "Tcl error setting arguments:", Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
1177
+ "Tcl error setting arguments:",
1178
+ Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
11771179
Tcl_DeleteInterp(tclInterp);
11781180
tclContext->interp = tclInterp = 0;
11791181
return TH_ERROR;
11801182
}
11811183
/*
@@ -1194,11 +1196,12 @@
11941196
Tcl_CreateObjCommand(tclInterp, "th1Expr", Th1ExprObjCmd, interp, NULL);
11951197
/* If necessary, evaluate the custom Tcl setup script. */
11961198
setup = tclContext->setup;
11971199
if( setup && Tcl_EvalEx(tclInterp, setup, -1, 0)!=TCL_OK ){
11981200
Th_ErrorMessage(interp,
1199
- "Tcl setup script error:", Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
1201
+ "Tcl setup script error:",
1202
+ Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
12001203
Tcl_DeleteInterp(tclInterp);
12011204
tclContext->interp = tclInterp = 0;
12021205
return TH_ERROR;
12031206
}
12041207
return TH_OK;
12051208
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -1164,18 +1164,20 @@
1164 return TH_ERROR;
1165 }
1166 tclContext->interp = tclInterp;
1167 if( Tcl_Init(tclInterp)!=TCL_OK ){
1168 Th_ErrorMessage(interp,
1169 "Tcl initialization error:", Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
 
1170 Tcl_DeleteInterp(tclInterp);
1171 tclContext->interp = tclInterp = 0;
1172 return TH_ERROR;
1173 }
1174 if( setTclArguments(tclInterp, argc, argv)!=TCL_OK ){
1175 Th_ErrorMessage(interp,
1176 "Tcl error setting arguments:", Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
 
1177 Tcl_DeleteInterp(tclInterp);
1178 tclContext->interp = tclInterp = 0;
1179 return TH_ERROR;
1180 }
1181 /*
@@ -1194,11 +1196,12 @@
1194 Tcl_CreateObjCommand(tclInterp, "th1Expr", Th1ExprObjCmd, interp, NULL);
1195 /* If necessary, evaluate the custom Tcl setup script. */
1196 setup = tclContext->setup;
1197 if( setup && Tcl_EvalEx(tclInterp, setup, -1, 0)!=TCL_OK ){
1198 Th_ErrorMessage(interp,
1199 "Tcl setup script error:", Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
 
1200 Tcl_DeleteInterp(tclInterp);
1201 tclContext->interp = tclInterp = 0;
1202 return TH_ERROR;
1203 }
1204 return TH_OK;
1205
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -1164,18 +1164,20 @@
1164 return TH_ERROR;
1165 }
1166 tclContext->interp = tclInterp;
1167 if( Tcl_Init(tclInterp)!=TCL_OK ){
1168 Th_ErrorMessage(interp,
1169 "Tcl initialization error:",
1170 Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
1171 Tcl_DeleteInterp(tclInterp);
1172 tclContext->interp = tclInterp = 0;
1173 return TH_ERROR;
1174 }
1175 if( setTclArguments(tclInterp, argc, argv)!=TCL_OK ){
1176 Th_ErrorMessage(interp,
1177 "Tcl error setting arguments:",
1178 Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
1179 Tcl_DeleteInterp(tclInterp);
1180 tclContext->interp = tclInterp = 0;
1181 return TH_ERROR;
1182 }
1183 /*
@@ -1194,11 +1196,12 @@
1196 Tcl_CreateObjCommand(tclInterp, "th1Expr", Th1ExprObjCmd, interp, NULL);
1197 /* If necessary, evaluate the custom Tcl setup script. */
1198 setup = tclContext->setup;
1199 if( setup && Tcl_EvalEx(tclInterp, setup, -1, 0)!=TCL_OK ){
1200 Th_ErrorMessage(interp,
1201 "Tcl setup script error:",
1202 Tcl_GetString(Tcl_GetObjResult(tclInterp)), -1);
1203 Tcl_DeleteInterp(tclInterp);
1204 tclContext->interp = tclInterp = 0;
1205 return TH_ERROR;
1206 }
1207 return TH_OK;
1208
+20 -16
--- src/timeline.c
+++ src/timeline.c
@@ -41,11 +41,11 @@
4141
"%h %c"
4242
#define TIMELINE_FMT_MEDIUM \
4343
"Commit: %h%nDate: %d%nAuthor: %a%nComment: %c"
4444
#define TIMELINE_FMT_FULL \
4545
"Commit: %H%nDate: %d%nAuthor: %a%nComment: %c%n"\
46
- "Branch: %b%nTags: %t%nPhase: %p"
46
+ "Branch: %b%nTags: %t%nPhase: %p"
4747
/*
4848
** Add an appropriate tag to the output if "rid" is unpublished (private)
4949
*/
5050
#define UNPUB_TAG "<em>(unpublished)</em>"
5151
void tag_private_status(int rid){
@@ -153,11 +153,11 @@
153153
db_reset(&q);
154154
return res;
155155
}
156156
157157
/*
158
-** Return the text of the unformatted
158
+** Return the text of the unformatted
159159
** forum post given by the RID in the argument.
160160
*/
161161
static void forum_post_content_function(
162162
sqlite3_context *context,
163163
int argc,
@@ -366,11 +366,11 @@
366366
zExtraClass = " tktTlClosed";
367367
}else{
368368
zExtraClass = " tktTlOpen";
369369
}
370370
fossil_free(zTktid);
371
- }
371
+ }
372372
}
373373
if( zType[0]=='e' && tagid ){
374374
if( bTimestampLinksToInfo ){
375375
char *zId;
376376
zId = db_text(0, "SELECT substr(tagname, 7) FROM tag WHERE tagid=%d",
@@ -676,11 +676,11 @@
676676
}
677677
678678
if( tmFlags & TIMELINE_SHOWRID ){
679679
int srcId = delta_source_rid(rid);
680680
if( srcId ){
681
- cgi_printf(" id:&nbsp;%z%d&larr;%d</a>",
681
+ cgi_printf(" id:&nbsp;%z%d&larr;%d</a>",
682682
href("%R/deltachain/%d",rid), rid, srcId);
683683
}else{
684684
cgi_printf(" id:&nbsp;%z%d</a>",
685685
href("%R/deltachain/%d",rid), rid);
686686
}
@@ -2222,11 +2222,11 @@
22222222
blob_appendf(&desc, " of %z%h</a>",
22232223
href("%R/info?name=%h", zCiName), zCiName);
22242224
if( ridBackTo ){
22252225
if( np==0 ){
22262226
blob_reset(&desc);
2227
- blob_appendf(&desc,
2227
+ blob_appendf(&desc,
22282228
"Check-in %z%h</a> only (%z%h</a> is not an ancestor)",
22292229
href("%R/info?name=%h",zCiName), zCiName,
22302230
href("%R/info?name=%h",zBackTo), zBackTo);
22312231
}else{
22322232
blob_appendf(&desc, " back to %z%h</a>",
@@ -2237,11 +2237,11 @@
22372237
}
22382238
}
22392239
}else if( ridFwdTo ){
22402240
if( nd==0 ){
22412241
blob_reset(&desc);
2242
- blob_appendf(&desc,
2242
+ blob_appendf(&desc,
22432243
"Check-in %z%h</a> only (%z%h</a> is not an descendant)",
22442244
href("%R/info?name=%h",zCiName), zCiName,
22452245
href("%R/info?name=%h",zFwdTo), zFwdTo);
22462246
}else{
22472247
blob_appendf(&desc, " up to %z%h</a>",
@@ -3017,24 +3017,27 @@
30173017
** 8. event-type: 'ci', 'w', 't', 'f', and so forth.
30183018
** 9. comment
30193019
** 10. user
30203020
** 11. tags
30213021
*/
3022
-void print_timeline(Stmt *q, int nLimit, int width, const char *zFormat, int verboseFlag){
3022
+void print_timeline(Stmt *q, int nLimit, int width, const char *zFormat,
3023
+ int verboseFlag){
30233024
int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
30243025
int nLine = 0;
30253026
int nEntry = 0;
30263027
char zPrevDate[20];
30273028
const char *zCurrentUuid = 0;
30283029
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
30293030
Stmt fchngQuery; /* Query for file changes on check-ins */
30303031
int rc;
30313032
/* True: separate entries with a newline after file listing */
3032
- int bVerboseNL = (zFormat && (fossil_strcmp(zFormat, TIMELINE_FMT_ONELINE)!=0));
3033
+ int bVerboseNL = (zFormat &&
3034
+ (fossil_strcmp(zFormat, TIMELINE_FMT_ONELINE)!=0));
30333035
/* True: separate entries with a newline even with no file listing */
3034
- int bNoVerboseNL = (zFormat && (fossil_strcmp(zFormat, TIMELINE_FMT_MEDIUM)==0 ||
3035
- fossil_strcmp(zFormat, TIMELINE_FMT_FULL)==0));
3036
+ int bNoVerboseNL = (zFormat &&
3037
+ (fossil_strcmp(zFormat, TIMELINE_FMT_MEDIUM)==0 ||
3038
+ fossil_strcmp(zFormat, TIMELINE_FMT_FULL)==0));
30363039
30373040
zPrevDate[0] = 0;
30383041
if( g.localOpen ){
30393042
int rid = db_lget_int("checkout", 0);
30403043
zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -3122,12 +3125,13 @@
31223125
char *zEntry;
31233126
int nEntryLine = 0;
31243127
if( nChild==0 ){
31253128
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*LEAF* ");
31263129
}
3127
- zEntry = timeline_entry_subst(zFormat, &nEntryLine, zId, zDate, zUserShort,
3128
- zComShort, zBranch, zTags, zPrefix);
3130
+ zEntry = timeline_entry_subst(zFormat, &nEntryLine, zId, zDate,
3131
+ zUserShort, zComShort, zBranch, zTags,
3132
+ zPrefix);
31293133
nLine += nEntryLine;
31303134
fossil_print("%s\n", zEntry);
31313135
fossil_free(zEntry);
31323136
}
31333137
else{
@@ -3167,11 +3171,11 @@
31673171
db_reset(&fchngQuery);
31683172
if( bVerboseNL ) fossil_print("\n");
31693173
}else{
31703174
if( bNoVerboseNL ) fossil_print("\n");
31713175
}
3172
-
3176
+
31733177
nEntry++; /* record another complete entry */
31743178
}
31753179
if( rc==SQLITE_DONE ){
31763180
/* Did the underlying query actually have all entries? */
31773181
if( nAbsLimit==0 ){
@@ -3211,11 +3215,11 @@
32113215
@ , coalesce(euser,user,'?') AS user0
32123216
@ , (SELECT case when length(x)>0 then x else '' end
32133217
@ FROM (SELECT group_concat(substr(tagname,5), ', ') AS x
32143218
@ FROM tag, tagxref
32153219
@ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
3216
- @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0)) AS tags
3220
+ @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0)) AS tags
32173221
@ FROM tag CROSS JOIN event CROSS JOIN blob
32183222
@ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid
32193223
@ AND tagxref.tagtype>0
32203224
@ AND tagxref.rid=blob.rid
32213225
@ WHERE blob.rid=event.objid
@@ -3272,19 +3276,19 @@
32723276
**
32733277
** Options:
32743278
** -b|--branch BRANCH Show only items on the branch named BRANCH
32753279
** -c|--current-branch Show only items on the current branch
32763280
** -F|--format Entry format. Values "oneline", "medium", and "full"
3277
-** get mapped to the full options below. Otherwise a
3281
+** get mapped to the full options below. Otherwise a
32783282
** string which can contain these placeholders:
32793283
** %n newline
32803284
** %% a raw %
32813285
** %H commit hash
32823286
** %h abbreviated commit hash
32833287
** %a author name
32843288
** %d date
3285
-** %c comment (NL, TAB replaced by space, LF deleted)
3289
+** %c comment (NL, TAB replaced by space, LF erased)
32863290
** %b branch
32873291
** %t tags
32883292
** %p phase: zero or more of *CURRENT*, *MERGE*,
32893293
** *FORK*, *UNPUBLISHED*, *LEAF*, *BRANCH*
32903294
** --oneline Show only short hash and comment for each entry
32913295
--- src/timeline.c
+++ src/timeline.c
@@ -41,11 +41,11 @@
41 "%h %c"
42 #define TIMELINE_FMT_MEDIUM \
43 "Commit: %h%nDate: %d%nAuthor: %a%nComment: %c"
44 #define TIMELINE_FMT_FULL \
45 "Commit: %H%nDate: %d%nAuthor: %a%nComment: %c%n"\
46 "Branch: %b%nTags: %t%nPhase: %p"
47 /*
48 ** Add an appropriate tag to the output if "rid" is unpublished (private)
49 */
50 #define UNPUB_TAG "<em>(unpublished)</em>"
51 void tag_private_status(int rid){
@@ -153,11 +153,11 @@
153 db_reset(&q);
154 return res;
155 }
156
157 /*
158 ** Return the text of the unformatted
159 ** forum post given by the RID in the argument.
160 */
161 static void forum_post_content_function(
162 sqlite3_context *context,
163 int argc,
@@ -366,11 +366,11 @@
366 zExtraClass = " tktTlClosed";
367 }else{
368 zExtraClass = " tktTlOpen";
369 }
370 fossil_free(zTktid);
371 }
372 }
373 if( zType[0]=='e' && tagid ){
374 if( bTimestampLinksToInfo ){
375 char *zId;
376 zId = db_text(0, "SELECT substr(tagname, 7) FROM tag WHERE tagid=%d",
@@ -676,11 +676,11 @@
676 }
677
678 if( tmFlags & TIMELINE_SHOWRID ){
679 int srcId = delta_source_rid(rid);
680 if( srcId ){
681 cgi_printf(" id:&nbsp;%z%d&larr;%d</a>",
682 href("%R/deltachain/%d",rid), rid, srcId);
683 }else{
684 cgi_printf(" id:&nbsp;%z%d</a>",
685 href("%R/deltachain/%d",rid), rid);
686 }
@@ -2222,11 +2222,11 @@
2222 blob_appendf(&desc, " of %z%h</a>",
2223 href("%R/info?name=%h", zCiName), zCiName);
2224 if( ridBackTo ){
2225 if( np==0 ){
2226 blob_reset(&desc);
2227 blob_appendf(&desc,
2228 "Check-in %z%h</a> only (%z%h</a> is not an ancestor)",
2229 href("%R/info?name=%h",zCiName), zCiName,
2230 href("%R/info?name=%h",zBackTo), zBackTo);
2231 }else{
2232 blob_appendf(&desc, " back to %z%h</a>",
@@ -2237,11 +2237,11 @@
2237 }
2238 }
2239 }else if( ridFwdTo ){
2240 if( nd==0 ){
2241 blob_reset(&desc);
2242 blob_appendf(&desc,
2243 "Check-in %z%h</a> only (%z%h</a> is not an descendant)",
2244 href("%R/info?name=%h",zCiName), zCiName,
2245 href("%R/info?name=%h",zFwdTo), zFwdTo);
2246 }else{
2247 blob_appendf(&desc, " up to %z%h</a>",
@@ -3017,24 +3017,27 @@
3017 ** 8. event-type: 'ci', 'w', 't', 'f', and so forth.
3018 ** 9. comment
3019 ** 10. user
3020 ** 11. tags
3021 */
3022 void print_timeline(Stmt *q, int nLimit, int width, const char *zFormat, int verboseFlag){
 
3023 int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
3024 int nLine = 0;
3025 int nEntry = 0;
3026 char zPrevDate[20];
3027 const char *zCurrentUuid = 0;
3028 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
3029 Stmt fchngQuery; /* Query for file changes on check-ins */
3030 int rc;
3031 /* True: separate entries with a newline after file listing */
3032 int bVerboseNL = (zFormat && (fossil_strcmp(zFormat, TIMELINE_FMT_ONELINE)!=0));
 
3033 /* True: separate entries with a newline even with no file listing */
3034 int bNoVerboseNL = (zFormat && (fossil_strcmp(zFormat, TIMELINE_FMT_MEDIUM)==0 ||
3035 fossil_strcmp(zFormat, TIMELINE_FMT_FULL)==0));
 
3036
3037 zPrevDate[0] = 0;
3038 if( g.localOpen ){
3039 int rid = db_lget_int("checkout", 0);
3040 zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -3122,12 +3125,13 @@
3122 char *zEntry;
3123 int nEntryLine = 0;
3124 if( nChild==0 ){
3125 sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*LEAF* ");
3126 }
3127 zEntry = timeline_entry_subst(zFormat, &nEntryLine, zId, zDate, zUserShort,
3128 zComShort, zBranch, zTags, zPrefix);
 
3129 nLine += nEntryLine;
3130 fossil_print("%s\n", zEntry);
3131 fossil_free(zEntry);
3132 }
3133 else{
@@ -3167,11 +3171,11 @@
3167 db_reset(&fchngQuery);
3168 if( bVerboseNL ) fossil_print("\n");
3169 }else{
3170 if( bNoVerboseNL ) fossil_print("\n");
3171 }
3172
3173 nEntry++; /* record another complete entry */
3174 }
3175 if( rc==SQLITE_DONE ){
3176 /* Did the underlying query actually have all entries? */
3177 if( nAbsLimit==0 ){
@@ -3211,11 +3215,11 @@
3211 @ , coalesce(euser,user,'?') AS user0
3212 @ , (SELECT case when length(x)>0 then x else '' end
3213 @ FROM (SELECT group_concat(substr(tagname,5), ', ') AS x
3214 @ FROM tag, tagxref
3215 @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
3216 @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0)) AS tags
3217 @ FROM tag CROSS JOIN event CROSS JOIN blob
3218 @ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid
3219 @ AND tagxref.tagtype>0
3220 @ AND tagxref.rid=blob.rid
3221 @ WHERE blob.rid=event.objid
@@ -3272,19 +3276,19 @@
3272 **
3273 ** Options:
3274 ** -b|--branch BRANCH Show only items on the branch named BRANCH
3275 ** -c|--current-branch Show only items on the current branch
3276 ** -F|--format Entry format. Values "oneline", "medium", and "full"
3277 ** get mapped to the full options below. Otherwise a
3278 ** string which can contain these placeholders:
3279 ** %n newline
3280 ** %% a raw %
3281 ** %H commit hash
3282 ** %h abbreviated commit hash
3283 ** %a author name
3284 ** %d date
3285 ** %c comment (NL, TAB replaced by space, LF deleted)
3286 ** %b branch
3287 ** %t tags
3288 ** %p phase: zero or more of *CURRENT*, *MERGE*,
3289 ** *FORK*, *UNPUBLISHED*, *LEAF*, *BRANCH*
3290 ** --oneline Show only short hash and comment for each entry
3291
--- src/timeline.c
+++ src/timeline.c
@@ -41,11 +41,11 @@
41 "%h %c"
42 #define TIMELINE_FMT_MEDIUM \
43 "Commit: %h%nDate: %d%nAuthor: %a%nComment: %c"
44 #define TIMELINE_FMT_FULL \
45 "Commit: %H%nDate: %d%nAuthor: %a%nComment: %c%n"\
46 "Branch: %b%nTags: %t%nPhase: %p"
47 /*
48 ** Add an appropriate tag to the output if "rid" is unpublished (private)
49 */
50 #define UNPUB_TAG "<em>(unpublished)</em>"
51 void tag_private_status(int rid){
@@ -153,11 +153,11 @@
153 db_reset(&q);
154 return res;
155 }
156
157 /*
158 ** Return the text of the unformatted
159 ** forum post given by the RID in the argument.
160 */
161 static void forum_post_content_function(
162 sqlite3_context *context,
163 int argc,
@@ -366,11 +366,11 @@
366 zExtraClass = " tktTlClosed";
367 }else{
368 zExtraClass = " tktTlOpen";
369 }
370 fossil_free(zTktid);
371 }
372 }
373 if( zType[0]=='e' && tagid ){
374 if( bTimestampLinksToInfo ){
375 char *zId;
376 zId = db_text(0, "SELECT substr(tagname, 7) FROM tag WHERE tagid=%d",
@@ -676,11 +676,11 @@
676 }
677
678 if( tmFlags & TIMELINE_SHOWRID ){
679 int srcId = delta_source_rid(rid);
680 if( srcId ){
681 cgi_printf(" id:&nbsp;%z%d&larr;%d</a>",
682 href("%R/deltachain/%d",rid), rid, srcId);
683 }else{
684 cgi_printf(" id:&nbsp;%z%d</a>",
685 href("%R/deltachain/%d",rid), rid);
686 }
@@ -2222,11 +2222,11 @@
2222 blob_appendf(&desc, " of %z%h</a>",
2223 href("%R/info?name=%h", zCiName), zCiName);
2224 if( ridBackTo ){
2225 if( np==0 ){
2226 blob_reset(&desc);
2227 blob_appendf(&desc,
2228 "Check-in %z%h</a> only (%z%h</a> is not an ancestor)",
2229 href("%R/info?name=%h",zCiName), zCiName,
2230 href("%R/info?name=%h",zBackTo), zBackTo);
2231 }else{
2232 blob_appendf(&desc, " back to %z%h</a>",
@@ -2237,11 +2237,11 @@
2237 }
2238 }
2239 }else if( ridFwdTo ){
2240 if( nd==0 ){
2241 blob_reset(&desc);
2242 blob_appendf(&desc,
2243 "Check-in %z%h</a> only (%z%h</a> is not an descendant)",
2244 href("%R/info?name=%h",zCiName), zCiName,
2245 href("%R/info?name=%h",zFwdTo), zFwdTo);
2246 }else{
2247 blob_appendf(&desc, " up to %z%h</a>",
@@ -3017,24 +3017,27 @@
3017 ** 8. event-type: 'ci', 'w', 't', 'f', and so forth.
3018 ** 9. comment
3019 ** 10. user
3020 ** 11. tags
3021 */
3022 void print_timeline(Stmt *q, int nLimit, int width, const char *zFormat,
3023 int verboseFlag){
3024 int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
3025 int nLine = 0;
3026 int nEntry = 0;
3027 char zPrevDate[20];
3028 const char *zCurrentUuid = 0;
3029 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
3030 Stmt fchngQuery; /* Query for file changes on check-ins */
3031 int rc;
3032 /* True: separate entries with a newline after file listing */
3033 int bVerboseNL = (zFormat &&
3034 (fossil_strcmp(zFormat, TIMELINE_FMT_ONELINE)!=0));
3035 /* True: separate entries with a newline even with no file listing */
3036 int bNoVerboseNL = (zFormat &&
3037 (fossil_strcmp(zFormat, TIMELINE_FMT_MEDIUM)==0 ||
3038 fossil_strcmp(zFormat, TIMELINE_FMT_FULL)==0));
3039
3040 zPrevDate[0] = 0;
3041 if( g.localOpen ){
3042 int rid = db_lget_int("checkout", 0);
3043 zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -3122,12 +3125,13 @@
3125 char *zEntry;
3126 int nEntryLine = 0;
3127 if( nChild==0 ){
3128 sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*LEAF* ");
3129 }
3130 zEntry = timeline_entry_subst(zFormat, &nEntryLine, zId, zDate,
3131 zUserShort, zComShort, zBranch, zTags,
3132 zPrefix);
3133 nLine += nEntryLine;
3134 fossil_print("%s\n", zEntry);
3135 fossil_free(zEntry);
3136 }
3137 else{
@@ -3167,11 +3171,11 @@
3171 db_reset(&fchngQuery);
3172 if( bVerboseNL ) fossil_print("\n");
3173 }else{
3174 if( bNoVerboseNL ) fossil_print("\n");
3175 }
3176
3177 nEntry++; /* record another complete entry */
3178 }
3179 if( rc==SQLITE_DONE ){
3180 /* Did the underlying query actually have all entries? */
3181 if( nAbsLimit==0 ){
@@ -3211,11 +3215,11 @@
3215 @ , coalesce(euser,user,'?') AS user0
3216 @ , (SELECT case when length(x)>0 then x else '' end
3217 @ FROM (SELECT group_concat(substr(tagname,5), ', ') AS x
3218 @ FROM tag, tagxref
3219 @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
3220 @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0)) AS tags
3221 @ FROM tag CROSS JOIN event CROSS JOIN blob
3222 @ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid
3223 @ AND tagxref.tagtype>0
3224 @ AND tagxref.rid=blob.rid
3225 @ WHERE blob.rid=event.objid
@@ -3272,19 +3276,19 @@
3276 **
3277 ** Options:
3278 ** -b|--branch BRANCH Show only items on the branch named BRANCH
3279 ** -c|--current-branch Show only items on the current branch
3280 ** -F|--format Entry format. Values "oneline", "medium", and "full"
3281 ** get mapped to the full options below. Otherwise a
3282 ** string which can contain these placeholders:
3283 ** %n newline
3284 ** %% a raw %
3285 ** %H commit hash
3286 ** %h abbreviated commit hash
3287 ** %a author name
3288 ** %d date
3289 ** %c comment (NL, TAB replaced by space, LF erased)
3290 ** %b branch
3291 ** %t tags
3292 ** %p phase: zero or more of *CURRENT*, *MERGE*,
3293 ** *FORK*, *UNPUBLISHED*, *LEAF*, *BRANCH*
3294 ** --oneline Show only short hash and comment for each entry
3295
+2 -2
--- src/tkt.c
+++ src/tkt.c
@@ -557,11 +557,11 @@
557557
if( sqlite3_stricmp(z2,"main")!=0
558558
&& sqlite3_stricmp(z2,"repository")!=0
559559
){
560560
goto ticket_schema_error;
561561
}
562
- if( sqlite3_strnicmp(z0,"ticket",6)!=0
562
+ if( sqlite3_strnicmp(z0,"ticket",6)!=0
563563
&& sqlite3_strnicmp(z0,"fx_",3)!=0
564564
){
565565
goto ticket_schema_error;
566566
}
567567
break;
@@ -1213,11 +1213,11 @@
12131213
/*
12141214
** WEBPAGE: tkttimeline
12151215
** URL: /tkttimeline/TICKETUUID
12161216
**
12171217
** Show the change history for a single ticket in timeline format.
1218
-**
1218
+**
12191219
** Query parameters:
12201220
**
12211221
** y=ci Show only check-ins associated with the ticket
12221222
*/
12231223
void tkttimeline_page(void){
12241224
--- src/tkt.c
+++ src/tkt.c
@@ -557,11 +557,11 @@
557 if( sqlite3_stricmp(z2,"main")!=0
558 && sqlite3_stricmp(z2,"repository")!=0
559 ){
560 goto ticket_schema_error;
561 }
562 if( sqlite3_strnicmp(z0,"ticket",6)!=0
563 && sqlite3_strnicmp(z0,"fx_",3)!=0
564 ){
565 goto ticket_schema_error;
566 }
567 break;
@@ -1213,11 +1213,11 @@
1213 /*
1214 ** WEBPAGE: tkttimeline
1215 ** URL: /tkttimeline/TICKETUUID
1216 **
1217 ** Show the change history for a single ticket in timeline format.
1218 **
1219 ** Query parameters:
1220 **
1221 ** y=ci Show only check-ins associated with the ticket
1222 */
1223 void tkttimeline_page(void){
1224
--- src/tkt.c
+++ src/tkt.c
@@ -557,11 +557,11 @@
557 if( sqlite3_stricmp(z2,"main")!=0
558 && sqlite3_stricmp(z2,"repository")!=0
559 ){
560 goto ticket_schema_error;
561 }
562 if( sqlite3_strnicmp(z0,"ticket",6)!=0
563 && sqlite3_strnicmp(z0,"fx_",3)!=0
564 ){
565 goto ticket_schema_error;
566 }
567 break;
@@ -1213,11 +1213,11 @@
1213 /*
1214 ** WEBPAGE: tkttimeline
1215 ** URL: /tkttimeline/TICKETUUID
1216 **
1217 ** Show the change history for a single ticket in timeline format.
1218 **
1219 ** Query parameters:
1220 **
1221 ** y=ci Show only check-ins associated with the ticket
1222 */
1223 void tkttimeline_page(void){
1224
+2 -1
--- src/unicode.c
+++ src/unicode.c
@@ -240,11 +240,12 @@
240240
iHi = iTest-1;
241241
}
242242
}
243243
assert( key>=aDia[iRes] );
244244
if( bComplex==0 && (aChar[iRes] & 0x80) ) return c;
245
- return (c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c : ((int)aChar[iRes] & 0x7F);
245
+ return (c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c :
246
+ ((int)aChar[iRes] & 0x7F);
246247
}
247248
248249
249250
/*
250251
** Return true if the argument interpreted as a unicode codepoint
251252
--- src/unicode.c
+++ src/unicode.c
@@ -240,11 +240,12 @@
240 iHi = iTest-1;
241 }
242 }
243 assert( key>=aDia[iRes] );
244 if( bComplex==0 && (aChar[iRes] & 0x80) ) return c;
245 return (c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c : ((int)aChar[iRes] & 0x7F);
 
246 }
247
248
249 /*
250 ** Return true if the argument interpreted as a unicode codepoint
251
--- src/unicode.c
+++ src/unicode.c
@@ -240,11 +240,12 @@
240 iHi = iTest-1;
241 }
242 }
243 assert( key>=aDia[iRes] );
244 if( bComplex==0 && (aChar[iRes] & 0x80) ) return c;
245 return (c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c :
246 ((int)aChar[iRes] & 0x7F);
247 }
248
249
250 /*
251 ** Return true if the argument interpreted as a unicode codepoint
252
+1 -1
--- src/update.c
+++ src/update.c
@@ -567,11 +567,11 @@
567567
fossil_print("%.79c\n",'-');
568568
if( nUpdate==0 ){
569569
show_common_info(tid, "checkout:", 1, 0);
570570
fossil_print("%-13s None. Already up-to-date\n", "changes:");
571571
}else{
572
- fossil_print("%-13s %.40s %s\n", "updated-from:", rid_to_uuid(vid),
572
+ fossil_print("%-13s %.40s %s\n", "updated-from:", rid_to_uuid(vid),
573573
db_text("", "SELECT datetime(mtime) || ' UTC' FROM event "
574574
" WHERE objid=%d", vid));
575575
show_common_info(tid, "updated-to:", 1, 0);
576576
fossil_print("%-13s %d file%s modified.\n", "changes:",
577577
nUpdate, nUpdate>1 ? "s" : "");
578578
--- src/update.c
+++ src/update.c
@@ -567,11 +567,11 @@
567 fossil_print("%.79c\n",'-');
568 if( nUpdate==0 ){
569 show_common_info(tid, "checkout:", 1, 0);
570 fossil_print("%-13s None. Already up-to-date\n", "changes:");
571 }else{
572 fossil_print("%-13s %.40s %s\n", "updated-from:", rid_to_uuid(vid),
573 db_text("", "SELECT datetime(mtime) || ' UTC' FROM event "
574 " WHERE objid=%d", vid));
575 show_common_info(tid, "updated-to:", 1, 0);
576 fossil_print("%-13s %d file%s modified.\n", "changes:",
577 nUpdate, nUpdate>1 ? "s" : "");
578
--- src/update.c
+++ src/update.c
@@ -567,11 +567,11 @@
567 fossil_print("%.79c\n",'-');
568 if( nUpdate==0 ){
569 show_common_info(tid, "checkout:", 1, 0);
570 fossil_print("%-13s None. Already up-to-date\n", "changes:");
571 }else{
572 fossil_print("%-13s %.40s %s\n", "updated-from:", rid_to_uuid(vid),
573 db_text("", "SELECT datetime(mtime) || ' UTC' FROM event "
574 " WHERE objid=%d", vid));
575 show_common_info(tid, "updated-to:", 1, 0);
576 fossil_print("%-13s %d file%s modified.\n", "changes:",
577 nUpdate, nUpdate>1 ? "s" : "");
578
+3 -3
--- src/url.c
+++ src/url.c
@@ -89,11 +89,11 @@
8989
** passwd Password.
9090
** hostname HOST:PORT or just HOST if port is the default.
9191
** canonical The URL in canonical form, omitting the password
9292
**
9393
** If URL_USECONFIG is set and zUrl is NULL or "default", then parse the
94
-** URL stored in last-sync-url and last-sync-pw of the CONFIG table. Or if
94
+** URL stored in last-sync-url and last-sync-pw of the CONFIG table. Or if
9595
** URL_USE_PARENT is also set, then use parent-project-url and
9696
** parent-project-pw from the CONFIG table instead of last-sync-url
9797
** and last-sync-pw.
9898
**
9999
** If URL_USE_CONFIG is set and zUrl is a symbolic name, then look up
@@ -317,11 +317,11 @@
317317
pUrlData->protocol = "file";
318318
pUrlData->path = mprintf("");
319319
pUrlData->name = mprintf("%b", &cfile);
320320
pUrlData->canonical = mprintf("file://%T", pUrlData->name);
321321
blob_reset(&cfile);
322
- }else if( pUrlData->user!=0 && pUrlData->passwd==0
322
+ }else if( pUrlData->user!=0 && pUrlData->passwd==0
323323
&& (urlFlags & URL_PROMPT_PW)!=0 ){
324324
url_prompt_for_password_local(pUrlData);
325325
}else if( pUrlData->user!=0 && ( urlFlags & URL_ASK_REMEMBER_PW ) ){
326326
if( isatty(fileno(stdin)) && ( urlFlags & URL_REMEMBER_PW )==0 ){
327327
if( save_password_prompt(pUrlData->passwd) ){
@@ -791,11 +791,11 @@
791791
**
792792
** * If the URL has a path, use the tail of the path, with any suffix
793793
** elided.
794794
**
795795
** * If the URL is just a domain name, without a path, then use the
796
-** first element of the domain name, except skip over "www." if
796
+** first element of the domain name, except skip over "www." if
797797
** present and if there is a ".com" or ".org" or similar suffix.
798798
**
799799
** The string returned is obtained from fossil_malloc(). NULL might be
800800
** returned if there is an error.
801801
*/
802802
--- src/url.c
+++ src/url.c
@@ -89,11 +89,11 @@
89 ** passwd Password.
90 ** hostname HOST:PORT or just HOST if port is the default.
91 ** canonical The URL in canonical form, omitting the password
92 **
93 ** If URL_USECONFIG is set and zUrl is NULL or "default", then parse the
94 ** URL stored in last-sync-url and last-sync-pw of the CONFIG table. Or if
95 ** URL_USE_PARENT is also set, then use parent-project-url and
96 ** parent-project-pw from the CONFIG table instead of last-sync-url
97 ** and last-sync-pw.
98 **
99 ** If URL_USE_CONFIG is set and zUrl is a symbolic name, then look up
@@ -317,11 +317,11 @@
317 pUrlData->protocol = "file";
318 pUrlData->path = mprintf("");
319 pUrlData->name = mprintf("%b", &cfile);
320 pUrlData->canonical = mprintf("file://%T", pUrlData->name);
321 blob_reset(&cfile);
322 }else if( pUrlData->user!=0 && pUrlData->passwd==0
323 && (urlFlags & URL_PROMPT_PW)!=0 ){
324 url_prompt_for_password_local(pUrlData);
325 }else if( pUrlData->user!=0 && ( urlFlags & URL_ASK_REMEMBER_PW ) ){
326 if( isatty(fileno(stdin)) && ( urlFlags & URL_REMEMBER_PW )==0 ){
327 if( save_password_prompt(pUrlData->passwd) ){
@@ -791,11 +791,11 @@
791 **
792 ** * If the URL has a path, use the tail of the path, with any suffix
793 ** elided.
794 **
795 ** * If the URL is just a domain name, without a path, then use the
796 ** first element of the domain name, except skip over "www." if
797 ** present and if there is a ".com" or ".org" or similar suffix.
798 **
799 ** The string returned is obtained from fossil_malloc(). NULL might be
800 ** returned if there is an error.
801 */
802
--- src/url.c
+++ src/url.c
@@ -89,11 +89,11 @@
89 ** passwd Password.
90 ** hostname HOST:PORT or just HOST if port is the default.
91 ** canonical The URL in canonical form, omitting the password
92 **
93 ** If URL_USECONFIG is set and zUrl is NULL or "default", then parse the
94 ** URL stored in last-sync-url and last-sync-pw of the CONFIG table. Or if
95 ** URL_USE_PARENT is also set, then use parent-project-url and
96 ** parent-project-pw from the CONFIG table instead of last-sync-url
97 ** and last-sync-pw.
98 **
99 ** If URL_USE_CONFIG is set and zUrl is a symbolic name, then look up
@@ -317,11 +317,11 @@
317 pUrlData->protocol = "file";
318 pUrlData->path = mprintf("");
319 pUrlData->name = mprintf("%b", &cfile);
320 pUrlData->canonical = mprintf("file://%T", pUrlData->name);
321 blob_reset(&cfile);
322 }else if( pUrlData->user!=0 && pUrlData->passwd==0
323 && (urlFlags & URL_PROMPT_PW)!=0 ){
324 url_prompt_for_password_local(pUrlData);
325 }else if( pUrlData->user!=0 && ( urlFlags & URL_ASK_REMEMBER_PW ) ){
326 if( isatty(fileno(stdin)) && ( urlFlags & URL_REMEMBER_PW )==0 ){
327 if( save_password_prompt(pUrlData->passwd) ){
@@ -791,11 +791,11 @@
791 **
792 ** * If the URL has a path, use the tail of the path, with any suffix
793 ** elided.
794 **
795 ** * If the URL is just a domain name, without a path, then use the
796 ** first element of the domain name, except skip over "www." if
797 ** present and if there is a ".com" or ".org" or similar suffix.
798 **
799 ** The string returned is obtained from fossil_malloc(). NULL might be
800 ** returned if there is an error.
801 */
802
+2 -1
--- src/user.c
+++ src/user.c
@@ -399,11 +399,12 @@
399399
db_lset("default-user", g.argv[3]);
400400
}else{
401401
db_set("default-user", g.argv[3], 0);
402402
}
403403
}
404
- }else if(( n>=2 && strncmp(g.argv[2],"list",n)==0 ) || ( n>=2 && strncmp(g.argv[2],"ls",n)==0 )){
404
+ }else if(( n>=2 && strncmp(g.argv[2],"list",n)==0 ) ||
405
+ ( n>=2 && strncmp(g.argv[2],"ls",n)==0 )){
405406
Stmt q;
406407
db_prepare(&q, "SELECT login, info FROM user ORDER BY login");
407408
while( db_step(&q)==SQLITE_ROW ){
408409
fossil_print("%-12s %s\n", db_column_text(&q, 0), db_column_text(&q, 1));
409410
}
410411
--- src/user.c
+++ src/user.c
@@ -399,11 +399,12 @@
399 db_lset("default-user", g.argv[3]);
400 }else{
401 db_set("default-user", g.argv[3], 0);
402 }
403 }
404 }else if(( n>=2 && strncmp(g.argv[2],"list",n)==0 ) || ( n>=2 && strncmp(g.argv[2],"ls",n)==0 )){
 
405 Stmt q;
406 db_prepare(&q, "SELECT login, info FROM user ORDER BY login");
407 while( db_step(&q)==SQLITE_ROW ){
408 fossil_print("%-12s %s\n", db_column_text(&q, 0), db_column_text(&q, 1));
409 }
410
--- src/user.c
+++ src/user.c
@@ -399,11 +399,12 @@
399 db_lset("default-user", g.argv[3]);
400 }else{
401 db_set("default-user", g.argv[3], 0);
402 }
403 }
404 }else if(( n>=2 && strncmp(g.argv[2],"list",n)==0 ) ||
405 ( n>=2 && strncmp(g.argv[2],"ls",n)==0 )){
406 Stmt q;
407 db_prepare(&q, "SELECT login, info FROM user ORDER BY login");
408 while( db_step(&q)==SQLITE_ROW ){
409 fossil_print("%-12s %s\n", db_column_text(&q, 0), db_column_text(&q, 1));
410 }
411
+5 -4
--- src/vfile.c
+++ src/vfile.c
@@ -410,11 +410,12 @@
410410
};
411411
int i, j, n;
412412
413413
if( sqlite3_strglob("ci-comment-????????????.txt", zName)==0 ) return 1;
414414
for(; zName[0]!=0; zName++){
415
- if( zName[0]=='/' && sqlite3_strglob("/ci-comment-????????????.txt", zName)==0 ){
415
+ if( zName[0]=='/'
416
+ && sqlite3_strglob("/ci-comment-????????????.txt", zName)==0 ){
416417
return 1;
417418
}
418419
if( zName[0]!='-' ) continue;
419420
for(i=0; i<count(azTemp); i++){
420421
n = (int)strlen(azTemp[i]);
@@ -754,11 +755,11 @@
754755
}
755756
fseek(in, 0L, SEEK_END);
756757
sqlite3_snprintf(sizeof(zBuf), zBuf, " %ld\n", ftell(in));
757758
fseek(in, 0L, SEEK_SET);
758759
md5sum_step_text(zBuf, -1);
759
- /*printf("%s %s %s",md5sum_current_state(),zName,zBuf); fflush(stdout);*/
760
+ /*printf("%s %s %s",md5sum_current_state(),zName,zBuf);fflush(stdout);*/
760761
for(;;){
761762
int n;
762763
n = fread(zBuf, 1, sizeof(zBuf), in);
763764
if( n<=0 ) break;
764765
md5sum_step_text(zBuf, n);
@@ -1041,17 +1042,17 @@
10411042
db_multi_exec(
10421043
"INSERT OR IGNORE INTO idMap(oldrid, newrid)"
10431044
" SELECT vfile.mrid, blob.rid FROM vfile, blob"
10441045
" WHERE blob.uuid=vfile.mhash;"
10451046
);
1046
-
1047
+
10471048
if( dryRun ){
10481049
Stmt q;
10491050
db_prepare(&q, "SELECT oldrid, newrid, blob.uuid"
10501051
" FROM idMap, blob WHERE blob.rid=idMap.newrid");
10511052
while( db_step(&q)==SQLITE_ROW ){
1052
- fossil_print("%8d -> %8d %.25s\n",
1053
+ fossil_print("%8d -> %8d %.25s\n",
10531054
db_column_int(&q,0),
10541055
db_column_int(&q,1),
10551056
db_column_text(&q,2));
10561057
}
10571058
db_finalize(&q);
10581059
--- src/vfile.c
+++ src/vfile.c
@@ -410,11 +410,12 @@
410 };
411 int i, j, n;
412
413 if( sqlite3_strglob("ci-comment-????????????.txt", zName)==0 ) return 1;
414 for(; zName[0]!=0; zName++){
415 if( zName[0]=='/' && sqlite3_strglob("/ci-comment-????????????.txt", zName)==0 ){
 
416 return 1;
417 }
418 if( zName[0]!='-' ) continue;
419 for(i=0; i<count(azTemp); i++){
420 n = (int)strlen(azTemp[i]);
@@ -754,11 +755,11 @@
754 }
755 fseek(in, 0L, SEEK_END);
756 sqlite3_snprintf(sizeof(zBuf), zBuf, " %ld\n", ftell(in));
757 fseek(in, 0L, SEEK_SET);
758 md5sum_step_text(zBuf, -1);
759 /*printf("%s %s %s",md5sum_current_state(),zName,zBuf); fflush(stdout);*/
760 for(;;){
761 int n;
762 n = fread(zBuf, 1, sizeof(zBuf), in);
763 if( n<=0 ) break;
764 md5sum_step_text(zBuf, n);
@@ -1041,17 +1042,17 @@
1041 db_multi_exec(
1042 "INSERT OR IGNORE INTO idMap(oldrid, newrid)"
1043 " SELECT vfile.mrid, blob.rid FROM vfile, blob"
1044 " WHERE blob.uuid=vfile.mhash;"
1045 );
1046
1047 if( dryRun ){
1048 Stmt q;
1049 db_prepare(&q, "SELECT oldrid, newrid, blob.uuid"
1050 " FROM idMap, blob WHERE blob.rid=idMap.newrid");
1051 while( db_step(&q)==SQLITE_ROW ){
1052 fossil_print("%8d -> %8d %.25s\n",
1053 db_column_int(&q,0),
1054 db_column_int(&q,1),
1055 db_column_text(&q,2));
1056 }
1057 db_finalize(&q);
1058
--- src/vfile.c
+++ src/vfile.c
@@ -410,11 +410,12 @@
410 };
411 int i, j, n;
412
413 if( sqlite3_strglob("ci-comment-????????????.txt", zName)==0 ) return 1;
414 for(; zName[0]!=0; zName++){
415 if( zName[0]=='/'
416 && sqlite3_strglob("/ci-comment-????????????.txt", zName)==0 ){
417 return 1;
418 }
419 if( zName[0]!='-' ) continue;
420 for(i=0; i<count(azTemp); i++){
421 n = (int)strlen(azTemp[i]);
@@ -754,11 +755,11 @@
755 }
756 fseek(in, 0L, SEEK_END);
757 sqlite3_snprintf(sizeof(zBuf), zBuf, " %ld\n", ftell(in));
758 fseek(in, 0L, SEEK_SET);
759 md5sum_step_text(zBuf, -1);
760 /*printf("%s %s %s",md5sum_current_state(),zName,zBuf);fflush(stdout);*/
761 for(;;){
762 int n;
763 n = fread(zBuf, 1, sizeof(zBuf), in);
764 if( n<=0 ) break;
765 md5sum_step_text(zBuf, n);
@@ -1041,17 +1042,17 @@
1042 db_multi_exec(
1043 "INSERT OR IGNORE INTO idMap(oldrid, newrid)"
1044 " SELECT vfile.mrid, blob.rid FROM vfile, blob"
1045 " WHERE blob.uuid=vfile.mhash;"
1046 );
1047
1048 if( dryRun ){
1049 Stmt q;
1050 db_prepare(&q, "SELECT oldrid, newrid, blob.uuid"
1051 " FROM idMap, blob WHERE blob.rid=idMap.newrid");
1052 while( db_step(&q)==SQLITE_ROW ){
1053 fossil_print("%8d -> %8d %.25s\n",
1054 db_column_int(&q,0),
1055 db_column_int(&q,1),
1056 db_column_text(&q,2));
1057 }
1058 db_finalize(&q);
1059
+12 -11
--- src/wiki.c
+++ src/wiki.c
@@ -85,11 +85,11 @@
8585
return db_int(0, "SELECT tagid FROM tag WHERE tagname='wiki-%q/%q'",
8686
zPrefix, zPageName);
8787
}
8888
8989
/*
90
-** Return the RID of the next or previous version of a wiki page.
90
+** Return the RID of the next or previous version of a wiki page.
9191
** Return 0 if rid is the last/first version.
9292
*/
9393
int wiki_next(int tagid, double mtime){
9494
return db_int(0,
9595
"SELECT srcid FROM tagxref"
@@ -413,11 +413,11 @@
413413
*/
414414
int wiki_page_type(const char *zPageName){
415415
if( db_get_boolean("wiki-about",1)==0 ){
416416
return WIKITYPE_NORMAL;
417417
}else
418
- if( sqlite3_strglob("checkin/*", zPageName)==0
418
+ if( sqlite3_strglob("checkin/*", zPageName)==0
419419
&& db_exists("SELECT 1 FROM blob WHERE uuid=%Q",zPageName+8)
420420
){
421421
return WIKITYPE_CHECKIN;
422422
}else
423423
if( sqlite3_strglob("branch/*", zPageName)==0 ){
@@ -447,11 +447,11 @@
447447
** Add an appropriate style_header() for either the /wiki or /wikiedit page
448448
** for zPageName. zExtra is an empty string for /wiki but has the text
449449
** "Edit: " for /wikiedit.
450450
**
451451
** If the page is /wiki and the page is one of the special times (check-in,
452
-** branch, or tag) and the "p" query parameter is omitted, then do a
452
+** branch, or tag) and the "p" query parameter is omitted, then do a
453453
** redirect to the display of the check-in, branch, or tag rather than
454454
** continuing to the plain wiki display.
455455
*/
456456
static int wiki_page_header(
457457
int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
@@ -469,11 +469,12 @@
469469
zPageName += 8;
470470
if( zExtra[0]==0 && !P("p") ){
471471
cgi_redirectf("%R/info/%s",zPageName);
472472
}else{
473473
style_header("Notes About Check-in %S", zPageName);
474
- style_submenu_element("Check-in Timeline","%R/timeline?f=%s", zPageName);
474
+ style_submenu_element("Check-in Timeline","%R/timeline?f=%s",
475
+ zPageName);
475476
style_submenu_element("Check-in Info","%R/info/%s", zPageName);
476477
}
477478
break;
478479
}
479480
case WIKITYPE_BRANCH: {
@@ -743,11 +744,11 @@
743744
** a sandbox page, but it is reported as writable here (with rid 0).
744745
*/
745746
static int wiki_ajax_can_write(const char *zPageName, int * pRid){
746747
int rid = 0;
747748
const char * zErr = 0;
748
-
749
+
749750
if(pRid) *pRid = 0;
750751
if(!zPageName || !*zPageName
751752
|| !wiki_name_is_wellformed((unsigned const char *)zPageName)){
752753
zErr = "Invalid page name.";
753754
}else if(is_sandbox(zPageName)){
@@ -766,11 +767,11 @@
766767
}else{
767768
zErr = "Cannot happen! Please report this as a bug.";
768769
}
769770
}
770771
ajax_route_error(403, "%s", zErr);
771
- return 0;
772
+ return 0;
772773
}
773774
774775
775776
/*
776777
** Emits an array of attachment info records for the given wiki page
@@ -1012,11 +1013,11 @@
10121013
** ajax_route_error(). On success, an object in the form documented
10131014
** for wiki_ajax_emit_page_object().
10141015
*/
10151016
static void wiki_ajax_route_fetch(void){
10161017
const char * zPageName = P("page");
1017
-
1018
+
10181019
if( zPageName==0 || zPageName[0]==0 ){
10191020
ajax_route_error(400,"Missing page name.");
10201021
return;
10211022
}
10221023
cgi_set_content_type("application/json");
@@ -1203,11 +1204,11 @@
12031204
/*
12041205
** WEBPAGE: wikiajax hidden
12051206
**
12061207
** An internal dispatcher for wiki AJAX operations. Not for direct
12071208
** client use. All routes defined by this interface are app-internal,
1208
-** subject to change
1209
+** subject to change
12091210
*/
12101211
void wiki_ajax_page(void){
12111212
const char * zName = P("name");
12121213
AjaxRoute routeName = {0,0,0,0};
12131214
const AjaxRoute * pRoute = 0;
@@ -1343,11 +1344,11 @@
13431344
"class='hidden'"
13441345
">");
13451346
CX("<div>Loading wiki pages list...</div>");
13461347
CX("</div>"/*#wikiedit-tab-pages*/);
13471348
}
1348
-
1349
+
13491350
/******* Content tab *******/
13501351
{
13511352
CX("<div id='wikiedit-tab-content' "
13521353
"data-tab-parent='wikiedit-tabs' "
13531354
"data-tab-label='Editor' "
@@ -1905,11 +1906,11 @@
19051906
** wmtime time most recent version was created
19061907
** wcnt Number of versions of this wiki page
19071908
**
19081909
** The wrid value is zero for deleted wiki pages.
19091910
*/
1910
-static const char listAllWikiPages[] =
1911
+static const char listAllWikiPages[] =
19111912
@ SELECT
19121913
@ substr(tag.tagname, 6) AS wname,
19131914
@ lower(substr(tag.tagname, 6)) AS sortname,
19141915
@ tagxref.value+0 AS wrid,
19151916
@ max(tagxref.mtime) AS wmtime,
@@ -2482,11 +2483,11 @@
24822483
const char *zName = db_column_text(&q, 0);
24832484
const int wrid = db_column_int(&q, 2);
24842485
if(!showAll && !wrid){
24852486
continue;
24862487
}
2487
- if( !showCkBr &&
2488
+ if( !showCkBr &&
24882489
(sqlite3_strglob("checkin/*", zName)==0 ||
24892490
sqlite3_strglob("branch/*", zName)==0) ){
24902491
continue;
24912492
}
24922493
if( showIds ){
24932494
--- src/wiki.c
+++ src/wiki.c
@@ -85,11 +85,11 @@
85 return db_int(0, "SELECT tagid FROM tag WHERE tagname='wiki-%q/%q'",
86 zPrefix, zPageName);
87 }
88
89 /*
90 ** Return the RID of the next or previous version of a wiki page.
91 ** Return 0 if rid is the last/first version.
92 */
93 int wiki_next(int tagid, double mtime){
94 return db_int(0,
95 "SELECT srcid FROM tagxref"
@@ -413,11 +413,11 @@
413 */
414 int wiki_page_type(const char *zPageName){
415 if( db_get_boolean("wiki-about",1)==0 ){
416 return WIKITYPE_NORMAL;
417 }else
418 if( sqlite3_strglob("checkin/*", zPageName)==0
419 && db_exists("SELECT 1 FROM blob WHERE uuid=%Q",zPageName+8)
420 ){
421 return WIKITYPE_CHECKIN;
422 }else
423 if( sqlite3_strglob("branch/*", zPageName)==0 ){
@@ -447,11 +447,11 @@
447 ** Add an appropriate style_header() for either the /wiki or /wikiedit page
448 ** for zPageName. zExtra is an empty string for /wiki but has the text
449 ** "Edit: " for /wikiedit.
450 **
451 ** If the page is /wiki and the page is one of the special times (check-in,
452 ** branch, or tag) and the "p" query parameter is omitted, then do a
453 ** redirect to the display of the check-in, branch, or tag rather than
454 ** continuing to the plain wiki display.
455 */
456 static int wiki_page_header(
457 int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
@@ -469,11 +469,12 @@
469 zPageName += 8;
470 if( zExtra[0]==0 && !P("p") ){
471 cgi_redirectf("%R/info/%s",zPageName);
472 }else{
473 style_header("Notes About Check-in %S", zPageName);
474 style_submenu_element("Check-in Timeline","%R/timeline?f=%s", zPageName);
 
475 style_submenu_element("Check-in Info","%R/info/%s", zPageName);
476 }
477 break;
478 }
479 case WIKITYPE_BRANCH: {
@@ -743,11 +744,11 @@
743 ** a sandbox page, but it is reported as writable here (with rid 0).
744 */
745 static int wiki_ajax_can_write(const char *zPageName, int * pRid){
746 int rid = 0;
747 const char * zErr = 0;
748
749 if(pRid) *pRid = 0;
750 if(!zPageName || !*zPageName
751 || !wiki_name_is_wellformed((unsigned const char *)zPageName)){
752 zErr = "Invalid page name.";
753 }else if(is_sandbox(zPageName)){
@@ -766,11 +767,11 @@
766 }else{
767 zErr = "Cannot happen! Please report this as a bug.";
768 }
769 }
770 ajax_route_error(403, "%s", zErr);
771 return 0;
772 }
773
774
775 /*
776 ** Emits an array of attachment info records for the given wiki page
@@ -1012,11 +1013,11 @@
1012 ** ajax_route_error(). On success, an object in the form documented
1013 ** for wiki_ajax_emit_page_object().
1014 */
1015 static void wiki_ajax_route_fetch(void){
1016 const char * zPageName = P("page");
1017
1018 if( zPageName==0 || zPageName[0]==0 ){
1019 ajax_route_error(400,"Missing page name.");
1020 return;
1021 }
1022 cgi_set_content_type("application/json");
@@ -1203,11 +1204,11 @@
1203 /*
1204 ** WEBPAGE: wikiajax hidden
1205 **
1206 ** An internal dispatcher for wiki AJAX operations. Not for direct
1207 ** client use. All routes defined by this interface are app-internal,
1208 ** subject to change
1209 */
1210 void wiki_ajax_page(void){
1211 const char * zName = P("name");
1212 AjaxRoute routeName = {0,0,0,0};
1213 const AjaxRoute * pRoute = 0;
@@ -1343,11 +1344,11 @@
1343 "class='hidden'"
1344 ">");
1345 CX("<div>Loading wiki pages list...</div>");
1346 CX("</div>"/*#wikiedit-tab-pages*/);
1347 }
1348
1349 /******* Content tab *******/
1350 {
1351 CX("<div id='wikiedit-tab-content' "
1352 "data-tab-parent='wikiedit-tabs' "
1353 "data-tab-label='Editor' "
@@ -1905,11 +1906,11 @@
1905 ** wmtime time most recent version was created
1906 ** wcnt Number of versions of this wiki page
1907 **
1908 ** The wrid value is zero for deleted wiki pages.
1909 */
1910 static const char listAllWikiPages[] =
1911 @ SELECT
1912 @ substr(tag.tagname, 6) AS wname,
1913 @ lower(substr(tag.tagname, 6)) AS sortname,
1914 @ tagxref.value+0 AS wrid,
1915 @ max(tagxref.mtime) AS wmtime,
@@ -2482,11 +2483,11 @@
2482 const char *zName = db_column_text(&q, 0);
2483 const int wrid = db_column_int(&q, 2);
2484 if(!showAll && !wrid){
2485 continue;
2486 }
2487 if( !showCkBr &&
2488 (sqlite3_strglob("checkin/*", zName)==0 ||
2489 sqlite3_strglob("branch/*", zName)==0) ){
2490 continue;
2491 }
2492 if( showIds ){
2493
--- src/wiki.c
+++ src/wiki.c
@@ -85,11 +85,11 @@
85 return db_int(0, "SELECT tagid FROM tag WHERE tagname='wiki-%q/%q'",
86 zPrefix, zPageName);
87 }
88
89 /*
90 ** Return the RID of the next or previous version of a wiki page.
91 ** Return 0 if rid is the last/first version.
92 */
93 int wiki_next(int tagid, double mtime){
94 return db_int(0,
95 "SELECT srcid FROM tagxref"
@@ -413,11 +413,11 @@
413 */
414 int wiki_page_type(const char *zPageName){
415 if( db_get_boolean("wiki-about",1)==0 ){
416 return WIKITYPE_NORMAL;
417 }else
418 if( sqlite3_strglob("checkin/*", zPageName)==0
419 && db_exists("SELECT 1 FROM blob WHERE uuid=%Q",zPageName+8)
420 ){
421 return WIKITYPE_CHECKIN;
422 }else
423 if( sqlite3_strglob("branch/*", zPageName)==0 ){
@@ -447,11 +447,11 @@
447 ** Add an appropriate style_header() for either the /wiki or /wikiedit page
448 ** for zPageName. zExtra is an empty string for /wiki but has the text
449 ** "Edit: " for /wikiedit.
450 **
451 ** If the page is /wiki and the page is one of the special times (check-in,
452 ** branch, or tag) and the "p" query parameter is omitted, then do a
453 ** redirect to the display of the check-in, branch, or tag rather than
454 ** continuing to the plain wiki display.
455 */
456 static int wiki_page_header(
457 int eType, /* Page type. Might be WIKITYPE_UNKNOWN */
@@ -469,11 +469,12 @@
469 zPageName += 8;
470 if( zExtra[0]==0 && !P("p") ){
471 cgi_redirectf("%R/info/%s",zPageName);
472 }else{
473 style_header("Notes About Check-in %S", zPageName);
474 style_submenu_element("Check-in Timeline","%R/timeline?f=%s",
475 zPageName);
476 style_submenu_element("Check-in Info","%R/info/%s", zPageName);
477 }
478 break;
479 }
480 case WIKITYPE_BRANCH: {
@@ -743,11 +744,11 @@
744 ** a sandbox page, but it is reported as writable here (with rid 0).
745 */
746 static int wiki_ajax_can_write(const char *zPageName, int * pRid){
747 int rid = 0;
748 const char * zErr = 0;
749
750 if(pRid) *pRid = 0;
751 if(!zPageName || !*zPageName
752 || !wiki_name_is_wellformed((unsigned const char *)zPageName)){
753 zErr = "Invalid page name.";
754 }else if(is_sandbox(zPageName)){
@@ -766,11 +767,11 @@
767 }else{
768 zErr = "Cannot happen! Please report this as a bug.";
769 }
770 }
771 ajax_route_error(403, "%s", zErr);
772 return 0;
773 }
774
775
776 /*
777 ** Emits an array of attachment info records for the given wiki page
@@ -1012,11 +1013,11 @@
1013 ** ajax_route_error(). On success, an object in the form documented
1014 ** for wiki_ajax_emit_page_object().
1015 */
1016 static void wiki_ajax_route_fetch(void){
1017 const char * zPageName = P("page");
1018
1019 if( zPageName==0 || zPageName[0]==0 ){
1020 ajax_route_error(400,"Missing page name.");
1021 return;
1022 }
1023 cgi_set_content_type("application/json");
@@ -1203,11 +1204,11 @@
1204 /*
1205 ** WEBPAGE: wikiajax hidden
1206 **
1207 ** An internal dispatcher for wiki AJAX operations. Not for direct
1208 ** client use. All routes defined by this interface are app-internal,
1209 ** subject to change
1210 */
1211 void wiki_ajax_page(void){
1212 const char * zName = P("name");
1213 AjaxRoute routeName = {0,0,0,0};
1214 const AjaxRoute * pRoute = 0;
@@ -1343,11 +1344,11 @@
1344 "class='hidden'"
1345 ">");
1346 CX("<div>Loading wiki pages list...</div>");
1347 CX("</div>"/*#wikiedit-tab-pages*/);
1348 }
1349
1350 /******* Content tab *******/
1351 {
1352 CX("<div id='wikiedit-tab-content' "
1353 "data-tab-parent='wikiedit-tabs' "
1354 "data-tab-label='Editor' "
@@ -1905,11 +1906,11 @@
1906 ** wmtime time most recent version was created
1907 ** wcnt Number of versions of this wiki page
1908 **
1909 ** The wrid value is zero for deleted wiki pages.
1910 */
1911 static const char listAllWikiPages[] =
1912 @ SELECT
1913 @ substr(tag.tagname, 6) AS wname,
1914 @ lower(substr(tag.tagname, 6)) AS sortname,
1915 @ tagxref.value+0 AS wrid,
1916 @ max(tagxref.mtime) AS wmtime,
@@ -2482,11 +2483,11 @@
2483 const char *zName = db_column_text(&q, 0);
2484 const int wrid = db_column_int(&q, 2);
2485 if(!showAll && !wrid){
2486 continue;
2487 }
2488 if( !showCkBr &&
2489 (sqlite3_strglob("checkin/*", zName)==0 ||
2490 sqlite3_strglob("branch/*", zName)==0) ){
2491 continue;
2492 }
2493 if( showIds ){
2494
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -2219,11 +2219,11 @@
22192219
iMatchCnt = 2;
22202220
}else if( iMatchCnt==2 ){
22212221
if( (zStart[0]=='"' || zStart[0]=='\'') && zStart[n-1]==zStart[0] ){
22222222
zStart++;
22232223
n -= 2;
2224
- }
2224
+ }
22252225
*pLen = n;
22262226
return zStart;
22272227
}else{
22282228
iMatchCnt = 0;
22292229
}
22302230
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -2219,11 +2219,11 @@
2219 iMatchCnt = 2;
2220 }else if( iMatchCnt==2 ){
2221 if( (zStart[0]=='"' || zStart[0]=='\'') && zStart[n-1]==zStart[0] ){
2222 zStart++;
2223 n -= 2;
2224 }
2225 *pLen = n;
2226 return zStart;
2227 }else{
2228 iMatchCnt = 0;
2229 }
2230
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -2219,11 +2219,11 @@
2219 iMatchCnt = 2;
2220 }else if( iMatchCnt==2 ){
2221 if( (zStart[0]=='"' || zStart[0]=='\'') && zStart[n-1]==zStart[0] ){
2222 zStart++;
2223 n -= 2;
2224 }
2225 *pLen = n;
2226 return zStart;
2227 }else{
2228 iMatchCnt = 0;
2229 }
2230
+7 -7
--- src/winhttp.c
+++ src/winhttp.c
@@ -668,11 +668,11 @@
668668
/* Use a subdirectory for temp files (can then be excluded from virus scan) */
669669
zTempSubDirPath = mprintf("%s%s\\",fossil_path_to_utf8(zTmpPath),zTempSubDir);
670670
if ( !file_mkdir(zTempSubDirPath, ExtFILE, 0) ||
671671
file_isdir(zTempSubDirPath, ExtFILE)==1 ){
672672
wcscpy(zTmpPath, fossil_utf8_to_path(zTempSubDirPath, 1));
673
- }
673
+ }
674674
if( g.fHttpTrace ){
675675
zTempPrefix = mprintf("httptrace");
676676
}else{
677677
zTempPrefix = mprintf("%sfossil_server_P%d",
678678
fossil_unicode_to_utf8(zTmpPath), iPort);
@@ -1372,16 +1372,16 @@
13721372
SERVICE_ALL_ACCESS);
13731373
if( !hSvc ) winhttp_fatal("start", zSvcName, win32_get_last_errmsg());
13741374
QueryServiceStatus(hSvc, &sstat);
13751375
if( sstat.dwCurrentState!=SERVICE_RUNNING ){
13761376
fossil_print("Starting service '%s'", zSvcName);
1377
- if( sstat.dwCurrentState!=SERVICE_START_PENDING ){
1378
- if( !StartServiceW(hSvc, 0, NULL) ){
1379
- winhttp_fatal("start", zSvcName, win32_get_last_errmsg());
1380
- }
1381
- QueryServiceStatus(hSvc, &sstat);
1382
- }
1377
+ if( sstat.dwCurrentState!=SERVICE_START_PENDING ){
1378
+ if( !StartServiceW(hSvc, 0, NULL) ){
1379
+ winhttp_fatal("start", zSvcName, win32_get_last_errmsg());
1380
+ }
1381
+ QueryServiceStatus(hSvc, &sstat);
1382
+ }
13831383
while( sstat.dwCurrentState==SERVICE_START_PENDING ||
13841384
sstat.dwCurrentState==SERVICE_STOPPED ){
13851385
Sleep(100);
13861386
fossil_print(".");
13871387
QueryServiceStatus(hSvc, &sstat);
13881388
--- src/winhttp.c
+++ src/winhttp.c
@@ -668,11 +668,11 @@
668 /* Use a subdirectory for temp files (can then be excluded from virus scan) */
669 zTempSubDirPath = mprintf("%s%s\\",fossil_path_to_utf8(zTmpPath),zTempSubDir);
670 if ( !file_mkdir(zTempSubDirPath, ExtFILE, 0) ||
671 file_isdir(zTempSubDirPath, ExtFILE)==1 ){
672 wcscpy(zTmpPath, fossil_utf8_to_path(zTempSubDirPath, 1));
673 }
674 if( g.fHttpTrace ){
675 zTempPrefix = mprintf("httptrace");
676 }else{
677 zTempPrefix = mprintf("%sfossil_server_P%d",
678 fossil_unicode_to_utf8(zTmpPath), iPort);
@@ -1372,16 +1372,16 @@
1372 SERVICE_ALL_ACCESS);
1373 if( !hSvc ) winhttp_fatal("start", zSvcName, win32_get_last_errmsg());
1374 QueryServiceStatus(hSvc, &sstat);
1375 if( sstat.dwCurrentState!=SERVICE_RUNNING ){
1376 fossil_print("Starting service '%s'", zSvcName);
1377 if( sstat.dwCurrentState!=SERVICE_START_PENDING ){
1378 if( !StartServiceW(hSvc, 0, NULL) ){
1379 winhttp_fatal("start", zSvcName, win32_get_last_errmsg());
1380 }
1381 QueryServiceStatus(hSvc, &sstat);
1382 }
1383 while( sstat.dwCurrentState==SERVICE_START_PENDING ||
1384 sstat.dwCurrentState==SERVICE_STOPPED ){
1385 Sleep(100);
1386 fossil_print(".");
1387 QueryServiceStatus(hSvc, &sstat);
1388
--- src/winhttp.c
+++ src/winhttp.c
@@ -668,11 +668,11 @@
668 /* Use a subdirectory for temp files (can then be excluded from virus scan) */
669 zTempSubDirPath = mprintf("%s%s\\",fossil_path_to_utf8(zTmpPath),zTempSubDir);
670 if ( !file_mkdir(zTempSubDirPath, ExtFILE, 0) ||
671 file_isdir(zTempSubDirPath, ExtFILE)==1 ){
672 wcscpy(zTmpPath, fossil_utf8_to_path(zTempSubDirPath, 1));
673 }
674 if( g.fHttpTrace ){
675 zTempPrefix = mprintf("httptrace");
676 }else{
677 zTempPrefix = mprintf("%sfossil_server_P%d",
678 fossil_unicode_to_utf8(zTmpPath), iPort);
@@ -1372,16 +1372,16 @@
1372 SERVICE_ALL_ACCESS);
1373 if( !hSvc ) winhttp_fatal("start", zSvcName, win32_get_last_errmsg());
1374 QueryServiceStatus(hSvc, &sstat);
1375 if( sstat.dwCurrentState!=SERVICE_RUNNING ){
1376 fossil_print("Starting service '%s'", zSvcName);
1377 if( sstat.dwCurrentState!=SERVICE_START_PENDING ){
1378 if( !StartServiceW(hSvc, 0, NULL) ){
1379 winhttp_fatal("start", zSvcName, win32_get_last_errmsg());
1380 }
1381 QueryServiceStatus(hSvc, &sstat);
1382 }
1383 while( sstat.dwCurrentState==SERVICE_START_PENDING ||
1384 sstat.dwCurrentState==SERVICE_STOPPED ){
1385 Sleep(100);
1386 fossil_print(".");
1387 QueryServiceStatus(hSvc, &sstat);
1388
+4 -4
--- src/xfer.c
+++ src/xfer.c
@@ -355,11 +355,11 @@
355355
nullContent = 1;
356356
}
357357
358358
/* The isWriter flag must be true in order to land the new file */
359359
if( !isWriter ){
360
- blob_appendf(&pXfer->err, "Write permissions for unversioned files missing");
360
+ blob_appendf(&pXfer->err,"Write permissions for unversioned files missing");
361361
goto end_accept_unversioned_file;
362362
}
363363
364364
/* Make sure we have a valid g.rcvid marker */
365365
content_rcvid_init(0);
@@ -1834,11 +1834,11 @@
18341834
memset(&x, 0, sizeof(x));
18351835
url_parse_local(zUrl, URL_OMIT_USER, &x);
18361836
if( x.name!=0 && sqlite3_strlike("%localhost%", x.name, 0)!=0 ){
18371837
@ pragma link %F(x.canonical) %F(zArg) %lld(iMtime)
18381838
}
1839
- url_unparse(&x);
1839
+ url_unparse(&x);
18401840
}
18411841
db_finalize(&q);
18421842
}
18431843
18441844
/* Send the server timestamp last, in case prior processing happened
@@ -1859,11 +1859,11 @@
18591859
**
18601860
** Pass the sync-protocol input file XFERFILE into the server-side sync
18611861
** protocol handler. Generate a reply on standard output.
18621862
**
18631863
** This command was original created to help debug the server side of
1864
-** sync messages. The XFERFILE is the uncompressed content of an
1864
+** sync messages. The XFERFILE is the uncompressed content of an
18651865
** "xfer" HTTP request from client to server. This command interprets
18661866
** that message and generates the content of an HTTP reply (without any
18671867
** encoding and without the HTTP reply headers) and writes that reply
18681868
** on standard output.
18691869
**
@@ -2528,11 +2528,11 @@
25282528
"Warning: uv-pull-only \n"
25292529
" Unable to push unversioned content because you lack\n"
25302530
" sufficient permission on the server\n"
25312531
);
25322532
uvPullOnly = 2;
2533
- }
2533
+ }
25342534
if( iStatus<=3 || uvPullOnly ){
25352535
db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
25362536
}else if( iStatus==4 ){
25372537
db_multi_exec("UPDATE uv_tosend SET mtimeOnly=1 WHERE name=%Q",zName);
25382538
}else if( iStatus==5 ){
25392539
--- src/xfer.c
+++ src/xfer.c
@@ -355,11 +355,11 @@
355 nullContent = 1;
356 }
357
358 /* The isWriter flag must be true in order to land the new file */
359 if( !isWriter ){
360 blob_appendf(&pXfer->err, "Write permissions for unversioned files missing");
361 goto end_accept_unversioned_file;
362 }
363
364 /* Make sure we have a valid g.rcvid marker */
365 content_rcvid_init(0);
@@ -1834,11 +1834,11 @@
1834 memset(&x, 0, sizeof(x));
1835 url_parse_local(zUrl, URL_OMIT_USER, &x);
1836 if( x.name!=0 && sqlite3_strlike("%localhost%", x.name, 0)!=0 ){
1837 @ pragma link %F(x.canonical) %F(zArg) %lld(iMtime)
1838 }
1839 url_unparse(&x);
1840 }
1841 db_finalize(&q);
1842 }
1843
1844 /* Send the server timestamp last, in case prior processing happened
@@ -1859,11 +1859,11 @@
1859 **
1860 ** Pass the sync-protocol input file XFERFILE into the server-side sync
1861 ** protocol handler. Generate a reply on standard output.
1862 **
1863 ** This command was original created to help debug the server side of
1864 ** sync messages. The XFERFILE is the uncompressed content of an
1865 ** "xfer" HTTP request from client to server. This command interprets
1866 ** that message and generates the content of an HTTP reply (without any
1867 ** encoding and without the HTTP reply headers) and writes that reply
1868 ** on standard output.
1869 **
@@ -2528,11 +2528,11 @@
2528 "Warning: uv-pull-only \n"
2529 " Unable to push unversioned content because you lack\n"
2530 " sufficient permission on the server\n"
2531 );
2532 uvPullOnly = 2;
2533 }
2534 if( iStatus<=3 || uvPullOnly ){
2535 db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
2536 }else if( iStatus==4 ){
2537 db_multi_exec("UPDATE uv_tosend SET mtimeOnly=1 WHERE name=%Q",zName);
2538 }else if( iStatus==5 ){
2539
--- src/xfer.c
+++ src/xfer.c
@@ -355,11 +355,11 @@
355 nullContent = 1;
356 }
357
358 /* The isWriter flag must be true in order to land the new file */
359 if( !isWriter ){
360 blob_appendf(&pXfer->err,"Write permissions for unversioned files missing");
361 goto end_accept_unversioned_file;
362 }
363
364 /* Make sure we have a valid g.rcvid marker */
365 content_rcvid_init(0);
@@ -1834,11 +1834,11 @@
1834 memset(&x, 0, sizeof(x));
1835 url_parse_local(zUrl, URL_OMIT_USER, &x);
1836 if( x.name!=0 && sqlite3_strlike("%localhost%", x.name, 0)!=0 ){
1837 @ pragma link %F(x.canonical) %F(zArg) %lld(iMtime)
1838 }
1839 url_unparse(&x);
1840 }
1841 db_finalize(&q);
1842 }
1843
1844 /* Send the server timestamp last, in case prior processing happened
@@ -1859,11 +1859,11 @@
1859 **
1860 ** Pass the sync-protocol input file XFERFILE into the server-side sync
1861 ** protocol handler. Generate a reply on standard output.
1862 **
1863 ** This command was original created to help debug the server side of
1864 ** sync messages. The XFERFILE is the uncompressed content of an
1865 ** "xfer" HTTP request from client to server. This command interprets
1866 ** that message and generates the content of an HTTP reply (without any
1867 ** encoding and without the HTTP reply headers) and writes that reply
1868 ** on standard output.
1869 **
@@ -2528,11 +2528,11 @@
2528 "Warning: uv-pull-only \n"
2529 " Unable to push unversioned content because you lack\n"
2530 " sufficient permission on the server\n"
2531 );
2532 uvPullOnly = 2;
2533 }
2534 if( iStatus<=3 || uvPullOnly ){
2535 db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
2536 }else if( iStatus==4 ){
2537 db_multi_exec("UPDATE uv_tosend SET mtimeOnly=1 WHERE name=%Q",zName);
2538 }else if( iStatus==5 ){
2539
+17 -17
--- src/zip.c
+++ src/zip.c
@@ -138,11 +138,11 @@
138138
static int archiveDeviceCharacteristics(sqlite3_file *pFile){
139139
return 0;
140140
}
141141
142142
static int archiveOpen(
143
- sqlite3_vfs *pVfs, const char *zName,
143
+ sqlite3_vfs *pVfs, const char *zName,
144144
sqlite3_file *pFile, int flags, int *pOutFlags
145145
){
146146
static struct sqlite3_io_methods methods = {
147147
1, /* iVersion */
148148
archiveClose,
@@ -247,12 +247,12 @@
247247
** pFile is the file to be appended. zName is the name
248248
** that the file should be saved as.
249249
*/
250250
static void zip_add_file_to_zip(
251251
Archive *p,
252
- const char *zName,
253
- const Blob *pFile,
252
+ const char *zName,
253
+ const Blob *pFile,
254254
int mPerm
255255
){
256256
z_stream stream;
257257
int nameLen;
258258
int toOut = 0;
@@ -374,12 +374,12 @@
374374
nEntry++;
375375
}
376376
377377
static void zip_add_file_to_sqlar(
378378
Archive *p,
379
- const char *zName,
380
- const Blob *pFile,
379
+ const char *zName,
380
+ const Blob *pFile,
381381
int mPerm
382382
){
383383
int nName = (int)strlen(zName);
384384
385385
if( p->db==0 ){
@@ -396,16 +396,16 @@
396396
p->vfs.xRandomness = archiveRandomness;
397397
p->vfs.xSleep = archiveSleep;
398398
p->vfs.xCurrentTime = archiveCurrentTime;
399399
p->vfs.xGetLastError = archiveGetLastError;
400400
sqlite3_vfs_register(&p->vfs, 0);
401
- sqlite3_open_v2("file:xyz.db", &p->db,
401
+ sqlite3_open_v2("file:xyz.db", &p->db,
402402
SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE, p->vfs.zName
403403
);
404404
assert( p->db );
405405
blob_zero(&p->tmp);
406
- sqlite3_exec(p->db,
406
+ sqlite3_exec(p->db,
407407
"PRAGMA page_size=512;"
408408
"PRAGMA journal_mode = off;"
409409
"PRAGMA cache_spill = off;"
410410
"BEGIN;"
411411
"CREATE TABLE sqlar("
@@ -414,12 +414,12 @@
414414
"mtime INT, -- last modification time\n"
415415
"sz INT, -- original file size\n"
416416
"data BLOB -- compressed content\n"
417417
");", 0, 0, 0
418418
);
419
- sqlite3_prepare(p->db,
420
- "INSERT INTO sqlar VALUES(?, ?, ?, ?, ?)", -1,
419
+ sqlite3_prepare(p->db,
420
+ "INSERT INTO sqlar VALUES(?, ?, ?, ?, ?)", -1,
421421
&p->pInsert, 0
422422
);
423423
assert( p->pInsert );
424424
425425
sqlite3_bind_int64(p->pInsert, 3, unixTime);
@@ -437,11 +437,11 @@
437437
}else{
438438
sqlite3_bind_text(p->pInsert, 1, zName, nName, SQLITE_STATIC);
439439
if( mPerm==PERM_LNK ){
440440
sqlite3_bind_int(p->pInsert, 2, 0120755);
441441
sqlite3_bind_int(p->pInsert, 4, -1);
442
- sqlite3_bind_text(p->pInsert, 5,
442
+ sqlite3_bind_text(p->pInsert, 5,
443443
blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
444444
);
445445
}else{
446446
unsigned int nIn = blob_size(pFile);
447447
unsigned long int nOut = nIn;
@@ -450,15 +450,15 @@
450450
zip_blob_minsize(&p->tmp, nIn);
451451
compress( (unsigned char*)
452452
blob_buffer(&p->tmp), &nOut, (unsigned char*)blob_buffer(pFile), nIn
453453
);
454454
if( nOut>=(unsigned long)nIn ){
455
- sqlite3_bind_blob(p->pInsert, 5,
455
+ sqlite3_bind_blob(p->pInsert, 5,
456456
blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
457457
);
458458
}else{
459
- sqlite3_bind_blob(p->pInsert, 5,
459
+ sqlite3_bind_blob(p->pInsert, 5,
460460
blob_buffer(&p->tmp), nOut, SQLITE_STATIC
461461
);
462462
}
463463
}
464464
}
@@ -467,12 +467,12 @@
467467
sqlite3_reset(p->pInsert);
468468
}
469469
470470
static void zip_add_file(
471471
Archive *p,
472
- const char *zName,
473
- const Blob *pFile,
472
+ const char *zName,
473
+ const Blob *pFile,
474474
int mPerm
475475
){
476476
if( p->eType==ARCHIVE_ZIP ){
477477
zip_add_file_to_zip(p, zName, pFile, mPerm);
478478
}else{
@@ -786,11 +786,11 @@
786786
" WHERE event.objid=%d"
787787
" AND blob.rid=%d",
788788
db_get("project-name", "unnamed"), rid, rid
789789
);
790790
}
791
- zip_of_checkin(eType, rid, zOut ? &zip : 0,
791
+ zip_of_checkin(eType, rid, zOut ? &zip : 0,
792792
zName, pInclude, pExclude, listFlag);
793793
glob_free(pInclude);
794794
glob_free(pExclude);
795795
if( zOut ){
796796
blob_write_to_file(&zip, zOut);
@@ -947,18 +947,18 @@
947947
zExclude = P("ex");
948948
if( zExclude ) pExclude = glob_create(zExclude);
949949
if( zInclude==0 && zExclude==0 ){
950950
etag_check_for_invariant_name(z);
951951
}
952
- if( eType==ARCHIVE_ZIP
952
+ if( eType==ARCHIVE_ZIP
953953
&& nName>4
954954
&& fossil_strcmp(&zName[nName-4], ".zip")==0
955955
){
956956
/* Special case: Remove the ".zip" suffix. */
957957
nName -= 4;
958958
zName[nName] = 0;
959
- }else if( eType==ARCHIVE_SQLAR
959
+ }else if( eType==ARCHIVE_SQLAR
960960
&& nName>6
961961
&& fossil_strcmp(&zName[nName-6], ".sqlar")==0
962962
){
963963
/* Special case: Remove the ".sqlar" suffix. */
964964
nName -= 6;
965965
--- src/zip.c
+++ src/zip.c
@@ -138,11 +138,11 @@
138 static int archiveDeviceCharacteristics(sqlite3_file *pFile){
139 return 0;
140 }
141
142 static int archiveOpen(
143 sqlite3_vfs *pVfs, const char *zName,
144 sqlite3_file *pFile, int flags, int *pOutFlags
145 ){
146 static struct sqlite3_io_methods methods = {
147 1, /* iVersion */
148 archiveClose,
@@ -247,12 +247,12 @@
247 ** pFile is the file to be appended. zName is the name
248 ** that the file should be saved as.
249 */
250 static void zip_add_file_to_zip(
251 Archive *p,
252 const char *zName,
253 const Blob *pFile,
254 int mPerm
255 ){
256 z_stream stream;
257 int nameLen;
258 int toOut = 0;
@@ -374,12 +374,12 @@
374 nEntry++;
375 }
376
377 static void zip_add_file_to_sqlar(
378 Archive *p,
379 const char *zName,
380 const Blob *pFile,
381 int mPerm
382 ){
383 int nName = (int)strlen(zName);
384
385 if( p->db==0 ){
@@ -396,16 +396,16 @@
396 p->vfs.xRandomness = archiveRandomness;
397 p->vfs.xSleep = archiveSleep;
398 p->vfs.xCurrentTime = archiveCurrentTime;
399 p->vfs.xGetLastError = archiveGetLastError;
400 sqlite3_vfs_register(&p->vfs, 0);
401 sqlite3_open_v2("file:xyz.db", &p->db,
402 SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE, p->vfs.zName
403 );
404 assert( p->db );
405 blob_zero(&p->tmp);
406 sqlite3_exec(p->db,
407 "PRAGMA page_size=512;"
408 "PRAGMA journal_mode = off;"
409 "PRAGMA cache_spill = off;"
410 "BEGIN;"
411 "CREATE TABLE sqlar("
@@ -414,12 +414,12 @@
414 "mtime INT, -- last modification time\n"
415 "sz INT, -- original file size\n"
416 "data BLOB -- compressed content\n"
417 ");", 0, 0, 0
418 );
419 sqlite3_prepare(p->db,
420 "INSERT INTO sqlar VALUES(?, ?, ?, ?, ?)", -1,
421 &p->pInsert, 0
422 );
423 assert( p->pInsert );
424
425 sqlite3_bind_int64(p->pInsert, 3, unixTime);
@@ -437,11 +437,11 @@
437 }else{
438 sqlite3_bind_text(p->pInsert, 1, zName, nName, SQLITE_STATIC);
439 if( mPerm==PERM_LNK ){
440 sqlite3_bind_int(p->pInsert, 2, 0120755);
441 sqlite3_bind_int(p->pInsert, 4, -1);
442 sqlite3_bind_text(p->pInsert, 5,
443 blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
444 );
445 }else{
446 unsigned int nIn = blob_size(pFile);
447 unsigned long int nOut = nIn;
@@ -450,15 +450,15 @@
450 zip_blob_minsize(&p->tmp, nIn);
451 compress( (unsigned char*)
452 blob_buffer(&p->tmp), &nOut, (unsigned char*)blob_buffer(pFile), nIn
453 );
454 if( nOut>=(unsigned long)nIn ){
455 sqlite3_bind_blob(p->pInsert, 5,
456 blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
457 );
458 }else{
459 sqlite3_bind_blob(p->pInsert, 5,
460 blob_buffer(&p->tmp), nOut, SQLITE_STATIC
461 );
462 }
463 }
464 }
@@ -467,12 +467,12 @@
467 sqlite3_reset(p->pInsert);
468 }
469
470 static void zip_add_file(
471 Archive *p,
472 const char *zName,
473 const Blob *pFile,
474 int mPerm
475 ){
476 if( p->eType==ARCHIVE_ZIP ){
477 zip_add_file_to_zip(p, zName, pFile, mPerm);
478 }else{
@@ -786,11 +786,11 @@
786 " WHERE event.objid=%d"
787 " AND blob.rid=%d",
788 db_get("project-name", "unnamed"), rid, rid
789 );
790 }
791 zip_of_checkin(eType, rid, zOut ? &zip : 0,
792 zName, pInclude, pExclude, listFlag);
793 glob_free(pInclude);
794 glob_free(pExclude);
795 if( zOut ){
796 blob_write_to_file(&zip, zOut);
@@ -947,18 +947,18 @@
947 zExclude = P("ex");
948 if( zExclude ) pExclude = glob_create(zExclude);
949 if( zInclude==0 && zExclude==0 ){
950 etag_check_for_invariant_name(z);
951 }
952 if( eType==ARCHIVE_ZIP
953 && nName>4
954 && fossil_strcmp(&zName[nName-4], ".zip")==0
955 ){
956 /* Special case: Remove the ".zip" suffix. */
957 nName -= 4;
958 zName[nName] = 0;
959 }else if( eType==ARCHIVE_SQLAR
960 && nName>6
961 && fossil_strcmp(&zName[nName-6], ".sqlar")==0
962 ){
963 /* Special case: Remove the ".sqlar" suffix. */
964 nName -= 6;
965
--- src/zip.c
+++ src/zip.c
@@ -138,11 +138,11 @@
138 static int archiveDeviceCharacteristics(sqlite3_file *pFile){
139 return 0;
140 }
141
142 static int archiveOpen(
143 sqlite3_vfs *pVfs, const char *zName,
144 sqlite3_file *pFile, int flags, int *pOutFlags
145 ){
146 static struct sqlite3_io_methods methods = {
147 1, /* iVersion */
148 archiveClose,
@@ -247,12 +247,12 @@
247 ** pFile is the file to be appended. zName is the name
248 ** that the file should be saved as.
249 */
250 static void zip_add_file_to_zip(
251 Archive *p,
252 const char *zName,
253 const Blob *pFile,
254 int mPerm
255 ){
256 z_stream stream;
257 int nameLen;
258 int toOut = 0;
@@ -374,12 +374,12 @@
374 nEntry++;
375 }
376
377 static void zip_add_file_to_sqlar(
378 Archive *p,
379 const char *zName,
380 const Blob *pFile,
381 int mPerm
382 ){
383 int nName = (int)strlen(zName);
384
385 if( p->db==0 ){
@@ -396,16 +396,16 @@
396 p->vfs.xRandomness = archiveRandomness;
397 p->vfs.xSleep = archiveSleep;
398 p->vfs.xCurrentTime = archiveCurrentTime;
399 p->vfs.xGetLastError = archiveGetLastError;
400 sqlite3_vfs_register(&p->vfs, 0);
401 sqlite3_open_v2("file:xyz.db", &p->db,
402 SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE, p->vfs.zName
403 );
404 assert( p->db );
405 blob_zero(&p->tmp);
406 sqlite3_exec(p->db,
407 "PRAGMA page_size=512;"
408 "PRAGMA journal_mode = off;"
409 "PRAGMA cache_spill = off;"
410 "BEGIN;"
411 "CREATE TABLE sqlar("
@@ -414,12 +414,12 @@
414 "mtime INT, -- last modification time\n"
415 "sz INT, -- original file size\n"
416 "data BLOB -- compressed content\n"
417 ");", 0, 0, 0
418 );
419 sqlite3_prepare(p->db,
420 "INSERT INTO sqlar VALUES(?, ?, ?, ?, ?)", -1,
421 &p->pInsert, 0
422 );
423 assert( p->pInsert );
424
425 sqlite3_bind_int64(p->pInsert, 3, unixTime);
@@ -437,11 +437,11 @@
437 }else{
438 sqlite3_bind_text(p->pInsert, 1, zName, nName, SQLITE_STATIC);
439 if( mPerm==PERM_LNK ){
440 sqlite3_bind_int(p->pInsert, 2, 0120755);
441 sqlite3_bind_int(p->pInsert, 4, -1);
442 sqlite3_bind_text(p->pInsert, 5,
443 blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
444 );
445 }else{
446 unsigned int nIn = blob_size(pFile);
447 unsigned long int nOut = nIn;
@@ -450,15 +450,15 @@
450 zip_blob_minsize(&p->tmp, nIn);
451 compress( (unsigned char*)
452 blob_buffer(&p->tmp), &nOut, (unsigned char*)blob_buffer(pFile), nIn
453 );
454 if( nOut>=(unsigned long)nIn ){
455 sqlite3_bind_blob(p->pInsert, 5,
456 blob_buffer(pFile), blob_size(pFile), SQLITE_STATIC
457 );
458 }else{
459 sqlite3_bind_blob(p->pInsert, 5,
460 blob_buffer(&p->tmp), nOut, SQLITE_STATIC
461 );
462 }
463 }
464 }
@@ -467,12 +467,12 @@
467 sqlite3_reset(p->pInsert);
468 }
469
470 static void zip_add_file(
471 Archive *p,
472 const char *zName,
473 const Blob *pFile,
474 int mPerm
475 ){
476 if( p->eType==ARCHIVE_ZIP ){
477 zip_add_file_to_zip(p, zName, pFile, mPerm);
478 }else{
@@ -786,11 +786,11 @@
786 " WHERE event.objid=%d"
787 " AND blob.rid=%d",
788 db_get("project-name", "unnamed"), rid, rid
789 );
790 }
791 zip_of_checkin(eType, rid, zOut ? &zip : 0,
792 zName, pInclude, pExclude, listFlag);
793 glob_free(pInclude);
794 glob_free(pExclude);
795 if( zOut ){
796 blob_write_to_file(&zip, zOut);
@@ -947,18 +947,18 @@
947 zExclude = P("ex");
948 if( zExclude ) pExclude = glob_create(zExclude);
949 if( zInclude==0 && zExclude==0 ){
950 etag_check_for_invariant_name(z);
951 }
952 if( eType==ARCHIVE_ZIP
953 && nName>4
954 && fossil_strcmp(&zName[nName-4], ".zip")==0
955 ){
956 /* Special case: Remove the ".zip" suffix. */
957 nName -= 4;
958 zName[nName] = 0;
959 }else if( eType==ARCHIVE_SQLAR
960 && nName>6
961 && fossil_strcmp(&zName[nName-6], ".sqlar")==0
962 ){
963 /* Special case: Remove the ".sqlar" suffix. */
964 nName -= 6;
965
--- tools/codecheck1.c
+++ tools/codecheck1.c
@@ -604,11 +604,11 @@
604604
if( never_safe(zExpr) ){
605605
printf("%s:%d: Argument %d to %.*s() is not safe for"
606606
" a query parameter\n",
607607
zFilename, lnFCall, i+fmtArg, szFName, zFCall);
608608
nErr++;
609
-
609
+
610610
}else if( (fmtFlags & FMT_SQL)!=0 && !is_sql_safe(zExpr) ){
611611
printf("%s:%d: Argument %d to %.*s() not safe for SQL\n",
612612
zFilename, lnFCall, i+fmtArg, szFName, zFCall);
613613
nErr++;
614614
}
615615
--- tools/codecheck1.c
+++ tools/codecheck1.c
@@ -604,11 +604,11 @@
604 if( never_safe(zExpr) ){
605 printf("%s:%d: Argument %d to %.*s() is not safe for"
606 " a query parameter\n",
607 zFilename, lnFCall, i+fmtArg, szFName, zFCall);
608 nErr++;
609
610 }else if( (fmtFlags & FMT_SQL)!=0 && !is_sql_safe(zExpr) ){
611 printf("%s:%d: Argument %d to %.*s() not safe for SQL\n",
612 zFilename, lnFCall, i+fmtArg, szFName, zFCall);
613 nErr++;
614 }
615
--- tools/codecheck1.c
+++ tools/codecheck1.c
@@ -604,11 +604,11 @@
604 if( never_safe(zExpr) ){
605 printf("%s:%d: Argument %d to %.*s() is not safe for"
606 " a query parameter\n",
607 zFilename, lnFCall, i+fmtArg, szFName, zFCall);
608 nErr++;
609
610 }else if( (fmtFlags & FMT_SQL)!=0 && !is_sql_safe(zExpr) ){
611 printf("%s:%d: Argument %d to %.*s() not safe for SQL\n",
612 zFilename, lnFCall, i+fmtArg, szFName, zFCall);
613 nErr++;
614 }
615
--- tools/makeheaders.c
+++ tools/makeheaders.c
@@ -38,11 +38,12 @@
3838
#include <memory.h>
3939
#include <sys/stat.h>
4040
#include <assert.h>
4141
#include <string.h>
4242
43
-#if defined( __MINGW32__) || defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__)
43
+#if defined( __MINGW32__) || defined(__DMC__) || \
44
+ defined(_MSC_VER) || defined(__POCC__)
4445
# ifndef WIN32
4546
# define WIN32
4647
# endif
4748
#else
4849
# include <unistd.h>
@@ -2226,11 +2227,12 @@
22262227
PushIfMacro(0,0,0,pToken->nLine,PS_Interface);
22272228
}else if( nArg==16 && strncmp(zArg,"EXPORT_INTERFACE",16)==0 ){
22282229
PushIfMacro(0,0,0,pToken->nLine,PS_Export);
22292230
}else if( nArg==15 && strncmp(zArg,"LOCAL_INTERFACE",15)==0 ){
22302231
PushIfMacro(0,0,0,pToken->nLine,PS_Local);
2231
- }else if( nArg==15 && strncmp(zArg,"MAKEHEADERS_STOPLOCAL_INTERFACE",15)==0 ){
2232
+ }else if( nArg==15 &&
2233
+ strncmp(zArg,"MAKEHEADERS_STOPLOCAL_INTERFACE",15)==0 ){
22322234
PushIfMacro(0,0,0,pToken->nLine,PS_Local);
22332235
}else{
22342236
PushIfMacro(0,zArg,nArg,pToken->nLine,0);
22352237
}
22362238
}else if( nCmd==5 && strncmp(zCmd,"ifdef",5)==0 ){
22372239
--- tools/makeheaders.c
+++ tools/makeheaders.c
@@ -38,11 +38,12 @@
38 #include <memory.h>
39 #include <sys/stat.h>
40 #include <assert.h>
41 #include <string.h>
42
43 #if defined( __MINGW32__) || defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__)
 
44 # ifndef WIN32
45 # define WIN32
46 # endif
47 #else
48 # include <unistd.h>
@@ -2226,11 +2227,12 @@
2226 PushIfMacro(0,0,0,pToken->nLine,PS_Interface);
2227 }else if( nArg==16 && strncmp(zArg,"EXPORT_INTERFACE",16)==0 ){
2228 PushIfMacro(0,0,0,pToken->nLine,PS_Export);
2229 }else if( nArg==15 && strncmp(zArg,"LOCAL_INTERFACE",15)==0 ){
2230 PushIfMacro(0,0,0,pToken->nLine,PS_Local);
2231 }else if( nArg==15 && strncmp(zArg,"MAKEHEADERS_STOPLOCAL_INTERFACE",15)==0 ){
 
2232 PushIfMacro(0,0,0,pToken->nLine,PS_Local);
2233 }else{
2234 PushIfMacro(0,zArg,nArg,pToken->nLine,0);
2235 }
2236 }else if( nCmd==5 && strncmp(zCmd,"ifdef",5)==0 ){
2237
--- tools/makeheaders.c
+++ tools/makeheaders.c
@@ -38,11 +38,12 @@
38 #include <memory.h>
39 #include <sys/stat.h>
40 #include <assert.h>
41 #include <string.h>
42
43 #if defined( __MINGW32__) || defined(__DMC__) || \
44 defined(_MSC_VER) || defined(__POCC__)
45 # ifndef WIN32
46 # define WIN32
47 # endif
48 #else
49 # include <unistd.h>
@@ -2226,11 +2227,12 @@
2227 PushIfMacro(0,0,0,pToken->nLine,PS_Interface);
2228 }else if( nArg==16 && strncmp(zArg,"EXPORT_INTERFACE",16)==0 ){
2229 PushIfMacro(0,0,0,pToken->nLine,PS_Export);
2230 }else if( nArg==15 && strncmp(zArg,"LOCAL_INTERFACE",15)==0 ){
2231 PushIfMacro(0,0,0,pToken->nLine,PS_Local);
2232 }else if( nArg==15 &&
2233 strncmp(zArg,"MAKEHEADERS_STOPLOCAL_INTERFACE",15)==0 ){
2234 PushIfMacro(0,0,0,pToken->nLine,PS_Local);
2235 }else{
2236 PushIfMacro(0,zArg,nArg,pToken->nLine,0);
2237 }
2238 }else if( nCmd==5 && strncmp(zCmd,"ifdef",5)==0 ){
2239
+1 -1
--- tools/mkindex.c
+++ tools/mkindex.c
@@ -38,11 +38,11 @@
3838
**
3939
** Commands are 1st-tier by default. If the command name begins with
4040
** "test-" or if the command name has a "test" argument, then it becomes
4141
** a test command. If the command name has a "2nd-tier" argument or ends
4242
** with a "*" character, it is second tier. If the command name has an "alias"
43
-** argument or ends with a "#" character, it is an alias: another name
43
+** argument or ends with a "#" character, it is an alias: another name
4444
** (a one-to-one replacement) for a command. Examples:
4545
**
4646
** COMMAND: abcde*
4747
** COMMAND: fghij 2nd-tier
4848
** COMMAND: mnopq#
4949
--- tools/mkindex.c
+++ tools/mkindex.c
@@ -38,11 +38,11 @@
38 **
39 ** Commands are 1st-tier by default. If the command name begins with
40 ** "test-" or if the command name has a "test" argument, then it becomes
41 ** a test command. If the command name has a "2nd-tier" argument or ends
42 ** with a "*" character, it is second tier. If the command name has an "alias"
43 ** argument or ends with a "#" character, it is an alias: another name
44 ** (a one-to-one replacement) for a command. Examples:
45 **
46 ** COMMAND: abcde*
47 ** COMMAND: fghij 2nd-tier
48 ** COMMAND: mnopq#
49
--- tools/mkindex.c
+++ tools/mkindex.c
@@ -38,11 +38,11 @@
38 **
39 ** Commands are 1st-tier by default. If the command name begins with
40 ** "test-" or if the command name has a "test" argument, then it becomes
41 ** a test command. If the command name has a "2nd-tier" argument or ends
42 ** with a "*" character, it is second tier. If the command name has an "alias"
43 ** argument or ends with a "#" character, it is an alias: another name
44 ** (a one-to-one replacement) for a command. Examples:
45 **
46 ** COMMAND: abcde*
47 ** COMMAND: fghij 2nd-tier
48 ** COMMAND: mnopq#
49
--- tools/skintxt2config.c
+++ tools/skintxt2config.c
@@ -1,6 +1,6 @@
1
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
22
/* vim: set ts=2 et sw=2 tw=80: */
33
/*
44
** Copyright (c) 2021 Stephan Beal (https://wanderinghorse.net/home/stephan/)
55
**
66
** This program is free software; you can redistribute it and/or
@@ -102,11 +102,11 @@
102102
if(rc){
103103
free(zMem);
104104
}else{
105105
*zContent = zMem;
106106
*nContent = fpos;
107
- }
107
+ }
108108
return rc;
109109
}
110110
111111
/*
112112
** Expects zFilename to be one of the conventional skin filename
113113
--- tools/skintxt2config.c
+++ tools/skintxt2config.c
@@ -1,6 +1,6 @@
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /*
4 ** Copyright (c) 2021 Stephan Beal (https://wanderinghorse.net/home/stephan/)
5 **
6 ** This program is free software; you can redistribute it and/or
@@ -102,11 +102,11 @@
102 if(rc){
103 free(zMem);
104 }else{
105 *zContent = zMem;
106 *nContent = fpos;
107 }
108 return rc;
109 }
110
111 /*
112 ** Expects zFilename to be one of the conventional skin filename
113
--- tools/skintxt2config.c
+++ tools/skintxt2config.c
@@ -1,6 +1,6 @@
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /*
4 ** Copyright (c) 2021 Stephan Beal (https://wanderinghorse.net/home/stephan/)
5 **
6 ** This program is free software; you can redistribute it and/or
@@ -102,11 +102,11 @@
102 if(rc){
103 free(zMem);
104 }else{
105 *zContent = zMem;
106 *nContent = fpos;
107 }
108 return rc;
109 }
110
111 /*
112 ** Expects zFilename to be one of the conventional skin filename
113
--- tools/sqlcompattest.c
+++ tools/sqlcompattest.c
@@ -53,11 +53,12 @@
5353
5454
#define QUOTE(VAL) #VAL
5555
#define STR(MACRO_VAL) QUOTE(MACRO_VAL)
5656
5757
char zMinimumVersionNumber[8]="nn.nn.nn";
58
- strncpy((char *)&zMinimumVersionNumber,STR(MINIMUM_SQLITE_VERSION),sizeof(zMinimumVersionNumber));
58
+ strncpy((char *)&zMinimumVersionNumber,STR(MINIMUM_SQLITE_VERSION),
59
+ sizeof(zMinimumVersionNumber));
5960
6061
long major, minor, release, version;
6162
sscanf(zMinimumVersionNumber, "%li.%li.%li", &major, &minor, &release);
6263
version=(major*1000000)+(minor*1000)+release;
6364
@@ -67,11 +68,12 @@
6768
"ENABLE_DBSTAT_VTAB", /* Required by /repo-tabsize page */
6869
};
6970
7071
/* Check minimum SQLite version number */
7172
if( sqlite3_libversion_number()<version ){
72
- printf("found system SQLite version %s but need %s or later, consider removing --disable-internal-sqlite\n",
73
+ printf("found system SQLite version %s but need %s or later, "
74
+ "consider removing --disable-internal-sqlite\n",
7375
sqlite3_libversion(),STR(MINIMUM_SQLITE_VERSION));
7476
return 1;
7577
}
7678
7779
for(i=0; i<sizeof(zRequiredOpts)/sizeof(zRequiredOpts[0]); i++){
7880
--- tools/sqlcompattest.c
+++ tools/sqlcompattest.c
@@ -53,11 +53,12 @@
53
54 #define QUOTE(VAL) #VAL
55 #define STR(MACRO_VAL) QUOTE(MACRO_VAL)
56
57 char zMinimumVersionNumber[8]="nn.nn.nn";
58 strncpy((char *)&zMinimumVersionNumber,STR(MINIMUM_SQLITE_VERSION),sizeof(zMinimumVersionNumber));
 
59
60 long major, minor, release, version;
61 sscanf(zMinimumVersionNumber, "%li.%li.%li", &major, &minor, &release);
62 version=(major*1000000)+(minor*1000)+release;
63
@@ -67,11 +68,12 @@
67 "ENABLE_DBSTAT_VTAB", /* Required by /repo-tabsize page */
68 };
69
70 /* Check minimum SQLite version number */
71 if( sqlite3_libversion_number()<version ){
72 printf("found system SQLite version %s but need %s or later, consider removing --disable-internal-sqlite\n",
 
73 sqlite3_libversion(),STR(MINIMUM_SQLITE_VERSION));
74 return 1;
75 }
76
77 for(i=0; i<sizeof(zRequiredOpts)/sizeof(zRequiredOpts[0]); i++){
78
--- tools/sqlcompattest.c
+++ tools/sqlcompattest.c
@@ -53,11 +53,12 @@
53
54 #define QUOTE(VAL) #VAL
55 #define STR(MACRO_VAL) QUOTE(MACRO_VAL)
56
57 char zMinimumVersionNumber[8]="nn.nn.nn";
58 strncpy((char *)&zMinimumVersionNumber,STR(MINIMUM_SQLITE_VERSION),
59 sizeof(zMinimumVersionNumber));
60
61 long major, minor, release, version;
62 sscanf(zMinimumVersionNumber, "%li.%li.%li", &major, &minor, &release);
63 version=(major*1000000)+(minor*1000)+release;
64
@@ -67,11 +68,12 @@
68 "ENABLE_DBSTAT_VTAB", /* Required by /repo-tabsize page */
69 };
70
71 /* Check minimum SQLite version number */
72 if( sqlite3_libversion_number()<version ){
73 printf("found system SQLite version %s but need %s or later, "
74 "consider removing --disable-internal-sqlite\n",
75 sqlite3_libversion(),STR(MINIMUM_SQLITE_VERSION));
76 return 1;
77 }
78
79 for(i=0; i<sizeof(zRequiredOpts)/sizeof(zRequiredOpts[0]); i++){
80

Keyboard Shortcuts

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