Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Minor tweak to the side-by-side alignment algorithm so that it handles pure white-space lines better. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
312590a9ee6040fd5881fe70ef217b9d |
| User & Date: | drh 2012-02-07 16:13:58.681 |
Context
|
2012-02-07
| ||
| 16:20 | Update the built-in SQLite and SQL command-line shell to the latest code from the SQLite trunk. ... (check-in: 030035345c user: drh tags: trunk) | |
| 16:13 | Minor tweak to the side-by-side alignment algorithm so that it handles pure white-space lines better. ... (check-in: 312590a9ee user: drh tags: trunk) | |
| 15:38 | Add the --brief option to the "diff" command. ... (check-in: e0565d4351 user: drh tags: trunk) | |
Changes
Changes to src/diff.c.
| ︙ | ︙ | |||
553 554 555 556 557 558 559 |
nA = pA->h & LENGTH_MASK;
nB = pB->h & LENGTH_MASK;
while( nA>0 && fossil_isspace(zA[0]) ){ nA--; zA++; }
while( nA>0 && fossil_isspace(zA[nA-1]) ){ nA--; }
while( nB>0 && fossil_isspace(zB[0]) ){ nB--; zB++; }
while( nB>0 && fossil_isspace(zB[nB-1]) ){ nB--; }
avg = (nA+nB)/2;
| | | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
nA = pA->h & LENGTH_MASK;
nB = pB->h & LENGTH_MASK;
while( nA>0 && fossil_isspace(zA[0]) ){ nA--; zA++; }
while( nA>0 && fossil_isspace(zA[nA-1]) ){ nA--; }
while( nB>0 && fossil_isspace(zB[0]) ){ nB--; zB++; }
while( nB>0 && fossil_isspace(zB[nB-1]) ){ nB--; }
avg = (nA+nB)/2;
if( avg==0 ) return 0;
best = 0;
for(i=0; i<nA-best; i++){
char c = zA[i];
for(j=0; j<nB-best; j++){
if( c!=zB[j] ) continue;
for(k=1; k+i<nA && k+j<nB && zA[k+i]==zB[k+j]; k++){}
if( k>best ) best = k;
|
| ︙ | ︙ |