Fossil SCM

Fix some outdated comments for clarity.

mistachkin 2015-12-23 21:37 trunk
Commit 6e3fcebcfca057ba0e6192f90a9697765b823fcf
1 file changed +4 -4
+4 -4
--- src/lookslike.c
+++ src/lookslike.c
@@ -95,11 +95,11 @@
9595
if( c==0 ){
9696
flags |= LOOK_NUL; /* NUL character in a file -> binary */
9797
}else if( c=='\r' ){
9898
flags |= LOOK_CR;
9999
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 */
101101
}
102102
}
103103
j = (c!='\n');
104104
if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */
105105
while( !(flags&stopFlags) && --n>0 ){
@@ -119,11 +119,11 @@
119119
}
120120
j = 0;
121121
}else if( c=='\r' ){
122122
flags |= LOOK_CR;
123123
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 */
125125
}
126126
}
127127
}
128128
if( n ){
129129
flags |= LOOK_SHORT; /* The whole blob was not examined */
@@ -244,11 +244,11 @@
244244
if( c==0 ){
245245
flags |= LOOK_NUL; /* NUL character in a file -> binary */
246246
}else if( c=='\r' ){
247247
flags |= LOOK_CR;
248248
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 */
250250
}
251251
}
252252
j = (c!='\n');
253253
if( !j ) flags |= (LOOK_LF | LOOK_LONE_LF); /* Found LF as first char */
254254
while( !(flags&stopFlags) && ((n-=sizeof(WCHAR_T))>=sizeof(WCHAR_T)) ){
@@ -272,11 +272,11 @@
272272
}
273273
j = 0;
274274
}else if( c=='\r' ){
275275
flags |= LOOK_CR;
276276
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 */
278278
}
279279
}
280280
}
281281
if( n ){
282282
flags |= LOOK_SHORT; /* The whole blob was not examined */
283283
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button