Fossil SCM
Coding style fixes.
Commit
aadbbb38d6cd3e7c12f990e15f5ff9549d4f210b
Parent
c9ec3d1886367b5…
1 file changed
+9
-9
+9
-9
| --- src/comformat.c | ||
| +++ src/comformat.c | ||
| @@ -127,14 +127,14 @@ | ||
| 127 | 127 | ){ |
| 128 | 128 | int nextIndex = index + 1; |
| 129 | 129 | int fNonASCII=0; |
| 130 | 130 | for(;;){ |
| 131 | 131 | char c = zLine[nextIndex]; |
| 132 | - if ( (c&0x80)==0x80 ) fNonASCII=1; | |
| 132 | + if( (c&0x80)==0x80 ) fNonASCII=1; | |
| 133 | 133 | if( c==0 || fossil_isspace(c) ){ |
| 134 | - if ( distUTF8 ){ | |
| 135 | - if ( fNonASCII!=0 ){ | |
| 134 | + if( distUTF8 ){ | |
| 135 | + if( fNonASCII!=0 ){ | |
| 136 | 136 | *distUTF8 = strlen_utf8(&zLine[index], nextIndex-index); |
| 137 | 137 | }else{ |
| 138 | 138 | *distUTF8 = nextIndex-index; |
| 139 | 139 | } |
| 140 | 140 | } |
| @@ -162,11 +162,11 @@ | ||
| 162 | 162 | int lengthUTF8=0; /* Counted UTF-8 sequences. */ |
| 163 | 163 | int i; |
| 164 | 164 | for( i=0; i<lengthBytes; i++ ){ |
| 165 | 165 | char c = zString[i]; |
| 166 | 166 | lengthUTF8++; |
| 167 | - if ( (c&0xc0)==0xc0 ){ /* Any UTF-8 lead byte 11xxxxxx */ | |
| 167 | + if( (c&0xc0)==0xc0 ){ /* Any UTF-8 lead byte 11xxxxxx */ | |
| 168 | 168 | int cchUTF8=1; /* Code units consumed. */ |
| 169 | 169 | int maxUTF8=1; /* Expected sequence length. */ |
| 170 | 170 | if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */ |
| 171 | 171 | else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */ |
| 172 | 172 | else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */ |
| @@ -228,28 +228,28 @@ | ||
| 228 | 228 | if( lineChars<=0 ) return; |
| 229 | 229 | #if 0 |
| 230 | 230 | assert( indent<sizeof(zBuf)-5 ); /* See following comments to explain */ |
| 231 | 231 | assert( origIndent<sizeof(zBuf)-5 ); /* these limits. */ |
| 232 | 232 | #endif |
| 233 | - if ( indent>sizeof(zBuf)-6 ) /* Limit initial indent to fit output buffer. */ | |
| 233 | + if( indent>sizeof(zBuf)-6 ) /* Limit initial indent to fit output buffer. */ | |
| 234 | 234 | indent = sizeof(zBuf)-6; |
| 235 | 235 | comment_calc_indent(zLine, indent, trimCrLf, trimSpace, &index); |
| 236 | - if ( indent>0 ){ | |
| 236 | + if( indent>0 ){ | |
| 237 | 237 | for ( i=0; i<indent; i++ ){ |
| 238 | 238 | zBuf[iBuf++] = ' '; |
| 239 | 239 | } |
| 240 | 240 | } |
| 241 | - if ( origIndent>sizeof(zBuf)-6 ) /* Limit line indent to fit output buffer. */ | |
| 241 | + if( origIndent>sizeof(zBuf)-6 ) /* Limit line indent to fit output buffer. */ | |
| 242 | 242 | origIndent = sizeof(zBuf)-6; |
| 243 | 243 | maxChars = lineChars; |
| 244 | 244 | for(;;){ |
| 245 | 245 | int useChars = 1; |
| 246 | 246 | char c = zLine[index]; |
| 247 | 247 | /* Flush the output buffer if there's no space left for at least one more |
| 248 | 248 | ** (potentially 4-byte) UTF-8 sequence, one level of indentation spaces, |
| 249 | 249 | ** a new line, and a terminating NULL. */ |
| 250 | - if ( iBuf>sizeof(zBuf)-origIndent-6 ){ | |
| 250 | + if( iBuf>sizeof(zBuf)-origIndent-6 ){ | |
| 251 | 251 | zBuf[iBuf]=0; |
| 252 | 252 | iBuf=0; |
| 253 | 253 | fossil_print("%s", zBuf); |
| 254 | 254 | } |
| 255 | 255 | if( c==0 ){ |
| @@ -328,11 +328,11 @@ | ||
| 328 | 328 | if( charCnt>0 ){ |
| 329 | 329 | zBuf[iBuf++] = '\n'; |
| 330 | 330 | lineCnt++; |
| 331 | 331 | } |
| 332 | 332 | /* Flush the remaining output buffer. */ |
| 333 | - if ( iBuf>0 ) { | |
| 333 | + if( iBuf>0 ) { | |
| 334 | 334 | zBuf[iBuf]=0; |
| 335 | 335 | iBuf=0; |
| 336 | 336 | fossil_print("%s", zBuf); |
| 337 | 337 | } |
| 338 | 338 | if( pLineCnt ){ |
| 339 | 339 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -127,14 +127,14 @@ | |
| 127 | ){ |
| 128 | int nextIndex = index + 1; |
| 129 | int fNonASCII=0; |
| 130 | for(;;){ |
| 131 | char c = zLine[nextIndex]; |
| 132 | if ( (c&0x80)==0x80 ) fNonASCII=1; |
| 133 | if( c==0 || fossil_isspace(c) ){ |
| 134 | if ( distUTF8 ){ |
| 135 | if ( fNonASCII!=0 ){ |
| 136 | *distUTF8 = strlen_utf8(&zLine[index], nextIndex-index); |
| 137 | }else{ |
| 138 | *distUTF8 = nextIndex-index; |
| 139 | } |
| 140 | } |
| @@ -162,11 +162,11 @@ | |
| 162 | int lengthUTF8=0; /* Counted UTF-8 sequences. */ |
| 163 | int i; |
| 164 | for( i=0; i<lengthBytes; i++ ){ |
| 165 | char c = zString[i]; |
| 166 | lengthUTF8++; |
| 167 | if ( (c&0xc0)==0xc0 ){ /* Any UTF-8 lead byte 11xxxxxx */ |
| 168 | int cchUTF8=1; /* Code units consumed. */ |
| 169 | int maxUTF8=1; /* Expected sequence length. */ |
| 170 | if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */ |
| 171 | else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */ |
| 172 | else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */ |
| @@ -228,28 +228,28 @@ | |
| 228 | if( lineChars<=0 ) return; |
| 229 | #if 0 |
| 230 | assert( indent<sizeof(zBuf)-5 ); /* See following comments to explain */ |
| 231 | assert( origIndent<sizeof(zBuf)-5 ); /* these limits. */ |
| 232 | #endif |
| 233 | if ( indent>sizeof(zBuf)-6 ) /* Limit initial indent to fit output buffer. */ |
| 234 | indent = sizeof(zBuf)-6; |
| 235 | comment_calc_indent(zLine, indent, trimCrLf, trimSpace, &index); |
| 236 | if ( indent>0 ){ |
| 237 | for ( i=0; i<indent; i++ ){ |
| 238 | zBuf[iBuf++] = ' '; |
| 239 | } |
| 240 | } |
| 241 | if ( origIndent>sizeof(zBuf)-6 ) /* Limit line indent to fit output buffer. */ |
| 242 | origIndent = sizeof(zBuf)-6; |
| 243 | maxChars = lineChars; |
| 244 | for(;;){ |
| 245 | int useChars = 1; |
| 246 | char c = zLine[index]; |
| 247 | /* Flush the output buffer if there's no space left for at least one more |
| 248 | ** (potentially 4-byte) UTF-8 sequence, one level of indentation spaces, |
| 249 | ** a new line, and a terminating NULL. */ |
| 250 | if ( iBuf>sizeof(zBuf)-origIndent-6 ){ |
| 251 | zBuf[iBuf]=0; |
| 252 | iBuf=0; |
| 253 | fossil_print("%s", zBuf); |
| 254 | } |
| 255 | if( c==0 ){ |
| @@ -328,11 +328,11 @@ | |
| 328 | if( charCnt>0 ){ |
| 329 | zBuf[iBuf++] = '\n'; |
| 330 | lineCnt++; |
| 331 | } |
| 332 | /* Flush the remaining output buffer. */ |
| 333 | if ( iBuf>0 ) { |
| 334 | zBuf[iBuf]=0; |
| 335 | iBuf=0; |
| 336 | fossil_print("%s", zBuf); |
| 337 | } |
| 338 | if( pLineCnt ){ |
| 339 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -127,14 +127,14 @@ | |
| 127 | ){ |
| 128 | int nextIndex = index + 1; |
| 129 | int fNonASCII=0; |
| 130 | for(;;){ |
| 131 | char c = zLine[nextIndex]; |
| 132 | if( (c&0x80)==0x80 ) fNonASCII=1; |
| 133 | if( c==0 || fossil_isspace(c) ){ |
| 134 | if( distUTF8 ){ |
| 135 | if( fNonASCII!=0 ){ |
| 136 | *distUTF8 = strlen_utf8(&zLine[index], nextIndex-index); |
| 137 | }else{ |
| 138 | *distUTF8 = nextIndex-index; |
| 139 | } |
| 140 | } |
| @@ -162,11 +162,11 @@ | |
| 162 | int lengthUTF8=0; /* Counted UTF-8 sequences. */ |
| 163 | int i; |
| 164 | for( i=0; i<lengthBytes; i++ ){ |
| 165 | char c = zString[i]; |
| 166 | lengthUTF8++; |
| 167 | if( (c&0xc0)==0xc0 ){ /* Any UTF-8 lead byte 11xxxxxx */ |
| 168 | int cchUTF8=1; /* Code units consumed. */ |
| 169 | int maxUTF8=1; /* Expected sequence length. */ |
| 170 | if( (c&0xe0)==0xc0 )maxUTF8=2; /* UTF-8 lead byte 110vvvvv */ |
| 171 | else if( (c&0xf0)==0xe0 )maxUTF8=3; /* UTF-8 lead byte 1110vvvv */ |
| 172 | else if( (c&0xf8)==0xf0 )maxUTF8=4; /* UTF-8 lead byte 11110vvv */ |
| @@ -228,28 +228,28 @@ | |
| 228 | if( lineChars<=0 ) return; |
| 229 | #if 0 |
| 230 | assert( indent<sizeof(zBuf)-5 ); /* See following comments to explain */ |
| 231 | assert( origIndent<sizeof(zBuf)-5 ); /* these limits. */ |
| 232 | #endif |
| 233 | if( indent>sizeof(zBuf)-6 ) /* Limit initial indent to fit output buffer. */ |
| 234 | indent = sizeof(zBuf)-6; |
| 235 | comment_calc_indent(zLine, indent, trimCrLf, trimSpace, &index); |
| 236 | if( indent>0 ){ |
| 237 | for ( i=0; i<indent; i++ ){ |
| 238 | zBuf[iBuf++] = ' '; |
| 239 | } |
| 240 | } |
| 241 | if( origIndent>sizeof(zBuf)-6 ) /* Limit line indent to fit output buffer. */ |
| 242 | origIndent = sizeof(zBuf)-6; |
| 243 | maxChars = lineChars; |
| 244 | for(;;){ |
| 245 | int useChars = 1; |
| 246 | char c = zLine[index]; |
| 247 | /* Flush the output buffer if there's no space left for at least one more |
| 248 | ** (potentially 4-byte) UTF-8 sequence, one level of indentation spaces, |
| 249 | ** a new line, and a terminating NULL. */ |
| 250 | if( iBuf>sizeof(zBuf)-origIndent-6 ){ |
| 251 | zBuf[iBuf]=0; |
| 252 | iBuf=0; |
| 253 | fossil_print("%s", zBuf); |
| 254 | } |
| 255 | if( c==0 ){ |
| @@ -328,11 +328,11 @@ | |
| 328 | if( charCnt>0 ){ |
| 329 | zBuf[iBuf++] = '\n'; |
| 330 | lineCnt++; |
| 331 | } |
| 332 | /* Flush the remaining output buffer. */ |
| 333 | if( iBuf>0 ) { |
| 334 | zBuf[iBuf]=0; |
| 335 | iBuf=0; |
| 336 | fossil_print("%s", zBuf); |
| 337 | } |
| 338 | if( pLineCnt ){ |
| 339 |