Tcl Source Code

Check-in [527d354828]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[5bfe3de008]: Modify [source] to set input EOF character but not output EOF character. This avoids having ^Z being appended to the sourced file when it is an always-writable [tcl::chan::variable] in a custom VFS. Tested by adding this same change as a patch to Tcl 8.6.6 in KitCreator because that seems to be the easiest way to get custom VFS capability exposed as script commands. Original problem introduced by [03cdfc3a86] 2000-05-11 00:16:52.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 527d3548284d6fd7fc81c7cb9fc73be2489c6f5c
User & Date: andy 2017-08-07 01:16:39
Original Comment: [5bfe3de008]: Modify [source] to set input EOF character but not output EOF character. This avoids having ^Z being appended to the sourced file when it is an always-writable [tcl::chan::variable] in a custom VFS. Tested by adding this same change as a patch to Tcl 8.6.6 in KitCreator because that seems to be the easiest way to get custom VFS capability exposed as script commands.
References
2017-08-08
22:09 Ticket [5bfe3de008] ^Z appended to sourced VFS files status still Open with 4 other changes artifact: 2026fa5048 user: andy
16:45
Cherrypick [527d354828] check-in: b300e0ceb0 user: andy tags: core-8-5-branch
16:42
Cherrypick [527d354828] check-in: e339228320 user: andy tags: core-8-6-branch
2017-08-07
01:17 Ticket [5bfe3de008] ^Z appended to sourced VFS files status still Open with 5 other changes artifact: 17b3b40ea8 user: andy
Context
2017-08-09
16:38
merge mark check-in: 485cf243f0 user: dgp tags: trunk
2017-08-08
16:45
Cherrypick [527d354828] check-in: b300e0ceb0 user: andy tags: core-8-5-branch
16:42
Cherrypick [527d354828] check-in: e339228320 user: andy tags: core-8-6-branch
16:39
Merge trunk check-in: 16185b644b user: andy tags: tip-445
16:39
Merge trunk check-in: aadf195d2c user: andy tags: novem
2017-08-07
01:16
[5bfe3de008]: Modify [source] to set input EOF character but not output EOF character. This avoids ... check-in: 527d354828 user: andy tags: trunk
2017-08-04
13:18
merge 8.6 check-in: 310ded6da8 user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclIOUtil.c.

1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
....
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
    }

    /*
     * The eofchar is \32 (^Z). This is the usual on Windows, but we effect
     * this cross-platform to allow for scripted documents. [Bug: 2040]
     */

    Tcl_SetChannelOption(interp, chan, "-eofchar", "\32");

    /*
     * If the encoding is specified, set it for the channel. Else don't touch
     * it (and use the system encoding) Report error on unknown encoding.
     */

    if (encodingName != NULL) {
................................................................................
    TclPkgFileSeen(interp, Tcl_GetString(pathPtr));

    /*
     * The eofchar is \32 (^Z). This is the usual on Windows, but we effect
     * this cross-platform to allow for scripted documents. [Bug: 2040]
     */

    Tcl_SetChannelOption(interp, chan, "-eofchar", "\32");

    /*
     * If the encoding is specified, set it for the channel. Else don't touch
     * it (and use the system encoding) Report error on unknown encoding.
     */

    if (encodingName != NULL) {






|







 







|







1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
....
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
    }

    /*
     * The eofchar is \32 (^Z). This is the usual on Windows, but we effect
     * this cross-platform to allow for scripted documents. [Bug: 2040]
     */

    Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}");

    /*
     * If the encoding is specified, set it for the channel. Else don't touch
     * it (and use the system encoding) Report error on unknown encoding.
     */

    if (encodingName != NULL) {
................................................................................
    TclPkgFileSeen(interp, Tcl_GetString(pathPtr));

    /*
     * The eofchar is \32 (^Z). This is the usual on Windows, but we effect
     * this cross-platform to allow for scripted documents. [Bug: 2040]
     */

    Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}");

    /*
     * If the encoding is specified, set it for the channel. Else don't touch
     * it (and use the system encoding) Report error on unknown encoding.
     */

    if (encodingName != NULL) {