From 368e07c87d71f43cbc28c00b64cba752a91935a6 Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Wed, 20 Sep 2000 20:52:54 +0000 Subject: [PATCH] (EvalCmd): Changed EvalSocket functionality to have the \'s substituted before sending data, to allow for special chars to be added to the string. --- ChangeLog | 3 +++ tkcon.tcl | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index f2fcb15..053f915 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ they accept only one arg as the command string to be evaluated. Prior behavior left some ambiguity as to what was eval'ed where. EvalOther, EvalSlave may need some sanitation as well. + (EvalCmd): Changed EvalSocket functionality to have the \'s + substituted before sending data, to allow for special chars to be + added to the string. 2000-09-19 Jeff Hobbs diff --git a/tkcon.tcl b/tkcon.tcl index b4bdf68..dedd014 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -771,6 +771,9 @@ proc ::tkcon::EvalSocket cmd { Prompt "\n\"$PRIV(app)\" alive\n" [CmdGet $PRIV(console)] } } + # Sockets get \'s interpreted, so that users can + # send things like \n\r or explicit hex values + set cmd [subst -novariables -nocommands $cmd] #puts [list $PRIV(app) $cmd] set code [catch {puts $PRIV(app) $cmd ; flush $PRIV(app)} result] if {$code && [eof $PRIV(app)]} { -- 2.23.0