Fossil SCM

Add comments for auxiliary local variables inside <code>ticket_output_change_artifact()</code>.

george 2022-10-28 16:28 deltify-tkt-blobs
Commit 53b66cf63f868ac31215fa5c7aa06f8fa7b7f9c59dce3f5b42c55fe56b7f1cfb
1 file changed +5 -2
+5 -2
--- src/tkt.c
+++ src/tkt.c
@@ -1252,11 +1252,11 @@
12521252
** not have knowledge of the encoding. If the "raw" query parameter
12531253
** is present, then the undecoded and unformatted text of each artifact
12541254
** is displayed.
12551255
**
12561256
** Reassignments of a field of the TICKET table that has a corresponding
1257
-** "baseline for ..." companion are rendered as unified delta.
1257
+** "baseline for ..." companion are rendered as unified diffs.
12581258
*/
12591259
void tkthistory_page(void){
12601260
Stmt q;
12611261
char *zTitle;
12621262
const char *zUuid;
@@ -1401,12 +1401,15 @@
14011401
const char *zX = z[0]=='+' ? z+1 : z;
14021402
const int id = fieldId(zX);
14031403
const char *zValue = pTkt->aField[i].zValue;
14041404
const size_t nValue = strlen(zValue);
14051405
const int bLong = nValue>50 || memchr(zValue,'\n',nValue)!=NULL;
1406
+ /* zValue is long enough to justify a <blockquote> */
14061407
const int bCanDiff = aLastVal && id>=0 && aField[id].zBsln;
1407
- int bAppend = 0, bRegular = 0;
1408
+ /* preliminary flag for rendering via unified diff */
1409
+ int bAppend = 0; /* zValue is being appended to a TICKET's field */
1410
+ int bRegular = 0; /* prev value of a TICKET's field is being superseded*/
14081411
@ <li>\
14091412
if( id<0 ){
14101413
@ Untracked field %h(zX):
14111414
}else if( aField[id].mUsed==USEDBY_TICKETCHNG ){
14121415
@ %h(zX):
14131416
--- src/tkt.c
+++ src/tkt.c
@@ -1252,11 +1252,11 @@
1252 ** not have knowledge of the encoding. If the "raw" query parameter
1253 ** is present, then the undecoded and unformatted text of each artifact
1254 ** is displayed.
1255 **
1256 ** Reassignments of a field of the TICKET table that has a corresponding
1257 ** "baseline for ..." companion are rendered as unified delta.
1258 */
1259 void tkthistory_page(void){
1260 Stmt q;
1261 char *zTitle;
1262 const char *zUuid;
@@ -1401,12 +1401,15 @@
1401 const char *zX = z[0]=='+' ? z+1 : z;
1402 const int id = fieldId(zX);
1403 const char *zValue = pTkt->aField[i].zValue;
1404 const size_t nValue = strlen(zValue);
1405 const int bLong = nValue>50 || memchr(zValue,'\n',nValue)!=NULL;
 
1406 const int bCanDiff = aLastVal && id>=0 && aField[id].zBsln;
1407 int bAppend = 0, bRegular = 0;
 
 
1408 @ <li>\
1409 if( id<0 ){
1410 @ Untracked field %h(zX):
1411 }else if( aField[id].mUsed==USEDBY_TICKETCHNG ){
1412 @ %h(zX):
1413
--- src/tkt.c
+++ src/tkt.c
@@ -1252,11 +1252,11 @@
1252 ** not have knowledge of the encoding. If the "raw" query parameter
1253 ** is present, then the undecoded and unformatted text of each artifact
1254 ** is displayed.
1255 **
1256 ** Reassignments of a field of the TICKET table that has a corresponding
1257 ** "baseline for ..." companion are rendered as unified diffs.
1258 */
1259 void tkthistory_page(void){
1260 Stmt q;
1261 char *zTitle;
1262 const char *zUuid;
@@ -1401,12 +1401,15 @@
1401 const char *zX = z[0]=='+' ? z+1 : z;
1402 const int id = fieldId(zX);
1403 const char *zValue = pTkt->aField[i].zValue;
1404 const size_t nValue = strlen(zValue);
1405 const int bLong = nValue>50 || memchr(zValue,'\n',nValue)!=NULL;
1406 /* zValue is long enough to justify a <blockquote> */
1407 const int bCanDiff = aLastVal && id>=0 && aField[id].zBsln;
1408 /* preliminary flag for rendering via unified diff */
1409 int bAppend = 0; /* zValue is being appended to a TICKET's field */
1410 int bRegular = 0; /* prev value of a TICKET's field is being superseded*/
1411 @ <li>\
1412 if( id<0 ){
1413 @ Untracked field %h(zX):
1414 }else if( aField[id].mUsed==USEDBY_TICKETCHNG ){
1415 @ %h(zX):
1416

Keyboard Shortcuts

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