From 94c0fba63c4bc7a61f181cf02da9042ebf0884a9 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 7 Aug 2017 01:16:39 +0000 Subject: [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. --- generic/tclIOUtil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index ea407ab..2c389c6 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -1764,7 +1764,7 @@ Tcl_FSEvalFileEx( * this cross-platform to allow for scripted documents. [Bug: 2040] */ - Tcl_SetChannelOption(interp, chan, "-eofchar", "\32"); + Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}"); /* * If the encoding is specified, set it for the channel. Else don't touch @@ -1899,7 +1899,7 @@ TclNREvalFile( * this cross-platform to allow for scripted documents. [Bug: 2040] */ - Tcl_SetChannelOption(interp, chan, "-eofchar", "\32"); + Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}"); /* * If the encoding is specified, set it for the channel. Else don't touch -- cgit v0.12