Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merge core-9-0-branch |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | bug-87b69745be |
Files: | files | file ages | folders |
SHA3-256: |
648341fdebe5f180200b122dce18a161 |
User & Date: | apnadkarni 2025-08-13 13:52:45.033 |
Context
2025-08-14
| ||
13:32 | Fix [87b69745be] - move zipfs encoding initialization outside of interp creation. Avoid unnecessary ... check-in: 0433b67adc user: apnadkarni tags: core-9-0-branch | |
2025-08-13
| ||
16:09 | fixes reentrant lock (UB), also locks only if it necessary (avoid extra lock) Closed-Leaf check-in: bf62ce24c6 user: sebres tags: mistake | |
13:52 | Merge core-9-0-branch Closed-Leaf check-in: 648341fdeb user: apnadkarni tags: bug-87b69745be | |
10:38 | Remove another check for TCL_MINOR_VERSION < 7 check-in: f20a357729 user: jan.nijtmans tags: core-9-0-branch | |
2025-08-06
| ||
02:17 | Only update file system epoch if system encoding changes check-in: 783dabc094 user: apnadkarni tags: bug-87b69745be | |
Changes
Changes to .github/workflows/linux-build.yml.
︙ | ︙ | |||
48 49 50 51 52 53 54 | matrix: ${{ fromJson(needs.plan.outputs.gcc) }} defaults: run: shell: bash working-directory: unix steps: - name: Checkout | | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | matrix: ${{ fromJson(needs.plan.outputs.gcc) }} defaults: run: shell: bash working-directory: unix steps: - name: Checkout uses: actions/checkout@v5 timeout-minutes: 5 - name: Install 32-bit dependencies if needed # Duplicated from above if: ${{ matrix.config == 'CFLAGS=-m32 CPPFLAGS=-m32 LDFLAGS=-m32 --disable-64bit' }} run: | sudo apt-get update sudo apt-get install gcc-multilib libc6-dev-i386 |
︙ | ︙ |
Changes to .github/workflows/mac-build.yml.
︙ | ︙ | |||
41 42 43 44 45 46 47 | runs-on: macos-15 defaults: run: shell: bash working-directory: macosx steps: - name: Checkout | | | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | runs-on: macos-15 defaults: run: shell: bash working-directory: macosx steps: - name: Checkout uses: actions/checkout@v5 timeout-minutes: 5 - name: Prepare run: | touch tclStubInit.c tclOOStubInit.c tclOOScript.h working-directory: generic - name: Build run: make -j4 all |
︙ | ︙ | |||
69 70 71 72 73 74 75 | matrix: ${{ fromJson(needs.plan.outputs.clang) }} defaults: run: shell: bash working-directory: unix steps: - name: Checkout | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | matrix: ${{ fromJson(needs.plan.outputs.clang) }} defaults: run: shell: bash working-directory: unix steps: - name: Checkout uses: actions/checkout@v5 timeout-minutes: 5 - name: Prepare run: | touch tclStubInit.c tclOOStubInit.c tclOOScript.h mkdir "$HOME/install dir" working-directory: generic - name: Configure ${{ matrix.config }} |
︙ | ︙ |
Changes to .github/workflows/onefiledist.yml.
︙ | ︙ | |||
14 15 16 17 18 19 20 | runs-on: ubuntu-24.04 defaults: run: shell: bash timeout-minutes: 10 steps: - name: Checkout | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | runs-on: ubuntu-24.04 defaults: run: shell: bash timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v5 - 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 |
︙ | ︙ | |||
57 58 59 60 61 62 63 | runs-on: macos-13 defaults: run: shell: bash timeout-minutes: 10 steps: - name: Checkout | | | | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | runs-on: macos-13 defaults: run: shell: bash timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v5 - name: Checkout create-dmg uses: actions/checkout@v5 with: repository: create-dmg/create-dmg ref: v1.0.8 path: create-dmg - name: Prepare run: | mkdir 1dist |
︙ | ︙ | |||
135 136 137 138 139 140 141 | steps: - name: Install MSYS2 uses: msys2/setup-msys2@v2 with: msystem: UCRT64 install: git mingw-w64-ucrt-x86_64-toolchain make zip - name: Checkout | | | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | 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@v5 - 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 |
︙ | ︙ | |||
190 191 192 193 194 195 196 | # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables REMOTE_PATH: ${{ vars.PUBLISH_DROP_PATH }}/data-${{ github.sha }} steps: - name: Make directory run: | mkdir data - name: Get Linux build | | | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables REMOTE_PATH: ${{ vars.PUBLISH_DROP_PATH }}/data-${{ github.sha }} steps: - name: Make directory run: | mkdir data - name: Get Linux build uses: actions/download-artifact@v5 with: path: data # Can't download by artifact ID; stupid missing feature! merge-multiple: true - name: Check data downloaded run: | ls -AlR |
︙ | ︙ |
Changes to .github/workflows/win-build.yml.
︙ | ︙ | |||
63 64 65 66 67 68 69 | shell: powershell working-directory: win strategy: matrix: ${{ fromJson(needs.plan.outputs.msvc) }} # Using powershell means we need to explicitly stop on failure steps: - name: Checkout | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | shell: powershell working-directory: win strategy: matrix: ${{ fromJson(needs.plan.outputs.msvc) }} # Using powershell means we need to explicitly stop on failure steps: - name: Checkout uses: actions/checkout@v5 timeout-minutes: 5 - name: Init MSVC uses: ilammy/msvc-dev-cmd@v1 timeout-minutes: 5 - name: Build ${{ matrix.config }} run: | &nmake -f makefile.vc ${{ matrix.config }} all |
︙ | ︙ | |||
108 109 110 111 112 113 114 | - name: Install MSYS2 uses: msys2/setup-msys2@v2 with: msystem: MINGW64 install: git mingw-w64-x86_64-toolchain make timeout-minutes: 10 - name: Checkout | | | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - name: Install MSYS2 uses: msys2/setup-msys2@v2 with: msystem: MINGW64 install: git mingw-w64-x86_64-toolchain make timeout-minutes: 10 - name: Checkout uses: actions/checkout@v5 timeout-minutes: 5 - name: Prepare run: | touch tclStubInit.c tclOOStubInit.c tclOOScript.h mkdir "${HOME}/install dir" working-directory: generic - name: Configure ${{ matrix.config }} |
︙ | ︙ |
Changes to changes.md.
1 2 3 4 5 6 7 8 9 10 11 12 | The source code for Tcl is managed by fossil. Tcl developers coordinate all changes to the Tcl source code at > [Tcl Source Code](https://core.tcl-lang.org/tcl/timeline) Release Tcl 9.0.3 arises from the check-in with tag `core-9-0-3`. Tcl patch releases have the primary purpose of delivering bug fixes to the userbase. # Bug fixes | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | The source code for Tcl is managed by fossil. Tcl developers coordinate all changes to the Tcl source code at > [Tcl Source Code](https://core.tcl-lang.org/tcl/timeline) Release Tcl 9.0.3 arises from the check-in with tag `core-9-0-3`. Tcl patch releases have the primary purpose of delivering bug fixes to the userbase. # Bug fixes - [On Unix, IsTimeNative() always defined but not always used](https://core.tcl-lang.org/tcl/tktview/6b8e39) - [Tweak install permissions](https://core.tcl-lang.org/tcl/tktview/31d4fa) # Updated bundled packages, libraries, standards, data - sqlite3 3.50.2 Release Tcl 9.0.2 arises from the check-in with tag `core-9-0-2`. Tcl patch releases have the primary purpose of delivering bug fixes |
︙ | ︙ |
Changes to generic/tclClock.c.
︙ | ︙ | |||
984 985 986 987 988 989 990 | size_t lastTZEpoch = TzsetIfNecessary(); if (i < objc) { if (dataPtr->systemTimeZone != objv[i]) { TclSetObjRef(dataPtr->systemTimeZone, objv[i]); TclUnsetObjRef(dataPtr->systemSetupTZData); } | > | > > > | 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 | size_t lastTZEpoch = TzsetIfNecessary(); if (i < objc) { if (dataPtr->systemTimeZone != objv[i]) { TclSetObjRef(dataPtr->systemTimeZone, objv[i]); TclUnsetObjRef(dataPtr->systemSetupTZData); } if (dataPtr->lastTZEpoch != lastTZEpoch) { dataPtr->lastTZEpoch = lastTZEpoch; /* TZ epoch changed - invalidate base-cache */ TclUnsetObjRef(dataPtr->lastBase.timezoneObj); } } if (i + 1 >= objc && dataPtr->systemTimeZone != NULL && dataPtr->lastTZEpoch == lastTZEpoch) { Tcl_SetObjResult(interp, dataPtr->systemTimeZone); } break; } |
︙ | ︙ |
Changes to generic/tclStubLib.c.
︙ | ︙ | |||
75 76 77 78 79 80 81 | if (!stubsPtr || (stubsPtr->magic != magic)) { exact &= 0xFFFF00; /* Filter out minor/major Tcl version */ if (!exact) { exact = 0x060800; } if (stubsPtr && (stubsPtr->magic == TCL_STUB_MAGIC) && ((exact|0x010000) == 0x070800)) { | | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | if (!stubsPtr || (stubsPtr->magic != magic)) { exact &= 0xFFFF00; /* Filter out minor/major Tcl version */ if (!exact) { exact = 0x060800; } if (stubsPtr && (stubsPtr->magic == TCL_STUB_MAGIC) && ((exact|0x010000) == 0x070800)) { /* We are running in Tcl 9.x, but extension is compiled with 8.6 */ stubsPtr->tcl_SetObjResult(interp, stubsPtr->tcl_ObjPrintf( "this extension is compiled for Tcl %d.%d", (exact & 0x0FF00)>>8, (exact & 0x0FF0000)>>16)); } else if (stubsPtr && (stubsPtr->magic == (int)0xFCA3BACF) && ((exact & 0x0FF00) >= 0x0900)) { /* We are running in Tcl 8.x, but extension is compiled with 9.0+ */ char major[4], minor[4]; |
︙ | ︙ |
Changes to generic/tclUniData.c.
︙ | ︙ | |||
191 192 193 194 195 196 197 | 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 9888, 1344, 1344, 9920, 3296, 9952, 9984, 10016, 1344, 1344, 10048, 10080, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 10112, 10144, 1344, 10176, 1344, 10208, 10240, 10272, 10304, 10336, 10368, 1344, 1344, 1344, 10400, 10432, 64, 10464, 10496, 10528, 4736, 10560, 10592 | | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 9856, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 9888, 1344, 1344, 9920, 3296, 9952, 9984, 10016, 1344, 1344, 10048, 10080, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 10112, 10144, 1344, 10176, 1344, 10208, 10240, 10272, 10304, 10336, 10368, 1344, 1344, 1344, 10400, 10432, 64, 10464, 10496, 10528, 4736, 10560, 10592 #if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 ,10624, 10656, 10688, 3296, 1344, 1344, 1344, 10720, 10752, 10784, 10816, 10848, 10880, 10912, 8032, 10944, 3296, 3296, 3296, 3296, 9216, 1344, 10976, 11008, 1344, 11040, 11072, 11104, 11136, 1344, 11168, 3296, 11200, 11232, 11264, 1344, 11296, 11328, 11360, 11392, 1344, 11424, 1344, 11456, 11488, 11520, 1344, 11552, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 7776, 4704, 11584, 11616, 11648, 3296, 3296, 11680, 11712, 11744, 11776, 4736, 11808, 3296, 11840, 11872, |
︙ | ︙ | |||
1176 1177 1178 1179 1180 1181 1182 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 94, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 94, 94, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 0, 0, 0, 4, 4, 7, 11, 14, 4, 4, 0, 14, 7, 7, 7, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 14, 14, 0, 0 | | | 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 94, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 94, 94, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 0, 0, 0, 4, 4, 7, 11, 14, 4, 4, 0, 14, 7, 7, 7, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 14, 14, 0, 0 #if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 ,15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
︙ | ︙ | |||
1729 1730 1731 1732 1733 1734 1735 | 2762882, -2759615, -2751679, -2760383, -2760127, -2768575, 1859714, -9044927, -10823615, -12158, -10830783, -10833599, -10832575, -10830015, -10817983, -10824127, -10818751, 237633, -12223, -10830527, -9058239, -10839743, -10895551, 237698, 9949314, 18, 17, 10305, 10370, 10049, 10114, 8769, 8834 }; | | | 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 | 2762882, -2759615, -2751679, -2760383, -2760127, -2768575, 1859714, -9044927, -10823615, -12158, -10830783, -10833599, -10832575, -10830015, -10817983, -10824127, -10818751, 237633, -12223, -10830527, -9058239, -10839743, -10895551, 237698, 9949314, 18, 17, 10305, 10370, 10049, 10114, 8769, 8834 }; #if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 # define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1FFFFF) >= 0x323C0) #else # define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1F0000) != 0) #endif /* * The following constants are used to determine the category of a |
︙ | ︙ | |||
1788 1789 1790 1791 1792 1793 1794 | #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ | | | 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 | #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ #if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 # define GetUniCharInfo(ch) (groups[groupMap[pageMap[((ch) & 0x1FFFFF) >> OFFSET_BITS] | ((ch) & ((1 << OFFSET_BITS)-1))]]) #else # define GetUniCharInfo(ch) (groups[groupMap[pageMap[((ch) & 0xFFFF) >> OFFSET_BITS] | ((ch) & ((1 << OFFSET_BITS)-1))]]) #endif |
Changes to library/clock.tcl.
︙ | ︙ | |||
664 665 666 667 668 669 670 671 672 | # Select the locale, eventually load it mcpackagelocale set $locale return $locale } #---------------------------------------------------------------------- # # _hasRegistry -- # | > | > > > | < | > > > > | 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 | # Select the locale, eventually load it mcpackagelocale set $locale return $locale } #---------------------------------------------------------------------- # # _registryExists -- # _hasRegistry -- # # Helpers that checks whether registry module is available (Windows only) # and loads it on demand. # # Side effects: # _hasRegistry does it only once, and hereafter simply returns 1 or 0. # #---------------------------------------------------------------------- proc ::tcl::clock::_registryExists {} { if { $::tcl_platform(platform) eq {windows} } { if { [catch { package require registry 1.3 }] } { # try to load registry directly from root (if uninstalled / development env): if {[regexp {[/\\]library$} [info library]]} {catch { load [lindex \ [glob -tails -directory [file dirname [info nameofexecutable]] \ tcl9registry*[expr {[::tcl::pkgconfig get debug] ? {g} : {}}].dll] 0 \ ] Registry }} } if { [namespace which -command ::registry] ne "" } { return 1 } } return 0 } proc ::tcl::clock::_hasRegistry {} { set res [_registryExists] proc ::tcl::clock::_hasRegistry {} [list return $res] return $res } #---------------------------------------------------------------------- # # LoadWindowsDateTimeFormats -- |
︙ | ︙ |
Changes to library/dde/pkgIndex.tcl.
1 2 3 4 | if {[info sharedlibextension] != ".dll"} return if {[package vsatisfies [package provide Tcl] 9.0-]} { package ifneeded dde 1.4.5 \ [list load [file join $dir tcl9dde14.dll] Dde] | < | | 1 2 3 4 5 6 7 8 9 10 11 | if {[info sharedlibextension] != ".dll"} return if {[package vsatisfies [package provide Tcl] 9.0-]} { package ifneeded dde 1.4.5 \ [list load [file join $dir tcl9dde14.dll] Dde] } elseif {[::tcl::pkgconfig get debug]} { package ifneeded dde 1.4.5 \ [list load [file join $dir tcldde14g.dll] Dde] } else { package ifneeded dde 1.4.5 \ [list load [file join $dir tcldde14.dll] Dde] } |
Changes to library/tcltest/tcltest.tcl.
︙ | ︙ | |||
2907 2908 2909 2910 2911 2912 2913 | "Skipping test files that match: [skipFiles]" } if {[llength [matchFiles]] > 0} { puts [outputChannel] \ "Only running test files that match: [matchFiles]" } | | | 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 | "Skipping test files that match: [skipFiles]" } if {[llength [matchFiles]] > 0} { puts [outputChannel] \ "Only running test files that match: [matchFiles]" } set timeCmd {clock format now -format "%Y-%m-%d %H:%M:%S %Z" -locale en} puts [outputChannel] "Tests began at [eval $timeCmd]" # Run each of the specified tests foreach file [lsort [GetMatchingFiles]] { set tail [file tail $file] puts [outputChannel] $tail flush [outputChannel] |
︙ | ︙ |
Changes to macosx/tclMacOSXFCmd.c.
︙ | ︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 102 103 | u_int16_t fdFlags; u_int32_t location; u_int16_t reserved; u_int32_t extendedFileInfo[4]; } __attribute__ ((__packed__)) finderinfo; typedef struct { u_int32_t info_length; u_int32_t data[8]; } fileinfobuf; /* *---------------------------------------------------------------------- * | > > | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | u_int16_t fdFlags; u_int32_t location; u_int16_t reserved; u_int32_t extendedFileInfo[4]; } __attribute__ ((__packed__)) finderinfo; typedef struct { u_int64_t reserved1; /* Make sure data is 8-byte aligned */ u_int32_t reserved2; /* See [992f94d847] */ u_int32_t info_length; u_int32_t data[8]; } fileinfobuf; /* *---------------------------------------------------------------------- * |
︙ | ︙ | |||
156 157 158 159 160 161 162 | alist.bitmapcount = ATTR_BIT_MAP_COUNT; if (objIndex == MACOSX_RSRCLENGTH_ATTRIBUTE) { alist.fileattr = ATTR_FILE_RSRCLENGTH; } else { alist.commonattr = ATTR_CMN_FNDRINFO; } native = (const char *)Tcl_FSGetNativePath(fileName); | | > | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | alist.bitmapcount = ATTR_BIT_MAP_COUNT; if (objIndex == MACOSX_RSRCLENGTH_ATTRIBUTE) { alist.fileattr = ATTR_FILE_RSRCLENGTH; } else { alist.commonattr = ATTR_CMN_FNDRINFO; } native = (const char *)Tcl_FSGetNativePath(fileName); result = getattrlist(native, &alist, &finfo.info_length, sizeof(fileinfobuf) - offsetof(fileinfobuf, info_length), 0); if (result != 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "could not read attributes of \"%s\": %s", TclGetString(fileName), Tcl_PosixError(interp))); return TCL_ERROR; } |
︙ | ︙ | |||
252 253 254 255 256 257 258 | alist.bitmapcount = ATTR_BIT_MAP_COUNT; if (objIndex == MACOSX_RSRCLENGTH_ATTRIBUTE) { alist.fileattr = ATTR_FILE_RSRCLENGTH; } else { alist.commonattr = ATTR_CMN_FNDRINFO; } native = (const char *)Tcl_FSGetNativePath(fileName); | | > | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | alist.bitmapcount = ATTR_BIT_MAP_COUNT; if (objIndex == MACOSX_RSRCLENGTH_ATTRIBUTE) { alist.fileattr = ATTR_FILE_RSRCLENGTH; } else { alist.commonattr = ATTR_CMN_FNDRINFO; } native = (const char *)Tcl_FSGetNativePath(fileName); result = getattrlist(native, &alist, &finfo.info_length, sizeof(fileinfobuf) - offsetof(fileinfobuf, info_length), 0); if (result != 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "could not read attributes of \"%s\": %s", TclGetString(fileName), Tcl_PosixError(interp))); return TCL_ERROR; } |
︙ | ︙ | |||
409 410 411 412 413 414 415 | Tcl_DString srcBuf, dstBuf; int result; bzero(&alist, sizeof(struct attrlist)); alist.bitmapcount = ATTR_BIT_MAP_COUNT; alist.commonattr = ATTR_CMN_FNDRINFO; | | > | 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | Tcl_DString srcBuf, dstBuf; int result; bzero(&alist, sizeof(struct attrlist)); alist.bitmapcount = ATTR_BIT_MAP_COUNT; alist.commonattr = ATTR_CMN_FNDRINFO; if (getattrlist(src, &alist, &finfo.info_length, sizeof(fileinfobuf) - offsetof(fileinfobuf, info_length), 0)) { return TCL_ERROR; } if (setattrlist(dst, &alist, &finfo.data, sizeof(finfo.data), 0)) { return TCL_ERROR; } /* |
︙ | ︙ | |||
431 432 433 434 435 436 437 | /* * We only copy a non-empty resource fork, so determine if that's the * case first. */ alist.commonattr = 0; alist.fileattr = ATTR_FILE_RSRCLENGTH; | | > | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | /* * We only copy a non-empty resource fork, so determine if that's the * case first. */ alist.commonattr = 0; alist.fileattr = ATTR_FILE_RSRCLENGTH; if (getattrlist(src, &alist, &finfo.info_length, sizeof(fileinfobuf) - offsetof(fileinfobuf, info_length), 0)) { return TCL_ERROR; } else if (*rsrcForkSize == 0) { return TCL_OK; } /* * Construct paths to resource forks. |
︙ | ︙ | |||
500 501 502 503 504 505 506 | fileinfobuf finfo; finderinfo *finder = (finderinfo *) &finfo.data; OSType osType; bzero(&alist, sizeof(struct attrlist)); alist.bitmapcount = ATTR_BIT_MAP_COUNT; alist.commonattr = ATTR_CMN_FNDRINFO; | | > | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | fileinfobuf finfo; finderinfo *finder = (finderinfo *) &finfo.data; OSType osType; bzero(&alist, sizeof(struct attrlist)); alist.bitmapcount = ATTR_BIT_MAP_COUNT; alist.commonattr = ATTR_CMN_FNDRINFO; if (getattrlist(pathName, &alist, &finfo.info_length, sizeof(fileinfobuf) - offsetof(fileinfobuf, info_length), 0)) { return 0; } if ((types->perm & TCL_GLOB_PERM_HIDDEN) && !((finder->fdFlags & kFinfoIsInvisible) || (*fileName == '.'))) { return 0; } if (S_ISDIR(statBufPtr->st_mode) |
︙ | ︙ |
Changes to tests/clock.test.
︙ | ︙ | |||
265 266 267 268 269 270 271 | Bias 300 \ StandardBias 0 \ DaylightBias -60 \ StandardStart \x00\x00\x0B\x00\x01\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00 \ DaylightStart \x00\x00\x03\x00\x02\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00]] } | < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | Bias 300 \ StandardBias 0 \ DaylightBias -60 \ StandardStart \x00\x00\x0B\x00\x01\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00 \ DaylightStart \x00\x00\x03\x00\x02\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00]] } proc ::testClock::registry { cmd path key } { variable reg if { $cmd ne {get} } { return -code error "test case attempts to write/query the registry" } if { ![dict exists $reg $path $key] } { return -code error "test case attempts to read unknown registry entry $path $key" } return [dict get $reg $path $key] } proc ::testClock::_setupRegistry {} { rename ::tcl::clock::_hasRegistry ::tcl::clock::_org_hasRegistry proc ::tcl::clock::_hasRegistry {} {return 1} namespace eval ::tcl::clock { namespace import -force ::testClock::registry } ::tcl::clock::ClearCaches } proc ::testClock::_cleanupRegistry {} { if {[namespace which -command ::tcl::clock::registry] ne ""} { rename ::tcl::clock::registry {} } rename ::tcl::clock::_hasRegistry {} rename ::tcl::clock::_org_hasRegistry ::tcl::clock::_hasRegistry ::tcl::clock::ClearCaches } proc ::testClock::_setupNoTZ {} { if { [info exists ::env(TZ)] } { variable orgTZ $::env(TZ) unset ::env(TZ) } if { [info exists ::env(TCL_TZ)] } { variable orgTclTZ $::env(TCL_TZ) unset ::env(TCL_TZ) } } proc ::testClock::_cleanupNoTZ {} { variable orgTclTZ if { [info exists orgTclTZ] } { set ::env(TCL_TZ) $orgTclTZ } else { unset -nocomplain ::env(TCL_TZ) } variable orgTZ if { [info exists orgTZ] } { set ::env(TZ) $orgTZ } else { unset -nocomplain ::env(TZ) } } # Don't confuse all following tests with TZ or TCL_TZ environment vars (unset them here): ::testClock::_setupNoTZ # Base test cases: # no lazy creation of clock-ensemble (interim, bug [9889f96f4da77e3b], [31fd84270644f67d]), # so ensemble created implicitely in init.tcl test clock-0.1 "initial: auto-loading of ensemble and stubs on demand" -setup { set i [interp create]; # because clock can be used somewhere, test it in new interp: |
︙ | ︙ | |||
35948 35949 35950 35951 35952 35953 35954 | # END testcases30 test clock-31.1 {system locale} \ -constraints {win noappverifier} \ -setup { | < | < < < < < | < < < < | < < < < < | < < < < | < < < < < | < < < < | < < < < < < < < < < < < < | < < < < < < < < < < | < < < < < < < < < < < < < | < < < < < < < < < < | < < < < < < < < < < < < < | < < < < < < < < < | 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017 36018 36019 36020 36021 36022 36023 36024 36025 36026 36027 36028 36029 36030 36031 36032 36033 36034 36035 36036 36037 36038 36039 36040 36041 36042 36043 36044 36045 36046 36047 36048 36049 36050 36051 36052 36053 36054 36055 36056 36057 36058 36059 36060 36061 36062 36063 36064 36065 36066 36067 36068 36069 36070 36071 36072 36073 36074 36075 36076 36077 36078 36079 36080 36081 | # END testcases30 test clock-31.1 {system locale} \ -constraints {win noappverifier} \ -setup { ::testClock::_setupRegistry } \ -body { clock format 0 -timezone :UTC -locale system -format %x } \ -cleanup { ::testClock::_cleanupRegistry } \ -result [clock format 0 -timezone :UTC -locale current \ -format {%d-%b-%Y}] test clock-31.2 {system locale} \ -constraints {win noappverifier} \ -setup { ::testClock::_setupRegistry } \ -body { clock format 0 -timezone :UTC -locale system -format %Ex } \ -cleanup { ::testClock::_cleanupRegistry } \ -result [clock format 0 -timezone :UTC -locale current \ -format {the %d' day of %B %Y}] test clock-31.3 {system locale} \ -constraints {win noappverifier} \ -setup { ::testClock::_setupRegistry } \ -body { clock format 0 -timezone :UTC -locale system -format %X } \ -cleanup { ::testClock::_cleanupRegistry } \ -result [clock format 0 -timezone :UTC -locale current \ -format {%l:%M:%S %p}] test clock-31.4 {system locale} \ -constraints {win noappverifier} \ -setup { ::testClock::_setupRegistry } \ -body { clock format 0 -locale system -format %x } \ -cleanup { ::testClock::_cleanupRegistry } \ -result [clock format 0 -locale current -timezone EST5 \ -format {%d-%b-%Y}] test clock-31.5 {system locale} \ -constraints {win noappverifier} \ -setup { ::testClock::_setupRegistry } \ -body { clock format 0 -locale system -format %Ex } \ -cleanup { ::testClock::_cleanupRegistry } \ -result [clock format 0 -locale current -timezone EST5 \ -format {the %d' day of %B %Y}] test clock-31.6 {system locale} \ -constraints {win noappverifier} \ -setup { ::testClock::_setupRegistry } \ -body { clock format 0 -locale system -format "%X %Z" } \ -cleanup { ::testClock::_cleanupRegistry } \ -result [clock format 0 -locale current -timezone EST5 \ -format {%l:%M:%S %p %Z}] test clock-32.1 {scan/format across the Gregorian change} { set problems {} set t [expr { wide(-6857395200) }] |
︙ | ︙ | |||
36971 36972 36973 36974 36975 36976 36977 | set d [clock scan $s -format %Es -gmt 1] # %Es depend on the time zone (local seconds instead of posix seconds). list [expr {$b-$a}] [expr {$d-$c}] } {-7200 7200} test clock-38.1 {regression - convertUTCToLocalViaC - east of Greenwich} \ -setup { | < < < < < | < < < < < < < < < < < < < | | | | | < < | < < < < < | < < < < < < < | < < < < < < < < > > > | > > > > > > > | > > | > > > > > > > > > > > > > > | > > > > > | < > > > > > > > > > > > > | > > | < < < < < | < < < < < < < < | < < < < < < < < | < < < | 36918 36919 36920 36921 36922 36923 36924 36925 36926 36927 36928 36929 36930 36931 36932 36933 36934 36935 36936 36937 36938 36939 36940 36941 36942 36943 36944 36945 36946 36947 36948 36949 36950 36951 36952 36953 36954 36955 36956 36957 36958 36959 36960 36961 36962 36963 36964 36965 36966 36967 36968 36969 36970 36971 36972 36973 36974 36975 36976 36977 36978 36979 36980 36981 36982 36983 36984 36985 36986 36987 36988 36989 36990 36991 36992 36993 36994 36995 36996 36997 36998 36999 37000 37001 37002 37003 37004 37005 37006 37007 37008 37009 37010 37011 37012 37013 37014 37015 37016 37017 37018 37019 37020 37021 37022 37023 37024 37025 37026 37027 37028 37029 37030 37031 37032 37033 37034 37035 37036 37037 37038 37039 37040 37041 37042 37043 37044 37045 37046 37047 37048 37049 37050 37051 37052 37053 37054 37055 37056 37057 37058 37059 37060 37061 37062 37063 37064 37065 37066 37067 37068 37069 37070 37071 37072 37073 37074 37075 37076 | set d [clock scan $s -format %Es -gmt 1] # %Es depend on the time zone (local seconds instead of posix seconds). list [expr {$b-$a}] [expr {$d-$c}] } {-7200 7200} test clock-38.1 {regression - convertUTCToLocalViaC - east of Greenwich} \ -setup { set env(TZ) CET-01:00CEST-02:00,M3.5.0/02:00,M10.5.0/03:00 } \ -body { clock format 0 -format %H:%M:%S -timezone :localtime } \ -cleanup { unset -nocomplain env(TZ) } \ -result {01:00:00} test clock-38.2 {make sure TZ is not cached after unset} \ -body { set t1 [clock format 0 -locale en] # a time zone that is unlikely to anywhere set env(TZ) "+04:20" set t2 [clock format 0 -locale en] unset -nocomplain env(TZ) set t3 [clock format 0 -locale en] list [expr {$t1 eq $t3 && $t1 ne $t2}] [subst {"$t1" eq "$t3" && "$t1" ne "$t2"}] } \ -cleanup { unset -nocomplain env(TZ) } \ -match glob -result {1 *} test clock-38.3sc {ensure cache of base is correct for :localtime if TZ-env changing / scan} \ -body { set res {} foreach env(TZ) {GMT-11:30 GMT-07:30 GMT-03:30 GMT} \ i {{07:30:00} {03:30:00} {23:30:00} {20:00:00}} \ { lappend res [clock scan $i -format "%H:%M:%S" -base [expr {20*60*60}] -timezone :localtime] } set res } \ -cleanup { unset -nocomplain env(TZ) } \ -result [lrepeat 4 [expr {20*60*60}]] test clock-38.3fm {ensure cache of base is correct for :localtime if TZ-env changing / format} \ -body { set res {} foreach env(TZ) {GMT-11:30 GMT-07:30 GMT-03:30 GMT} { lappend res [clock format [expr {20*60*60}] -format "%Y-%m-%dT%H:%M:%S %Z" -timezone :localtime] } set res } \ -cleanup { unset -nocomplain env(TZ) } \ -result {{1970-01-02T07:30:00 +1130} {1970-01-02T03:30:00 +0730} {1970-01-01T23:30:00 +0330} {1970-01-01T20:00:00 +0000}} test clock-38.4sc {ensure cache of base is correct for :localtime if TZ-env changing / scan (system TZ, no registry)} \ -setup { ::testClock::_setupRegistry # simulate we have no registry, so system TZ and :localtime get +HHMM format proc ::tcl::clock::_hasRegistry {} {return 0} } -body { # force epoch switch and set first TZ (a time zone that is unlikely to anywhere) and use :localtime set env(TZ) "+03:20" clock scan "12:00:00" -format "%H:%M:%S" -base [expr {20*60*60}] -timezone :localtime -locale en # force epoch switch, with unset TZ, it shall be system timezone now unset -nocomplain env(TZ) set t1 [clock scan "12:00:00" -format "%H:%M:%S" -base [expr {20*60*60}] -locale en] # force epoch switch and set another TZ (a time zone that is unlikely to anywhere) and use system timezone set env(TZ) "+04:20" set t2 [clock scan "12:00:00" -format "%H:%M:%S" -base [expr {20*60*60}] -locale en] # force epoch switch, with unset TZ, it shall be again system timezone unset -nocomplain env(TZ) set t3 [clock scan "12:00:00" -format "%H:%M:%S" -base [expr {20*60*60}] -locale en] # compare scanned values (t1 must be equal t3 and not equal t2): list [expr {$t1 == $t3 && $t1 != $t2}] [subst {$t1 == $t3 && $t1 != $t2}] } -cleanup { unset -nocomplain env(TZ) ::testClock::_cleanupRegistry } -match glob -result {1 *} test clock-38.4fm {ensure cache of base is correct for :localtime if TZ-env changing / format (system TZ, no registry)} \ -setup { ::testClock::_setupRegistry # simulate we have no registry, so system TZ and :localtime get +HHMM format proc ::tcl::clock::_hasRegistry {} {return 0} } -body { # force epoch switch and set first TZ (a time zone that is unlikely to anywhere) and use :localtime set env(TZ) "+03:20" clock format 0 -timezone :localtime -locale en # force epoch switch, with unset TZ, it shall be system timezone now unset -nocomplain env(TZ) set t1 [clock format 0 -locale en] # force epoch switch and set another TZ (a time zone that is unlikely to anywhere) and use system timezone set env(TZ) "+04:20" set t2 [clock format 0 -locale en] # force epoch switch, with unset TZ, it shall be again system timezone unset -nocomplain env(TZ) set t3 [clock format 0 -locale en] # compare formatted values (t1 must be equal t3 and not equal t2): list [expr {$t1 eq $t3 && $t1 ne $t2}] [subst {"$t1" eq "$t3" && "$t1" ne "$t2"}] } -cleanup { unset -nocomplain env(TZ) ::testClock::_cleanupRegistry } -match glob -result {1 *} test clock-39.1 {regression - synonym timezones} { clock format 0 -format {%H:%M:%S} -timezone :US/Eastern } {19:00:00} test clock-40.1 {regression - bad month with -timezone :localtime} \ -setup { set env(TZ) UTC0 } \ -body { clock scan 2000-01-01T00:00:00 -timezone :localtime \ -format %Y-%m-%dT%H:%M:%S } \ -cleanup { unset -nocomplain env(TZ) } \ -result 946684800 test clock-41.1 {regression test - format group %k when hour is 0 } { clock format 0 -format %k -gmt true } { 0} test clock-42.1 {regression test - %z in :localtime when west of Greenwich } \ -setup { set env(TZ) EST5 } \ -body { clock format 0 -format %z -timezone :localtime } \ -cleanup { unset -nocomplain env(TZ) } \ -result {-0500} # 43.1 was a bad test - mktime returning -1 is an error according to Posix. test clock-44.1 {regression test - time zone name containing hyphen } \ -setup { set env(TZ) US/East-Indiana } \ -body { clock format 1098466496 -format %H:%M:%S%z -timezone US/East-Indiana } \ -cleanup { unset -nocomplain env(TZ) } \ -result {12:34:56-0500} test clock-44.2 {regression test - time zone containing only two digits} \ -body { clock scan 1985-04-12T10:15:30+04 -format %Y-%m-%dT%H:%M:%S%Z } \ |
︙ | ︙ | |||
37554 37555 37556 37557 37558 37559 37560 | -match regexp \ -result {0 1969|1 {localtime failed \(clock value may be too large/small to represent\)}} test clock-49.2 {regression test - missing time zone file (Bug 1237907)} \ -constraints {win noappverifier} \ -setup { # override the registry so that the test takes place in New York time | < | < < < < < < < < < < < < | < < < < < < < < | 37481 37482 37483 37484 37485 37486 37487 37488 37489 37490 37491 37492 37493 37494 37495 37496 37497 37498 37499 37500 37501 37502 37503 37504 37505 37506 37507 37508 37509 | -match regexp \ -result {0 1969|1 {localtime failed \(clock value may be too large/small to represent\)}} test clock-49.2 {regression test - missing time zone file (Bug 1237907)} \ -constraints {win noappverifier} \ -setup { # override the registry so that the test takes place in New York time ::testClock::_setupRegistry # make it so New York time is a missing file dict set ::tcl::clock::WinZoneInfo \ {-18000 0 3600 0 11 0 1 2 0 0 0 0 3 0 2 2 0 0 0} \ :No/Such/File ::tcl::clock::ClearCaches } \ -body { list [::tcl::clock::GuessWindowsTimeZone] \ [clock format 0 -locale system -format "%H:%M:%S %Z"] \ [clock format -86400 -format "%Y"] } \ -cleanup { # restore the registry and environment ::testClock::_cleanupRegistry # put New York back on the map dict set ::tcl::clock::WinZoneInfo \ {-18000 0 3600 0 11 0 1 2 0 0 0 0 3 0 2 2 0 0 0} \ :America/New_York ::tcl::clock::ClearCaches } \ -result {<-0500>+05:00:00<-0400>+04:00:00,M3.2.0/02:00:00,M11.1.0/02:00:00 {19:00:00 -0500} 1969} |
︙ | ︙ | |||
38621 38622 38623 38624 38625 38626 38627 | unset ::tcltest::skippedBecause(valid_off) } if {!$valid_mode && [info exists ::tcltest::skippedBecause(!valid_off)]} { incr ::tcltest::numTests(Total) -$::tcltest::skippedBecause(!valid_off) incr ::tcltest::numTests(Skipped) -$::tcltest::skippedBecause(!valid_off) unset ::tcltest::skippedBecause(!valid_off) } | | > | 38527 38528 38529 38530 38531 38532 38533 38534 38535 38536 38537 38538 38539 38540 38541 38542 38543 | unset ::tcltest::skippedBecause(valid_off) } if {!$valid_mode && [info exists ::tcltest::skippedBecause(!valid_off)]} { incr ::tcltest::numTests(Total) -$::tcltest::skippedBecause(!valid_off) incr ::tcltest::numTests(Skipped) -$::tcltest::skippedBecause(!valid_off) unset ::tcltest::skippedBecause(!valid_off) } ::testClock::_cleanupNoTZ namespace delete ::testClock ::tcltest::cleanupTests unset valid_mode return # Local Variables: # mode: tcl # End: |
Changes to tools/uniParse.tcl.
︙ | ︙ | |||
208 209 210 211 212 213 214 | set last [expr {[llength $pMap] - 1}] for {set i 0} {$i <= $last} {incr i} { if {$i == [expr {0x10000 >> $shift}]} { set line [string trimright $line " \t,"] puts $f $line set lastpage [expr {[lindex $line end] >> $shift}] puts stdout "lastpage: $lastpage" | | | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | set last [expr {[llength $pMap] - 1}] for {set i 0} {$i <= $last} {incr i} { if {$i == [expr {0x10000 >> $shift}]} { set line [string trimright $line " \t,"] puts $f $line set lastpage [expr {[lindex $line end] >> $shift}] puts stdout "lastpage: $lastpage" puts $f "#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8" set line " ," } append line [lindex $pMap $i] if {$i != $last} { append line ", " } if {[string length $line] > 70} { |
︙ | ︙ | |||
238 239 240 241 242 243 244 | set line " " set lasti [expr {[llength $pages] - 1}] for {set i 0} {$i <= $lasti} {incr i} { set page [lindex $pages $i] set lastj [expr {[llength $page] - 1}] if {$i == ($lastpage + 1)} { puts $f [string trimright $line " \t,"] | | | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | set line " " set lasti [expr {[llength $pages] - 1}] for {set i 0} {$i <= $lasti} {incr i} { set page [lindex $pages $i] set lastj [expr {[llength $page] - 1}] if {$i == ($lastpage + 1)} { puts $f [string trimright $line " \t,"] puts $f "#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8" set line " ," } for {set j 0} {$j <= $lastj} {incr j} { append line [lindex $page $j] if {$j != $lastj || $i != $lasti} { append line ", " } |
︙ | ︙ | |||
338 339 340 341 342 343 344 | puts $f [string trimright $line] set line " " } } puts $f $line puts -nonewline $f "}; | | | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | puts $f [string trimright $line] set line " " } } puts $f $line puts -nonewline $f "}; #if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 # define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1FFFFF) >= [format 0x%X $next]) #else # define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1F0000) != 0) #endif /* * The following constants are used to determine the category of a |
︙ | ︙ | |||
397 398 399 400 401 402 403 | #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ | | | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ #if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 # define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0x1FFFFF) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\]) #else # define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0xFFFF) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\]) #endif " close $f } uni::main return |
Changes to unix/Makefile.in.
︙ | ︙ | |||
150 151 152 153 154 155 156 | # around; better to use the install-sh script that comes with the # distribution, which is slower but guaranteed to work. INSTALL_STRIP_PROGRAM = strip INSTALL_STRIP_LIBRARY = strip -x INSTALL = $(SHELL) $(UNIX_DIR)/install-sh -c | | | | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | # around; better to use the install-sh script that comes with the # distribution, which is slower but guaranteed to work. INSTALL_STRIP_PROGRAM = strip INSTALL_STRIP_LIBRARY = strip -x INSTALL = $(SHELL) $(UNIX_DIR)/install-sh -c INSTALL_PROGRAM = ${INSTALL} -m 755 INSTALL_LIBRARY = ${INSTALL} -m 755 INSTALL_DATA = ${INSTALL} -m 644 INSTALL_DATA_DIR = ${INSTALL} -d -m 755 # NATIVE_TCLSH is the name of a tclsh executable that is available *BEFORE* # running make for the first time. Certain build targets (make genstubs) need # it to be available on the PATH. This executable should *NOT* be required # just to do a normal build although it can be required to run make dist. |
︙ | ︙ | |||
1017 1018 1019 1020 1021 1022 1023 | if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ $(INSTALL_DATA_DIR) "$$i"; \ fi; \ done @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ | < | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 | if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ $(INSTALL_DATA_DIR) "$$i"; \ fi; \ done @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ @echo "Installing ${TCL_EXE} as $(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}" @$(INSTALL_PROGRAM) ${TCL_EXE} "$(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}" @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" @$(INSTALL_DATA) tclConfig.sh "$(CONFIG_INSTALL_DIR)/tclConfig.sh" @echo "Installing tclooConfig.sh to $(CONFIG_INSTALL_DIR)/" @$(INSTALL_DATA) $(UNIX_DIR)/tclooConfig.sh \ "$(CONFIG_INSTALL_DIR)/tclooConfig.sh" |
︙ | ︙ |
Changes to unix/tclAppInit.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tcl.h" #if TCL_MAJOR_VERSION < 9 | | | < < | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tcl.h" #if TCL_MAJOR_VERSION < 9 # if defined(USE_TCL_STUBS) # error "Don't build with USE_TCL_STUBS!" # endif # define Tcl_LibraryInitProc Tcl_PackageInitProc # define Tcl_StaticLibrary Tcl_StaticPackage #endif #ifdef TCL_TEST #ifdef __cplusplus extern "C" { #endif extern Tcl_LibraryInitProc Tcltest_Init; |
︙ | ︙ | |||
88 89 90 91 92 93 94 | { #ifdef TCL_XT_TEST XtToolkitInitialize(); #endif #ifdef TCL_LOCAL_MAIN_HOOK TCL_LOCAL_MAIN_HOOK(&argc, &argv); | | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | { #ifdef TCL_XT_TEST XtToolkitInitialize(); #endif #ifdef TCL_LOCAL_MAIN_HOOK TCL_LOCAL_MAIN_HOOK(&argc, &argv); #elif TCL_MAJOR_VERSION > 8 && (!defined(_WIN32) || defined(UNICODE)) /* New in Tcl 9.0. This doesn't work on Windows without UNICODE */ TclZipfs_AppHook(&argc, &argv); #endif Tcl_Main(argc, argv, TCL_LOCAL_APPINIT); return 0; /* Needed only to prevent compiler warning. */ } |
︙ | ︙ |
Changes to win/rules.vc.
︙ | ︙ | |||
800 801 802 803 804 805 806 | # DEBUG - 1 -> debug build, 0 -> release builds # SYMBOLS - 1 -> generate PDB's, 0 -> no PDB's # PROFILE - 1 -> generate profiling info, 0 -> no profiling # PGO - 1 -> profile based optimization, 0 -> no # MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build # 0 -> link to static C runtime for static Tcl build. # Does not impact shared Tcl builds (STATIC_BUILD == 0) | | | | 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 | # DEBUG - 1 -> debug build, 0 -> release builds # SYMBOLS - 1 -> generate PDB's, 0 -> no PDB's # PROFILE - 1 -> generate profiling info, 0 -> no profiling # PGO - 1 -> profile based optimization, 0 -> no # MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build # 0 -> link to static C runtime for static Tcl build. # Does not impact shared Tcl builds (STATIC_BUILD == 0) # Default: 1 for Tcl 9.0 and up, 0 otherwise. # TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions # in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does # not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 9.0. # USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation. # 0 -> Use the non-thread allocator. # UNCHECKED - 1 -> when doing a debug build with symbols, use the release # C runtime, 0 -> use the debug C runtime. # USE_STUBS - 1 -> compile to use stubs interfaces, 0 -> direct linking # CONFIG_CHECK - 1 -> check current build configuration against Tcl # configuration (ignored for Tcl itself) |
︙ | ︙ | |||
1038 1039 1040 1041 1042 1043 1044 | ################################################################ # 10. Construct output directory and file paths # Figure-out how to name our intermediate and output directories. # In order to avoid inadvertent mixing of object files built using # different compilers, build configurations etc., # # Naming convention (suffixes): | | | 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 | ################################################################ # 10. Construct output directory and file paths # Figure-out how to name our intermediate and output directories. # In order to avoid inadvertent mixing of object files built using # different compilers, build configurations etc., # # Naming convention (suffixes): # t = full thread support. (Not used for Tcl >= 9.0) # s = static library (as opposed to an import library) # g = linked to the debug enabled C run-time. # x = special static build when it links to the dynamic C run-time. # # The following macros are set in this section: # SUFX - the suffix to use for binaries based on above naming convention # BUILDDIRTOP - the toplevel default output directory |
︙ | ︙ | |||
1169 1170 1171 1172 1173 1174 1175 | !if $(TCL_MAJOR_VERSION) == 8 TCLSTUBLIB = $(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib !else TCLSTUBLIB = $(_TCLDIR)\lib\tclstub.lib !endif TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:t=).lib # When building extensions, may be linking against Tcl that does not add | | | 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 | !if $(TCL_MAJOR_VERSION) == 8 TCLSTUBLIB = $(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib !else TCLSTUBLIB = $(_TCLDIR)\lib\tclstub.lib !endif TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:t=).lib # When building extensions, may be linking against Tcl that does not add # "t" suffix (e.g. 8.6). If lib not found check for that possibility. !if !exist("$(TCLIMPLIB)") TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)t$(SUFX:t=).lib !endif TCL_LIBRARY = $(_TCLDIR)\lib TCLREGLIB = $(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib TCLDDELIB = $(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib TCLSCRIPTZIP = $(_TCLDIR)\lib\$(TCL_ZIP_FILE) |
︙ | ︙ | |||
1193 1194 1195 1196 1197 1198 1199 | !if $(TCL_MAJOR_VERSION) == 8 TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib !else TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub.lib !endif TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:t=).lib # When building extensions, may be linking against Tcl that does not add | | | 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | !if $(TCL_MAJOR_VERSION) == 8 TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib !else TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub.lib !endif TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:t=).lib # When building extensions, may be linking against Tcl that does not add # "t" suffix (e.g. 8.6). If lib not found check for that possibility. !if !exist("$(TCLIMPLIB)") TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)t$(SUFX:t=).lib !endif TCL_LIBRARY = $(_TCLDIR)\library TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib TCLSCRIPTZIP = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCL_ZIP_FILE) |
︙ | ︙ | |||
1258 1259 1260 1261 1262 1263 1264 | !else # effectively NEED_TK !if $(TKINSTALL) # Building against installed Tk WISH = $(_TKDIR)\bin\$(WISHNAME) TKSTUBLIB = $(_TKDIR)\lib\$(TKSTUBLIBNAME) TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME) # When building extensions, may be linking against Tk that does not add | | | | 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | !else # effectively NEED_TK !if $(TKINSTALL) # Building against installed Tk WISH = $(_TKDIR)\bin\$(WISHNAME) TKSTUBLIB = $(_TKDIR)\lib\$(TKSTUBLIBNAME) TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME) # When building extensions, may be linking against Tk that does not add # "t" suffix (e.g. 8.6). If lib not found check for that possibility. !if !exist("$(TKIMPLIB)") TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME) !endif TK_INCLUDES = -I"$(_TKDIR)\include" TKSCRIPTZIP = $(_TKDIR)\lib\$(TK_ZIP_FILE) !else # Building against Tk sources WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\$(WISHNAME) TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSTUBLIBNAME) TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME) # When building extensions, may be linking against Tk that does not add # "t" suffix (e.g. 8.6). If lib not found check for that possibility. !if !exist("$(TKIMPLIB)") TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME) !endif TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib" TKSCRIPTZIP = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TK_ZIP_FILE) |
︙ | ︙ |
Changes to win/tclAppInit.c.
︙ | ︙ | |||
12 13 14 15 16 17 18 | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tcl.h" #if TCL_MAJOR_VERSION < 9 | | | < < | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tcl.h" #if TCL_MAJOR_VERSION < 9 # if defined(USE_TCL_STUBS) # error "Don't build with USE_TCL_STUBS!" # endif # define Tcl_LibraryInitProc Tcl_PackageInitProc # define Tcl_StaticLibrary Tcl_StaticPackage #endif #ifdef TCL_TEST #ifdef __cplusplus extern "C" { #endif extern Tcl_LibraryInitProc Tcltest_Init; |
︙ | ︙ | |||
138 139 140 141 142 143 144 | if (*p == '\\') { *p = '/'; } } #ifdef TCL_LOCAL_MAIN_HOOK TCL_LOCAL_MAIN_HOOK(&argc, &argv); | | | | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | if (*p == '\\') { *p = '/'; } } #ifdef TCL_LOCAL_MAIN_HOOK TCL_LOCAL_MAIN_HOOK(&argc, &argv); #elif TCL_MAJOR_VERSION > 8 && (!defined(_WIN32) || defined(UNICODE)) /* New in Tcl 9.0. This doesn't work on Windows without UNICODE */ TclZipfs_AppHook(&argc, &argv); #endif Tcl_Main(argc, argv, TCL_LOCAL_APPINIT); return 0; /* Needed only to prevent compiler warning. */ } |
︙ | ︙ |