Fossil SCM
Fix some outdated comments for clarity.
Commit
6e3fcebcfca057ba0e6192f90a9697765b823fcf
Parent
3161968463c0c6d…
1 file changed
+4
-4
+4
-4
| --- src/lookslike.c | ||
| +++ src/lookslike.c | ||
| @@ -95,11 +95,11 @@ | ||
| 95 | 95 | if( c==0 ){ |
| 96 | 96 | flags |= LOOK_NUL; /* NUL character in a file -> binary */ |
| 97 | 97 | }else if( c=='\r' ){ |
| 98 | 98 | flags |= LOOK_CR; |
| 99 | 99 | if( n<=1 || z[1]!='\n' ){ |
| 100 | - flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ | |
| 100 | + flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ | |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | j = (c!='\n'); |
| 104 | 104 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 105 | 105 | while( !(flags&stopFlags) && --n>0 ){ |
| @@ -119,11 +119,11 @@ | ||
| 119 | 119 | } |
| 120 | 120 | j = 0; |
| 121 | 121 | }else if( c=='\r' ){ |
| 122 | 122 | flags |= LOOK_CR; |
| 123 | 123 | if( n<=1 || z[1]!='\n' ){ |
| 124 | - flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ | |
| 124 | + flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ | |
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | if( n ){ |
| 129 | 129 | flags |= LOOK_SHORT; /* The whole blob was not examined */ |
| @@ -244,11 +244,11 @@ | ||
| 244 | 244 | if( c==0 ){ |
| 245 | 245 | flags |= LOOK_NUL; /* NUL character in a file -> binary */ |
| 246 | 246 | }else if( c=='\r' ){ |
| 247 | 247 | flags |= LOOK_CR; |
| 248 | 248 | if( n<(2*sizeof(WCHAR_T)) || UTF16_SWAP_IF(bReverse, z[1])!='\n' ){ |
| 249 | - flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ | |
| 249 | + flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ | |
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | j = (c!='\n'); |
| 253 | 253 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 254 | 254 | while( !(flags&stopFlags) && ((n-=sizeof(WCHAR_T))>=sizeof(WCHAR_T)) ){ |
| @@ -272,11 +272,11 @@ | ||
| 272 | 272 | } |
| 273 | 273 | j = 0; |
| 274 | 274 | }else if( c=='\r' ){ |
| 275 | 275 | flags |= LOOK_CR; |
| 276 | 276 | if( n<(2*sizeof(WCHAR_T)) || UTF16_SWAP_IF(bReverse, z[1])!='\n' ){ |
| 277 | - flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ | |
| 277 | + flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ | |
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | if( n ){ |
| 282 | 282 | flags |= LOOK_SHORT; /* The whole blob was not examined */ |
| 283 | 283 |
| --- src/lookslike.c | |
| +++ src/lookslike.c | |
| @@ -95,11 +95,11 @@ | |
| 95 | if( c==0 ){ |
| 96 | flags |= LOOK_NUL; /* NUL character in a file -> binary */ |
| 97 | }else if( c=='\r' ){ |
| 98 | flags |= LOOK_CR; |
| 99 | if( n<=1 || z[1]!='\n' ){ |
| 100 | flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ |
| 101 | } |
| 102 | } |
| 103 | j = (c!='\n'); |
| 104 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 105 | while( !(flags&stopFlags) && --n>0 ){ |
| @@ -119,11 +119,11 @@ | |
| 119 | } |
| 120 | j = 0; |
| 121 | }else if( c=='\r' ){ |
| 122 | flags |= LOOK_CR; |
| 123 | if( n<=1 || z[1]!='\n' ){ |
| 124 | flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | if( n ){ |
| 129 | flags |= LOOK_SHORT; /* The whole blob was not examined */ |
| @@ -244,11 +244,11 @@ | |
| 244 | if( c==0 ){ |
| 245 | flags |= LOOK_NUL; /* NUL character in a file -> binary */ |
| 246 | }else if( c=='\r' ){ |
| 247 | flags |= LOOK_CR; |
| 248 | if( n<(2*sizeof(WCHAR_T)) || UTF16_SWAP_IF(bReverse, z[1])!='\n' ){ |
| 249 | flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ |
| 250 | } |
| 251 | } |
| 252 | j = (c!='\n'); |
| 253 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 254 | while( !(flags&stopFlags) && ((n-=sizeof(WCHAR_T))>=sizeof(WCHAR_T)) ){ |
| @@ -272,11 +272,11 @@ | |
| 272 | } |
| 273 | j = 0; |
| 274 | }else if( c=='\r' ){ |
| 275 | flags |= LOOK_CR; |
| 276 | if( n<(2*sizeof(WCHAR_T)) || UTF16_SWAP_IF(bReverse, z[1])!='\n' ){ |
| 277 | flags |= LOOK_LONE_CR; /* More chars, next char is not LF */ |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | if( n ){ |
| 282 | flags |= LOOK_SHORT; /* The whole blob was not examined */ |
| 283 |
| --- src/lookslike.c | |
| +++ src/lookslike.c | |
| @@ -95,11 +95,11 @@ | |
| 95 | if( c==0 ){ |
| 96 | flags |= LOOK_NUL; /* NUL character in a file -> binary */ |
| 97 | }else if( c=='\r' ){ |
| 98 | flags |= LOOK_CR; |
| 99 | if( n<=1 || z[1]!='\n' ){ |
| 100 | flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ |
| 101 | } |
| 102 | } |
| 103 | j = (c!='\n'); |
| 104 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 105 | while( !(flags&stopFlags) && --n>0 ){ |
| @@ -119,11 +119,11 @@ | |
| 119 | } |
| 120 | j = 0; |
| 121 | }else if( c=='\r' ){ |
| 122 | flags |= LOOK_CR; |
| 123 | if( n<=1 || z[1]!='\n' ){ |
| 124 | flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | if( n ){ |
| 129 | flags |= LOOK_SHORT; /* The whole blob was not examined */ |
| @@ -244,11 +244,11 @@ | |
| 244 | if( c==0 ){ |
| 245 | flags |= LOOK_NUL; /* NUL character in a file -> binary */ |
| 246 | }else if( c=='\r' ){ |
| 247 | flags |= LOOK_CR; |
| 248 | if( n<(2*sizeof(WCHAR_T)) || UTF16_SWAP_IF(bReverse, z[1])!='\n' ){ |
| 249 | flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ |
| 250 | } |
| 251 | } |
| 252 | j = (c!='\n'); |
| 253 | if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */ |
| 254 | while( !(flags&stopFlags) && ((n-=sizeof(WCHAR_T))>=sizeof(WCHAR_T)) ){ |
| @@ -272,11 +272,11 @@ | |
| 272 | } |
| 273 | j = 0; |
| 274 | }else if( c=='\r' ){ |
| 275 | flags |= LOOK_CR; |
| 276 | if( n<(2*sizeof(WCHAR_T)) || UTF16_SWAP_IF(bReverse, z[1])!='\n' ){ |
| 277 | flags |= LOOK_LONE_CR; /* Not enough chars or next char not LF */ |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | if( n ){ |
| 282 | flags |= LOOK_SHORT; /* The whole blob was not examined */ |
| 283 |