Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | .. but don't forget to update j |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
6542935c9d97f01c6de4a971cb2a86a3 |
| User & Date: | jan.nijtmans 2012-10-28 20:47:47.262 |
Context
|
2012-10-28
| ||
| 21:38 | - finally, do the ++j update in looks_like_text() right - More consistancy in prompt handling: accept Capitals everywhere, use '(' not '[', and abbreviate yes/no to y/N everywhere ... (check-in: 7c527165a6 user: jan.nijtmans tags: trunk) | |
| 20:47 | .. but don't forget to update j ... (check-in: 6542935c9d user: jan.nijtmans tags: trunk) | |
| 20:40 | speed-up looks_like_text(), by eliminating variable "i" and handle first character separately. ... (check-in: 204680eedc user: jan.nijtmans tags: trunk) | |
Changes
Changes to src/diff.c.
| ︙ | ︙ | |||
192 193 194 195 196 197 198 |
while( --n>0 ){
c = *++z;
if( c==0 ) return 0; /* \000 byte in a file -> binary */
if( c=='\n' ){
if( z[-1]=='\r' ){
result = -1; /* Contains CrLf, continue */
}
| | | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
while( --n>0 ){
c = *++z;
if( c==0 ) return 0; /* \000 byte in a file -> binary */
if( c=='\n' ){
if( z[-1]=='\r' ){
result = -1; /* Contains CrLf, continue */
}
if( ++j>LENGTH_MASK ){
return 0; /* Very long line -> binary */
}
j = 0;
}
}
if( j>LENGTH_MASK ){
return 0; /* Very long line -> binary */
|
| ︙ | ︙ |