## input and output is handled by tkcon
if {![catch {rename ::puts ::tkcon_tcl_puts}]} {
interp alias {} ::puts {} ::tkcon_puts
+ if {[llength [info commands ::tcl::chan::puts]]} {
+ interp alias {} ::tcl::chan::puts {} ::tkcon_puts
+ }
}
if {($OPT(gets) != "") && ![catch {rename ::gets ::tkcon_tcl_gets}]} {
interp alias {} ::gets {} ::tkcon_gets
+ if {[llength [info commands ::tcl::chan::gets]]} {
+ interp alias {} ::tcl::chan::gets {} ::tkcon_gets
+ }
}
EvalSlave history keep $OPT(history)
foreach cmd $PRIV(slavealias) { $slave alias $cmd $cmd }
interp alias $slave ::ls $slave ::dir -full
interp alias $slave ::puts $slave ::tkcon_puts
+ if {[llength [info commands ::tcl::chan::puts]]} {
+ interp alias $slave ::tcl::chan::puts $slave ::tkcon_puts
+ }
if {$OPT(gets) != ""} {
interp eval $slave { catch {rename ::gets ::tkcon_tcl_gets} }
interp alias $slave ::gets $slave ::tkcon_gets
+ if {[llength [info commands ::tcl::chan::gets]]} {
+ interp alias $slave ::tcl::chan::gets $slave ::tkcon_gets
+ }
}
if {$slaveargv0 != ""} {
# If tkcon was invoked with 1 or more filenames, then make the
catch {interp alias {} ::ls {} ::dir -full}
if {[catch {interp alias {} ::puts {} ::tkcon_puts}]} {
catch {rename ::tkcon_puts ::puts}
+ } elseif {[llength [info commands ::tcl::chan::puts]]} {
+ catch {interp alias {} ::tcl::chan::puts {} ::tkcon_puts}
}
}
if {$OPT(gets) != ""} {
catch {rename ::gets ::tkcon_tcl_gets}
if {[catch {interp alias {} ::gets {} ::tkcon_gets}]} {
catch {rename ::tkcon_gets ::gets}
+ } elseif {[llength [info commands ::tcl::chan::gets]]} {
+ catch {interp alias {} ::tcl::chan::gets {} ::tkcon_gets}
}
}
}