diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-07-16 06:07:43 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-07-16 06:07:43 (GMT) |
| commit | c47c440be201796b70e73c246807a534cc3b089e (patch) | |
| tree | befa24b89a6e3b2ec6a0776de9775daea9ba310d | |
| parent | 1523ce53c14f5ee915c69aa29b75395a1a5286de (diff) | |
| download | tcl-c47c440be201796b70e73c246807a534cc3b089e.zip tcl-c47c440be201796b70e73c246807a534cc3b089e.tar.gz tcl-c47c440be201796b70e73c246807a534cc3b089e.tar.bz2 | |
-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)
| -rw-r--r-- | library/auto.tcl | 4 | ||||
| -rw-r--r-- | library/safe.tcl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/auto.tcl b/library/auto.tcl index 1b8ad44..9b6dbf1 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -250,7 +250,7 @@ proc auto_mkindex_old {dir args} { set f "" set error [catch { set f [open $file] - fconfigure $f -eofchar \032 + fconfigure $f -eofchar "\032 {}" while {[gets $f line] >= 0} { if {[regexp {^proc[ ]+([^ ]*)} $line match procName]} { set procName [lindex [auto_qualify $procName "::"] 0] @@ -354,7 +354,7 @@ proc auto_mkindex_parser::mkindex {file} { set scriptFile $file set fid [open $file] - fconfigure $fid -eofchar \032 + fconfigure $fid -eofchar "\032 {}" set contents [read $fid] close $fid diff --git a/library/safe.tcl b/library/safe.tcl index 92cd6d1..bd51e18 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -854,7 +854,7 @@ proc ::safe::AliasSource {slave args} { set old [::interp eval $slave {info script}] set code [catch { set f [open $realfile] - fconfigure $f -eofchar \032 + fconfigure $f -eofchar "\032 {}" if {$encoding ne ""} { fconfigure $f -encoding $encoding } |
