Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch bomRefactor Excluding Merge-Ins
This is equivalent to a diff from a4cdc7235a to 3f2f1e62fa
2013-03-19
| ||
17:40 | Merge UTF-16 byte swapping fix and test-looks-like-utf command enhancements. check-in: b4bec3753d user: mistachkin tags: trunk | |
17:37 | Fix overly eager byte swapping when checking for UTF-16 text. Closed-Leaf check-in: 3f2f1e62fa user: mistachkin tags: bomRefactor | |
08:59 | Merge "cr-warning" branch to trunk: Fossil now warns before committing files with CR line-endings and offers to convert them to LF line-endings; fossil's diff cannot handle those. In checkin.c, use LOOK_BINARY in stead of LOOK_NUL, in case more flags are added to the BINARY detection. Rename LOOK_LENGTH to LOOK_LONG. check-in: ea2598e447 user: jan.nijtmans tags: trunk | |
08:34 | Fix expected value of test-cases: The value of LOOK_LONE_CR is wrong in 19 cases. I leave it to Joe to fix the code. check-in: 8af1541ac5 user: jan.nijtmans tags: bomRefactor | |
2013-03-18
| ||
23:47 | Make sure that LOOK_CR is set even when a CR/LF pair is detected. Rename the LOOK_LENGTH flag to LOOK_LONG for clarify. Add LOOK_SHORT flag to indicate that the looks_like_utf16() function did not perform a full check. Support tests for UTF-16 in reverse byte order. Enhancements to the test-looks-like-utf command. check-in: b0b3f2a44f user: mistachkin tags: bomRefactor | |
12:37 | Adapt test-case 112 such that it contains a reversed CR/LF, a case not covered before. Fix detection of reversed CR/LF and lone CR in reversed UTF-16 case, broken by [e3f9a42b58]. check-in: a4cdc7235a user: jan.nijtmans tags: trunk | |
11:45 | Add test-cases using reverse UTF-16 BOM, and the unicode characters U+0A00 and U+0D00 check-in: d1f0c4b93e user: jan.nijtmans tags: trunk | |
Changes to src/checkin.c.
︙ | |||
908 909 910 911 912 913 914 | 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 | - + - - + + - + - + | const char *zFilename /* The full name of the file being committed. */ ){ int bReverse; /* UTF-16 byte order is reversed? */ int fUnicode; /* return value of starts_with_utf16_bom() */ int lookFlags; /* output flags from looks_like_utf8/utf16() */ int fHasNul; /* the blob contains one or more NUL chars */ int fHasCrLf; /* the blob contains one or more CR/LF pairs */ |
︙ |
Changes to src/diff.c.
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + + - + | #define LOOK_NONE ((int)0x00000000) /* Nothing special was found. */ #define LOOK_NUL ((int)0x00000001) /* One or more NUL chars were found. */ #define LOOK_CR ((int)0x00000002) /* One or more CR chars were found. */ #define LOOK_LONE_CR ((int)0x00000004) /* An unpaired CR char was found. */ #define LOOK_LF ((int)0x00000008) /* One or more LF chars were found. */ #define LOOK_LONE_LF ((int)0x00000010) /* An unpaired CR char was found. */ #define LOOK_CRLF ((int)0x00000020) /* One or more CR/LF pairs were found. */ |
︙ | |||
255 256 257 258 259 260 261 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | - + - + - + - - + + - + + | int c2 = c; c = *++z; ++j; if( c==0 ){ flags |= LOOK_NUL; /* NUL character in a file -> binary */ }else if( c=='\n' ){ flags |= LOOK_LF; if( c2=='\r' ){ |
︙ | |||
344 345 346 347 348 349 350 351 352 | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | + + + - - + + + + + + + + - - - - + + - + - + - + - - - - + + + + + + - - - + | if( n==0 ) return flags; /* Empty file -> text */ if( n%sizeof(WCHAR_T) ){ flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */ if( n<sizeof(WCHAR_T) ) return flags; /* One byte -> binary (UTF-8?) */ } c = *z; if( bReverse ){ c = UTF16_SWAP(c); } if( c==0 ){ flags |= LOOK_NUL; /* NUL character in a file -> binary */ |
︙ | |||
2521 2522 2523 2524 2525 2526 2527 | 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 | - - + + + - - - - + + + + - + - + + | */ void looks_like_utf_test_cmd(void){ Blob blob; /* the contents of the specified file */ int fUtf8; /* return value of starts_with_utf8_bom() */ int fUtf16; /* return value of starts_with_utf16_bom() */ int fUnicode; /* return value of could_be_utf16() */ int lookFlags; /* output flags from looks_like_utf8/utf16() */ |
Changes to test/utf.test.
more than 10,000 changes