Compare commits

...
Author SHA1 Message Date
griffin 13223fbc3f These record locations are not relative offsets, but rather absolute locations. 2021-10-24 18:19:16 +00:00
griffin 2812109f17 Remove unnecessary change 2021-10-13 16:34:46 +00:00
griffin 34e7d9999e Corrected offset calculations 2021-10-13 00:22:20 +00:00
griffin bc437743d5 Patch to fix zipfs mkimg bug. 2021-08-31 14:36:33 +00:00
jan.nijtmans fdf0eab428 Merge 8.6 2021-08-27 07:10:33 +00:00
jan.nijtmans 975416ffc0 Follow-up previous commit (thanks, Don!). Missing #undef 2021-08-27 07:09:25 +00:00
dgp c3d1d436bc repair broken build 2021-08-26 19:14:01 +00:00
dgp a0d2c4332f repair broken build 2021-08-26 19:12:39 +00:00
jan.nijtmans 3c6ee745c3 Merge 8.6 2021-08-26 15:27:05 +00:00
jan.nijtmans 9c9b2cacae Add a few spare unused stub entries in TclOO 2021-08-26 15:15:06 +00:00
jan.nijtmans a5048e8dd9 Make everything compile warning-free when TCL_THREADS=0 2021-08-23 13:00:47 +00:00
jan.nijtmans a5448b6c8b Merge 8.5 2021-08-23 10:35:16 +00:00
jan.nijtmans 4c3b4b2a2b Add FALLTHRU markers, to help GCC emit less false warnings 2021-08-23 10:01:35 +00:00
jan.nijtmans d0288f61d3 Code formatting 2021-08-23 09:59:26 +00:00
jan.nijtmans 94b338844e TIP #511 implementation: Implement Tcl_AsyncMarkFromSignal() 2021-08-20 12:46:09 +00:00
jan.nijtmans c7dbd69076 Merge-mark 8.6. Update to autoconf-2.71 2021-08-19 08:51:29 +00:00
jan.nijtmans aee8e4fe56 Merge 8.5 2021-08-19 08:45:09 +00:00
jan.nijtmans 45a3da6414 Reserve a few more unused stub entries 2021-08-19 08:38:27 +00:00
jan.nijtmans d296d56f36 Apply macos-tip511.diff. Resolve conflict with TIP #601 2021-08-19 08:05:47 +00:00
jan.nijtmans f69a86b714 Fix use of TCL_THREADS macro: In Tcl 8.7, this is always defined, but can have value '1' or '0' 2021-08-18 14:31:55 +00:00
jan.nijtmans 5f83d31ece tip#511 proposed implementation 2021-08-17 16:16:29 +00:00
jan.nijtmans 58502bda0b Make TCL_MAC_EMPTY_FILE macro work with C++ compiler 2021-08-15 21:47:28 +00:00
jan.nijtmans 0a6f1e351d Make tclZipfs.c compilable with a C++ compiler 2021-08-15 21:37:09 +00:00
jan.nijtmans 16105b9833 Merge 8.6 2021-08-05 11:20:10 +00:00
oehhar 1b1500534d Clarify description of corner case 'string replace "" 0 0 A' to return the empty string. 2021-08-05 07:30:15 +00:00
jan.nijtmans 6118cd549e merge-mark 2021-07-31 16:00:46 +00:00
jan.nijtmans e62d47d725 Backout last 2 commits: It appears that on Windows-2016 the GITHUB-installed version of msys works better than the official msys2 2021-07-31 15:59:11 +00:00
jan.nijtmans 2002b28cbb try to update msys2 to latest version in GITHUB build 2021-07-30 08:08:30 +00:00
jan.nijtmans f107311e0a Use mingw-w64-ucrt-x86_64 toolchain for onfiledist build (starting with 8.7, since it needs Vista+) 2021-07-23 12:52:16 +00:00
jan.nijtmans 95e8a2b516 Missing "env:" label in win-build.yml 2021-07-23 09:49:13 +00:00
jan.nijtmans 8c30acc36f Experiment: build onefiledist using the (experimental) UCRT64 mingw-w64 environment 2021-07-21 08:19:39 +00:00
jan.nijtmans 6cc9524fbb Merge 8.6 2021-07-21 08:12:33 +00:00
jan.nijtmans edf67bd765 Merge 8.5 2021-07-21 08:00:58 +00:00
jan.nijtmans 97e8fa6621 Use msys2/setup-msys2@v2 rule to install msys2, working around limitations in msys2 2021-07-20 15:32:15 +00:00
jan.nijtmans b1f4ab80a0 Merge 8.6 2021-07-17 11:18:00 +00:00
jan.nijtmans 04619d69b8 Fix [592a25a505]: Tcl_PutEnv() crashes on Windows 2021-07-17 11:16:11 +00:00
jan.nijtmans 9804d03e1f Proposed fix for [592a25a505]: Tcl_PutEnv() crashes on Windows 2021-07-16 15:52:34 +00:00
jan.nijtmans 9b4bad2783 Merge 8.6 2021-07-16 06:58:45 +00:00
jan.nijtmans f58326fab5 Merge 8.5 2021-07-16 06:41:58 +00:00
jan.nijtmans c47c440be2 -eofchar should only be effective on input, not on output, since it could result in CTRL-Z be written when closing the file. (backported from 8.6) 2021-07-16 06:07:43 +00:00
jan.nijtmans 1523ce53c1 comment clean-up 2021-07-16 06:04:38 +00:00
jan.nijtmans 68dc740f26 Fix [1a89eba3761f62ee]: Add "exit" Windows shell built-in to auto_execok 2021-07-14 16:06:32 +00:00
jan.nijtmans 6e3371ad0a Fix build on Linux/Sparc with 32 bit userspace. See: [https://github.com/libtom/libtommath/issues/509] for the upstream libtommath fix 2021-07-14 15:54:56 +00:00
jan.nijtmans e5bb3b3829 finally -> finallyIndex, preventing conflicts with Tru64 headers (reported by Jay K) 2021-07-13 07:56:44 +00:00
jan.nijtmans 6bdb76c461 merge 8.6 2021-07-08 12:28:56 +00:00
jan.nijtmans 3d82d5537c Add \DUSE_NMAKE=1 to C-flags when nmake is used 2021-07-08 12:17:30 +00:00
jan.nijtmans 259220cf73 Set -DUSE_NMAKE=1 when compiling under nmake. Update .gitattributes and (for Fossil) binary-glob and crlf-glob 2021-07-08 12:00:07 +00:00
jan.nijtmans 4df980c07b TCL_THREADS=0 means no threads too 2021-06-29 16:03:49 +00:00
jan.nijtmans f0048561b7 Use fstat64() in stead of fstat() on platforms which support it. 2021-06-29 14:52:29 +00:00
jan.nijtmans 7573820525 Merge 8.6 2021-06-28 14:38:11 +00:00
jan.nijtmans 5175765beb Update many tools/encoding/*.txt files to the latest version, but leave out character changes. Only add the new "cns11643" encoding, which belongs to the same group as big5 2021-06-28 14:33:00 +00:00
jan.nijtmans 35315e5c2e Update many tools/encoding/*.txt files to the latest version, but leave out character changes. Only add the new "cns11643" encoding, which belongs to the same group as big5 2021-06-28 14:22:00 +00:00
jan.nijtmans 25a30f2db0 Tweak TIP #590 impl on MacOS: Shared library could start with capital 2021-06-25 21:30:32 +00:00
pooryorick a6691785d8 fix typos in previous commit 2021-06-23 21:31:40 +00:00
pooryorick 458f106fdb possible fix for [dcb888ed85adeb86] with kevent() 2021-06-23 18:49:57 +00:00
jan.nijtmans 501954d5aa Merge 8.6 2021-06-23 12:26:39 +00:00
jan.nijtmans 814c9b57aa Now really merge [bug-f9800d52bd61f240] (previous commit contains test-cases only) 2021-06-23 12:20:59 +00:00
pooryorick d7d411426d merge [bug-f9800d52bd61f240] 2021-06-23 07:43:54 +00:00
pooryorick 76238b9ab7 possible fix for [dcb888ed85adeb86] with kevent() 2021-06-22 18:26:58 +00:00
jan.nijtmans 617e57260f Merge 8.5 2021-06-22 13:20:38 +00:00
jan.nijtmans ad4b60ef7c More code cleanup, eliminating various compiler warnings with stricter flags. No need to even use strmove at all. 2021-06-22 13:19:31 +00:00
jan.nijtmans 7403235131 Merge 8.5 2021-06-22 09:03:17 +00:00
jan.nijtmans 30db6ce78e Fix [bad6cc213d]: A format string vulnerability in Tcl nmakehelp.c allows code execution via a crated file.
Also change a memcpy() to a memmove(), because the range could be overlapping
2021-06-22 09:02:00 +00:00
pooryorick 6f34bcda8f Improve logic and cleanup for tests coroutine-7.13 and coroutine-7.14 2021-06-21 21:21:50 +00:00
jan.nijtmans cb849ffbeb Merge 8.6 2021-06-21 12:34:20 +00:00
jan.nijtmans a8e1d5aae3 Backport ISSUE_TEMPLATE and PULL_REQUEST_TEMPLATE from 8.7 2021-06-21 12:31:39 +00:00
jan.nijtmans b632599a22 Merge 8.6 2021-06-21 12:08:28 +00:00
jan.nijtmans 3f913d322f Change a lot of url's (as far as possible) from http:// to https:// 2021-06-21 12:00:29 +00:00
jan.nijtmans cdae95cf66 Backout merge of "bug-f9800d52bd61f240" branch, which is - apparently - not ready to be merged yet.
This is causing failures on all platforms: [https://github.com/tcltk/tcl/runs/2872891537?check_suite_focus=true]
2021-06-21 10:27:02 +00:00
jan.nijtmans f36b113b00 eol-spacing 2021-06-21 09:45:43 +00:00
jan.nijtmans 954fcc121d renumber testcases 2021-06-21 09:40:59 +00:00
jan.nijtmans c60ee515ee Fix [048dd20b4171c8da]: cesu-8 encoding fails on \u80 2021-06-21 09:29:18 +00:00
pooryorick 0008ef8d9b merge bug-f9800d52bd61f240 2021-06-21 05:47:02 +00:00
pooryorick 7357ee63c3 test for issue [5106fddd4400e5b9b], failure to yieldto is not the same thing as
not calling yieldto in the first place
2021-06-21 05:40:22 +00:00
pooryorick e0456ccfdf merge bug-f9800d52bd61f240 2021-06-20 22:57:40 +00:00
pooryorick 70c2b0e817 Fix for [f9800d52bd61f240], vwait is not NRE-enabled, and yieldto cannot find
the right splicing spot
2021-06-20 22:47:14 +00:00
jan.nijtmans 55076a6af2 Undo change in [b70eeebb0d196bb2]: It breaks the "make html" target in github actions. See also [1e10b17023] 2021-06-19 23:37:07 +00:00
jan.nijtmans ee4adbec91 Assume chan-io-41.6 and chan-io-41.8 are UNIX-only. See [9be2726881c41893], those are failing on Windows now 2021-06-19 23:32:03 +00:00
jan.nijtmans eff036def9 Fix windows build failure, caused by [f8608fc420] 2021-06-19 23:24:24 +00:00
jan.nijtmans d825807d46 Fix [f8608fc420]: linux : dynamic location of the tcl zipfs 2021-06-18 19:39:39 +00:00
dgp a444785129 Bump version number to distinguish from release. 2021-06-18 18:11:29 +00:00
dgp 9deb1f2b0a close fork 2021-06-18 17:38:27 +00:00
dgp a8606e7ce9 merge release 2021-06-18 17:37:05 +00:00
jan.nijtmans 7dd17bbcbf Merge 8.6 2021-06-18 14:22:23 +00:00
jan.nijtmans 8c5e1ee93f Update all "cp" and "iso8859-?" encodings to the latest version. This adds 3 new codepoints to iso8859-7, and adds a full new encoding iso8859-11 2021-06-18 12:46:32 +00:00
jan.nijtmans e809cadb0a Update all "cp" and "iso8859-?" encodings to the latest version. This adds 3 new codepoints to iso8859-7, and adds a full new encoding iso8859-11. 2021-06-18 12:24:06 +00:00
jan.nijtmans ce199db516 Hm. tcltk-man2html.tcl cannot handle $(PATCH_LEVEL). Don't bother for now. 2021-06-18 10:44:08 +00:00
jan.nijtmans cd814a13ac Fix "make html-tcl" target, broken by this commit: [b70eeebb0d196bb2] (in core-8-7-a5-rc branch only) 2021-06-18 10:15:01 +00:00
dgp a6a453f3b8 Revert to the code of RC2, so that only timestamps and changes file entries
are different.
2021-06-17 15:52:08 +00:00
dgp 8cfc027811 Add another ticket to the changes file, noting its incompatility. 2021-06-17 15:44:09 +00:00
pooryorick 06938f94df tests for [dcb888ed85adeb86] 2021-06-17 10:25:25 +00:00
pooryorick 597edf50b5 Fix for [dcb888ed85adeb86]: epoll, special files, directories, links, epoll_ctl operation not permitted, and abort 2021-06-17 08:53:04 +00:00
pooryorick 79b57974dc Re-apply fix for [67a5eabbd3d1]: refchan, coroutine, and postevent from the "watch" proc 2021-06-16 16:06:00 +00:00
dgp acfe572897 merge 8.7 2021-06-16 02:26:17 +00:00
jan.nijtmans 9b3ea0f675 Fix [18f4a94d03] by backing out [9bcec7cd880540c3] 2021-06-15 14:54:15 +00:00
jan.nijtmans 9251a05e68 Fix [18f4a94d03] by backing out [9bcec7cd880540c3] 2021-06-15 14:52:02 +00:00
jan.nijtmans 7413757522 Fix [18f4a94d03] by backout out [9bcec7cd880540c3] 2021-06-15 12:56:58 +00:00
jan.nijtmans 3fcf24bf05 Adapt iso8859-7.enc to latest version, and fix testcase 2021-06-15 08:50:23 +00:00
jan.nijtmans 693567f0d8 Add new encoding iso8859-11 2021-06-15 08:28:20 +00:00
jan.nijtmans 98f26e503e Update encodings (cp/iso) to latest version from unicode.org. *.enc-files not re-generated yet 2021-06-15 08:17:52 +00:00
dgp 1dfd77778e Change the arguments of the make html target to take the right default
actions for producing a Tcl/Tk release.
2021-06-13 17:01:00 +00:00
dgp 4b9ec1f4aa bump release date 2021-06-12 16:49:02 +00:00
dgp bd52e4af47 merge 8.7 2021-06-11 17:49:50 +00:00
jan.nijtmans 729c97255b Merge 8.6 2021-06-11 13:59:23 +00:00
jan.nijtmans 60abdd9b58 Fix [d6b10a9256]: Two files under compat/zlib/contrib/ are CRLF 2021-06-11 13:57:40 +00:00
jan.nijtmans 5b8c40a4b1 Somehow "zip -A" appears not to work in the github actions environment. Try to find out why. 2021-06-11 13:48:03 +00:00
jan.nijtmans 21904bcbde Ubuntu 16 is [https://github.com/actions/virtual-environments/issues/3287|deprecated] 2021-06-11 08:45:01 +00:00
jan.nijtmans 4427df1ae8 protect all usage of dladdr() with !defined(NO_DLFCN_H) 2021-06-11 06:59:13 +00:00
jan.nijtmans 19c1bb0cf6 Fix copying of public_suffix_list.dat.gz in win/Makefile.in. Thanks, Paul! 2021-06-11 06:33:33 +00:00
dgp b67894a411 merge 8.7 2021-06-10 15:56:43 +00:00
jan.nijtmans d1e77398a8 Experiment: use dladdr() on Linux to locate the shared library. Won't work on other platforms! WIP 2021-06-10 14:49:08 +00:00
jan.nijtmans f271e62139 (cherry-pick): Update dist target to renamed file.
Also sync win/tcl.m4 with Tk (no change in generated win/configure)
2021-06-10 08:52:12 +00:00
dgp 4476f831f5 Update dist target to renamed file. 2021-06-09 20:32:46 +00:00
dgp 3618ecdad8 merge 8.7 2021-06-09 16:26:41 +00:00
jan.nijtmans ac2c528c36 Rename effective_tld_names.txt to public_suffix_list.dat, that's how it is named now. 2021-06-09 09:25:58 +00:00
jan.nijtmans 751750005b Update effective_tld_names.txt.gz to latest version (from https://publicsuffix.org/list/public_suffix_list.dat) 2021-06-09 09:13:53 +00:00
jan.nijtmans 5b7381172b Merge 8.6 2021-06-09 07:17:45 +00:00
jan.nijtmans 0d6faa1ccd Fix compiler warning seen with static builds (--disable-shared): "FLT_RADIX" is not defined, evaluates to 0 [-Wundef] 2021-06-09 07:16:18 +00:00
jan.nijtmans 4d31e6c26e Merge 8.6 2021-06-08 14:23:52 +00:00
jan.nijtmans 3b3080a9f6 Name TKSCRIPTZIPNAME the same way as TCLSCRIPTZIPNAME 2021-06-08 14:22:59 +00:00
jan.nijtmans 1b914f66bf Don't create a lot of empty directories any more while installing 2021-06-08 13:25:22 +00:00
jan.nijtmans 9b86fa3762 HP_UX -> HP-UX and another apparent typo 2021-06-08 12:04:28 +00:00
jan.nijtmans 31de1a727a re-generate unix/configure with autoconf-2.59 2021-06-08 12:01:44 +00:00
jan.nijtmans f0316438a9 Use -fPIC by default on DragonFly/FreeBSD, but not on OSF1/HP-UX. Backported (with typo correct) from 8.7 2021-06-08 11:49:55 +00:00
jan.nijtmans 02c12ad919 Add full "libtommath" to "make dist" in stead of only the header-files and src-files. Reported by Harald Oehlmann. 2021-06-08 08:55:00 +00:00
jan.nijtmans a1f7ab6047 DragonFly/FreeBSD need -fPIC 2021-06-08 08:37:17 +00:00
jan.nijtmans 6c09446693 If the test suite needs a file, it needs to go in the distribution (cherry-pick) 2021-06-08 06:20:10 +00:00
dgp 9882c08b41 ....and with the right path. 2021-06-07 17:16:20 +00:00
dgp 1fb36494e2 If the test suite needs a file, it needs to go in the distribution. 2021-06-07 17:14:49 +00:00
dgp cb796d6e08 merge 8.7 2021-06-04 21:01:50 +00:00
dgp 557c437637 update changes 2021-06-04 21:01:37 +00:00
dgp c0ef486e3d Update docs to reflect http 2.10 2021-06-04 19:55:07 +00:00
dgp 7a14d36614 Revise http version number from unusual 2.10.0a1 to conventional 2.10a1 2021-06-04 19:43:08 +00:00
jan.nijtmans 7e1bd9ece3 Add winspool library to LIBS_GUI on Windows. Not used yet (but most likely it will be used in 8.7 final) 2021-06-02 07:45:25 +00:00
dgp 4d0c2de9fe more changes 2021-05-28 18:12:51 +00:00
jan.nijtmans d2275e354d compete TIP list in "changes" 2021-05-28 10:09:04 +00:00
dgp 28821a3fc8 merge 8.7 2021-05-27 15:47:34 +00:00
jan.nijtmans 40e5a934ab Merge 8.6. Make c++ compile (with g++-11) warning-free 2021-05-27 12:13:41 +00:00
jan.nijtmans a5ee3631c3 Fix "possibly uninitialized variable" warning, seen with gcc-11 (however harmless) 2021-05-27 10:31:51 +00:00
jan.nijtmans 0c51650ae9 Fix [a73c79081e]: Doc fix in tcl.h. Recommend int32_t in stead of wchar_t 2021-05-26 11:23:19 +00:00
jan.nijtmans 6d2f85de20 Fix [a73c79081e]: Doc fix in tcl.h, by not suggesting wchar_t any more for Tcl_UniChar. 2021-05-26 10:47:20 +00:00
jan.nijtmans dbcca14632 Fix [a73c79081e]: Doc fix in tcl.h, by not suggesting wchar_t any more for Tcl_UniChar. 2021-05-26 10:45:17 +00:00
jan.nijtmans 9d13d5e64b One more macos-11.0 -> macos-11 2021-05-26 10:01:11 +00:00
jan.nijtmans 1233589701 Merge 8.6 2021-05-26 09:57:58 +00:00
jan.nijtmans cd326bf172 macos-11.0 -> macos-11 2021-05-26 09:56:44 +00:00
dgp b6d01a333a merge 8.7 2021-05-25 13:15:32 +00:00
jan.nijtmans 6ef2d21d52 Merge 8.6 2021-05-25 09:38:06 +00:00
jan.nijtmans e7ff6cacbc Fix [3f9b4e0c81]: CrtObjCmd.3, NRE.3, SplitList.3: constify cmdName, list
(actually quite a few more where the documentation didn't match the header files ....)
2021-05-25 09:30:20 +00:00
jan.nijtmans 08902d8a97 Fix [https://core.tcl-lang.org/tk/info/8b679f597b1d17ad|8b679f597b] for Tcl too: LIB_RUNTIME_DIR could contain multiple paths, DYLIB_INSTALL_DIR cannot handle that 2021-05-25 09:10:51 +00:00
jan.nijtmans a4006968d9 Fix [https://core.tcl-lang.org/tk/info/8b679f597b1d17ad|8b679f597b] for Tcl too: LIB_RUNTIME_DIR could contain mulitple paths, DYLIB_INSTALL_DIR cannot handle that 2021-05-25 08:59:15 +00:00
jan.nijtmans d6aac61b03 merge-mark 2021-05-21 07:19:11 +00:00
jan.nijtmans 703055871b Make all "pkg?" package names lowercase (was: ""Pkg?"), as we now recommend lowercase package names. Let's provide good examples then. 2021-05-21 07:07:21 +00:00
dgp 500d59bd30 merge 8.7 2021-05-20 19:08:47 +00:00
jan.nijtmans fd0aa4c0fc Merge 8.6, except [688fcc7082] because it gives a merge conflict 2021-05-20 12:35:19 +00:00
jan.nijtmans 3a1e408464 Make all "pkg?" package names lowercase (was: ""Pkg?"), as we now recommend lowercase package names. Let's provide good examples then. 2021-05-20 12:26:27 +00:00
jan.nijtmans d80a12f061 Fix [52cc90776c]: Warning when compile with gcc v9.3.0 2021-05-20 12:21:33 +00:00
dgp 1368d760bc merge 8.7 2021-05-19 14:57:55 +00:00
pooryorick 9b49520dc2 fix for [e39cb3f462631a99], namespace is removed from other namespace paths
before deletion is complete
2021-05-19 10:46:54 +00:00
pooryorick 0f48a8bc92 update documentation and macro names 2021-05-19 10:44:18 +00:00
pooryorick 93e207f19d new test for issue [e39cb3f462631a99], namespace is removed from other
namespace paths before deletion is complete
2021-05-19 07:15:10 +00:00
pooryorick a201f0f383 Fix for issue [e39cb3f462631a99], namespace is removed from other namespace
paths before deletion is complete
2021-05-18 22:09:41 +00:00
jan.nijtmans 1c9f5c8741 Make pkgua package thread-safe 2021-05-18 12:23:32 +00:00
jan.nijtmans 39ef112133 Make Pkgua package thread-safe and properly clean up everything when being unloaded. Based on pyk-tclUnload branch, but extended for thread-safety (Thanks!) 2021-05-18 12:02:55 +00:00
pooryorick f14d3b58cf Fix [28027d8bb7745fb0], memory leaks in tclUnload.c . 2021-05-18 10:58:18 +00:00
pooryorick 0187ddfaf3 merge 8.7 2021-05-18 10:51:33 +00:00
pooryorick 9649c9074c Break TclDeleteNamespaceChildren out of TclTeardownNamespace. 2021-05-18 10:36:11 +00:00
pooryorick 05b875c564 Remove unneeded cmdPtr increment and decrement. 2021-05-18 10:25:47 +00:00
pooryorick d3e0d5789c Remove the refCount increment that accompanied the decrement removed in the
last commit.
2021-05-18 10:24:17 +00:00
pooryorick 11b101cd27 Additional test for [688fcc7082fa99a4], imported command trace memory error. 2021-05-18 06:03:40 +00:00
pooryorick 5bdefd0c25 Remove unnecessary refCount decrement. 2021-05-17 21:34:25 +00:00
pooryorick a8516aa629 Fix for [688fcc7082fa99a4], trace on imported alias deletes alias and then
calls import and triggers memory error.
2021-05-17 21:30:57 +00:00
pooryorick d9bbe48c46 Additional test for [688fcc7082fa99a4]. 2021-05-17 21:29:25 +00:00
jan.nijtmans 12502ae524 Eliminate "unused parameter" warning 2021-05-17 11:49:26 +00:00
jan.nijtmans 932e04d6db Merge 8.6 2021-05-17 11:35:43 +00:00
jan.nijtmans 962b2df00b Eliminate use of TCL_STORAGE_CLASS in pkg?.c: just use DLLEXPORT macro directly.
Fix gcc warnings (with stricter gcc flags) in pkg?.c
2021-05-17 11:28:51 +00:00
pooryorick d4d8fe187b use [info sharedlibextension] for instead of ".so" 2021-05-17 07:39:20 +00:00
pooryorick e4e1451d4a Break TclDeleteNamespaceChildren out of TclTeardownNamespace. 2021-05-16 19:09:47 +00:00
pooryorick 3634214bbb Eliminate compiler warnings about unused parameters. 2021-05-16 10:03:55 +00:00
pooryorick 7ee82af4aa Fix [28027d8bb7745fb0], memory leaks in tclUnload.c, 2021-05-15 21:56:03 +00:00
pooryorick e7d3979e0a Delete associated data after running Tcl_InterpDeleteProc instead of before. Remove redundant/cyclic call to Tcl_DeleteAssocData. 2021-05-15 19:04:09 +00:00
pooryorick 1134511a98 When deleting an interp, delete associated data after running the corresponding
Tcl_InterpDeleteProc instead of before to allow the Tcl_InterpDeleteProc to
make use of the data.

In TcltestObj.c/VarPtrDeleteProc, remove call to Tcl_DeleteAssocData that is
redundant and cylic.
2021-05-15 18:42:40 +00:00
pooryorick 71008a6aa8 Add valgrind option --keep-deguginfo=yes 2021-05-15 18:27:20 +00:00
pooryorick 0f818acbb7 Add valgrind option --keep-deguginfo=yes 2021-05-15 18:24:59 +00:00
pooryorick 4bd04113a8 merge core-8-branch 2021-05-15 10:10:04 +00:00
fvogel 6a484fdaef Fix errors in man pages build 2021-05-15 09:32:23 +00:00
fvogel 4c055148da Fix errors in man pages build 2021-05-15 09:31:45 +00:00
pooryorick 2174632a4b Fix for issue [463b7a93be0a2ddd], Tcl_Unload, make gdb-test, segmentation fault. 2021-05-15 09:09:42 +00:00
pooryorick 60a9b8775d Merge bug-fb2a411b91973d3b. 2021-05-15 09:07:08 +00:00
pooryorick 0d6bc7fc83 Separate library unloading routine from [unload] command processing. 2021-05-15 07:55:55 +00:00
pooryorick 7d899dfff0 Fix more leaks in tclZipfs.c. Valgrind now reports no more leaks in tclZipfs.c 2021-05-14 20:58:14 +00:00
pooryorick 2fea9a2bbd Fix more leaks in Zipfs finalization. 2021-05-14 20:49:34 +00:00
pooryorick 7987c596f2 Fix for issue [463b7a93be0a2ddd], Tcl_Unload, make gdb-test, segmentation fault 2021-05-14 18:50:33 +00:00
jan.nijtmans 9fecbcc106 Respect TIP #587 in dde test-cases. 2021-05-14 13:54:50 +00:00
jan.nijtmans ad6b4e6f8f Backout [217391dc7f] and [b05e314d7a]. For the reason, see: [https://github.com/tcltk/tcl/runs/2573477656?check_suite_focus=true]: Test file error: alloc: invalid block: 0x558a6e095990: 20 6e 2021-05-13 17:47:41 +00:00
pooryorick 737753205d Fix quoting issues in gdb-test and lldb targets. 2021-05-13 15:22:50 +00:00
pooryorick 7caa74e545 Fix remaining leaks in Zipfs finalization. 2021-05-13 12:49:23 +00:00
pooryorick f87cb71e7a On exit deallocate up some memory allocated in ZipFS. 2021-05-12 21:08:49 +00:00
dgp 65df3cd9fe Merge 8.7 2021-05-07 13:40:29 +00:00
jan.nijtmans 7cf2f6d102 Better error-message "illegal byte sequence" when trying to read from invalid/incomplete UTF-8 2021-05-07 12:27:27 +00:00
jan.nijtmans ed61282e22 Remove TODO comment which is already done 2021-05-07 11:01:49 +00:00
jan.nijtmans 75afeeeffa Merge 8.6 2021-05-06 15:06:50 +00:00
jan.nijtmans 6607e4e824 Handle POSIX error EILSEQ: "invalid byte sequence" 2021-05-06 15:04:40 +00:00
oehhar eb45f86b3f Ticket[535705]: encoding manpage example is about outdated source command. It is replaced by a simple example. 2021-05-06 12:53:52 +00:00
oehhar b72fcddfe2 Ticket[535705]: encoding manpage example is about outdated source command. It is replaced by a simple example. 2021-05-06 12:50:38 +00:00
dgp d261590825 merge 8.7 2021-05-03 20:36:15 +00:00
dgp 713ea0845e Bump to version 8.7a5 for release. 2021-05-03 20:33:07 +00:00
jan.nijtmans e2a1c2f11c Merge 8.6 2021-05-03 19:44:49 +00:00
jan.nijtmans 6f6229ef6e Fix [24b9181478]: Fix unsafe buffer lifetime 2021-05-03 19:42:03 +00:00
jan.nijtmans 7476029a04 Fix [24b9181478]: Fix unsafe buffer lifetime 2021-05-03 19:36:22 +00:00
jan.nijtmans 471313fea0 TIP #597: "string is unicode" and better utf-8/utf-16/cesu-8 encodings 2021-04-30 07:20:06 +00:00
jan.nijtmans a3201caebd unofficial -> snapshot 2021-04-29 12:30:30 +00:00
jan.nijtmans 9cf2b1031b Merge 8.7 2021-04-29 09:58:44 +00:00
jan.nijtmans c5e9409992 Prevent compiler warning 2021-04-29 09:58:08 +00:00
jan.nijtmans 2e4a20524c Merge 8.7 2021-04-29 09:54:42 +00:00
jan.nijtmans d4ed243e68 Unbreak build with -DTCL_NO_DEPRECATED 2021-04-29 09:51:54 +00:00
jan.nijtmans 4c5c001bc8 Merge 8.7 2021-04-28 14:30:11 +00:00
pooryorick 71dcf14194 Add test for upvar a linked variable to itself. 2021-04-28 14:01:22 +00:00
jan.nijtmans ce299372a0 CONST86 -> const 2021-04-28 13:04:27 +00:00
jan.nijtmans ef9154f143 Rename TclSetPreInitScript() to Tcl_SetPreInitScript(). Tiny part of TIP #596, the only part meant for 8.7. 2021-04-28 12:42:17 +00:00
pooryorick c7fcbf756c Make tcltests.tcl continue to function even if tclTest.c isn't available. 2021-04-27 10:48:58 +00:00
pooryorick 81d499ea31 Fix for io-28.6. 2021-04-26 23:06:14 +00:00
pooryorick 4de3a63efd Fix typo in tcltests.tcl. 2021-04-26 23:02:14 +00:00
pooryorick b6d1ba3fdb Fix typo in tcltests.tcl. 2021-04-26 23:01:03 +00:00
pooryorick 28437b46c3 Add io-28.6 an io-28.7 to test closing a channel within a channel event
handler.
2021-04-26 22:53:42 +00:00
pooryorick 4fa09fa5d6 merge pyk-tcltests 2021-04-26 22:52:22 +00:00
pooryorick f2e08d25db Add test constaints "debug", "purify", and "debugpurify" 2021-04-26 22:48:15 +00:00
dkf 42a77f7b4b Document our reference count management 2021-04-25 20:22:05 +00:00
dkf 9bf722e8da Documenting our reference count management 2021-04-25 20:21:07 +00:00
dkf 5003483b1d Documenting our reference count management 2021-04-25 15:24:14 +00:00
dkf c1cc3a7238 Documenting our reference count management 2021-04-25 13:58:22 +00:00
pooryorick 5a5cb4c044 Fix for issue [f6fbc71cd160d779], with "make valgrind", safe-zipfs-5.5 fails
with the error, 'can't set "path": variable is array'
2021-04-25 13:24:09 +00:00
dkf 4aa680d80d Documenting our reference count management 2021-04-25 12:01:10 +00:00
dkf b63d1213ed Documenting our reference count management 2021-04-25 11:20:35 +00:00
dkf 2453c29945 Documenting our reference count management 2021-04-25 10:56:32 +00:00
dkf 8a32e272a4 Documenting our reference count management 2021-04-25 07:44:59 +00:00
dkf c1a1d841e7 Documenting our reference count management 2021-04-24 20:07:57 +00:00
dkf ae32db3ffa Documenting our reference count management 2021-04-24 12:51:07 +00:00
dkf bd778f8dd4 Documenting our reference count management 2021-04-24 11:24:23 +00:00
dkf 103d88f85a Documenting our reference count management 2021-04-24 09:04:19 +00:00
dkf aa6c33b39d Start of documenting our reference count management 2021-04-23 20:24:00 +00:00
jan.nijtmans 52b58d0c7d Merge 8.6 2021-04-21 09:27:04 +00:00
jan.nijtmans 93b4c9bd6b Fix default-pkgindex rule in makefile.vc, for generation of TEA extensions for Tcl 9 (see: TIP #595) 2021-04-21 09:24:10 +00:00
jan.nijtmans cfdc6e47f4 Unbreak Windows build (windows 32-bit only, not checked by GITHUB actions) 2021-04-21 08:43:03 +00:00
pooryorick bc8789e840 Fix for [1f4af0a127369d4a1], tclZipfs storage cleanup issue. 2021-04-20 19:33:57 +00:00
pooryorick 14ead72e1a Fixes for Valgrind issues similar to [ec06d0db3225afca]. 2021-04-20 13:45:27 +00:00
pooryorick a6e0a802ec Fix for issue [ec06d0db3225afca]. 2021-04-20 10:29:16 +00:00
jan.nijtmans 830d7561f9 Merge 8.6 2021-04-19 16:34:54 +00:00
jan.nijtmans 6f8c6e12dd Complete TIP #595 for rules.vc 2021-04-19 16:27:30 +00:00
jan.nijtmans 6f23bf98b4 Remove unused testConstraint 2021-04-19 12:50:20 +00:00
jan.nijtmans 3bfe6dba24 More testcases (cesu-8) 2021-04-19 07:24:18 +00:00
jan.nijtmans 82d0339a65 renumber testcases 2021-04-16 20:45:56 +00:00
jan.nijtmans 3c9c7e0621 Remove wtf-8/wtf-16/tcl-8 encodings 2021-04-16 20:34:33 +00:00
jan.nijtmans 8f67ae04ad Merge 8.6 2021-04-16 13:16:25 +00:00
jan.nijtmans baa813085d Document Tcl_GetMemoryInfo() and Tcl_MainEx()/Tcl_MainExW(). Backported from [063d44b0beea237e] (Thanks, Harald!) 2021-04-16 13:14:55 +00:00
jan.nijtmans e06feb86b1 Document Tcl_GetMemoryInfo(). Backported from [063d44b0beea237e] (Thanks, Harald!) 2021-04-16 12:58:47 +00:00
jan.nijtmans 3ec8472d74 Revert [e59df7e9a3]: after a better look, the original code respected the expectation better and doesn't force appendObjPtr to Unicode, so it was actually better 2021-04-15 12:43:36 +00:00
jan.nijtmans 8a0a2779c2 Merge 8.6 2021-04-15 09:09:19 +00:00
jan.nijtmans 1c6fae0193 Fix [85d1fa7d07]: Duplicate file extension check in [file executable] on Windows 2021-04-15 09:08:23 +00:00
jan.nijtmans 871fc208e1 Fix [85d1fa7d07]: Duplicate file extension check in [file executable] on Windows. It looks like checking for "ps1" is a mistake. 2021-04-15 09:06:13 +00:00
jan.nijtmans 374f5c6e1a Restore expectation of callers to Tcl_AppendObjToObj that the appendObj never shimmers 2021-04-15 06:37:56 +00:00
dgp fc702f65d2 merge 8.6 2021-04-14 19:19:44 +00:00
jan.nijtmans 60169c7187 Restore expectation for Tcl_AppendObjToObj() 2021-04-14 19:15:52 +00:00
dgp 9cb33ddcc5 merge 8.5; adapt fix for 8.6 2021-04-14 18:58:54 +00:00
dgp c942ef369b [26649439c7] EIAS bug in [concat] 2021-04-14 18:39:12 +00:00
dgp bf055cc0d8 Bug fix 2021-04-14 18:37:35 +00:00
dgp 32a76688f6 Test demonstrating bug [26649439c7]. 2021-04-14 18:23:07 +00:00
jan.nijtmans e83fde690f Merge 8.7 2021-04-14 08:40:16 +00:00
jan.nijtmans ccfe3f47fd Complete fix for [7f1162a867]. Re-enable compilation of "string cat" (TclCompileStringCatCmd), since it now works again. 2021-04-14 08:14:23 +00:00
pooryorick c993263332 Remove unnecessary reference counting. 2021-04-13 22:44:04 +00:00
jan.nijtmans 28ddee7d18 Merge-mark 8.6. Missing/superflouous testConstraint 2021-04-13 13:48:53 +00:00
jan.nijtmans 0b6db319f0 Update to latest "rules.vc" 2021-04-13 13:44:33 +00:00
jan.nijtmans 845442b102 Merge 8.7 2021-04-13 11:51:58 +00:00
jan.nijtmans c89d776dce Fix testcase utf-1.18 2021-04-13 11:51:16 +00:00
jan.nijtmans 4ef5cbaad7 Merge 8.7 2021-04-13 10:18:40 +00:00
jan.nijtmans 09b6123a09 Merge 8.6. More missing ::tcltest::loadTestedCommands 2021-04-13 10:16:31 +00:00
jan.nijtmans 06464aa3be Missing ::tcltest::loadTestedCommands 2021-04-13 10:01:37 +00:00
jan.nijtmans f23820c00b Missing ::tcltest::loadTestedCommands 2021-04-13 09:13:58 +00:00
jan.nijtmans 87508b74e0 missing constraint 2021-04-13 08:20:54 +00:00
jan.nijtmans 16ddac314c eol-spacing 2021-04-13 08:15:50 +00:00
jan.nijtmans 85469e495c Merge 8.7 2021-04-13 08:08:23 +00:00
jan.nijtmans 9f61e10cf9 Unbreak build 2021-04-13 08:05:45 +00:00
jan.nijtmans 05fa595fc5 Merge 8.7 2021-04-13 07:22:56 +00:00
dkf a396843006 Zero out memory allocated on stack 2021-04-12 19:12:29 +00:00
jan.nijtmans c614920819 Fix [f566e1c817]: macOS: -DTCL_NO_DEPRECATED 2021-04-12 15:33:08 +00:00
jan.nijtmans 051a1473cb Merge-mark 2021-04-12 10:06:11 +00:00
jan.nijtmans 571eeda5cf Merge 8.5 2021-04-12 10:05:31 +00:00
jan.nijtmans cf9fc355f8 Backport utf testcase tweaks from 8.7. No change for ucs-2 2021-04-12 10:04:46 +00:00
jan.nijtmans 72fd932a99 Merge 8.7 2021-04-12 09:37:20 +00:00
jan.nijtmans 7deb6f2082 Fix [7f1162a867]. Don't compile "string cat" any more, since there still is a bug in it, demonstrated by utf-1.18 testcase 2021-04-12 09:26:27 +00:00
jan.nijtmans b1e4f0fa23 Merge 8.7 2021-04-09 15:35:17 +00:00
jan.nijtmans 42b705be81 merge-mark 2021-04-09 15:34:45 +00:00
jan.nijtmans c318d73bd3 Document that Tcl 8.7 no longer uses a (modified) CESU-8 as internal format, but a (modified) WTF-8. 2021-04-09 15:32:25 +00:00
jan.nijtmans aa4f7bcd47 Deprecate/remove "string bytelength" 2021-04-09 15:19:51 +00:00
jan.nijtmans 1f4a8eb5d1 Merge 8.7 2021-04-09 14:43:34 +00:00
jan.nijtmans 459073607d Fix TclStringCat() functions. This makes allmost all testcases pass, one left to go: utf-1.18 2021-04-09 13:01:19 +00:00
jan.nijtmans 0d7132ebb2 Rename macro to ISCONTINUATION() 2021-04-09 10:57:36 +00:00
jan.nijtmans 2e06c053b4 new macro ISCONTBYTEORLOWERSURROGATE() 2021-04-09 09:14:10 +00:00
jan.nijtmans 4f93205802 Fix append-3.4, append-3.7 and utf-1.18 testcases 2021-04-09 07:33:40 +00:00
jan.nijtmans 023286a7fd Merge 8.7 2021-04-09 06:37:14 +00:00
jan.nijtmans 7bb103b64e More test-cases, involving \xC0 \x80 2021-04-09 06:36:45 +00:00
jan.nijtmans 3ed1f7b055 Remove TclpCreateFileHandler/TclpDeleteFileHandler on windows. The linker should complain when even trying to create something calling those functions. 2021-04-08 12:29:49 +00:00
jan.nijtmans 67e4ed2290 TIP #598: export TclWinConvertError 2021-04-08 12:22:16 +00:00
jan.nijtmans e287e35105 Fix compiler warning when using select notifier 2021-04-08 11:36:19 +00:00
jan.nijtmans 2e7b2436f1 Add "tcl-8" encoding 2021-04-08 11:14:56 +00:00
jan.nijtmans c7711541ec Merge 8.7 2021-04-08 08:56:38 +00:00
jan.nijtmans 0b8bd54063 Merge 8.6 2021-04-08 08:47:18 +00:00
jan.nijtmans a463bf5525 Backport dde 1.4.4 from Tcl 8.7. Doesn't conflict with installed Tcl 9.0 version of dde any more.
(don't bother doing this for the "registry" extension, because the Tcl 8.7+ version installs in a different directory)
2021-04-08 08:45:12 +00:00
jan.nijtmans 6c72d33ef1 Make "registry" and "dde" dll's for 8.x and 9.0 installable in the same directory. See TIP #595 2021-04-08 07:56:45 +00:00
jan.nijtmans ee577ebd90 There is no "eq" command any more 2021-04-07 12:38:56 +00:00
jan.nijtmans 2b508d7964 Merge fork 2021-04-07 12:30:56 +00:00
jan.nijtmans 0dcddf9cf0 More test-cases showing the bug 2021-04-07 12:30:33 +00:00
jan.nijtmans 79fd04384a A few more Package -> Library renamings (testcases only) 2021-04-07 11:50:03 +00:00
jan.nijtmans 6792b8a53c A few missing renamings 2021-04-07 10:44:29 +00:00
jan.nijtmans 06813163a8 TIP #595 (for Tcl 8.7) part 1: just rename Tcl_StaticPackage to Tcl_StaticLibrary, Tcl_PackageInitProc to Tcl_LibraryInitProc and Tcl_PackageUnloadProc to Tcl_LibraryUnloadProc. Adapt documentation, mentioning that the old names are now deprecated. 2021-04-07 09:55:24 +00:00
jan.nijtmans a1ab68d1ea Revert previous commit, and add comments why it's wrong. 2021-04-07 09:01:55 +00:00
jan.nijtmans c6799de46b Merge 8.7 2021-04-06 09:08:54 +00:00
pooryorick 83025a44e0 Replace simple refCount decrement with the proper decrementing function. 2021-04-05 21:07:00 +00:00
jan.nijtmans 85d1500c50 tclZipfs.c:1857:33: warning: request for implicit conversion from ‘void *’ to ‘char *’ not permitted in C++ [-Wc++-compat] 2021-04-05 17:58:13 +00:00
jan.nijtmans 15b5f31caf Rename exported symbol "Tcl_StaticPackage" to "Tcl_StaticLibrary". Still undocumented, to be formalized by TIP #595. Tcl_StaticPackage() still works the same 2021-04-04 16:56:26 +00:00
jan.nijtmans 226bb13f4e Fix [https://github.com/tcltk/tcl/runs/2263266926|failing test-cases] with --enable-symbols=mem build by reverting the series of commits that caused the memory-leak 2021-04-04 14:31:43 +00:00
pooryorick 7f4cc308f3 Update code comments. 2021-04-03 17:58:03 +00:00
pooryorick 42c960506d Changes to code comments. 2021-04-03 13:20:14 +00:00
pooryorick 970479b4ee When a namesapce is deleted delete all namespaces under it before making any
modifictions to it.
2021-04-03 12:48:54 +00:00
pooryorick 55f8e3ac01 Remove suspected inadvertent copypasta from test. 2021-04-03 12:36:10 +00:00
pooryorick c494f8045e Use TclCleanupCommandMacro instead of just decrementing the reference count. 2021-04-03 12:33:58 +00:00
pooryorick 756e0c234a OO cleanup fix that passes test 11.7. 2021-04-03 12:33:00 +00:00
pooryorick 1c4c352fe9 New test for OO cleanup: routine for object gets deleted before namespace deletion
is complete.
2021-04-03 12:17:40 +00:00
dkf 743881d3ce Clean up the notifier code to not spread the hooks quite so widely 2021-04-03 11:09:47 +00:00
dkf 3628bed3ba Don't do double definition; code was moved to tclInt.h previously. 2021-04-02 18:41:36 +00:00
jan.nijtmans 4b405eefc8 Merge 8.7 2021-04-01 10:34:31 +00:00
jan.nijtmans d1bd0f28ef Merge 8.6 2021-04-01 10:19:56 +00:00
jan.nijtmans e5991250e0 Follow-up to [15c7b4f93e]: "Implement TCL_ENCODING_STOPONERROR flag for UtfToUtf encoder/decoder". Only do this check when pureNullMode == 0, otherwise we violate EIAS. 2021-04-01 09:47:33 +00:00
dkf 55bb44b8be Forgot a place to #ifndef out 2021-04-01 08:18:38 +00:00
dkf 5ca6887e66 Don't define Tcl_CreateFileHandler or Tcl_DeleteFileHandler on Windows. 2021-03-31 10:45:40 +00:00
dkf 4c25696376 merge core-8-branch 2021-03-31 10:38:25 +00:00
jan.nijtmans 9406745440 Add 3 undocumented #defines. To be formalized by TIP #595 (currently being voted on) 2021-03-31 10:09:32 +00:00
jan.nijtmans 6b90b986b2 Fix testcase for TCL_UTF_MAX=4 2021-03-31 06:53:27 +00:00
jan.nijtmans 3175cb43a5 Re-use TCL_ENCODING_MODIFIED flag value for TCL_ENCODING_LE too, since they are used for different encoders. 2021-03-31 06:40:02 +00:00
jan.nijtmans 9b5af56932 RFE 4b4830eb54: reflected channel truncate method 2021-03-30 16:30:31 +00:00
jan.nijtmans 48a57e0116 Bugfix (backported from encodings-with-flags branch): Use correct byte/char positions in error-situation 2021-03-30 14:14:02 +00:00
jan.nijtmans 269722c410 Merge 8.7 2021-03-30 13:39:22 +00:00
dkf 107f7173d2 Improve documentation for exec and open, especially in relation to binary pipelines 2021-03-30 10:17:09 +00:00
dkf 73953be8b1 Improve documentation for exec and open, especially in relation to binary pipelines 2021-03-30 10:14:20 +00:00
dkf 63f4be3aa2 Improve documentation for exec and open, especially in relation to binary pipelines 2021-03-30 09:03:19 +00:00
jan.nijtmans 0b884f11fa Merge 8.7 2021-03-30 09:01:16 +00:00
dkf 2dab8fa488 Refactoring, ahoy 2021-03-30 08:22:26 +00:00
jan.nijtmans 1f1f43fcd2 Thanks to TIP #587, convert many escapes in the testcases into the actual (UTF-8) character. 2021-03-30 07:11:18 +00:00
jan.nijtmans c8617b374b merge-mark 2021-03-30 06:12:18 +00:00
jan.nijtmans 9eb5b14a3c remove useless save/restore 2021-03-30 06:10:23 +00:00
jan.nijtmans 958892fdd0 Finish CESU-8 encoder/decoder 2021-03-29 09:51:54 +00:00
jan.nijtmans 1806e5755f Make a start with CESU-8 encoder/decoder. Not finished yet 2021-03-28 22:01:51 +00:00
jan.nijtmans ce82e0c22d Merge 8.7 2021-03-28 21:03:48 +00:00
jan.nijtmans 79b9ab1039 Change TCL_ENCODING_EXTERNAL flag into TCL_ENCODING_MODIFIED, but with opposite meaning. Simplify code. 2021-03-28 20:09:51 +00:00
jan.nijtmans 6c6a470c2b Rename MODULESCOPE TclGetLoadedPackagesEx() to TclGetLoadedLibraries() 2021-03-22 17:07:01 +00:00
jan.nijtmans 3b6d7d6119 merge-mark 2021-03-22 10:08:10 +00:00
jan.nijtmans 0f632bd1c5 Merge 8.5 2021-03-22 10:06:36 +00:00
jan.nijtmans d63f456a83 Fix incorrect comment: underscore ('_') is allowed in a packageName 2021-03-22 10:04:12 +00:00
jan.nijtmans 9e6945739a Rename internal variables, making it more clear that tclLoad.c is not part of Tcl's "package" mechanism. 2021-03-22 10:00:06 +00:00
dkf c49b98fa6b Start of doing a clean up of the notifier code.
This originated as trying to stop macOS builds from doing silly warnings during
a static build, but I noticed that there were common patterns that belong in
generic code instead of being repeated in each of the platform-specific pieces.
2021-03-21 13:07:15 +00:00
jan.nijtmans 8a9eba41a2 merge-mark 2021-03-21 09:30:06 +00:00
jan.nijtmans dd9f3c1246 Implement TCL_ENCODING_STOPONERROR flag for UtfToUtf encoder/decoder. Backported from 8.7 2021-03-21 09:27:07 +00:00
jan.nijtmans 4e90ccc6db Fix [0221b993a1]: Tcl command [update idletasks] doesn't skip main loop in Tcl_DoOneEvent 2021-03-19 14:55:25 +00:00
jan.nijtmans d5479489aa Fully implement TCL_ENCODING_STOPONERROR flag for Utf2Utf encoder/decoder. 2021-03-19 12:58:41 +00:00
jan.nijtmans c39345b47a Merge 8.6 2021-03-19 10:49:13 +00:00
jan.nijtmans fff5060d94 Change Tcl_StaticPackage's "pkgName" argument to "prefix" and improve documentation, describing better what this argument does. 2021-03-19 09:20:26 +00:00
dkf f2cb38dda9 Handle the encoding of filenames in ZIPs correctly. (This is awful. The awful isn't Tcl's fault. Terrible spec...) 2021-03-18 21:35:09 +00:00
dkf e6d6e2962d Delete some useless code. Was only place where we fed an uncontrolled value to %f, and it was actually a conversion we didn't need to do at all. 2021-03-18 21:17:46 +00:00
jan.nijtmans 80af639d39 Merge 8.6 2021-03-18 14:49:01 +00:00
jan.nijtmans 8390478dbf Fix [8663689908]. Final documentation fix, implementation was already fixed earlier. 2021-03-18 14:46:57 +00:00
jan.nijtmans 2b7eb65f53 Suggested fix for [0221b993a1]: Tcl command [update idletasks] doesn't skip main loop in Tcl_DoOneEvent 2021-03-18 13:20:47 +00:00
jan.nijtmans 260c7e595a Merge 8.6 2021-03-18 12:07:38 +00:00
jan.nijtmans a3ae9d7e57 Fix [2860859e84]: Misleading description in README file 2021-03-18 12:05:56 +00:00
jan.nijtmans 8df980fc3e Merge 8.6 2021-03-18 09:51:49 +00:00
jan.nijtmans 3aa4b20ea8 Remove incorrect/useless comment 2021-03-18 09:36:27 +00:00
jan.nijtmans 6da553ec22 Proposed implementation of RFE [4b4830eb54] 2021-03-18 09:26:03 +00:00
jan.nijtmans c84e03a7a8 More simplification of UtfToUtfProc(). Get rid of wrapper functions UtfIntToUtfExtProc/UtfExtToUtfIntProc. This can be handled by additional flags. 2021-03-18 09:12:18 +00:00
jan.nijtmans 4b3814f752 Simplify UtfToUtfProc() and UtfToUtf16Proc(): Using TclUtfToUCS4() internally means that we don't have to keep track of internal state any more (Tcl_EncodingState)
Also, add (HMODULE) cast (back) in tclZipfs.c
2021-03-17 15:01:54 +00:00
jan.nijtmans 74f570670c Add wtf-16 encodings to the set. With testcases 2021-03-17 12:46:31 +00:00
jan.nijtmans 9d25ea9cd7 Merge 8.7 2021-03-17 12:04:05 +00:00
jan.nijtmans 15849c859a Fix MSVC build 2021-03-17 08:50:28 +00:00
dkf 90040e0573 More cleaning up of zipfs
Don't put straight binary data in a Tcl string, and other better API uses.
2021-03-16 20:45:39 +00:00
jan.nijtmans 0013597b33 Fix gcc warnings 2021-03-16 09:16:39 +00:00
jan.nijtmans c54d29df06 Tweak usage of TCL_NO_DEPRECATED 2021-03-15 13:17:54 +00:00
jan.nijtmans 6e657cfb83 Implement TIP #575: Switchable Tcl_UtfCharComplete()/Tcl_UtfNext()/Tcl_UtfPrev() 2021-03-15 11:52:09 +00:00
dkf 57bf9fe12f More refactoring to reduce the choked-up complexity of tclZipfs.c 2021-03-15 09:52:02 +00:00
dkf 1f2858fefd Flipped a test 2021-03-14 20:53:39 +00:00
jan.nijtmans 2d6586915f merge-mark 2021-03-14 18:28:47 +00:00
jan.nijtmans a132514652 Merge 8.5 2021-03-14 16:13:44 +00:00
jan.nijtmans b0e0d4b618 Document that Tcl_UtfCharComplete() can (now) be used to protect Tcl_UtfNext() calls against overflow, if the string being handled is not NULL-terminated. 2021-03-14 16:12:25 +00:00
dkf 58fb98d8a9 More on making tclZipfs.c comprehensible. Refactoring to the rescue! 2021-03-14 15:26:44 +00:00
jan.nijtmans be3426d527 merge-mark 2021-03-11 12:20:11 +00:00
jan.nijtmans 2ea2ef0609 Backport Tcl_UtfCharComplete() functionality from 8.6 for TCL_UTF_MAX>3. This makes Tcl_UtfCharComplete() usable to protect Tcl_UtfNext() calls for overflow. No change for TCL_UTF_MAX=3 (default build) 2021-03-11 12:19:14 +00:00
jan.nijtmans d0443e229f Merge 8.6 2021-03-10 16:16:08 +00:00
jan.nijtmans f223db50fd Repair Tcl_UniCharNcasecmp() in the same way as Tcl_UniCharNcmp() for fix [4c591fa487]. Also put back minor optimization for big-endian machines removed in the previous commit 2021-03-10 16:12:01 +00:00
jan.nijtmans 07c6dc0d49 Merge 8.6 2021-03-10 15:47:34 +00:00
jan.nijtmans 0834bb4547 Fix [4c591fa487]: [string compare] EIAS violation 2021-03-10 15:39:15 +00:00
jan.nijtmans b51e777fe9 Fix documentation 2021-03-10 15:00:44 +00:00
jan.nijtmans a5a30fa3e2 TIP #597 implementation: "string is unicode" and new wtf-8 encoding 2021-03-10 12:55:25 +00:00
jan.nijtmans 50b24193de Compatibility tweak wrt 8.6 2021-03-09 15:38:06 +00:00
jan.nijtmans a2b56f4c74 TclWinConvertError -> Tcl_WinConvertError 2021-03-09 15:28:40 +00:00
jan.nijtmans 0255b9c343 Merge 8.7 2021-03-09 15:13:08 +00:00
jan.nijtmans 764ef9b409 Merge 8.6 2021-03-09 09:19:25 +00:00
jan.nijtmans 8aca3246ab Fix [8419c55e2c]: Tclsh read loop does not handle EINTR 2021-03-09 09:14:04 +00:00
jan.nijtmans c197ddb3b2 Merge 8.6. Remove end-of-line spacing 2021-03-09 08:37:47 +00:00
jan.nijtmans 3b584dd13f Remove end-of-line spacing 2021-03-09 08:36:11 +00:00
dkf 25bbbbf3ee Fix SEGV in zipfs mounting, and try to make that code more comprehensible 2021-03-08 16:53:51 +00:00
dkf b9bc37e2b8 Added some tests for [zipfs lmkimg] 2021-03-07 18:42:27 +00:00
dkf a1d8e47ea7 Document that [zipfs mkimg] strips an existing ZIP. We ought to merge instead, but we don't yet. 2021-03-06 16:28:43 +00:00
jan.nijtmans dd7f073e8b Merge 8.6 2021-03-04 16:10:29 +00:00
jan.nijtmans a085ffdd43 In man2html, use consistant color-names (6-char, uppercase), encoding (utf-8) and translation (lf) independant from platform 2021-03-04 15:53:15 +00:00
jan.nijtmans 063e006111 Merge 8.6 2021-03-04 10:36:23 +00:00
jan.nijtmans 19bfe564de Merge 8.5. Add unused stub table entries 2021-03-04 10:22:40 +00:00
jan.nijtmans 3f89004e37 Add some more unused entries to the stub table, keeping up with the table size increase of higher Tcl versions 2021-03-04 09:53:10 +00:00
jan.nijtmans bebf0454f6 cleanup genStubs.tcl, e.g. "==" -> "eq" and "!=" -> "ne". No change in output 2021-03-04 09:42:47 +00:00
jan.nijtmans 4355668c80 Merge 8.6. Basically re-number testcases so they align with the 8.6 test-cases 2021-03-03 15:06:08 +00:00
jan.nijtmans 5a2a021cd4 Merge 8.5. Just split some testcases 2021-03-03 14:44:03 +00:00
jan.nijtmans 6433d6a30b Backport improvements in UTF-8 handling for Tcl_UtfPrev/Tcl_UtfNext from 8.7 (through 8.6). No change for TCL_UTF_MAX=3. Adapt test-cases accordingly 2021-03-03 14:31:37 +00:00
jan.nijtmans ae9d23eae8 Merge 8.6 2021-03-02 10:59:25 +00:00
jan.nijtmans 773a30a541 Using 0xFC00 is more readable here than ~0x3FF. It's sufficient becauwe ch1 and ch2 are only 16-bit. Backported from 8.7 2021-03-02 10:53:30 +00:00
jan.nijtmans 895a4597bc Merge 8.6 2021-03-02 10:38:36 +00:00
jan.nijtmans b697c844ad Backport some UTF-8-related changed from 8.7 to 8.6, only for TCL_UTF_MAX > 3. No change for TCL_UTF_MAX=3.
Also adapt test-cases accordingly, and add comments why the changes were done.
2021-03-02 10:10:54 +00:00
oehhar 7c54d7ca1d Ticket [87082587c4]: typo in msgcat man page 2021-02-27 11:21:34 +00:00
oehhar 1ac55b7d3f Ticket [87082587c4]: typo in msgcat man page 2021-02-27 11:19:28 +00:00
jan.nijtmans 6293939296 Further internal variable upgrade from long -> size_t 2021-02-26 14:52:14 +00:00
jan.nijtmans a97e3eef6d Increase some (internal) variables from int/long to long/size_t. On the way to allow bigger blocks in the threaded allocator 2021-02-26 13:18:50 +00:00
jan.nijtmans d134d35fef Fix "make checkstubs": A few more MODULE_SCOPE libtommath functions 2021-02-24 11:56:53 +00:00
jan.nijtmans e5153a8d0c Fix typo, eliminate type-cast 2021-02-24 08:58:15 +00:00
jan.nijtmans 5c8ce61f79 Merge 8.6. Fix Cygwin compile 2021-02-23 13:30:01 +00:00
jan.nijtmans 4723df2a35 Merge 8.5 2021-02-23 13:03:28 +00:00
jan.nijtmans c0f6db4b81 Revise buffer-sizes used in GetModuleFileNameW() calls. Available buffer-size reported to GetModuleFileNameW() was not always accurate 2021-02-23 12:34:58 +00:00
jan.nijtmans 06ea55d820 Simplify implementation on Cygwin: No need to use CFG_RUNTIME_BINDIR any more 2021-02-23 10:08:46 +00:00
jan.nijtmans eb9f949b2c Merge 8.6 2021-02-23 07:39:34 +00:00
jan.nijtmans 8242d1a544 Use _wgetenv() in stead of getenv() on Windows: The wide environment is not always well-synchonized with the locale environment. Problem detected on the sebres-8-6-clock-speedup-cr2, but this branch only exposed the bug, it did not cause it. 2021-02-23 07:23:29 +00:00
jan.nijtmans e3afa12420 Merge 8.6 2021-02-19 07:20:52 +00:00
jan.nijtmans 7bfe776283 Fix [7c64aa5e1a]: Another uninitialized-variable bug in BRE-mode parsing. Thanks to Tom Lane for the bug-report and the fix 2021-02-19 07:20:06 +00:00
jan.nijtmans bdd6e3f4df Fix [7c64aa5e1a]: Another uninitialized-variable bug in BRE-mode parsing. Thanks to Tom Lane for the bug-report and the fix. 2021-02-19 07:18:13 +00:00
jan.nijtmans 185b0d1493 Merge 8.7 2021-02-18 12:35:44 +00:00
jan.nijtmans 345894cae9 Protect "interp limit" command better for allowed range in -millis and -seconds values 2021-02-18 12:01:44 +00:00
jan.nijtmans f4032799de Merge 8.6 2021-02-18 08:46:21 +00:00
jan.nijtmans 957890bf54 Two new testcases for abs() 2021-02-18 08:32:28 +00:00
jan.nijtmans f2c4a32d7f Performance optimization in TzsetIfNecessary() function. Cherry-picked from sebres-8-6-clock-speedup-cr2 branch 2021-02-18 07:55:08 +00:00
jan.nijtmans cf0af45b5a merge-mark 2021-02-17 18:51:12 +00:00
jan.nijtmans 042e9a4f8a Backport 3 additional test-cases from 8.6 for TCL_UTF_MAX>3 2021-02-17 18:48:47 +00:00
jan.nijtmans 28d58d74b0 Fix abs(-9223372036854775808) special-case on platforms where sizeof(Tcl_WideInt) > sizeof(int64_t). Theoretical, yes, but at least add a testcase for this (expr-38.14) 2021-02-17 16:16:19 +00:00
jan.nijtmans 6067ce5573 Fix compiler warning on non-intel CPU's 2021-02-17 15:44:24 +00:00
jan.nijtmans 39a8b9813a Multi-arch only works on MacOS-11 2021-02-17 13:07:18 +00:00
jan.nijtmans 467337387f Don't pack tcl_library/registry/pkgIndex in zip-file on UNIX 2021-02-17 09:41:46 +00:00
jan.nijtmans 6ee6cd1ae4 Fix "make dist" on UNIX, broken due to TIP #590 2021-02-17 08:50:17 +00:00
jan.nijtmans b3d34ad317 Another TIP #430 fix for cygwin: libtcl8.7.dll is installed in /usr/bin, not in /usr/lib as on other platforms 2021-02-17 08:35:44 +00:00
jan.nijtmans 499e962572 Don't try to use ln when creating libtcl.vfs on windows: It doesn't work for encodings or msg-files (anything on a deeper level) when zipping (at least not on cygwin) 2021-02-17 08:32:53 +00:00
jan.nijtmans 0b9b440ce0 Attempt to produce double-arch (x86_64 and arm) binary for MacOS 2021-02-16 13:59:08 +00:00
jan.nijtmans 8844e2789a Merge 8.7 2021-02-16 12:17:49 +00:00
jan.nijtmans 532506ea20 merge-mark 2021-02-16 12:10:00 +00:00
jan.nijtmans 5fd34b8806 Fix bug in previous commit: Don't update stringPtr->numChars when doing a "string reverse", because TclUtfToUCS4() doesn't count surrogate pairs as 2 2021-02-16 12:07:42 +00:00
jan.nijtmans bb836a3071 Merge 8.6 2021-02-16 12:00:21 +00:00
jan.nijtmans 999decddb3 Fix [22324bcbd]: string reverse is broken for Emoji. Thanks to Chrisian Werner for bug report and POC patch. 2021-02-16 11:11:23 +00:00
jan.nijtmans 3001f87063 Remove unnecessary end-of-line spacing in test-cases 2021-02-16 11:05:18 +00:00
jan.nijtmans 94c40f8b71 Merge 8.7 2021-02-16 09:11:54 +00:00
jan.nijtmans 635b0327a6 merge-mark 2021-02-16 09:03:59 +00:00
jan.nijtmans 4b639c1ec5 Fix Tcl_UtfPrev expected testcases for TCL_UTF_MAX>3 2021-02-16 09:00:14 +00:00
jan.nijtmans 5dc64243f3 Merge 8.6 2021-02-16 08:30:17 +00:00
jan.nijtmans d97e25b2ad Fix Tcl_UtfPrev for TCL_UTF_MAX>3, so it can jump back over Emoji. Backported from 8.7, no change for TCL_UTF_MAX=3.
This way, the previous fix can be slightly more simplified, and working for TCL_UTF_MAX>3 too.
2021-02-16 08:10:34 +00:00
culler 3eb07e538c Switch to version 1.3 of macher for the onefiledist 2021-02-15 17:06:47 +00:00
jan.nijtmans cb794e731c Merge 8.6 2021-02-15 16:20:40 +00:00
jan.nijtmans c6e348a28b Fix [d43f96c1a8]: string trimright is broken for Emoji 2021-02-15 16:13:15 +00:00
jan.nijtmans b4660a7ff9 Remove unused variable in win32 static build 2021-02-15 15:41:55 +00:00
jan.nijtmans 3bbf07a495 Merge 8.6 2021-02-15 12:42:09 +00:00
jan.nijtmans 13b1a0635f More testcases from Christian Werner, regarding "string reverse" with Emoji. Those testcases fail in all Tcl 8.6.x releases. 2021-02-15 12:35:33 +00:00
jan.nijtmans 90565904aa Merge 8.7 2021-02-15 12:08:17 +00:00
jan.nijtmans 73745cbfbf Enhance new testscases for compiled/interpreted mode 2021-02-15 08:18:22 +00:00
jan.nijtmans ab91723185 Add testcases from Christian Werner, regarding "string trim" with Emoji 2021-02-15 08:07:42 +00:00
jan.nijtmans 5eba4fa4d7 Add testcases, contributed by Christian Werner. Two of them fail, so still some work to do. [d43f96c1a8] 2021-02-15 07:48:54 +00:00
jan.nijtmans 0d7614dd81 Missing semicolon in UNIX Makefile 2021-02-15 07:47:33 +00:00
jan.nijtmans 6fcd32ac08 "macher" output should be executable 2021-02-15 07:31:08 +00:00
jan.nijtmans 73277b178e Use Marc Culler's "macher" utility for the onefiledist MacOSX builds. Only for non-framework builds. 2021-02-12 17:27:11 +00:00
culler 21d34a1956 The syntax error was caused by Aquamacs inserting tabs into the YAML file. 2021-02-12 14:57:10 +00:00
jan.nijtmans 7b662b613d Syntax error in yaml-file 2021-02-12 11:12:09 +00:00
jan.nijtmans 42e3415106 Fix warning about unused symbol on --disable-shared build 2021-02-12 08:21:46 +00:00
culler 840ba03059 macher 1.1 -> 1.2 (bug fixes) and account for new append syntax. 2021-02-12 01:46:21 +00:00
jan.nijtmans 89fa1f862f macher 1.0 -> 1.1 2021-02-11 17:19:38 +00:00
jan.nijtmans c1a56eb2d1 Experiment: Integrate culler's "macher" tool. Only for thin binaries 2021-02-11 16:30:11 +00:00
culler a4bf99fa2c Add CFLAGS to the github actions to build fat binaries on macOS. 2021-02-11 15:12:40 +00:00
jan.nijtmans dfd4a2e5c1 Missing #endif 2021-02-10 13:12:42 +00:00
jan.nijtmans c0cb466a86 Make TIP #430 work on cygwin. Simplify some makefiles 2021-02-10 12:56:47 +00:00
jan.nijtmans 24128f43df Backport win/rules.vc from 8.7 2021-02-10 10:44:52 +00:00
jan.nijtmans ea4e2c5432 Fix pkgconfig-1.1 testcase for static builds 2021-02-10 08:52:08 +00:00
jan.nijtmans d12eee4a39 Fix various aspects in TIP #430 implementation. Should now work for Tk too (together with some fixes in Tk). zip-file is no longer installed separately, but attached to either tclsh (in a static build) or libtcl8.7.so (in a shared build) 2021-02-10 08:25:56 +00:00
jan.nijtmans 2ba1ef3db1 In a static build, don't pack dde/registry in zip-file. In shared build, pack dde/registry dll's in zip-file. Rename zip-file 2021-02-10 08:11:29 +00:00
jan.nijtmans 6e603480b3 Only set dllfile,runtime key info when doing a shared build 2021-02-09 16:43:57 +00:00
jan.nijtmans aeeb808b30 ZIPFS_BUILD=1 only needs to be set once 2021-02-09 14:16:11 +00:00
jan.nijtmans 0043160893 Handle the situation that ::${basename}::pkgconfig does not have bindir/libdir,runtime keys: Either get those from Tcl, or from [info nameofexecutable] 2021-02-09 13:34:26 +00:00
jan.nijtmans af4a77f3e3 Change TCL_ZIP_FILE name, just using dots in stead of underscores 2021-02-09 12:07:09 +00:00
jan.nijtmans 5740a9e3d2 Add --disable-zipfs flag to GNUmakefile 2021-02-09 07:34:01 +00:00
jan.nijtmans ebf4c78ed8 Attempt to fix the last TIP #430 bits, needed to make it work for Tk (and other external packages) 2021-02-08 18:23:40 +00:00
jan.nijtmans 8395974e1b Merge-mark 2021-02-08 15:59:24 +00:00
jan.nijtmans 6f3b0bd108 Bugfix in TIP #430 implementation: tcl_findLibrary should use the same zip-file naming as the configure scripts do 2021-02-08 15:51:46 +00:00
jan.nijtmans b142586b21 Fix "auto.tcl" indenting 2021-02-08 15:25:55 +00:00
jan.nijtmans 32dc9b67a9 Merge 8.6 2021-02-08 10:46:58 +00:00
jan.nijtmans 6efc470726 Merge 8.5 2021-02-08 10:11:38 +00:00
jan.nijtmans fa2bb177eb Makefile cleanup: Remove *.zip and *.vfs files/directories as part of "make clean", which might be a leftover of a previous Tcl 8.7 build in this directory 2021-02-08 09:21:37 +00:00
jan.nijtmans 7104004d57 Merge 8.6 2021-02-05 13:45:51 +00:00
jan.nijtmans fed1ff66dc More implicit type-casts, for better compatibility with C++ 2021-02-05 13:42:40 +00:00
jan.nijtmans d9e28af5f3 Oops 2021-02-05 13:37:26 +00:00
jan.nijtmans 392c7ad8eb Merge 8.6 2021-02-05 11:36:49 +00:00
jan.nijtmans 3a18a03f3d Fix filename-11.45 testcase when there are multiple volumes: This testcase only works for the native file system, which is the lastt one. 2021-02-05 11:34:28 +00:00
jan.nijtmans c09ddd48e3 In a --disable-shared build, attach the zip-file to the executable, so "onfiledist.yml" doesn't need to do that any more 2021-02-04 13:11:37 +00:00
jan.nijtmans 0d69fc832e Fix [03b70c8918]: core-8-branch : trying to build on macOS10.9 linked against XQuartz 2021-02-04 11:11:34 +00:00
jan.nijtmans 6e97fd01b0 Merge 8.6 2021-02-02 08:50:55 +00:00
jan.nijtmans e2c482312c On Big Sur, distingish 11.0, 11.1 and 11.2. platform 1.0.16 -> 1.0.17 2021-02-02 08:46:12 +00:00
jan.nijtmans 00e0788723 On Big Sur, distingish 11.0, 11.1 and 11.2. platform 1.0.16 -> 1.0.17 2021-02-02 08:41:35 +00:00
jan.nijtmans 3aab127556 Undo previous change to unix/configure.ac: It doesn't work 2021-01-29 15:51:28 +00:00
jan.nijtmans 58625c6ba9 Undo previous change to unix/configure.in 2021-01-29 15:45:01 +00:00
jan.nijtmans 2cf339ce3b Merge 8.6 2021-01-29 14:02:43 +00:00
jan.nijtmans 57f9c7dae5 Fix 2 warnings when running "autoconf" (2.69 or 2.70) 2021-01-29 13:45:18 +00:00
jan.nijtmans f6c86d7972 re-generate unix/configure 2021-01-29 09:18:36 +00:00
jan.nijtmans 1fb596128b Fix [113be1991e]: zipfs on mac.
From now on, --enable-framework automatically means --disable-zipfs, since those 2 options can never work together.
2021-01-29 09:15:41 +00:00
jan.nijtmans 2cb77a221b Lowercase package names are recommended now 2021-01-28 15:54:53 +00:00
jan.nijtmans 33b2c94323 Merge 8.6 2021-01-28 11:08:46 +00:00
jan.nijtmans 8d49123e73 Use {} braces in more "expr" expressions. 2021-01-28 10:42:05 +00:00
jan.nijtmans 9c024d9d3b Use "in" operator in stead of "lsearch -exact" when possible 2021-01-28 10:38:44 +00:00
jan.nijtmans 82f2bed5fe Merge 8.6 2021-01-27 10:15:26 +00:00
jan.nijtmans 6b29884385 *.decls files are now in UTF-8. Use "in" operator in stead of "lsearch -exact". 2021-01-27 10:13:51 +00:00
jan.nijtmans 06f42e40b2 Merge 8.6 2021-01-27 09:35:07 +00:00
jan.nijtmans 2ff8145561 When generating stubs, always read *.decls and *Decls.h files in UTF-8. This corrects possible invalid UTF-8. 2021-01-27 09:32:44 +00:00
jan.nijtmans 581d7fccf5 Merge 8.6 2021-01-25 12:26:18 +00:00
jan.nijtmans 05b6284310 Update to tzdata 2021a 2021-01-25 12:25:20 +00:00
jan.nijtmans 2ee9e74ac6 Update to tzdata 2021a 2021-01-25 12:24:07 +00:00
jan.nijtmans ba3f00d403 Make Tcl_GetString() a macro calling Tcl_GetStringFromObj(). Just the same as Tcl_GetUnicode(). 2021-01-25 11:53:59 +00:00
jan.nijtmans f837b2ca92 Fix [f4b0cb2080] by only accepting new syntax when TCL_NO_DEPRECATED is defined 2021-01-25 10:26:22 +00:00
jan.nijtmans 6724e74377 Merge 8.6 2021-01-25 09:16:54 +00:00
jan.nijtmans 29c768d6c9 Merge 8.5 2021-01-25 09:05:45 +00:00
jan.nijtmans 458c3e9cc5 ERROR_ON_FAILURES=1, otherwise failing Linux tests don't result in a failing build 2021-01-25 08:42:27 +00:00
jan.nijtmans 31e49b4c7c Make sure MODULE_SCOPE is always defined correctly, for C++ compilers too 2021-01-25 08:27:22 +00:00
jan.nijtmans 298c9aa866 Fix [http://core.tcl.tk/tk/tktview?name=1712098|1712098]: Tk still needs Tcl source distro, by new export Tcl_MacOSXNotifierAddRunLoopMode() 2021-01-22 14:22:11 +00:00
jan.nijtmans 4612b57a1e Change exported symbol from TclMacOSXNotifierAddRunLoopMode -> Tcl_MacOSXNotifierAddRunLoopMode 2021-01-22 09:24:13 +00:00
jan.nijtmans b02ecd46ec Rebase to core-8-branch 2021-01-22 08:57:44 +00:00
jan.nijtmans f050bae793 Merge 8.6 2021-01-21 16:01:07 +00:00
jan.nijtmans b2cabbf79c Fix [8c025f8f0d]: Run-time error on tcl 8.6.11 32 bits (from cross-compile Centos6.9 64-bits) 2021-01-21 15:56:52 +00:00
jan.nijtmans 14ab9ebc55 Fix [8c025f8f0d]: Run-time error on tcl 8.6.11 32 bits (from cross-compile Centos6.9 64-bits) 2021-01-21 15:54:02 +00:00
jan.nijtmans 298a0ffc19 Merge 8.6 2021-01-21 15:46:16 +00:00
jan.nijtmans ea1fdc511d Fix [https://core.tcl-lang.org/thread/tktview?name=98ae20f0f5|98ae20f0f5]: Type mismatch in TclIntStubs 2021-01-21 15:42:11 +00:00
jan.nijtmans 207a4b3122 Fix [https://core.tcl-lang.org/thread/info/98ae20f0f5|98ae20f0f5] by no longer compile the stub library using LTO (even if CFLAGS enables LTO) 2021-01-21 15:31:28 +00:00
jan.nijtmans 2b394dc55d Close fork 2021-01-21 12:43:40 +00:00
jan.nijtmans ab2df51726 Close fork 2021-01-21 12:40:08 +00:00
msi e9dfa3ed3c Improve [file attributes] documentation 2021-01-20 22:35:57 +00:00
msi ca8cef9587 Improve [file attributes] documentation 2021-01-20 22:31:34 +00:00
msi 0befd21328 Improve [file attributes] documentation further 2021-01-20 22:28:30 +00:00
msi f0e85a15a0 Improve [file attributes] documentation 2021-01-20 22:23:59 +00:00
msi 80c04f15f3 Fix line width in [file attributes] documentation 2021-01-20 22:18:48 +00:00
msi b633ee636f Improve punctuation and wording in [file attributes] documentation 2021-01-20 21:57:38 +00:00
jan.nijtmans cbe4ab7b6a merge-mark 2021-01-20 16:23:03 +00:00
jan.nijtmans f6f8bdc72d Make tclCkalloc.c and tclExecute warning-free on Windows when compiled with --enable-memory=(mem|all). 2021-01-20 16:19:21 +00:00
jan.nijtmans a096c64c32 Fix potential endless loop in "stats" command (only enable in debug-build) 2021-01-20 14:13:15 +00:00
jan.nijtmans a9f031fc1a Don't use LTO for any stub libraries: It's asking for trouble when an extension is compiled with different CFLAGS as the stub library. 2021-01-20 10:57:44 +00:00
jan.nijtmans 2e5746d60c Possible fix (workaround) for [8c025f8f0d]: Run-time error on tcl 8.6.11 32 bits (from cross-compile Centos6.9 64-bits).
Since autoconf-2.59 has limited support for cross-compilation, a better fix has to wait for Tcl 8.7 (which uses autoconf-2.70)
2021-01-20 08:52:10 +00:00
jan.nijtmans 850c978dcc Merge fork 2021-01-20 07:49:39 +00:00
jan.nijtmans 5a3587a3ad Close fork 2021-01-20 07:47:26 +00:00
msi 3345a310b6 Improve clarity of [file attributes] documentation 2021-01-19 20:14:11 +00:00
msi 9038dae6fe Improve clarity of [file attributes] documentation 2021-01-19 20:11:32 +00:00
msi 817e391ddb Improve clarity of [file attributes] documentation 2021-01-19 20:07:54 +00:00
msi 011e7c1e5f Fix missing backslash 2021-01-19 19:51:55 +00:00
msi 040818e1db Improve description of Unix options for [file attributes] (Pt. 2) 2021-01-19 19:41:31 +00:00
msi 7a3766376f Create new branch named "msi-core-8-5-branch" 2021-01-19 16:53:24 +00:00
jan.nijtmans f387d58e76 Merge 8.6 2021-01-19 13:20:39 +00:00
jan.nijtmans afe025dc93 Don't worry about Windows 3.1 any more. 2021-01-19 13:16:05 +00:00
jan.nijtmans 81e7dac314 Document that Tcl_GetByteArrayFromObj accepts a size_t *lengthPtr as well (TIP #481) 2021-01-19 07:50:29 +00:00
jan.nijtmans dbd3f823aa Bugfix for TIP #587 implementation: Always use -eofchar "\032 {}" and _NOT_ -eofchar \032, otherwise there's the risk that ^Z is appended too the open channel. See [5bfe3de008], we don't want to open that can of worms again! 2021-01-15 14:58:03 +00:00
jan.nijtmans 78d6e8f34c Fix [ff658e10fc]: tip 551 in 8.7a4 0b1111_1111 not working. Also fix some indenting in code 2021-01-15 10:52:26 +00:00
jan.nijtmans a7bc79bffb Experiment: Fix [https://core.tcl-lang.org/thread/tktview?name=98ae20f0f5|98ae20f0f5]. Works for any extension using this construct, not only Thread 2021-01-15 09:47:36 +00:00
jan.nijtmans 0cd0d2191b Starting with TIP #514, we know exactly what [largest_int] is. So, make use of that in "string.test" 2021-01-14 16:46:00 +00:00
jan.nijtmans 071381e984 Add mp_unpack() to the libtommath stub table, so this function is available to extensions (and to Tcl itself, but not used yet) 2021-01-13 15:37:21 +00:00
jan.nijtmans 5f79368eaf Merge 8.6 2021-01-13 10:48:37 +00:00
jan.nijtmans aa7bf1b2e1 Fix [b89209f5cd]: compilation error Windows 10 / Visual Studio 2019 2021-01-13 10:42:58 +00:00
jan.nijtmans 370b557389 Fix [b89209f5cd]: compilation error Windows 10 / Visual Studio 2019 2021-01-13 10:38:56 +00:00
jan.nijtmans 711adf15f9 Bring documentation in line with *.decls files 2021-01-12 17:11:52 +00:00
jan.nijtmans a14063d19a Make tclStrToD.c compile on systems without inttypes.h 2021-01-11 16:01:36 +00:00
jan.nijtmans 7ff4e84af2 Merge 8.6 2021-01-11 11:52:01 +00:00
jan.nijtmans 60ca614740 Fix [1dab713a38]: Uninitialized-variable use while parsing '*' in BRE-mode regexps 2021-01-11 11:41:54 +00:00
jan.nijtmans 473d9adddc Fix [1dab713a38]: Uninitialized-variable use while parsing '*' in BRE-mode regexps 2021-01-11 11:39:12 +00:00
jan.nijtmans 089b997044 TIP #481 implementation: Tcl_GetStringFromObj() with size_t length parameter 2021-01-11 08:33:04 +00:00
jan.nijtmans b61dbff448 Make Tcl independent from exact definition of TCL_LL_MODIFIER. In tclStrToD.c we need an _exact_ 64-bit type, _at least_ 64-bit is not good enough here. 2021-01-11 08:23:48 +00:00
msi 4e3cd053db Improve description of Unix options for [file attributes] (Pt. 1) 2021-01-08 20:07:09 +00:00
msi 70da19ccf0 Improve description of Unix options for [file attributes] (Pt. 1) 2021-01-08 20:05:35 +00:00
msi 4206bf2818 Improve description of Unix options for [file attributes] (Pt. 1) 2021-01-08 19:55:51 +00:00
msi a9c9e46669 Fix consistency and grammar in re_syntax.n 2021-01-08 17:15:35 +00:00
msi 3edc49c702 Fix consistency and grammar in re_syntax.n 2021-01-08 16:16:39 +00:00
jan.nijtmans 0872562c80 TIP #592 implememtation: Stop support for Windows XP, Server 2003, Vista, Server 2008 2021-01-08 14:45:53 +00:00
jan.nijtmans f09dcac785 Omit -Wdeclaration-after-statement from CFLAGS: No longer needed since we stopped support for MSVC 6++
Change Tcl_WideInt -> long long in various places: Tcl_WideInt could be a 128-bit type, we don't want that everywhere.
2021-01-08 09:37:25 +00:00
jan.nijtmans 6b7dec8d6a define UWIDE_MAX and friends in terms of Tcl_WideUInt/Tcl_WideInt, since we cannot be sure that Tcl_WideInt == long long 2021-01-07 15:31:52 +00:00
jan.nijtmans ad4c7a03b7 Revise UWIDE_MAX and friends 2021-01-07 14:45:40 +00:00
jan.nijtmans 76fd53b302 Merge 8.7. Don't bother BorlandC, LCC and WatcomC any more, since they (probably) cannot handle Windows 7 API anyway. 2021-01-07 13:42:14 +00:00
jan.nijtmans 7a36f11216 Merge 8.6 2021-01-07 12:31:24 +00:00
jan.nijtmans fed0f920e1 Fix mingw-w64 compiler warnings when using __USE_MINGW_ANSI_STDIO=1. Not recommended, but it should work. See: [https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/|gnu printf] 2021-01-07 12:14:55 +00:00
jan.nijtmans 4f237d732e Fix warnings when __USE_MINGW_ANSI_STDIO=1 2021-01-07 10:55:39 +00:00
jan.nijtmans 1227eed18e No need any more for -D_ATL_XP_TARGETING=1 2021-01-07 10:13:24 +00:00
jan.nijtmans a21daf36ae Merge 8.7 2021-01-07 07:37:36 +00:00
msi 2a2321bf6a Fix consistency and grammar in re_syntax.n 2021-01-06 19:43:35 +00:00
jan.nijtmans 5c3f6b06b7 Merge 8.6 2021-01-06 15:48:43 +00:00
jan.nijtmans 3005927df1 Eliminate obsolete AC_HAVE_HEADERS and two more AC_TRY_COMPILE constructs. Some formatting 2021-01-06 15:39:18 +00:00
jan.nijtmans 0a38e523d3 tcltest -> 2.5.4. Version change should have been done at this commit: [95852bc2ed0e2c11] 2021-01-06 10:31:27 +00:00
jan.nijtmans f39dee95d7 TIP #590 follow-up: Restore 2nd 'load' argument in dde/registry pkgIndex.tcl. Otherwise those pkgIndex.tcl files no longer work in a Tcl 8.6 environment.
dde -> 1.4.4, registry -> 1.3.6 (to stop all confusion about the difference to Tcl 8.6.11)
2021-01-06 09:26:30 +00:00
dkf 124e36102e Fix unclear language in re_syntax. [2da4c23916] 2021-01-05 20:35:25 +00:00
dkf fb6da59e2f Fix unclear language in re_syntax. [2da4c23916] 2021-01-05 20:34:35 +00:00
dkf 279c0829fc Fix unclear language in re_syntax. [2da4c23916] 2021-01-05 20:33:49 +00:00
jan.nijtmans 3b7c040233 Merge 8.6: Add 4 processor-types to Win32/Cygwin. "platform" -> 1.0.16 2021-01-05 17:06:14 +00:00
jan.nijtmans c040d037ef Merge 8.5: Add 4 processor-types to Win32/Cygwin. "platform" -> 1.0.16 2021-01-05 17:02:19 +00:00
jan.nijtmans 2f9727a745 Add 4 processor-types to Win32/Cygwin. On Cygwin, don't bother tcl_platform[os], since "Windows NT" is the only one supported. "platform" -> 1.0.16 2021-01-05 16:55:44 +00:00
jan.nijtmans b24275a7c4 Merge 8.6 2021-01-05 14:43:26 +00:00
jan.nijtmans 9f96f3816e Merge 8.5 2021-01-05 14:27:27 +00:00
jan.nijtmans edb8fe7c9b #undef PACKAGE_VERSION in tclConfig.h too, since Tcl and Tk don't necessary have the same version. 2021-01-05 14:24:00 +00:00
jan.nijtmans ab6f3aa7a8 Merge 8.6 2021-01-05 10:29:13 +00:00
jan.nijtmans f8e1773f67 More elimination of (obsolete) AC_TRY_COMPILE 2021-01-05 10:19:03 +00:00
jan.nijtmans 89dbd5cedd Merge 8.6 2021-01-05 09:19:51 +00:00
jan.nijtmans 21e01ee4e5 Merge 8.5. Restore use of AC_HEADER_STDC in win/configure.in: Wait for 8.7 to make that change 2021-01-05 08:23:07 +00:00
jan.nijtmans cc3b85771e Require at least autoconf-2.59 for tools/configure 2021-01-05 08:15:01 +00:00
jan.nijtmans fd512f5f94 Eliminate (obsolete) use of AC_TRY_LINK in */configure.in. Still generates the same */configure scripts with autoconf-2.59. 2021-01-05 08:06:28 +00:00
jan.nijtmans 67639babd5 Merge 8.6 2021-01-04 16:46:25 +00:00
jan.nijtmans 1a457f040a Roll-back part of [4dfa9000e1]: This isn't used for Tcl, but breaks some extensions (like tkImg) 2021-01-04 16:45:36 +00:00
jan.nijtmans 906b33b772 Merge-mark 2021-01-04 16:32:39 +00:00
jan.nijtmans a27098cb71 AC_HELP_STRING -> AS_HELP_STRING 2021-01-04 15:37:02 +00:00
jan.nijtmans dd56627191 Fix [c376607b22]: Tcl 8.6: Extended plane character does not encode correctly to UTF-16 with TCL_UTF_MAX==5 2021-01-04 15:06:34 +00:00
jan.nijtmans 29b5516f5f Merge 8.6 2021-01-04 14:34:18 +00:00
jan.nijtmans ab7b060df7 No longer use deprecated syntax for AC_INIT/AC_OUTPUT. (almost) no change in generated configure scripts 2021-01-04 14:24:13 +00:00
jan.nijtmans 4789e8e063 Merge-mark 2021-01-04 10:01:20 +00:00
jan.nijtmans a29e5ccac3 re-generate win/configure 2021-01-04 09:51:53 +00:00
jan.nijtmans dcebb038ed re-generate win/configure 2021-01-04 09:40:19 +00:00
jan.nijtmans 50199a5302 Merge 8.7 2021-01-04 07:54:50 +00:00
jan.nijtmans 89653c15cf Merge 8.7 2021-01-04 07:48:36 +00:00
dgp 7dd3bef5d3 merge 8.6 2021-01-02 22:53:43 +00:00
dgp c86e9e2b45 merge release 2021-01-02 22:34:55 +00:00
dgp 17b5b3e020 [e7eb94e8d1] typo fix in changes. Each ambiguous hash still identifies only
one ticket, which is good enough.
2020-12-30 18:23:08 +00:00
jan.nijtmans 6d547b0c2c merge-mark 2020-12-29 22:23:30 +00:00
jan.nijtmans ee9004c35f Fix [43d371ac19]: Usage of exit() without including <stdlib.h> in unix/configure 2020-12-29 22:22:26 +00:00
jan.nijtmans 0a3a1a075a Fix [43d371ac19]: Usage of exit() without including <stdlib.h> in unix/configure 2020-12-29 22:21:20 +00:00
dgp e620c687f7 update changes 2020-12-28 15:12:20 +00:00
jan.nijtmans 098ad4c7f3 TIP #587 follow-up: Looks like -encoding utf-8 still was missing in some places, only visible on Windows 2020-12-28 14:46:50 +00:00
jan.nijtmans b91eaa4a75 Merge 8.7 2020-12-26 22:47:02 +00:00
jan.nijtmans 52cf0e0a28 Merge 8.6. Give up handling EXTRA_CC_SWITCHES for c++ compile 2020-12-26 22:12:37 +00:00
dgp 536fad2c6d Suppress testing of known bug only when it is present. Allow tests that pass. 2020-12-26 18:42:09 +00:00
dgp ad77faa0e4 merge 8.6 2020-12-26 18:01:46 +00:00
dgp 3665cff596 changes file updates WIP 2020-12-24 20:27:00 +00:00
jan.nijtmans b5b121bedb Fix [5a15a88490]: Checkin [1f6f21856b] quoting broke unix/installManpage 2020-12-24 16:11:44 +00:00
jan.nijtmans 24c0f50472 correct quoting in unix/installManPage, so $Dir can contain spaces 2020-12-24 16:06:24 +00:00
jan.nijtmans 4e05ae8a64 Merge 8.6 2020-12-24 15:40:48 +00:00
jan.nijtmans 31de47e1d6 unix/configure.in is not supposed to be executable in the distribution 2020-12-24 15:33:59 +00:00
jan.nijtmans 2b54268bb7 unix/configure.in is not supposed to be executable in the distribution.
Don't re-generate unix/tclConfig.h.in and unix/configure as part of "make dist": This should be done with autoconf-2.59, not with whatever autoconf is present on this machine
2020-12-24 15:28:48 +00:00
jan.nijtmans 6acfb3e800 Last pre-autoconf-2.69 obsolete construct eliminated. Works with autoconf-2.59 as well. Still to be tested with autoconf-2.70. 2020-12-24 14:07:55 +00:00
jan.nijtmans 67dd971e70 Fix check for broken strstr/strtoul/strtod functions: Modern C compilers don't accept signature mismatches any more. 2020-12-24 12:09:33 +00:00
jan.nijtmans 5f6824ef23 Convert AC_TRY_COMPILE (which is obsolete now) to AC_COMPILE_IFELSE/AC_LANG_PROGRAM. This still works with autoconf-2.59 too. 2020-12-24 11:46:29 +00:00
jan.nijtmans d56bda5224 Another attempt to make EXTRA_CC_SWITCHES work for c++ compiles in github actions 2020-12-24 11:07:05 +00:00
jan.nijtmans d6bbe53dfb More progress in autoconf-2.70 compatibility. Not to be merged to 8.6 yet! 2020-12-23 15:42:01 +00:00
jan.nijtmans 02cf664be1 (cherry-pick): Update TZ info to tzdata2020e 2020-12-23 15:13:32 +00:00
José Ignacio Marín f74fb9a7dc Update TZ info to tzdata2020e (via merge). 2020-12-23 10:26:33 +00:00
José Ignacio Marín 9fe163167b Update TZ info to tzdata2020e. 2020-12-23 10:12:27 +00:00
jan.nijtmans af23e7a53d EXTRA_CC_SWITCHES quoting doesn't work. Let's try again 2020-12-23 10:01:13 +00:00
jan.nijtmans a128f1c033 Merge 8.6 2020-12-23 08:17:39 +00:00
jan.nijtmans c615f910f7 Missing constraint, in case we are running on Windows 10 in developer mode 2020-12-23 08:04:02 +00:00
jan.nijtmans 649c413c41 Merge 8.6 2020-12-23 07:47:15 +00:00
jan.nijtmans a1c17947a6 (cherry-pick): Repair flaws exposed by debugging test run. 2020-12-23 07:44:27 +00:00
jan.nijtmans da2d3610f9 Fix testcase for [548cd945d6]: Consistant error-code if creating link fails on all platforms. On Win10 disable the testcase, because latest Win10 in "Developer Mode" _can_ create symbolic links to files. 2020-12-23 07:42:19 +00:00
dgp 3dd7667698 Repair flaws exposed by debugging test run. 2020-12-22 16:34:09 +00:00
jan.nijtmans 4291e4e815 Update all configure-related stuff to work with autoconf-2.70 too. For now, everything still generated with (modified) autoconf-2.59 2020-12-22 14:25:30 +00:00
dgp f66286892b merge 8.6 2020-12-22 13:18:20 +00:00
jan.nijtmans 6dd81c7dba Merge 8.6 2020-12-22 09:28:07 +00:00
jan.nijtmans ae17e8d1b4 Compile on github actions using C++ compiler, even without CC=g++ (which doesn't work with autoconf 2.70) 2020-12-22 08:58:52 +00:00
jan.nijtmans d7f4679221 Fix [ea8cd4789c]: Tcl 8.6.11 does not compile with VisualStudio 2010. Thanks Paul! 2020-12-22 07:12:06 +00:00
jan.nijtmans afc0577d2e autoupdate */configure.ac and */tcl.m4. Should still work with autoconf-2.69 too 2020-12-19 22:17:00 +00:00
jan.nijtmans 2215f74b2d Remove g++ builds from travis/github actions. The construct "CC=g++" doesn't work any more with autoconf-2.70 2020-12-18 14:00:56 +00:00
jan.nijtmans d456e92a29 Rename AC_HELP_STRING to AS_HELP_STRING, and fix determination of intptr_t/uintptr_t with autoconf 2.70 2020-12-18 10:42:05 +00:00
dgp 220e5e6245 close fork 2020-12-17 19:07:48 +00:00
dgp 66147b2e11 close fork 2020-12-17 19:05:47 +00:00
jan.nijtmans 928360bd4d Merge fork 2020-12-17 18:58:53 +00:00
jan.nijtmans 9419ff1d29 Merge 8.7 2020-12-17 18:56:24 +00:00
jan.nijtmans 517a6a5159 Merge 8.6 2020-12-17 18:21:24 +00:00
jan.nijtmans 63426886f5 Further elimination of __int64 type 2020-12-17 16:39:25 +00:00
jan.nijtmans 075e333cc2 Undo one change from previous commit: this gives a warning on mingw-w64 2020-12-17 15:47:56 +00:00
jan.nijtmans c5500b6035 Simplifications when assuming VS 2015 or later 2020-12-17 15:44:01 +00:00
jan.nijtmans 0e05734542 Merge 8.7 2020-12-17 14:14:21 +00:00
jan.nijtmans 392ecd0f2d Merge 8.6. Re-generate tclConfig.h.in with autoheader v2.70 2020-12-17 12:48:40 +00:00
jan.nijtmans f9a71ac128 Add .travis.yml and .github/worksflows to "make dist". Use "cp -p" for all files in "make dist" 2020-12-17 12:38:29 +00:00
jan.nijtmans ab4cbd7685 Add .travis.yml and .github/worksflows to "make dist" 2020-12-17 12:27:48 +00:00
jan.nijtmans c4bcec96ea Re-generate configure scripts with (brand-new!!!) autoconf-2.70 2020-12-17 08:11:15 +00:00
jan.nijtmans 4855172d08 Remove "Vista" from manifest. Test simplifications 2020-12-16 15:46:04 +00:00
jan.nijtmans ee2c8b324f TIP #592 implementation: Stop support for Windows XP, Server 2003, Vista, Server 2008 2020-12-16 15:32:20 +00:00
jan.nijtmans fc6c71a6ff Merge 8.7 2020-12-16 15:10:45 +00:00
jan.nijtmans 4ea5470891 Merge 8.7 2020-12-16 15:04:10 +00:00
jan.nijtmans 7795886d49 Merge 8.6 2020-12-16 14:31:39 +00:00
jan.nijtmans fe22db4eda [testConstraint winVista] should be true on Windows 10 too 2020-12-16 14:28:47 +00:00
jan.nijtmans 80a7fdbc90 Merge 8.6 2020-12-16 14:24:12 +00:00
jan.nijtmans 01279acc11 rfe [548cd945d6]: symlinks for Windows 10 2020-12-16 14:11:13 +00:00
dgp 3a3b91de59 merge 8.6 2020-12-15 21:51:56 +00:00
jan.nijtmans 00280a4727 Protect fCmd-28.8 with constaint win10 2020-12-15 11:37:29 +00:00
jan.nijtmans 02ab7419f0 Merge 8.6 2020-12-14 08:49:27 +00:00
jan.nijtmans ebf2863b94 Fix C:\test\tcl8.6.11_rc0\win\..\generic\tclStubInit.c(107) : warning C4761:
integral size mismatch in argument;
Only happening on 32-bit Windows
2020-12-14 08:44:58 +00:00
jan.nijtmans 14cf327d37 Merge 8.6 2020-12-14 08:11:11 +00:00
jan.nijtmans 66bf4b493e Fix [cb4d185ea57b8966]: Fix tests safe-* for tcl-8.6.11rc0 2020-12-14 08:05:08 +00:00
jan.nijtmans 9a7583c219 Fix [fe57ad096d97623e]: Fix test http-4.14 for tcl-8.6.11rc0 2020-12-14 07:33:42 +00:00
jan.nijtmans d06a5c4c22 Merge 8.7 2020-12-13 16:59:33 +00:00
jan.nijtmans c899e46a97 Merge 8.6 2020-12-13 16:45:47 +00:00
jan.nijtmans 56c8c7f4a2 Merge 8.6 2020-12-13 16:38:12 +00:00
jan.nijtmans 4c0c6d80cd make dist 2020-12-13 16:36:23 +00:00
jan.nijtmans 8897e69513 Merge 8.6 2020-12-12 11:39:32 +00:00
apnadkarni e341dd7a16 nmake: fix path in tcl.nmake check 2020-12-12 06:14:02 +00:00
dgp 18c766a08c make dist 2020-12-11 19:21:55 +00:00
jan.nijtmans b15870ed70 Merge 8.6. Get CreateSymbolicLinkW symbol from kernel32.dll, since Windows XP doesn't have it 2020-12-11 14:47:33 +00:00
dgp e3d0b11da5 merge 8.6 2020-12-11 13:35:39 +00:00
jan.nijtmans 4f95cb4de4 Merge 8.6 2020-12-11 12:44:03 +00:00
jan.nijtmans 0045179f39 Update "platform" package to handle macOS Big Sur with arm processor.
Also handle that Catalina and higher no longer support 32-bit applications
2020-12-11 12:41:13 +00:00
jan.nijtmans de49e4b0fc Update "platform" package for Big Sur:
1) Catalina was the last platform supporting 32-bit applications
2) macOS is no longer 10 but 11
3) New "arm" processor
2020-12-11 12:33:27 +00:00
apnadkarni 7b3afa79ed nmake: export zip metadata for Tk and extensions 2020-12-11 09:12:45 +00:00
apnadkarni 21553ac98c Merge 8.6 (msvcrt time64 fixes) 2020-12-11 09:00:27 +00:00
apnadkarni c77e03b978 Fix commits 93ab6a and 606df1. msvcrt time64bit - TCL_{MAJOR,MINOR}_VERSION checks.
msvcrt and time64bit OPTS checks were using Tcl versions before definition.
Moved Tcl version retrieval to earlier in the build as a fix.
Also, < cannot be used with strings, so made the checks numerics.
2020-12-11 08:57:38 +00:00
jan.nijtmans a17bf04dba Merge 8.7 2020-12-11 08:25:14 +00:00
apnadkarni 2120b2e775 Merge 8.6 (nmake) 2020-12-11 07:59:56 +00:00
apnadkarni 33d854e95b nmake: build nmakehlp with -DNDEBUG, sync rules.vc for 8.7 2020-12-11 07:57:41 +00:00
dgp b33993aaf9 merge 8.6 2020-12-10 18:34:37 +00:00
jan.nijtmans 742df3666a Merge 8.6 2020-12-10 18:06:28 +00:00
jan.nijtmans f4ec29ceb2 Update "platform" package to handle Big Sur version numbering. Also remove special case for cygwin/msys2, just make it more generic 2020-12-10 18:05:34 +00:00
jan.nijtmans 0c788cde5c publicize TclWinConvertError 2020-12-10 15:45:44 +00:00
jan.nijtmans 39813465e8 Merge 8.6 2020-12-10 13:27:58 +00:00
jan.nijtmans 615b18fee4 Fix [ed5be77734]: win: "comx:" not recognized as serial port 2020-12-10 13:26:43 +00:00
jan.nijtmans 45c9e44c82 Tweak: account for terminating '\0' 2020-12-10 12:31:37 +00:00
jan.nijtmans c69d9fda47 Potential fix for [ed5be77734]: win: "comx:" not recognized as serial port.
(concluded from code inspection, not tested yet)
2020-12-10 12:17:50 +00:00
jan.nijtmans e5777aad56 Merge 8.6. Add empty "tests/safe-stock86.test", in an attempt to remove this file from the GIT branches (it shouldn't be there, just as in fossil) 2020-12-10 09:50:25 +00:00
jan.nijtmans 6421b7b8b2 RFE 548cd945d6: symlinks for Windows 10 2020-12-10 09:41:09 +00:00
jan.nijtmans 20e0998a32 Use more 0o??? syntax for octal. Clean up build *.yml files 2020-12-10 09:38:24 +00:00
jan.nijtmans 5d4116b638 sync win/rules.vc with Tcl 8.7. No change for 8.6 2020-12-10 09:00:02 +00:00
jan.nijtmans 84bbce0e29 Fix github actions Windows build 2020-12-09 09:56:37 +00:00
jan.nijtmans f67b351466 nmake: OPTS=msvcrt is now the default, even for static builds. Use OPTS=nomsvcrt if you don't want that.
Add more comments in win/*.vc files, describing what's going on.^C
2020-12-09 09:17:19 +00:00
apnadkarni 3fbbf14bf2 nmake: make zipfs mount point consistent with Unix/autoconf 2020-12-09 06:17:50 +00:00
apnadkarni 9f88ecdd97 nmake: subsume staticpkg option within static builds 2020-12-09 04:31:07 +00:00
jan.nijtmans 56dbbded83 Add -finput-charset=UTF-8 and -fextended-identifiers to gcc (and clang). All C sources can now use UTF-8, as far as gcc/clang/msvc support it. Not used yet 2020-12-08 15:31:15 +00:00
apnadkarni f5e6fef433 TIP 430: generate and embed library zip. 2020-12-08 11:06:24 +00:00
apnadkarni 070d566ad5 TIP 430: generate and attach library zip 2020-12-08 10:46:12 +00:00
jan.nijtmans 0a04dce70d Merge 8.7 2020-12-08 10:37:03 +00:00
jan.nijtmans 35231ec0d7 Skip testcases filesystem-7.1.[1|2] with msvc OPTS=staticpkg: This isn't supposed to work 2020-12-08 10:30:05 +00:00
jan.nijtmans 99a90efbfd TIP #590 follow-up: Adapt documentation and tclStubLib.c 2020-12-08 10:14:49 +00:00
jan.nijtmans b6088f7331 Merge 8.7 2020-12-08 09:04:03 +00:00
dgp 2f178f93ab merge 8.6 2020-12-07 16:02:44 +00:00
jan.nijtmans 49baa37b9c Put dde/registry obj-files in the stub library in stead of the static library. Needed to combine --disable-shared build of Tk with --enable-shared build of Tcl in a single executable 2020-12-07 15:08:16 +00:00
jan.nijtmans f6bd13629f In configure/make Windows build, static builds include dde and registry extension statically too implicitly 2020-12-07 14:25:31 +00:00
jan.nijtmans 025153490f Merge 8.6 2020-12-07 13:57:11 +00:00
jan.nijtmans cf333de098 rules.vc: Make sure that 3th "load" argument is titlecased in pkgIndex.tcl 2020-12-07 13:53:21 +00:00
apnadkarni f3f92eae51 nmake: Generate libtcl_VERSION.zip as per TIP 430 2020-12-06 10:39:22 +00:00
apnadkarni 6343875344 Merge core-8-branch for new rules.vc 2020-12-06 09:39:25 +00:00
apnadkarni fcee72d2c7 Merge 8.6 2020-12-06 08:09:57 +00:00
apnadkarni fc71c7c2fc nmake builds: extract {TCL,TK}_RELEASE_SERIAL and patch letters from {tcl,tk}.h 2020-12-06 08:06:03 +00:00
apnadkarni 0f2d72cefb Create new branch named "apn-sfe" 2020-12-05 11:06:15 +00:00
apnadkarni e5bf8e9ed0 Fix suffix on single file exe name 2020-12-05 02:51:10 +00:00
jan.nijtmans 29be47f451 Merge 8.7 2020-12-04 15:32:17 +00:00
jan.nijtmans c47a861663 Merge 8.6 2020-12-04 10:44:13 +00:00
jan.nijtmans 0cdd87c215 Merge 8.5 (syncing "tcltest" package). Use more uppercase hex representations 2020-12-04 10:31:43 +00:00
jan.nijtmans cd48044e1b Backport "tcltest" package from 8.7. No changes when running on 8.5 or 8.6 2020-12-04 10:19:51 +00:00
jan.nijtmans 4fa48d135a Merge 8.6 2020-12-04 10:04:33 +00:00
jan.nijtmans 25084dcd33 Merge 8.5 2020-12-04 10:01:50 +00:00
jan.nijtmans 9a3e53bd90 TclWordEnd was removed in 8.1, so those testcases cannot be run anymore 2020-12-04 10:00:56 +00:00
jan.nijtmans ebd7b1edb7 Fix 4 socket testcases on Msys (those fail on Cygwin too) 2020-12-04 09:58:37 +00:00
jan.nijtmans 86cfccca91 TIP 590: Recommend lowercase Package Names 2020-12-04 09:56:08 +00:00
apnadkarni efb126543f Add makefile.vc target sfe for single-file executable 2020-12-03 16:50:23 +00:00
jan.nijtmans c30f3e9569 Merge 8.6 2020-12-03 14:39:19 +00:00
jan.nijtmans c99f354166 two more 0o??? notations 2020-12-03 13:57:56 +00:00
jan.nijtmans defc33228d Use 0o??? notation for octal numbers in tools and testcases in stead of 0???. Although it still works in 8.6, it is deprecated an will be removed in 9.0. 2020-12-03 13:51:18 +00:00
jan.nijtmans f23698ae34 Merge 8.6 2020-12-03 09:52:59 +00:00
jan.nijtmans 910d0222de Extend "platform" package for msys2 -> platform 1.0.15 2020-12-03 09:45:17 +00:00
jan.nijtmans a3322b06ac Fix syntax error in win/makefile.vc 2020-12-03 09:37:28 +00:00
jan.nijtmans 482091f871 Extend "platform" package for msys2 -> platform 1.0.15 2020-12-03 09:31:00 +00:00
jan.nijtmans b1517df3ff Simplify some \\u???? escape sequences to \\x?? 2020-12-03 09:09:25 +00:00
jan.nijtmans a2e1bdf3b5 Merge 8.6 2020-12-02 11:58:01 +00:00
jan.nijtmans c387e380de Don't use -opt:nowin98 linker option any more. See: [https://bugzilla.mozilla.org/show_bug.cgi?id=130372] 2020-12-02 11:57:04 +00:00
jan.nijtmans 1adac52046 Merge 8.6 2020-12-02 11:31:01 +00:00
jan.nijtmans 15449e71fb Merge 8.5 2020-12-02 11:29:52 +00:00
jan.nijtmans 02c730b298 Fix linker message on windows: LINK : warming LNK4108: /ALIGN specified without /DRIVER; image may not run.
This options was only useful on MSVC++ 5.0 and earlier, which is no longer supported
2020-12-02 11:19:57 +00:00
jan.nijtmans 9727e58e7d Add options to workflow step titles 2020-12-01 16:41:10 +00:00
jan.nijtmans 2f8611013d Do 4 types of windows builds (just as we did on Travis) 2020-12-01 16:35:59 +00:00
jan.nijtmans fc7a2d97e0 Remove redunant piece of SC_ENABLE_SHARED: The AC_ARG_ENABLE already generates this part, resulting in duplicate code in the "configure" script 2020-12-01 16:25:30 +00:00
jan.nijtmans 7c3b884ac2 Another TIP #589 side-effect: Make sure that the encoding used in ::tcltest::viewFile matches the one in ::tcltest::makeFile 2020-12-01 15:28:03 +00:00
jan.nijtmans 5878b9510b Fix 2 testcases in Windows. Cause: tcltest::makeFile should assume the same encoding as the "source" command uses (TIP #589)
Aso remove the ::tcltest::bytestring command: It doesn't work any more starting Tcl 8.7 since the "identity" encoding is gone (TIP #345)
2020-12-01 15:15:28 +00:00
jan.nijtmans 3ae4ed89d0 Remove incomplete stuff from .project: It is not enough to make actual building from within Eclipse possible 2020-12-01 12:17:18 +00:00
jan.nijtmans ff1e919a1b Merge-mark 2020-12-01 11:56:19 +00:00
jan.nijtmans d9fa72d22a Handle 5 test-failures on Cygwin/Msys 2020-12-01 11:54:35 +00:00
jan.nijtmans 3df3c35057 Merge 8.6 2020-12-01 08:53:12 +00:00
jan.nijtmans 92b25c6016 Merge 8.5 2020-12-01 08:50:57 +00:00
jan.nijtmans 53a9a5dc8f Missing '_' in unix/tcl.m4 (Only relevant for mingw) 2020-12-01 08:49:30 +00:00
jan.nijtmans 83f0cd1c03 Merge 8.6 2020-11-30 16:53:34 +00:00
jan.nijtmans fa960af760 Minor fixes + copy editing :). See [https://github.com/tcltk/tcl/pull/8] 2020-11-30 16:52:50 +00:00
jan.nijtmans 180cec8aa9 Merge 8.6 2020-11-30 14:20:34 +00:00
jan.nijtmans 17de94982b doc update: 16-bit DOS appllications are not supported any more.
Use &amp;bull; in stead of &amp;#8226; representing bullets in html
2020-11-30 14:16:23 +00:00
jan.nijtmans 0134af324d Merge 8.6 2020-11-30 13:37:14 +00:00
jan.nijtmans 87439e7d28 Fix [b6a7fc9243]. Also add (back) \*(qo, which might be used in older man-pages 2020-11-30 13:32:00 +00:00
jan.nijtmans 2ac074313b Fix [6b1c6bb09c]: Extended plane character does not encode correctly to UTF-16 with TCL_UTF_MAX==4
Als use more of TIP #587 in encoding.test
2020-11-30 12:18:19 +00:00
jan.nijtmans 7081037955 Merge 8.6 2020-11-30 08:57:18 +00:00
jan.nijtmans eb342fb1e0 Update README.md 2020-11-30 08:52:04 +00:00
jan.nijtmans 231cf96018 Merge 8.6 2020-11-30 08:46:27 +00:00
jan.nijtmans 4ba63aa46a Merge 8.5 2020-11-30 08:31:29 +00:00
jan.nijtmans 15194461b1 Cherry-pick part of "msys2-fixes_v001" branch: build/test fixes for msys2 2020-11-30 08:21:20 +00:00
dkf 2664737588 Added single-file distributions of Tcl for all main platforms.
These are *UNOFFICIAL* builds as they do not correspond to particular releases.

The macOS build is packaged in a .dmg with a README that explains how to run it
as the binary is not signed or notarized (and this is unlikely to change).
2020-11-27 18:13:10 +00:00
dkf 0cb78052e4 That's the best we can do without entering the morass that is signing/notarization on macOS; Windows now uses the right version IDs 2020-11-27 18:07:05 +00:00
jan.nijtmans 3c86724fcf Merge 8.6 2020-11-27 14:39:40 +00:00
jan.nijtmans 750dd56fe0 Merge 8.5 2020-11-27 14:37:41 +00:00
jan.nijtmans 5bf4c011e1 label change in win-build.yml 2020-11-27 14:28:18 +00:00
jan.nijtmans 965d357ab6 Merge 8.6 2020-11-27 13:50:33 +00:00
jan.nijtmans a2c547e12a Merge 8.5 2020-11-27 11:19:07 +00:00
dkf 8c7898b5d2 Better version ID, trying to track down weird macOS problem 2020-11-27 09:58:46 +00:00
jan.nijtmans 2ed258bb67 Fix winFCmd testcase. Add --disable-shared and TCL_UTF_MAX=4 builds to github actions 2020-11-27 07:41:58 +00:00
dkf 005227c53d Try to use a .dmg for macOS distribution 2020-11-26 20:09:11 +00:00
jan.nijtmans 96f84a6d9a Merge 8.6 2020-11-26 14:54:04 +00:00
jan.nijtmans 6ad60f8b3b Get rid of "register" keyword, forbidden in c++20.
Fix some more warnings, discovered in c20/c++20 mode
2020-11-26 14:43:22 +00:00
jan.nijtmans cf0a602c97 Merge 8.6 2020-11-26 08:28:35 +00:00
jan.nijtmans dbb32499b0 Merge 8.5 2020-11-26 08:21:30 +00:00
jan.nijtmans fd1bc4abd1 More TCL_UNUSED 2020-11-26 07:52:00 +00:00
jan.nijtmans 9393b695b2 squelch warning by using proper format specifiers 2020-11-26 07:37:40 +00:00
jan.nijtmans 7d9d9597aa grammar 2020-11-26 07:23:16 +00:00
jan.nijtmans 259f659ad6 Merge 8.7 2020-11-25 13:51:32 +00:00
dkf 49ad442ac6 Switch to older Ubuntu so that we build with older glibc. Thanks to morganw for testing. 2020-11-25 11:16:46 +00:00
jan.nijtmans e037b3a40c Make HTML documentation html5-compatible. Still works the same with older browsers too.
Remove obsolete winhelp construction parts: winhelp is obsoleted since Vista
2020-11-25 09:57:15 +00:00
jan.nijtmans 7c1cfd6e15 Merge 8.7 2020-11-25 09:52:14 +00:00
jan.nijtmans 1aa3608a1c Remove the Tcl_GetValue() functionality. This can always be developed separately 2020-11-25 09:16:11 +00:00
dkf cada5eb9bd Name of target is different 2020-11-25 09:13:55 +00:00
jan.nijtmans f33056b162 Slightly friendlier "jobs" labels. Fix exact OS (Linux/Mac/Windows) we want to build on, not just "latest" 2020-11-25 08:15:16 +00:00
dkf fc553a3ea1 Experimental branch: building single file distributions 2020-11-25 00:41:24 +00:00
jan.nijtmans aca216973f Some missing test-constraints 2020-11-24 15:04:05 +00:00
jan.nijtmans 1704d23d60 Fix testcases on Windows. Use more "info loaded" as appropriate 2020-11-24 14:45:38 +00:00
jan.nijtmans 188c4f944e contents.htm -> index.html and *.htm -> *.html 2020-11-24 08:24:12 +00:00
jan.nijtmans c15270a797 Fix "make dist" 2020-11-24 07:51:38 +00:00
jan.nijtmans a1dd05a170 More ©-sign consolidation 2020-11-23 09:16:00 +00:00
jan.nijtmans 55383ed9b1 Now that all Tcl source files are UTF-8 by default, we can use the ©-sign whenever reasonable. 2020-11-23 08:25:48 +00:00
jan.nijtmans a73325fed0 Merge 8.6 2020-11-20 14:58:13 +00:00
jan.nijtmans ee4dcff50f Don't use "Copyright &lt;year> _by_" any more. This results in more consistant copyright statements in the (html) documentation 2020-11-20 14:48:57 +00:00
jan.nijtmans e2721f9546 Merge 8.7 2020-11-20 14:08:43 +00:00
jan.nijtmans 32beb1556e Add a --disable-shared build to github actions 2020-11-20 14:02:01 +00:00
jan.nijtmans 467e0d60b2 Add a --disable-shared build to github actions 2020-11-20 13:59:36 +00:00
jan.nijtmans 4a451f540f Generate html documentation in html5 format. Fix some html5 compatibiliy warnings.
Remove old htmlhelp-related parts (since this is obsolete since Vista)
2020-11-20 13:46:59 +00:00
jan.nijtmans edcb5e1d91 shorten github actions build name 2020-11-20 08:58:39 +00:00
jan.nijtmans 58bf5b79b7 Merge 8.7 2020-11-20 08:44:50 +00:00
jan.nijtmans b4cc01c658 Merge 8.6 2020-11-20 08:26:02 +00:00
jan.nijtmans ef7a8aec00 Use '&' in stead of 'and' in copyright statements consistantly 2020-11-20 08:24:53 +00:00
jan.nijtmans e8b55fb733 Allow tools/tcltk-man2html.tcl to work with both configure.in and configure.ac: It could be used in extensions which still use an older autoconf 2020-11-19 15:11:04 +00:00
jan.nijtmans 17e7dbc31a Merge-mark 8.5 2020-11-19 15:07:10 +00:00
jan.nijtmans d1dfef4884 Handle github actions test failures. Backported from 8.6 2020-11-19 09:39:20 +00:00
jan.nijtmans 14ec7c1d85 Merge 8.7 2020-11-19 08:57:49 +00:00
jan.nijtmans 8e1f957a66 More usage of TclUtfToUCS4/TclUniCharToUCS4 in stead of it's UniChar variants: This handles surrogate pairs better. 2020-11-18 13:51:02 +00:00
jan.nijtmans c55eb93bb4 Merge 8.6 2020-11-18 11:03:11 +00:00
jan.nijtmans 26156cc1cc Merge 8.5 2020-11-18 10:59:37 +00:00
jan.nijtmans f7b532246a Enhance misleading test-case utf-6.23 with better diagnostics: Byte 0xE8 is the start of a 3-byte UTF-8 sequence, so Tcl_UtfNext is expected to read next byte and see if it is a continuation byte 2020-11-18 09:49:08 +00:00
jan.nijtmans c4b8fd351a Add github actions build. Use Titlecase in Tcl_StaticPackage 2020-11-18 09:15:31 +00:00
jan.nijtmans a28856a322 Merge 8.6 2020-11-17 14:36:30 +00:00
jan.nijtmans f88225f6fb Extend tcltk-man2html-utils.tcl a little more: Allow original AT&T syntax for more accented characters, and add support for some ligatures. Use this in re_syntax.n 2020-11-17 14:35:42 +00:00
dkf 6098040754 Test fails with Windows in CI, not MSVC 2020-11-17 12:36:59 +00:00
oehhar 48385f8bba Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing 2020-11-17 10:17:21 +00:00
oehhar 32e54c3504 Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing 2020-11-17 10:11:24 +00:00
jan.nijtmans da2c0d731a Merge 8.6 2020-11-17 09:12:55 +00:00
jan.nijtmans 4929dd61e1 Generated html still not 100% correct .... 2020-11-17 09:11:09 +00:00
jan.nijtmans 95fad70001 Merge 8.6 2020-11-17 08:46:06 +00:00
jan.nijtmans ffda48d07b Extend tcltk-man2html-utils.tcl: Add euro-sign too 2020-11-17 08:45:22 +00:00
jan.nijtmans b9fdbb0710 Merge 8.6 2020-11-17 08:41:07 +00:00
jan.nijtmans 969ef21225 Extend tcltk-man2html-utils.tcl, so it can handle the TIP #588 man-page. Also fix 2 (minor) syntax errors in man-pages 2020-11-17 08:39:19 +00:00
oehhar d7092f4a55 Merge documentation changes for http and dict from branch [oehhar-documentation-tickets] 2020-11-16 15:08:17 +00:00
oehhar 0566be32d5 Merge documentation changes for http and dict from branch [oehhar-documentation-tickets] 2020-11-16 15:03:25 +00:00
oehhar 45aa988905 Ticket [361303]: http doc: status values incomplete 2020-11-16 14:37:00 +00:00
oehhar 7fa0505ae8 Ticket [4f511270af7]: http documentation: -query data may be any data 2020-11-16 14:14:36 +00:00
oehhar 413ce795e0 Ticket [93551c1230]: Document that http::geturl processes the event loop without -command 2020-11-16 14:06:50 +00:00
oehhar 71a412b8da Ticket [d8ae5d5f4c]: Documentation of dict filter script: script results, not returns a boolean 2020-11-16 13:55:33 +00:00
jan.nijtmans 32d5f89b18 Merge 8.6 2020-11-16 13:17:35 +00:00
jan.nijtmans 0589f3b799 Fix 2 testcases which failed when compiled with TCL_UTF_MAX>3 2020-11-16 13:12:26 +00:00
jan.nijtmans c13d3b0405 Merge 8.6 2020-11-16 12:55:49 +00:00
jan.nijtmans 0943b71810 Enhance misleading test-case utf-6.23 with better diagnostics: Byte 0xE8 is the start of a 3-byte UTF-8 sequence, so Tcl_UtfNext is expected to read next byte and see if it is a continuation byte.
Comment 4 testcases (utf-6.110/111/114/115) for being misleading too, because they don't even call Tcl_UtfNext().
No change to code, only testcases
2020-11-16 12:48:00 +00:00
jan.nijtmans a3a070b13c TIP #586 implementation: C String Parsing Support for binary scan 2020-11-16 10:53:58 +00:00
dkf dac1c2f4f2 Merge 8.6 2020-11-16 10:06:20 +00:00
dkf 106838de02 Clean up for GitHub Actions as our CI service 2020-11-16 09:26:07 +00:00
dkf ffa8d1d461 Disable test that fails in CI environments 2020-11-16 09:24:33 +00:00
dkf eff08da703 Rethinking how to do a build matrix on several platforms 2020-11-15 15:48:43 +00:00
dkf 807ed7b13c Added MSYS/gcc build for Windows, renamed Linux build step 2020-11-15 09:17:41 +00:00
dkf 3ef704b39c Updated README 2020-11-15 08:38:14 +00:00
dkf 346721f3f0 Fix minor errors 2020-11-15 08:35:49 +00:00
dkf b3e4fc2a04 Fixed some tests, added trial macOS build 2020-11-14 12:25:38 +00:00
dkf a22953bb77 Back to powershell 2020-11-14 09:31:49 +00:00
jan.nijtmans d8f5e027e2 merge-mark 2020-11-13 16:59:36 +00:00
jan.nijtmans 8e61a58c14 Backport [fc1e203728]: backout e56a9f214a. If it was wrong in core-8-branch, it's wrong here too. 2020-11-13 16:55:36 +00:00
jan.nijtmans 8adc51759b Merge 8.7 2020-11-11 16:32:51 +00:00
culler c41e7ffff5 backout e56a9f214a 2020-11-10 18:47:47 +00:00
dgp bd382d87b3 merge 8.6 2020-11-10 18:38:43 +00:00
culler f809af7e7b Merge 8.6 2020-11-10 17:52:04 +00:00
culler a376924771 Set a default DESTDIR in macosx/GNUmakefile 2020-11-10 17:50:09 +00:00
dgp 1e44705dc8 merge 8.6 2020-11-10 16:40:14 +00:00
jan.nijtmans 72c49f6909 Merge 8.7. Tweak "tclreg" directory/library name and tclLoad.c, such that the entry point of the "dde" and "registry" extensions can be guessed correctly 2020-11-10 11:55:34 +00:00
dkf 20664f1fa1 Cleaning up the actions and trying to make them behave more usefully on Windows. 2020-11-10 09:26:10 +00:00
dkf 44d6e3ab5e merge mark 2020-11-09 09:15:00 +00:00
dkf 33955d6933 Copied build control files for Github Actions from 8.7 2020-11-09 09:13:57 +00:00
dkf f25b288505 Github Actions seem to be working 2020-11-09 09:07:42 +00:00
jan.nijtmans feb336f6b3 Lesser TIP #590 implementation: Only package renaming, no code changes 2020-11-06 09:59:46 +00:00
jan.nijtmans cccc07aa28 Merge 8.7 2020-11-05 17:06:22 +00:00
jan.nijtmans efe33a9fd9 Vary dltest package names for test purposes 2020-11-04 08:55:50 +00:00
jan.nijtmans ce3437bf88 Undo experimental unrelated changes 2020-11-03 16:40:32 +00:00
jan.nijtmans e69d8e8e92 Correct casing in some error-messages 2020-11-03 16:24:01 +00:00
jan.nijtmans 8607752aa6 Case-sensitive package names 2020-11-03 15:32:46 +00:00
dgp 27cdb091ce merge 8.6 2020-10-30 20:18:40 +00:00
jan.nijtmans d9737c5991 Merge 8.7 2020-10-30 15:13:12 +00:00
dgp 49268667e2 merge 8.6 2020-10-29 19:34:55 +00:00
jan.nijtmans fb3868da56 Merge 8.7 2020-10-28 15:10:36 +00:00
oehhar f145d5f091 Corrected doc: modifier C instead A 2020-10-28 06:59:12 +00:00
dgp f986721020 merge 8.6 2020-10-27 21:10:41 +00:00
jan.nijtmans 577981fee9 re-trigger Travis build (and fix some eol-spacing) 2020-10-26 14:45:47 +00:00
jan.nijtmans 2ae1425228 Merge 8.6. Update "changes", but left out numerous utf-8 testsuite changes and TZ update (since 2020d will come soon) 2020-10-26 14:38:05 +00:00
oehhar 31145f178e Copied man page and test from Androwish https://www.androwish.org/home/ci/bc8b7e8094b66169 2020-10-26 10:53:29 +00:00
oehhar 861d8f512f TIP586: C String Parsing Support for binary scan 2020-10-25 20:03:10 +00:00
jan.nijtmans 263312727f Merge 8.7 2020-10-24 14:41:49 +00:00
dgp d6340955cf merge 8.6 2020-10-23 12:53:44 +00:00
jan.nijtmans 021af90722 Merge 8.7 2020-10-22 14:31:26 +00:00
dgp 7d3aa74249 merge 8.6 2020-10-21 20:42:31 +00:00
culler c6927aa242 Merge 8.6 2020-10-19 19:45:47 +00:00
dgp bb9c489d22 merge 8.6 2020-10-19 14:09:14 +00:00
jan.nijtmans d970d6f3f6 Merge 8.7 2020-10-14 09:43:02 +00:00
jan.nijtmans cfc633e793 Merge 8.7 2020-10-14 06:08:50 +00:00
dgp a3b5f315c6 merge 8.6 2020-10-13 15:39:21 +00:00
dgp dac1dde5ee merge 8.6 2020-10-09 11:41:47 +00:00
dgp 359461f326 merge 8.6 2020-10-08 20:47:29 +00:00
dgp 5ef16060be merge 8.6 2020-10-07 14:55:25 +00:00
dgp cd8531d293 merge 8.6 2020-09-30 15:59:51 +00:00
dgp 4d4d50dc93 merge 8.6 2020-09-30 14:02:26 +00:00
dgp 0188c9979d merge 8.6 2020-09-28 13:07:29 +00:00
dgp 2394d76c65 merge 8.6 2020-09-21 14:10:25 +00:00
dgp d7aa18482a merge 8.6 2020-09-20 16:00:38 +00:00
dgp 8c327a0577 merge 8.6 2020-09-19 16:35:01 +00:00
dgp 1d9b09692d merge 8.6 2020-09-15 16:24:35 +00:00
dgp d281b9c141 merge 8.6 2020-08-05 17:07:18 +00:00
dgp d3aaff6a4e merge 8.6 2020-07-27 21:30:27 +00:00
dgp 64996d4c1a Some additions to changes. 2020-07-24 20:24:08 +00:00
dgp 9185af5e7a merge 8.6 2020-07-23 19:17:44 +00:00
dgp e2610bc7c7 merge 8.6 2020-07-10 18:42:34 +00:00
jan.nijtmans ae4f67d283 First bunch of changes. Please review! 2020-07-09 10:14:50 +00:00
dgp f289a9d57e merge 8.6 2020-07-07 15:32:20 +00:00
dgp c56d964dcb Bump to 8.6.11 for release. 2020-07-06 20:34:31 +00:00
jan.nijtmans a09671a0a0 Change implementation "charstart", not behaving as "prevchar" any more. Also optimize charend/charstart for TCL_UTF_MAX>3 (not need to do actual conversion then). 2020-05-29 13:36:58 +00:00
jan.nijtmans 494d65beb1 Remove nextword/prevword. Rename nextchar/prefchar to charend/charstart, for consistancy with wordend/wordstart. Slightly adapt wordend/wordstart when index is out of range. 2020-05-28 11:44:59 +00:00
jan.nijtmans 0fce9600ee Finish implementation of "string nextchar|nextword|prevchar|prevword". Not thourougly test yet, but seems OK at first sight. 2020-05-25 11:53:11 +00:00
jan.nijtmans 52819473a2 Merge-mark 2020-05-25 09:48:24 +00:00
jan.nijtmans 2d7e36f006 Fix "string is wordchar" in compiled case handling characters > U+FFFF. Adapt testcase exposing the problem. 2020-05-25 07:48:15 +00:00
jan.nijtmans 2b1daf9bb2 Put back "string bytelength", not _that_ important for this TIP.
Document that Tcl_UtfCharComplete() can be used now to protect Tcl_UtfNext()
2020-05-24 22:29:07 +00:00
jan.nijtmans 017257e0ef Rewrite "string wordend" to use the Tcl_UniChar array. 2020-05-23 22:07:53 +00:00
jan.nijtmans 1075137cfc Fix testsuite when "string bytelength" doesn't exist. 2020-05-23 21:51:12 +00:00
jan.nijtmans 0a2c1e30b1 Split more "string" functions. New helper function TclUniCharToUCS4(), not used yet but that's the next step. 2020-05-22 21:28:16 +00:00
jan.nijtmans d6deb4d6d9 New "string" subcommands: "nextchar", "nextword", "prevchar", "prevword". Not implemented yet (for now same as "wordstart"/"wordend"). Deprecate "string bytelength". 2020-05-22 15:27:43 +00:00
jan.nijtmans bc13dc596e Merge 8.7
Add function Tcl_UniCharFold(). It's the same as Tcl_UniCharToLower() for now, but that will change.
2020-05-22 14:36:34 +00:00
jan.nijtmans 8c514a6101 Merge 8.7. Update documentation 2020-05-18 10:51:17 +00:00
jan.nijtmans 9402bad3f4 Merge 8.7. Further progress with TIP implementation. 2020-05-13 22:07:13 +00:00
jan.nijtmans 648162204d First, experimental implementation of TIP #575. Barely tested, will fail. WIP 2020-05-12 18:59:04 +00:00
dgp e4c1bf052f Tests demonstrating the bug. Work on a fix can go here. 2020-04-26 20:49:43 +00:00
jan.nijtmans 35776acac0 Merge 8.7 2018-10-23 21:35:16 +00:00
jan.nijtmans 86ee149689 merge 8.7 2018-10-19 19:22:33 +00:00
jan.nijtmans d883e08781 Merge 8.7 2018-10-11 18:54:23 +00:00
jan.nijtmans 89d6aec1f9 Merge 8.7
Add Unsigned functions to the implementation. TIP text is still far behind describing what's going on here.
2018-10-09 18:12:41 +00:00
jan.nijtmans 617405c023 Re-base to 8.7 2018-10-08 22:22:14 +00:00
jan.nijtmans b616f99ca6 rebase 2013-07-09 09:30:34 +00:00
jan.nijtmans 6546b1dd3d Tk bug [http://core.tcl.tk/tk/tktview?name=1712098|1712098] 2013-06-28 12:31:47 +00:00
612 changed files with 41778 additions and 22719 deletions
-2
View File
@@ -7,7 +7,6 @@ compat/zlib/win64/*.txt
libtommath/*.dsp
libtommath/*.sln
libtommath/*.vcproj
tools/tcl.hpj.in
tools/tcl.wse.in
win/buildall.vc.bat
win/coffbase.txt
@@ -17,4 +16,3 @@ win/rules-ext.vc
win/targets.vc
win/tcl.dsp
win/tcl.dsw
win/tcl.hpj.in
+1 -3
View File
@@ -1,9 +1,7 @@
tools/tcl.hpj.in
tools/tcl.wse.in
win/buildall.vc.bat
win/coffbase.txt
win/makefile.vc
win/rules.vc
win/tcl.dsp
win/tcl.dsw
win/tcl.hpj.in
win/tcl.dsw
+1 -1
View File
@@ -1,3 +1,3 @@
Important Note
==========
Please do not file issues with Tcl on Github. They are unlikely to be noticed in a timely fashion. Tcl issues are hosted in the [tcl fossil repository on core.tcl.tk](https://core.tcl.tk/tcl/tktnew); please post them there.
Please do not file issues with Tcl on Github. They are unlikely to be noticed in a timely fashion. Tcl issues are hosted in the [tcl fossil repository on core.tcl-lang.org](https://core.tcl-lang.org/tcl/tktnew); please post them there.
+1 -1
View File
@@ -1,3 +1,3 @@
Important Note
==========
Please do not file pull requests with Tcl on Github. They are unlikely to be noticed in a timely fashion. Tcl issues (including patches) are hosted in the [tcl fossil repository on core.tcl.tk](https://core.tcl.tk/tcl/tktnew); please post them there.
Please do not file pull requests with Tcl on Github. They are unlikely to be noticed in a timely fashion. Tcl issues (including patches) are hosted in the [tcl fossil repository on core.tcl-lang.org](https://core.tcl-lang.org/tcl/tktnew); please post them there.
+25 -11
View File
@@ -1,37 +1,51 @@
name: Linux Build and Test
name: Linux
on: [push]
jobs:
build:
runs-on: ubuntu-latest
gcc:
runs-on: ubuntu-20.04
strategy:
matrix:
cfgopt:
- ""
- "CFLAGS=-DTCL_UTF_MAX=4"
- "CFLAGS=-DTCL_NO_DEPRECATED=1"
- "--disable-shared"
- "--enable-symbols"
- "--enable-symbols=mem"
defaults:
run:
shell: bash
working-directory: unix
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure
working-directory: unix
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
working-directory: generic
- name: Configure ${{ matrix.cfgopt }}
run: |
mkdir "${HOME}/install dir"
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
env:
CFGOPT: ${{ matrix.cfgopt }}
- name: Build
working-directory: unix
run: |
make all
- name: Build Test Harness
working-directory: unix
run: |
make tcltest
- name: Run Tests
working-directory: unix
run: |
make test
env:
ERROR_ON_FAILURES: 1
- name: Test-Drive Installation
working-directory: unix
run: |
make install
- name: Create Distribution Package
working-directory: unix
run: |
make dist
- name: Convert Documentation to HTML
working-directory: unix
run: |
make html-tcl
+63
View File
@@ -0,0 +1,63 @@
name: macOS
on: [push]
jobs:
xcode:
runs-on: macos-11
defaults:
run:
shell: bash
working-directory: macosx
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
working-directory: generic
- name: Build
run: make all
env:
CFLAGS: -arch x86_64 -arch arm64e
- name: Run Tests
run: make test styles=develop
env:
ERROR_ON_FAILURES: 1
MAC_CI: 1
clang:
runs-on: macos-11
strategy:
matrix:
cfgopt:
- ""
- "--disable-shared"
- "--enable-symbols"
- "--enable-symbols=mem"
defaults:
run:
shell: bash
working-directory: unix
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
mkdir "$HOME/install dir"
working-directory: generic
- name: Configure ${{ matrix.cfgopt }}
# Note that macOS is always a 64 bit platform
run: ./configure --enable-64bit --enable-dtrace --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1)
env:
CFLAGS: -arch x86_64 -arch arm64e
CFGOPT: ${{ matrix.cfgopt }}
- name: Build
run: |
make all tcltest
env:
CFLAGS: -arch x86_64 -arch arm64e
- name: Run Tests
run: |
make test
env:
ERROR_ON_FAILURES: 1
MAC_CI: 1
+144
View File
@@ -0,0 +1,144 @@
name: Build Binaries
on: [push]
jobs:
linux:
name: Linux
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
touch generic/tclStubInit.c generic/tclOOStubInit.c
mkdir 1dist
echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
working-directory: .
- name: Configure
run: ./configure --disable-symbols --disable-shared --enable-zipfs
working-directory: unix
- name: Build
run: |
make tclsh
make shell SCRIPT="$VER_PATH $GITHUB_ENV"
echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
working-directory: unix
- name: Package
run: |
cp ../unix/tclsh tclsh${TCL_PATCHLEVEL}_snapshot
chmod +x tclsh${TCL_PATCHLEVEL}_snapshot
tar -cf tclsh${TCL_PATCHLEVEL}_snapshot.tar tclsh${TCL_PATCHLEVEL}_snapshot
working-directory: 1dist
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (snapshot)
path: 1dist/*.tar
macos:
name: macOS
runs-on: macos-11
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout create-dmg
uses: actions/checkout@v2
with:
repository: create-dmg/create-dmg
ref: v1.0.8
path: create-dmg
- name: Prepare
run: |
mkdir 1dist
touch generic/tclStubInit.c generic/tclOOStubInit.c || true
wget https://github.com/culler/macher/releases/download/v1.3/macher
sudo cp macher /usr/local/bin
sudo chmod a+x /usr/local/bin/macher
echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV
echo "CFLAGS=-arch x86_64 -arch arm64e" >> $GITHUB_ENV
- name: Configure
run: ./configure --disable-symbols --disable-shared --enable-zipfs
working-directory: unix
- name: Build
run: |
make tclsh
make shell SCRIPT="$VER_PATH $GITHUB_ENV"
echo "TCL_BIN=`pwd`/tclsh" >> $GITHUB_ENV
echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
working-directory: unix
- name: Package
run: |
mkdir contents
cp $TCL_BIN contents/tclsh${TCL_PATCHLEVEL}_snapshot
chmod +x contents/tclsh${TCL_PATCHLEVEL}_snapshot
cat > contents/README.txt <<EOF
This is a single-file executable developer preview of Tcl $TCL_PATCHLEVEL
It is not intended as an official release at all, so it is unsigned and unnotarized.
Use strictly at your own risk.
To run it, you need to copy the executable out and run:
xattr -d com.apple.quarantine tclsh${TCL_PATCHLEVEL}_snapshot
to mark the executable as runnable on your machine.
EOF
$CREATE_DMG \
--volname "Tcl $TCL_PATCHLEVEL (snapshot)" \
--window-pos 200 120 \
--window-size 800 400 \
"Tcl-$TCL_PATCHLEVEL-(snapshot).dmg" \
"contents/"
working-directory: 1dist
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Tclsh ${{ env.TCL_PATCHLEVEL }} macOS single-file build (snapshot)
path: 1dist/*.dmg
win:
name: Windows
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
CC: gcc
CFGOPT: --disable-symbols --disable-shared
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: git mingw-w64-ucrt-x86_64-toolchain make zip
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
touch generic/tclStubInit.c generic/tclOOStubInit.c
echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
mkdir 1dist
working-directory: .
- name: Configure
run: ./configure $CFGOPT
working-directory: win
- name: Build
run: |
make binaries libraries
echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
working-directory: win
- name: Get Exact Version
run: |
./tclsh*.exe $VER_PATH $GITHUB_ENV
working-directory: win
- name: Set Executable Name
run: |
cp ../win/tclsh*.exe tclsh${TCL_PATCHLEVEL}_snapshot.exe
working-directory: 1dist
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (snapshot)
path: '1dist/*_snapshot.exe'
-37
View File
@@ -1,37 +0,0 @@
name: Linux Build and Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure
working-directory: unix
run: |
mkdir "${HOME}/install dir"
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
- name: Build
working-directory: unix
run: |
make all
- name: Build Test Harness
working-directory: unix
run: |
make tcltest
- name: Run Tests
working-directory: unix
run: |
make test
- name: Test-Drive Installation
working-directory: unix
run: |
make install
- name: Create Distribution Package
working-directory: unix
run: |
make dist
- name: Convert Documentation to HTML
working-directory: unix
run: |
make html-tcl
+78 -11
View File
@@ -1,22 +1,89 @@
name: Windows Build and Test
name: Windows
on: [push]
env:
ERROR_ON_FAILURES: 1
jobs:
build:
msvc:
runs-on: windows-latest
defaults:
run:
shell: powershell
working-directory: win
strategy:
matrix:
cfgopt:
- ""
- "OPTS=utfmax"
- "CHECKS=nodep"
- "OPTS=static"
- "OPTS=symbols"
- "OPTS=memdbg"
# Using powershell means we need to explicitly stop on failure
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build ${{ matrix.cfgopt }}
run: |
&nmake -f makefile.vc ${{ matrix.cfgopt }} all
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Build Test Harness ${{ matrix.cfgopt }}
run: |
&nmake -f makefile.vc ${{ matrix.cfgopt }} tcltest
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Run Tests ${{ matrix.cfgopt }}
run: |
&nmake -f makefile.vc ${{ matrix.cfgopt }} test
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
env:
CI_BUILD_WITH_MSVC: 1
gcc:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
working-directory: win
strategy:
matrix:
cfgopt:
- ""
- "CFLAGS=-DTCL_UTF_MAX=4"
- "CFLAGS=-DTCL_NO_DEPRECATED=1"
- "--disable-shared"
- "--enable-symbols"
- "--enable-symbols=mem"
# Using powershell means we need to explicitly stop on failure
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: git mingw-w64-x86_64-toolchain make
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
mkdir "${HOME}/install dir"
working-directory: generic
- name: Configure ${{ matrix.cfgopt }}
run: |
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
env:
CFGOPT: --enable-64bit ${{ matrix.cfgopt }}
- name: Build
working-directory: win
run: |
nmake -f makefile.vc all
run: make all
- name: Build Test Harness
working-directory: win
run: |
nmake -f makefile.vc tcltest
run: make tcltest
- name: Run Tests
working-directory: win
run: |
nmake -f makefile.vc test
run: make test
# If you add builds with Wine, be sure to define the environment variable
# CI_USING_WINE when running them so that broken tests know not to run.
-15
View File
@@ -5,22 +5,7 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>
+8 -54
View File
@@ -55,14 +55,6 @@ jobs:
env:
- BUILD_DIR=unix
- CFGOPT="--enable-symbols=mem"
# C++ build.
- name: "Linux/G++/Shared"
os: linux
dist: focal
compiler: g++
env:
- BUILD_DIR=unix
- CFGOPT="CC=g++ CFLAGS=-Dregister=dont+use+register"
# Newer/Older versions of GCC
- name: "Linux/GCC 10/Shared"
os: linux
@@ -147,14 +139,6 @@ jobs:
homebrew:
packages:
- libtommath
- name: "macOS/Clang++/Xcode 12/Shared"
os: osx
osx_image: xcode12.2
env:
- BUILD_DIR=unix
- CFGOPT="CC=clang++ --enable-framework --enable-dtrace CFLAGS=-Dregister=dont+use+register CPPFLAGS=-D__private_extern__=extern"
script:
- make all tcltest
# Newer MacOS versions
- name: "macOS/Clang/Xcode 12/Universal Apps/Shared"
os: osx
@@ -224,7 +208,6 @@ jobs:
- BUILD_DIR=win
- VCDIR="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"
before_install: &vcpreinst
- rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
- PATH="$PATH:$VCDIR"
- cd ${BUILD_DIR}
@@ -248,8 +231,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=nodep' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=nodep' '-f' makefile.vc test
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc test
- name: "Windows/MSVC/Static"
os: windows
compiler: cl
@@ -257,17 +240,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc test
- name: "Windows/MSVC/StaticPackage"
os: windows
compiler: cl
env: *vcenv
before_install: *vcpreinst
install: []
script:
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc test
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static' '-f' makefile.vc test
- name: "Windows/MSVC/Debug"
os: windows
compiler: cl
@@ -312,8 +286,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=nodep' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=nodep' '-f' makefile.vc test
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc test
- name: "Windows/MSVC-x86/Static"
os: windows
compiler: cl
@@ -321,8 +295,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc test
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static' '-f' makefile.vc all tcltest
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static' '-f' makefile.vc test
- name: "Windows/MSVC-x86/Debug"
os: windows
compiler: cl
@@ -349,7 +323,6 @@ jobs:
- BUILD_DIR=win
- CFGOPT="--enable-64bit"
before_install: &makepreinst
- rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
- choco install -y make zip
- cd ${BUILD_DIR}
@@ -367,15 +340,6 @@ jobs:
- BUILD_DIR=win
- CFGOPT="--enable-64bit CFLAGS=-DTCL_NO_DEPRECATED=1"
before_install: *makepreinst
- name: "Windows/G++/Shared"
os: windows
compiler: g++
env:
- BUILD_DIR=win
- CFGOPT="CC=g++ --enable-64bit"
before_install: *makepreinst
script:
- make all tcltest
- name: "Windows/GCC/Static"
os: windows
compiler: gcc
@@ -418,15 +382,6 @@ jobs:
- BUILD_DIR=win
- CFGOPT="CFLAGS=-DTCL_NO_DEPRECATED=1"
before_install: *makepreinst
- name: "Windows/G++-x86/Shared"
os: windows
compiler: g++
env:
- BUILD_DIR=win
- CFGOPT="CC=g++"
before_install: *makepreinst
script:
- make all tcltest
- name: "Windows/GCC-x86/Static"
os: windows
compiler: gcc
@@ -458,7 +413,6 @@ jobs:
script:
- make dist
before_install:
- rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
- cd ${BUILD_DIR}
install:
+1 -1
View File
@@ -8096,7 +8096,7 @@ a better first place to look now.
2009-03-25 Jan Nijtmans <nijtmans@users.sf.net>
* doc/tclsh.1: Bring doc and tools in line with
* tools/installData.tcl: http://wiki.tcl.tk/812
* tools/installData.tcl: https://wiki.tcl-lang.org/page/exec+magic
* tools/str2c
* tools/tcltk-man2html.tcl
+1 -1
View File
@@ -345,7 +345,7 @@
* library/clock.tcl: Corrected the regular expressions that match a
time zone to allow for time zones specified as +HH or -HH.
* tests/clock.test: Added regression test case for the above issue.
Thanks to Rolf Ade for reporting this issue [http://wiki.tcl.tk/13094]
Thanks to Rolf Ade for reporting this issue [https://wiki.tcl-lang.org/page/Parsing+ISO8601+dates+and+times]
* win/tclWinDde.c (Tcl_DdeObjCmd): Corrected a typo that caused a
compilation failure on VC++.
+1 -1
View File
@@ -5262,7 +5262,7 @@
* generic/tclStrToD.c: Added code to support the "middle endian"
floating point format used in the Nokia N770's software-based floating
point. Thanks to Bruce Johnson for reporting this bug, originally on
http://wiki.tcl.tk/15408.
https://wiki.tcl-lang.org/page/Nokia+770.
* library/clock.tcl: Fixed a bug with Daylight Saving Time and Posix
time zone specifiers reported by Martin Lemburg in
http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/9a8b15a4dfc0b7a0
+12 -20
View File
@@ -1,21 +1,13 @@
# README: Tcl
This is the **Tcl 8.7a4** source distribution.
This is the **Tcl 8.7a6** source distribution.
You can get any source release of Tcl from [our distribution
site](https://sourceforge.net/projects/tcl/files/Tcl/).
8.6.10
[![Build Status](https://github.com/tcltk/tcl/workflows/Linux%20Build%20and%20Test/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Acore-8-6-branch)
[![Build Status](https://github.com/tcltk/tcl/workflows/Windows%20Build%20and%20Test/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Acore-8-6-branch)
<br>
8.7a4
[![Build Status](https://github.com/tcltk/tcl/workflows/Linux%20Build%20and%20Test/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Acore-8-branch)
[![Build Status](https://github.com/tcltk/tcl/workflows/Windows%20Build%20and%20Test/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Acore-8-branch)
<br>
9.0a2
[![Build Status](https://github.com/tcltk/tcl/workflows/Linux%20Build%20and%20Test/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Amain)
[![Build Status](https://github.com/tcltk/tcl/workflows/Windows%20Build%20and%20Test/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Amain)
[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-branch)
[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-branch)
[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-branch)
## Contents
1. [Introduction](#intro)
@@ -39,21 +31,21 @@ powerful command languages for applications.
Tcl is maintained, enhanced, and distributed freely by the Tcl community.
Source code development and tracking of bug reports and feature requests
takes place at [core.tcl-lang.org](https://core.tcl-lang.org/).
take place at [core.tcl-lang.org](https://core.tcl-lang.org/).
Tcl/Tk release and mailing list services are [hosted by
SourceForge](https://sourceforge.net/projects/tcl/)
with the Tcl Developer Xchange hosted at
[www.tcl-lang.org](https://www.tcl-lang.org).
Tcl is a freely available open source package. You can do virtually
Tcl is a freely available open-source package. You can do virtually
anything you like with it, such as modifying it, redistributing it,
and selling it either in whole or in part. See the file
`license.terms` for complete information.
## <a id="doc">2.</a> Documentation
Extensive documentation is available at our website.
Extensive documentation is available on our website.
The home page for this release, including new features, is
[here](https://www.tcl.tk/software/tcltk/8.7.html).
[here](https://www.tcl-lang.org/software/tcltk/8.7.html).
Detailed release notes can be found at the
[file distributions page](https://sourceforge.net/projects/tcl/files/Tcl/)
by clicking on the relevant version.
@@ -98,16 +90,16 @@ about building Tcl from sources
[online](https://www.tcl-lang.org/doc/howto/compile.html).
## <a id="devtools">4.</a> Development tools
ActiveState produces a high quality set of commercial quality development
ActiveState produces a high-quality set of commercial quality development
tools that is available to accelerate your Tcl application development.
Tcl Dev Kit builds on the earlier TclPro toolset and provides a debugger,
static code checker, single-file wrapping utility, bytecode compiler and
static code checker, single-file wrapping utility, bytecode compiler, and
more. More information can be found at
http://www.ActiveState.com/Tcl
https://www.activestate.com/products/tcl/
## <a id="complangtcl">5.</a> Tcl newsgroup
There is a USENET news group, "`comp.lang.tcl`", intended for the exchange of
There is a USENET newsgroup, "`comp.lang.tcl`", intended for the exchange of
information about Tcl, Tk, and related applications. The newsgroup is a
great place to ask general information questions. For bug reports, please
see the "Support and bug fixes" section below.
+213 -3
View File
@@ -8843,7 +8843,7 @@ in this changeset (new minor version) rather than bug fixes:
2017-09-02 (bug)[0e4d88] replace command, delete trace kills namespace (porter)
--- Released 8.7a1, September 8, 2017 --- http://core.tcl.tk/tcl/ for details
--- Released 8.7a1, September 8, 2017 --- https://core.tcl-lang.org/tcl/ for details
2017-08-10 [array names -regexp] supports backrefs (goth)
@@ -8942,7 +8942,7 @@ in this changeset (new minor version) rather than bug fixes:
2018-11-16 (bug)[00d04c] Repair [binary encode base64] (sebres)
- Released 8.6.9, November 16, 2018 - details at http://core.tcl-lang.org/tcl/ -
- Released 8.6.9, November 16, 2018 - details at https://core.tcl-lang.org/tcl/ -
2018-11-22 (bug)[7a9dc5] [file normalize ~/~foo] segfault (sebres)
@@ -8990,7 +8990,136 @@ in this changeset (new minor version) rather than bug fixes:
2019-11-15 (bug)[135804] segfault in [next] after destroy (coulter,sebres)
- Released 8.6.10, Nov 21, 2019 - details at http://core.tcl-lang.org/tcl/ -
- Released 8.6.10, Nov 21, 2019 - details at https://core.tcl-lang.org/tcl/ -
2019-12-03 (bug)[3cd9be] Corner case in surrogate handling (nijtmans)
2019-12-09 (new) Add tcltest::(Setup|Eval|Cleanup|)Test (coulter,sebres)
=> tcltest 2.5.2
2019-12-12 (new) Add 3 libtommath functions to stub table (nijtmans)
2019-12-23 (bug)[ce3b9f] compilation errors with clang, windows msys2 (nijtmans)
2019-12-27 (bug)[1de6b0] [expr 1e2147483648] => 0.0 (kbk)
2020-01-04 (bug)[912886] tis-620 encoding fails to load (coulter)
2020-01-13 (bug)[0b9332] Win: support system encoding init to utf-8 (jedlička)
2020-01-17 (bug)[8cd2fe] [unload] corrupted list of loaded packages (berc)
2020-01-17 (bug)[5d989f] segfault in lsort for large list length (sebres)
2020-01-30 (bug) Reset WSAGetLastError()/errno in channel close (nijtmans)
2020-02-17 (bug) Win: avoid create of legacy error-vars on init phase (sebres)
2020-02-25 (bug) release refs when setting class's superclasses fails (dkf)
2020-02-26 (bug) C++ compiler compatibility for registry and dde (nijtmans)
=> registry 1.3.5
=> dde 1.4.3
2020-03-05 (new) Update to Unicode-13 (nijtmans)
2020-03-16 (bug)[8f89e2] Win: env var encoding, env-2.5 (sebres, nijtmans)
2020-03-27 (bug)[767e07] Tcl_Get(Range|UniChar) validate index inputs (nijtmans)
2020-03-28 (bug)[8edfce] [binary encode base64] & multi-byte wrapchars (dgp)
2020-03-28 (bug)[ffeb20] [binary decode base64] ignore invalid chars (dgp)
See RFC 2045
*** POTENTIAL INCOMPATIBILITY ***
2020-03-31 (bug)[b8e82d] some -maxlen values break uuencode round trip (dgp)
*** POTENTIAL INCOMPATIBILITY ***
2020-04-01 (bug)[f58371] Fileevent run in proper thread (bron,sebres)
2020-04-13 (bug)[afa4b2] TclNeedSpace bug; tests util-8.5 .. util-8.11 (dgp)
2020-04-13 (bug)[085913] Tcl_DStringAppendElement # quoting precision (dgp)
*** POTENTIAL INCOMPATIBILITY ***
2020-04-13 (bug)[a7f685] test util-5.52 (dgp)
2020-04-13 (bug)[c61818] Tcl_UtfPrev regression (dgp)
2020-04-15 (bug)[8af92d] zlib transform issue, bad inflate (sebres)
2020-04-16 (bug)[5e6346] Tcl_UtfPrev handling of overlong sequences (dgp)
2020-04-27 (bug)[45ca23] [string tolower] inconsistency (dgp)
2020-04-30 (bug)[da2352] init [info hostname] with DNS, not NetBIOS (nadkarni)
2020-05-11 (bug)[d402ff] Win32 potential crash when using main() (werner)
2020-05-13 (bug)[81242a] revised documentation for Tcl_UtfAtIndex() (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2020-05-13 (bug)[ed2980] Tcl_UtfToUniChar reads > TCL_UTF_MAX bytes (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2020-06-02 (bug) prevent segfault in parser (sebres)
2020-06-21 (bug)[f81bec] http POST a binary file (alakendu,nash)
=> http 2.9.2
2020-06-23 (bug)[41c985] auto_path nonsense in Safe Base (nash)
2020-06-24 (bug)[f70ce1] zlib multi-stream inflate acts only on first (sebres)
2020-07-09 (bug)[a1bd37] [clock scan] new ISO format (clock-34.(19-24)) (sebres)
*** POTENTIAL INCOMPATIBILITY ***
2020-07-10 (bug)[501974] [clock scan] +time zone (clock-34.(53-68)) (sebres)
*** POTENTIAL INCOMPATIBILITY ***
2020-07-15 (bug)[3c6e47] compiled [lappend] performance, avoid copy (sebres)
2020-07-16 (bug)[5bbd04] Fix index underflow (schwab)
2020-07-27 (bug)[cb0373] http::geturl -keepalive fixes (nash)
=> http 2.9.3
2020-08-10 (bug)[29e884] cmd resolution cycle (namespace-57.0) (coulter,sebres)
2020-08-12 (bug)[e87000] Tcl_BadChannelOption tolerate NULL (werner,nijtmans)
2020-08-31 (TIP #581) disfavor Master/Slave terminology (nijtmans)
=> opt 0.4.8
2020-09-11 (bug)[3bc0f4] UBSan complains about body.chars[] usage (nijtmans)
2020-09-17 (bug)[835c93] Support TIP 525 exit code for -singleproc 1 (nijtmans)
=> tcltest 2.5.3
2020-09-25 (new) force -eofchar \032 when evaluating library scripts (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2020-09-29 (bug)[0063cb] http::geturl -headers must be dict (oehlmann,nijtmans)
2020-10-19 (bug)[cb4582] Update install-sh script (stu,nijtmans)
2020-10-22 (bug)[c97593] Usage of gnu_printf in latest mingw-w64 (nijtmans)
2020-10-26 (new)[48898a] improve error message consistency (stu)
*** POTENTIAL INCOMPATIBILITY ***
2020-11-06 (new) revised case of module names (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2020-12-10 (bug)[ed5be7] Win: recognize "comx:" as serial port (oehlmann)
2020-12-11 (new) support for msys2, Big Sur (nijtmans)
=> platform 1.0.15
2020-12-23 tzdata updated to Olson's tzdata2020e (jima)
- Released 8.6.11, Dec 31, 2020 - details at https://core.tcl-lang.org/tcl/ -
Changes to 8.7a3 include all changes to the 8.6 line through 8.6.10,
plus the following, which focuses on the high-level feature changes
@@ -9099,6 +9228,9 @@ in this changeset (new minor version) rather than bug fixes:
2019-04-16 [TIP 342] [dict getwithdefault]
2019-04-23 (bug)[67a5ea] make [chan postevent] asynchronous
*** POTENTIAL INCOMPATIBILITY ***
2019-05-25 [TIP 431] [file tempdir]
2019-05-25 [TIP 383] [coroinject], [coroprobe]
@@ -9120,3 +9252,81 @@ in this changeset (new minor version) rather than bug fixes:
2019-09-14 [TIP 548] wchar_t conversion functions
- Released 8.7a3, Nov 21, 2019 --- http://core.tcl-lang.org/tcl/ for details -
Changes to 8.7a5 include all changes to the 8.6 line through 8.6.11,
plus the following, which focuses on the high-level feature changes
in this changeset (new minor version) rather than bug fixes:
2019-12-13 [TIP 538] Externalize libtommath
2020-01-20 [TIP 542] Support for switchable Full Unicode support
2020-01-21 [TIP 543] Eliminate `TCL_INTERP_DESTROYED` flag value
2020-01-24 [TIP 559] Eliminate public routine `Tcl_FreeResult
2020-01-31 (new) Implement 64-bit seek on Zip channels. (nijtmans)
2020-02-28 [TIP 557] C++ support for Tcl
2020-02-28 [TIP 562] Deprecate channel types 1-4
2020-03-11 (bug)[234d6c] Segfault in [set l {}; lpop l] (sebres)
2020-03-12 (bug) Crash in tests binary-79.[12] (porter)
2020-03-13 [TIP 569] Eliminate Comments That Serve Lint
2020-04-06 (bug)[dd010c] [string trim*] on astral characters (porter,nijtmans)
2020-05-30 [TIP 551] Permit underscore in numerical literals in source code
2020-07-03 [TIP 578] Death to TCL_DBGX
2020-08-11 (bug)[e87000] Win32 crash in [fconfigure stdout] (werner,nijtmans)
2020-09-06 (bug)[c1a376] deletion trace on imported ensemble (coulter)
2020-09-13 [TIP 585] Promote the INDEX_TEMP_TABLE flag of Tcl_GetIndexFromObj*() to the public interface
2020-09-15 (bug)[b5777d] crash in [string index abcd 0-0x10000000000000000]
2020-09-19 [b9ecf3] revised stork mgmt [uplevel [list $cmd ...]] (coulter)
2020-10-23 [TIP 587] Default utf-8 for source command
2020-10-27 (bug)[11229b] test string-31.26.* (porter)
2020-11-08 [TIP 582] Comments in Expressions
2020-11-16 [TIP 586] C String Parsing Support for binary scan
2020-12-07 [TIP 590] Recommend lowercase Package Names
2021-01-06 Bump to tcltest 2.5.4
2021-01-15 [TIP 481] `Tcl_GetStringFromObj()` with `size_t` length parameter
2021-01-15 [TIP 592] End support: Windows XP, Server 2003, Vista, Server 2008
2021-01-25 tzdata updated to Olson's tzdata2021a (nijtmans)
2021-01-29 (bug)[113be1] zipfs on mac
2021-03-15 [TIP 575] Switchable Tcl_UtfCharComplete()/Tcl_UtfNext()/Tcl_UtfPrev()
2021-03-19 (new)[0221b9] Drop TCL_WINDOW_EVENTS from Tcl's [update idletasks]
2021-03-30 (new)[4b4830] [chan truncate] for reflected channels
2021-04-30 [TIP 597] "string is unicode" and better utf-8/utf-16/cesu-8 encodings
2021-04-09 [TIP 598] export TclWinConvertError
2021-05-15 (bug)[463b7a] segfault from Tcl_Unload (coulter)
2021-05-15 (bug)[fb2a41] tclZipfs.c free all memory (coulter)
2021-05-18 (bug)[688fcc,28027d] namespace teardown reform (coulter)
- Released 8.7a5, Jun 18, 2021 --- http://core.tcl-lang.org/tcl/ for details -
+186 -186
View File
@@ -1,186 +1,186 @@
/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding
* version for AMD64 on Windows using Microsoft C compiler
*
* Copyright (C) 1995-2003 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Copyright (C) 2003 Chris Anderson <christop@charm.net>
* Please use the copyright conditions above.
*
* 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant
*
* inffas8664.c call function inffas8664fnc in inffasx64.asm
* inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
*
* Dec-29-2003 -- I added AMD64 inflate asm support. This version is also
* slightly quicker on x86 systems because, instead of using rep movsb to copy
* data, it uses rep movsw, which moves data in 2-byte chunks instead of single
* bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
* from http://fedora.linux.duke.edu/fc1_x86_64
* which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
* 1GB ram. The 64-bit version is about 4% faster than the 32-bit version,
* when decompressing mozilla-source-1.3.tar.gz.
*
* Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
* the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
* the moment. I have successfully compiled and tested this code with gcc2.96,
* gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
* compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
* enabled. I will attempt to merge the MMX code into this version. Newer
* versions of this and inffast.S can be found at
* http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
*
*/
#include <stdio.h>
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
/* Mark Adler's comments from inffast.c: */
/*
Decode literal, length, and distance codes and write out the resulting
literal and match bytes until either not enough input or output is
available, an end-of-block is encountered, or a data error is encountered.
When large enough input and output buffers are supplied to inflate(), for
example, a 16K input buffer and a 64K output buffer, more than 95% of the
inflate execution time is spent in this routine.
Entry assumptions:
state->mode == LEN
strm->avail_in >= 6
strm->avail_out >= 258
start >= strm->avail_out
state->bits < 8
On return, state->mode is one of:
LEN -- ran out of enough output space or enough available input
TYPE -- reached end of block code, inflate() to interpret next block
BAD -- error in block data
Notes:
- The maximum input bits used by a length/distance pair is 15 bits for the
length code, 5 bits for the length extra, 15 bits for the distance code,
and 13 bits for the distance extra. This totals 48 bits, or six bytes.
Therefore if strm->avail_in >= 6, then there is enough input to avoid
checking for available input while decoding.
- The maximum bytes that a single length/distance pair can output is 258
bytes, which is the maximum length that can be coded. inflate_fast()
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
typedef struct inffast_ar {
/* 64 32 x86 x86_64 */
/* ar offset register */
/* 0 0 */ void *esp; /* esp save */
/* 8 4 */ void *ebp; /* ebp save */
/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */
/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */
/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */
/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */
/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */
/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */
/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */
/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */
/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */
/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */
/* 92 48 */ unsigned wsize; /* window size */
/* 96 52 */ unsigned write; /* window write index */
/*100 56 */ unsigned lmask; /* r12 mask for lcode */
/*104 60 */ unsigned dmask; /* r13 mask for dcode */
/*108 64 */ unsigned len; /* r14 match length */
/*112 68 */ unsigned dist; /* r15 match distance */
/*116 72 */ unsigned status; /* set when state chng*/
} type_ar;
#ifdef ASMINF
void inflate_fast(strm, start)
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
struct inflate_state FAR *state;
type_ar ar;
void inffas8664fnc(struct inffast_ar * par);
#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))
#define PAD_AVAIL_IN 6
#define PAD_AVAIL_OUT 258
#else
#define PAD_AVAIL_IN 5
#define PAD_AVAIL_OUT 257
#endif
/* copy state to local variables */
state = (struct inflate_state FAR *)strm->state;
ar.in = strm->next_in;
ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN);
ar.out = strm->next_out;
ar.beg = ar.out - (start - strm->avail_out);
ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
ar.wsize = state->wsize;
ar.write = state->wnext;
ar.window = state->window;
ar.hold = state->hold;
ar.bits = state->bits;
ar.lcode = state->lencode;
ar.dcode = state->distcode;
ar.lmask = (1U << state->lenbits) - 1;
ar.dmask = (1U << state->distbits) - 1;
/* decode literals and length/distances until end-of-block or not enough
input data or output space */
/* align in on 1/2 hold size boundary */
while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) {
ar.hold += (unsigned long)*ar.in++ << ar.bits;
ar.bits += 8;
}
inffas8664fnc(&ar);
if (ar.status > 1) {
if (ar.status == 2)
strm->msg = "invalid literal/length code";
else if (ar.status == 3)
strm->msg = "invalid distance code";
else
strm->msg = "invalid distance too far back";
state->mode = BAD;
}
else if ( ar.status == 1 ) {
state->mode = TYPE;
}
/* return unused bytes (on entry, bits < 8, so in won't go too far back) */
ar.len = ar.bits >> 3;
ar.in -= ar.len;
ar.bits -= ar.len << 3;
ar.hold &= (1U << ar.bits) - 1;
/* update state and return */
strm->next_in = ar.in;
strm->next_out = ar.out;
strm->avail_in = (unsigned)(ar.in < ar.last ?
PAD_AVAIL_IN + (ar.last - ar.in) :
PAD_AVAIL_IN - (ar.in - ar.last));
strm->avail_out = (unsigned)(ar.out < ar.end ?
PAD_AVAIL_OUT + (ar.end - ar.out) :
PAD_AVAIL_OUT - (ar.out - ar.end));
state->hold = (unsigned long)ar.hold;
state->bits = ar.bits;
return;
}
#endif
/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding
* version for AMD64 on Windows using Microsoft C compiler
*
* Copyright (C) 1995-2003 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Copyright (C) 2003 Chris Anderson <christop@charm.net>
* Please use the copyright conditions above.
*
* 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant
*
* inffas8664.c call function inffas8664fnc in inffasx64.asm
* inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
*
* Dec-29-2003 -- I added AMD64 inflate asm support. This version is also
* slightly quicker on x86 systems because, instead of using rep movsb to copy
* data, it uses rep movsw, which moves data in 2-byte chunks instead of single
* bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
* from http://fedora.linux.duke.edu/fc1_x86_64
* which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
* 1GB ram. The 64-bit version is about 4% faster than the 32-bit version,
* when decompressing mozilla-source-1.3.tar.gz.
*
* Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
* the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
* the moment. I have successfully compiled and tested this code with gcc2.96,
* gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
* compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
* enabled. I will attempt to merge the MMX code into this version. Newer
* versions of this and inffast.S can be found at
* http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
*
*/
#include <stdio.h>
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
/* Mark Adler's comments from inffast.c: */
/*
Decode literal, length, and distance codes and write out the resulting
literal and match bytes until either not enough input or output is
available, an end-of-block is encountered, or a data error is encountered.
When large enough input and output buffers are supplied to inflate(), for
example, a 16K input buffer and a 64K output buffer, more than 95% of the
inflate execution time is spent in this routine.
Entry assumptions:
state->mode == LEN
strm->avail_in >= 6
strm->avail_out >= 258
start >= strm->avail_out
state->bits < 8
On return, state->mode is one of:
LEN -- ran out of enough output space or enough available input
TYPE -- reached end of block code, inflate() to interpret next block
BAD -- error in block data
Notes:
- The maximum input bits used by a length/distance pair is 15 bits for the
length code, 5 bits for the length extra, 15 bits for the distance code,
and 13 bits for the distance extra. This totals 48 bits, or six bytes.
Therefore if strm->avail_in >= 6, then there is enough input to avoid
checking for available input while decoding.
- The maximum bytes that a single length/distance pair can output is 258
bytes, which is the maximum length that can be coded. inflate_fast()
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
typedef struct inffast_ar {
/* 64 32 x86 x86_64 */
/* ar offset register */
/* 0 0 */ void *esp; /* esp save */
/* 8 4 */ void *ebp; /* ebp save */
/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */
/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */
/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */
/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */
/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */
/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */
/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */
/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */
/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */
/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */
/* 92 48 */ unsigned wsize; /* window size */
/* 96 52 */ unsigned write; /* window write index */
/*100 56 */ unsigned lmask; /* r12 mask for lcode */
/*104 60 */ unsigned dmask; /* r13 mask for dcode */
/*108 64 */ unsigned len; /* r14 match length */
/*112 68 */ unsigned dist; /* r15 match distance */
/*116 72 */ unsigned status; /* set when state chng*/
} type_ar;
#ifdef ASMINF
void inflate_fast(strm, start)
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
struct inflate_state FAR *state;
type_ar ar;
void inffas8664fnc(struct inffast_ar * par);
#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))
#define PAD_AVAIL_IN 6
#define PAD_AVAIL_OUT 258
#else
#define PAD_AVAIL_IN 5
#define PAD_AVAIL_OUT 257
#endif
/* copy state to local variables */
state = (struct inflate_state FAR *)strm->state;
ar.in = strm->next_in;
ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN);
ar.out = strm->next_out;
ar.beg = ar.out - (start - strm->avail_out);
ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
ar.wsize = state->wsize;
ar.write = state->wnext;
ar.window = state->window;
ar.hold = state->hold;
ar.bits = state->bits;
ar.lcode = state->lencode;
ar.dcode = state->distcode;
ar.lmask = (1U << state->lenbits) - 1;
ar.dmask = (1U << state->distbits) - 1;
/* decode literals and length/distances until end-of-block or not enough
input data or output space */
/* align in on 1/2 hold size boundary */
while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) {
ar.hold += (unsigned long)*ar.in++ << ar.bits;
ar.bits += 8;
}
inffas8664fnc(&ar);
if (ar.status > 1) {
if (ar.status == 2)
strm->msg = "invalid literal/length code";
else if (ar.status == 3)
strm->msg = "invalid distance code";
else
strm->msg = "invalid distance too far back";
state->mode = BAD;
}
else if ( ar.status == 1 ) {
state->mode = TYPE;
}
/* return unused bytes (on entry, bits < 8, so in won't go too far back) */
ar.len = ar.bits >> 3;
ar.in -= ar.len;
ar.bits -= ar.len << 3;
ar.hold &= (1U << ar.bits) - 1;
/* update state and return */
strm->next_in = ar.in;
strm->next_out = ar.out;
strm->avail_in = (unsigned)(ar.in < ar.last ?
PAD_AVAIL_IN + (ar.last - ar.in) :
PAD_AVAIL_IN - (ar.in - ar.last));
strm->avail_out = (unsigned)(ar.out < ar.end ?
PAD_AVAIL_OUT + (ar.end - ar.out) :
PAD_AVAIL_OUT - (ar.out - ar.end));
state->hold = (unsigned long)ar.hold;
state->bits = ar.bits;
return;
}
#endif
+275 -275
View File
@@ -1,275 +1,275 @@
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "zlib.h"
void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
{
R->HighPart = A.HighPart - B.HighPart;
if (A.LowPart >= B.LowPart)
R->LowPart = A.LowPart - B.LowPart;
else
{
R->LowPart = A.LowPart - B.LowPart;
R->HighPart --;
}
}
#ifdef _M_X64
// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc
unsigned __int64 __rdtsc(void);
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
// printf("rdtsc = %I64x\n",__rdtsc());
pbeginTime64->QuadPart=__rdtsc();
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER LIres;
unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
LIres.QuadPart=res;
// printf("rdtsc = %I64x\n",__rdtsc());
return LIres;
}
#else
#ifdef _M_IX86
void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
{
DWORD dwEdx,dwEax;
_asm
{
rdtsc
mov dwEax,eax
mov dwEdx,edx
}
pbeginTime64->LowPart=dwEax;
pbeginTime64->HighPart=dwEdx;
}
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
myGetRDTSC32(pbeginTime64);
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER LIres,endTime64;
myGetRDTSC32(&endTime64);
LIres.LowPart=LIres.HighPart=0;
MyDoMinus64(&LIres,endTime64,beginTime64);
return LIres;
}
#else
void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
{
}
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER lr;
lr.QuadPart=0;
return lr;
}
#endif
#endif
void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
{
if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
{
pbeginTime64->LowPart = GetTickCount();
pbeginTime64->HighPart = 0;
}
}
DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER endTime64,ticksPerSecond,ticks;
DWORDLONG ticksShifted,tickSecShifted;
DWORD dwLog=16+0;
DWORD dwRet;
if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
dwRet = (GetTickCount() - beginTime64.LowPart)*1;
else
{
MyDoMinus64(&ticks,endTime64,beginTime64);
QueryPerformanceFrequency(&ticksPerSecond);
{
ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
}
dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
dwRet *=1;
}
return dwRet;
}
int ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr)
{
FILE* stream;
unsigned char* ptr;
int retVal=1;
stream=fopen(filename, "rb");
if (stream==NULL)
return 0;
fseek(stream,0,SEEK_END);
*plFileSize=ftell(stream);
fseek(stream,0,SEEK_SET);
ptr=malloc((*plFileSize)+1);
if (ptr==NULL)
retVal=0;
else
{
if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
retVal=0;
}
fclose(stream);
*pFilePtr=ptr;
return retVal;
}
int main(int argc, char *argv[])
{
int BlockSizeCompress=0x8000;
int BlockSizeUncompress=0x8000;
int cprLevel=Z_DEFAULT_COMPRESSION ;
long lFileSize;
unsigned char* FilePtr;
long lBufferSizeCpr;
long lBufferSizeUncpr;
long lCompressedSize=0;
unsigned char* CprPtr;
unsigned char* UncprPtr;
long lSizeCpr,lSizeUncpr;
DWORD dwGetTick,dwMsecQP;
LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
if (argc<=1)
{
printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
return 0;
}
if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
{
printf("error reading %s\n",argv[1]);
return 1;
}
else printf("file %s read, %u bytes\n",argv[1],lFileSize);
if (argc>=3)
BlockSizeCompress=atol(argv[2]);
if (argc>=4)
BlockSizeUncompress=atol(argv[3]);
if (argc>=5)
cprLevel=(int)atol(argv[4]);
lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
lBufferSizeUncpr = lBufferSizeCpr;
CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
BeginCountPerfCounter(&li_qp,TRUE);
dwGetTick=GetTickCount();
BeginCountRdtsc(&li_rdtsc);
{
z_stream zcpr;
int ret=Z_OK;
long lOrigToDo = lFileSize;
long lOrigDone = 0;
int step=0;
memset(&zcpr,0,sizeof(z_stream));
deflateInit(&zcpr,cprLevel);
zcpr.next_in = FilePtr;
zcpr.next_out = CprPtr;
do
{
long all_read_before = zcpr.total_in;
zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
zcpr.avail_out = BlockSizeCompress;
ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
lOrigDone += (zcpr.total_in-all_read_before);
lOrigToDo -= (zcpr.total_in-all_read_before);
step++;
} while (ret==Z_OK);
lSizeCpr=zcpr.total_out;
deflateEnd(&zcpr);
dwGetTick=GetTickCount()-dwGetTick;
dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
printf("total compress size = %u, in %u step\n",lSizeCpr,step);
printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
}
CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
BeginCountPerfCounter(&li_qp,TRUE);
dwGetTick=GetTickCount();
BeginCountRdtsc(&li_rdtsc);
{
z_stream zcpr;
int ret=Z_OK;
long lOrigToDo = lSizeCpr;
long lOrigDone = 0;
int step=0;
memset(&zcpr,0,sizeof(z_stream));
inflateInit(&zcpr);
zcpr.next_in = CprPtr;
zcpr.next_out = UncprPtr;
do
{
long all_read_before = zcpr.total_in;
zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
zcpr.avail_out = BlockSizeUncompress;
ret=inflate(&zcpr,Z_SYNC_FLUSH);
lOrigDone += (zcpr.total_in-all_read_before);
lOrigToDo -= (zcpr.total_in-all_read_before);
step++;
} while (ret==Z_OK);
lSizeUncpr=zcpr.total_out;
inflateEnd(&zcpr);
dwGetTick=GetTickCount()-dwGetTick;
dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
}
if (lSizeUncpr==lFileSize)
{
if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
printf("compare ok\n");
}
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "zlib.h"
void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
{
R->HighPart = A.HighPart - B.HighPart;
if (A.LowPart >= B.LowPart)
R->LowPart = A.LowPart - B.LowPart;
else
{
R->LowPart = A.LowPart - B.LowPart;
R->HighPart --;
}
}
#ifdef _M_X64
// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc
unsigned __int64 __rdtsc(void);
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
// printf("rdtsc = %I64x\n",__rdtsc());
pbeginTime64->QuadPart=__rdtsc();
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER LIres;
unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
LIres.QuadPart=res;
// printf("rdtsc = %I64x\n",__rdtsc());
return LIres;
}
#else
#ifdef _M_IX86
void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
{
DWORD dwEdx,dwEax;
_asm
{
rdtsc
mov dwEax,eax
mov dwEdx,edx
}
pbeginTime64->LowPart=dwEax;
pbeginTime64->HighPart=dwEdx;
}
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
myGetRDTSC32(pbeginTime64);
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER LIres,endTime64;
myGetRDTSC32(&endTime64);
LIres.LowPart=LIres.HighPart=0;
MyDoMinus64(&LIres,endTime64,beginTime64);
return LIres;
}
#else
void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
{
}
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER lr;
lr.QuadPart=0;
return lr;
}
#endif
#endif
void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
{
if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
{
pbeginTime64->LowPart = GetTickCount();
pbeginTime64->HighPart = 0;
}
}
DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER endTime64,ticksPerSecond,ticks;
DWORDLONG ticksShifted,tickSecShifted;
DWORD dwLog=16+0;
DWORD dwRet;
if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
dwRet = (GetTickCount() - beginTime64.LowPart)*1;
else
{
MyDoMinus64(&ticks,endTime64,beginTime64);
QueryPerformanceFrequency(&ticksPerSecond);
{
ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
}
dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
dwRet *=1;
}
return dwRet;
}
int ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr)
{
FILE* stream;
unsigned char* ptr;
int retVal=1;
stream=fopen(filename, "rb");
if (stream==NULL)
return 0;
fseek(stream,0,SEEK_END);
*plFileSize=ftell(stream);
fseek(stream,0,SEEK_SET);
ptr=malloc((*plFileSize)+1);
if (ptr==NULL)
retVal=0;
else
{
if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
retVal=0;
}
fclose(stream);
*pFilePtr=ptr;
return retVal;
}
int main(int argc, char *argv[])
{
int BlockSizeCompress=0x8000;
int BlockSizeUncompress=0x8000;
int cprLevel=Z_DEFAULT_COMPRESSION ;
long lFileSize;
unsigned char* FilePtr;
long lBufferSizeCpr;
long lBufferSizeUncpr;
long lCompressedSize=0;
unsigned char* CprPtr;
unsigned char* UncprPtr;
long lSizeCpr,lSizeUncpr;
DWORD dwGetTick,dwMsecQP;
LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
if (argc<=1)
{
printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
return 0;
}
if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
{
printf("error reading %s\n",argv[1]);
return 1;
}
else printf("file %s read, %u bytes\n",argv[1],lFileSize);
if (argc>=3)
BlockSizeCompress=atol(argv[2]);
if (argc>=4)
BlockSizeUncompress=atol(argv[3]);
if (argc>=5)
cprLevel=(int)atol(argv[4]);
lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
lBufferSizeUncpr = lBufferSizeCpr;
CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
BeginCountPerfCounter(&li_qp,TRUE);
dwGetTick=GetTickCount();
BeginCountRdtsc(&li_rdtsc);
{
z_stream zcpr;
int ret=Z_OK;
long lOrigToDo = lFileSize;
long lOrigDone = 0;
int step=0;
memset(&zcpr,0,sizeof(z_stream));
deflateInit(&zcpr,cprLevel);
zcpr.next_in = FilePtr;
zcpr.next_out = CprPtr;
do
{
long all_read_before = zcpr.total_in;
zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
zcpr.avail_out = BlockSizeCompress;
ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
lOrigDone += (zcpr.total_in-all_read_before);
lOrigToDo -= (zcpr.total_in-all_read_before);
step++;
} while (ret==Z_OK);
lSizeCpr=zcpr.total_out;
deflateEnd(&zcpr);
dwGetTick=GetTickCount()-dwGetTick;
dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
printf("total compress size = %u, in %u step\n",lSizeCpr,step);
printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
}
CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
BeginCountPerfCounter(&li_qp,TRUE);
dwGetTick=GetTickCount();
BeginCountRdtsc(&li_rdtsc);
{
z_stream zcpr;
int ret=Z_OK;
long lOrigToDo = lSizeCpr;
long lOrigDone = 0;
int step=0;
memset(&zcpr,0,sizeof(z_stream));
inflateInit(&zcpr);
zcpr.next_in = CprPtr;
zcpr.next_out = UncprPtr;
do
{
long all_read_before = zcpr.total_in;
zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
zcpr.avail_out = BlockSizeUncompress;
ret=inflate(&zcpr,Z_SYNC_FLUSH);
lOrigDone += (zcpr.total_in-all_read_before);
lOrigToDo -= (zcpr.total_in-all_read_before);
step++;
} while (ret==Z_OK);
lSizeUncpr=zcpr.total_out;
inflateEnd(&zcpr);
dwGetTick=GetTickCount()-dwGetTick;
dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
}
if (lSizeUncpr==lFileSize)
{
if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
printf("compare ok\n");
}
return 0;
}
+1 -1
View File
@@ -20,7 +20,7 @@ int
\fBTcl_Stat\fR(\fIpath\fR, \fIstatPtr\fR)
.SH ARGUMENTS
.AS "struct stat" *statPtr out
.AP char *path in
.AP "const char" *path in
Native name of the file to check the attributes of.
.AP int mode in
Mask consisting of one or more of \fBR_OK\fR, \fBW_OK\fR, \fBX_OK\fR and
+18 -2
View File
@@ -49,7 +49,7 @@ Interpreter in which to record information.
The code returned from script evaluation.
.AP Tcl_Obj *options
A dictionary of return options.
.AP char *message in
.AP "const char" *message in
For \fBTcl_AddErrorInfo\fR,
this is a conventional C string to append to the \fB\-errorinfo\fR return option.
For \fBTcl_AddObjErrorInfo\fR,
@@ -66,7 +66,7 @@ appending to the \fB\-errorinfo\fR return option.
If negative, all bytes up to the first null byte are used.
.AP Tcl_Obj *errorObjPtr in
The \fB\-errorcode\fR return option will be set to this value.
.AP char *element in
.AP "const char" *element in
String to record as one element of the \fB\-errorcode\fR return option.
Last \fIelement\fR argument must be NULL.
.AP va_list argList in
@@ -308,6 +308,22 @@ The global variables \fBerrorInfo\fR and
\fBerrorCode\fR are not modified by \fBTcl_ResetResult\fR
so they continue to hold a record of information about the
most recent error seen in an interpreter.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The result of \fBTcl_GetReturnOptions\fR will have at least one
reference to it from the Tcl interpreter. If not using it immediately,
you should use \fBTcl_IncrRefCount\fR to add your own reference.
.PP
The \fIoptions\fR argument to \fBTcl_SetReturnOptions\fR will have a
reference added by the Tcl interpreter; it may safely be called with a
zero-reference value.
.PP
\fBTcl_AppendObjToErrorInfo\fR only reads its \fIobjPtr\fR argument;
it does not modify its reference count at all.
.PP
The \fIerrorObjPtr\fR argument to \fBTcl_SetObjErrorCode\fR will have a
reference added by the Tcl interpreter; it may safely be called with a
zero-reference value.
.SH "SEE ALSO"
Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_Interp(3), Tcl_ResetResult(3),
Tcl_SetErrno(3), errorCode(n), errorInfo(n)
+10 -1
View File
@@ -8,7 +8,7 @@
.so man.macros
.BS
.SH NAME
Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, ckalloc, ckfree, ckrealloc, attemptckalloc, attemptckrealloc \- allocate or free heap memory
Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, Tcl_GetMemoryInfo, ckalloc, ckfree, ckrealloc, attemptckalloc, attemptckrealloc \- allocate or free heap memory
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -28,6 +28,9 @@ char *
char *
\fBTcl_AttemptRealloc\fR(\fIptr, size\fR)
.sp
void
\fBTcl_GetMemoryInfo\fR(\fIdsPtr\fR)
.sp
char *
\fBckalloc\fR(\fIsize\fR)
.sp
@@ -48,6 +51,8 @@ char *
Size in bytes of the memory block to allocate.
.AP char *ptr in
Pointer to memory block to free or realloc.
.AP Tcl_DString *dsPtr in
Initialized DString pointer.
.BE
.SH DESCRIPTION
@@ -88,5 +93,9 @@ these macros are redefined to be special debugging versions
of these procedures. To support Tcl's memory debugging within a
module, use the macros rather than direct calls to \fBTcl_Alloc\fR, etc.
\fBTcl_GetMemoryInfo\fR appends a list-of-lists of memory stats to the
provided DString. This function cannot be used in stub-enabled extensions,
and it is only available if Tcl is compiled with the threaded memory allocator.
.SH KEYWORDS
alloc, allocation, free, malloc, memory, realloc, TCL_MEM_DEBUG
+23 -12
View File
@@ -9,7 +9,7 @@
.so man.macros
.BS
.SH NAME
Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncInvoke, Tcl_AsyncDelete, Tcl_AsyncReady \- handle asynchronous events
Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncMarkFromSignal, Tcl_AsyncInvoke, Tcl_AsyncDelete, Tcl_AsyncReady \- handle asynchronous events
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -17,11 +17,16 @@ Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncInvoke, Tcl_AsyncDelete, Tcl_AsyncReady
Tcl_AsyncHandler
\fBTcl_AsyncCreate\fR(\fIproc, clientData\fR)
.sp
void
\fBTcl_AsyncMark\fR(\fIasync\fR)
.sp
int
\fBTcl_AsyncMarkFromSignal\fR(\fIasync\fR, \fIsigNumber\fR)
.sp
int
\fBTcl_AsyncInvoke\fR(\fIinterp, code\fR)
.sp
void
\fBTcl_AsyncDelete\fR(\fIasync\fR)
.sp
int
@@ -34,6 +39,8 @@ Procedure to invoke to handle an asynchronous event.
One-word value to pass to \fIproc\fR.
.AP Tcl_AsyncHandler async in
Token for asynchronous event handler.
.AP int sigNumber in
POSIX signal number, when used in a signal context.
.AP Tcl_Interp *interp in
Tcl interpreter in which command was being evaluated when handler was
invoked, or NULL if handler was invoked when there was no interpreter
@@ -60,10 +67,11 @@ to a clean state, such as after the current Tcl command completes.
.PP
\fBTcl_AsyncCreate\fR, \fBTcl_AsyncDelete\fR, and \fBTcl_AsyncReady\fR
are thread sensitive. They access and/or set a thread-specific data
structure in the event of a core built with \fI\-\-enable\-threads\fR. The token
created by \fBTcl_AsyncCreate\fR contains the needed thread information it
was called from so that calling \fBTcl_AsyncMark\fR(\fItoken\fR) will only yield
the origin thread into the asynchronous handler.
structure in the event of a core built with \fI\-\-enable\-threads\fR.
The token created by \fBTcl_AsyncCreate\fR contains the needed thread
information it was called from so that calling \fBTcl_AsyncMarkFromSignal\fR
or \fBTcl_AsyncMark\fR with this token will only yield the origin
thread into the asynchronous handler.
.PP
\fBTcl_AsyncCreate\fR creates an asynchronous handler and returns
a token for it.
@@ -72,13 +80,16 @@ any occurrences of the asynchronous event that it is intended
to handle (it is not safe to create a handler at the time of
an event).
When an asynchronous event occurs the code that detects the event
(such as a signal handler) should call \fBTcl_AsyncMark\fR with the
token for the handler.
\fBTcl_AsyncMark\fR will mark the handler as ready to execute, but it
will not invoke the handler immediately.
Tcl will call the \fIproc\fR associated with the handler later, when
the world is in a safe state, and \fIproc\fR can then carry out
the actions associated with the asynchronous event.
(such as a POSIX signal handler) should call \fBTcl_AsyncMarkFromSignal\fR
with the token for the handler and the POSIX signal number. The
return value of this function is true, when the handler will be
marked, false otherwise.
For non-signal contexts, \fBTcl_AsyncMark\fR serves the same purpose.
\fBTcl_AsyncMarkFromSignal\fR and \fBTcl_AsyncMark\fR will mark
the handler as ready to execute, but will not invoke the handler
immediately. Tcl will call the \fIproc\fR associated with the
handler later, when the world is in a safe state, and \fIproc\fR
can then carry out the actions associated with the asynchronous event.
\fIProc\fR should have arguments and result that match the
type \fBTcl_AsyncProc\fR:
.PP
+1 -1
View File
@@ -18,7 +18,7 @@ char
\fBTcl_Backslash\fR(\fIsrc, countPtr\fR)
.SH ARGUMENTS
.AS char *countPtr out
.AP char *src in
.AP "const char" *src in
Pointer to a string starting with a backslash.
.AP int *countPtr out
If \fIcountPtr\fR is not NULL, \fI*countPtr\fR gets filled
+12
View File
@@ -88,6 +88,18 @@ will lead to a \fBTCL_OK\fR return (and the boolean value 1),
while the same value passed to \fBTcl_GetBoolean\fR will lead to
a \fBTCL_ERROR\fR return.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_NewBooleanObj\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR.
.PP
\fBTcl_SetBooleanObj\fR does not modify the reference count of its
\fIobjPtr\fR argument, but does require that the object be unshared.
.PP
\fBTcl_GetBooleanFromObj\fR does not modify the reference count of its
\fIobjPtr\fR argument; it only reads. Note however that this function
may set the interpreter result; if that is the only place that
is holding a reference to the object, it will be deleted.
.SH "SEE ALSO"
Tcl_NewObj, Tcl_IsShared, Tcl_GetBoolean
+15 -2
View File
@@ -37,8 +37,9 @@ byte-array type. For \fBTcl_GetByteArrayFromObj\fR and
\fBTcl_SetByteArrayLength\fR, this points to the value from which to get
the byte-array value; if \fIobjPtr\fR does not already point to a byte-array
value, it will be converted to one.
.AP int *lengthPtr out
If non-NULL, filled with the length of the array of bytes in the value.
.AP size_t | int *lengthPtr out
Filled with the length of the array of bytes in the value.
May be (int *)NULL when not used.
.BE
.SH DESCRIPTION
@@ -84,6 +85,18 @@ newly allocated bytes at the end of the array have arbitrary values. If
the length of array is reduced to the new length. The return value is a
pointer to the value's new array of bytes.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_NewByteArrayObj\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR.
.PP
\fBTcl_SetByteArrayObj\fR and \fBTcl_SetByteArrayLength\fR do not modify the
reference count of their \fIobjPtr\fR arguments, but do require that the
object be unshared.
.PP
\fBTcl_GetByteArrayFromObj\fR does not modify the reference count of its
\fIobjPtr\fR argument; it only reads.
.SH "SEE ALSO"
Tcl_GetStringFromObj, Tcl_NewObj, Tcl_IncrRefCount, Tcl_DecrRefCount
+8
View File
@@ -67,6 +67,14 @@ other procedures. If an error is returned and this bit is set in
result, where it can be retrieved with \fBTcl_GetObjResult\fR or
\fBTcl_GetStringResult\fR. If this flag bit is not set then no error
message is left and the interpreter's result will not be modified.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_CancelEval\fR always decrements the reference count of its
\fIresultObjPtr\fR argument (if that is non-NULL). It is expected to
be usually called with an object with zero reference count. If the
object is shared with some other location (including the Tcl
evaluation stack) it should have its reference count incremented
before calling this function.
.SH "SEE ALSO"
interp(n), Tcl_Eval(3),
TIP 285
+23
View File
@@ -241,6 +241,29 @@ NULL if the whole chain is to be processed (the argument itself is never
NULL); this variable may be updated by the callback. The \fImethodNameObj\fR
parameter gives an unshared object containing the name of the method being
invoked, as provided by the user; this object may be updated by the callback.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fIobjPtr\fR argument to \fBTcl_GetObjectFromObj\fR will not have its
reference count manipulated, but this function may modify the interpreter
result (to report any error) so interpreter results should not be fed into
this without an additional reference being used.
.PP
The result of \fBTcl_GetObjectName\fR is a value that is owned by the object
that is regenerated when this function is first called after the object is
renamed. If the value is to be retained at all, the caller should increment
the reference count.
.PP
The first \fIobjc\fR values in the \fIobjv\fR argument to
\fBTcl_NewObjectInstance\fR are the arguments to pass to the constructor. They
must have a reference count of at least 1, and may have their reference counts
changed during the running of the constructor. Constructors may modify the
interpreter result, which consequently means that interpreter results should
not be used as arguments without an additional reference being taken.
.PP
The \fImethodNameObj\fR argument to a Tcl_ObjectMapMethodNameProc
implementation will be a value with a reference count of at least 1 where at
least one reference is not held by the interpreter result. It is expected that
method name mappers will only read their \fImethodNameObj\fR arguments.
.SH "SEE ALSO"
Method(3), oo::class(n), oo::copy(n), oo::define(n), oo::object(n)
.SH KEYWORDS
+9 -1
View File
@@ -243,8 +243,16 @@ any script evaluation mechanism will fail.
.PP
For a description of the Tcl interface to multiple interpreters, see
\fIinterp(n)\fR.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_CreateAliasObj\fR increments the reference counts of the values
in its \fIobjv\fR argument. (That reference lasts the same length of
time as the owning alias.)
.PP
\fBTcl_GetAliasObj\fR returns (via its \fIobjvPtr\fR argument) a
pointer to values that it holds a reference to.
.SH "SEE ALSO"
interp
interp(n)
.SH KEYWORDS
alias, command, exposed commands, hidden commands, interpreter, invoke,
+5 -4
View File
@@ -259,7 +259,8 @@ outside this range, \fBTcl_SetChannelBufferSize\fR sets the buffer size to
the generic layer that the events specified by \fImask\fR have
occurred on the channel. Channel drivers are responsible for invoking
this function whenever the channel handlers need to be called for the
channel. See \fBWATCHPROC\fR below for more details.
channel (or other pending tasks like a write flush should be performed).
See \fBWATCHPROC\fR below for more details.
.PP
\fBTcl_BadChannelOption\fR is called from driver specific
\fIsetOptionProc\fR or \fIgetOptionProc\fR to generate a complete
@@ -599,9 +600,9 @@ in preference to the \fIseekProc\fR, but both must be defined if the
following prototype:
.PP
.CS
typedef Tcl_WideInt \fBTcl_DriverWideSeekProc\fR(
typedef long long \fBTcl_DriverWideSeekProc\fR(
ClientData \fIinstanceData\fR,
Tcl_WideInt \fIoffset\fR,
long long \fIoffset\fR,
int \fIseekMode\fR,
int *\fIerrorCodePtr\fR);
.CE
@@ -823,7 +824,7 @@ length. It can be NULL.
.CS
typedef int \fBTcl_DriverTruncateProc\fR(
ClientData \fIinstanceData\fR,
Tcl_WideInt \fIlength\fR);
long long \fIlength\fR);
.CE
.PP
\fIInstanceData\fR is the same as the value passed to
+4
View File
@@ -156,6 +156,10 @@ pointed to by \fIargTypesPointer\fR.
\fBTcl_ListMathFuncs\fR returns a Tcl value containing a list of all
the math functions defined in the interpreter whose name matches
\fIpattern\fR. The returned value has a reference count of zero.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_ListMathFuncs\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR.
.SH "SEE ALSO"
expr(n), info(n), Tcl_CreateObjCommand(3), Tcl_Free(3), Tcl_NewListObj(3)
.SH KEYWORDS
+16 -1
View File
@@ -54,7 +54,7 @@ const char *
.AS Tcl_CmdDeleteProc *deleteProc in/out
.AP Tcl_Interp *interp in
Interpreter in which to create a new command or that contains a command.
.AP char *cmdName in
.AP "const char" *cmdName in
Name of command.
.AP Tcl_ObjCmdProc *proc in
Implementation of the new command: \fIproc\fR will be called whenever
@@ -323,6 +323,21 @@ instead. The result from \fBTcl_GetCommandTypeName\fR will be exactly that
string which was registered, and not a copy; use of a compile-time constant
string is \fIstrongly recommended\fR.
.VE "info cmdtype feature"
.SH "REFERENCE COUNT MANAGEMENT"
.PP
When the \fIproc\fR passed to \fBTcl_CreateObjCommand\fR is called,
the values in its \fIobjv\fR argument will have a reference count of
at least 1, with that guaranteed reference being from the Tcl
evaluation stack. You should not call \fBTcl_DecrRefCount\fR on any of
those values unless you call \fBTcl_IncrRefCount\fR on them first.
Also, when the \fIproc\fR is called, the interpreter result is
guaranteed to be an empty string value with a reference count of 1.
.PP
\fBTcl_GetCommandFullName\fR does not modify the reference count of its
\fIobjPtr\fR argument, but does require that the object be unshared.
.PP
\fBTcl_GetCommandFromObj\fR does not modify the reference count of its
\fIobjPtr\fR argument; it only reads.
.SH "SEE ALSO"
Tcl_CreateCommand(3), Tcl_ResetResult(3), Tcl_SetObjResult(3)
.SH KEYWORDS
+10 -1
View File
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1989-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 2002 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
'\" Copyright (c) 2002 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -187,5 +187,14 @@ There is no way to be notified when the trace created by
\fBTcl_CreateTrace\fR is deleted. There is no way for the \fIproc\fR
associated with a call to \fBTcl_CreateTrace\fR to abort execution of
\fIcommand\fR.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
When the \fIproc\fR passed to \fBTcl_CreateObjTrace\fR is called,
the values in its \fIobjv\fR argument will have a reference count of
at least 1, with that guaranteed reference being from the Tcl
evaluation stack. You should not call \fBTcl_DecrRefCount\fR on any of
those values unless you call \fBTcl_IncrRefCount\fR on them first.
.SH "SEE ALSO"
trace(n)
.SH KEYWORDS
command, create, delete, interpreter, trace
+67
View File
@@ -190,6 +190,73 @@ path as this is easy to construct from repeated use of
dictionaries are created for non-terminal keys where they do not
already exist. With \fBTcl_DictObjRemoveKeyList\fR, all non-terminal
keys must exist and have dictionaries as their values.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_NewDictObj\fR always returns a zero-reference object, much like
\fBTcl_NewObj\fR.
.PP
\fBTcl_DictObjPut\fR does not modify the reference count of its \fIdictPtr\fR
argument, but does require that the object be unshared. If
\fBTcl_DictObjPut\fR returns \fBTCL_ERROR\fR it does not manipulate any
reference counts; but if it returns \fBTCL_OK\fR then it definitely increments
the reference count of \fIvaluePtr\fR and may increment the reference count of
\fIkeyPtr\fR; the latter case happens exactly when the key did not previously
exist in the dictionary. Note however that this function may set the
interpreter result; if that is the only place that is holding a reference to
an object, it will be deleted.
.PP
\fBTcl_DictObjGet\fR only reads from its \fIdictPtr\fR and \fIkeyPtr\fR
arguments, and does not manipulate their reference counts at all. If the
\fIvaluePtrPtr\fR argument is not set to NULL (and the function doesn't return
\fBTCL_ERROR\fR), it will be set to a value with a reference count of at least
1, with a reference owned by the dictionary. Note however that this function
may set the interpreter result; if that is the only place that is holding a
reference to an object, it will be deleted.
.PP
\fBTcl_DictObjRemove\fR does not modify the reference count of its
\fIdictPtr\fR argument, but does require that the object be unshared. It does
not manipulate the reference count of its \fIkeyPtr\fR argument at all. Note
however that this function may set the interpreter result; if that is the only
place that is holding a reference to an object, it will be deleted.
.PP
\fBTcl_DictObjSize\fR does not modify the reference count of its \fIdictPtr\fR
argument; it only reads. Note however that this function may set the
interpreter result; if that is the only place that is holding a reference to
the dictionary object, it will be deleted.
.PP
\fBTcl_DictObjFirst\fR does not modify the reference count of its
\fIdictPtr\fR argument; it only reads. The variables given by the
\fIkeyPtrPtr\fR and \fIvaluePtrPtr\fR arguments (if not NULL) will be updated
to contain references to the relevant values in the dictionary; their
reference counts will be at least 1 (due to the dictionary holding a reference
to them). It may also manipulate internal references; these are not exposed to
user code, but require a matching \fBTcl_DictObjDone\fR call. Note however
that this function may set the interpreter result; if that is the only place
that is holding a reference to the dictionary object, it will be deleted.
.PP
Similarly for \fBTcl_DictObjNext\fR; the variables given by the
\fIkeyPtrPtr\fR and \fIvaluePtrPtr\fR arguments (if not NULL) will be updated
to contain references to the relevant values in the dictionary; their
reference counts will be at least 1 (due to the dictionary holding a reference
to them).
.PP
\fBTcl_DictObjDone\fR does not manipulate (user-visible) reference counts.
.PP
\fBTcl_DictObjPutKeyList\fR is similar to \fBTcl_DictObjPut\fR; it does not
modify the reference count of its \fIdictPtr\fR argument, but does require
that the object be unshared. It may increment the reference count of any value
passed in the \fIkeyv\fR argument, and will increment the reference count of
the \fIvaluePtr\fR argument on success. It is recommended that values passed
via \fIkeyv\fR and \fIvaluePtr\fR do not have zero reference counts. Note
however that this function may set the interpreter result; if that is the only
place that is holding a reference to an object, it will be deleted.
.PP
\fBTcl_DictObjRemoveKeyList\fR is similar to \fBTcl_DictObjRemove\fR; it does
not modify the reference count of its \fIdictPtr\fR argument, but does require
that the object be unshared, and does not modify the reference counts of any
of the values passed in the \fIkeyv\fR argument. Note however that this
function may set the interpreter result; if that is the only place that is
holding a reference to an object, it will be deleted.
.SH EXAMPLE
Using the dictionary iteration interface to search determine if there
is a key that maps to itself:
+12
View File
@@ -58,6 +58,18 @@ and if \fIinterp\fR is non-NULL, an error message is left in \fIinterp\fR.
The \fBTcl_ObjType\fR of \fIobjPtr\fR may be changed to make subsequent
calls to \fBTcl_GetDoubleFromObj\fR more efficient.
'\" TODO: add discussion of treatment of NaN value
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_NewDoubleObj\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR.
.PP
\fBTcl_SetDoubleObj\fR does not modify the reference count of its
\fIobjPtr\fR argument, but does require that the object be unshared.
.PP
\fBTcl_GetDoubleFromObj\fR does not modify the reference count of its
\fIobjPtr\fR argument; it only reads. Note however that this function
may set the interpreter result; if that is the only place that
is holding a reference to the object, it will be deleted.
.SH "SEE ALSO"
Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult
.SH KEYWORDS
+2 -2
View File
@@ -1,6 +1,6 @@
'\"
'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
'\" Copyright (c) 2000 by Scriptics Corporation.
'\" Copyright (c) 1992-1999 Karl Lehenbauer & Mark Diekhans.
'\" Copyright (c) 2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH "Tcl_DumpActiveMemory" 3 8.1 Tcl "Tcl Library Procedures"
+11
View File
@@ -556,5 +556,16 @@ been loaded, it attempts to load an encoding file called \fIname\fB.enc\fR
from the \fBencoding\fR subdirectory of each directory that Tcl searches
for its script library. If the encoding file exists, but is
malformed, an error message will be left in \fIinterp\fR.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_GetEncodingFromObj\fR does not modify the reference count of its
\fIobjPtr\fR argument; it only reads. Note however that this function may set
the interpreter result; if that is the only place that is holding a reference
to the object, it will be deleted.
.PP
\fBTcl_GetEncodingSearchPath\fR returns an object with a reference count of at
least 1.
.SH "SEE ALSO"
encoding(n)
.SH KEYWORDS
utf, encoding, convert
+21
View File
@@ -209,6 +209,27 @@ namespace whose list of exported commands is used if both the mapping
dictionary and the subcommand list properties are NULL. May be read
using \fBTcl_GetEnsembleNamespace\fR which returns a Tcl result code
(\fBTCL_OK\fR, or \fBTCL_ERROR\fR if the token does not refer to an ensemble).
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_FindEnsemble\fR does not modify the reference count of its
\fIcmdNameObj\fR argument; it only reads. Note however that this function may
set the interpreter result; if that is the only place that is holding a
reference to the object, it will be deleted.
.PP
The ensemble property getters (\fBTcl_GetEnsembleMappingDict\fR,
\fBTcl_GetEnsembleParameterList\fR, \fBTcl_GetEnsembleSubcommandList\fR, and
\fBTcl_GetEnsembleUnknownHandler\fR) do not manipulate the reference count of
the values they provide out; if those are non-NULL, they will have a reference
count of at least 1. Note that these functions may set the interpreter
result.
.PP
The ensemble property setters (\fBTcl_SetEnsembleMappingDict\fR,
\fBTcl_SetEnsembleParameterList\fR, \fBTcl_SetEnsembleSubcommandList\fR, and
\fBTcl_SetEnsembleUnknownHandler\fR) will increment the reference count of the
new value of the property they are given if they succeed (and decrement the
reference count of the old value of the property, if relevant). If the
property setters return \fBTCL_ERROR\fR, the reference count of the Tcl_Obj
argument is left unchanged.
.SH "SEE ALSO"
namespace(n), Tcl_DeleteCommandFromToken(3)
.SH KEYWORDS
+15 -1
View File
@@ -65,7 +65,7 @@ null terminating character. If \-1, then all characters up to the
first null byte are used.
.AP "const char" *script in
Points to first byte of script to execute (null-terminated and UTF-8).
.AP char *part in
.AP "const char" *part in
String forming part of a Tcl script.
.AP va_list argList in
An argument list which must have been initialized using
@@ -207,6 +207,20 @@ the \fBreturn\fR, \fBbreak\fR, or \fBcontinue\fR command was
invoked in an inappropriate place.
This means that top-level applications should never see a return code
from \fBTcl_EvalObjEx\fR other than \fBTCL_OK\fR or \fBTCL_ERROR\fR.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_EvalObjEx\fR and \fBTcl_GlobalEvalObj\fR both increment and
decrement the reference count of their \fIobjPtr\fR argument; you must
not pass them any value with a reference count of zero. They also
manipulate the interpreter result; you must not count on the
interpreter result to hold the reference count of any value over
these calls.
.PP
\fBTcl_EvalObjv\fR may increment and decrement the reference count of
any value passed via its \fIobjv\fR argument; you must not pass any
value with a reference count of zero. This function also manipulates
the interpreter result; you must not count on the interpreter result
to hold the reference count of any value over this call.
.SH KEYWORDS
execute, file, global, result, script, value
+9
View File
@@ -98,6 +98,15 @@ containing the expression's value at \fI*resultPtrPtr\fR.
In this case, the caller is responsible for calling
\fBTcl_DecrRefCount\fR to decrement the value's reference count
when it is finished with the value.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_ExprLongObj\fR, \fBTcl_ExprDoubleObj\fR,
\fBTcl_ExprBooleanObj\fR, and \fBTcl_ExprObj\fR all increment and
decrement the reference count of their \fIobjPtr\fR arguments; you
must not pass them any value with a reference count of zero. They also
manipulate the interpreter result; you must not count on the
interpreter result to hold the reference count of any value over these
calls.
.SH "SEE ALSO"
Tcl_ExprLong, Tcl_ExprDouble, Tcl_ExprBoolean, Tcl_ExprString, Tcl_GetObjResult
+168 -10
View File
@@ -45,7 +45,7 @@ int
\fBTcl_FSDeleteFile\fR(\fIpathPtr\fR)
.sp
int
\fBTcl_FSRemoveDirectory\fR(\fIpathPtr, int recursive, errorPtr\fR)
\fBTcl_FSRemoveDirectory\fR(\fIpathPtr, recursive, errorPtr\fR)
.sp
int
\fBTcl_FSRenameFile\fR(\fIsrcPathPtr, destPathPtr\fR)
@@ -79,10 +79,10 @@ int
\fBTcl_FSUtime\fR(\fIpathPtr, tval\fR)
.sp
int
\fBTcl_FSFileAttrsGet\fR(\fIinterp, int index, pathPtr, objPtrRef\fR)
\fBTcl_FSFileAttrsGet\fR(\fIinterp, index, pathPtr, objPtrRef\fR)
.sp
int
\fBTcl_FSFileAttrsSet\fR(\fIinterp, int index, pathPtr, Tcl_Obj *objPtr\fR)
\fBTcl_FSFileAttrsSet\fR(\fIinterp, index, pathPtr, objPtr\fR)
.sp
const char *const *
\fBTcl_FSFileAttrStrings\fR(\fIpathPtr, objPtrRef\fR)
@@ -144,16 +144,16 @@ Tcl_Obj *
Tcl_StatBuf *
\fBTcl_AllocStatBuf\fR()
.sp
Tcl_WideInt
long long
\fBTcl_GetAccessTimeFromStat\fR(\fIstatPtr\fR)
.sp
unsigned
\fBTcl_GetBlockSizeFromStat\fR(\fIstatPtr\fR)
.sp
Tcl_WideUInt
unsigned long long
\fBTcl_GetBlocksFromStat\fR(\fIstatPtr\fR)
.sp
Tcl_WideInt
long long
\fBTcl_GetChangeTimeFromStat\fR(\fIstatPtr\fR)
.sp
int
@@ -174,10 +174,10 @@ int
unsigned
\fBTcl_GetModeFromStat\fR(\fIstatPtr\fR)
.sp
Tcl_WideInt
long long
\fBTcl_GetModificationTimeFromStat\fR(\fIstatPtr\fR)
.sp
Tcl_WideUInt
unsigned long long
\fBTcl_GetSizeFromStat\fR(\fIstatPtr\fR)
.sp
int
@@ -197,6 +197,8 @@ rename operation.
.AP Tcl_Obj *destPathPtr in
As for \fIpathPtr\fR, but used for the destination filename for a copy or
rename operation.
.AP int recursive in
Whether to remove subdirectories and their contents as well.
.AP "const char" *encodingName in
The encoding of the data stored in the
file identified by \fIpathPtr\fR and to be evaluated.
@@ -224,6 +226,10 @@ be joined together. If negative, then all elements are joined.
.AP Tcl_Obj **errorPtr out
In the case of an error, filled with a value containing the name of
the file which caused an error in the various copy/rename operations.
.AP int index in
The index of the attribute in question.
.AP Tcl_Obj *objPtr in
The value to set in the operation.
.AP Tcl_Obj **objPtrRef out
Filled with a value containing the result of the operation.
.AP Tcl_Obj *resultPtr out
@@ -241,9 +247,9 @@ The structure that contains the result of a stat or lstat operation.
Name of a procedure to look up in the file's symbol table
.AP "const char" *sym2 in
Name of a procedure to look up in the file's symbol table
.AP Tcl_PackageInitProc **proc1Ptr out
.AP Tcl_LibraryInitProc **proc1Ptr out
Filled with the init function for this code.
.AP Tcl_PackageInitProc **proc2Ptr out
.AP Tcl_LibraryInitProc **proc2Ptr out
Filled with the safe-init function for this code.
.AP ClientData *clientDataPtr out
Filled with the clientData value to pass to this code's unload
@@ -1628,6 +1634,158 @@ typedef int \fBTcl_FSChdirProc\fR(
The \fBTcl_FSChdirProc\fR changes the applications current working
directory to the value specified in \fIpathPtr\fR. The function returns
-1 on error or 0 on success.
.SH "REFERENCE COUNT MANAGEMENT"
.SS "PUBLIC API CALLS"
.PP
For all of these functions, \fIpathPtr\fR (including the \fIsrcPathPtr\fR and
\fIdestPathPtr\fR arguments to \fBTcl_FSCopyFile\fR,
\fBTcl_FSCopyDirectory\fR, and \fBTcl_FSRenameFile\fR, the \fIfirstPtr\fR and
\fIsecondPtr\fR arguments to \fBTcl_FSEqualPaths\fR, and the \fIlinkNamePtr\fR
and \fItoPtr\fR arguments to \fBTcl_FSLink\fR) must not be a zero reference
count value; references may be retained in internal caches even for
theoretically read-only operations. These functions may also manipulate the
interpreter result (if they take and are given a non-NULL \fIinterp\fR
argument); you must not count on the interpreter result to hold the reference
count of any argument value over these calls and should manage your own
references there. However, references held by the arguments to a Tcl command
\fIare\fR suitable for reference count management purposes for the duration of
the implementation of that command.
.PP
The \fIerrorPtr\fR argument to \fBTcl_FSCopyDirectory\fR and
\fBTcl_FSRemoveDirectory\fR is, when an object is set into it at all, set to
an object with a non-zero reference count that should be passed to
\fBTcl_DecrRefCount\fR when no longer needed.
.PP
\fBTcl_FSListVolumes\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR.
.PP
\fBTcl_FSLink\fR always returns a non-zero-reference object when it is
asked to read; you must call \fBTcl_DecrRefCount\fR on the object
once you no longer need it.
.PP
\fBTcl_FSGetCwd\fR always returns a non-zero-reference object; you
must call \fBTcl_DecrRefCount\fR on the object once you no longer need
it.
.PP
\fBTcl_FSPathSeparator\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR.
.PP
\fBTcl_FSJoinPath\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR. Its \fIlistObj\fR argument can have any reference
count; it is only read by this function.
.PP
\fBTcl_FSSplitPath\fR always returns a zero-reference object, much
like \fBTcl_NewObj\fR.
.PP
\fBTcl_FSGetNormalizedPath\fR returns an object with a non-zero
reference count where Tcl is the owner. You should increment its
reference count if you want to retain it, but do not need to if you
are just using the value immediately.
.PP
\fBTcl_FSJoinToPath\fR always returns a zero-reference object, much like
\fBTcl_NewObj\fR. Its \fIbasePtr\fR argument follows the rules above for
\fIpathPtr\fR, as do the values in the \fIobjv\fR argument.
.PP
\fBTcl_FSGetTranslatedPath\fR returns a non-zero-reference object (or
NULL in the error case); you must call \fBTcl_DecrRefCount\fR on the
object once you no longer need it.
.PP
\fBTcl_FSNewNativePath\fR always returns a zero-reference object (or
NULL), much like \fBTcl_NewObj\fR.
.PP
\fBTcl_FSFileSystemInfo\fR always returns a zero-reference object (or
NULL), much like \fBTcl_NewObj\fR.
.PP
The \fIobjPtr\fR and \fIobjPtrRef\fR arguments to \fBTcl_FSFileAttrsGet\fR,
\fBTcl_FSFileAttrsSet\fR and \fBTcl_FSFileAttrStrings\fR are conventional Tcl
values; the \fIobjPtr\fR argument will be read but not retained, and the
\fIobjPtrRef\fR argument will have (on success) a zero-reference value written
into it (as with \fBTcl_NewObj\fR). \fBTcl_FSFileAttrsGet\fR and
\fBTcl_FSFileAttrsSet\fR may also manipulate the interpreter result.
.PP
The \fIresultPtr\fR argument to \fBTcl_FSMatchInDirectory\fR will not have its
reference count manipulated, but it should have a reference count of no more
than 1, and should not be the current interpreter result (as the function may
overwrite that on error).
.SS "VIRTUAL FILESYSTEM INTERFACE"
.PP
For all virtual filesystem implementation functions, any \fIpathPtr\fR
arguments should not have their reference counts manipulated. If they take an
\fIinterp\fR argument, they may set an error message in that, but must not
manipulate the \fIpathPtr\fR afterwards. Aside from that:
.TP
\fIinternalToNormalizedProc\fR
.
This should return a zero-reference count value, as if allocated with
\fBTcl_NewObj\fR.
.TP
\fInormalizePathProc\fR
.
Unlike with other API implementation functions, the \fIpathPtr\fR argument
here is guaranteed to be an unshared object that should be updated. Its
reference count should not be modified.
.TP
\fIfilesystemPathTypeProc\fR
.
The return value (if non-NULL) either has a reference count of zero or needs
to be maintained (on a per-thread basis) by the filesystem. Tcl will increment
the reference count of the value if it wishes to retain it.
.TP
\fIfilesystemSeparatorProc\fR
.
The return value should be a value with reference count of zero.
.TP
\fImatchInDirectoryProc\fR
.
The \fIresultPtr\fR argument should be assumed to hold a list that can be
appended to (i.e., that has a reference count no greater than 1). No reference
to it should be retained.
.TP
\fIlinkProc\fR
.
If \fItoPtr\fR is NULL, this should return a value with reference count 1 that
has just been allocated and passed to \fBTcl_IncrRefCount\fR. If \fItoPtr\fR
is not NULL, it should be returned on success.
.TP
\fIlistVolumesProc\fR
.
The result value should be a list (if non-NULL); it will have its reference
count decremented once (with \fBTcl_DecrRefCount\fR) by Tcl once done.
.TP
\fIfileAttrStringsProc\fR
.
If the result is NULL, the \fIobjPtrRef\fR should have a list value written to
it; that list will have its reference count both incremented (with
\fBTcl_IncrRefCount\fR) and decremented (with \fBTcl_DecrRefCount\fR).
.TP
\fIfileAttrsGetProc\fR
.
The \fIobjPtrRef\fR argument should have (on non-error return) a zero
reference count value written to it (allocated as if with \fBTcl_NewObj\fR).
.TP
\fIfileAttrsSetProc\fR
.
The \fIobjPtr\fR argument should either just be read or its reference count
incremented to retain it.
.TP
\fIremoveDirectoryProc\fR
.
If an error is being reported, the problem filename reported via
\fIerrorPtr\fR should be newly allocated (as if with \fBTcl_NewObj\fR) and
have a reference count of 1 (i.e., have been passed to
\fBTcl_IncrRefCount\fR).
.TP
\fIcopyDirectoryProc\fR
.
If an error is being reported, the problem filename reported via
\fIerrorPtr\fR should be newly allocated (as if with \fBTcl_NewObj\fR) and
have a reference count of 1 (i.e., have been passed to
\fBTcl_IncrRefCount\fR).
.TP
\fIgetCwdProc\fR
.
The result will be passed to \fBTcl_DecrRefCount\fR by the implementation of
\fBTcl_FSGetCwd\fR after it has been normalized.
.SH "SEE ALSO"
cd(n), file(n), filename(n), load(n), open(n), pwd(n), source(n), unload(n)
.SH KEYWORDS
+3 -3
View File
@@ -17,7 +17,7 @@ char *
\fBTcl_GetCwd\fR(\fIinterp\fR, \fIbufferPtr\fR)
.sp
int
\fBTcl_Chdir\fR(\fIpath\fR)
\fBTcl_Chdir\fR(\fIdirName\fR)
.SH ARGUMENTS
.AS Tcl_DString *bufferPtr in/out
.AP Tcl_Interp *interp in
@@ -27,7 +27,7 @@ This dynamic string is used to store the current working directory.
At the time of the call it should be uninitialized or free. The
caller must eventually call \fBTcl_DStringFree\fR to free up
anything stored here.
.AP char *path in
.AP "const char" *dirName in
File path in UTF\-8 format.
.BE
@@ -45,7 +45,7 @@ must call \fBTcl_DStringFree()\fR when the result is no longer needed.
The format of the path is UTF\-8.
.PP
\fBTcl_Chdir\fR changes the applications current working directory to
the value specified in \fIpath\fR. The format of the passed in string
the value specified in \fIdirName\fR. The format of the passed in string
must be UTF\-8. The function returns -1 on error or 0 on success.
.SH KEYWORDS
+1 -1
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tcl_GetHostName 3 8.3 Tcl "Tcl Library Procedures"
+6
View File
@@ -105,6 +105,12 @@ array of characters at \fItablePtr\fR+\fIoffset\fR bytes, etc.)
This is particularly useful when processing things like
\fBTk_ConfigurationSpec\fR, whose string keys are in the same place in
each of several array elements.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_GetIndexFromObj\fR and \fBTcl_GetIndexFromObjStruct\fR do not modify
the reference count of their \fIobjPtr\fR arguments; they only read. Note
however that these functions may set the interpreter result; if that is the
only place that is holding a reference to the object, it will be deleted.
.SH "SEE ALSO"
prefix(n), Tcl_WrongNumArgs(3)
.SH KEYWORDS
+1 -1
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 1996 by Sun Microsystems, Inc.
'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+1 -1
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 2001 by Kevin B. Kenny <kennykb@acm.org>.
'\" Copyright (c) 2001 Kevin B. Kenny <kennykb@acm.org>.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+14
View File
@@ -330,5 +330,19 @@ typedef void \fBTcl_FreeHashEntryProc\fR(
If this is NULL then \fBTcl_Free\fR is used to free the space for the entry.
Tcl_Obj* keys use this function to decrement the reference count on the
value.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
When a hash table is created with \fBTcl_InitCustomHashTable\fR, the
\fBTcl_CreateHashEntry\fR function will increment the reference count of its
\fIkey\fR argument when it creates a key (but not if there is an existing
matching key). The reference count of the key will be decremented when the
corresponding hash entry is deleted, whether with \fBTcl_DeleteHashEntry\fR or
with \fBTcl_DeleteHashTable\fR. The \fBTcl_GetHashKey\fR function will return
the key without further modifying its reference count.
.PP
Custom hash tables that use a Tcl_Obj* as key will generally need to do
something similar in their \fIallocEntryProc\fR.
.SH "SEE ALSO"
Dict(3)
.SH KEYWORDS
hash table, key, lookup, search, value
+14 -2
View File
@@ -1,8 +1,8 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tcl_Init 3 8.0 Tcl "Tcl Library Procedures"
.TH Tcl_Init 3 8.7 Tcl "Tcl Library Procedures"
.so man.macros
.BS
.SH NAME
@@ -13,10 +13,15 @@ Tcl_Init \- find and source initialization script
.sp
int
\fBTcl_Init\fR(\fIinterp\fR)
.sp
const char *
\fBTcl_SetPreInitScript\fR(\fIscriptPtr\fR)
.SH ARGUMENTS
.AS Tcl_Interp *interp
.AP Tcl_Interp *interp in
Interpreter to initialize.
.AP "const char" *scriptPtr in
Address of the initialization script.
.BE
.SH DESCRIPTION
@@ -26,6 +31,13 @@ Interpreter to initialize.
path.
.PP
\fBTcl_Init\fR is typically called from \fBTcl_AppInit\fR procedures.
.PP
\fBTcl_SetPreInitScript\fR registers the pre-initialization script and
returns the former (now replaced) script pointer.
A value of \fINULL\fR may be passed to not register any script.
The pre-initialization script is executed by \fBTcl_Init\fR before accessing
the file system. The purpose is to typically prepare a custom file system
(like an embedded zip-file) to be activated before the search.
.SH "SEE ALSO"
Tcl_AppInit, Tcl_Main
+22 -1
View File
@@ -102,7 +102,7 @@ are provided by the C language standard. The \fBTcl_WideInt\fR type is a
typedef defined to be whatever signed integral type covers at least the
64-bit integer range (-9223372036854775808 to 9223372036854775807). Depending
on the platform and the C compiler, the actual type might be
\fBlong long int\fR, \fB__int64\fR, or something else.
\fBlong long int\fR, or something else.
The \fBmp_int\fR type is a multiple-precision integer type defined
by the LibTomMath multiple-precision integer library.
.PP
@@ -160,6 +160,27 @@ If anything later in the caller requires
The \fBTcl_InitBignumFromDouble\fR routine is a utility procedure
that extracts the integer part of \fIdoubleValue\fR and stores that
integer value in the \fBmp_int\fR value \fIbigValue\fR.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_NewIntObj\fR, \fBTcl_NewLongObj\fR, \fBTcl_NewWideIntObj\fR, and
\fBTcl_NewBignumObj\fR always return a zero-reference object, much like
\fBTcl_NewObj\fR.
.PP
\fBTcl_SetIntObj\fR, \fBTcl_SetLongObj\fR, \fBTcl_SetWideIntObj\fR, and
\fBTcl_SetBignumObj\fR do not modify the reference count of their \fIobjPtr\fR
arguments, but do require that the object be unshared.
.PP
\fBTcl_GetIntFromObj\fR, \fBTcl_GetIntForIndex\fR, \fBTcl_GetLongFromObj\fR,
\fBTcl_GetWideIntFromObj\fR, \fBTcl_GetBignumFromObj\fR, and
\fBTcl_TakeBignumFromObj\fR do not modify the reference count of their
\fIobjPtr\fR arguments; they only read. Note however that this function may
set the interpreter result; if that is the only place that is holding a
reference to the object, it will be deleted. Also note that if
\fBTcl_TakeBignumFromObj\fR is given an unshared value, the value of that
object may be modified; it is intended to be used when the value is
.QW consumed
by the operation at this point.
.SH "SEE ALSO"
Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult
.SH KEYWORDS
+25
View File
@@ -246,6 +246,31 @@ with a NULL \fIobjvPtr\fR:
result = \fBTcl_ListObjReplace\fR(interp, listPtr, first, count,
0, NULL);
.CE
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_NewListObj\fR always returns a zero-reference object, much like
\fBTcl_NewObj\fR. If a non-NULL \fIobjv\fR argument is given, the reference
counts of the first \fIobjc\fR values in that array are incremented.
.PP
\fBTcl_SetListObj\fR does not modify the reference count of its \fIobjPtr\fR
argument, but does require that the object be unshared. The reference counts
of the first \fIobjc\fR values in the \fIobjv\fR array are incremented.
.PP
\fBTcl_ListObjGetElements\fR, \fBTcl_ListObjIndex\fR, and
\fBTcl_ListObjLength\fR do not modify the reference count of their
\fIlistPtr\fR arguments; they only read. Note however that these three
functions may set the interpreter result; if that is the only place that is
holding a reference to the object, it will be deleted.
.PP
\fBTcl_ListObjAppendList\fR, \fBTcl_ListObjAppendElement\fR, and
\fBTcl_ListObjReplace\fR require an unshared \fIlistPtr\fR argument.
\fBTcl_ListObjAppendList\fR only reads its \fIelemListPtr\fR argument.
\fBTcl_ListObjAppendElement\fR increments the reference count of its
\fIobjPtr\fR on success. \fBTcl_ListObjReplace\fR increments the reference
count of the first \fIobjc\fR values in the \fIobjv\fR array on success. Note
however that all these three functions may set the interpreter result on
failure; if that is the only place that is holding a reference to the object,
it will be deleted.
.SH "SEE ALSO"
Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_GetObjResult(3)
.SH KEYWORDS
+4
View File
@@ -60,6 +60,10 @@ be unloaded with \fBTcl_FSUnloadFile\fR.
the symbol cannot be found, it returns NULL and sets an error message in the
given \fIinterp\fR (if that is non-NULL). Note that it is unsafe to use this
operation on a handle that has been passed to \fBTcl_FSUnloadFile\fR.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The reference count of the \fIpathPtr\fR argument to \fBTcl_LoadFile\fR may be
incremented. As such, it should not be given a zero reference count value.
.SH "SEE ALSO"
Tcl_FSLoadFile(3), Tcl_FSUnloadFile(3), load(n), unload(n)
.SH KEYWORDS
+25 -1
View File
@@ -258,8 +258,32 @@ also return TCL_ERROR; it should return TCL_OK otherwise.
The \fIoldClientData\fR field to a Tcl_CloneProc gives the value from the
method being copied from, and the \fInewClientDataPtr\fR field will point to
a variable in which to write the value for the method being copied to.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fInameObj\fR argument to \fBTcl_NewMethod\fR and
\fBTcl_NewInstanceMethod\fR (when non-NULL) will have its reference count
incremented if there is no existing method with that name in that
class/object.
.PP
The result of \fBTcl_MethodName\fR is a value with a reference count of at
least one. It should not be modified without first duplicating it (with
\fBTcl_DuplicateObj\fR).
.PP
The values in the first \fIobjc\fR values of the \fIobjv\fR argument to
\fBTcl_ObjectContextInvokeNext\fR are assumed to have a reference count of at
least 1; the containing array is assumed to endure until the next method
implementation (see \fBnext\fR) returns. Be aware that methods may
\fByield\fR; if any post-call actions are desired (e.g., decrementing the
reference count of values passed in here), they must be scheduled with
\fBTcl_NRAddCallback\fR.
.PP
The \fIcallProc\fR of the \fBTcl_MethodType\fR structure takes values of at
least reference count 1 in its \fIobjv\fR argument. It may add its own
references, but must not decrement the reference count below that level; the
caller of the method will decrement the reference count once the method
returns properly (and the reference will be held if the method \fByield\fRs).
.SH "SEE ALSO"
Class(3), oo::class(n), oo::define(n), oo::object(n)
Class(3), NRE(3), oo::class(n), oo::define(n), oo::object(n)
.SH KEYWORDS
constructor, method, object
+24 -5
View File
@@ -1,6 +1,6 @@
.\"
.\" Copyright (c) 2008 by Kevin B. Kenny.
.\" Copyright (c) 2018 by Nathan Coulter.
.\" Copyright (c) 2008 Kevin B. Kenny.
.\" Copyright (c) 2018 Nathan Coulter.
.\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -40,7 +40,7 @@ void
.AS Tcl_CmdDeleteProc *interp in
.AP Tcl_Interp *interp in
The relevant Interpreter.
.AP char *cmdName in
.AP "const char" *cmdName in
Name of the command to create.
.AP Tcl_ObjCmdProc *proc in
Called in order to evaluate a command. Is often just a small wrapper that uses
@@ -227,10 +227,29 @@ int
Any function comprising a routine can push other functions, making it possible
implement looping and sequencing constructs using the function stack.
.PP
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The first \fIobjc\fR values in the \fIobjv\fR array passed to the functions
\fBTcl_NRCallObjProc\fR, \fBTcl_NREvalObjv\fR, and \fBTcl_NRCmdSwap\fR should
have a reference count of at least 1; they may have additional references
taken during the execution.
.PP
The \fIobjPtr\fR argument to \fBTcl_NREvalObj\fR and \fBTcl_NRExprObj\fR
should have a reference count of at least 1, and may have additional
references taken to it during execution.
.PP
The \fIresultObj\fR argument to \fBTcl_NRExprObj\fR should be an unshared
object.
.PP
Use \fBTcl_NRAddCallback\fR to schedule any required final decrementing of the
reference counts of arguments to any of the other functions on this page, as
with any other post-processing step in the non-recursive execution engine.
.PP
The
.SH "SEE ALSO"
Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandFromObj(3), Tcl_ExprObj(3)
.SH KEYWORDS
stackless, nonrecursive, execute, command, global, value, result, script
.SH COPYRIGHT
Copyright (c) 2008 by Kevin B. Kenny.
Copyright (c) 2018 by Nathan Coulter.
Copyright \(co 2008 Kevin B. Kenny.
Copyright \(co 2018 Nathan Coulter.
+14 -2
View File
@@ -46,10 +46,10 @@ Tcl_Command
\fBTcl_FindCommand\fR(\fIinterp, name, contextNsPtr, flags\fR)
.sp
Tcl_Obj *
\fBTcl_GetNamespaceUnknownHandler(\fIinterp, nsPtr\fR)
\fBTcl_GetNamespaceUnknownHandler\fR(\fIinterp, nsPtr\fR)
.sp
int
\fBTcl_SetNamespaceUnknownHandler(\fIinterp, nsPtr, handlerPtr\fR)
\fBTcl_SetNamespaceUnknownHandler\fR(\fIinterp, nsPtr, handlerPtr\fR)
.SH ARGUMENTS
.AS Tcl_NamespaceDeleteProc allowOverwrite in/out
.AP Tcl_Interp *interp in/out
@@ -159,6 +159,18 @@ for the namespace, or NULL if none is set.
\fBTcl_SetNamespaceUnknownHandler\fR sets the unknown command handler for
the namespace. If \fIhandlerPtr\fR is NULL, then the handler is reset to
its default.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fIobjPtr\fR argument to \fBTcl_AppendExportList\fR should be an
unshared object, as it will be modified by this function. The
reference count of \fIobjPtr\fR will not be altered.
.PP
\fBTcl_GetNamespaceUnknownHandler\fR returns a possibly shared value.
Its reference count should be incremented if the value is to be
retained.
.PP
The \fIhandlerPtr\fR argument to \fBTcl_SetNamespaceUnknownHandler\fR
will have its reference count incremented if it is a non-empty list.
.SH "SEE ALSO"
Tcl_CreateCommand(3), Tcl_ListObjAppendList(3), Tcl_SetVar(3)
.SH KEYWORDS
+6 -1
View File
@@ -283,7 +283,12 @@ to reduce storage requirements.
Reference counting is used to determine when a value is
no longer needed and can safely be freed.
A value just created by \fBTcl_NewObj\fR or \fBTcl_NewStringObj\fR
has \fIrefCount\fR 0.
has \fIrefCount\fR 0, meaning that the object can often be given to a function
like \fBTcl_SetObjResult\fR, \fBTcl_ListObjAppendElement\fR, or
\fBTcl_DictObjPut\fR (as a value) without explicit reference management, all
of which are common use cases. (The latter two require that the the target
list or dictionary be well-formed, but that is often easy to arrange when the
value is being initially constructed.)
The macro \fBTcl_IncrRefCount\fR increments the reference count
when a new reference to the value is created.
The macro \fBTcl_DecrRefCount\fR decrements the count
+22
View File
@@ -248,6 +248,28 @@ The \fIfreeIntRepProc\fR implementation must not access the
uses of that field during value deletion. The defined tasks for
the \fIfreeIntRepProc\fR have no need to consult the \fIbytes\fR
member.
.PP
Note that if a subsidiary value has its reference count reduced to zero
during the running of a \fIfreeIntRepProc\fR, that value may be not freed
immediately, in order to limit stack usage. However, the value will be freed
before the outermost current \fBTcl_DecrRefCount\fR returns.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fIobjPtr\fR argument to \fBTcl_AppendAllObjTypes\fR should be an unshared
value; this function will not modify the reference count of that value, but
will modify its contents. If \fIobjPtr\fR is not (interpretable as) a list,
this function will set the interpreter result and produce an error; using an
unshared empty value is strongly recommended.
.PP
The \fIobjPtr\fR argument to \fBTcl_ConvertToType\fR can have any non-zero
reference count; this function will not modify the reference count, but may
write to the interpreter result on error so values that originate from there
should have an additional reference made before calling this.
.PP
None of the callback functions in the \fBTcl_ObjType\fR structure should
modify the reference count of their arguments, but if the values contain
subsidiary values (e.g., the elements of a list or the keys of a dictionary)
then those subsidiary values may have their reference counts modified.
.SH "SEE ALSO"
Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3)
.SH KEYWORDS
+22 -4
View File
@@ -92,10 +92,10 @@ int
int
\fBTcl_OutputBuffered\fR(\fIchannel\fR)
.sp
Tcl_WideInt
long long
\fBTcl_Seek\fR(\fIchannel, offset, seekMode\fR)
.sp
Tcl_WideInt
long long
\fBTcl_Tell\fR(\fIchannel\fR)
.sp
int
@@ -190,7 +190,7 @@ A buffer containing the bytes to output to the channel.
.AP int bytesToWrite in
The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
output to the channel.
.AP Tcl_WideInt offset in
.AP "long long" offset in
How far to move the access point in the channel at which the next input or
output operation will be applied, measured in bytes from the position
given by \fIseekMode\fR. May be either positive or negative.
@@ -198,7 +198,7 @@ given by \fIseekMode\fR. May be either positive or negative.
Relative to which point to seek; used with \fIoffset\fR to calculate the new
access point for the channel. Legal values are \fBSEEK_SET\fR,
\fBSEEK_CUR\fR, and \fBSEEK_END\fR.
.AP Tcl_WideInt length in
.AP "long long" length in
The (non-negative) length to truncate the channel the channel to.
.AP "const char" *optionName in
The name of an option applicable to this channel, such as \fB\-blocking\fR.
@@ -641,6 +641,24 @@ the channel was created with \fBTcl_OpenFileChannel\fR,
\fBTcl_OpenCommandChannel\fR, or \fBTcl_MakeFileChannel\fR. Other
channel types may return a different type of handle on Windows
platforms.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fIreadObjPtr\fR argument to \fBTcl_ReadChars\fR must be an unshared
value; it will be modified by this function. Using the interpreter result for
this purpose is \fIstrongly\fR not recommended; the preferred pattern is to
use a new value from \fBTcl_NewObj\fR to receive the data and only to pass it
to \fBTcl_SetObjResult\fR if this function succeeds.
.PP
The \fIlineObjPtr\fR argument to \fBTcl_GetsObj\fR must be an unshared value;
it will be modified by this function. Using the interpreter result for this
purpose is \fIstrongly\fR not recommended; the preferred pattern is to use a
new value from \fBTcl_NewObj\fR to receive the data and only to pass it to
\fBTcl_SetObjResult\fR if this function succeeds.
.PP
The \fIwriteObjPtr\fR argument to \fBTcl_WriteObj\fR should be a value with
any reference count. This function will not modify the reference count. Using
the interpreter result without adding an additional reference to it is not
recommended.
.SH "SEE ALSO"
DString(3), fconfigure(n), filename(n), fopen(3), Tcl_CreateChannel(3)
.SH KEYWORDS
+6
View File
@@ -189,6 +189,12 @@ will be stored at \fIdstPtr\fR; the string inside will have a lifetime linked
to the lifetime of the string representation of the argument value that it
came from, and so should be copied if it needs to be retained. The
\fIsrcPtr\fR and \fIclientData\fR fields are ignored.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The values in the \fIobjv\fR argument to \fBTcl_ParseArgsObjv\fR will not have
their reference counts modified by this function. The interpreter result may
be modified on error; the values passed should not be the interpreter result
with no further reference added.
.SH "SEE ALSO"
Tcl_GetIndexFromObj(3), Tcl_Main(3), Tcl_CreateObjCommand(3)
.SH KEYWORDS
+8
View File
@@ -191,6 +191,7 @@ code with one of the values \fBTCL_OK\fR, \fBTCL_ERROR\fR,
some other integer value originating in an extension.
In addition, a result value or error message is left in \fIinterp\fR's
result; it can be retrieved using \fBTcl_GetObjResult\fR.
.SS "DEPRECATED FUNCTIONS"
.PP
\fBTcl_EvalTokens\fR differs from \fBTcl_EvalTokensStandard\fR only in
the return convention used: it returns the result in a new Tcl_Obj.
@@ -463,5 +464,12 @@ There are additional fields in the Tcl_Parse structure after the
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR; they should not be
referenced by code outside of these procedures.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The result of \fBTcl_EvalTokens\fR is an unshared value with a reference count
of 1; the caller of that function should call \fBTcl_DecrRefCount\fR on the
result value to dispose of it. (The equivalent with
\fBTcl_EvalTokenStandard\fR is just the interpreter result, which can be
retrieved with \fBTcl_GetObjResult\fR.)
.SH KEYWORDS
backslash substitution, braces, command, expression, parse, token, variable substitution
+5 -1
View File
@@ -91,7 +91,11 @@ functions.
\fBTcl_PkgRequireProc\fR is the form of \fBpackage require\fR handling
multiple requirements. The other forms are present for backward
compatibility and translate their invocations to this form.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The requirements values given (in the \fIobjv\fR argument) to
\fBTcl_PkgRequireProc\fR must have non-zero reference counts.
.SH KEYWORDS
package, present, provide, require, version
.SH "SEE ALSO"
package(n), Tcl_StaticPackage(3)
package(n), Tcl_StaticLibrary(3)
+6
View File
@@ -44,6 +44,12 @@ allow the user to re-issue recently invoked commands.
If the \fIflags\fR argument contains the \fBTCL_NO_EVAL\fR bit then
the command is recorded without being evaluated.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The reference count of the \fIcmdPtr\fR argument to \fBTcl_RecordAndEvalObj\fR
must be at least 1. This function will modify the interpreter result; do not
use an existing result as \fIcmdPtr\fR directly without incrementing its
reference count.
.SH "SEE ALSO"
Tcl_EvalObjEx, Tcl_GetObjResult
+4 -4
View File
@@ -28,7 +28,7 @@ configuration as ASCII string. This means that this information is in
UTF-8 too. Must not be NULL.
.AP "const Tcl_Config" *configuration in
Refers to an array of Tcl_Config entries containing the information
embedded in the binary library. Must not be NULL. The end of the array
embedded in the library. Must not be NULL. The end of the array
is signaled by either a key identical to NULL, or a key referring to
the empty string.
.AP "const char" *valEncoding in
@@ -40,10 +40,10 @@ too. Must not be NULL.
.PP
The function described here has its base in TIP 59 and provides
extensions with support for the embedding of configuration
information into their binary library and the generation of a
information into their library and the generation of a
Tcl-level interface for querying this information.
.PP
To embed configuration information into their binary library an
To embed configuration information into their library an
extension has to define a non-volatile array of Tcl_Config entries in
one if its source files and then call \fBTcl_RegisterConfig\fR to
register that information.
@@ -108,4 +108,4 @@ typedef struct Tcl_Config {
.\" No cross references yet.
.\" .SH "SEE ALSO"
.SH KEYWORDS
embedding, configuration, binary library
embedding, configuration, library
+18 -2
View File
@@ -51,14 +51,14 @@ can be efficiently searched.
.AP Tcl_Obj *patObj in/out
Refers to the value from which to get a regular expression. The
compiled regular expression is cached in the value.
.AP char *text in
.AP "const char" *text in
Text to search for a match with a regular expression.
.AP "const char" *pattern in
String in the form of a regular expression pattern.
.AP Tcl_RegExp regexp in
Compiled regular expression. Must have been returned previously
by \fBTcl_GetRegExpFromObj\fR or \fBTcl_RegExpCompile\fR.
.AP char *start in
.AP "const char" *start in
If \fItext\fR is just a portion of some other string, this argument
identifies the beginning of the larger string.
If it is not the same as \fItext\fR, then no
@@ -377,6 +377,22 @@ If no match was found, then it indicates the earliest point at which a
match might occur if additional text is appended to the string. If it
is no match is possible even with further text, this field will be set
to \-1.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fItextObj\fR and \fIpatObj\fR arguments to \fBTcl_RegExpMatchObj\fR must
have reference counts of at least 1. Note however that this function may set
the interpreter result; neither argument should be the direct interpreter
result without an additional reference being taken.
.PP
The \fIpatObj\fR argument to \fBTcl_GetRegExpFromObj\fR must have a reference
count of at least 1. Note however that this function may set the interpreter
result; the argument should not be the direct interpreter result without an
additional reference being taken.
.PP
The \fItextObj\fR argument to \fBTcl_RegExpExecObj\fR must have a reference
count of at least 1. Note however that this function may set the interpreter
result; the argument should not be the direct interpreter result without an
additional reference being taken.
.SH "SEE ALSO"
re_syntax(n)
.SH KEYWORDS
+1 -1
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 1997 by Sun Microsystems, Inc.
'\" Copyright (c) 1997 Sun Microsystems, Inc.
'\" Contributions from Don Porter, NIST, 2004. (not subject to US copyright)
'\" Copyright (c) 2018 Nathan Coulter.
'\"
+12 -3
View File
@@ -35,20 +35,20 @@ Refers to the Tcl interpreter whose bypass area is accessed.
.AP Tcl_Obj* msg in
Error message put into a bypass area. A list of return options and values,
followed by a string message. Both message and the option/value information
are optional.
are optional. This \fImust\fR be a well-formed list.
.AP Tcl_Obj** msgPtr out
Reference to a place where the message stored in the accessed bypass area can
be stored in.
.BE
.SH DESCRIPTION
.PP
The current definition of a Tcl channel driver does not permit the direct
The standard definition of a Tcl channel driver does not permit the direct
return of arbitrary error messages, except for the setting and retrieval of
channel options. All other functions are restricted to POSIX error codes.
.PP
The functions described here overcome this limitation. Channel drivers are
allowed to use \fBTcl_SetChannelError\fR and \fBTcl_SetChannelErrorInterp\fR
to place arbitrary error messages in \fBbypass areas\fR defined for channels
to place arbitrary error messages in \fIbypass areas\fR defined for channels
and interpreters. And the generic I/O layer uses \fBTcl_GetChannelError\fR and
\fBTcl_GetChannelErrorInterp\fR to look for messages in the bypass areas and
arrange for their return as errors. The POSIX error codes set by a driver are
@@ -134,6 +134,15 @@ leave all their error information in the interpreter result.
.ta 1.9i 4i
\fBTcl_Close\fR \fBTcl_UnstackChannel\fR \fBTcl_UnregisterChannel\fR
.DE
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fImsg\fR argument to \fBTcl_SetChannelError\fR and
\fBTcl_SetChannelErrorInterp\fR, if not NULL, may have any reference count;
these functions will copy.
.PP
\fBTcl_GetChannelError\fR and \fBTcl_GetChannelErrorInterp\fR write a value
reference into their \fImsgPtr\fR, but do not manipulate its reference count.
The reference count will be at least 1 (unless the reference is NULL).
.SH "SEE ALSO"
Tcl_Close(3), Tcl_OpenFileChannel(3), Tcl_SetErrno(3)
.SH KEYWORDS
+27
View File
@@ -239,6 +239,33 @@ typedef void \fBTcl_FreeProc\fR(
.PP
When \fIfreeProc\fR is called, its \fIblockPtr\fR will be set to
the value of \fIresult\fR passed to \fBTcl_SetResult\fR.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The interpreter result is one of the main places that owns references to
values, along with the bytecode execution stack, argument lists, variables,
and the list and dictionary collection values.
.PP
\fBTcl_SetObjResult\fR takes a value with an arbitrary reference count
\fI(specifically including zero)\fR and guarantees to increment the reference
count. If code wishes to continue using the value after setting it as the
result, it should add its own reference to it with \fBTcl_IncrRefCount\fR.
.PP
\fBTcl_GetObjResult\fR returns the current interpreter result value. This will
have a reference count of at least 1. If the caller wishes to keep the
interpreter result value, it should increment its reference count.
.PP
\fBTcl_GetStringResult\fR does not manipulate reference counts, but the string
it returns is owned by (and has a lifetime controlled by) the current
interpreter result value; it should be copied instead of being relied upon to
persist after the next Tcl API call, as most Tcl operations can modify the
interpreter result.
.PP
\fBTcl_SetResult\fR, \fBTcl_AppendResult\fR, \fBTcl_AppendResultVA\fR,
\fBTcl_AppendElement\fR, and \fBTcl_ResetResult\fR all modify the interpreter
result. They may cause the old interpreter result to have its reference count
decremented and a new interpreter result to be allocated. After they have been
called, the reference count of the interpreter result is guaranteed to be 1.
.SH "SEE ALSO"
Tcl_AddErrorInfo, Tcl_CreateObjCommand, Tcl_SetErrorCode, Tcl_Interp,
Tcl_GetReturnOptions
+21
View File
@@ -242,6 +242,27 @@ but the array remains.
If an array name is specified without an index, then the entire
array is removed.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The result of \fBTcl_SetVar2Ex\fR, \fBTcl_ObjSetVar2\fR, \fBTcl_GetVar2Ex\fR,
and \fBTcl_ObjGetVar2\fR is (if non-NULL) a value with a reference of at least
1, where that reference is held by the variable that the function has just
operated upon.
.PP
The \fInewValuePtr\fR argument to \fBTcl_SetVar2Ex\fR and \fBTcl_ObjSetVar2\fR
may be an arbitrary reference count value; its reference count will be
incremented on success. However, it is recommended to not use a zero reference
count value, as that makes correct handling of the error case tricky.
.PP
The \fIpart1\fR argument to \fBTcl_ObjSetVar2\fR and \fBTcl_ObjGetVar2\fR can
have any reference count; these functions never modify it. It is recommended
to not use a zero reference count for this argument.
.PP
The \fIpart2\fR argument to \fBTcl_ObjSetVar2\fR and \fBTcl_ObjGetVar2\fR, if
non-NULL, should not have a zero reference count as these functions may
retain a reference to it (particularly when it is used to create an array
element that did not previously exist).
.SH "SEE ALSO"
Tcl_GetObjResult, Tcl_GetStringResult, Tcl_TraceVar
+1 -1
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tcl_SourceRCFile 3 8.3 Tcl "Tcl Library Procedures"
+1 -1
View File
@@ -36,7 +36,7 @@ int
.AP Tcl_Interp *interp out
Interpreter to use for error reporting. If NULL, then no error message
is left.
.AP char *list in
.AP "const char" *list in
Pointer to a string with proper list structure.
.AP int *argcPtr out
Filled in with number of elements in \fIlist\fR.
+78
View File
@@ -0,0 +1,78 @@
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
.TH Tcl_StaticLibrary 3 7.5 Tcl "Tcl Library Procedures"
.so man.macros
.BS
.SH NAME
Tcl_StaticLibrary, Tcl_StaticPackage \- make a statically linked library available via the 'load' command
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_StaticLibrary\fR(\fIinterp, prefix, initProc, safeInitProc\fR)
.sp
\fBTcl_StaticPackage\fR(\fIinterp, prefix, initProc, safeInitProc\fR)
.SH ARGUMENTS
.AS Tcl_LibraryInitProc *safeInitProc
.AP Tcl_Interp *interp in
If not NULL, points to an interpreter into which the library has
already been incorporated (i.e., the caller has already invoked the
appropriate initialization procedure). NULL means the library
has not yet been incorporated into any interpreter.
.AP "const char" *prefix in
Prefix for library initialization function; should be properly
capitalized (first letter upper-case, all others lower-case).
.AP Tcl_LibraryInitProc *initProc in
Procedure to invoke to incorporate this library into a trusted
interpreter.
.AP Tcl_LibraryInitProc *safeInitProc in
Procedure to call to incorporate this library into a safe interpreter
(one that will execute untrusted scripts). NULL means the library
cannot be used in safe interpreters.
.BE
.SH DESCRIPTION
.PP
This procedure may be invoked to announce that a library has been
linked statically with a Tcl application and, optionally, that it
has already been incorporated into an interpreter.
Once \fBTcl_StaticLibrary\fR has been invoked for a library, it
may be incorporated into interpreters using the \fBload\fR command.
\fBTcl_StaticLibrary\fR is normally invoked only by the \fBTcl_AppInit\fR
procedure for the application, not by libraries for themselves
(\fBTcl_StaticLibrary\fR should only be invoked for statically
linked libraries, and code in the library itself should not need
to know whether the library is dynamically loaded or statically linked).
.PP
When the \fBload\fR command is used later to incorporate the library into
an interpreter, one of \fIinitProc\fR and \fIsafeInitProc\fR will
be invoked, depending on whether the target interpreter is safe
or not.
\fIinitProc\fR and \fIsafeInitProc\fR must both match the
following prototype:
.PP
.CS
typedef int \fBTcl_LibraryInitProc\fR(
Tcl_Interp *\fIinterp\fR);
.CE
.PP
The \fIinterp\fR argument identifies the interpreter in which the library
is to be incorporated. The initialization procedure must return \fBTCL_OK\fR or
\fBTCL_ERROR\fR to indicate whether or not it completed successfully; in
the event of an error it should set the interpreter's result to point to an
error message. The result or error from the initialization procedure will
be returned as the result of the \fBload\fR command that caused the
initialization procedure to be invoked.
.PP
\fBTcl_StaticLibrary\fR was named \fBTcl_StaticPackage\fR in Tcl 8.6 and
earlier, but the old name is deprecated now.
.PP
\fBTcl_StaticLibrary\fR can not be used in stub-enabled extensions. Its symbol
entry in the stub table is deprecated and it will be removed in Tcl 9.0.
.SH KEYWORDS
initialization procedure, package, static linking
.SH "SEE ALSO"
load(n), package(n), Tcl_PkgRequire(3)
-73
View File
@@ -1,73 +0,0 @@
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
.TH Tcl_StaticPackage 3 7.5 Tcl "Tcl Library Procedures"
.so man.macros
.BS
.SH NAME
Tcl_StaticPackage \- make a statically linked package available via the 'load' command
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_StaticPackage\fR(\fIinterp, pkgName, initProc, safeInitProc\fR)
.SH ARGUMENTS
.AS Tcl_PackageInitProc *safeInitProc
.AP Tcl_Interp *interp in
If not NULL, points to an interpreter into which the package has
already been loaded (i.e., the caller has already invoked the
appropriate initialization procedure). NULL means the package
has not yet been incorporated into any interpreter.
.AP "const char" *pkgName in
Name of the package; should be properly capitalized (first letter
upper-case, all others lower-case).
.AP Tcl_PackageInitProc *initProc in
Procedure to invoke to incorporate this package into a trusted
interpreter.
.AP Tcl_PackageInitProc *safeInitProc in
Procedure to call to incorporate this package into a safe interpreter
(one that will execute untrusted scripts). NULL means the package
cannot be used in safe interpreters.
.BE
.SH DESCRIPTION
.PP
This procedure may be invoked to announce that a package has been
linked statically with a Tcl application and, optionally, that it
has already been loaded into an interpreter.
Once \fBTcl_StaticPackage\fR has been invoked for a package, it
may be loaded into interpreters using the \fBload\fR command.
\fBTcl_StaticPackage\fR is normally invoked only by the \fBTcl_AppInit\fR
procedure for the application, not by packages for themselves
(\fBTcl_StaticPackage\fR should only be invoked for statically
loaded packages, and code in the package itself should not need
to know whether the package is dynamically or statically loaded).
.PP
When the \fBload\fR command is used later to load the package into
an interpreter, one of \fIinitProc\fR and \fIsafeInitProc\fR will
be invoked, depending on whether the target interpreter is safe
or not.
\fIinitProc\fR and \fIsafeInitProc\fR must both match the
following prototype:
.PP
.CS
typedef int \fBTcl_PackageInitProc\fR(
Tcl_Interp *\fIinterp\fR);
.CE
.PP
The \fIinterp\fR argument identifies the interpreter in which the package
is to be loaded. The initialization procedure must return \fBTCL_OK\fR or
\fBTCL_ERROR\fR to indicate whether or not it completed successfully; in
the event of an error it should set the interpreter's result to point to an
error message. The result or error from the initialization procedure will
be returned as the result of the \fBload\fR command that caused the
initialization procedure to be invoked.
.PP
\fBTcl_StaticPackage\fR can not be used in stub-enabled extensions. Its symbol
entry in the stub table is deprecated and it will be removed in Tcl 9.0.
.SH KEYWORDS
initialization procedure, package, static linking
.SH "SEE ALSO"
load(n), package(n), Tcl_PkgRequire(3)
+1 -1
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 2001 by ActiveState Corporation
'\" Copyright (c) 2001 ActiveState Corporation
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+30 -3
View File
@@ -119,9 +119,9 @@ returned as a new value.
Points to a value to manipulate.
.AP Tcl_Obj *appendObjPtr in
The value to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR.
.AP int *lengthPtr out
If non-NULL, the location where \fBTcl_GetStringFromObj\fR will store
the length of a value's string representation.
.AP size_t | int *lengthPtr out
The location where \fBTcl_GetStringFromObj\fR will store the length
of a value's string representation. May be (int *)NULL when not used.
.AP "const char" *string in
Null-terminated string value to append to \fIobjPtr\fR.
.AP va_list argList in
@@ -383,6 +383,33 @@ white space, then that value is ignored entirely. This white-space
removal was added to make the output of the \fBconcat\fR command
cleaner-looking. \fBTcl_ConcatObj\fR returns a pointer to a
newly-created value whose ref count is zero.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_NewStringObj\fR, \fBTcl_NewUnicodeObj\fR, \fBTcl_Format\fR,
\fBTcl_ObjPrintf\fR, and \fBTcl_ConcatObj\fR always return a zero-reference
object, much like \fBTcl_NewObj\fR.
.PP
\fBTcl_GetStringFromObj\fR, \fBTcl_GetString\fR, \fBTcl_GetUnicodeFromObj\fR,
\fBTcl_GetUnicode\fR, \fBTcl_GetUniChar\fR, \fBTcl_GetCharLength\fR, and
\fBTcl_GetRange\fR all only work with an existing value; they do not
manipulate its reference count in any way.
.PP
\fBTcl_SetStringObj\fR, \fBTcl_SetUnicodeObj\fR, \fBTcl_AppendToObj\fR,
\fBTcl_AppendUnicodeToObj\fR, \fBTcl_AppendObjToObj\fR,
\fBTcl_AppendStringsToObj\fR, \fBTcl_AppendStringsToObjVA\fR,
\fBTcl_AppendLimitedToObj\fR, \fBTcl_AppendFormatToObj\fR,
\fBTcl_AppendPrintfToObj\fR, \fBTcl_SetObjLength\fR, and
\fBTcl_AttemptSetObjLength\fR and require their \fIobjPtr\fR to be an unshared
value (i.e, a reference count no more than 1) as they will modify it.
.PP
Additional arguments to the above functions (the \fIappendObjPtr\fR argument
to \fBTcl_AppendObjToObj\fR, values in the \fIobjv\fR argument to
\fBTcl_Format\fR, \fBTcl_AppendFormatToObj\fR, and \fBTcl_ConcatObj\fR) can
have any reference count, but reference counts of zero are not recommended.
.PP
\fBTcl_Format\fR and \fBTcl_AppendFormatToObj\fR may modify the interpreter
result, which involves changing the reference count of a value.
.SH "SEE ALSO"
Tcl_NewObj(3), Tcl_IncrRefCount(3), Tcl_DecrRefCount(3), format(n), sprintf(3)
.SH KEYWORDS
+7
View File
@@ -62,6 +62,13 @@ result of the whole substitution on \fIobjPtr\fR will be truncated at
the point immediately before the start of the command substitution,
and no characters will be added to the result or substitutions
performed after that point.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fIobjPtr\fR argument to \fBTcl_SubstObj\fR must not have a reference
count of zero. This function modifies the interpreter result, both on success
and on failure; the result of this function on success is exactly the current
interpreter result. Successful results should have their reference count
incremented if they are to be retained.
.SH "SEE ALSO"
subst(n)
.SH KEYWORDS
+2 -2
View File
@@ -1,6 +1,6 @@
'\"
'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
'\" Copyright (c) 2000 by Scriptics Corporation.
'\" Copyright (c) 1992-1999 Karl Lehenbauer & Mark Diekhans.
'\" Copyright (c) 2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH TCL_MEM_DEBUG 3 8.1 Tcl "Tcl Library Procedures"
+1 -1
View File
@@ -224,7 +224,7 @@ is reached. The upper bits of the Unicode character will be 0.
.RS
.PP
The range U+00D800\(enU+00DFFF is reserved for surrogates, which
are illegal on its own. Therefore, such sequences will result in
are illegal on their own. Therefore, such sequences will result in
the replacement character U+FFFD. Surrogate pairs should be
encoded as single \e\fBU\fIhhhhhhhh\fR character.
.RE
+25
View File
@@ -262,6 +262,31 @@ file named by the \fBfilename\fR field was modified. Suitable for use with
.
The type of the uncompressed data (either \fBbinary\fR or \fBtext\fR) if
known.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_ZlibDeflate\fR and \fBTcl_ZlibInflate\fR take a value with arbitrary
reference count for their \fIdataObj\fR and \fIdictObj\fR arguments (the
latter often being NULL instead), and set the interpreter result with their
output value (or an error). The existing interpreter result should not be
passed as any argument value unless an additional reference is held.
.PP
\fBTcl_ZlibStreamInit\fR takes a value with arbitrary reference count for its
\fIdictObj\fR argument; it only reads from it. The existing interpreter result
should not be passed unless an additional reference is held.
.PP
\fBTcl_ZlibStreamGetCommandName\fR returns a zero reference count value, much
like \fBTcl_NewObj\fR.
.PP
The \fIdataObj\fR argument to \fBTcl_ZlibStreamPut\fR is a value with
arbitrary reference count; it is only ever read from.
.PP
The \fIdataObj\fR argument to \fBTcl_ZlibStreamGet\fR is an unshared value
(see \fBTcl_IsShared\fR) that will be updated by the function.
.PP
The \fIcompDict\fR argument to \fBTcl_ZlibStreamSetCompressionDictionary\fR,
if non-NULL, may be duplicated or may have its reference count incremented.
Using a zero reference count value is not recommended.
.SH "PORTABILITY NOTES"
These functions will fail gracefully if Tcl is not linked with the zlib
library.
+20 -1
View File
@@ -10,13 +10,17 @@
.so man.macros
.BS
.SH NAME
Tcl_Main, Tcl_SetStartupScript, Tcl_GetStartupScript, Tcl_SetMainLoop \- main program, startup script, and event loop definition for Tcl-based applications
Tcl_Main, Tcl_MainEx, Tcl_MainExW, Tcl_SetStartupScript, Tcl_GetStartupScript, Tcl_SetMainLoop \- main program, startup script, and event loop definition for Tcl-based applications
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_Main\fR(\fIargc, argv, appInitProc\fR)
.sp
\fBTcl_MainEx\fR(\fIargc, charargv, appInitProc, interp\fR)
.sp
\fBTcl_MainExW\fR(\fIargc, wideargv, appInitProc, interp\fR)
.sp
\fBTcl_SetStartupScript\fR(\fIpath, encoding\fR)
.sp
Tcl_Obj *
@@ -30,6 +34,10 @@ Number of elements in \fIargv\fR.
.AP char *argv[] in
Array of strings containing command-line arguments. On Windows, when
using -DUNICODE, the parameter type changes to wchar_t *.
.AP char *charargv[] in
As argv, but does not change type to wchar_t.
.AP char *wideargv[] in
As argv, but type is always wchar_t.
.AP Tcl_AppInitProc *appInitProc in
Address of an application-specific initialization procedure.
The value for this argument is usually \fBTcl_AppInit\fR.
@@ -42,6 +50,8 @@ If non-NULL, location to write a copy of the (const char *)
pointing to the encoding name.
.AP Tcl_MainLoopProc *mainLoopProc in
Address of an application-specific event loop procedure.
.AP Tcl_Interp *interp in
Already created Tcl Interpreter.
.BE
.SH DESCRIPTION
.PP
@@ -191,6 +201,15 @@ procedure (if any) returns, \fBTcl_Main\fR will also evaluate
the \fBexit\fR command.
.PP
\fBTcl_Main\fR can not be used in stub-enabled extensions.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
\fBTcl_SetStartupScript\fR takes a value (or NULL) for its \fIpath\fR
argument, and will increment the reference count of it.
.PP
\fBTcl_GetStartupScript\fR returns a value with reference count at least 1, or
NULL. It's \fIencodingPtr\fR is also used (if non-NULL) to return a value with
a reference count at least 1, or NULL. In both cases, the owner of the values
is the current thread.
.SH "SEE ALSO"
tclsh(1), Tcl_GetStdChannel(3), Tcl_StandardChannels(3), Tcl_AppInit(3),
exit(n), encoding(n)
+1 -1
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 1997 by Sun Microsystems, Inc.
'\" Copyright (c) 1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+8
View File
@@ -359,6 +359,14 @@ Traces on a variable are always removed whenever the variable
is deleted; the only time \fBTCL_TRACE_DESTROYED\fR is not set is for
a whole-array trace invoked when only a single element of an
array is unset.
.SH "REFERENCE COUNT MANAGEMENT"
.PP
When a \fIproc\fR callback is invoked, and that callback was installed with
the \fBTCL_TRACE_RESULT_OBJECT\fR flag, the result of the callback is a
Tcl_Obj reference when there is an error. The result will have its reference
count decremented once when no longer needed, or may have additional
references made to it (e.g., by setting it as the interpreter result with
\fBTcl_SetObjResult\fR).
.SH BUGS
.PP
Array traces are not yet integrated with the Tcl \fBinfo exists\fR command,
+7 -1
View File
@@ -8,7 +8,7 @@
.so man.macros
.BS
.SH NAME
Tcl_UniCharIsAlnum, Tcl_UniCharIsAlpha, Tcl_UniCharIsControl, Tcl_UniCharIsDigit, Tcl_UniCharIsGraph, Tcl_UniCharIsLower, Tcl_UniCharIsPrint, Tcl_UniCharIsPunct, Tcl_UniCharIsSpace, Tcl_UniCharIsUpper, Tcl_UniCharIsWordChar \- routines for classification of Tcl_UniChar characters
Tcl_UniCharIsAlnum, Tcl_UniCharIsAlpha, Tcl_UniCharIsControl, Tcl_UniCharIsDigit, Tcl_UniCharIsGraph, Tcl_UniCharIsLower, Tcl_UniCharIsPrint, Tcl_UniCharIsPunct, Tcl_UniCharIsSpace, Tcl_UniCharIsUpper, Tcl_UniCharIsUnicode, Tcl_UniCharIsWordChar \- routines for classification of Tcl_UniChar characters
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -44,6 +44,9 @@ int
\fBTcl_UniCharIsUpper\fR(\fIch\fR)
.sp
int
\fBTcl_UniCharIsUnicode\fR(\fIch\fR)
.sp
int
\fBTcl_UniCharIsWordChar\fR(\fIch\fR)
.SH ARGUMENTS
.AS int ch
@@ -81,6 +84,9 @@ with the various routines.
.PP
\fBTcl_UniCharIsUpper\fR tests if the character is an uppercase Unicode character.
.PP
\fBTcl_UniCharIsUnicode\fR tests if the character is a Unicode character, not being
a surrogate or noncharacter.
.PP
\fBTcl_UniCharIsWordChar\fR tests if the character is alphanumeric or
a connector punctuation mark.
+8 -7
View File
@@ -233,10 +233,10 @@ characters.
.PP
\fBTcl_UtfCharComplete\fR returns 1 if the source UTF-8 string \fIsrc\fR
of \fIlength\fR bytes is long enough to be decoded by
\fBTcl_UtfToUniChar\fR, or 0 otherwise. This function does not guarantee
that the UTF-8 string is properly formed. This routine is used by
procedures that are operating on a byte at a time and need to know if a
full Unicode character has been seen.
\fBTcl_UtfToUniChar\fR/\fBTcl_UtfNext\fR, or 0 otherwise. This function
does not guarantee that the UTF-8 string is properly formed. This routine
is used by procedures that are operating on a byte at a time and need to
know if a full Unicode character has been seen.
.PP
\fBTcl_NumUtfChars\fR corresponds to \fBstrlen\fR for UTF-8 strings. It
returns the number of Tcl_UniChars that are represented by the UTF-8 string
@@ -257,7 +257,8 @@ Given \fIsrc\fR, a pointer to some location in a UTF-8 string,
\fBTcl_UtfNext\fR returns a pointer to the next UTF-8 character in the
string. The caller must not ask for the next character after the last
character in the string if the string is not terminated by a null
character.
character. \fBTcl_UtfCharComplete\fR can be used in that case to
make sure enough bytes are available before calling \fBTcl_UtfNext\fR.
.PP
\fBTcl_UtfPrev\fR is used to step backward through but not beyond the
UTF-8 string that begins at \fIstart\fR. If the UTF-8 string is made
@@ -274,12 +275,12 @@ always a pointer to a location in the string. It always returns a pointer to
a byte that begins a character when scanning for characters beginning
from \fIstart\fR. When \fIsrc\fR is greater than \fIstart\fR, it
always returns a pointer less than \fIsrc\fR and greater than or
equal to (\fIsrc\fR - \fBTCL_UTF_MAX\fR). The character that begins
equal to (\fIsrc\fR - 4). The character that begins
at the returned pointer is the first one that either includes the
byte \fIsrc[-1]\fR, or might include it if the right trail bytes are
present at \fIsrc\fR and greater. \fBTcl_UtfPrev\fR never reads the
byte \fIsrc[0]\fR nor the byte \fIstart[-1]\fR nor the byte
\fIsrc[-\fBTCL_UTF_MAX\fI-1]\fR.
\fIsrc[-5]\fR.
.PP
\fBTcl_UniCharAtIndex\fR corresponds to a C string array dereference or the
Pascal Ord() function. It returns the Unicode character represented at the
+6
View File
@@ -73,6 +73,12 @@ is now an \fIindexObject\fR because it was passed to
.CS
wrong # args: should be "foo barfly fileName count"
.CE
.SH "REFERENCE COUNT MANAGEMENT"
.PP
The \fIobjv\fR argument to \fBTcl_WrongNumArgs\fR should be the exact
arguments passed to the command or method implementation function that is
calling \fBTcl_WrongNumArgs\fR. As such, all values referenced in it should
have reference counts greater than zero; this is usually a non-issue.
.SH "SEE ALSO"
Tcl_GetIndexFromObj(3)
.SH KEYWORDS
+1 -1
View File
@@ -12,7 +12,7 @@
oo::abstract \- a class that does not allow direct instances of itself
.SH SYNOPSIS
.nf
package require TclOO
package require tcl::oo
\fBoo::abstract\fI method \fR?\fIarg ...\fR?
.fi
+11 -2
View File
@@ -1,6 +1,6 @@
'\"
'\" Copyright (c) 1997 by Sun Microsystems, Inc.
'\" Copyright (c) 2008 by Donal K. Fellows
'\" Copyright (c) 1997 Sun Microsystems, Inc.
'\" Copyright (c) 2008 Donal K. Fellows
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -762,6 +762,15 @@ high-to-low order within each byte. For example,
will return \fB2\fR with \fB01110\fR stored in \fIvar1\fR and
\fB1000011100000101\fR stored in \fIvar2\fR.
.RE
.IP \fBC\fR 5
This form is similar to \fBA\fR, except that it scans the data from start
and terminates at the first null (C string semantics). For example,
.RS
.CS
\fBbinary scan\fR "abc\e000efghi" C* var1
.CE
will return \fB1\fR with \fBabc\fR stored in \fIvar1\fR.
.RE
.IP \fBH\fR 5
The data is turned into a string of \fIcount\fR hexadecimal digits in
high-to-low order represented as a sequence of characters in the set
+1 -1
View File
@@ -12,7 +12,7 @@
callback, mymethod \- generate callbacks to methods
.SH SYNOPSIS
.nf
package require TclOO
package require tcl::oo
\fBcallback\fR \fImethodName\fR ?\fIarg ...\fR?
\fBmymethod\fR \fImethodName\fR ?\fIarg ...\fR?
+2 -2
View File
@@ -175,7 +175,7 @@ operating system, as returned by \fBencoding system\fR.
.TP
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
.
This option supports DOS file systems that use Control-z (\ex1a) as an
This option supports DOS file systems that use Control-z (\ex1A) as an
end of file marker. If \fIchar\fR is not an empty string, then this
character signals end-of-file when it is encountered during input.
For output, the end-of-file character is output when the channel is
@@ -188,7 +188,7 @@ will apply to both reading and writing. When querying the end-of-file
character of a read-write channel, a two-element list will always be
returned. The default value for \fB\-eofchar\fR is the empty string
in all cases except for files under Windows. In that case the
\fB\-eofchar\fR is Control-z (\ex1a) for reading and the empty string
\fB\-eofchar\fR is Control-z (\ex1A) for reading and the empty string
for writing.
The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7f;
attempting to set \fB\-eofchar\fR to a value outside of this range will
+1 -1
View File
@@ -12,7 +12,7 @@
oo::class \- class of all classes
.SH SYNOPSIS
.nf
package require TclOO
package require tcl::oo
\fBoo::class\fI method \fR?\fIarg ...\fR?
.fi
+1 -1
View File
@@ -13,7 +13,7 @@
classvariable \- create link from local variable to variable in class
.SH SYNOPSIS
.nf
package require TclOO
package require tcl::oo
\fBclassvariable\fR \fIvariableName\fR ?\fI...\fR?
.fi
+4 -4
View File
@@ -8,7 +8,7 @@
.SH NAME
clock \- Obtain and manipulate dates and times
.SH "SYNOPSIS"
package require \fBTcl 8.5\fR
package require \fBTcl 8.5-\fR
.sp
\fBclock add\fR \fItimeVal\fR ?\fIcount unit...\fR? ?\fI\-option value\fR?
.sp
@@ -823,7 +823,7 @@ the minus sign one west of Greenwich.
A time zone string conforming to the Posix specification of the \fBTZ\fR
environment variable will be recognized. The specification
may be found at
\fIhttp://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html\fR.
\fIhttps://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html\fR.
.PP
If the Posix time zone string contains a DST (Daylight Savings Time)
part, but doesn't contain a rule stating when DST starts or ends,
@@ -847,7 +847,7 @@ to use it as a location name, as above.
.SH "LOCALIZATION"
.PP
Developers wishing to localize the date and time formatting and parsing
are referred to \fIhttp://tip.tcl.tk/173\fR for a
are referred to \fIhttps://tip.tcl-lang.org/173\fR for a
specification.
.SH "FREE FORM SCAN"
.PP
@@ -951,7 +951,7 @@ msgcat(n)
.SH KEYWORDS
clock, date, time
.SH "COPYRIGHT"
Copyright (c) 2004 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
Copyright \(co 2004 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
'\" Local Variables:
'\" mode: nroff
'\" End:
+2 -2
View File
@@ -182,7 +182,7 @@ set cookiedb ~/.tclcookies.db
http::configure -cookiejar [\fBhttp::cookiejar new\fR $cookiedb]
# No further explicit steps are required to use cookies
set tok [http::geturl http://core.tcl.tk/]
set tok [http::geturl http://core.tcl-lang.org/]
.CE
.PP
To only allow a particular domain to use cookies, perhaps because you only
@@ -205,7 +205,7 @@ set cookiedb ~/.tclcookies.db
http::configure -cookiejar [MyCookieJar new $cookiedb]
# No further explicit steps are required to use cookies
set tok [http::geturl http://core.tcl.tk/]
set tok [http::geturl http://core.tcl-lang.org/]
.CE
.SH "SEE ALSO"
http(n), oo::class(n), sqlite3(n)
+1 -1
View File
@@ -12,7 +12,7 @@
oo::copy \- create copies of objects and classes
.SH SYNOPSIS
.nf
package require TclOO
package require tcl::oo
\fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? ?\fItargetNamespace\fR?
.fi
+1 -1
View File
@@ -172,7 +172,7 @@ particularly important website:
.PP
.CS
package require dde
\fBdde execute\fR -async iexplore WWW_OpenURL http://www.tcl.tk/
\fBdde execute\fR -async iexplore WWW_OpenURL http://www.tcl-lang.org/
.CE
.SH "SEE ALSO"
tk(n), winfo(n), send(n)
+1 -1
View File
@@ -12,7 +12,7 @@
oo::define, oo::objdefine \- define and configure classes and objects
.SH SYNOPSIS
.nf
package require TclOO
package require tcl::oo
\fBoo::define\fI class defScript\fR
\fBoo::define\fI class subcommand arg\fR ?\fIarg ...\fR?
+1 -1
View File
@@ -61,7 +61,7 @@ of the given patterns (in the style of \fBstring match\fR.)
.
The script rule tests for matching by assigning the key to the
\fIkeyVariable\fR and the value to the \fIvalueVariable\fR, and then evaluating
the given script which should return a boolean value (with the
the given script which should result in a boolean value (with the
key/value pair only being included in the result of the \fBdict
filter\fR when a true value is returned.) Note that the first
argument after the rule selection word is a two-element list. If the
+3 -19
View File
@@ -1,5 +1,5 @@
'\"
'\" Copyright (c) 1998 by Scriptics Corporation.
'\" Copyright (c) 1998 Scriptics Corporation.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -81,29 +81,13 @@ omitted then the command returns the current system encoding. The
system encoding is used whenever Tcl passes strings to system calls.
.SH EXAMPLE
.PP
It is common practice to write script files using a text editor that
produces output in the euc-jp encoding, which represents the ASCII
characters as singe bytes and Japanese characters as two bytes. This
makes it easy to embed literal strings that correspond to non-ASCII
characters by simply typing the strings in place in the script.
However, because the \fBsource\fR command always reads files using the
current system encoding, Tcl will only source such files correctly
when the encoding used to write the file is the same. This tends not
to be true in an internationalized setting. For example, if such a
file was sourced in North America (where the ISO8859\-1 is normally
used), each byte in the file would be treated as a separate character
that maps to the 00 page in Unicode. The resulting Tcl strings will
not contain the expected Japanese characters. Instead, they will
contain a sequence of Latin-1 characters that correspond to the bytes
of the original string. The \fBencoding\fR command can be used to
convert this string to the expected Japanese Unicode characters. For
example,
The following example converts a byte sequence in Japanese euc-jp encoding to a TCL string:
.PP
.CS
set s [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"]
.CE
.PP
would return the Unicode string
The result is the unicode codepoint:
.QW "\eu306F" ,
which is the Hiragana letter HA.
.SH "SEE ALSO"
+8 -13
View File
@@ -22,6 +22,10 @@ of one or more subprocesses to execute.
The arguments take the form of a standard shell pipeline
where each \fIarg\fR becomes one word of a command, and
each distinct command becomes a subprocess.
The result of the command is the standard output of the final subprocess in
the pipeline, interpreted using the system \fBencoding\fR; to use any other
encoding (especially including binary data), the pipeline must be
\fBopen\fRed, configured and read explicitly.
.PP
If the initial arguments to \fBexec\fR start with \fB\-\fR then
they are treated as command-line switches and are not part
@@ -246,15 +250,6 @@ the backslash character. If an argument contains forward slashes as the
path separator, it may or may not be recognized as a path name, depending on
the program.
.PP
Additionally, when calling a 16-bit DOS or Windows 3.X application, all path
names must use the short, cryptic, path format (e.g., using
.QW applba~1.def
instead of
.QW applbakery.default ),
which can be obtained with the
.QW "\fBfile attributes\fI fileName \fB\-shortname\fR"
command.
.PP
Two or more forward or backward slashes in a row in a path refer to a
network path. For example, a simple concatenation of the root directory
\fBc:/\fR with a subdirectory \fB/windows/system\fR will yield
@@ -295,11 +290,9 @@ The directory from which the Tcl executable was loaded.
.IP \(bu 3
The current directory.
.IP \(bu 3
The Windows NT 32-bit system directory.
The Windows 32-bit system directory.
.IP \(bu 3
The Windows NT 16-bit system directory.
.IP \(bu 3
The Windows NT home directory.
The Windows home directory.
.IP \(bu 3
The directories listed in the path.
.PP
@@ -422,7 +415,9 @@ With the file \fIcmp.bat\fR looking something like:
.CS
@gcc %*
.CE
.PP
or like another variant using single parameters:
.PP
.CS
@gcc %1 %2 %3 %4 %5 %6 %7 %8 %9
.CE
+2 -2
View File
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-2000 Sun Microsystems, Inc.
'\" Copyright (c) 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved
'\" Copyright (c) 2005 Kevin B. Kenny <kennykb@acm.org>. All rights reserved
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -514,7 +514,7 @@ arithmetic, boolean, compare, expression, fuzzy comparison, integer value
.nf
Copyright \(co 1993 The Regents of the University of California.
Copyright \(co 1994-2000 Sun Microsystems Incorporated.
Copyright \(co 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
Copyright \(co 2005 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
.fi
'\" Local Variables:
'\" mode: nroff
+3 -3
View File
@@ -105,7 +105,7 @@ system, as returned by \fBencoding system\fR.
.TP
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
.
This option supports DOS file systems that use Control-z (\ex1a) as an
This option supports DOS file systems that use Control-z (\ex1A) as an
end of file marker. If \fIchar\fR is not an empty string, then this
character signals end-of-file when it is encountered during input. For
output, the end-of-file character is output when the channel is closed.
@@ -117,9 +117,9 @@ channel you can specify a single value that will apply to both reading
and writing. When querying the end-of-file character of a read-write
channel, a two-element list will always be returned. The default value
for \fB\-eofchar\fR is the empty string in all cases except for files
under Windows. In that case the \fB\-eofchar\fR is Control-z (\ex1a) for
under Windows. In that case the \fB\-eofchar\fR is Control-z (\ex1A) for
reading and the empty string for writing.
The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7f;
The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7F;
attempting to set \fB\-eofchar\fR to a value outside of this range will
generate an error.
.TP
+23 -20
View File
@@ -38,28 +38,31 @@ generated. On Windows, FAT file systems do not support access time.
.TP
\fBfile attributes \fIname\fR ?\fIoption value option value...\fR?
.
This subcommand returns or sets platform specific values associated
with a file. The first form returns a list of the platform specific
flags and their values. The second form returns the value for the
specific option. The third form sets one or more of the values. The
values are as follows:
This subcommand returns or sets platform-specific values associated
with a file. The first form returns a list of the platform-specific
options and their values. The second form returns the value for the
given option. The third form sets one or more of the values. The values
are as follows:
.RS
.PP
On Unix, \fB\-group\fR gets or sets the group name for the file. A group id
can be given to the command, but it returns a group name. \fB\-owner\fR gets
or sets the user name of the owner of the file. The command returns the
owner name, but the numerical id can be passed when setting the
owner. \fB\-permissions\fR sets or retrieves the octal code that chmod(1)
uses. This command does also has limited support for setting using the
symbolic attributes for chmod(1), of the form [ugo]?[[+\-=][rwxst],[...]],
where multiple symbolic attributes can be separated by commas (example:
\fBu+s,go\-rw\fR add sticky bit for user, remove read and write
permissions for group and other). A simplified \fBls\fR style string,
of the form rwxrwxrwx (must be 9 characters), is also supported
(example: \fBrwxr\-xr\-t\fR is equivalent to 01755).
On versions of Unix supporting file flags, \fB\-readonly\fR gives the
value or sets or clears the readonly attribute of the file,
i.e. the user immutable flag \fBuchg\fR to chflags(1).
On Unix, \fB\-group\fR gets or sets the group name for the file. A
group id can be given to the command, but it returns a group name.
\fB\-owner\fR gets or sets the user name of the owner of the file. The
command returns the owner name, but the numerical id can be passed when
setting the owner. \fB\-permissions\fR retrieves or sets a file's
access permissions, using octal notation by default. This option also
provides limited support for setting permissions using the symbolic
notation accepted by the \fBchmod\fR command, following the form
[\fBugo\fR]?[[\fB+-=\fR][\fBrwxst\fR]\fB,\fR[...]]. Multiple permission
specifications may be given, separated by commas. E.g., \fBu+s,go-rw\fR
would set the setuid bit for a file's owner as well as remove read and
write permission for the file's group and other users. An
\fBls\fR-style string of the form \fBrwxrwxrwx\fR is also accepted but
must always be 9 characters long. E.g., \fBrwxr-xr-t\fR is equivalent
to \fB01755\fR. On versions of Unix supporting file flags,
\fB-readonly\fR returns the value of, or sets, or clears the readonly
attribute of a file, i.e., the user immutable flag (\fBuchg\fR) to the
\fBchflags\fR command.
.PP
On Windows, \fB\-archive\fR gives the value or sets or clears the
archive attribute of the file. \fB\-hidden\fR gives the value or sets
+1 -3
View File
@@ -150,9 +150,7 @@ The safest approach is to use names consisting of
alphanumeric characters only. Care should be taken with filenames
which contain spaces (common on Windows systems) and
filenames where the backslash is the directory separator (Windows
native path names). Also Windows 3.1 only supports file
names with a root of no more than 8 characters and an extension of no
more than 3 characters.
native path names).
.PP
On Windows platforms there are file and path length restrictions.
Complete paths or filenames longer than about 260 characters will lead

Some files were not shown because too many files have changed in this diff Show More