Fossil SCM
Style and comment fixes.
Commit
4368611ba8c0025d9a8a425b656b1d43a97c0f98
Parent
25eec8cfafa70f5…
1 file changed
+4
-3
+4
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -914,15 +914,16 @@ | ||
| 914 | 914 | Blob fname; /* Relative pathname of the file */ |
| 915 | 915 | static int allOk = 0; /* Set to true to disable this routine */ |
| 916 | 916 | |
| 917 | 917 | if( allOk ) return 0; |
| 918 | 918 | fUnicode = starts_with_utf16_bom(p, 0, 0); |
| 919 | - if (fUnicode) { | |
| 919 | + if( fUnicode ){ | |
| 920 | 920 | eType = looks_like_utf16(p, &lookFlags); |
| 921 | - if ( lookFlags&LOOK_ODD ){ | |
| 922 | - /* It cannot be unicode, so try again as single-byte encoding */ | |
| 921 | + if( lookFlags&LOOK_ODD ){ | |
| 922 | + /* Content with an odd number of bytes cannot be UTF-16. */ | |
| 923 | 923 | fUnicode = 0; |
| 924 | + /* Therefore, check if the content appears to be UTF-8. */ | |
| 924 | 925 | eType = looks_like_utf8(p, &lookFlags); |
| 925 | 926 | } |
| 926 | 927 | }else{ |
| 927 | 928 | eType = looks_like_utf8(p, &lookFlags); |
| 928 | 929 | } |
| 929 | 930 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -914,15 +914,16 @@ | |
| 914 | Blob fname; /* Relative pathname of the file */ |
| 915 | static int allOk = 0; /* Set to true to disable this routine */ |
| 916 | |
| 917 | if( allOk ) return 0; |
| 918 | fUnicode = starts_with_utf16_bom(p, 0, 0); |
| 919 | if (fUnicode) { |
| 920 | eType = looks_like_utf16(p, &lookFlags); |
| 921 | if ( lookFlags&LOOK_ODD ){ |
| 922 | /* It cannot be unicode, so try again as single-byte encoding */ |
| 923 | fUnicode = 0; |
| 924 | eType = looks_like_utf8(p, &lookFlags); |
| 925 | } |
| 926 | }else{ |
| 927 | eType = looks_like_utf8(p, &lookFlags); |
| 928 | } |
| 929 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -914,15 +914,16 @@ | |
| 914 | Blob fname; /* Relative pathname of the file */ |
| 915 | static int allOk = 0; /* Set to true to disable this routine */ |
| 916 | |
| 917 | if( allOk ) return 0; |
| 918 | fUnicode = starts_with_utf16_bom(p, 0, 0); |
| 919 | if( fUnicode ){ |
| 920 | eType = looks_like_utf16(p, &lookFlags); |
| 921 | if( lookFlags&LOOK_ODD ){ |
| 922 | /* Content with an odd number of bytes cannot be UTF-16. */ |
| 923 | fUnicode = 0; |
| 924 | /* Therefore, check if the content appears to be UTF-8. */ |
| 925 | eType = looks_like_utf8(p, &lookFlags); |
| 926 | } |
| 927 | }else{ |
| 928 | eType = looks_like_utf8(p, &lookFlags); |
| 929 | } |
| 930 |