Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | When one version of a file ends in a newline and the other does not, be sure to show that difference. Ticket [7541963870703f0]. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
d764f449d78f9882a9034ed08f99138e |
| User & Date: | drh 2012-11-06 16:35:46.899 |
Context
|
2012-11-06
| ||
| 18:31 | When trying to create a directory, if mkdir fails, make sure the directory doesn't already exist before giving up and reporting an error. ... (check-in: bc74a8171d user: drh tags: trunk) | |
| 16:35 | When one version of a file ends in a newline and the other does not, be sure to show that difference. Ticket [7541963870703f0]. ... (check-in: d764f449d7 user: drh tags: trunk) | |
| 12:20 | gcc warnings: <pre>src/merge3.c: In function ‘merge_3way’: src/merge3.c:445:9: warning: ‘zPivot’ may be used uninitialized in this function src/merge3.c:446:9: warning: ‘zOrig’ may be used uninitialized in this function src/merge3.c:447:9: warning: ‘zOther’ may be used uninitialized in this function </pre> ... (check-in: 233463c4ec user: jan.nijtmans tags: trunk) | |
Changes
Changes to src/diff.c.
| ︙ | ︙ | |||
152 153 154 155 156 157 158 |
/* Fill in the array */
for(i=0; i<nLine; i++){
a[i].z = z;
for(j=0; z[j] && z[j]!='\n'; j++){}
k = j;
while( ignoreWS && k>0 && fossil_isspace(z[k-1]) ){ k--; }
| | | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
/* Fill in the array */
for(i=0; i<nLine; i++){
a[i].z = z;
for(j=0; z[j] && z[j]!='\n'; j++){}
k = j;
while( ignoreWS && k>0 && fossil_isspace(z[k-1]) ){ k--; }
for(h=0, x=0; x<=k; x++){
h = h ^ (h<<2) ^ z[x];
}
a[i].h = h = (h<<LENGTH_MASK_SZ) | k;;
h2 = h % nLine;
a[i].iNext = a[h2].iHash;
a[h2].iHash = i+1;
z += j+1;
|
| ︙ | ︙ | |||
785 786 787 788 789 790 791 |
/* A single chunk of text inserted on the right */
if( nPrefix+nSuffix==nLeft ){
sbsWriteLineno(p, lnLeft);
p->iStart2 = p->iEnd2 = 0;
p->iStart = p->iEnd = -1;
sbsWriteText(p, pLeft, SBS_PAD);
| > | > > > | 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 |
/* A single chunk of text inserted on the right */
if( nPrefix+nSuffix==nLeft ){
sbsWriteLineno(p, lnLeft);
p->iStart2 = p->iEnd2 = 0;
p->iStart = p->iEnd = -1;
sbsWriteText(p, pLeft, SBS_PAD);
if( nLeft==nRight && zLeft[nLeft]==zRight[nRight] ){
sbsWrite(p, " ", 3);
}else{
sbsWrite(p, " | ", 3);
}
sbsWriteLineno(p, lnRight);
p->iStart = nPrefix;
p->iEnd = nRight - nSuffix;
p->zStart = zClassAdd;
sbsWriteText(p, pRight, SBS_NEWLINE);
return;
}
|
| ︙ | ︙ |