Compare commits

...
Author SHA1 Message Date
jan.nijtmans d3b843bcbb Experiment: make "encoding" mandatory, when preceded by -strict/-failvar/-nocomplain options 2023-01-25 17:09:18 +00:00
pooryorick 7426076e0f Test TableFromUtfProc() with strict handling of encoding errors. 2023-01-25 10:02:27 +00:00
jan.nijtmans 1dd572d476 First part of fix for [4a7397e0b3]. Not complete yet. 2023-01-24 20:00:22 +00:00
jan.nijtmans 20ace1aa6c Merge 9.0 2023-01-24 09:30:00 +00:00
jan.nijtmans ef42e37c44 Merge-mark. Fix testConstraint utf32 (in tests/string.test) 2023-01-23 20:51:36 +00:00
jan.nijtmans 42b0b497a1 Merge-mark 2023-01-23 20:08:40 +00:00
jan.nijtmans 46dcc60e41 Better error-message for previous commit. Some more code-cleanup, backported from 8.7 2023-01-23 19:18:39 +00:00
jan.nijtmans c5f7f66ceb Merge 8.7 2023-01-22 23:35:38 +00:00
jan.nijtmans b31d886479 Merge-mark 2023-01-22 23:03:09 +00:00
jan.nijtmans c08798d0f4 Fix [3e8074aea7]: [interp limit time -seconds] has a y2k38 problem 2023-01-22 22:53:36 +00:00
jan.nijtmans 04eb2cc696 Allow "-strict" and "-failindex" to be used together in "encoding convertfrom|convertto". As requested in ticket [a31caff057] 2023-01-22 22:51:41 +00:00
Kevin B Kenny 2b516939bd Merge 8.7 (Bug [e3dcab1d14]) 2023-01-22 02:02:37 +00:00
Kevin B Kenny 47b385e3db Bug [e3dcab1d14] - merge fix from 8.6 2023-01-22 01:55:54 +00:00
Kevin B Kenny 4ef7c0c4b8 Missed one more off-by-one error, also, tests misnumbered for merge forward. 2023-01-22 01:48:02 +00:00
Kevin B Kenny 119519c4df Remove unneeded hard-coded array size 2023-01-22 01:37:07 +00:00
Kevin B Kenny 52948a790c Bug [e3dcab1d14] fix 2023-01-22 01:33:44 +00:00
jan.nijtmans 792c57a7fb Make documentation conform to implementation in this branch 2023-01-20 20:59:22 +00:00
jan.nijtmans 073e6715d1 Better error-message 2023-01-20 16:51:50 +00:00
jan.nijtmans c611835152 Proposed fix for [3e8074aea7]: [interp limit time -seconds] has a y2k38 problem 2023-01-19 21:36:05 +00:00
jan.nijtmans 22657ad365 New proposal: Allow "-strict" immediately before or after "-failindex var". 2023-01-19 17:01:40 +00:00
jan.nijtmans 02838226fe Merge 8.7 2023-01-19 15:50:49 +00:00
jan.nijtmans 1c6b1c9e6c Merge 8.7 2023-01-19 15:00:07 +00:00
jan.nijtmans 6c8d9886b5 Fix [https://core.tcl-lang.org/tk/tktview?name=370b1ff03e|370b1ff03e]: Wrong Tk_MeasureChars result when linking with Tcl 9 (--disable-xft only)
This turned out to be an error in Tcl 8.7, after all. Since some test-cases depend on the replacement behavior on Tcl 8.6, we need to add "-nocomplainencoding" to make it work in Tcl 9.0.
2023-01-19 14:19:00 +00:00
jan.nijtmans 45bfcbb267 Merge 8.7 2023-01-18 17:06:05 +00:00
jan.nijtmans 31226696c3 Some test-cases need -nocomplainencoding 1, because they use the fallback behavior. 2023-01-18 14:10:09 +00:00
jan.nijtmans 5d50502a29 Forget about TCL_ENCODING_HACK_FLAG, this should be the fix. Testing ... 2023-01-18 13:26:15 +00:00
jan.nijtmans 925f00c5ca Use TCL_ENCODING_HACK_FLAG in TableFromUtfProc too 2023-01-17 14:15:39 +00:00
jan.nijtmans 5c38cce8df Merge trunk. Make test-cases pass (again). This might indicate a bug in utf-8 decoder, but that will be handled separately. 2023-01-17 13:42:59 +00:00
jan.nijtmans 40b6b98401 Merge 8.7 2023-01-16 13:11:01 +00:00
jan.nijtmans 5021d1c11f New flag TCL_ENCODING_HACK_FLAG to control the behaviour. (This is NOT the way to do it, but it's only meant for experimenting) 2023-01-16 13:10:07 +00:00
jan.nijtmans ca87000eac merge-mark 2023-01-16 10:07:31 +00:00
jan.nijtmans 56bcf3dcbe Merge 8.7 2023-01-15 20:56:58 +00:00
jan.nijtmans b9537d1098 Merge 9.0 2023-01-14 23:41:10 +00:00
jan.nijtmans 25f6837582 Same change for "encoding convertto" 2023-01-14 22:57:15 +00:00
jan.nijtmans 5aef206d2d Proposed fix for [a31caff057]: encoding command does not allow -strict to be used with -failindex 2023-01-14 22:20:53 +00:00
jan.nijtmans 33f4149ee5 Fix for [https://core.tcl-lang.org/tk/tktview?name=370b1ff03e|370b1ff03e]. Not complete/correct yet, since this backouts the fix for [4dbfa46caa] 2023-01-08 22:47:45 +00:00
jan.nijtmans 95e7615fc4 Merge 8.7 2023-01-06 17:35:08 +00:00
jan.nijtmans 8494cde084 Merge 8.7 2023-01-01 23:37:48 +00:00
jan.nijtmans a1de562f5c First part of fix for [4a7397e0b3]: Take flags into account when deciding to do a binary fcopy or not. TODO: Handle generating an exception 2022-12-24 14:36:57 +00:00
jan.nijtmans 6a1c2d8f52 Merge 8.7 2022-12-21 21:43:59 +00:00
jan.nijtmans 1faa0cca77 Merge 8.7 2022-12-21 13:19:16 +00:00
jan.nijtmans 7561bdb176 Merge 8.7 2022-12-20 09:42:26 +00:00
jan.nijtmans d61473e631 Merge 8.7 2022-12-19 15:44:27 +00:00
jan.nijtmans 002511bea4 MODULE_SCOPE TclLengthOne (in stead of 2 separate static functions doing the same) 2022-12-18 18:08:38 +00:00
jan.nijtmans 8b3ccee931 Merge 8.7 2022-12-16 15:31:52 +00:00
jan.nijtmans 42eb37a48c Merge 8.7 2022-12-16 15:19:30 +00:00
jan.nijtmans d748e3debf merge-mark 2022-12-16 12:19:52 +00:00
jan.nijtmans 5d7537b823 Merge 8.7 2022-12-16 10:25:02 +00:00
jan.nijtmans 4cca4b0b1c Merge 8.7 2022-12-16 09:50:33 +00:00
jan.nijtmans a06b13bb4a Merge 8.7 2022-12-16 09:27:14 +00:00
jan.nijtmans 10775523d9 Merge 8.7 2022-12-15 14:39:26 +00:00
jan.nijtmans 532559323e Merge 8.7 2022-12-13 07:44:12 +00:00
apnadkarni d9baa9e3de Merge 8.7 - change copyright in Windows build to UCal. 2022-12-12 06:11:22 +00:00
jan.nijtmans 3251fdbab4 Merge 8.7 2022-12-11 18:16:16 +00:00
jan.nijtmans 3b293d276c Merge 8.7 2022-12-09 23:27:19 +00:00
jan.nijtmans 1a21edb592 Eliminate TclArithSeriesObjLength and TclArithSeriesObjStep from tclArithSeries.h: they can be static internal. 2022-12-08 17:17:48 +00:00
jan.nijtmans 62c5b0bfb7 Merge 8.7 2022-12-05 23:49:03 +00:00
jan.nijtmans b8c736d82c Merge 8.7 2022-12-05 15:42:06 +00:00
jan.nijtmans ba427c0bc2 Merge 8.7 2022-12-05 15:35:05 +00:00
jan.nijtmans b58aa65f02 Merge 8.7 2022-12-05 13:11:31 +00:00
jan.nijtmans 635dd1a696 Fix utf32 lables in testcases (some not necessary any more, one missing), indicating differences between Tcl 8.x and 9.0 2022-12-02 11:27:10 +00:00
jan.nijtmans 25b3cffdd2 Oops, that's the wrong one ... 2022-12-02 08:35:05 +00:00
jan.nijtmans ae11579286 Make options -nocomplain and -strictencoding truly independant. Leftover from initial implementation. Noted by Rolf Ade (thanks!) 2022-12-02 08:19:36 +00:00
jan.nijtmans 975b7c5dcb Merge 8.7 2022-12-01 17:36:04 +00:00
jan.nijtmans 36c94773b4 Handle "deprecated" condition correctly in test-cases 2022-12-01 10:18:35 +00:00
jan.nijtmans fdb4ca1567 Merge 8.7 2022-11-30 21:46:57 +00:00
jan.nijtmans 4d23589861 Merge 8.7. This also fixes [133456085a] 2022-11-30 11:11:28 +00:00
jan.nijtmans 5cb9dc5ddc Stop shimmering for "llength". Internal optimization (but using TIP #644) 2022-11-30 10:36:06 +00:00
jan.nijtmans c157333a7d Merge 8.7 2022-11-30 08:16:52 +00:00
jan.nijtmans e648065fe1 Merge 8.7 2022-11-29 16:07:45 +00:00
jan.nijtmans 426dd171f6 Merge 8.7 2022-11-29 10:35:23 +00:00
jan.nijtmans 8b03ef0b29 Merge 8.7 2022-11-28 23:44:33 +00:00
jan.nijtmans dabfa1a053 Merge 9.0. New macro ABSTRACTLIST_PROC 2022-11-28 15:58:49 +00:00
jan.nijtmans 8f6442b0c9 Merge 8.7 2022-11-28 15:08:04 +00:00
jan.nijtmans 85f19595dc Merge 8.7 2022-11-28 12:34:28 +00:00
jan.nijtmans 82fb7b1d55 size_t result for lengthProc. More usage of Tcl_GetWideUIntFromObj 2022-11-27 23:37:32 +00:00
jan.nijtmans 513b2d5031 HAS_ABSTRACTLIST_PROC 2022-11-26 23:57:26 +00:00
jan.nijtmans bfe8928bed Merge 9.0 2022-11-25 23:38:50 +00:00
jan.nijtmans ba490472b5 Remove "knownBug" constraint: no longer necessary 2022-11-25 22:40:47 +00:00
jan.nijtmans d0d0e3642f Merge 8.7 2022-11-25 22:08:19 +00:00
jan.nijtmans 481aa42029 Merge 8.7 2022-11-25 16:26:04 +00:00
jan.nijtmans 7bf0253a43 Merge 9.0 2022-11-25 10:16:35 +00:00
jan.nijtmans 73116e2c54 one more int -> size_t 2022-11-25 10:12:32 +00:00
jan.nijtmans 66e2117d20 Unbreak Windows build. More int -> size_t, being able to handle longer strings 2022-11-25 10:01:00 +00:00
jan.nijtmans 0bc6d7d341 merge-mark 2022-11-25 08:32:31 +00:00
jan.nijtmans 21920649b5 Move Tcl_Size definition earlier in tcl.h 2022-11-24 21:04:48 +00:00
jan.nijtmans 9faff5cc94 Merge 8.7 2022-11-24 17:44:02 +00:00
jan.nijtmans 3795a0f7dc Merge 8.7 2022-11-24 17:41:44 +00:00
jan.nijtmans ddf4a5f158 Use Tcl_GetByteArrayFromObj(... in stead of Tcl_GetBytesFromObj(NULL,.... Add some more error-checking for invalid byte-arrays 2022-11-24 14:05:58 +00:00
jan.nijtmans 2a569c94ef Since Tcl 9.0 throws exceptions on an illegal byte sequence (no longer simply truncates it), adapt test-case for that 2022-11-24 10:17:51 +00:00
jan.nijtmans 6932d0c2d0 Fix [da63e4c1e]: Crash in Tcl_WriteChars(). Make everything compile (again) with a C++ compiler. 2022-11-23 21:03:13 +00:00
jan.nijtmans 826db93d76 Internal abstract list, don't let "llength" shimmer any more. 2022-11-23 17:04:18 +00:00
jan.nijtmans d8dac38437 Proposed fix for [da63e4c1e]. First version, not 100% as expected yet. 2022-11-23 15:21:29 +00:00
jan.nijtmans 52aada907a Merge 8.7 2022-11-23 09:26:06 +00:00
jan.nijtmans e57b9fe9c3 Merge 8.7 2022-11-23 00:34:36 +00:00
jan.nijtmans e37308d78c Merge 8.7 2022-11-23 00:09:05 +00:00
dgp 096106f202 merge 8.7 2022-11-22 23:26:44 +00:00
jan.nijtmans ef78b1558f Merge 8.7 2022-11-21 23:54:42 +00:00
jan.nijtmans 948fd24ddb Remove TCL_OUT_LINE_COMPILE in favour of TCL_ERROR 2022-11-21 23:28:57 +00:00
jan.nijtmans 654f4d3b58 Merge 8.7 2022-11-21 16:20:09 +00:00
dgp e82a18be40 merge 8.7 2022-11-20 22:37:42 +00:00
jan.nijtmans 2ba1a5f081 merge-mark 2022-11-20 19:35:01 +00:00
jan.nijtmans a1a443ef1d Merge 8.7 2022-11-20 17:51:42 +00:00
jan.nijtmans 797aa89a30 Merge 8.7 2022-11-19 16:12:56 +00:00
jan.nijtmans 4245f0e5a3 merge-mark 2022-11-18 19:54:45 +00:00
jan.nijtmans 2e64df7857 Merge 8.7 2022-11-18 19:18:12 +00:00
jan.nijtmans ae54d4dd89 Another bug in TIP #628: dde and registry extensions didn't really load in tclsh8.7. One reason: handle TclpReaddir correctly in tcl8 compatibility mode 2022-11-18 16:24:27 +00:00
jan.nijtmans a65db858ff Fix bug in TIP #628: Tcl 8.x version of registry/dde dll was not correct 2022-11-18 15:24:44 +00:00
jan.nijtmans dc6366fef8 TIP #644: Make Tcl_ObjType extensible 2022-11-17 20:29:59 +00:00
jan.nijtmans 0824522016 Merge 8.7 2022-11-17 11:20:03 +00:00
apnadkarni 2a62e1f0dd Merge 8.7 - reserve stub entry 687 2022-11-17 03:54:14 +00:00
jan.nijtmans 197060f097 one more (Tcl_UniCharToUtf), and adapt documentation 2022-11-16 20:52:30 +00:00
jan.nijtmans f9c4e3a8b2 Change 5 functions signatures from int -> size_t. Those should have been part of TIP #494 (Thanks, Gustaf!) 2022-11-16 20:39:34 +00:00
jan.nijtmans 640c0098d1 Merge 8.7 2022-11-16 09:43:42 +00:00
jan.nijtmans a6680c4b9f Merge 8.7 2022-11-15 22:15:47 +00:00
jan.nijtmans 5f892535a1 Merge 8.7 2022-11-15 14:36:58 +00:00
jan.nijtmans 1412e9b9f0 Merge 8.7 2022-11-15 13:31:35 +00:00
jan.nijtmans c381a17784 Merge 8.7 2022-11-15 11:04:26 +00:00
jan.nijtmans 369b286297 Merge 8.7 2022-11-13 21:26:11 +00:00
jan.nijtmans 84e2b419ac Rebase to latest 9.0 2022-11-13 19:02:37 +00:00
jan.nijtmans 64adc99e08 Merge 8.7 2022-11-13 16:58:46 +00:00
apnadkarni 7dc710b2f4 Update Tcl_ObjType documentation 2022-11-13 06:37:55 +00:00
apnadkarni da2f3cbd20 Merge trunk 2022-11-13 06:23:50 +00:00
apnadkarni 67e92c7ada Fix compilation error for STATS=memdbg 2022-11-13 06:06:43 +00:00
jan.nijtmans 2a94e80188 Merge 8.7 2022-11-11 21:51:31 +00:00
jan.nijtmans 1b232cf14c Merge 8.7 2022-11-11 09:59:24 +00:00
jan.nijtmans 6065eb2868 Forgot one TCL_OBJTYPE_V0 2022-11-10 11:20:02 +00:00
jan.nijtmans 50f633ff28 No trailing ',' 2022-11-09 17:15:52 +00:00
apnadkarni 973b944b33 Merge trunk. Also update Tcl_ObjType.version to match TIP 644 2022-11-09 13:45:46 +00:00
jan.nijtmans e18b1490d5 Merge 8.7 2022-11-08 22:15:37 +00:00
jan.nijtmans b6c0957a8f More int -> size_t (argc and level) in trace handling 2022-11-08 20:27:01 +00:00
jan.nijtmans 0423cdcf31 Merge 8.7 2022-11-08 10:01:41 +00:00
jan.nijtmans 742323f725 Merge 8.7 2022-11-08 07:31:35 +00:00
jan.nijtmans 03a9eaa951 Use TCLFLEXARRAY 2022-11-07 22:04:59 +00:00
jan.nijtmans af07dcfdda Merge 8.7 2022-11-07 21:16:31 +00:00
jan.nijtmans 44ce8c245f TclInitSockets() only exists on Windows 2022-11-07 10:50:39 +00:00
jan.nijtmans fac57136f2 Remove TclpHasSockets(): Every system nowadays has sockets 2022-11-06 21:01:12 +00:00
jan.nijtmans b07c7ad8ae Update Tcl_Filesystem documentation 2022-11-06 20:27:51 +00:00
apnadkarni c3c5a80a02 Merge 8.7. lreplace4 bcc instruction and FLT_MAX fix 2022-11-05 11:49:08 +00:00
apnadkarni 6559f4084e Bug [0f98bce669]. Fix limits for string replace. 2022-11-03 12:26:41 +00:00
jan.nijtmans 9cc14dacd9 Fix formatting of error-message 2022-11-03 08:15:19 +00:00
apnadkarni 5a3d2ddfed Bug #0f98bce669 - string cat support for > 2**31 characters. Tests pending 2022-11-02 16:28:59 +00:00
jan.nijtmans 59ee35fd38 Fix testcase failure (assemble-15.9), only seen on 32-bit 2022-11-02 16:25:59 +00:00
jan.nijtmans 330034ec02 Make Tcl_WCharToUtfDString() usable (again) on Windows. Was lost due to previous commit 2022-11-02 16:20:27 +00:00
jan.nijtmans 3920a8f42a Fix [d2c2baac2]: Tcl 9 32-bit build exits immediately with stack overflow on Windows 2022-11-02 16:02:07 +00:00
apnadkarni 0dfd2bdc9d Bug #0f98bce669 - string repeat support for > 2**31 characters 2022-11-02 15:56:42 +00:00
jan.nijtmans 366778e86e Fix [00cced7b87]: Incorrect handling of indices > 0x80000000 in byte compiler (64-bit Tcl) 2022-11-02 13:18:42 +00:00
jan.nijtmans a8faa8e87d Merge 8.7 2022-11-02 10:46:49 +00:00
jan.nijtmans 7b395ecf51 code cleanup (e.g. ProcGetIntRep -> ProcGetInternalRep, size_t -> Tcl_Size) 2022-11-02 08:30:20 +00:00
jan.nijtmans da371061f6 Merge 8.7 2022-11-02 08:04:16 +00:00
jan.nijtmans ec21e9f7de Merge 8.7. Eliminate gcc warning 2022-11-01 22:04:09 +00:00
jan.nijtmans 4b553938e3 Merge 8.7 2022-11-01 17:06:52 +00:00
jan.nijtmans 4d9dcbbcbc Two missing out-of-bound situations in TclIndexEncode(), one for index > MAX_INT, one for index < end-MAX_INT 2022-11-01 16:13:26 +00:00
jan.nijtmans 66a9d2307a Merge 8.7 2022-10-30 14:29:25 +00:00
dgp a0fa55773b merge 8.7 2022-10-29 16:36:49 +00:00
jan.nijtmans 41c34da9da Simplify -eofchar parsing (just check for " {}" at the end, in stead of full list parsing) 2022-10-29 14:08:52 +00:00
dgp f27f0773c4 Update test result 2022-10-28 17:50:50 +00:00
jan.nijtmans 6ea0113127 Merge 8.7 2022-10-28 16:40:18 +00:00
oehhar 38e64470ca Merge mark with no changes to avoid to get the core-8-changes in main. 2022-10-28 16:14:36 +00:00
oehhar ebaccb9022 Merge core-8-branch 2022-10-28 16:00:48 +00:00
oehhar 98005a91dc Merge core-8-branch 2022-10-28 15:03:05 +00:00
oehhar 9d428d86eb Resolve tcltk-man2html.tcl errors in fconfigure.n 2022-10-28 13:50:46 +00:00
oehhar 008d15c04e fconfigure man: correct chapter syntax 2022-10-28 13:36:21 +00:00
oehhar 8fb4c52383 TIP 633 and TIP 346: add man page entry for fconfigure 2022-10-28 13:18:55 +00:00
jan.nijtmans 18fb378072 TIP #646 correction: let "fconfigure $chan -eofchar" return a single character, not a list element 2022-10-28 11:18:53 +00:00
jan.nijtmans d1e2a1ab3c Merge 8.7 2022-10-27 22:01:49 +00:00
jan.nijtmans 63b8879b83 Merge 8.7 2022-10-27 21:02:32 +00:00
jan.nijtmans 6de2b2c1d6 Handle TCL_ENCODING_STRICT and TCL_CLOSE2PROC correctly, when building in --with-tcl8 mode 2022-10-27 14:01:17 +00:00
jan.nijtmans 2a8ceac888 Fix [8e2d10698b]: ioCmd.test tests need updates for -eofchar changes 2022-10-27 13:33:10 +00:00
jan.nijtmans dac15673b8 Merge 8.7 2022-10-27 07:13:44 +00:00
jan.nijtmans b8b4026cbf TIP #646: Change -eofchar handling 2022-10-26 09:55:41 +00:00
jan.nijtmans 3bbc297ec7 Merge 8.7 2022-10-25 13:22:46 +00:00
jan.nijtmans 415503775a Merge 8.7 2022-10-25 08:48:44 +00:00
jan.nijtmans 728edc0cbf Merge 8.7 2022-10-24 12:01:54 +00:00
jan.nijtmans 7894a24f8f Merge 8.7 2022-10-23 20:44:02 +00:00
jan.nijtmans 5a60ace74d off-by-one in TCL_MAJOR_VERSION check 2022-10-23 14:46:44 +00:00
jan.nijtmans 24512e7131 Merge 8.7 2022-10-23 14:40:36 +00:00
jan.nijtmans 649be23ea6 Change back some Tcl_Size usage to size_t (e.g. in MODULE_SCOPE definitions, which are not supported by TIP #628) 2022-10-23 14:08:49 +00:00
jan.nijtmans d9708a0e08 Rebase to latest 9.0 2022-10-23 13:40:39 +00:00
jan.nijtmans ccb5ae0529 Merge 9.0 2022-10-23 13:39:40 +00:00
jan.nijtmans 5ae2506499 TIP #628: Shared 8.7/9.0 build environment 2022-10-23 11:00:48 +00:00
jan.nijtmans f833c48881 Merge 8.7 2022-10-23 10:53:41 +00:00
jan.nijtmans b184464e94 Merge 9.0 2022-10-23 00:16:47 +00:00
jan.nijtmans dd5c058db2 Merge 8.7 2022-10-23 00:01:24 +00:00
jan.nijtmans 0343f605e6 Merge 9.0 2022-10-21 15:28:15 +00:00
jan.nijtmans c74a310d21 Merge 8.7 2022-10-21 15:18:11 +00:00
jan.nijtmans c8a85bbc05 Change version field to Tcl_ObjTypeVersion 2022-10-21 09:01:36 +00:00
jan.nijtmans 95b85f336a Rebase to 9.0 2022-10-21 08:55:50 +00:00
jan.nijtmans 106d95266d Merge 8.7 2022-10-21 08:53:46 +00:00
jan.nijtmans ef9867bd58 Merge 9.0 2022-10-20 15:17:13 +00:00
jan.nijtmans 94f27cdf49 Merge 8.7 2022-10-20 15:15:27 +00:00
jan.nijtmans 3405e90b04 Merge 8.7 2022-10-19 20:07:52 +00:00
jan.nijtmans 7972edd0e2 Merge 9.0 2022-10-18 15:34:13 +00:00
jan.nijtmans c0b6a93d8f Fix [20157fbd14]: Failed tests safe-9.[67], since "-autoPath" is added 2022-10-18 14:42:27 +00:00
jan.nijtmans 59dd8794c5 Change the default for AutoPathSync in Tcl 9.0 (as described in TIP #579) 2022-10-18 13:35:53 +00:00
jan.nijtmans 19d02aa031 Merge 9.0 2022-10-18 13:06:47 +00:00
jan.nijtmans f748e43a22 Merge 8.7 2022-10-18 12:55:01 +00:00
jan.nijtmans 39c9836950 Allow any single character for -eofchar, even if it's not a valid list 2022-10-18 10:12:51 +00:00
jan.nijtmans d9174b0f8d Merge 9.0. More strict -eofchar parsing 2022-10-17 20:18:43 +00:00
jan.nijtmans a76f86e565 Merge 8.7 2022-10-17 19:46:07 +00:00
dgp 51448d4167 Implementation of TIP 637. 2022-10-17 19:23:28 +00:00
dgp ce85e0375a merge 8.7 2022-10-17 18:43:28 +00:00
jan.nijtmans e50b4e4c59 Merge 9.0. Change the default -eofchar on Windows 2022-10-17 10:49:43 +00:00
jan.nijtmans a11e803c73 Merge 8.7 2022-10-16 17:57:26 +00:00
jan.nijtmans 6cda753ae0 new TIP about -eofchar handling 2022-10-16 11:10:36 +00:00
jan.nijtmans c5a0eca4bc Merge 8.7 2022-10-14 22:26:38 +00:00
jan.nijtmans 1d1c1fb982 Merge 8.7 2022-10-14 20:55:35 +00:00
jan.nijtmans e245507505 Merge 9.0 2022-10-14 13:46:06 +00:00
jan.nijtmans ca67362ec8 Merge 8.7 2022-10-14 13:37:16 +00:00
jan.nijtmans e7e044e968 Build-fix 2022-10-14 11:22:20 +00:00
jan.nijtmans 5ba73ded05 Merge 9.0 2022-10-13 21:28:55 +00:00
jan.nijtmans c4ac9665cb merge-mark 2022-10-13 21:28:12 +00:00
jan.nijtmans a64794ef40 Merge 8.7 2022-10-13 21:12:07 +00:00
jan.nijtmans 0f77e154ab More progress in handling rules.vc 2022-10-13 14:56:20 +00:00
jan.nijtmans 0bb9723a64 Merge 9.0 2022-10-13 09:14:04 +00:00
jan.nijtmans bef79e3c75 Merge 9.0 2022-10-13 09:11:02 +00:00
jan.nijtmans 1ce12936bb Merge 8.7 2022-10-13 09:08:12 +00:00
jan.nijtmans 4addfd1f1e Extract TIP #637 implementation from "novem" branch 2022-10-12 16:04:12 +00:00
jan.nijtmans 45952551e2 Rebase to 9.0 2022-10-12 12:37:52 +00:00
jan.nijtmans 58462852c6 Merge 8.7 2022-10-12 11:26:18 +00:00
jan.nijtmans 24b2e0513d Merge 8.7 2022-10-12 10:50:38 +00:00
apnadkarni aa198f54a8 Merge 9.0 2022-10-11 16:45:30 +00:00
jan.nijtmans a1b8aa387d Merge 8.7 2022-10-11 15:55:06 +00:00
jan.nijtmans 7a961752a9 Make TCL_ENCODING_STRICT and TCL_ENCODING_NOCOMPLAIN work independant from each other (suggested by Harald Oehlmann) 2022-10-11 15:48:43 +00:00
apnadkarni 4391b633d9 TIP 644 - Make Tcl_ObjType extensible 2022-10-11 15:07:33 +00:00
jan.nijtmans 5bef9acff1 Update man-page 2022-10-11 14:41:29 +00:00
jan.nijtmans d6c7097242 Merge 9.0 2022-10-11 14:40:13 +00:00
jan.nijtmans f284e2a2d8 merge fork 2022-10-11 14:39:43 +00:00
jan.nijtmans bc48d7a26e Merge 8.7 2022-10-11 14:37:35 +00:00
jan.nijtmans 8c301f2c53 Merge 8.7 2022-10-11 14:04:36 +00:00
sbron 6b05e4086f Update Tcl_TraceVar manual page. 2022-10-11 10:37:03 +00:00
jan.nijtmans 622fa7382f Merge 8.7 2022-10-11 06:41:59 +00:00
jan.nijtmans b2c3781bb0 Merge 8.7 2022-10-10 15:22:13 +00:00
jan.nijtmans d2a2b049b7 Merge 8.7 2022-10-10 11:20:26 +00:00
jan.nijtmans 131bf290a5 Merge 8.7 2022-10-09 20:59:49 +00:00
jan.nijtmans ae9355b9f2 Merge 8.7 2022-10-09 16:16:31 +00:00
jan.nijtmans 1f8db5d00d Merge 9.0 2022-10-08 17:17:04 +00:00
jan.nijtmans 56de8426b7 Merge 8.7 2022-10-08 17:02:45 +00:00
jan.nijtmans e502bcacc7 Merge 9.0 2022-10-08 16:44:21 +00:00
jan.nijtmans a79de57d37 Merge 8.7 2022-10-08 15:43:40 +00:00
jan.nijtmans 891c0fbcaa Merge 9.0 2022-10-07 22:56:15 +00:00
jan.nijtmans 6b3bcba42d Merge 8.7 2022-10-07 15:21:04 +00:00
jan.nijtmans 7d93750b87 Merge 8.7 2022-10-07 14:15:15 +00:00
apnadkarni ded4be46c9 Merge 8.7 tests for memory leaks in list C API 2022-10-07 11:44:36 +00:00
jan.nijtmans 15f8c1d28b Merge 8.7 2022-10-07 11:19:06 +00:00
jan.nijtmans d80b660921 TIP #640: Remove Tcl_SaveResult 2022-10-06 13:36:24 +00:00
jan.nijtmans 5d7d542b25 Merge 8.7 2022-10-06 10:15:49 +00:00
jan.nijtmans 36fcd880b6 TIP #634: Remove inconsistency in variable tracing of an array 2022-10-05 07:39:44 +00:00
jan.nijtmans a019958ca7 Merge 8.7 2022-10-05 07:36:50 +00:00
griffin 4b1d6e9ae2 Fix some bugs in lseq 2022-10-04 22:05:19 +00:00
dgp dfa6b32e11 silence compiler warning 2022-10-04 18:25:18 +00:00
jan.nijtmans 7a0c0b2034 Merge 9.0 2022-10-04 16:06:01 +00:00
jan.nijtmans ca8b1a6887 TIP #465: Change Rule 8 of the Dodekalogue to Cut Some Corner Cases 2022-10-04 16:04:29 +00:00
jan.nijtmans c5b5c4f8a4 Merge 8.7 2022-10-04 15:57:51 +00:00
griffin 55cc9137eb Fix Obj leaks in ArithSeries. 2022-10-02 19:03:35 +00:00
dgp f9753a5e41 Replace incorrect use of TclGetNumberFromObj 2022-09-30 11:30:11 +00:00
dgp d03849d2cd merge trunk 2022-09-29 19:17:24 +00:00
dgp b2befe7629 merge trunk 2022-09-29 19:17:10 +00:00
griffin a5a978ca98 Fix bug-99e834bf33 2022-09-29 16:30:31 +00:00
jan.nijtmans eea655f851 Remove "unknown" constraint, since it now works 2022-09-29 06:45:20 +00:00
griffin f67437d6f3 Fix bug-9933cc4d88 - not an error in 9 2022-09-28 16:53:47 +00:00
jan.nijtmans 447a4d740e Merge 9.0 2022-09-28 14:06:37 +00:00
jan.nijtmans cef8229a3a Merge 9.0 2022-09-28 14:05:57 +00:00
jan.nijtmans e91c9f74d8 Merge 9.0 2022-09-28 14:05:14 +00:00
jan.nijtmans 6cd7c9e3c2 Merge 8.7 2022-09-28 13:58:56 +00:00
jan.nijtmans 9548cf370e Merge 9.0 2022-09-28 13:15:42 +00:00
jan.nijtmans e5a0178736 Merge 8.7 2022-09-28 13:02:23 +00:00
jan.nijtmans 69ac37dbae Don't worry deprecation warnings for Tcl_SaveResult: If TIP #640 is accepted it won't matter any more.
Eliminate some compiler warnings
Mark some lseq testcases as "knownBug", they still need to be fixed
2022-09-28 11:55:26 +00:00
jan.nijtmans 27e907b473 Merge 9.0 2022-09-28 11:29:02 +00:00
jan.nijtmans c31e41a91d Merge 9.0 2022-09-28 08:34:47 +00:00
jan.nijtmans 300b6e7e76 Merge trunk 2022-09-28 08:33:54 +00:00
jan.nijtmans 5a103eaacb Merge 8.7 2022-09-28 08:31:35 +00:00
jan.nijtmans 9634f3a9ed Merge trunk 2022-09-27 13:43:26 +00:00
jan.nijtmans 28121876fd Merge 9.0 2022-09-27 13:42:27 +00:00
jan.nijtmans 3dab933938 Merge 9.0 2022-09-27 13:40:21 +00:00
jan.nijtmans f68a36c8be Merge 8.7 2022-09-27 10:25:16 +00:00
apnadkarni 1080644af8 Merge 8.7 (primarily TIP 631) 2022-09-27 04:04:50 +00:00
jan.nijtmans 3e959978b2 Merge 9.0 2022-09-26 19:00:53 +00:00
jan.nijtmans 34de786a93 Merge 9.0. Change implementation: Now really remove Tcl_SaveResult() and friends 2022-09-26 16:10:18 +00:00
jan.nijtmans 74cf960de8 Merge 8.7 2022-09-26 15:58:55 +00:00
dgp 1a5bf4932e merge trunk 2022-09-26 13:13:01 +00:00
dgp 80965aae21 merge trunk 2022-09-26 13:12:53 +00:00
jan.nijtmans 1900149ee6 Merge 9.0 2022-09-26 12:35:58 +00:00
jan.nijtmans 6dc3f732c1 Merge 8.7 2022-09-26 12:24:31 +00:00
jan.nijtmans 9ca4f08e3a Merge 8.7 2022-09-26 07:43:08 +00:00
dgp 51748fd064 merge trunk 2022-09-25 20:36:46 +00:00
dgp 93fa9836fd merge trunk 2022-09-25 20:35:51 +00:00
jan.nijtmans d72c457096 Merge 8.7 2022-09-25 19:51:14 +00:00
jan.nijtmans 24aa257810 merge-mark 2022-09-23 09:57:38 +00:00
jan.nijtmans 21178dbbd4 Merge 8.7 2022-09-22 15:48:25 +00:00
jan.nijtmans d15e74d08c Merge 8.7 2022-09-22 15:36:44 +00:00
dgp 867a57806b merge trunk 2022-09-22 13:46:24 +00:00
dgp 6a34b586f6 merge trunk 2022-09-22 13:45:21 +00:00
jan.nijtmans 0fb01a32c6 Merge 8.7 2022-09-22 12:40:24 +00:00
jan.nijtmans a68d5e71e2 rebase to latest 9.0 2022-09-22 10:57:53 +00:00
jan.nijtmans d00000e816 fix testcase 2022-09-22 10:56:56 +00:00
dgp 85c05d7a3d Include TYPE_OPEN_PAREN in the comment. 2022-09-21 15:39:02 +00:00
jan.nijtmans ed4c583b06 TIP #640 implementation: Tcl_SaveResult reuse for Tcl 9.0 2022-09-21 15:25:25 +00:00
dgp 6a3c75c37f Reduce chances for test conflicts. 2022-09-21 14:59:40 +00:00
dgp 9a87f872f4 merge trunk 2022-09-21 14:09:14 +00:00
dgp 74275b1fb2 merge trunk 2022-09-21 13:54:43 +00:00
jan.nijtmans 092e5f9f72 Merge 8.7 2022-09-21 13:10:43 +00:00
jan.nijtmans 14a73a2125 Merge 8.7 2022-09-21 12:39:42 +00:00
jan.nijtmans 01f391fe61 Merge 8.7 2022-09-21 12:37:43 +00:00
jan.nijtmans 0f9d17b141 rebase to latest trunk 2022-09-20 12:09:12 +00:00
oehhar 9d536c3831 TIP633 fconfigure -nocomplainencoding (TCL9): replace "-strictencoding 0" by "-nocomplainencoding 1". 2022-09-19 17:40:28 +00:00
jan.nijtmans 20ba5858ce Merge 8.7 2022-09-19 14:19:16 +00:00
dgp 6944eab64c merge 8.7 2022-09-19 14:06:59 +00:00
jan.nijtmans 0ef6cc44a3 merge 8.7 2022-09-19 13:44:27 +00:00
jan.nijtmans 2e6ebdc591 Merge 8.7 2022-09-19 08:56:26 +00:00
jan.nijtmans 4076c637ad Merge 9.0 2022-09-17 12:44:44 +00:00
dgp 7b46c41c05 remove obsolete comments 2022-09-16 14:59:14 +00:00
jan.nijtmans ce9541840d Merge 8.7 2022-09-16 06:58:54 +00:00
dgp 284f73c56c merge 8.7 2022-09-15 18:35:44 +00:00
apnadkarni 7b28b96939 Remove tilde expansion from docs. Fix comments that referenced the same. 2022-09-15 16:45:20 +00:00
dgp 4968ffa1ce [51d5f22997] Protect against passing negative size to Tcl_NewListObj. 2022-09-15 15:59:11 +00:00
apnadkarni 105dbed51f Merge 8.7 - docs for file home and tildeexpand 2022-09-15 14:39:39 +00:00
dgp ddde6c7c50 Update test results 2022-09-15 11:55:46 +00:00
dgp 7a073b3366 Silence compiler warnings. 2022-09-15 11:48:56 +00:00
bch 184e43e860 doc - describe proper prototype -- even though they are identical signatures atm 2022-09-15 04:49:33 +00:00
jan.nijtmans 4469be4f10 Merge 8.7 2022-09-14 17:56:13 +00:00
jan.nijtmans fbc66143c5 TIP #602: Remove tilde expansion in file paths 2022-09-14 17:50:55 +00:00
jan.nijtmans 126f9f6dda Merge 8.7 2022-09-14 07:21:05 +00:00
jan.nijtmans a267b4feeb More logical-or markup fixes in documentation 2022-09-14 07:19:10 +00:00
bch fd14473a4c fix logical-or markup in documentation 2022-09-13 21:50:17 +00:00
jan.nijtmans 2e97ff6575 Mark 2 testcases as knownBug. Looks related to [6978c01b65] 2022-09-13 15:59:22 +00:00
jan.nijtmans 0b00b0f11d Merge 8.7 2022-09-13 08:31:34 +00:00
oehhar 872d25e128 TIP633 fconfigure -strictencoding: also implement read part 2022-09-12 14:47:48 +00:00
oehhar 436a48c900 Merge 8.7. Renumber tests and add current (IMHO wrong) results as results. 2022-09-12 12:14:20 +00:00
jan.nijtmans 62043b6882 Merge 8.7 2022-09-12 11:12:46 +00:00
oehhar c36fa478b2 TIP633 fconfigure -strictencoding: move transfer over the loop. Adapt test suite to use hex results to prevent blocking on console output. 2022-09-12 10:59:44 +00:00
oehhar f5846ef8f5 TIP633 fconfigure -strictencoding: implement write -strictencoding 0. 2022-09-12 10:47:30 +00:00
oehhar 74efc29448 Merge main 2022-09-12 10:16:59 +00:00
jan.nijtmans a6b22dc4b3 Merge 8.7 2022-09-11 21:47:06 +00:00
jan.nijtmans 8f0f3b1165 Change io-75.5 to test for both written output and which exception is thrown. This shows the bug is not fixed yet .... :-( 2022-09-11 20:48:49 +00:00
oehhar 32439d945e Ticket [6978c01b65]: write not encodable character->report to script level Test io-75.5 now ok. 2022-09-11 13:45:04 +00:00
oehhar 14086d3b4a TIP633 fconfigure -strictencoding: TCL 9 command line implementation 2022-09-11 09:55:09 +00:00
oehhar 1c7b977c44 Merge 8.7. Make place for future tests with tolerant encoding. Number tests for strict encoding 75.4-75.6. 2022-09-11 08:48:25 +00:00
oehhar 77334ba0ad TIP633 fconfigure -strctencoding: TCL 9 branch: prepare test cases with -strictencoding 0 and 1 2022-09-11 08:24:21 +00:00
jan.nijtmans f3e9e16aa8 Merge 8.7 2022-09-10 23:45:13 +00:00
jan.nijtmans ff752c7b91 Merge 8.7 2022-09-10 21:08:26 +00:00
jan.nijtmans a890c6f587 merge-mark 2022-09-10 12:23:21 +00:00
oehhar b07f60b43b Ticket [6978c01b65]: add file encoding test io-75.3 with incomplete multibyte sequence which should fail in 9.0. As it does not fail, it is marked as knownBug 2022-09-10 06:13:39 +00:00
oehhar c6e1d19c9e Ticket [6978c01b65]: add file encoding tests which should fail. As they don't fail jet, they are marked as "knownBug". 2022-09-09 14:01:14 +00:00
jan.nijtmans e1b9a033d7 Merge 8.7 2022-09-09 13:22:46 +00:00
jan.nijtmans d6b88eb797 Change 'skip' argument from int to size_t. Should have been part of TIP #630 (TclOO commands > 2^31 (for 8.7)) 2022-09-09 12:42:04 +00:00
jan.nijtmans 4cbc02c80f re-base to Tcl 9.0 2022-09-08 16:27:30 +00:00
jan.nijtmans 3239564179 Merge 9.0 2022-09-08 14:17:12 +00:00
jan.nijtmans d2ed22d022 Merge 8.7 2022-09-08 14:14:08 +00:00
jan.nijtmans d12caa5cd9 Tcl_Size -> size_t (twice) 2022-09-07 14:47:52 +00:00
jan.nijtmans 558466820c Merge 9.0 2022-09-07 14:32:16 +00:00
jan.nijtmans 4c66b6ec43 Merge 8.7 2022-09-07 07:47:21 +00:00
jan.nijtmans ad1c9644ec Correct Tcl_DriverWideSeekProc documentation, matching implementation 2022-09-06 13:35:30 +00:00
apnadkarni c7522c3f93 Merge 8.7. Primarily ticket [55a02f20ec] 2022-09-05 15:25:58 +00:00
jan.nijtmans 6a866ef98b Finish TIP #627 implementation for Tcl 9.0: handle objProc2/objClientData2 fields for Tcl_CmdInfo 2022-09-03 13:22:24 +00:00
jan.nijtmans cd5e1b2e6c Complete Tcl_SetCommandInfoFromToken() implementation, in case Tcl_CreateObjCommand() is used to create the original Command, while objProc2 is filled later 2022-09-02 22:41:50 +00:00
jan.nijtmans 191d1f5847 Merge 8.7 2022-09-02 15:20:44 +00:00
jan.nijtmans 007dfc95a9 Some additional protection for objc < 0 2022-09-02 14:41:09 +00:00
jan.nijtmans c453ac8b82 Merge 9.0 2022-09-02 14:32:33 +00:00
jan.nijtmans 792b2f5aff Merge 8.7 2022-09-02 14:14:54 +00:00
jan.nijtmans 16510ceb16 Merge 9.0 2022-09-02 13:06:48 +00:00
jan.nijtmans 585d7c7548 Merge 8.7 2022-09-02 12:58:27 +00:00
jan.nijtmans 70d6ba8746 Finish remaining part of TIP-627 for Tcl 9.0: Handle objProc2/objClientData2 fields correctly in Tcl_CmdInfo struct. 2022-09-02 10:17:44 +00:00
jan.nijtmans 5573c07b32 close fork 2022-09-02 10:14:48 +00:00
jan.nijtmans e03ac7f9c6 Some more (internal) ClientData -> void * changes 2022-09-02 07:42:51 +00:00
jan.nijtmans 5da91af337 Merge 8.7 2022-09-01 15:46:33 +00:00
jan.nijtmans 32835dc33e Merge 8.7 2022-09-01 15:16:36 +00:00
sbron abf853d0bb Implement modification of the 'name2' trace callback argument. 2022-08-31 11:06:38 +00:00
jan.nijtmans dc58da9c45 Merge 8.7 2022-08-31 10:06:20 +00:00
jan.nijtmans b437bfcd3a Since numAfterRangeEnd (of type size_t) is always >= 0, those LIST_ASSERT's are useless 2022-08-31 09:12:57 +00:00
jan.nijtmans 21d39f41b1 Merge 8.7 2022-08-31 09:07:58 +00:00
jan.nijtmans 614375d561 Merge 8.7 2022-08-30 22:48:21 +00:00
jan.nijtmans f4cb160b56 merge-mark 2022-08-29 21:10:56 +00:00
jan.nijtmans 1bca425d6d Merge 9.0 2022-08-29 14:00:14 +00:00
jan.nijtmans e2dae42575 Merge 8.7 (already mostly prepared in tip-625-for-9 branch) 2022-08-29 10:15:03 +00:00
jan.nijtmans dc471da433 Merge 9.0 2022-08-29 10:00:23 +00:00
sbron 18da054782 Alternative fix for the error messages by chw, which doesn't break traces on
non-existing array elements.
2022-08-27 08:14:31 +00:00
jan.nijtmans f0a6c93a0e Merge 8.7 2022-08-26 23:12:48 +00:00
jan.nijtmans 5efd0904e3 Close fork 2022-08-26 20:26:05 +00:00
jan.nijtmans 8e84ff6bb0 Merge 8.7 2022-08-26 20:25:34 +00:00
bch 2f0f646a07 Tcl_GetVersion(3) - we just use int for components now, not Tcl_ReleaseType; Cleanup stray tag. 2022-08-26 17:19:02 +00:00
jan.nijtmans 143111498e Merge 8.7 2022-08-25 20:46:41 +00:00
sbron 8b4623feb4 Use whitespace consistent with the surrounding code. 2022-08-24 12:03:08 +00:00
sbron 66ebfaa06d Fix env array access through upvar to a single element. 2022-08-24 11:53:24 +00:00
sbron 10cc2ae8fd Fix error message, so trace tests 16.2, 16.9, and 16.16 pass again. 2022-08-24 11:28:19 +00:00
sbron 42dd6088a6 Add tests for the TIP #634 functionality. 2022-08-24 11:19:14 +00:00
sbron 2d455c75b9 Start TIP #634 implementation using modified patch from ticket #2969488 by ferrieux. 2022-08-24 11:18:28 +00:00
bch abe4d4223d fix(?) stray ckalloc()/ckfree(); ref TIP 494. 2022-08-23 20:29:58 +00:00
jan.nijtmans 176e98222e Merge 8.7 2022-08-23 10:51:34 +00:00
sebres 29dd909281 small amend to [d052d2a1b01ba2c8], code review 2022-08-23 10:22:25 +00:00
jan.nijtmans 2dd98970cf Merge 8.7 2022-08-23 07:37:06 +00:00
jan.nijtmans 529ef6feb2 Fix [d052d2a1b01ba2c8]: avoid leak in TestsetbytearraylengthObjCmd() 2022-08-23 07:03:31 +00:00
jan.nijtmans 9934337df5 Merge 8.7 2022-08-23 06:45:54 +00:00
apnadkarni 6203b90b2a Merge 8.7 winConsole fixes. 2022-08-22 04:24:08 +00:00
jan.nijtmans e0b98db0d7 Merge 8.7 2022-08-21 21:33:18 +00:00
apnadkarni daf1875e01 Merged fix for bug [baa51423c2] 2022-08-20 17:09:54 +00:00
apnadkarni de7a5967d0 Do tilde expansion when initializing from TCLLIBPATH and TM env vars 2022-08-19 17:02:47 +00:00
apnadkarni e52c7c3a41 Implement file tildeexpand 2022-08-19 16:52:07 +00:00
apnadkarni ff9ac0bfbd Merge trunk 2022-08-19 05:49:58 +00:00
apnadkarni b4eda6649f Remove code that was ifdef'ed out 2022-08-07 10:11:42 +00:00
max eb3d10d523 Fix a case of lf not being flushed in certain cases when the crlf sequence gets split across two buffers on channels in crlf mode with line buffering [https://core.tcl-lang.org/tcllib/tktview?name=c9d8a52fe] 2022-08-04 15:15:46 +00:00
apnadkarni 7754129cab Update tests for TIP 602 2022-08-01 17:07:54 +00:00
apnadkarni 515f8ab044 Add 'file home' command 2022-07-31 11:54:14 +00:00
apnadkarni d2518017c7 Merged trunk. 2022-07-31 06:32:22 +00:00
jan.nijtmans 4e9c7a9ae0 Undo knownBug constraint: no longer necessary 2022-07-30 21:47:58 +00:00
jan.nijtmans e4e7ee53a4 Merge 9.0 and tip-625 2022-07-30 20:48:45 +00:00
sebres 13384df4af merge 8.7 2022-07-29 11:10:47 +00:00
jan.nijtmans 8f94fc24ac Merge 8.7 2022-07-28 10:52:33 +00:00
jan.nijtmans af346e6e70 merge tip-625 2022-07-27 16:21:59 +00:00
jan.nijtmans f5ba1ba55f Merge tip-625 2022-07-27 16:19:42 +00:00
jan.nijtmans 62933f5324 merge-mark 2022-07-25 14:08:21 +00:00
jan.nijtmans 33683032c2 Merge tip-625 2022-07-24 20:41:32 +00:00
jan.nijtmans 12039fa008 Merge 9.0 2022-07-24 20:10:51 +00:00
jan.nijtmans 4b57621b7a Merge 8.7 2022-07-22 22:10:27 +00:00
jan.nijtmans 1fd08ea7d0 Merge 8.7 2022-07-22 14:38:47 +00:00
jan.nijtmans ccd2ac73e9 Merge 8.7 2022-07-21 15:28:09 +00:00
jan.nijtmans 6d64f87088 Merge 8.7 2022-07-20 16:36:08 +00:00
jan.nijtmans 25c9cb2e55 merge-mark 2022-07-19 12:21:57 +00:00
jan.nijtmans 2310d12319 Merge 8.7 2022-07-19 09:56:17 +00:00
jan.nijtmans 5131efcb13 Merge 8.7 2022-07-19 08:56:37 +00:00
jan.nijtmans bd7c6ae5d3 Merge tip-625 2022-07-18 12:57:14 +00:00
jan.nijtmans c2350850a9 Merge 8.7 2022-07-17 13:13:24 +00:00
jan.nijtmans 41c87a4bf5 More progress 2022-07-14 15:25:47 +00:00
jan.nijtmans a41449f1cd First shot at TIP #625 for Tcl 9.0.
Mark lrepeat-1.8 as 'knownBug', that's OK for now.
2022-07-14 12:35:19 +00:00
jan.nijtmans 7c405a789e merge-mark 2022-07-14 10:55:47 +00:00
jan.nijtmans 20aa103e7b Merge 8.7 2022-07-13 13:03:08 +00:00
jan.nijtmans 8d65c702fa merge-mark 2022-07-13 07:35:21 +00:00
jan.nijtmans 8320295018 merge-mark 2022-07-12 13:31:06 +00:00
jan.nijtmans 640839dd01 Merge 8.7 2022-07-12 09:22:32 +00:00
apnadkarni 132576b7dd Merge 8.7 - winConsole.test 2022-07-12 03:14:30 +00:00
jan.nijtmans c297ad4104 Merge 8.7 2022-07-11 11:34:49 +00:00
jan.nijtmans 424c53931b Merge 8.7 2022-07-10 20:42:29 +00:00
jan.nijtmans a3ea58d94b Merge 8.7 2022-07-10 19:58:03 +00:00
apnadkarni 3674905dbd Resolve ~ for MacOS during initialization 2022-07-08 13:48:36 +00:00
apnadkarni 9336a020ee Start on TIP-602 implementation. Work in progress 2022-07-08 04:06:35 +00:00
jan.nijtmans b0874b989e Merge 8.7 2022-07-07 11:02:23 +00:00
apnadkarni aa59356ae9 Create new branch named "tip-602" 2022-07-06 16:02:18 +00:00
jan.nijtmans 0e71e665cb Merge 8.7 2022-07-05 12:19:33 +00:00
jan.nijtmans 9e72f54150 Merge 8.7 2022-07-05 10:22:57 +00:00
jan.nijtmans 5ef498d3ec Merge 9.0 2022-07-04 11:39:31 +00:00
jan.nijtmans b78fe450ce Merge 8.7 2022-07-04 11:36:13 +00:00
jan.nijtmans ebf3d00e75 TIP #619: New TCL_COMBINE flag for Tcl_UniCharToUtf() 2022-07-04 11:21:06 +00:00
jan.nijtmans 2a491f190d Merge 8.7 2022-07-03 22:32:18 +00:00
jan.nijtmans 2ae930bbe4 Merge 8.7 2022-07-02 19:52:54 +00:00
jan.nijtmans 6d4603bb45 Merge 9.0 2022-07-01 15:28:57 +00:00
jan.nijtmans bf70c2d93b Merge 8.7 2022-07-01 15:21:37 +00:00
jan.nijtmans fabaafee56 Merge 9.0. Fix MacOSX build 2022-07-01 11:53:18 +00:00
jan.nijtmans 57b2b2606f Merge-mark 2022-06-30 11:32:19 +00:00
jan.nijtmans 9fccffbdfa Merge 8.7. Don't worry about Tcl_GetErrorLine() any more 2022-06-28 09:42:08 +00:00
jan.nijtmans 3df7fe883e Handle tclIntPlatDecls.h 2022-06-28 08:02:08 +00:00
jan.nijtmans 1ff4bd27f4 Fix superflous !endif 2022-06-27 10:07:13 +00:00
jan.nijtmans 2f8db2f926 Add OPTS=tcl8 2022-06-26 22:49:16 +00:00
jan.nijtmans 7974d5f010 Fix TclpGetClicks/TclpGetSeconds's Tcl 8 compabitility 2022-06-26 21:59:53 +00:00
jan.nijtmans 9b6113c6b1 Better Tcl8 compatibility for tclPlatDecls.h and tclInt.h 2022-06-26 21:23:55 +00:00
jan.nijtmans 946598bb9f Merge-mark 9.0. Use Tcl_Size (but not in tclWinDde.c/tclWinReg.c) 2022-06-24 20:55:03 +00:00
jan.nijtmans 8a3c1f7a68 merge-mark 2022-06-24 20:11:38 +00:00
jan.nijtmans b456ce6d74 Complete removal of version from stub library 2022-06-24 14:44:08 +00:00
jan.nijtmans 5aa22835cf Merge 9.0 2022-06-24 14:29:01 +00:00
jan.nijtmans 294105b452 Merge 8.7 2022-06-24 14:28:06 +00:00
jan.nijtmans e16ffc4a1e Merge 9.0 2022-06-24 14:01:15 +00:00
jan.nijtmans 5db5b84aef Merge 8.7 2022-06-24 13:56:34 +00:00
jan.nijtmans 5ad300bf4a Use TCL_MAJOR_VERSION to document (kind of) what's the difference between Tcl8 and Tcl9 2022-06-24 13:30:14 +00:00
jan.nijtmans 6ebde0d075 Better tcl8 compatibility for tclInt.h 2022-06-24 13:07:16 +00:00
jan.nijtmans 5c49161ab0 merge-mark 2022-06-24 11:42:14 +00:00
jan.nijtmans 4a20ed377e Merge 8.7 2022-06-24 11:41:39 +00:00
jan.nijtmans 232f84b9dc Merge 9.0 2022-06-24 11:36:53 +00:00
jan.nijtmans c355f9a6cf Merge 8.7 2022-06-24 11:10:30 +00:00
jan.nijtmans a6fb6b32ca Merge 8.7 2022-06-24 07:17:05 +00:00
jan.nijtmans b988139b8a Merge 9.0 2022-06-23 15:56:42 +00:00
jan.nijtmans 11766bbb13 Merge 8.7 2022-06-23 15:47:16 +00:00
jan.nijtmans 355be4d5f2 Merge 9.0 2022-06-23 15:00:46 +00:00
jan.nijtmans 78d1e3a624 Merge 8.7 2022-06-23 14:58:44 +00:00
jan.nijtmans 0bdd633abc Merge 9.0 2022-06-23 14:06:31 +00:00
jan.nijtmans d36655ac53 Merge 8.7. Update documentation 2022-06-23 13:16:17 +00:00
jan.nijtmans ca4bfa2564 Merge 9.0 2022-06-23 12:26:06 +00:00
jan.nijtmans 6487dd7257 Merge 8.7 2022-06-23 12:24:05 +00:00
jan.nijtmans 01abe6a8b4 Merge 9.0 2022-06-23 09:49:41 +00:00
jan.nijtmans 5f8f24a948 Merge 8.7 2022-06-23 09:11:51 +00:00
jan.nijtmans 5ea6733979 Forget about TCL_8_COMPAT 2022-06-22 22:25:44 +00:00
jan.nijtmans bb0f1f8083 Merge 9.0 2022-06-22 16:50:37 +00:00
jan.nijtmans 178df447b7 Merge 8.7 2022-06-22 16:49:46 +00:00
jan.nijtmans daf02b80dd No quotes when testing for TCL_MAJOR_VERSION 2022-06-22 14:24:51 +00:00
jan.nijtmans 0cbabbe0d8 Merge 9.0 2022-06-20 21:49:28 +00:00
jan.nijtmans 26e99bad85 Fix (internal) TclFindElement() signature (int -> size_t) 2022-06-20 21:47:26 +00:00
jan.nijtmans 105bdf44be More Tcl_Size
,
2022-06-20 21:26:54 +00:00
jan.nijtmans c43ea691ad Merge 8.7 2022-06-20 15:21:03 +00:00
jan.nijtmans 573a1e9219 More Tcl_Size 2022-06-20 15:13:48 +00:00
jan.nijtmans a9fa4bed1f Merge 8.7 2022-06-20 09:47:14 +00:00
jan.nijtmans d3517188b2 merge-mark 2022-06-19 20:26:02 +00:00
jan.nijtmans a8ddc9d2a2 Merge 9.0 2022-06-15 12:23:22 +00:00
jan.nijtmans de7e7bc0ba Merge 9.0 2022-06-15 11:59:13 +00:00
jan.nijtmans ba767ab772 Merge 9.0 2022-06-15 10:11:01 +00:00
jan.nijtmans a24682c16d Merge 9.0 2022-06-15 06:40:02 +00:00
jan.nijtmans 94394a076d Use Tcl_Size in dde/registry 2022-06-13 13:46:45 +00:00
jan.nijtmans bde9c622c0 Merge 9.0 2022-06-13 12:11:38 +00:00
jan.nijtmans 887f84bb45 Use TCL_8_COMPAT to change Tcl_Size to ptrdiff_t 2022-06-13 07:32:21 +00:00
jan.nijtmans 21b4101075 Handle Tcl_GetByteArrayFromObj() better 2022-06-12 21:23:17 +00:00
jan.nijtmans 6187c67f3b Handle list/dict compatibility better 2022-06-12 20:08:56 +00:00
jan.nijtmans 55031f3989 Handle Tcl_Close, Tcl_CallFrame and Tcl_StatBuf correctly 2022-06-12 19:27:26 +00:00
jan.nijtmans 778ad9fdfa Enhance for Windows 2022-06-12 16:54:04 +00:00
jan.nijtmans 9aebf1d8a6 Merge 9.0 2022-06-12 16:35:57 +00:00
jan.nijtmans 98974ab123 Merge 9.0 2022-06-12 16:04:38 +00:00
jan.nijtmans e396c1dd36 Make the idea (finally) work 2022-06-12 15:13:33 +00:00
jan.nijtmans 82fccbc6dc Merge 9.0 2022-06-12 11:49:16 +00:00
jan.nijtmans 3c3ebea410 Merge 9.0 2022-06-09 20:25:18 +00:00
jan.nijtmans d307130311 Merge 9.0 2022-05-19 15:05:42 +00:00
jan.nijtmans 59f20f23bd Merge 9.0 2022-05-17 16:27:19 +00:00
jan.nijtmans c0d3b18e36 Merge 9.0 2022-04-26 16:02:00 +00:00
jan.nijtmans 77a24f6300 Merge 9.0 2022-04-26 07:19:51 +00:00
jan.nijtmans aabe2cbb33 Merge 9.0 2022-04-14 20:49:02 +00:00
jan.nijtmans 1391eda7db Merge 9.0 2022-04-14 13:17:58 +00:00
jan.nijtmans 776820c81f Merge 9.0 2022-04-08 13:01:04 +00:00
jan.nijtmans cb0acd5a7d Merge 9.0 2022-04-08 09:37:12 +00:00
jan.nijtmans 4717ea14fd Merge 9.0 2022-04-01 13:12:08 +00:00
jan.nijtmans 05de893f6f Fix some more testcases (involving string reverse/trim) 2022-04-01 09:48:44 +00:00
jan.nijtmans e0f543167d Final tweaks in testcases 2022-03-31 10:08:13 +00:00
jan.nijtmans e9f9cac4be Oops 2022-03-31 09:44:20 +00:00
jan.nijtmans e9e4041670 Minor change in utf.test 2022-03-31 07:20:00 +00:00
jan.nijtmans 3185a0b150 Merge 9.0. Restore some testcases working correctly with TCL_UTF_MAX=3 2022-03-31 07:08:34 +00:00
jan.nijtmans a2a0ca2a17 Merge 9.0. Fix CONTINUATION macro, and testcases 2022-03-29 22:17:33 +00:00
jan.nijtmans b19862400b Merge 9.0 2022-03-18 14:04:05 +00:00
jan.nijtmans a5055aa3db Merge 9.0 2022-03-18 11:18:58 +00:00
jan.nijtmans 2ceb66085c Merge 9.0. Don't combine surrogates when appending UTF-32 strings 2022-03-15 13:59:15 +00:00
jan.nijtmans e59865fa40 Merge 9.0 2022-03-11 15:20:04 +00:00
jan.nijtmans 02131d1f1b Merge 9.0. Update documentation 2022-03-11 14:45:16 +00:00
jan.nijtmans 08666ed474 Merge 9.0 2022-03-03 16:06:27 +00:00
jan.nijtmans b488f3edf6 TIP #619 implementation. tests not working yet 2022-03-03 13:05:38 +00:00
jan.nijtmans 1a08f93391 Experiment: Make tcl.h from Tcl 9.0 usable to compile extensions for Tcl 8.x too (WIP) 2021-12-04 17:55:32 +00:00
dgp 1b03667a27 merge 8.7 2018-10-17 19:47:01 +00:00
dgp 5c24bebd2b merge 8.7 2018-06-04 13:16:39 +00:00
dgp e51e79f343 merge 8.7 2018-05-24 13:12:26 +00:00
dgp 03fd40904f merge 8.7 2018-05-11 11:38:54 +00:00
dgp 13bcd282e3 merge 8.7 2018-04-25 15:00:53 +00:00
dgp 26e714137a merge 8.7 2018-03-15 13:40:40 +00:00
avl a457b16dfc Deal with backslashes in ${...}, change "char" to "character" in error, fix tests. 2017-03-05 19:38:43 +00:00
avl 9372c6c29f cherrypick 3bcf97f766: array index syntax done. ${...} not yet complete wrt backslashes. 2017-03-05 11:22:33 +00:00
avl 7ad70bd837 Create new branch named "tip-465" 2017-03-05 11:04:36 +00:00
13 changed files with 244 additions and 109 deletions
+15 -8
View File
@@ -28,13 +28,15 @@ formats.
Performs one of several encoding related operations, depending on
\fIoption\fR. The legal \fIoption\fRs are:
.TP
\fBencoding convertfrom\fR ?\fB-nocomplain\fR|\fB-strict\fR|\fB-failindex var\fR? ?\fIencoding\fR? \fIdata\fR
\fBencoding convertfrom\fR ?\fB-strict\fR? ?\fB-failindex var\fR? ?\fIencoding\fR? \fIdata\fR
\fBencoding convertfrom\fR \fB-nocomplain\fR ?\fIencoding\fR? \fIdata\fR
.
Convert \fIdata\fR to a Unicode string from the specified \fIencoding\fR. The
characters in \fIdata\fR are 8 bit binary data. The resulting
sequence of bytes is a string created by applying the given \fIencoding\fR
to the data. If \fIencoding\fR is not specified, the current
system encoding is used.
system encoding is used. If at least one of \fB-strict\fR/\fB-failindex var\fR/\fB-nocomplain\fR
is provided, this makes the \fIencoding\fR argument mandatory.
.VS "TCL8.7 TIP346, TIP607, TIP601"
.PP
.RS
@@ -48,7 +50,7 @@ in case of a conversion error, the position of the input byte causing the error
is returned in the given variable. The return value of the command are the
converted characters until the first error position.
In case of no error, the value \fI-1\fR is written to the variable. This option
may not be used together with \fB-nocomplain\fR or \fB-strict\fR.
may not be used together with \fB-nocomplain\fR.
.PP
The option \fB-nocomplain\fR has no effect and is available for compatibility with
TCL 9. In TCL 9, the encoding command fails with an error on any encoding issue.
@@ -56,18 +58,22 @@ This switch restores the TCL8.7 behaviour.
.PP
The \fB-strict\fR option follows more strict rules in conversion. For the \fButf-8\fR
encoder, it disallows invalid byte sequences and surrogates (which -
otherwise - are just passed through).
otherwise - are just passed through). This option may not be used together
with \fB-nocomplain\fR.
.VE "TCL8.7 TIP346, TIP607, TIP601"
.RE
.TP
\fBencoding convertto\fR ?\fB-nocomplain\fR|\fB-strict\fR|\fB-failindex var\fR? ?\fIencoding\fR? \fIstring\fR
\fBencoding convertto\fR ?\fB-strict\fR? ?\fB-failindex var\fR? ?\fIencoding\fR? \fIdata\fR
\fBencoding convertto\fR \fB-nocomplain\fR ?\fIencoding\fR? \fIdata\fR
.
Convert \fIstring\fR from Unicode to the specified \fIencoding\fR.
The result is a sequence of bytes that represents the converted
string. Each byte is stored in the lower 8-bits of a Unicode
character (indeed, the resulting string is a binary string as far as
Tcl is concerned, at least initially). If \fIencoding\fR is not
specified, the current system encoding is used.
specified, the current system encoding is used. If at least one of
\fB-strict\fR/\fB-failindex var\fR/\fB-nocomplain\fR
is provided, this makes the \fIencoding\fR argument mandatory.
.VS "TCL8.7 TIP346, TIP607, TIP601"
.PP
.RS
@@ -81,14 +87,15 @@ in case of a conversion error, the position of the input character causing the e
is returned in the given variable. The return value of the command are the
converted bytes until the first error position. No error condition is raised.
In case of no error, the value \fI-1\fR is written to the variable. This option
may not be used together with \fB-nocomplain\fR or \fB-strict\fR.
may not be used together with \fB-nocomplain\fR.
.PP
The option \fB-nocomplain\fR has no effect and is available for compatibility with
TCL 9. In TCL 9, the encoding command fails with an error on any encoding issue.
This switch restores the TCL8.7 behaviour.
.PP
The \fB-strict\fR option follows more strict rules in conversion. For the \fButf-8\fR
encoder, it disallows surrogates (which - otherwise - are just passed through).
encoder, it disallows surrogates (which - otherwise - are just passed through). This
option may not be used together with \fB-nocomplain\fR.
.VE "TCL8.7 TIP346, TIP607, TIP601"
.RE
.TP
+66 -18
View File
@@ -12,6 +12,7 @@
*/
#include "tclInt.h"
#include "tclIO.h"
#ifdef _WIN32
# include "tclWinInt.h"
#endif
@@ -563,18 +564,22 @@ EncodingConvertfromObjCmd(
* Possible combinations:
* 1) data -> objc = 2
* 2) encoding data -> objc = 3
* 3) -nocomplain data -> objc = 3
* 4) -nocomplain encoding data -> objc = 4
* 5) -strict data -> objc = 3
* 6) -strict encoding data -> objc = 4
* 7) -failindex val data -> objc = 4
* 8) -failindex val encoding data -> objc = 5
* 3) -nocomplain encoding data -> objc = 4
* 4) -strict -failindex val encoding data -> objc = 6
* 5) -strict encoding data -> objc = 4
* 6) -failindex val encoding data -> objc = 5
* 7) -failindex val -strict encoding data -> objc = 6
*/
if (objc == 2) {
encoding = Tcl_GetEncoding(interp, NULL);
data = objv[1];
} else if (objc > 2 && objc < 6) {
} else if (objc == 3) {
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
return TCL_ERROR;
}
data = objv[2];
} else if (objc > 3 && objc < 7) {
int objcUnprocessed = objc;
data = objv[objc - 1];
bytesPtr = Tcl_GetString(objv[1]);
@@ -586,15 +591,31 @@ EncodingConvertfromObjCmd(
&& !strncmp(bytesPtr, "-strict", strlen(bytesPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed--;
bytesPtr = Tcl_GetString(objv[2]);
if (bytesPtr[0] == '-' && bytesPtr[1] == 'f'
&& !strncmp(bytesPtr, "-failindex", strlen(bytesPtr))) {
/* at least three additional arguments needed */
if (objc < 6) {
goto encConvFromError;
}
failVarObj = objv[3];
objcUnprocessed -= 2;
}
} else if (bytesPtr[0] == '-' && bytesPtr[1] == 'f'
&& !strncmp(bytesPtr, "-failindex", strlen(bytesPtr))) {
/* at least two additional arguments needed */
if (objc < 4) {
/* at least three additional arguments needed */
if (objc < 5) {
goto encConvFromError;
}
failVarObj = objv[2];
flags = TCL_ENCODING_STOPONERROR;
flags = ENCODING_FAILINDEX;
objcUnprocessed -= 2;
bytesPtr = Tcl_GetString(objv[3]);
if (bytesPtr[0] == '-' && bytesPtr[1] == 's'
&& !strncmp(bytesPtr, "-strict", strlen(bytesPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed --;
}
}
switch (objcUnprocessed) {
case 3:
@@ -610,7 +631,9 @@ EncodingConvertfromObjCmd(
}
} else {
encConvFromError:
Tcl_WrongNumArgs(interp, 1, objv, "?-nocomplain|-strict|-failindex var? ?encoding? data");
Tcl_WrongNumArgs(interp, 1, objv, "?-strict? ?-failindex var? ?encoding? data");
((Interp *) interp)->flags |= INTERP_ALTERNATE_WRONG_ARGS;
Tcl_WrongNumArgs(interp, 1, objv, "-nocomplain ?encoding? data");
return TCL_ERROR;
}
@@ -704,16 +727,22 @@ EncodingConverttoObjCmd(
* Possible combinations:
* 1) data -> objc = 2
* 2) encoding data -> objc = 3
* 3) -nocomplain data -> objc = 3
* 4) -nocomplain encoding data -> objc = 4
* 5) -failindex val data -> objc = 4
* 3) -nocomplain encoding data -> objc = 4
* 4) -strict -failindex val encoding data -> objc = 6
* 5) -strict encoding data -> objc = 4
* 6) -failindex val encoding data -> objc = 5
* 7) -failindex val -strict encoding data -> objc = 6
*/
if (objc == 2) {
encoding = Tcl_GetEncoding(interp, NULL);
data = objv[1];
} else if (objc > 2 && objc < 6) {
} else if (objc == 3) {
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
return TCL_ERROR;
}
data = objv[2];
} else if (objc > 3 && objc < 7) {
int objcUnprocessed = objc;
data = objv[objc - 1];
stringPtr = Tcl_GetString(objv[1]);
@@ -725,15 +754,31 @@ EncodingConverttoObjCmd(
&& !strncmp(stringPtr, "-strict", strlen(stringPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed--;
stringPtr = Tcl_GetString(objv[2]);
if (stringPtr[0] == '-' && stringPtr[1] == 'f'
&& !strncmp(stringPtr, "-failindex", strlen(stringPtr))) {
/* at least three additional arguments needed */
if (objc < 6) {
goto encConvToError;
}
failVarObj = objv[3];
objcUnprocessed -= 2;
}
} else if (stringPtr[0] == '-' && stringPtr[1] == 'f'
&& !strncmp(stringPtr, "-failindex", strlen(stringPtr))) {
/* at least two additional arguments needed */
if (objc < 4) {
/* at least three additional arguments needed */
if (objc < 5) {
goto encConvToError;
}
failVarObj = objv[2];
flags = TCL_ENCODING_STOPONERROR;
objcUnprocessed -= 2;
stringPtr = Tcl_GetString(objv[3]);
if (stringPtr[0] == '-' && stringPtr[1] == 's'
&& !strncmp(stringPtr, "-strict", strlen(stringPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed --;
}
}
switch (objcUnprocessed) {
case 3:
@@ -749,7 +794,10 @@ EncodingConverttoObjCmd(
}
} else {
encConvToError:
Tcl_WrongNumArgs(interp, 1, objv, "?-nocomplain|-strict|-failindex var? ?encoding? data");
Tcl_WrongNumArgs(interp, 1, objv, "?-strict? ?-failindex var? ?encoding? data");
((Interp *) interp)->flags |= INTERP_ALTERNATE_WRONG_ARGS;
Tcl_WrongNumArgs(interp, 1, objv, "-nocomplain ?encoding? data");
return TCL_ERROR;
}
+5 -4
View File
@@ -10,6 +10,7 @@
*/
#include "tclInt.h"
#include "tclIO.h"
typedef size_t (LengthProc)(const char *src);
@@ -2386,9 +2387,9 @@ UtfToUtfProc(
*dst++ = *src++;
} else if ((UCHAR(*src) == 0xC0) && (src + 1 < srcEnd)
&& (UCHAR(src[1]) == 0x80) && (!(flags & TCL_ENCODING_MODIFIED) || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT))) {
&& (UCHAR(src[1]) == 0x80) && (!(flags & TCL_ENCODING_MODIFIED) || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) || (flags & ENCODING_FAILINDEX))) {
/*
* If in input mode, and -strict is specified: This is an error.
* If in input mode, and -strict or -failindex is specified: This is an error.
*/
if (flags & TCL_ENCODING_MODIFIED) {
result = TCL_CONVERT_SYNTAX;
@@ -2413,7 +2414,7 @@ UtfToUtfProc(
result = TCL_CONVERT_MULTIBYTE;
break;
}
if (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT)) {
if (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) || (flags & ENCODING_FAILINDEX)) {
result = TCL_CONVERT_SYNTAX;
break;
}
@@ -3199,7 +3200,7 @@ TableFromUtfProc(
word = fromUnicode[(ch >> 8)][ch & 0xFF];
if ((word == 0) && (ch != 0)) {
if ((STOPONERROR)) {
if (STOPONERROR) {
result = TCL_CONVERT_UNKNOWN;
break;
}
+6 -2
View File
@@ -9472,7 +9472,9 @@ TclCopyChannel(
moveBytes = inStatePtr->inEofChar == '\0' /* No eofChar to stop input */
&& inStatePtr->inputTranslation == TCL_TRANSLATE_LF
&& outStatePtr->outputTranslation == TCL_TRANSLATE_LF
&& inStatePtr->encoding == outStatePtr->encoding;
&& inStatePtr->encoding == outStatePtr->encoding
&& (inStatePtr->flags & TCL_ENCODING_STRICT) != TCL_ENCODING_STRICT
&& outStatePtr->flags & TCL_ENCODING_NOCOMPLAIN;
/*
* Allocate a new CopyState to maintain info about the current copy in
@@ -9799,7 +9801,9 @@ CopyData(
inBinary = (inStatePtr->encoding == NULL);
outBinary = (outStatePtr->encoding == NULL);
sameEncoding = (inStatePtr->encoding == outStatePtr->encoding);
sameEncoding = inStatePtr->encoding == outStatePtr->encoding
&& (inStatePtr->flags & TCL_ENCODING_STRICT) != TCL_ENCODING_STRICT
&& outStatePtr->flags & TCL_ENCODING_NOCOMPLAIN;
if (!(inBinary || sameEncoding)) {
TclNewObj(bufObj);
+1
View File
@@ -284,6 +284,7 @@ typedef struct ChannelState {
* usable, but it may not be closed
* again from within the close
* handler. */
#define ENCODING_FAILINDEX (1<<20) /* Internal flag, fail on Invalid bytes only */
#define CHANNEL_CLOSEDWRITE (1<<21) /* Channel write side has been closed.
* No further Tcl-level write IO on
* the channel is allowed. */
+31 -30
View File
@@ -261,34 +261,35 @@ static const int log2pow5[27] = {
};
#define N_LOG2POW5 27
static const Tcl_WideUInt wuipow5[27] = {
(Tcl_WideUInt) 1, /* 5**0 */
(Tcl_WideUInt) 5,
(Tcl_WideUInt) 25,
(Tcl_WideUInt) 125,
(Tcl_WideUInt) 625,
(Tcl_WideUInt) 3125, /* 5**5 */
(Tcl_WideUInt) 3125*5,
(Tcl_WideUInt) 3125*25,
(Tcl_WideUInt) 3125*125,
(Tcl_WideUInt) 3125*625,
(Tcl_WideUInt) 3125*3125, /* 5**10 */
(Tcl_WideUInt) 3125*3125*5,
(Tcl_WideUInt) 3125*3125*25,
(Tcl_WideUInt) 3125*3125*125,
(Tcl_WideUInt) 3125*3125*625,
(Tcl_WideUInt) 3125*3125*3125, /* 5**15 */
(Tcl_WideUInt) 3125*3125*3125*5,
(Tcl_WideUInt) 3125*3125*3125*25,
(Tcl_WideUInt) 3125*3125*3125*125,
(Tcl_WideUInt) 3125*3125*3125*625,
(Tcl_WideUInt) 3125*3125*3125*3125, /* 5**20 */
(Tcl_WideUInt) 3125*3125*3125*3125*5,
(Tcl_WideUInt) 3125*3125*3125*3125*25,
(Tcl_WideUInt) 3125*3125*3125*3125*125,
(Tcl_WideUInt) 3125*3125*3125*3125*625,
(Tcl_WideUInt) 3125*3125*3125*3125*3125, /* 5**25 */
(Tcl_WideUInt) 3125*3125*3125*3125*3125*5 /* 5**26 */
static const Tcl_WideUInt wuipow5[] = {
(Tcl_WideUInt) 1U, /* 5**0 */
(Tcl_WideUInt) 5U,
(Tcl_WideUInt) 25U,
(Tcl_WideUInt) 125U,
(Tcl_WideUInt) 625U,
(Tcl_WideUInt) 3125U, /* 5**5 */
(Tcl_WideUInt) 3125U*5U,
(Tcl_WideUInt) 3125U*25U,
(Tcl_WideUInt) 3125U*125U,
(Tcl_WideUInt) 3125U*625U,
(Tcl_WideUInt) 3125U*3125U, /* 5**10 */
(Tcl_WideUInt) 3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*25U,
(Tcl_WideUInt) 3125U*3125U*125U,
(Tcl_WideUInt) 3125U*3125U*625U,
(Tcl_WideUInt) 3125U*3125U*3125U, /* 5**15 */
(Tcl_WideUInt) 3125U*3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*3125U*25U,
(Tcl_WideUInt) 3125U*3125U*3125U*125U,
(Tcl_WideUInt) 3125U*3125U*3125U*625U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U, /* 5**20 */
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*25U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*125U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*625U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U, /* 5**25 */
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U*25U /* 5**27 */
};
/*
@@ -4552,7 +4553,7 @@ TclDoubleDigits(
++m2plus;
}
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] <= 64) {
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] < 64) {
/*
* If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
* then all our intermediate calculations can be done using exact
@@ -4609,7 +4610,7 @@ TclDoubleDigits(
s2 -= b2; b2 = 0;
}
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] <= 64) {
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] < 64) {
/*
* If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
* then all our intermediate calculations can be done using exact
+9 -9
View File
@@ -252,7 +252,7 @@ test chan-io-3.3 {WriteChars: compatibility with WriteBytes: flush on line} -bod
test chan-io-3.4 {WriteChars: loop over stage buffer} -body {
# stage buffer maps to more than can be queued at once.
set f [open $path(test1) w]
chan configure $f -encoding jis0208 -buffersize 16
chan configure $f -encoding jis0208 -buffersize 16 -nocomplainencoding 1
chan puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
chan close $f
@@ -265,7 +265,7 @@ test chan-io-3.5 {WriteChars: saved != 0} -body {
# be moved to beginning of next channel buffer to preserve requested
# buffersize.
set f [open $path(test1) w]
chan configure $f -encoding jis0208 -buffersize 17
chan configure $f -encoding jis0208 -buffersize 17 -nocomplainencoding 1
chan puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
chan close $f
@@ -298,7 +298,7 @@ test chan-io-3.7 {WriteChars: (bufPtr->nextAdded > bufPtr->length)} -body {
# on flush. The truncated bytes are moved to the beginning of the next
# channel buffer.
set f [open $path(test1) w]
chan configure $f -encoding jis0208 -buffersize 17
chan configure $f -encoding jis0208 -buffersize 17 -nocomplainencoding 1
chan puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
chan close $f
@@ -6705,8 +6705,8 @@ test chan-io-52.3 {TclCopyChannel} -constraints {fcopy} -setup {
} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
chan configure $f1 -translation lf -blocking 0
chan configure $f2 -translation cr -blocking 0
chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
chan configure $f2 -translation cr -encoding iso8859-1 -blocking 0
set s0 [chan copy $f1 $f2]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
@@ -6784,8 +6784,8 @@ test chan-io-52.6 {TclCopyChannel} -setup {
} -constraints {fcopy} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
chan configure $f1 -translation lf -blocking 0
chan configure $f2 -translation lf -blocking 0
chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
chan configure $f2 -translation lf -encoding iso8859-1 -blocking 0
set s0 [chan copy $f1 $f2 -size [expr {[file size $thisScript] + 5}]]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
@@ -6920,8 +6920,8 @@ test chan-io-53.2 {CopyData} -setup {
} -constraints {fcopy} -body {
set f1 [open $thisScript]
set f2 [open $path(test1) w]
chan configure $f1 -translation lf -blocking 0
chan configure $f2 -translation cr -blocking 0
chan configure $f1 -translation lf -encoding iso8859-1 -blocking 0
chan configure $f2 -translation cr -encoding iso8859-1 -blocking 0
chan copy $f1 $f2 -command [namespace code {set s0}]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
variable s0
+52 -18
View File
@@ -179,7 +179,7 @@ test cmdAH-4.2 {Tcl_EncodingObjCmd} -returnCodes error -body {
} -result {unknown or ambiguous subcommand "foo": must be convertfrom, convertto, dirs, names, or system}
test cmdAH-4.3 {Tcl_EncodingObjCmd} -returnCodes error -body {
encoding convertto
} -result {wrong # args: should be "encoding convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -result {wrong # args: should be "encoding convertto ?-strict? ?-failindex var? ?encoding? data" or "encoding convertto -nocomplain ?encoding? data"}
test cmdAH-4.4 {Tcl_EncodingObjCmd} -returnCodes error -body {
encoding convertto foo bar
} -result {unknown encoding "foo"}
@@ -201,7 +201,7 @@ test cmdAH-4.6 {Tcl_EncodingObjCmd} -setup {
} -result 8C
test cmdAH-4.7 {Tcl_EncodingObjCmd} -returnCodes error -body {
encoding convertfrom
} -result {wrong # args: should be "encoding convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -result {wrong # args: should be "encoding convertfrom ?-strict? ?-failindex var? ?encoding? data" or "encoding convertfrom -nocomplain ?encoding? data"}
test cmdAH-4.8 {Tcl_EncodingObjCmd} -returnCodes error -body {
encoding convertfrom foo bar
} -result {unknown encoding "foo"}
@@ -238,10 +238,10 @@ test cmdAH-4.13 {Tcl_EncodingObjCmd} -setup {
test cmdAH-4.14.1 {Syntax error, -nocomplain and -failindex, no encoding} -body {
encoding convertfrom -nocomplain -failindex 2 ABC
} -returnCodes 1 -result {wrong # args: should be "encoding convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "encoding convertfrom ?-strict? ?-failindex var? ?encoding? data" or "encoding convertfrom -nocomplain ?encoding? data"}
test cmdAH-4.14.2 {Syntax error, -nocomplain and -failindex, no encoding} -body {
encoding convertto -nocomplain -failindex 2 ABC
} -returnCodes 1 -result {wrong # args: should be "encoding convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "encoding convertto ?-strict? ?-failindex var? ?encoding? data" or "encoding convertto -nocomplain ?encoding? data"}
test cmdAH-4.15.1 {Syntax error, -failindex and -nocomplain, no encoding} -body {
encoding convertfrom -failindex 2 -nocomplain ABC
} -returnCodes 1 -result {unknown encoding "-nocomplain"}
@@ -250,19 +250,19 @@ test cmdAH-4.15.2 {Syntax error, -failindex and -nocomplain, no encoding} -body
} -returnCodes 1 -result {unknown encoding "-nocomplain"}
test cmdAH-4.16.1 {Syntax error, -nocomplain and -failindex, encoding} -body {
encoding convertfrom -nocomplain -failindex 2 utf-8 ABC
} -returnCodes 1 -result {wrong # args: should be "encoding convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "encoding convertfrom ?-strict? ?-failindex var? ?encoding? data" or "encoding convertfrom -nocomplain ?encoding? data"}
test cmdAH-4.16.2 {Syntax error, -nocomplain and -failindex, encoding} -body {
encoding convertto -nocomplain -failindex 2 utf-8 ABC
} -returnCodes 1 -result {wrong # args: should be "encoding convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "encoding convertto ?-strict? ?-failindex var? ?encoding? data" or "encoding convertto -nocomplain ?encoding? data"}
test cmdAH-4.17.1 {Syntax error, -failindex and -nocomplain, encoding} -body {
encoding convertfrom -failindex 2 -nocomplain utf-8 ABC
} -returnCodes 1 -result {wrong # args: should be "encoding convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "encoding convertfrom ?-strict? ?-failindex var? ?encoding? data" or "encoding convertfrom -nocomplain ?encoding? data"}
test cmdAH-4.17.2 {Syntax error, -failindex and -nocomplain, encoding} -body {
encoding convertto -failindex 2 -nocomplain utf-8 ABC
} -returnCodes 1 -result {wrong # args: should be "encoding convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "encoding convertto ?-strict? ?-failindex var? ?encoding? data" or "encoding convertto -nocomplain ?encoding? data"}
test cmdAH-4.18.1 {Syntax error, -failindex with no var, no encoding} -body {
encoding convertfrom -failindex ABC
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {unknown encoding "-failindex"}
test cmdAH-4.18.2 {Syntax error, -failindex with no var, no encoding (byte compiled)} -setup {
proc encoding_test {} {
encoding convertfrom -failindex ABC
@@ -270,12 +270,12 @@ test cmdAH-4.18.2 {Syntax error, -failindex with no var, no encoding (byte compi
} -body {
# Compile and execute
encoding_test
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"} -cleanup {
} -returnCodes 1 -result {unknown encoding "-failindex"} -cleanup {
rename encoding_test ""
}
test cmdAH-4.18.3 {Syntax error, -failindex with no var, no encoding} -body {
encoding convertto -failindex ABC
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {unknown encoding "-failindex"}
test cmdAH-4.18.4 {Syntax error, -failindex with no var, no encoding (byte compiled)} -setup {
proc encoding_test {} {
encoding convertto -failindex ABC
@@ -283,16 +283,16 @@ test cmdAH-4.18.4 {Syntax error, -failindex with no var, no encoding (byte compi
} -body {
# Compile and execute
encoding_test
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"} -cleanup {
} -returnCodes 1 -result {unknown encoding "-failindex"} -cleanup {
rename encoding_test ""
}
test cmdAH-4.19.1 {convertrom -failindex with correct data} -body {
encoding convertfrom -failindex test ABC
encoding convertfrom -failindex test [encoding system] ABC
set test
} -returnCodes 0 -result -1
test cmdAH-4.19.2 {convertrom -failindex with correct data (byt compiled)} -setup {
proc encoding_test {} {
encoding convertfrom -failindex test ABC
encoding convertfrom -failindex test [encoding system] ABC
set test
}
} -body {
@@ -302,12 +302,12 @@ test cmdAH-4.19.2 {convertrom -failindex with correct data (byt compiled)} -setu
rename encoding_test ""
}
test cmdAH-4.19.3 {convertrom -failindex with correct data} -body {
encoding convertto -failindex test ABC
encoding convertto -failindex test [encoding system] ABC
set test
} -returnCodes 0 -result -1
test cmdAH-4.19.4 {convertrom -failindex with correct data (byt compiled)} -setup {
proc encoding_test {} {
encoding convertto -failindex test ABC
encoding convertto -failindex test [encoding system] ABC
set test
}
} -body {
@@ -320,7 +320,7 @@ test cmdAH-4.20.1 {convertrom -failindex with incomplete utf8} -body {
set x [encoding convertfrom -failindex i utf-8 A\xc3]
binary scan $x H* y
list $y $i
} -returnCodes 0 -result {41c3 -1}
} -returnCodes 0 -result {41 1}
test cmdAH-4.20.2 {convertrom -failindex with incomplete utf8 (byte compiled)} -setup {
proc encoding_test {} {
set x [encoding convertfrom -failindex i utf-8 A\xc3]
@@ -330,7 +330,41 @@ test cmdAH-4.20.2 {convertrom -failindex with incomplete utf8 (byte compiled)} -
} -body {
# Compile and execute
encoding_test
} -returnCodes 0 -result {41c3 -1} -cleanup {
} -returnCodes 0 -result {41 1} -cleanup {
rename encoding_test ""
}
test cmdAH-4.20.3 {convertrom -failindex with incomplete utf8} -body {
set x [encoding convertfrom -strict -failindex i utf-8 A\xc3]
binary scan $x H* y
list $y $i
} -returnCodes 0 -result {41 1}
test cmdAH-4.20.4 {convertrom -failindex with incomplete utf8 (byte compiled)} -setup {
proc encoding_test {} {
set x [encoding convertfrom -strict -failindex i utf-8 A\xc3]
binary scan $x H* y
list $y $i
}
} -body {
# Compile and execute
encoding_test
} -returnCodes 0 -result {41 1} -cleanup {
rename encoding_test ""
}
test cmdAH-4.20.5 {convertrom -failindex with incomplete utf8} -body {
set x [encoding convertfrom -failindex i -strict utf-8 A\xc3]
binary scan $x H* y
list $y $i
} -returnCodes 0 -result {41 1}
test cmdAH-4.20.6 {convertrom -failindex with incomplete utf8 (byte compiled)} -setup {
proc encoding_test {} {
set x [encoding convertfrom -failindex i -strict utf-8 A\xc3]
binary scan $x H* y
list $y $i
}
} -body {
# Compile and execute
encoding_test
} -returnCodes 0 -result {41 1} -cleanup {
rename encoding_test ""
}
test cmdAH-4.21.1 {convertto -failindex with wrong character} -body {
+6 -6
View File
@@ -676,18 +676,18 @@ test encoding-24.18 {Parse valid or invalid utf-8} -constraints testbytestring -
test encoding-24.19 {Parse valid or invalid utf-8} -constraints deprecated -body {
encoding convertto utf-8 "ZX\uD800"
} -result ZX\xED\xA0\x80
test encoding-24.20 {Parse with -nocomplain but without providing encoding} {
test encoding-24.20 {Parse with -nocomplain but without providing encoding} -body {
string length [encoding convertfrom -nocomplain "\x20"]
} 1
test encoding-24.21 {Parse with -nocomplain but without providing encoding} {
} -returnCodes 1 -result {unknown encoding "-nocomplain"}
test encoding-24.21 {Parse with -nocomplain but without providing encoding} -body {
string length [encoding convertto -nocomplain "\x20"]
} 1
} -returnCodes 1 -result {unknown encoding "-nocomplain"}
test encoding-24.22 {Syntax error, two encodings} -body {
encoding convertfrom iso8859-1 utf-8 "ZX\uD800"
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertfrom ?-strict? ?-failindex var? ?encoding? data" or "::tcl::encoding::convertfrom -nocomplain ?encoding? data"}
test encoding-24.23 {Syntax error, two encodings} -body {
encoding convertto iso8859-1 utf-8 "ZX\uD800"
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -returnCodes 1 -result {wrong # args: should be "::tcl::encoding::convertto ?-strict? ?-failindex var? ?encoding? data" or "::tcl::encoding::convertto -nocomplain ?encoding? data"}
test encoding-24.24 {Parse invalid utf-8 with -strict} -body {
encoding convertfrom -strict utf-8 "\xC0\x80\x00\x00"
} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xC0'}
+39
View File
@@ -7451,11 +7451,50 @@ test expr-62.10 {TIP 582: comments can go inside function calls} {
expr {max# comment
(1,2)}
} 2
# Bug e3dcab1d14
proc do-one-test-expr-63 {e p float athreshold} {
# e - power of 2 to test
# p - tcl_precision to test wuth
# float - floating point value 2**-$p
# athreshold - tolerable absolute error (1/2 decimal digit in
# least significant place plus 1/2 least significant bit)
set trouble {}
set ::tcl_precision $p
set xfmt x[expr $float]
set ::tcl_precision 0
set fmt [string range $xfmt 1 end]
set aerror [expr {abs($fmt - $float)}]
if {$aerror > $athreshold} {
return "Result $fmt is more than $athreshold away from $float"
} else {
return {}
}
}
proc run-test-expr-63 {} {
for {set e 0} {$e <= 1023} {incr e} {
set pt [expr {floor($e*log(2)/log(10))}]
for {set p 6} {$p <= 17} {incr p} {
set athreshold [expr {0.5*10.0**-($pt+$p) + 2.0**-($e+53)}]
set numer [expr {5**$e}]
set xfloat x[expr {2.**-$e}]
set float [string range $xfloat 1 end]
test expr-63.$p.$e "convert 2**-$e to decimal at precision $p" {
do-one-test-expr-63 $e $p $float $athreshold
} {}
}
}
rename do-one-test-expr-63 {}
rename run-test-expr-63 {}
}
run-test-expr-63
# cleanup
unset -nocomplain a
unset -nocomplain min
unset -nocomplain max
::tcltest::cleanupTests
return
+9 -9
View File
@@ -272,7 +272,7 @@ test io-3.4 {WriteChars: loop over stage buffer} -body {
# stage buffer maps to more than can be queued at once.
set f [open $path(test1) w]
fconfigure $f -encoding jis0208 -buffersize 16
fconfigure $f -encoding jis0208 -buffersize 16 -nocomplainencoding 1
puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
close $f
@@ -286,7 +286,7 @@ test io-3.5 {WriteChars: saved != 0} -body {
# requested buffersize.
set f [open $path(test1) w]
fconfigure $f -encoding jis0208 -buffersize 17
fconfigure $f -encoding jis0208 -buffersize 17 -nocomplainencoding 1
puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
close $f
@@ -319,7 +319,7 @@ test io-3.7 {WriteChars: (bufPtr->nextAdded > bufPtr->length)} -body {
# of the next channel buffer.
set f [open $path(test1) w]
fconfigure $f -encoding jis0208 -buffersize 17
fconfigure $f -encoding jis0208 -buffersize 17 -nocomplainencoding 1
puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
set x [list [contents $path(test1)]]
close $f
@@ -7239,8 +7239,8 @@ test io-52.3 {TclCopyChannel} {fcopy} {
file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
fconfigure $f2 -translation cr -blocking 0
fconfigure $f1 -translation lf -encoding iso8859-1 -blocking 0
fconfigure $f2 -translation cr -encoding iso8859-1 -blocking 0
set s0 [fcopy $f1 $f2]
set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]]
close $f1
@@ -7331,8 +7331,8 @@ test io-52.6 {TclCopyChannel} {fcopy} {
file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
fconfigure $f2 -translation lf -blocking 0
fconfigure $f1 -translation lf -encoding iso8859-1 -blocking 0
fconfigure $f2 -translation lf -encoding iso8859-1 -blocking 0
set s0 [fcopy $f1 $f2 -size [expr {[file size $thisScript] + 5}]]
set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]]
close $f1
@@ -7626,8 +7626,8 @@ test io-53.2 {CopyData} {fcopy} {
file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
fconfigure $f2 -translation cr -blocking 0
fconfigure $f1 -translation lf -encoding iso8859-1 -blocking 0
fconfigure $f2 -translation cr -encoding iso8859-1 -blocking 0
fcopy $f1 $f2 -command [namespace code {set s0}]
set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]]
variable s0
+1 -1
View File
@@ -575,11 +575,11 @@ read {%^&*()_+-=
}
query/maxRead {} -1
flush/read {} {}
query/maxRead {} -1
write %^&*()_+-= %^&*()_+-=
write {
} {
}
query/maxRead {} -1
delete/read {} *ignored*
flush/write {} {}
delete/write {} *ignored*}
+4 -4
View File
@@ -1473,7 +1473,7 @@ test safe-11.7 {testing safe encoding} -setup {
interp eval $i encoding convertfrom
} -returnCodes error -cleanup {
safe::interpDelete $i
} -result {wrong # args: should be "encoding convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -result {wrong # args: should be "encoding convertfrom ?-strict? ?-failindex var? ?encoding? data" or "encoding convertfrom -nocomplain ?encoding? data"}
test safe-11.7.1 {testing safe encoding} -setup {
set i [safe::interpCreate]
} -body {
@@ -1482,7 +1482,7 @@ test safe-11.7.1 {testing safe encoding} -setup {
} -match glob -cleanup {
unset -nocomplain m o
safe::interpDelete $i
} -result {wrong # args: should be "encoding convertfrom ?-nocomplain|-strict|-failindex var? ?encoding? data"
} -result {wrong # args: should be "encoding convertfrom ?-strict? ?-failindex var? ?encoding? data" or "encoding convertfrom -nocomplain ?encoding? data"
while executing
"encoding convertfrom"
invoked from within
@@ -1495,7 +1495,7 @@ test safe-11.8 {testing safe encoding} -setup {
interp eval $i encoding convertto
} -returnCodes error -cleanup {
safe::interpDelete $i
} -result {wrong # args: should be "encoding convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"}
} -result {wrong # args: should be "encoding convertto ?-strict? ?-failindex var? ?encoding? data" or "encoding convertto -nocomplain ?encoding? data"}
test safe-11.8.1 {testing safe encoding} -setup {
set i [safe::interpCreate]
} -body {
@@ -1504,7 +1504,7 @@ test safe-11.8.1 {testing safe encoding} -setup {
} -match glob -cleanup {
unset -nocomplain m o
safe::interpDelete $i
} -result {wrong # args: should be "encoding convertto ?-nocomplain|-strict|-failindex var? ?encoding? data"
} -result {wrong # args: should be "encoding convertto ?-strict? ?-failindex var? ?encoding? data" or "encoding convertto -nocomplain ?encoding? data"
while executing
"encoding convertto"
invoked from within