summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | | | | | | | | | | | | | | | Merge 8.6jan.nijtmans2020-05-053-62/+59
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge-markjan.nijtmans2020-05-040-0/+0
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge 8.6jan.nijtmans2020-05-041-2/+2
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge-markjan.nijtmans2020-05-030-0/+0
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge 8.6jan.nijtmans2020-05-022-28/+28
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Improve/simplify "testutfnext" and "testutfprev" commands. Now don't need to ↵jan.nijtmans2020-05-012-428/+411
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do special things with byte arrays. You can use "testbytestring" for that. This makes it more clear which test-cases use invalid byte-sequences. Now "testutfnext" also checks whether Tcl_UtfNext() reads src[-1] and src[end], and will warn you when it does.
| | | | * | | | | | | | | | | | | | | | | | | | | | | | Better structurize the UTF-8 (mainly around Tcl_UtfNext()/Tcl_UtfPrev(), but ↵jan.nijtmans2020-04-292-471/+454
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not only those) test-cases: Selector "ucs2" is meant for Tcl 8.5: No knowledge at all about 4-byte sequences. Selector "ucs4" is meant for Tcl 8.5 or 8.7 with TCL_UTF_MAX=4 or Tcl 8.6 with TCL_UTF_MAX=6 Selector "tip389" is meant for Tcl 8.6 with TCL_UTF_MAX=4 and Tcl 8.7 with TCL_UTF_MAX=3 (of course, this is too simple: there will be testcases needing more than those 3
| | | * | | | | | | | | | | | | | | | | | | | | | | | | Never mind remark about TIP #573 in previous commit: Test failure was due to ↵jan.nijtmans2020-05-012-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typo. Fixed now.
| | | * | | | | | | | | | | | | | | | | | | | | | | | | Fix first part of [ed29806baf]: Tcl_UtfToUniChar reads more than TCL_UTF_MAX ↵jan.nijtmans2020-05-015-22/+28
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bytes. Tcl_UtfToUniChar() now never reads more than TCL_UTF_MAX bytes any more. Since the UtfToUtf encoder/decoder now uses TclUtfToUCS4() it doesn't join 2 surrogates as 2 x 3-byte sequences any more. Actually, it shouldn't, because such sequences are invalid UTF-8. Therefore, added the ucs2 constraint to testcase encoding-15.4. Let's see how TIP #573 goes, this TIP should make this change official. Other callers of Tcl_UtfToUniChar() needs to be revised for the same problem. Most callers will need to change Tcl_UtfToUniChar() -> TclUtfToUCS4() and Tcl_UtfCharComplete() -> TclUCS4Complete(), but that's not done yet.
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ merge 8.6dgp2020-04-301-0/+9
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ merge 8.6dgp2020-04-303-4/+10
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert implementation of Tcl_UniCharAtIndex() change done in this commit: ↵jan.nijtmans2020-05-121-1/+3
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [6596c4af31e29b5d]. Just look at the Tcl_UtfAtIndex() implementation for TCL_UTF_MAX=4: It's not the same. There are no test-cases for Tcl_UniCharAtIndex(), see [f45d0dc1a7], not really worth to write one, since the implementation of this function didn't change in 20 years.
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge 8.5jan.nijtmans2020-05-121-66/+59
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | / / | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | | | | | | Unsplit some test-cases and renumber, for testcase which give the same ↵jan.nijtmans2020-05-121-100/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | results for different TCL_UTF_MAX values.
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix [d402ffe76]: Win32 potential crash when using main(). Thanks to ↵jan.nijtmans2020-05-112-20/+22
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christian Werner for the Bug report and the Fix.
| * | | | | | | | | | | | | | | | | | | | | | | | | | | Tweak the Tcl_UtfPrev() implementation for TCL_UTF_MAX=4. This fixes 10 ↵jan.nijtmans2020-05-112-35/+29
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testcases in 4 groups (utf-7.10, utf-7.15, utf-7.40 and utf-7.48) , where Tcl_UtfPrev() didn't jump to the beginning of the UTF-8 character, even though there was no limitation which prevented that. So, this is actually a bug-fix for the TIP #389 implementation.
| * | | | | | | | | | | | | | | | | | | | | | | | | | occurance -> occurrence.jan.nijtmans2020-05-119-22/+22
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | | | | Tweak Invalid() function: No need for "return 0" twice in the function. jan.nijtmans2020-05-102-15/+38
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For start bytes F0-F4, case TCL_UTF_MAX=4, Tcl_UtfToUniChar() reads 3 bytes but only advances 1 byte. So Tcl_UtfCharComplete() must make sure 3 bytes are available, not 1. Adapt Tcl_UtfCharComplete() accordingly. No change for TCL_UTF_MAX=[3|6]
| * | | | | | | | | | | | | | | | | | | | | | | | Merge bug-31aa44375d branch. Mark encoding-15.5 testcase as "knownBug". ↵jan.nijtmans2020-05-103-39/+16
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discussion is not over yet, but we need a base for comparision in order to come up with alternatives.
| | * | | | | | | | | | | | | | | | | | | | | | | Rebase to latest core-8-6-branch.jan.nijtmans2020-05-083-39/+21
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / /
| | * | | | | | | | | | | | | | | | | | | | | | | Merge changes from parent branchdgp2020-05-072-35/+49
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | | | |/| | | | | | | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | | | | | | | | | Merge 8.6jan.nijtmans2020-05-072-40/+54
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | | | | |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | | split and constrain the failing test.dgp2020-05-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | | New approach to fixing the regression reported in [31aa44375d] builds ondgp2020-05-071-17/+3
| | |/ / / / / / / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recent reforms. Older efforts aborted.
| | * | | | | | | | | | | | | | | | | | | | | | merge 8.6dgp2020-05-071-2/+8
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | | | |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | Merge 8.6. Some more tweaks to Tcl_UtfPrev(), so it cannot jump back 4 bytes ↵jan.nijtmans2020-05-0712-665/+663
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in "utf16" build any more.
| | * | | | | | | | | | | | | | | | | | | | | | Add 4 test-cases that could fool Tcl_UtfPrev (but ... actually they don't).jan.nijtmans2020-05-052-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that Tcl_UtfPrev() never reads more than 3 trail bytes (or 4 when TCL_UTF_MAX > 4). Those are the same limits as for Tcl_UtfNext() and Tcl_UtfToUniChar()
| | * | | | | | | | | | | | | | | | | | | | | | Merge 8.6jan.nijtmans2020-05-053-26/+26
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|_|_|_|/ / / / / / / / | | | |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | More progress/simplificationjan.nijtmans2020-05-042-42/+14
| | | | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | Merge 8.6jan.nijtmans2020-05-046-18/+98
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|_|_|_|/ / / / / / / / | | | |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | Merge 8.6jan.nijtmans2020-05-049-55/+59
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|_|_|_|/ / / / / / / / | | | |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | Merge 8.6jan.nijtmans2020-05-035-41/+77
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|_|_|_|/ / / / / / / / | | | |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | Seems almost correct. Still problem with "string index" for TCL_UTF_MAX>3jan.nijtmans2020-05-022-74/+66
| | | | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | | More fixes for [ed29806baf]. Not working yet. WIPjan.nijtmans2020-05-024-41/+71
| | | |_|_|_|_|_|_|_|_|_|_|/ / / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | Merge 8.5jan.nijtmans2020-05-082-9/+27
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|_|/ / / / / / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | / | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | More test-case cleanup. Enhance "testutfnext", so it can detect whether ↵jan.nijtmans2020-05-082-91/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bytes after the string-end are read. The command will return -1 in that case. No need for additional arguments any more.
| * | | | | | | | | | | | | | | | | | | | | More testcases that can run without "testbytestring" constraints.jan.nijtmans2020-05-081-36/+36
| | |_|_|_|_|_|_|_|/ / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | close forkdgp2020-05-071-5/+5
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge 8.5jan.nijtmans2020-05-071-20/+20
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * | \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ merge 8.5dgp2020-05-072-22/+32
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / / / | |/| | / / / / / / / / / / / / / / / / / / / | | | |/ / / / / / / / / / / / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | close forkdgp2020-05-071-16/+16
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / / / / / / / / / / /
| | | * | | | | | | | | | | | | | | | | | | Simplify test-cases which don't need the "testbytestring" command to run ↵jan.nijtmans2020-05-071-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without it. e.g. [testbytestring \xC2\xA2] is the same as just \xA2.
| | * | | | | | | | | | | | | | | | | | | | Same trouble with Tcl_UtfToUniCharDstring. Test and fix.dgp2020-05-072-5/+15
| | |/ / / / / / / / / / / / / / / / / / /
| * | | | | | | | | | | | | | | | | | | | merge 8.5dgp2020-05-072-14/+18
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / | | | | | | | | | / / / / / / / / / / / / | | |_|_|_|_|_|_|/ / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | [b2816a3afe] Fix counting of malformed sequences at end of string.dgp2020-05-072-9/+13
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | | | | | | | Fix. Note that just because we get one positive detection of an incompletedgp2020-05-071-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | character, we cannot conclude that the next byte also will be, or can by taken as a single byte. At least we cannot when TCL_UTF_MAX > 3 so that we have room for valid two-byte sequences after incomplete sequence detection. No need for conditional code, just use an algorithm that always works.
| | | * | | | | | | | | | | | | | | | | | Test demonstrating bug in ticket [b2816a3afe].dgp2020-05-071-0/+3
| | |/ / / / / / / / / / / / / / / / / /
| * | | | | | | | | | | | | | | | | | | For TCL_UTF_MAX==4: Make sure that Tcl_UtfNext()/Tcl_UtfPrev() never move ↵jan.nijtmans2020-05-072-86/+87
| | |_|_|_|_|_|/ / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more than 3 bytes. This is more consistant with what Tcl 8.7 does too. For TCL_UTF_MAX==6: Make sure that Tcl_UtfNext()/Tcl_UtfPrev() never move more than 4 bytes. For TCL_UTF_MAX==3: No change. Introduce ucs2_utf16 test constraint, since many test results now become the same for ucs2 and utf16.
| * | | | | | | | | | | | | | | | | | Optimize Tcl_UtfToUniCharDString()jan.nijtmans2020-05-071-23/+26
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | / | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | Tighten optimization in Tcl_UtfToUniCharDString(), just as in ↵jan.nijtmans2020-05-071-81/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tcl_NumUtfChars(). Don't use "-1" in the Tcl_NumUtfChars() calculation, since that raises more questions than it solves, but that's easy to be remedied as well: Juse use >= in stead of > in the comparation. Great idea, Don! Backport more code formatting from Tcl 8.6 (e.g. use of CONST, which makes no sense any more in c-files)