Fossil SCM
Code documentation.
Commit
9b7955b5a43492c1b3479e6d4245e7fe09426819
Parent
47cdbbf2fb82664…
1 file changed
+16
-6
+16
-6
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -597,16 +597,25 @@ | ||
| 597 | 597 | } |
| 598 | 598 | return out; |
| 599 | 599 | } |
| 600 | 600 | |
| 601 | 601 | /* |
| 602 | - * References in the fossil repository: | |
| 603 | - * /vdiff?from=080d27a&to=4b0f813&detail=1 | |
| 604 | - * /vdiff?from=636804745b&to=c1d78e0556&detail=1 | |
| 605 | - * /vdiff?from=c0b6c28d29&to=25169506b7&detail=1 | |
| 606 | - * /vdiff?from=e3d022dffa&to=48bcfbd47b&detail=1 | |
| 607 | - */ | |
| 602 | +** Output table body of a side-by-side diff. Prior to the call, the caller | |
| 603 | +** should have output: | |
| 604 | +** <table class="sbsdiff"> | |
| 605 | +** <tr><th colspan="2" class="diffhdr">Old title</th><th/> | |
| 606 | +** <th colspan="2" class="diffhdr">New title</th></tr> | |
| 607 | +** | |
| 608 | +** And after the call, it should output: | |
| 609 | +** </table> | |
| 610 | +** | |
| 611 | +** Some good reference diffs in the fossil repository for testing: | |
| 612 | +** /vdiff?from=080d27a&to=4b0f813&detail=1 | |
| 613 | +** /vdiff?from=636804745b&to=c1d78e0556&detail=1 | |
| 614 | +** /vdiff?from=c0b6c28d29&to=25169506b7&detail=1 | |
| 615 | +** /vdiff?from=e3d022dffa&to=48bcfbd47b&detail=1 | |
| 616 | +*/ | |
| 608 | 617 | int html_sbsdiff( |
| 609 | 618 | Blob *pA_Blob, /* FROM file */ |
| 610 | 619 | Blob *pB_Blob, /* TO file */ |
| 611 | 620 | int nContext, /* Amount of context to unified diff */ |
| 612 | 621 | int ignoreEolWs /* Ignore whitespace at the end of lines */ |
| @@ -625,10 +634,11 @@ | ||
| 625 | 634 | c.aTo = break_into_lines(blob_str(pB_Blob), blob_size(pB_Blob), |
| 626 | 635 | &c.nTo, ignoreEolWs); |
| 627 | 636 | if( c.aFrom==0 || c.aTo==0 ){ |
| 628 | 637 | free(c.aFrom); |
| 629 | 638 | free(c.aTo); |
| 639 | + /* Note: This would be generated within a table. */ | |
| 630 | 640 | @ <p class="generalError" style="white-space: nowrap">cannot compute |
| 631 | 641 | @ difference between binary files</p> |
| 632 | 642 | return 0; |
| 633 | 643 | } |
| 634 | 644 | |
| 635 | 645 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -597,16 +597,25 @@ | |
| 597 | } |
| 598 | return out; |
| 599 | } |
| 600 | |
| 601 | /* |
| 602 | * References in the fossil repository: |
| 603 | * /vdiff?from=080d27a&to=4b0f813&detail=1 |
| 604 | * /vdiff?from=636804745b&to=c1d78e0556&detail=1 |
| 605 | * /vdiff?from=c0b6c28d29&to=25169506b7&detail=1 |
| 606 | * /vdiff?from=e3d022dffa&to=48bcfbd47b&detail=1 |
| 607 | */ |
| 608 | int html_sbsdiff( |
| 609 | Blob *pA_Blob, /* FROM file */ |
| 610 | Blob *pB_Blob, /* TO file */ |
| 611 | int nContext, /* Amount of context to unified diff */ |
| 612 | int ignoreEolWs /* Ignore whitespace at the end of lines */ |
| @@ -625,10 +634,11 @@ | |
| 625 | c.aTo = break_into_lines(blob_str(pB_Blob), blob_size(pB_Blob), |
| 626 | &c.nTo, ignoreEolWs); |
| 627 | if( c.aFrom==0 || c.aTo==0 ){ |
| 628 | free(c.aFrom); |
| 629 | free(c.aTo); |
| 630 | @ <p class="generalError" style="white-space: nowrap">cannot compute |
| 631 | @ difference between binary files</p> |
| 632 | return 0; |
| 633 | } |
| 634 | |
| 635 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -597,16 +597,25 @@ | |
| 597 | } |
| 598 | return out; |
| 599 | } |
| 600 | |
| 601 | /* |
| 602 | ** Output table body of a side-by-side diff. Prior to the call, the caller |
| 603 | ** should have output: |
| 604 | ** <table class="sbsdiff"> |
| 605 | ** <tr><th colspan="2" class="diffhdr">Old title</th><th/> |
| 606 | ** <th colspan="2" class="diffhdr">New title</th></tr> |
| 607 | ** |
| 608 | ** And after the call, it should output: |
| 609 | ** </table> |
| 610 | ** |
| 611 | ** Some good reference diffs in the fossil repository for testing: |
| 612 | ** /vdiff?from=080d27a&to=4b0f813&detail=1 |
| 613 | ** /vdiff?from=636804745b&to=c1d78e0556&detail=1 |
| 614 | ** /vdiff?from=c0b6c28d29&to=25169506b7&detail=1 |
| 615 | ** /vdiff?from=e3d022dffa&to=48bcfbd47b&detail=1 |
| 616 | */ |
| 617 | int html_sbsdiff( |
| 618 | Blob *pA_Blob, /* FROM file */ |
| 619 | Blob *pB_Blob, /* TO file */ |
| 620 | int nContext, /* Amount of context to unified diff */ |
| 621 | int ignoreEolWs /* Ignore whitespace at the end of lines */ |
| @@ -625,10 +634,11 @@ | |
| 634 | c.aTo = break_into_lines(blob_str(pB_Blob), blob_size(pB_Blob), |
| 635 | &c.nTo, ignoreEolWs); |
| 636 | if( c.aFrom==0 || c.aTo==0 ){ |
| 637 | free(c.aFrom); |
| 638 | free(c.aTo); |
| 639 | /* Note: This would be generated within a table. */ |
| 640 | @ <p class="generalError" style="white-space: nowrap">cannot compute |
| 641 | @ difference between binary files</p> |
| 642 | return 0; |
| 643 | } |
| 644 | |
| 645 |